You've already forked qlg.tsgz.moe
							
							修改
This commit is contained in:
		@@ -134,6 +134,12 @@ return array(
 | 
			
		||||
		'value'=>'',
 | 
			
		||||
		'tips'=>''
 | 
			
		||||
	),
 | 
			
		||||
    'PHONE_UNREGISTER'=>array(
 | 
			
		||||
        'title'=>'注销模板ID',
 | 
			
		||||
        'type'=>'text',
 | 
			
		||||
        'value'=>'',
 | 
			
		||||
        'tips'=>''
 | 
			
		||||
    ),
 | 
			
		||||
	// 'PHONE_PUSER_REGISTER_VERFIY'=>array(
 | 
			
		||||
	// 	'title'=>'模板ID【模板参考:您好:您邀约会员注册,验证码:${code},如非本人或家人邀约,无公害请忽略。】',
 | 
			
		||||
	// 	'type'=>'text',
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,7 @@ class Auth extends Base{
 | 
			
		||||
			}
 | 
			
		||||
			$fm = new FM();
 | 
			
		||||
			if($fm->getInfo(['familyIdCard'=>$data['householdIdCard']],'id')){
 | 
			
		||||
				exit(jsonReturn('该身份证已报备,请更换'));	
 | 
			
		||||
				exit(jsonReturn('友情提示:您好:已有同身份证用户注册我商城,请联系您的家人查询“用户名”和相关密码。'));
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		$isUpdate = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -870,18 +870,13 @@ public function forgetPasss(){
 | 
			
		||||
        $userPhone = '15270565305';
 | 
			
		||||
//        $userPhone = $data['userPhone'];
 | 
			
		||||
        $phoneVerify = rand(1000,9999);
 | 
			
		||||
        $tpl = WSTMsgTemplates('PHONE_FOTGET');
 | 
			
		||||
//        $tpl = WSTMsgTemplates('PHONE_UNREGISTER');
 | 
			
		||||
        $tpl = WSTMsgTemplates('PHONE_UNREGISTER');
 | 
			
		||||
        $rv = ['status'=>-1,'msg'=>'短信发送失败'];
 | 
			
		||||
        if( $tpl['tplContent']!='' && $tpl['status']=='1'){
 | 
			
		||||
            $params = ['tpl'=>$tpl,'params'=>['code'=>$phoneVerify]];
 | 
			
		||||
            $m = new LogSms();
 | 
			
		||||
            try{
 | 
			
		||||
            $rv = $m->sendSMS(0,$userPhone,$params,'unregister_get_sms_code',$phoneVerify);
 | 
			
		||||
            } catch (\Exception $e) {
 | 
			
		||||
                $rv['extra'] = $e->getMessage();
 | 
			
		||||
                exit(json_encode($rv));
 | 
			
		||||
            }
 | 
			
		||||
            $rv['sms_code'] = $phoneVerify;
 | 
			
		||||
        }
 | 
			
		||||
        session('unreg.time', time());
 | 
			
		||||
        session('unreg.code', $phoneVerify);
 | 
			
		||||
 
 | 
			
		||||
@@ -103,15 +103,8 @@ class Carts extends CCarts{
 | 
			
		||||
			$tm = Model('common/Table');
 | 
			
		||||
			$tm->setTable('shops');						
 | 
			
		||||
			//换算为3级循环等级
 | 
			
		||||
			if(0 == $rs['shopLevel']){
 | 
			
		||||
            //助微吧限销售额为≥?元 9900 。 提示:具体功能没实现,合并原“初始”、“一级”、“二级”、“三级”4项 @ 2020/09/19
 | 
			
		||||
            $maxSaleMoney = dataConf('helpLevel0MaxSaleMoney');
 | 
			
		||||
			}else{
 | 
			
		||||
				//$nowLevel = $rs['shopLevel'] % 3;				
 | 
			
		||||
				$tm->setTable('users');
 | 
			
		||||
				//最大可销售金额
 | 
			
		||||
				$maxSaleMoney = $tm->getField(['userId'=>$rs['shopUserId']],'helpMaxSaleMoney');						
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
			$tm->setTable('shops');
 | 
			
		||||
			//当前销售值
 | 
			
		||||
			$nowSaleMoney =  $tm->getSum(['userId'=>$rs['shopUserId']],'helpSaleMoney');
 | 
			
		||||
 
 | 
			
		||||
@@ -376,7 +376,7 @@ function WSTCheckLoginKey($val,$userId = 0){
 | 
			
		||||
    	$dbo->where("userId", "<>", $userId);
 | 
			
		||||
    }
 | 
			
		||||
    if($dbo->find()){
 | 
			
		||||
    	return WSTReturn("对不起,登录账号已存在");
 | 
			
		||||
    	return WSTReturn("友情提示:您好:该用户名已注册");
 | 
			
		||||
    }
 | 
			
		||||
    return WSTReturn("该登录账号可用",1);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1478,7 +1478,8 @@ class Orders extends Base{
 | 
			
		||||
							//换算为3级循环等级
 | 
			
		||||
							$nowLevel = $shopLevel % 3;	
 | 
			
		||||
							//升级到下一级所需金额
 | 
			
		||||
							$upgradeMoney = dataConf('helpUpgradeLevel'.($nowLevel+1).'BuyMoney');
 | 
			
		||||
                            // 助微吧再次销售限购物额为≥?元 @2020/09/19
 | 
			
		||||
							$upgradeMoney = dataConf('helpUpgradeLevel1BuyMoney');
 | 
			
		||||
							//获取助微吧购物金额
 | 
			
		||||
							$buyHelpMoney = $userInfo['buyHelpMoney'] + $order['realTotalMoney'];
 | 
			
		||||
							//查看是否够升级条件
 | 
			
		||||
 
 | 
			
		||||
@@ -38,12 +38,15 @@ class Settlements extends Base
 | 
			
		||||
            // 5,获得预获产品券为被扣手续费的100% buyerPreProductInProductHandlingFeeScale
 | 
			
		||||
            // 6,获得预获产品券为被扣税费的100% buyerPreProductInProductTaxFeeScale
 | 
			
		||||
 | 
			
		||||
            $buyerPreProductNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),2);//1
 | 
			
		||||
            // 购户获得预获产品券最高占产品额比例?%
 | 
			
		||||
            $buyerPreProductNum = round(($totalMoney + $order->deliverMoney),2);//1
 | 
			
		||||
            $buyerMaxCouponsNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),2);//1
 | 
			
		||||
            $buyerPreCoupousNum = round($discountMoney * (dataConf('buyerPreCoupousInSaleScale')*0.01),2);//2
 | 
			
		||||
//            $buyerPreProductNum +=  round($order->productHandlingFee * (dataConf('buyerPreProductInHandlingFeeScale')*0.01),2);//3
 | 
			
		||||
//            $buyerPreProductNum +=  round($order->productTaxFee * (dataConf('buyerPreProductInTaxFeeScale')*0.01),2);//4
 | 
			
		||||
//            $buyerPreProductNum +=  round($order->couponsHandlingFee * (dataConf('buyerPreProductInProductHandlingFeeScale')*0.01),2);//5
 | 
			
		||||
//            $buyerPreProductNum +=  round($order->couponsTaxFee * (dataConf('buyerPreProductInProductTaxFeeScale')*0.01),2);//6
 | 
			
		||||
            $buyerPreCoupousNum = $buyerPreCoupousNum > $buyerMaxCouponsNum ? $buyerMaxCouponsNum : $buyerPreCoupousNum;
 | 
			
		||||
            if($buyerPreProductNum >= 0.01 || $buyerPreCoupousNum>=0.01){
 | 
			
		||||
                if(3 == $order->goodsType){
 | 
			
		||||
                    Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$buyerPreCoupousNum*((float)dataConf('helpSaleCouponsCalBase')/100),'交易订单【'.$order->orderNo.'】购户购物所得');
 | 
			
		||||
 
 | 
			
		||||
@@ -337,7 +337,7 @@ class Users extends Base{
 | 
			
		||||
        $fp = fopen("reg.lock", "r");
 | 
			
		||||
        if(flock($fp,LOCK_EX | LOCK_NB)) {//if(flock($fp,LOCK_EX))阻塞(等待)模式
 | 
			
		||||
             //检测账号是否存在
 | 
			
		||||
            $crs =  ($loginName);
 | 
			
		||||
            $crs =  WSTCheckLoginKey($loginName);
 | 
			
		||||
            if($crs['status']!=1){
 | 
			
		||||
                flock($fp,LOCK_UN);
 | 
			
		||||
                fclose($fp);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user