This commit is contained in:
parent
e18c6ddf6d
commit
c55a915a14
|
|
@ -5,7 +5,6 @@
|
|||
* Copy right 2019-2029 成都云之牛科技有限公司, 保留所有权利。
|
||||
* ----------------------------------------------
|
||||
* 官方网址: https://www.cdcloudshop.com
|
||||
|
||||
* =========================================================
|
||||
*/
|
||||
return [
|
||||
|
|
@ -48,75 +47,75 @@ return [
|
|||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'SERVICE_YUYUE',
|
||||
'title' => '预约',
|
||||
'url' => 'store://shop/reserve/index',
|
||||
'parent' => 'ORDER_ROOT',
|
||||
'is_show' => 1,
|
||||
'is_control' => 0,
|
||||
'is_icon' => 0,
|
||||
'picture' => 'iconyuyueguanli',
|
||||
'picture_select' => '',
|
||||
'sort' => 3,
|
||||
'child_list' => [
|
||||
[
|
||||
'name' => 'YUYUE_MAMAGE',
|
||||
'title' => '预约管理',
|
||||
'url' => 'store://shop/reserve/index',
|
||||
'is_show' => 1,
|
||||
'is_control' => 1,
|
||||
'is_icon' => 0,
|
||||
'picture' => 'iconyuyueguanli',
|
||||
'picture_select' => '',
|
||||
'sort' => 1,
|
||||
'child_list' => [
|
||||
[
|
||||
'name' => 'YUYUE_INDEX',
|
||||
'title' => '预约看板',
|
||||
'url' => 'store://shop/reserve/index',
|
||||
'is_show' => 1,
|
||||
'sort' => 1,
|
||||
],
|
||||
[
|
||||
'name' => 'YUYUE_LISTS',
|
||||
'title' => '预约管理',
|
||||
'url' => 'store://shop/reserve/lists',
|
||||
'is_show' => 1,
|
||||
'sort' => 2,
|
||||
'child_list' => [
|
||||
[
|
||||
'name' => 'YUYUE_DETAIL',
|
||||
'title' => '预约详情',
|
||||
'url' => 'store://shop/reserve/detail',
|
||||
'is_show' => 0
|
||||
],
|
||||
[
|
||||
'name' => 'YUYUE_CONFIRM',
|
||||
'title' => '确认预约',
|
||||
'url' => 'store://shop/reserve/confirm',
|
||||
'is_show' => 0
|
||||
],
|
||||
[
|
||||
'name' => 'YUYUE_CANCEL',
|
||||
'title' => '取消预约',
|
||||
'url' => 'store://shop/reserve/cancel',
|
||||
'is_show' => 0
|
||||
],
|
||||
[
|
||||
'name' => 'YUYUE_TO_STORE',
|
||||
'title' => '确认到店',
|
||||
'url' => 'store://shop/reserve/confirmtostore',
|
||||
'is_show' => 0
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
],
|
||||
|
||||
]
|
||||
],
|
||||
// [
|
||||
// 'name' => 'SERVICE_YUYUE',
|
||||
// 'title' => '预约',
|
||||
// 'url' => 'store://shop/reserve/index',
|
||||
// 'parent' => 'ORDER_ROOT',
|
||||
// 'is_show' => 1,
|
||||
// 'is_control' => 0,
|
||||
// 'is_icon' => 0,
|
||||
// 'picture' => 'iconyuyueguanli',
|
||||
// 'picture_select' => '',
|
||||
// 'sort' => 3,
|
||||
// 'child_list' => [
|
||||
// [
|
||||
// 'name' => 'YUYUE_MAMAGE',
|
||||
// 'title' => '预约管理',
|
||||
// 'url' => 'store://shop/reserve/index',
|
||||
// 'is_show' => 1,
|
||||
// 'is_control' => 1,
|
||||
// 'is_icon' => 0,
|
||||
// 'picture' => 'iconyuyueguanli',
|
||||
// 'picture_select' => '',
|
||||
// 'sort' => 1,
|
||||
// 'child_list' => [
|
||||
// [
|
||||
// 'name' => 'YUYUE_INDEX',
|
||||
// 'title' => '预约看板',
|
||||
// 'url' => 'store://shop/reserve/index',
|
||||
// 'is_show' => 1,
|
||||
// 'sort' => 1,
|
||||
// ],
|
||||
// [
|
||||
// 'name' => 'YUYUE_LISTS',
|
||||
// 'title' => '预约管理',
|
||||
// 'url' => 'store://shop/reserve/lists',
|
||||
// 'is_show' => 1,
|
||||
// 'sort' => 2,
|
||||
// 'child_list' => [
|
||||
// [
|
||||
// 'name' => 'YUYUE_DETAIL',
|
||||
// 'title' => '预约详情',
|
||||
// 'url' => 'store://shop/reserve/detail',
|
||||
// 'is_show' => 0
|
||||
// ],
|
||||
// [
|
||||
// 'name' => 'YUYUE_CONFIRM',
|
||||
// 'title' => '确认预约',
|
||||
// 'url' => 'store://shop/reserve/confirm',
|
||||
// 'is_show' => 0
|
||||
// ],
|
||||
// [
|
||||
// 'name' => 'YUYUE_CANCEL',
|
||||
// 'title' => '取消预约',
|
||||
// 'url' => 'store://shop/reserve/cancel',
|
||||
// 'is_show' => 0
|
||||
// ],
|
||||
// [
|
||||
// 'name' => 'YUYUE_TO_STORE',
|
||||
// 'title' => '确认到店',
|
||||
// 'url' => 'store://shop/reserve/confirmtostore',
|
||||
// 'is_show' => 0
|
||||
// ]
|
||||
// ]
|
||||
// ]
|
||||
//
|
||||
// ]
|
||||
// ],
|
||||
//
|
||||
// ]
|
||||
// ],
|
||||
[
|
||||
'name' => 'STORE_LIST',
|
||||
'title' => '门店管理',
|
||||
|
|
|
|||
|
|
@ -7,18 +7,14 @@
|
|||
* 官方网址: https://www.cdcloudshop.com
|
||||
* =========================================================
|
||||
*/
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\model\member\Withdraw as WithdrawModel;
|
||||
use app\model\member\Member as MemberModel;
|
||||
|
||||
/**
|
||||
* 会员提现
|
||||
*/
|
||||
class Memberwithdraw extends BaseApi
|
||||
{
|
||||
|
||||
/**
|
||||
* 会员提现信息
|
||||
*/
|
||||
|
|
@ -26,20 +22,22 @@ class Memberwithdraw extends BaseApi
|
|||
{
|
||||
$token = $this->checkToken();
|
||||
if ($token[ 'code' ] < 0) return $this->response($token);
|
||||
|
||||
$member_model = new MemberModel();
|
||||
$member_info_result = $member_model->getMemberInfo([ [ 'member_id', '=', $token[ 'data' ][ 'member_id' ] ] ], 'site_id,balance_money,balance_withdraw_apply,balance_withdraw');
|
||||
$member_info_result = $member_model->getMemberInfo([ [ 'member_id', '=', $token[ 'data' ][ 'member_id' ] ] ], 'site_id,balance,balance_money,balance_withdraw_apply,balance_withdraw,pay_password');
|
||||
$member_info_result['data']['is_pay_password'] = 1;
|
||||
if($member_info_result['data']['pay_password'] == ''){
|
||||
$member_info_result['data']['is_pay_password'] = 0;
|
||||
}
|
||||
unset($member_info_result['data']['pay_password']);
|
||||
$config_model = new WithdrawModel();
|
||||
$config_result = $config_model->getConfig($member_info_result[ 'data' ][ 'site_id' ], 'shop');
|
||||
$config = $config_result[ "data" ][ 'value' ];
|
||||
$config[ 'is_use' ] = $config_result[ "data" ][ 'is_use' ];
|
||||
|
||||
$data = array (
|
||||
"member_info" => $member_info_result[ "data" ],
|
||||
"config" => $config
|
||||
);
|
||||
return $this->response($this->success($data));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -144,4 +142,44 @@ class Memberwithdraw extends BaseApi
|
|||
return $this->response($list);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 会员互转
|
||||
* @return false|string
|
||||
*/
|
||||
public function balanceTransfer(){
|
||||
$token = $this->checkToken();
|
||||
if ($token['code'] < 0) return $this->response($token);
|
||||
$to_username = input('username');
|
||||
$apply_money = abs(input('apply_money'));
|
||||
$password = input('password','');
|
||||
if($password == ''){
|
||||
return $this->response($this->error('未填写支付密码'));
|
||||
}
|
||||
$to_where=[
|
||||
['site_id' , '=',$this->site_id],
|
||||
['username|mobile','=',$to_username],
|
||||
];
|
||||
if($to_username){
|
||||
$member_model = new MemberModel();
|
||||
// 获取接收者信息
|
||||
$to_member_info = $member_model->getMemberInfo($to_where, 'member_id,site_id,balance,balance_withdraw_apply,balance_withdraw,nickname,status,pay_password');
|
||||
if(empty($to_member_info['data'])||$to_member_info['data']['status']!=1) return $this->response($this->error('会员账号不存在'));
|
||||
if($this->member_id==$to_member_info['data']['member_id']) return $this->response($this->error('不能转账给自己'));
|
||||
// 获取转让人信息
|
||||
$member_info_result = $member_model->getMemberInfo([['member_id', '=', $token['data']['member_id']]], 'balance,username,nickname,status,pay_password');
|
||||
if($member_info_result['data']['pay_password'] == ''){
|
||||
return $this->response(error(-801,'您未设置支付密码,需设置支付密码后进行转账,点击确定前往支付密码设置'));
|
||||
}
|
||||
if(data_md5($password) != $member_info_result['data']['pay_password']) return $this->response($this->error('支付密码错误'));
|
||||
if($apply_money>$member_info_result['data']['balance']) return $this->response($this->error('账号余额不足'));
|
||||
if($member_info_result['data']['status']!=1) return $this->response($this->error('未知错误'));
|
||||
|
||||
$withdraw_model = new WithdrawModel();
|
||||
$result = $withdraw_model->MemberBalanceTransfer($member_info_result,$apply_money,$this->member_id,$to_member_info['data']['member_id'],$this->site_id,$to_member_info);
|
||||
return $this->response($result);
|
||||
}else{
|
||||
return $this->response($this->error('转入账号不能为空'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -55,68 +55,91 @@ class Withdraw extends BaseModel
|
|||
'transfer_type' => '',
|
||||
'is_auto_transfer' => 0,
|
||||
'min' => 0,
|
||||
'max' =>0,
|
||||
'max' => 0,
|
||||
'money_num' => 0,
|
||||
'time_week' => 0,
|
||||
];
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
/**************************************************************************** 会员提现设置 *************************************************************/
|
||||
/**************************************************************************** 会员提现设置 *************************************************************/
|
||||
/**
|
||||
* 申请提现
|
||||
* @param $data
|
||||
*/
|
||||
public function apply($data, $site_id = 0, $app_module = 'shop')
|
||||
{
|
||||
|
||||
$config_result = $this->getConfig($site_id, $app_module);
|
||||
$config = $config_result["data"]['value'];
|
||||
$config = $config_result["data"]['value'];
|
||||
if ($config_result["data"]["is_use"] == 0)
|
||||
return $this->error([], "提现未开启");
|
||||
|
||||
if ($config['time_week']) {
|
||||
$time_week = explode(',', $config['time_week']);
|
||||
if (!in_array(date('w'), $time_week)) {
|
||||
return $this->error([], "不在提现日,请在提现日申请");
|
||||
}
|
||||
}
|
||||
if ($config['money_num']) {
|
||||
$time = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
|
||||
$where = [
|
||||
['member_id', '=', $data["member_id"]],
|
||||
['status', 'in', [1, 2]],
|
||||
['apply_time', '>=', $time],
|
||||
];
|
||||
$conunt = model("member_withdraw")->getCount($where, 'id');
|
||||
if ($conunt >= $config['money_num']) {
|
||||
return $this->error([], '超出每日提现次数');
|
||||
}
|
||||
}
|
||||
$withdraw_no = $this->createWithdrawNo();
|
||||
$apply_money = round($data["apply_money"], 2);
|
||||
if ($apply_money < $config["min"])
|
||||
return $this->error([], "申请提现金额不能小于最低提现额度" . $config["min"]);
|
||||
if($apply_money > $config['max']) return $this->error([], "申请提现金额不能大于最高提现额度" . $config["max"]);
|
||||
$member_id = $data["member_id"];
|
||||
$member_model = new Member();
|
||||
return $this->error([], "最小提现金额为¥" . $config["min"]);
|
||||
if ($apply_money > $config['max']) return $this->error([], "最大提现金额为¥" . $config["max"]);
|
||||
if ($config["money_multiple"] && $apply_money % $config["money_multiple"]) {
|
||||
return $this->error([], "提现金额为{$config["money_multiple"]}倍数");
|
||||
}
|
||||
$member_id = $data["member_id"];
|
||||
$identity = $data["identity"];
|
||||
$member_model = new Member();
|
||||
$member_info_result = $member_model->getMemberInfo([["member_id", "=", $member_id]], "balance_money,headimg,wx_openid,username,mobile,weapp_openid,nickname");
|
||||
$member_info = $member_info_result["data"];
|
||||
$member_info = $member_info_result["data"];
|
||||
if (empty($member_info))
|
||||
return $this->error([], "MEMBER_NOT_EXIST");
|
||||
|
||||
$balance_money = $member_info["balance_money"];
|
||||
if ($apply_money > $balance_money)
|
||||
return $this->error([], "申请提现金额不能大于会员可提现金额");
|
||||
|
||||
$transfer_type = $data["transfer_type"];
|
||||
$transfer_type = $data["transfer_type"];
|
||||
$transfer_type_list = $this->getTransferType($site_id, $app_module);
|
||||
$transfer_type_name = $transfer_type_list[$transfer_type] ?? '';
|
||||
$transfer_type_name = $transfer_type_list[$transfer_type];
|
||||
if (empty($transfer_type_name))
|
||||
return $this->error([], "不支持的提现方式");
|
||||
|
||||
model('member_withdraw')->startTrans();
|
||||
try {
|
||||
$rate = $config["rate"];
|
||||
$bank_name = "";
|
||||
$rate = $config["rate"];
|
||||
$bank_name = "";
|
||||
$account_number = "";
|
||||
$applet_type = 0;
|
||||
switch ($transfer_type) {
|
||||
case "bank":
|
||||
$bank_name = $data["bank_name"];
|
||||
$bank_name = $data["bank_name"];
|
||||
$account_number = $data["account_number"];
|
||||
|
||||
if (empty($identity)) {
|
||||
return $this->error('', '请绑定身份证号码');
|
||||
}
|
||||
break;
|
||||
case "alipay":
|
||||
$bank_name = '';
|
||||
$bank_name = '';
|
||||
$account_number = $data["account_number"];
|
||||
break;
|
||||
case "wechatpay":
|
||||
$bank_name = '';
|
||||
if(empty($member_info["wx_openid"]) && empty($member_info["weapp_openid"])){
|
||||
return $this->error('','请绑定微信或更换提现账户');
|
||||
if (empty($member_info["wx_openid"]) && empty($member_info["weapp_openid"])) {
|
||||
return $this->error('', '请绑定微信或更换提现账户');
|
||||
}
|
||||
if(!empty($member_info["wx_openid"])){
|
||||
if (!empty($member_info["wx_openid"])) {
|
||||
$account_number = $member_info["wx_openid"];
|
||||
$applet_type = 0; // 公众号
|
||||
} else {
|
||||
|
|
@ -126,54 +149,72 @@ class Withdraw extends BaseModel
|
|||
break;
|
||||
|
||||
}
|
||||
|
||||
$service_money = round($apply_money * $rate / 100, 2);//手续费
|
||||
$money = $apply_money - $service_money;
|
||||
$data = array(
|
||||
"site_id" => $site_id,
|
||||
"withdraw_no" => $withdraw_no,
|
||||
"member_name" => $member_info["username"] == '' ? $member_info["mobile"] : $member_info["username"],
|
||||
"member_id" => $data["member_id"],
|
||||
"transfer_type" => $data["transfer_type"],
|
||||
$money = $apply_money - $service_money;
|
||||
$data = array(
|
||||
"site_id" => $site_id,
|
||||
"withdraw_no" => $withdraw_no,
|
||||
"member_name" => $member_info["username"] == '' ? $member_info["mobile"] : $member_info["username"],
|
||||
"member_id" => $data["member_id"],
|
||||
"transfer_type" => $data["transfer_type"],
|
||||
"transfer_type_name" => $transfer_type_name,
|
||||
"apply_money" => $apply_money,
|
||||
"service_money" => $service_money,
|
||||
"rate" => $rate,
|
||||
"money" => $money,
|
||||
"apply_time" => time(),
|
||||
"status" => 0,
|
||||
"status_name" => "待审核",
|
||||
"member_headimg" => $member_info["headimg"],
|
||||
"realname" => $data["realname"],
|
||||
"bank_name" => $bank_name,
|
||||
"account_number" => $account_number,
|
||||
"mobile" => $data["mobile"],
|
||||
"applet_type" => $applet_type
|
||||
"apply_money" => $apply_money,
|
||||
"service_money" => $service_money,
|
||||
"rate" => $rate,
|
||||
"money" => $money,
|
||||
"apply_time" => time(),
|
||||
"status" => 0,
|
||||
"status_name" => "待审核",
|
||||
"member_headimg" => $member_info["headimg"],
|
||||
"realname" => $data["realname"],
|
||||
"bank_name" => $bank_name,
|
||||
"account_number" => $account_number,
|
||||
"identity" => $identity,
|
||||
"mobile" => $data["mobile"],
|
||||
"applet_type" => $applet_type
|
||||
);
|
||||
|
||||
//减少现金余额
|
||||
$member_account = new MemberAccount();
|
||||
$account_res = $member_account->addMemberAccount($site_id, $member_id, 'balance_money', -$apply_money, 'withdraw', '会员提现', '会员提现扣除');
|
||||
if ($account_res['code'] != 0) return $account_res;
|
||||
|
||||
//增加提现中余额
|
||||
model("member")->setInc([["member_id", "=", $member_id]], "balance_withdraw_apply", $apply_money);
|
||||
|
||||
$result = model("member_withdraw")->add($data);
|
||||
|
||||
$result = model("member_withdraw")->add($data);
|
||||
//是否启用自动通过审核(必须是微信)
|
||||
if ($config["is_auto_audit"] == 0) {
|
||||
$this->agree([["id", "=", $result],['site_id', '=',$site_id ]]);
|
||||
$this->agree([["id", "=", $result], ['site_id', '=', $site_id]]);
|
||||
}
|
||||
|
||||
model('member_withdraw')->commit();
|
||||
|
||||
//申请提现发送消息
|
||||
$data['keywords'] = 'USER_WITHDRAWAL_APPLY';
|
||||
$data['member_name'] = $member_info['nickname'];
|
||||
$message_model = new Message();
|
||||
$message_model->sendMessage($data);
|
||||
return $this->success();
|
||||
} catch (\Exception $e) {
|
||||
model('member_withdraw')->rollback();
|
||||
return $this->error('', $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* 会员余额互转
|
||||
* @param $memberInfo
|
||||
* @param $apply_money
|
||||
* @param $member_id
|
||||
* @param $to_member_id
|
||||
* @param $site_id
|
||||
* @return array
|
||||
*/
|
||||
public function MemberBalanceTransfer($memberInfo, $apply_money, $member_id, $to_member_id, $site_id, $to_member_info)
|
||||
{
|
||||
try {
|
||||
//减少可提现余额
|
||||
$member_account = new MemberAccount();
|
||||
$member_account->addMemberAccount($site_id, $member_id, 'balance', -$apply_money, 'transfer', "{$to_member_id}_会员转账", "给会员{$to_member_info['data']['nickname']}转账" . (-$apply_money));
|
||||
//增加转账余额
|
||||
$account_res = $member_account->addMemberAccount($site_id, $to_member_id, 'balance', $apply_money, 'transfer', "{$member_id}_会员转账", $memberInfo['data']['nickname'] . '转账' . (+$apply_money));
|
||||
if ($account_res['code'] != 0) return $account_res;
|
||||
return $this->success();
|
||||
} catch (\Exception $e) {
|
||||
model('member_withdraw')->rollback();
|
||||
|
|
|
|||
|
|
@ -27,23 +27,30 @@ class Memberwithdraw extends BaseShop
|
|||
{
|
||||
$config_model = new MemberWithdrawModel();
|
||||
if (request()->isAjax()) {
|
||||
|
||||
if (empty(input("transfer_type"))) {
|
||||
$transfer_type = "";
|
||||
} else {
|
||||
$transfer_type = implode(",", input("transfer_type"));
|
||||
}
|
||||
$time_week = input('time_week', '');
|
||||
if (!empty($time_week)) {
|
||||
$time_week = implode(',', $time_week);
|
||||
}
|
||||
//订单提现
|
||||
$data = [
|
||||
'is_auto_audit' => input('is_auto_audit', 0),//是否需要审核 1 手动审核 2 自动审核
|
||||
'rate' => input('rate', 0),//提现手续费比率 (0-100)
|
||||
'transfer_type' => $transfer_type,//转账方式,
|
||||
'is_auto_transfer' => input('is_auto_transfer', 0),//是否自动转账 1 手动转账 2 自动转账
|
||||
'is_user_transfer' => input('is_user_transfer', 0),//是否会员互转
|
||||
'min' => input('min', 0),//提现最低额度
|
||||
'max' => input('max', 0),//提现最高额度
|
||||
'money_multiple' => input('money_multiple', 0),//提现最高额度
|
||||
'money_num' => input('money_num', 0),//提现次数限制
|
||||
'time_week' => $time_week,//提现最高额度
|
||||
];
|
||||
$this->addLog("设置会员提现配置");
|
||||
$is_use = input("is_use", 0);//是否启用
|
||||
$is_use = input("is_use", 0);//否启用
|
||||
$res = $config_model->setConfig($data, $is_use, $this->site_id, $this->app_module);
|
||||
return $res;
|
||||
} else {
|
||||
|
|
@ -51,6 +58,14 @@ class Memberwithdraw extends BaseShop
|
|||
$this->assign("is_exist", addon_is_exit("memberwithdraw", $this->site_id));
|
||||
//会员提现
|
||||
$config_result = $config_model->getConfig($this->site_id, $this->app_module);
|
||||
if(!isset($config_result[ 'data' ]['value']['is_user_transfer'])){
|
||||
$config_result[ 'data' ]['value']['is_user_transfer']=0;
|
||||
}
|
||||
if (!empty($config_result[ 'data' ]['value']['time_week'])) {
|
||||
$timeweek=$config_result[ 'data' ]['value']['time_week'];
|
||||
$config_result[ 'data' ]['value']['time_week'] = explode(',',$timeweek);
|
||||
}
|
||||
$this->assign('time_week',$config_result[ 'data' ]['value']['time_week']??[]);
|
||||
$this->assign('config', $config_result[ 'data' ]);
|
||||
$pay_model = new Pay();
|
||||
$transfer_type_list = $pay_model->getTransferType($this->site_id);
|
||||
|
|
@ -58,7 +73,6 @@ class Memberwithdraw extends BaseShop
|
|||
return $this->fetch('memberwithdraw/config');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员提现列表
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -4,45 +4,7 @@
|
|||
{/block}
|
||||
|
||||
{block name="main"}
|
||||
{if isset($sms_num) && $sms_num < 500}
|
||||
<div class="top-tips">
|
||||
<i class="iconfont icongantanhao"></i>
|
||||
<div>店铺剩余短信条数 <span>{$sms_num}</span> 条,如需正常发送短信,请订购短信套餐<a href="{:addon_url('niusms://shop/sms/index?buy=1')}">立即订购</a></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $is_new_version == 1}
|
||||
<div class="top-tips">
|
||||
<i class="iconfont icongantanhao"></i>
|
||||
<div>小程序已更新,为了不影响您的使用请尽快下载小程序上传<a href="{:addon_url('shop/config/sitedeploy')}" target="_blank" style="margin-left: 0;">更新</a></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="top-tips check-cron layui-hide">
|
||||
<i class="iconfont icongantanhao"></i>
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
{if $is_new_domain == 1}
|
||||
<div class="top-tips">
|
||||
<i class="iconfont icongantanhao"></i>
|
||||
<div>检测到店铺域名发生变化,为了不影响您的使用,请尽快 <a href="{:addon_url('shop/config/sitedeploy')}" target="_blank" style="margin-left: 0;">部署网站</a>(手机端、电脑端、手机商家管理端、微信小程序等上传更新)独立部署除外</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shop_status.shop_pc_status == 0 || $shop_status.shop_h5_status == 0 || $shop_status.shop_weapp_status == 0}
|
||||
<div class="top-tips">
|
||||
<i class="iconfont icongantanhao"></i>
|
||||
<div>该商城{if $shop_status.shop_pc_status == 0}pc端、{/if}{if $shop_status.shop_h5_status == 0}h5端、{/if}{if $shop_status.shop_weapp_status == 0}小程序端{/if}为关闭状态,用户无法访问。 <a href="{:addon_url('shop/shop/config')}" target="_blank" style="margin-left: 0;">点击跳转开启</a></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $img_extension_error}
|
||||
<div class="top-tips">
|
||||
<i class="iconfont icongantanhao"></i>
|
||||
<div>检测到当前配置的图片处理引擎为imagemagick,但未检测到该扩展,为了不影响您的使用,请安装该扩展或切换为使用GD库</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !$guide_close}
|
||||
<div class="common-wrap guide">
|
||||
|
|
|
|||
|
|
@ -17,6 +17,14 @@
|
|||
<input type="checkbox" name="is_auto_audit" lay-filter="is_auto_audit" value="1" lay-skin="switch" {if !empty($config.value) && $config.value.is_auto_audit==1 } checked {/if} >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">会员互转:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="checkbox" name="is_user_transfer" lay-filter="is_user_transfer" value="1" lay-skin="switch" {if !empty($config.value) && $config.value.is_user_transfer==1 } checked {/if} >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $is_exist}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">自动转账:</label>
|
||||
|
|
@ -29,9 +37,9 @@
|
|||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">提现手续费比率:</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="rate" value="{if condition="!empty($config.value)"}{$config.value.rate}{else/}0{/if}" lay-verify="positivEinteger" autocomplete="off" class="layui-input len-short">
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="rate" value="{if condition="!empty($config.value)"}{$config.value.rate}{else/}0{/if}" lay-verify="positivEinteger" autocomplete="off" class="layui-input len-short">
|
||||
</div>
|
||||
<span class="layui-form-mid">%</span>
|
||||
</div>
|
||||
<div class="word-aux">比率必须为0-100的整数</div>
|
||||
|
|
@ -55,14 +63,48 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">提现最低倍数:</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="money_multiple" value="{if condition="!empty($config.value)"}{$config.value.money_multiple ?: 0}{else/}0{/if}" lay-verify="growthInteger" autocomplete="off" class="layui-input ns-len-short">
|
||||
</div>
|
||||
</div>
|
||||
<div class="word-aux">提现倍数,用户最低提现为提现金额的倍数</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">提现次数:</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="money_num" value="{if condition="!empty($config.value)"}{$config.value.money_num ?: 0}{else/}0{/if}" lay-verify="growthInteger" autocomplete="off" class="layui-input ns-len-short">
|
||||
</div>
|
||||
</div>
|
||||
<div class="word-aux">当日提现次数限制,0无限制</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">提现日:</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-input-inline">
|
||||
<input type="checkbox" value="1" class='time-week' name="time_week[]" title="周一" lay-skin="primary"{if !empty($time_week) && in_array(1,$time_week)} checked {/if}>
|
||||
<input type="checkbox" value="2" class='time-week' name="time_week[]" title="周二" lay-skin="primary"{if !empty($time_week) && in_array(2,$time_week)} checked {/if}>
|
||||
<input type="checkbox" value="3" class='time-week' name="time_week[]" title="周三" lay-skin="primary"{if !empty($time_week) && in_array(3,$time_week)} checked {/if}>
|
||||
<input type="checkbox" value="4" class='time-week' name="time_week[]" title="周四" lay-skin="primary"{if !empty($time_week) && in_array(4,$time_week)} checked {/if}>
|
||||
<input type="checkbox" value="5" class='time-week' name="time_week[]" title="周五" lay-skin="primary"{if !empty($time_week) && in_array(5,$time_week)} checked {/if}>
|
||||
<input type="checkbox" value="6" class='time-week' name="time_week[]" title="周六" lay-skin="primary"{if !empty($time_week) && in_array(6,$time_week)} checked {/if}>
|
||||
<input type="checkbox" value="0" class='time-week' name="time_week[]" title="周日" lay-skin="primary"{if !empty($time_week) && in_array(0,$time_week)} checked {/if}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">转账方式:</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-input-inline">
|
||||
{foreach $transfer_type_list as $k => $v}
|
||||
<input type="checkbox" lay-filter="transfer_type" name="transfer_type[]" title="{$v}" lay-skin="primary" value="{$k}" {if !empty($config['value']) && stripos($config['value']['transfer_type'], $k) !== false}checked{/if}>
|
||||
<input type="checkbox" lay-filter="transfer_type" name="transfer_type[]" title="{$v}" lay-skin="primary" value="{$k}" {if !empty($config['value']) && stripos($config['value']['transfer_type'], $k) !== false}checked{/if}>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -75,13 +117,13 @@
|
|||
<script >
|
||||
layui.use('form', function(){
|
||||
var form = layui.form,
|
||||
repeat_flag = false; //防重复标识
|
||||
repeat_flag = false; //防重复标识
|
||||
form.render();
|
||||
|
||||
form.on('submit(save)', function(data){
|
||||
if (repeat_flag) return;
|
||||
repeat_flag = true;
|
||||
|
||||
|
||||
var transfer_type =$("input[lay-skin=primary]:checked()");
|
||||
if(transfer_type.length <= 0){
|
||||
repeat_flag = false;
|
||||
|
|
@ -94,7 +136,7 @@
|
|||
url: ns.url("shop/memberwithdraw/config"),
|
||||
data: data.field,
|
||||
success: function(res) {
|
||||
repeat_flag = false;
|
||||
repeat_flag = false;
|
||||
if (res.code == 0) {
|
||||
layer.msg(res.message);
|
||||
}else{
|
||||
|
|
@ -103,8 +145,8 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// 验证正整数
|
||||
form.verify({
|
||||
positivEinteger: function(value){
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ return [
|
|||
[
|
||||
'name' => 'SHOP_DIY',
|
||||
'title' => '手机端',
|
||||
'url' => 'shop/diy/management',
|
||||
'url' => 'shop/diy/index',
|
||||
'is_show' => 1,
|
||||
'is_control' => 1,
|
||||
'is_icon' => 0,
|
||||
|
|
@ -40,24 +40,31 @@ return [
|
|||
'sort' => 2,
|
||||
'child_list' => [
|
||||
[
|
||||
'name' => 'SHOP_DIY_MANAGEMENT',
|
||||
'title' => '商城首页',
|
||||
'url' => 'shop/diy/management',
|
||||
'name' => 'SHOP_DIY_INDEX',
|
||||
'title' => '主页装修',
|
||||
'url' => 'shop/diy/index',
|
||||
'is_show' => 1,
|
||||
'is_control' => 1,
|
||||
'is_icon' => 0,
|
||||
'picture' => '',
|
||||
'picture_selected' => '',
|
||||
'sort' => 1,
|
||||
'child_list' => [
|
||||
[
|
||||
'name' => 'SHOP_DIY_INDEX',
|
||||
'title' => '主页装修',
|
||||
'url' => 'shop/diy/index',
|
||||
'is_show' => 0,
|
||||
],
|
||||
],
|
||||
],
|
||||
// [
|
||||
// 'name' => 'SHOP_DIY_MANAGEMENT',
|
||||
// 'title' => '主页装修',
|
||||
// 'url' => 'shop/diy/management',
|
||||
// 'is_show' => 1,
|
||||
// 'is_control' => 1,
|
||||
// 'is_icon' => 0,
|
||||
// 'picture' => '',
|
||||
// 'picture_selected' => '',
|
||||
// 'sort' => 1,
|
||||
// 'child_list' => [
|
||||
// [
|
||||
// 'name' => 'SHOP_DIY_INDEX',
|
||||
// 'title' => '主页装修',
|
||||
// 'url' => 'shop/diy/index',
|
||||
// 'is_show' => 0,
|
||||
// ],
|
||||
// ],
|
||||
// ],
|
||||
[
|
||||
'name' => 'SHOP_DIY_GOODS_CATEGORY',
|
||||
'title' => '分类页面',
|
||||
|
|
@ -91,17 +98,17 @@ return [
|
|||
'picture_selected' => '',
|
||||
'sort' => 4,
|
||||
],
|
||||
[
|
||||
'name' => 'SHOP_DIY_PROMOTION_ZONE_CONFIG',
|
||||
'title' => '活动专区',
|
||||
'url' => 'shop/promotion/zoneconfig',
|
||||
'is_show' => 1,
|
||||
'is_control' => 1,
|
||||
'is_icon' => 0,
|
||||
'picture' => '',
|
||||
'picture_selected' => '',
|
||||
'sort' => 5,
|
||||
],
|
||||
// [
|
||||
// 'name' => 'SHOP_DIY_PROMOTION_ZONE_CONFIG',
|
||||
// 'title' => '活动专区',
|
||||
// 'url' => 'shop/promotion/zoneconfig',
|
||||
// 'is_show' => 1,
|
||||
// 'is_control' => 1,
|
||||
// 'is_icon' => 0,
|
||||
// 'picture' => '',
|
||||
// 'picture_selected' => '',
|
||||
// 'sort' => 5,
|
||||
// ],
|
||||
[
|
||||
'name' => 'SHOP_DIY_LISTS',
|
||||
'title' => '微页面',
|
||||
|
|
|
|||
Loading…
Reference in New Issue