mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 04:52:50 +00:00
公众号关注回复默认报错,修复时间选择框太小问题
This commit is contained in:
parent
4589382585
commit
4fe22856c2
@ -15,7 +15,7 @@ use app\admin\model\ump\StoreCombinationAttrResult;
|
||||
use app\admin\model\ump\StoreCombination as StoreCombinationModel;
|
||||
use think\Url;
|
||||
use app\admin\model\system\SystemAttachment;
|
||||
use app\wap\model\store\StorePink;
|
||||
use app\admin\model\ump\StorePink;
|
||||
|
||||
/**
|
||||
* 拼团管理
|
||||
|
||||
@ -16,14 +16,15 @@ use think\Request;
|
||||
*/
|
||||
class Reply extends AuthController
|
||||
{
|
||||
/**关注回复
|
||||
* @return mixed|void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if(empty(input('key'))) return $this->failed('请输入参数key');
|
||||
if(empty(input('title'))) return $this->failed('请输入参数title');
|
||||
$replay = WechatReply::where('key',input('key'))->find();
|
||||
$replay_arr =!empty($replay) ? $replay->toArray() : [];
|
||||
$replay_arr['data'] = json_decode(isset($replay_arr['data']) ? $replay_arr['data'] : '',true);
|
||||
$this->assign('replay_arr',json_encode($replay_arr));
|
||||
$replay = WechatReply::getDataByKey(input('key'));
|
||||
$this->assign('replay_arr',json_encode($replay));
|
||||
$this->assign('key',input('key'));
|
||||
$this->assign('title',input('title'));
|
||||
return $this->fetch();
|
||||
@ -36,10 +37,8 @@ class Reply extends AuthController
|
||||
],$this->request);
|
||||
// dump($where);
|
||||
// exit();
|
||||
if(!empty($where['key'])) $replay = WechatReply::where('key',$where['key'])->find();
|
||||
$replay_arr = $replay->toArray();
|
||||
if(!empty($where['key'])) $replay_arr = WechatReply::getDataByKey($where['key']);
|
||||
$replay_arr['code'] = 200;
|
||||
$replay_arr['data'] = json_decode($replay_arr['data'],true);
|
||||
if(empty($replay_arr)) {
|
||||
$replay_arr['code'] = 0;
|
||||
}
|
||||
@ -117,10 +116,8 @@ class Reply extends AuthController
|
||||
public function info_keyword(){
|
||||
$key = input('key');
|
||||
if(empty($key)) return $this->failed('参数错误,请重新修改');
|
||||
$replay = WechatReply::where('key',$key)->find();
|
||||
$replay_arr = $replay->toArray();
|
||||
$replay_arr['data'] = json_decode($replay_arr['data'],true);
|
||||
$this->assign('replay_arr',json_encode($replay_arr));
|
||||
$replay = WechatReply::getDataByKey($key);
|
||||
$this->assign('replay_arr',json_encode($replay));
|
||||
$this->assign('key',$key);
|
||||
$this->assign('dis',2);
|
||||
return $this->fetch('add_keyword');
|
||||
|
||||
@ -26,6 +26,15 @@ class WechatReply extends ModelBasic
|
||||
|
||||
public static $reply_type = ['text','image','news','voice'];
|
||||
|
||||
/**根据关键字查询一条
|
||||
* @param $key
|
||||
*/
|
||||
public static function getDataByKey($key){
|
||||
$resdata = [];
|
||||
$resdata = self::where('key',$key)->find();
|
||||
$resdata['data'] = json_decode($resdata['data'],true);
|
||||
return $resdata;
|
||||
}
|
||||
public function getUrlAttr($value,$data)
|
||||
{
|
||||
return $value == '' ? \think\Url::build('index/index/news',['id'=>$data['id']]) : $value;
|
||||
@ -194,4 +203,5 @@ class WechatReply extends ModelBasic
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -8,6 +8,7 @@
|
||||
/*弹框样式修改*/
|
||||
.ivu-modal-body{padding: 5;}
|
||||
.ivu-modal-confirm-footer{display: none;}
|
||||
.ivu-date-picker {display: inline-block;line-height: normal;width: 280px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -19,6 +20,8 @@
|
||||
//关闭当前窗口
|
||||
// var index = parent.layer.getFrameIndex(window.name);
|
||||
// parent.layer.close(index);
|
||||
//提交成功后按钮恢复
|
||||
$r.btn.finish();
|
||||
};
|
||||
(function () {
|
||||
var create = <?=$form->formScript()?>
|
||||
|
||||
@ -51,13 +51,14 @@
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.nickName}/{$vo.uid}
|
||||
{$vo.nickname}/{$vo.uid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date='Y-m-d H:i:s',###}
|
||||
|
||||
@ -20,8 +20,7 @@ use app\routine\model\user\UserAddress;
|
||||
use app\routine\model\user\UserBill;
|
||||
use app\routine\model\user\WechatUser;
|
||||
use basic\ModelBasic;
|
||||
use behavior\wap\StoreProductBehavior;
|
||||
use behavior\routine\StoreProductBehavior as StoreProductBehaviorRoutine;
|
||||
use behavior\routine\StoreProductBehavior;
|
||||
use behavior\wechat\PaymentBehavior;
|
||||
use service\HookService;
|
||||
use service\RoutineService;
|
||||
@ -521,7 +520,7 @@ class StoreOrder extends ModelBasic
|
||||
if(false !== self::edit(['status'=>2],$order['id'],'id') &&
|
||||
false !== StoreOrderStatus::status($order['id'],'user_take_delivery','用户已收货')){
|
||||
try{
|
||||
HookService::listen('store_product_order_user_take_delivery',$order,$uid,false,StoreProductBehaviorRoutine::class);
|
||||
HookService::listen('store_product_order_user_take_delivery',$order,$uid,false,StoreProductBehavior::class);
|
||||
}catch (\Exception $e){
|
||||
return self::setErrorInfo($e->getMessage());
|
||||
}
|
||||
|
||||
@ -11,7 +11,10 @@ namespace behavior\routine;
|
||||
use app\routine\model\store\StoreOrder;
|
||||
use app\routine\model\user\User;
|
||||
use app\routine\model\user\WechatUser;
|
||||
use app\routine\model\user\UserAddress;
|
||||
use app\admin\model\order\StoreOrder as StoreOrderAdminModel;
|
||||
use service\SystemConfigService;
|
||||
use service\WechatTemplateService;
|
||||
|
||||
class StoreProductBehavior
|
||||
{
|
||||
@ -29,4 +32,160 @@ class StoreProductBehavior
|
||||
if($order['total_price'] >= $giveCouponMinPrice) WechatUser::userTakeOrderGiveCoupon($uid);
|
||||
if(!($res1 && $res2)) exception('收货失败!');
|
||||
}
|
||||
/**
|
||||
* 订单创建成功后
|
||||
* @param $oid
|
||||
*/
|
||||
public static function storeProductOrderCreate($order,$group)
|
||||
{
|
||||
UserAddress::be(['is_default'=>1,'uid'=>$order['uid']]) || UserAddress::setDefaultAddress($group['addressId'],$order['uid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货状态 为送货
|
||||
* @param $data
|
||||
* $data array 送货方式 送货人姓名 送货人电话
|
||||
* @param $oid
|
||||
* $oid string store_order表中的id
|
||||
*/
|
||||
public static function storeProductOrderDeliveryAfter($data,$oid){
|
||||
StoreOrder::orderPostageAfter($data,$oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发货状态 为发货
|
||||
* @param $data
|
||||
* $data array 发货方式 送货人姓名 送货人电话
|
||||
* @param $oid
|
||||
* $oid string store_order表中的id
|
||||
*/
|
||||
public static function storeProductOrderDeliveryGoodsAfter($data,$oid){
|
||||
StoreOrder::orderPostageAfter($data,$oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改状态 为已收货
|
||||
* @param $data
|
||||
* $data array status 状态为 已收货
|
||||
* @param $oid
|
||||
* $oid string store_order表中的id
|
||||
*/
|
||||
public static function storeProductOrderTakeDeliveryAfter($order,$oid)
|
||||
{
|
||||
$res1 = StoreOrder::gainUserIntegral($order);
|
||||
$res2 = User::backOrderBrokerage($order);
|
||||
StoreOrder::orderTakeAfter($order);
|
||||
if(!($res1 && $res2)) exception('收货失败!');
|
||||
}
|
||||
|
||||
/**
|
||||
* 线下付款
|
||||
* @param $id
|
||||
* $id 订单id
|
||||
*/
|
||||
public static function storeProductOrderOffline($id){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改状态为 已退款
|
||||
* @param $data
|
||||
* $data array type 1 直接退款 2 退款后返回原状态 refund_price 退款金额
|
||||
* @param $oid
|
||||
* $oid string store_order表中的id
|
||||
*/
|
||||
public static function storeProductOrderRefundYAfter($data,$oid){
|
||||
StoreOrderAdminModel::refundTemplate($data,$oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改状态为 不退款
|
||||
* @param $data
|
||||
* $data string 退款原因
|
||||
* @param $oid
|
||||
* $oid string store_order表中的id
|
||||
*/
|
||||
public static function storeProductOrderRefundNAfter($data,$oid){
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改订单状态
|
||||
* @param $data
|
||||
* data total_price 商品总价 pay_price 实际支付
|
||||
* @param $oid
|
||||
* oid 订单id
|
||||
*/
|
||||
public static function storeProductOrderEditAfter($data,$oid){
|
||||
|
||||
}
|
||||
/**
|
||||
* 修改送货信息
|
||||
* @param $data
|
||||
* $data array 送货人姓名/快递公司 送货人电话/快递单号
|
||||
* @param $oid
|
||||
* $oid string store_order表中的id
|
||||
*/
|
||||
public static function storeProductOrderDistributionAfter($data,$oid){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户申请退款
|
||||
* @param $oid
|
||||
* @param $uid
|
||||
*/
|
||||
public static function storeProductOrderApplyRefundAfter($oid, $uid)
|
||||
{
|
||||
$order = StoreOrder::where('id',$oid)->find();
|
||||
WechatTemplateService::sendAdminNoticeTemplate([
|
||||
'first'=>"亲,您有一个订单申请退款 \n订单号:{$order['order_id']}",
|
||||
'keyword1'=>'申请退款',
|
||||
'keyword2'=>'待处理',
|
||||
'keyword3'=>date('Y/m/d H:i',time()),
|
||||
'remark'=>'请及时处理'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 评价产品
|
||||
* @param $replyInfo
|
||||
* @param $cartInfo
|
||||
*/
|
||||
public static function storeProductOrderReply($replyInfo, $cartInfo)
|
||||
{
|
||||
StoreOrder::checkOrderOver($cartInfo['oid']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单全部产品评价完
|
||||
* @param $oid
|
||||
*/
|
||||
public static function storeProductOrderOver($oid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 退积分
|
||||
* @param $product
|
||||
* $product 商品信息
|
||||
* @param $back_integral
|
||||
* $back_integral 退多少积分
|
||||
*/
|
||||
public static function storeOrderIntegralBack($product,$back_integral){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入购物车成功之后
|
||||
* @param array $cartInfo 购物车信息
|
||||
* @param array $userInfo 用户信息
|
||||
*/
|
||||
public static function storeProductSetCartAfterAfter($cartInfo, $userInfo)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,10 @@ use think\Request;
|
||||
|
||||
trait CurdControllerTrait
|
||||
{
|
||||
/**保存数据库
|
||||
* @param $id
|
||||
* @param $field
|
||||
*/
|
||||
public function change_field($id,$field)
|
||||
{
|
||||
if(!isset($this->bindModel)) return exception('方法不存在!');
|
||||
|
||||
@ -48,6 +48,7 @@
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
vm.$Message.success(res.msg);
|
||||
$f.submitStatus({loading: false});
|
||||
formCreate.formSuccess && formCreate.formSuccess(res, $f, formData);
|
||||
callback && callback(0, res, $f, formData);
|
||||
//TODO 表单提交成功!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user