Bladeren bron

小程序更新修复退款问题,添加分享海报,首页授权页面修改,添加微信收获地址

sugar1569 7 jaren geleden
bovenliggende
commit
4e198e30be
66 gewijzigde bestanden met toevoegingen van 2119 en 2022 verwijderingen
  1. 128 0
      application/routine/common.php
  2. 34 12
      application/routine/controller/AuthApi.php
  3. 10 21
      application/routine/controller/Routine.php
  4. 10 5
      application/routine/model/store/StoreOrder.php
  5. 41 10
      application/routine/model/store/StorePink.php
  6. 3 1
      application/routine/model/user/User.php
  7. 4 3
      application/routine/model/user/UserRecharge.php
  8. 49 164
      application/routine/view/crmebN/app.js
  9. 1 3
      application/routine/view/crmebN/app.json
  10. 3 3
      application/routine/view/crmebN/app.wxss
  11. BIN
      application/routine/view/crmebN/images/long.gif
  12. 54 1
      application/routine/view/crmebN/pages/address/address.js
  13. 5 1
      application/routine/view/crmebN/pages/address/address.wxml
  14. 4 1
      application/routine/view/crmebN/pages/address/address.wxss
  15. 163 160
      application/routine/view/crmebN/pages/cash/cash.js
  16. 236 236
      application/routine/view/crmebN/pages/comment-con/comment-con.js
  17. 4 1
      application/routine/view/crmebN/pages/comment-con/comment-con.wxml
  18. 2 1
      application/routine/view/crmebN/pages/comment/comment.js
  19. 1 0
      application/routine/view/crmebN/pages/coupon-status/coupon-status.js
  20. 0 1
      application/routine/view/crmebN/pages/coupon/coupon.js
  21. 1 1
      application/routine/view/crmebN/pages/enter/enter.js
  22. 1 0
      application/routine/view/crmebN/pages/extension/extension.js
  23. 0 1
      application/routine/view/crmebN/pages/index/index.js
  24. 1 1
      application/routine/view/crmebN/pages/index/index.wxss
  25. 2 0
      application/routine/view/crmebN/pages/integral-con/integral-con.js
  26. 55 63
      application/routine/view/crmebN/pages/load/load.js
  27. 1 1
      application/routine/view/crmebN/pages/load/load.json
  28. 7 3
      application/routine/view/crmebN/pages/load/load.wxml
  29. 6 3
      application/routine/view/crmebN/pages/load/load.wxss
  30. 2 0
      application/routine/view/crmebN/pages/login-status/login-status.js
  31. 5 0
      application/routine/view/crmebN/pages/miao-list/miao-list.js
  32. 1 7
      application/routine/view/crmebN/pages/miao-list/miao-list.wxml
  33. 1 0
      application/routine/view/crmebN/pages/miao-list/miao-list.wxss
  34. 5 0
      application/routine/view/crmebN/pages/mycut/mycut.js
  35. 1 7
      application/routine/view/crmebN/pages/mycut/mycut.wxml
  36. 1 0
      application/routine/view/crmebN/pages/mycut/mycut.wxss
  37. 1 0
      application/routine/view/crmebN/pages/new-con/new-con.js
  38. 1 0
      application/routine/view/crmebN/pages/new-list/new-list.js
  39. 1 0
      application/routine/view/crmebN/pages/news-list/news-list.js
  40. 2 1
      application/routine/view/crmebN/pages/order-confirm/order-confirm.js
  41. 265 263
      application/routine/view/crmebN/pages/orders-con/orders-con.js
  42. 1 3
      application/routine/view/crmebN/pages/orders-con/orders-con.wxml
  43. 4 0
      application/routine/view/crmebN/pages/orders-list/orders-list.js
  44. 1 7
      application/routine/view/crmebN/pages/orders-list/orders-list.wxml
  45. 2 1
      application/routine/view/crmebN/pages/orders-list/orders-list.wxss
  46. 2 0
      application/routine/view/crmebN/pages/payment/payment.js
  47. 60 0
      application/routine/view/crmebN/pages/product-con/index.js
  48. 16 14
      application/routine/view/crmebN/pages/product-con/index.wxml
  49. 10 4
      application/routine/view/crmebN/pages/product-con/index.wxss
  50. 1 0
      application/routine/view/crmebN/pages/product-countdown/index.js
  51. 3 1
      application/routine/view/crmebN/pages/product-countdown/index.wxml
  52. 4 3
      application/routine/view/crmebN/pages/product-countdown/index.wxss
  53. 598 728
      application/routine/view/crmebN/pages/productSort/productSort.js
  54. 2 0
      application/routine/view/crmebN/pages/promotion-card/promotion-card.js
  55. 145 144
      application/routine/view/crmebN/pages/promotion-order/promotion-order.js
  56. 1 0
      application/routine/view/crmebN/pages/refund-order/refund-order.js
  57. 1 0
      application/routine/view/crmebN/pages/refund-page/refund-page.js
  58. 1 0
      application/routine/view/crmebN/pages/refunding/refunding.js
  59. 5 0
      application/routine/view/crmebN/pages/spread/spread.js
  60. 1 7
      application/routine/view/crmebN/pages/spread/spread.wxml
  61. 1 0
      application/routine/view/crmebN/pages/spread/spread.wxss
  62. 130 125
      application/routine/view/crmebN/pages/user/user.js
  63. 5 7
      application/routine/view/crmebN/pages/user/user.wxml
  64. 3 2
      application/routine/view/crmebN/pages/user/user.wxss
  65. 9 0
      application/routine/view/crmebN/utils/wxh.js
  66. 1 1
      application/routine/view/crmebN/wxParse/wxParse.wxss

+ 128 - 0
application/routine/common.php

@@ -51,4 +51,132 @@ function setView($uid,$product_id=0,$cate=0,$type='',$content='',$min=20){
             'content'=>$content
             'content'=>$content
         ]);
         ]);
     }
     }
+}
+
+/**
+ * 创建海报图片
+ * @param array $product
+ * @return bool|string
+ */
+function createPoster($product = array()){
+    header("Content-type: image/jpg");
+    $filePath = 'public/uploads/poster/'.time().'.jpg';
+    $dir = iconv("UTF-8", "GBK", "public/uploads/poster");
+    if(!file_exists($dir)) mkdir($dir,0775,true);
+    $config = array(
+        'text'=>array(
+            array(
+                'text'=>substr(iconv_substr($product['store_name'],0,mb_strlen($product['store_name']),'utf-8'),0,24).'...',
+                'left'=>50,
+                'top'=>500,
+                'fontPath'=>ROOT_PATH.'public/uploads/poster/simsunb.ttf',     //字体文件
+                'fontSize'=>16,             //字号
+                'fontColor'=>'40,40,40',       //字体颜色
+                'angle'=>0,
+            ),
+            array(
+                'text'=>'¥'.$product['price'],
+                'left'=>50,
+                'top'=>580,
+                'fontPath'=>ROOT_PATH.'public/uploads/poster/simsunb.ttf',     //字体文件
+                'fontSize'=>16,             //字号
+                'fontColor'=>'40,40,40',       //字体颜色
+                'angle'=>0,
+            )
+        ),
+        'image'=>array(
+            array(
+                'url'=>$product['image'],
+                'left'=>50,
+                'top'=>70,
+                'right'=>0,
+                'stream'=>0,
+                'bottom'=>0,
+                'width'=>350,
+                'height'=>350,
+                'opacity'=>100,
+            ),
+            array(
+                'url'=>$product['code_path'],
+                'left'=>250,
+                'top'=>480,
+                'right'=>0,
+                'stream'=>0,
+                'bottom'=>0,
+                'width'=>160,
+                'height'=>180,
+                'opacity'=>100,
+            ),
+        ),
+        'background'=>ROOT_PATH.'public/uploads/poster/background.jpg'          //背景图
+    );
+    $imageDefault = array(
+        'left'=>0,
+        'top'=>0,
+        'right'=>0,
+        'bottom'=>0,
+        'width'=>100,
+        'height'=>100,
+        'opacity'=>100
+    );
+    $textDefault = array(
+        'text'=>'2222222222',
+        'left'=>0,
+        'top'=>0,
+        'fontSize'=>32,       //字号
+        'fontColor'=>'255,255,255', //字体颜色
+        'angle'=>0,
+    );
+    $background = $config['background'];//海报最底层得背景
+    //背景方法
+    $backgroundInfo = getimagesize($background);
+    $backgroundFun = 'imagecreatefrom'.image_type_to_extension($backgroundInfo[2], false);
+    $background = $backgroundFun($background);
+    // $backgroundWidth = imagesx($background);  //背景宽度
+    // $backgroundHeight = imagesy($background);  //背景高度
+    $backgroundWidth = 460;  //背景宽度
+    $backgroundHeight = 700;  //背景高度
+    $imageRes = imageCreatetruecolor($backgroundWidth,$backgroundHeight);
+    $color = imagecolorallocate($imageRes, 0, 0, 0);
+    imagefill($imageRes, 0, 0, $color);
+    // imageColorTransparent($imageRes, $color);  //颜色透明
+    imagecopyresampled($imageRes,$background,0,0,0,0,imagesx($background),imagesy($background),imagesx($background),imagesy($background));   //处理了图片
+    if(!empty($config['image'])){
+        foreach ($config['image'] as $key => $val) {
+            $val = array_merge($imageDefault,$val);
+            $info = getimagesize($val['url']);
+            $function = 'imagecreatefrom'.image_type_to_extension($info[2], false);
+            if($val['stream']){   //如果传的是字符串图像流
+                $info = getimagesizefromstring($val['url']);
+                $function = 'imagecreatefromstring';
+            }
+            $res = $function($val['url']);
+            $resWidth = $info[0];
+            $resHeight = $info[1];
+            //建立画板 ,缩放图片至指定尺寸
+            $canvas=imagecreatetruecolor($val['width'], $val['height']);
+            imagefill($canvas, 0, 0, $color);
+            //关键函数,参数(目标资源,源,目标资源的开始坐标x,y, 源资源的开始坐标x,y,目标资源的宽高w,h,源资源的宽高w,h)
+            imagecopyresampled($canvas, $res, 0, 0, 0, 0, $val['width'], $val['height'],$resWidth,$resHeight);
+            $val['left'] = $val['left']<0?$backgroundWidth- abs($val['left']) - $val['width']:$val['left'];
+            $val['top'] = $val['top']<0?$backgroundHeight- abs($val['top']) - $val['height']:$val['top'];
+            //放置图像
+            imagecopymerge($imageRes,$canvas, $val['left'],$val['top'],$val['right'],$val['bottom'],$val['width'],$val['height'],$val['opacity']);//左,上,右,下,宽度,高度,透明度
+        }   }
+    //处理文字
+    if(!empty($config['text'])){
+        foreach ($config['text'] as $key => $val) {
+            $val = array_merge($textDefault,$val);
+            list($R,$G,$B) = explode(',', $val['fontColor']);
+            $fontColor = imagecolorallocate($imageRes, $R, $G, $B);
+            $val['left'] = $val['left']<0?$backgroundWidth- abs($val['left']):$val['left'];
+            $val['top'] = $val['top']<0?$backgroundHeight- abs($val['top']):$val['top'];
+            imagettftext($imageRes,$val['fontSize'],$val['angle'],$val['left'],$val['top'],$fontColor,$val['fontPath'],$val['text']);
+        }
+    }
+    //生成图片
+    $res = imagejpeg ($imageRes,$filePath,90); //保存到本地
+    imagedestroy($imageRes);
+    if(!$res) return false;
+    return $filePath;
 }
 }

+ 34 - 12
application/routine/controller/AuthApi.php

@@ -876,9 +876,7 @@ class AuthApi extends AuthController{
             ['refund_reason_wap_img',''],
             ['refund_reason_wap_img',''],
             ['refund_reason_wap_explain',''],
             ['refund_reason_wap_explain',''],
         ],$request);
         ],$request);
-        if($data['refund_reason_wap_img']){
-            $data['refund_reason_wap_img'] = explode(',',$data['refund_reason_wap_img']);
-        }
+        if($data['refund_reason_wap_img']) $data['refund_reason_wap_img'] = explode(',',$data['refund_reason_wap_img']);
         if(!$uni || $data['text'] == '') return JsonService::fail('参数错误!');
         if(!$uni || $data['text'] == '') return JsonService::fail('参数错误!');
         $res = StoreOrder::orderApplyRefund($uni,$this->userInfo['uid'],$data['text'],$data['refund_reason_wap_explain'],$data['refund_reason_wap_img']);
         $res = StoreOrder::orderApplyRefund($uni,$this->userInfo['uid'],$data['text'],$data['refund_reason_wap_explain'],$data['refund_reason_wap_img']);
         if($res)
         if($res)
@@ -1437,7 +1435,11 @@ class AuthApi extends AuthController{
         $path = 'public/uploads/routine/'.$this->userInfo['uid'].'.jpg';
         $path = 'public/uploads/routine/'.$this->userInfo['uid'].'.jpg';
         $domain=SystemConfigService::get('site_url').'/';
         $domain=SystemConfigService::get('site_url').'/';
         if(file_exists($path)) return JsonService::successful($domain.$path);
         if(file_exists($path)) return JsonService::successful($domain.$path);
-        else file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
+        else{
+            $dir = iconv("UTF-8", "GBK", "public/uploads/routine");
+            mkdir ($dir,0775,true);
+            file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
+        }
         return JsonService::successful($domain.$path);
         return JsonService::successful($domain.$path);
     }
     }
 
 
@@ -1890,14 +1892,14 @@ class AuthApi extends AuthController{
      * @param string $path
      * @param string $path
      * @param int $width
      * @param int $width
      */
      */
-    public function get_pages($path = '',$productId = 0,$width = 430){
-        if($path == '' || !$productId) return JsonService::fail('参数错误'); header('content-type:image/jpg');
-        if(!$this->userInfo['uid']) return JsonService::fail('授权失败,请重新授权');
-        $path = 'public/uploads/routinepage/'.$productId.'.jpg';
-        if(file_exists($path)) return JsonService::successful($path);
-        else file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
-        return JsonService::successful($path);
-    }
+//    public function get_pages($path = '',$productId = 0,$width = 430){
+//        if($path == '' || !$productId) return JsonService::fail('参数错误'); header('content-type:image/jpg');
+//        if(!$this->userInfo['uid']) return JsonService::fail('授权失败,请重新授权');
+//        $path = 'public/uploads/routinepage/'.$productId.'.jpg';
+//        if(file_exists($path)) return JsonService::successful($path);
+//        else file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
+//        return JsonService::successful($path);
+//    }
 
 
     /**
     /**
      * 文章列表
      * 文章列表
@@ -1944,6 +1946,26 @@ class AuthApi extends AuthController{
         return JsonService::successful($content);
         return JsonService::successful($content);
     }
     }
 
 
+    public function poster($id = 0){
+        if(!$id) return JsonService::fail('参数错误');
+        $productInfo = StoreProduct::getValidProduct($id,'store_name,id,price,image,code_path');
+        if(empty($productInfo)) return JsonService::fail('参数错误');
+        if($productInfo['code_path'] == '') {
+            $codePath = 'public/uploads/codepath/product/'.$productInfo['id'].'.jpg';
+            if(!file_exists($codePath)){
+                $dir = iconv("UTF-8", "GBK", "public/uploads/codepath/product");
+                mkdir($dir,0775,true);
+                file_put_contents($codePath,RoutineCode::getPages('pages/product-con/index?id='.$productInfo['id']));
+            }
+            $res = StoreProduct::edit(['code_path'=>$codePath],$id);
+            if($res) $productInfo['code_path'] = $codePath;
+            else return JsonService::fail('没有查看权限');
+        }
+        $posterPath = createPoster($productInfo);
+        return JsonService::successful($posterPath);
+    }
+
+
     /**
     /**
      * 刷新数据缓存
      * 刷新数据缓存
      */
      */

+ 10 - 21
application/routine/controller/Routine.php

@@ -1,35 +1,24 @@
 <?php
 <?php
-namespace app\wap\controller;
-
-use service\WechatService;
-
+namespace app\routine\controller;
+use behavior\wechat\PaymentBehavior;
+use service\HookService;
+use service\RoutineNotify;
 
 
 /**
 /**
- * 微信服务器  验证控制器
- * Class Wechat
- * @package app\wap\controller
+ * 小程序支付回调
+ * Class Routine
+ * @package app\routine\controller
  */
  */
-class Wechat
+class Routine
 {
 {
-
-    /**
-     * 微信服务器  验证
-     */
-    public function serve()
-    {
-        WechatService::serve();
-    }
-
     /**
     /**
      *   支付  异步回调
      *   支付  异步回调
      */
      */
     public function notify()
     public function notify()
     {
     {
-        WechatService::handleNotify();
+        $result = RoutineNotify::notify();
+        if($result) HookService::listen('wechat_pay_success_'.strtolower($result['attach']),$result['out_trade_no'],$result,true,PaymentBehavior::class);
     }
     }
-
-
-
 }
 }
 
 
 
 

+ 10 - 5
application/routine/model/store/StoreOrder.php

@@ -378,11 +378,16 @@ class StoreOrder extends ModelBasic
         if(!$res)
         if(!$res)
             return self::setErrorInfo('申请退款失败!');
             return self::setErrorInfo('申请退款失败!');
         else{
         else{
-            try{
-                $adminIds = SystemConfigService::get('site_store_admin_uids');
-                if(!$adminIds || !($adminList = array_unique(array_filter(explode(',',trim($adminIds)))))) return false;
-                RoutineTemplate::sendOrderRefundStatus($order,$refundReasonWap,$adminList);//小程序 发送模板消息
-            }catch (\Exception $e){}
+            $adminIds = SystemConfigService::get('site_store_admin_uids');
+            if(!empty($adminIds)){
+                try{
+                    if(!($adminList = array_unique(array_filter(explode(',',trim($adminIds)))))){
+                        self::setErrorInfo('申请退款成功,');
+                        return false;
+                    }
+                    RoutineTemplate::sendOrderRefundStatus($order,$refundReasonWap,$adminList);//小程序 发送模板消息
+                }catch (\Exception $e){}
+            }
             return true;
             return true;
         }
         }
     }
     }

+ 41 - 10
application/routine/model/store/StorePink.php

@@ -9,8 +9,10 @@ namespace app\routine\model\store;
 
 
 use app\routine\model\store\StoreCombination;
 use app\routine\model\store\StoreCombination;
 use app\routine\model\user\User;
 use app\routine\model\user\User;
+use app\routine\model\user\UserBill;
 use app\routine\model\user\WechatUser;
 use app\routine\model\user\WechatUser;
 use basic\ModelBasic;
 use basic\ModelBasic;
+use service\SystemConfigService;
 use service\WechatTemplateService;
 use service\WechatTemplateService;
 use think\Url;
 use think\Url;
 use traits\ModelTrait;
 use traits\ModelTrait;
@@ -148,16 +150,22 @@ class StorePink extends ModelBasic
      * @param $pid
      * @param $pid
      */
      */
     public static function orderPinkAfter($uidAll,$pid){
     public static function orderPinkAfter($uidAll,$pid){
-         foreach ($uidAll as $v){
-             $openid = WechatUser::uidToOpenid($v);
-             WechatTemplateService::sendTemplate($openid,WechatTemplateService::ORDER_USER_GROUPS_SUCCESS,[
-                 'first'=>'亲,您的拼团已经完成了',
-                 'keyword1'=> self::where('id',$pid)->whereOr('k_id',$pid)->where('uid',$v)->value('order_id'),
-                 'keyword2'=> self::alias('p')->where('p.id',$pid)->whereOr('p.k_id',$pid)->where('p.uid',$v)->join('__STORE_COMBINATION__ c','c.id=p.cid')->value('c.title'),
-                 'remark'=>'点击查看订单详情'
-             ],Url::build('My/order_pink_after',['id'=>$pid],true,true));
-         }
-         self::where('uid','IN',implode(',',$uidAll))->where('id',$pid)->whereOr('k_id',$pid)->update(['is_tpl'=>1]);
+//         foreach ($uidAll as $v){
+//             $openid = WechatUser::uidToOpenid($v);
+//             WechatTemplateService::sendTemplate($openid,WechatTemplateService::ORDER_USER_GROUPS_SUCCESS,[
+//                 'first'=>'亲,您的拼团已经完成了',
+//                 'keyword1'=> self::where('id',$pid)->whereOr('k_id',$pid)->where('uid',$v)->value('order_id'),
+//                 'keyword2'=> self::alias('p')->where('p.id',$pid)->whereOr('p.k_id',$pid)->where('p.uid',$v)->join('__STORE_COMBINATION__ c','c.id=p.cid')->value('c.title'),
+//                 'remark'=>'点击查看订单详情'
+//             ],Url::build('My/order_pink_after',['id'=>$pid],true,true));
+//         }
+         self::beginTrans();
+         $res1 = self::where('uid','IN',implode(',',$uidAll))->where('id',$pid)->whereOr('k_id',$pid)->update(['is_tpl'=>1]);
+         $res2 = true;
+//         if(SystemConfigService::get('colonel_status')) $res2 = self::setRakeBackColonel($pid);
+//         else $res2 = true;
+         $res = $res1 && $res2;
+         self::checkTrans($res);
     }
     }
 
 
     /**
     /**
@@ -339,4 +347,27 @@ class StorePink extends ModelBasic
             else return false;
             else return false;
         }
         }
     }
     }
+
+    /**
+     * 拼团成功后给团长返佣金
+     * @param int $id
+     * @return bool
+     */
+//    public static function setRakeBackColonel($id = 0){
+//        if(!$id) return false;
+//        $pinkRakeBack = self::where('id',$id)->field('people,price,uid,id')->find()->toArray();
+//        $countPrice = bcmul($pinkRakeBack['people'],$pinkRakeBack['price'],2);
+//        if(bcsub((float)$countPrice,0,2) <= 0) return true;
+//        $rakeBack = (SystemConfigService::get('rake_back_colonel') ?: 0)/100;
+//        if($rakeBack <= 0) return true;
+//        $rakeBackPrice = bcmul($countPrice,$rakeBack,2);
+//        if($rakeBackPrice <= 0) return true;
+//        $mark = '拼团成功,奖励佣金'.floatval($rakeBackPrice);
+//        self::beginTrans();
+//        $res1 = UserBill::income('获得拼团佣金',$pinkRakeBack['uid'],'now_money','colonel',$rakeBackPrice,$id,0,$mark);
+//        $res2 = User::bcInc($pinkRakeBack['uid'],'now_money',$rakeBackPrice,'uid');
+//        $res = $res1 && $res2;
+//        self::checkTrans($res);
+//        return $res;
+//    }
 }
 }

+ 3 - 1
application/routine/model/user/User.php

@@ -81,7 +81,9 @@ class User extends ModelBasic
      */
      */
     public static function isUserSpread($uid = 0){
     public static function isUserSpread($uid = 0){
         if(!$uid) return false;
         if(!$uid) return false;
-        $isPromoter = self::where('uid',$uid)->value('is_promoter');
+        $status = (int)SystemConfigService::get('store_brokerage_statu');
+        $isPromoter = true;
+        if($status == 1) $isPromoter = self::where('uid',$uid)->value('is_promoter');
         if($isPromoter) return true;
         if($isPromoter) return true;
         else return false;
         else return false;
     }
     }

+ 4 - 3
application/routine/model/user/UserRecharge.php

@@ -24,14 +24,15 @@ class UserRecharge extends ModelBasic
 
 
     public static function addRecharge($uid,$price,$recharge_type = 'weixin',$paid = 0)
     public static function addRecharge($uid,$price,$recharge_type = 'weixin',$paid = 0)
     {
     {
-        $order_id = self::getNewOrderId();
+        $order_id = self::getNewOrderId($uid);
         return self::set(compact('order_id','uid','price','recharge_type','paid'));
         return self::set(compact('order_id','uid','price','recharge_type','paid'));
     }
     }
 
 
-    public static function getNewOrderId()
+    public static function getNewOrderId($uid = 0)
     {
     {
+        if(!$uid) return false;
         $count = (int) self::where('add_time',['>=',strtotime(date("Y-m-d"))],['<',strtotime(date("Y-m-d",strtotime('+1 day')))])->count();
         $count = (int) self::where('add_time',['>=',strtotime(date("Y-m-d"))],['<',strtotime(date("Y-m-d",strtotime('+1 day')))])->count();
-        return 'wx1'.date('YmdHis',time()).(10000+$count+1);
+        return 'wx1'.date('YmdHis',time()).(10000+$count+$uid);
     }
     }
 
 
     public static function jsPay($orderInfo)
     public static function jsPay($orderInfo)

+ 49 - 164
application/routine/view/crmebN/app.js

@@ -2,169 +2,54 @@
 var app = getApp();
 var app = getApp();
 // var wxh = require('../../utils/wxh.js');
 // var wxh = require('../../utils/wxh.js');
 App({
 App({
-    onLaunch: function () {
-        // 展示本地存储能力
-        var that = this;
-        var logs = wx.getStorageSync('logs') || []
-        logs.unshift(Date.now())
-        wx.setStorageSync('logs', logs)
-        that.getRoutineStyle();
-    },
-    globalData: {
-        routineStyle:'#ffffff',
-        uid: null,
-        openPages:'',
-        spid:0,
-        urlImages: '',
-        url: 'https://shop.crmeb.net/'
-    },
-    getRoutineStyle:function(){
-        var that = this;
-        wx.request({
-            url: that.globalData.url + '/routine/login/get_routine_style',
-            method: 'post',
-            dataType  : 'json',
-            success: function (res) {
-                that.globalData.routineStyle = res.data.data.routine_style;
-                that.setBarColor();
-            }
+  onLaunch: function () {
+    // 展示本地存储能力
+    var that = this;
+    var logs = wx.getStorageSync('logs') || []
+    logs.unshift(Date.now())
+    wx.setStorageSync('logs', logs)
+    that.getRoutineStyle();
+  },
+  globalData: {
+    routineStyle:'#ffffff',
+    uid: null,
+    openPages:'',
+    spid:0,
+    urlImages: '',
+    url: 'https://shop.crmeb.net/'
+  },
+  getRoutineStyle:function(){
+    var that = this;
+    wx.request({
+      url: that.globalData.url + '/routine/login/get_routine_style',
+      method: 'post',
+      dataType  : 'json',
+      success: function (res) {
+        that.globalData.routineStyle = res.data.data.routine_style;
+        that.setBarColor();
+      }
+    })
+  },
+  setBarColor:function(){
+    var that = this;
+    wx.setNavigationBarColor({
+      frontColor: '#000000',
+      backgroundColor: that.globalData.routineStyle,
+    })
+  },
+  setUserInfo : function(){
+    var that = this;
+    if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
+      wx.showToast({
+        title: '用户信息获取失败',
+        icon: 'none',
+        duration: 1500,
+      })
+      setTimeout(function () {
+        wx.navigateTo({
+          url: '/pages/load/load',
         })
         })
-    },
-    setBarColor:function(){
-        var that = this;
-        wx.setNavigationBarColor({
-            frontColor: '#000000',
-            backgroundColor: that.globalData.routineStyle,
-        })
-    },
-    setUserInfo : function(){
-        var that = this;
-        if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
-            wx.showToast({
-                title: '用户信息获取失败',
-                icon: 'none',
-                duration: 1500,
-            })
-            setTimeout(function () {
-                wx.navigateTo({
-                    url: '/pages/enter/enter',
-                })
-            }, 2000)
-        }
-    },
-    getUserInfo: function () {
-        var that = this;
-        wx.getUserInfo({
-            lang: 'zh_CN',
-            success: function (res) {
-                var userInfo = res.userInfo
-                wx.login({
-                    success: function (res) {
-                        if (res.code) {
-                            userInfo.code = res.code;
-                            userInfo.spid = that.globalData.spid;
-                            wx.request({
-                                url: that.globalData.url + '/routine/login/index',
-                                method: 'post',
-                                dataType  : 'json',
-                                data: {
-                                    info: userInfo
-                                },
-                                success: function (res) {
-                                    that.globalData.uid = res.data.data.uid;
-                                    if (!res.data.data.status){
-                                        wx.redirectTo({
-                                            url: '/pages/login-status/login-status',
-                                        })
-                                    }
-                                    if (that.globalData.openPages != '') {
-                                        wx.navigateTo({
-                                            url: that.globalData.openPages
-                                        })
-                                    } else {
-                                        wx.switchTab({
-                                            url: '/pages/index/index'
-                                        })
-                                    }
-                                },
-                                fail: function () {
-                                    console.log('获取用户信息失败');
-                                    wx.navigateTo({
-                                        url: '/pages/enter/enter',
-                                    })
-                                },
-                            })
-                        } else {
-                            console.log('登录失败!' + res.errMsg)
-                        }
-                    },
-                    fail: function () {
-                        console.log('获取用户信息失败');
-                        wx.navigateTo({
-                            url: '/pages/enter/enter',
-                        })
-                    },
-                })
-            },
-            fail:function(){
-                console.log('获取用户信息失败');
-                wx.navigateTo({
-                    url: '/pages/enter/enter',
-                })
-            },
-        })
-    },
-    getUserInfoEnter: function () {
-        var that = this;
-        wx.getUserInfo({
-            lang: 'zh_CN',
-            success: function (res) {
-                var userInfo = res.userInfo
-                wx.login({
-                    success: function (res) {
-                        if (res.code) {
-                            userInfo.code = res.code;
-                            userInfo.spid = that.globalData.spid;
-                            wx.request({
-                                url: that.globalData.url + '/routine/login/index',
-                                method: 'post',
-                                dataType  : 'json',
-                                data: {
-                                    info: userInfo
-                                },
-                                success: function (res) {
-                                    that.globalData.uid = res.data.data.uid;
-                                    if (that.globalData.openPages != '') {
-                                        wx.navigateTo({
-                                            url: that.globalData.openPages
-                                        })
-                                    } else {
-                                        wx.reLaunch({
-                                            url: '/pages/index/index'
-                                        })
-                                    }
-                                }
-                            })
-                        } else {
-                            console.log('登录失败!' + res.errMsg)
-                        }
-                    },
-                    fail: function (res) {
-                        wx.showToast({
-                            title: '授权失败,请重新打开小程序',
-                            icon: 'none',
-                            duration: 1500,
-                        })
-                    }
-                })
-            },
-            fail: function (res) {
-                wx.showToast({
-                    title: '授权失败,请重新授权',
-                    icon: 'none',
-                    duration: 1500,
-                })
-            }
-        })
-    },
+      }, 1500)
+    }
+  },
 })
 })

+ 1 - 3
application/routine/view/crmebN/app.json

@@ -3,9 +3,9 @@
     "pages/load/load",
     "pages/load/load",
     "pages/login-status/login-status",
     "pages/login-status/login-status",
     "pages/payment/payment",
     "pages/payment/payment",
+    "pages/home/home",
     "pages/new-con/new-con",
     "pages/new-con/new-con",
     "pages/new-list/new-list",
     "pages/new-list/new-list",
-    "pages/enter/enter",
     "pages/index/index",
     "pages/index/index",
     "pages/refunding/refunding",
     "pages/refunding/refunding",
     "pages/miao-list/miao-list",
     "pages/miao-list/miao-list",
@@ -14,13 +14,11 @@
     "pages/product-countdown/index",
     "pages/product-countdown/index",
     "pages/refund-page/refund-page",
     "pages/refund-page/refund-page",
     "pages/refund-order/refund-order",
     "pages/refund-order/refund-order",
-    "pages/cut-one/cut-one",
     "pages/spread/spread",
     "pages/spread/spread",
     "pages/promotion-order/promotion-order",
     "pages/promotion-order/promotion-order",
     "pages/coupon/coupon",
     "pages/coupon/coupon",
     "pages/news-list/news-list",
     "pages/news-list/news-list",
     "pages/product-con/index",
     "pages/product-con/index",
-    "pages/product-pinke/index",
     "pages/comment-con/comment-con",
     "pages/comment-con/comment-con",
     "pages/orderForm/orderForm",
     "pages/orderForm/orderForm",
     "pages/orders-list/orders-list",
     "pages/orders-list/orders-list",

+ 3 - 3
application/routine/view/crmebN/app.wxss

@@ -33,9 +33,9 @@ page{font-size: 28rpx; background-color: #f7f7f7; color: #333;}
 .line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 .line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 .line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
 .line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
 .zhao{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0.7;}
 .zhao{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0.7;}
-.index-con{position:fixed; right:6rpx;top: 20%; width: 80rpx; height: 100rpx;}
+.index-con{position:fixed; left:6rpx;top: 20%; width: 80rpx; height: 100rpx;}
 .index-con image{width: 82rpx; height: 82rpx;}
 .index-con image{width: 82rpx; height: 82rpx;}
-.index-con navigator{width: 82rpx; height: 82rpx;position: absolute;bottom: 0;left: 0}
-.index-con .index-area{display:inline-block;top:88rpx;left:0px;position:relative;height: 500rpx;width:82rpx;}
+.index-con navigator{width: 82rpx; height: 100rpx;position: absolute;bottom: 0;left: 0}
+.index-con .index-area{display:inline-block;top:88rpx;left:0px;position:relative;height: 600rpx;width:82rpx;}
 
 
 
 

BIN
application/routine/view/crmebN/images/long.gif


+ 54 - 1
application/routine/view/crmebN/pages/address/address.js

@@ -11,7 +11,6 @@ Page({
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
     app.setUserInfo();
     app.setUserInfo();
-    console.log(options);
     if (options.cartId) {
     if (options.cartId) {
       this.setData({
       this.setData({
         cartId: options.cartId,
         cartId: options.cartId,
@@ -21,6 +20,60 @@ Page({
     }
     }
     this.getAddress();
     this.getAddress();
   },
   },
+  getWxAddress:function(){
+    var that = this;
+     wx.authorize({
+       scope: 'scope.address',
+       success: function(res) {
+         wx.chooseAddress({
+           success: function(res) {
+             console.log(res);
+             var addressP = {};
+             addressP.province = res.provinceName;
+             addressP.city = res.cityName;
+             addressP.district = res.countyName;
+             wx.request({
+               url: app.globalData.url + '/routine/auth_api/edit_user_address?uid=' + app.globalData.uid,
+               method: 'POST',
+               data: {
+                 address: addressP,
+                 is_default: 0,
+                 real_name: res.userName,
+                 post_code: res.postalCode,
+                 phone: res.telNumber,
+                 detail: res.detailInfo,
+                 id: 0
+               },
+               success: function (res) {
+                 if (res.data.code == 200) {
+                   wx.showToast({
+                     title: '添加成功',
+                     icon: 'success',
+                     duration: 1000
+                   })
+                   that.getAddress();
+                 }
+               }
+             })
+           },
+           fail: function(res) {
+             if (res.errMsg == 'chooseAddress:cancel'){
+               wx.showToast({
+                 title: '取消选择',
+                 icon: 'none',
+                 duration: 1500
+               })
+             }
+           },
+           complete: function(res) {},
+         })
+       },
+       fail: function(res) {
+         console.log(res);
+       },
+       complete: function(res) {},
+     })
+  },
   getAddress: function () {
   getAddress: function () {
     var that = this;
     var that = this;
     var header = {
     var header = {

+ 5 - 1
application/routine/view/crmebN/pages/address/address.wxml

@@ -19,4 +19,8 @@
         </view>
         </view>
     </block>
     </block>
 </view>
 </view>
-<view class='footer' bindtap='addAddress'>新增地址</view>
+<view style='height:80rpx'></view>
+<view class='footer'>
+  <view class='system-address' bindtap='addAddress'>新增地址</view>
+  <view class='weixin-address' bindtap='getWxAddress'>微信地址</view>
+</view>

+ 4 - 1
application/routine/view/crmebN/pages/address/address.wxss

@@ -11,4 +11,7 @@
 .Maddress{font-size:26rpx;}
 .Maddress{font-size:26rpx;}
 .edit,.del{width:112rpx;height:54rpx;border:1rpx solid #999999;border-radius:8rpx;text-align:center;line-height:54rpx;display:inline-block;font-size:24rpx;}
 .edit,.del{width:112rpx;height:54rpx;border:1rpx solid #999999;border-radius:8rpx;text-align:center;line-height:54rpx;display:inline-block;font-size:24rpx;}
 .del{margin-left:20rpx;}
 .del{margin-left:20rpx;}
-.footer{width:100%;height:100rpx;line-height:100rpx;font-size:30rpx;text-align:center;color:#ffffff;background-color:#FF3D3D;position:fixed;bottom:0;}
+.footer{width:100%;height:100rpx;line-height:100rpx;font-size:30rpx;
+text-align:center;color:#ffffff;background-color:#eb4e2b;position:fixed;bottom:0;}
+.footer .system-address{width:50%;float:left;}
+.footer .weixin-address{width:50%;float:right;background-color:#f3b23e}

+ 163 - 160
application/routine/view/crmebN/pages/cash/cash.js

@@ -1,170 +1,173 @@
 var app = getApp();
 var app = getApp();
 // pages/cash/cash.js
 // pages/cash/cash.js
 Page({
 Page({
-    data: {
-        ooo:'',
-        _num:0,
-        url: app.globalData.urlImages,
-        hiddentap: true,
-        hidde: true,
-        money:'',
-        index:0,
-        array:["请选择银行","招商银行","建设银行","农业银行"]
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad:function (opends) {
-        app.setBarColor();
-        var that = this;
-        this.getUserInfo();
-        this.getUserExtractBank();
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/minmoney?uid=' + app.globalData.uid,
-            method: 'POST',
-            success: function (res) {
-                that.setData({
-                    minmoney: res.data.msg
-                })
-            }
+  data: {
+    ooo:'',
+    _num:0,
+    url: app.globalData.urlImages,
+    hiddentap: true,
+    hidde: true,
+    money:'',
+    index:0,
+    array:["请选择银行","招商银行","建设银行","农业银行"]
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad:function (opends) {
+    app.setBarColor();
+    app.setUserInfo();
+    var that = this;
+    this.getUserInfo();
+    this.getUserExtractBank();
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/minmoney?uid=' + app.globalData.uid,
+      method: 'POST',
+      success: function (res) {
+        that.setData({
+          minmoney: res.data.msg
         })
         })
-    },
-    getUserInfo:function(){
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
-            method: 'POST',
-            success: function (res) {
-                that.setData({
-                    money: res.data.data.now_money
-                })
-            }
-        });
-    },
-    getUserExtractBank:function () {
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/get_user_extract_bank?uid=' + app.globalData.uid,
-            method: 'get',
-            success: function (res) {
-                that.setData({
-                    array: res.data.data
-                });
-            }
-        });
-    },
-    cardtap:function(e){
-        var flag = this.data.hiddentap;
-        if (flag){
-            this.setData({
-                hiddentap: false
-            })
-        }else{
-            this.setData({
-                hiddentap: true
-            })
+      }
+    })
+  },
+  getUserInfo:function(){
+      var that = this;
+      wx.request({
+        url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+        method: 'POST',
+        success: function (res) {
+          that.setData({
+            money: res.data.data.now_money
+          })
         }
         }
-    },
-    idnumtap: function (e) {
-        this.setData({
-            _num: e.target.dataset.idnum,
-            hiddentap: true
+      });
+  },
+  getUserExtractBank:function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_user_extract_bank?uid=' + app.globalData.uid,
+      method: 'get',
+      success: function (res) {
+        that.setData({
+          array: res.data.data
+        });
+      }
+    });
+  },
+  cardtap:function(e){
+    var flag = this.data.hiddentap;
+    if (flag){
+      this.setData({
+        hiddentap: false
+      })
+    }else{
+      this.setData({
+        hiddentap: true
+      })
+    }  
+  },
+  idnumtap: function (e) {
+    this.setData({
+      _num: e.target.dataset.idnum,
+      hiddentap: true
+    })
+    if (e.target.dataset.idnum==1){
+      this.setData({
+        hidde: false
+      })
+    }else{
+      this.setData({
+        hidde: true
+      })
+    }
+  },
+  maskhide:function(e){
+      this.setData({
+        hiddentap: true
+      })
+  },
+  bindPickerChange:function(e){
+      this.setData({
+        index: e.detail.value
+      })
+  },
+  formSubmit:function(e){
+    var header = {
+      // 'content-type': 'application/x-www-form-urlencoded',
+      'cookie': app.globalData.sessionId//读取cookie
+    };
+    var that = this;
+    var flag = true;
+    var warn = "";
+    var minmon = that.data.minmoney;
+    var mymoney = that.data.money;
+    var list={};
+    if (that.data.hidde==true){
+      list.$name = e.detail.value.name;
+      list.cardnum = e.detail.value.cardnum;
+      list.bankname = that.data.array[that.data.index];
+      list.money = e.detail.value.money;
+      list.money = Number(list.money);
+      list.extract_type = 'bank';
+      if (list.$name == "") {
+        warn = "请填写持卡人姓名";
+      } else if (list.cardnum == "") {
+        warn = "请输入银行卡号";
+      } else if (list.bankname == "请选择银行") {
+        warn = "请选择银行";
+      } else if (list.money < minmon) {
+        warn = "请输入正确的金额"
+      } else if (list.money > mymoney) {
+        warn = "您的余额不足"
+      }else {
+        flag = false;
+      }
+      if (flag == true) {
+        wx.showModal({
+          title: '提示',
+          content: warn
         })
         })
-        if (e.target.dataset.idnum==1){
-            this.setData({
-                hidde: false
-            })
-        }else{
-            this.setData({
-                hidde: true
-            })
-        }
-    },
-    maskhide:function(e){
-        this.setData({
-            hiddentap: true
+        return false;
+      }
+    } else {
+      list.weixin = e.detail.value.weixin;
+      list.money = e.detail.value.wmoney;
+      list.money = Number(list.money);
+      list.extract_type = 'weixin';
+      if (list.weixin == "") {
+        warn = "请填写微信号";
+      } else if (list.money < minmon) {
+        warn = "请输入正确的金额"
+      } else if (list.money > mymoney) {
+        warn = "您的余额不足"
+      } else {
+        flag = false;
+      }
+      if (flag == true) {
+        wx.showModal({
+          title: '提示',
+          content: warn
         })
         })
-    },
-    bindPickerChange:function(e){
-        this.setData({
-            index: e.detail.value
+        return false;
+      }
+    }
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/user_extract?uid=' + app.globalData.uid,
+      data: { lists: list},
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        that.setData({
+          money: (that.data.money - list.money).toFixed(2)
         })
         })
-    },
-    formSubmit:function(e){
-        var header = {
-            // 'content-type': 'application/x-www-form-urlencoded',
-            'cookie': app.globalData.sessionId//读取cookie
-        };
-        var that = this;
-        var flag = true;
-        var warn = "";
-        var minmon = that.data.minmoney;
-        var mymoney = that.data.money;
-        var list={};
-        if (that.data.hidde==true){
-            list.$name = e.detail.value.name;
-            list.cardnum = e.detail.value.cardnum;
-            list.bankname = that.data.array[that.data.index];
-            list.money = e.detail.value.money;
-            list.money = Number(list.money);
-            list.extract_type = 'bank';
-            if (list.$name == "") {
-                warn = "请填写持卡人姓名";
-            } else if (list.cardnum == "") {
-                warn = "请输入银行卡号";
-            } else if (list.bankname == "请选择银行") {
-                warn = "请选择银行";
-            } else if (list.money < minmon) {
-                warn = "请输入正确的金额"
-            } else if (list.money > mymoney) {
-                warn = "您的余额不足"
-            }else {
-                flag = false;
-            }
-            if (flag == true) {
-                wx.showModal({
-                    title: '提示',
-                    content: warn
-                })
-                return false;
-            }
-        } else {
-            list.weixin = e.detail.value.weixin;
-            list.money = e.detail.value.wmoney;
-            list.money = Number(list.money);
-            list.extract_type = 'weixin';
-            if (list.weixin == "") {
-                warn = "请填写微信号";
-            } else if (list.money < minmon) {
-                warn = "请输入正确的金额"
-            } else if (list.money > mymoney) {
-                warn = "您的余额不足"
-            } else {
-                flag = false;
-            }
-            if (flag == true) {
-                wx.showModal({
-                    title: '提示',
-                    content: warn
-                })
-                return false;
-            }
-        }
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/user_extract?uid=' + app.globalData.uid,
-            data: { lists: list},
-            method: 'POST',
-            header: header,
-            success: function (res) {
-                that.setData({
-                    money: (that.data.money - list.money).toFixed(2)
-                })
-                wx.showToast({
-                    title: res.data.msg,
-                    icon: 'success',
-                    duration: 1500
-                })
-            }
+        wx.showToast({
+          title: res.data.msg,
+          icon: 'success',
+          duration: 1500
         })
         })
-    }
+      }
+    })
+  }
+
+
 })
 })

+ 236 - 236
application/routine/view/crmebN/pages/comment-con/comment-con.js

@@ -2,253 +2,253 @@
 var app = getApp();
 var app = getApp();
 var wxh = require('../../utils/wxh.js');
 var wxh = require('../../utils/wxh.js');
 Page({
 Page({
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        xinghidden:true,
-        xinghidden2:true,
-        xinghidden3: true,
-        url: '',
-        hidden:false,
-        unique:'',
-        uni:'',
-        dataimg:[]
-    },
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (e) {
-        app.setBarColor();
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded'
-        };
-        var that = this;
-        console.log(e);
-        if (e.unique) {
-            var unique = e.unique;
-            that.setData({
-                unique: unique,
-            });
-        }
-        if (e.uni){
-            that.setData({
-                uni: e.uni
-            });
-        }
-        wx.showLoading({ title: "正在加载中……" });
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/get_order_product?uid=' + app.globalData.uid,
-            data: { unique: unique},
-            method: 'get',
-            header: header,
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    xinghidden:true,
+    xinghidden2:true,
+    xinghidden3: true,
+    url: '',
+    hidden:false,
+    unique:'',
+    uni:'',
+    dataimg:[]
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (e) {
+    app.setBarColor();
+    app.setUserInfo();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var that = this;
+    if (e.unique) {
+      var unique = e.unique;
+      that.setData({
+        unique: unique,
+      });
+    }
+    if (e.uni){
+      that.setData({
+        uni: e.uni
+      });
+    }
+    wx.showLoading({ title: "正在加载中……" });
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_order_product?uid=' + app.globalData.uid,
+      data: { unique: unique},
+      method: 'get',
+      header: header,
+      success: function (res) {
+        wx.hideLoading();
+        that.setData({
+          ordercon: res.data.data
+        });
+      },
+      fail: function (res) {
+        console.log('submit fail');
+      },
+      complete: function (res) {
+        console.log('submit complete');
+      }
+    });
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+  tapxing:function(e){
+    var index = e.target.dataset.index;
+    this.setData({
+      xinghidden: false,
+      xing: index
+    })
+  },
+  tapxing2: function (e) {
+    var index = e.target.dataset.index;
+    this.setData({
+      xinghidden2: false,
+      xing2: index
+    })
+  },
+  tapxing3: function (e) {
+    var index = e.target.dataset.index;
+    this.setData({
+      xinghidden3: false,
+      xing3: index
+    })
+  },
+  delImages:function(e){
+    var that = this;
+    var dataimg = that.data.dataimg;
+    var index = e.currentTarget.dataset.id;
+    dataimg.splice(index,1);
+    that.setData({
+      dataimg: dataimg
+    })
+    
+  },
+  uploadpic:function(e){
+    var that = this;
+    wx.chooseImage({
+      count: 1,  //最多可以选择的图片总数  
+      sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有  
+      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有  
+      success: function (res) {
+        // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片  
+        var tempFilePaths = res.tempFilePaths;
+        //启动上传等待中...  
+        wx.showLoading({
+          title: '图片上传中',
+        })
+        var len = tempFilePaths.length;
+        for (var i = 0; i < len; i++) {
+          wx.uploadFile({
+            url: app.globalData.url + '/routine/auth_api/upload?uid=' + app.globalData.uid,
+            filePath: tempFilePaths[i],
+            name: 'pics',
+            formData: {
+              'filename': 'pics'
+            },
+            header: {
+              "Content-Type": "multipart/form-data"
+            },
             success: function (res) {
             success: function (res) {
-                wx.hideLoading();
+              wx.hideLoading();
+              if(res.statusCode == 403){
+                   wx.showToast({
+                     title: res.data,
+                     icon: 'none',
+                     duration: 1500,
+                   })
+              } else {
+                var data = JSON.parse(res.data);
+                data.data.url = app.globalData.url + data.data.url;
+                that.data.dataimg.push(data);
                 that.setData({
                 that.setData({
-                    ordercon: res.data.data
+                  dataimg: that.data.dataimg
                 });
                 });
+                var len2 = that.data.dataimg.length;
+                if (len2 >= 8) {
+                  that.setData({
+                    hidden: true
+                  });
+                }
+              }
             },
             },
             fail: function (res) {
             fail: function (res) {
-                console.log('submit fail');
-            },
-            complete: function (res) {
-                console.log('submit complete');
-            }
-        });
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-    tapxing:function(e){
-        var index = e.target.dataset.index;
-        this.setData({
-            xinghidden: false,
-            xing: index
-        })
-    },
-    tapxing2: function (e) {
-        var index = e.target.dataset.index;
-        this.setData({
-            xinghidden2: false,
-            xing2: index
-        })
-    },
-    tapxing3: function (e) {
-        var index = e.target.dataset.index;
-        this.setData({
-            xinghidden3: false,
-            xing3: index
-        })
-    },
-    delImages:function(e){
-        var that = this;
-        var dataimg = that.data.dataimg;
-        var index = e.currentTarget.dataset.id;
-        dataimg.splice(index,1);
-        that.setData({
-            dataimg: dataimg
-        })
-
-    },
-    uploadpic:function(e){
-        var that = this;
-        wx.chooseImage({
-            count: 1,  //最多可以选择的图片总数
-            sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
-            sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
-            success: function (res) {
-                // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
-                var tempFilePaths = res.tempFilePaths;
-                //启动上传等待中...
-                wx.showLoading({
-                    title: '图片上传中',
-                })
-                var len = tempFilePaths.length;
-                for (var i = 0; i < len; i++) {
-                    wx.uploadFile({
-                        url: app.globalData.url + '/routine/auth_api/upload?uid=' + app.globalData.uid,
-                        filePath: tempFilePaths[i],
-                        name: 'pics',
-                        formData: {
-                            'filename': 'pics'
-                        },
-                        header: {
-                            "Content-Type": "multipart/form-data"
-                        },
-                        success: function (res) {
-                            wx.hideLoading();
-                            if(res.statusCode == 403){
-                                wx.showToast({
-                                    title: res.data,
-                                    icon: 'none',
-                                    duration: 1500,
-                                })
-                            } else {
-                                var data = JSON.parse(res.data);
-                                data.data.url = app.globalData.url + data.data.url;
-                                that.data.dataimg.push(data);
-                                that.setData({
-                                    dataimg: that.data.dataimg
-                                });
-                                var len2 = that.data.dataimg.length;
-                                if (len2 >= 8) {
-                                    that.setData({
-                                        hidden: true
-                                    });
-                                }
-                            }
-                        },
-                        fail: function (res) {
-                            wx.showToast({
-                                title: '上传图片失败',
-                                icon: 'none',
-                                duration: 2000
-                            })
-                        }
-                    });
-                }
-            }
-        });
-    },
-    formSubmit:function(e){
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded'
-        };
-        var that = this;
-        var unique = that.data.unique;
-        var comment = e.detail.value.comment;
-        var product_score = that.data.xing;
-        var service_score = that.data.xing2;
-        var pics = [];
-        var dataimg = that.data.dataimg;
-        for (var i = 0; i < dataimg.length;i++){
-            pics.push(that.data.url+dataimg[i].data.url)
-        };
-        if (comment==""){
-            wx.showToast({
-                title: '请填写你对宝贝的心得!',
+              wx.showToast({
+                title: '上传图片失败',
                 icon: 'none',
                 icon: 'none',
                 duration: 2000
                 duration: 2000
-            })
-            return false;
-        }
-        wx.showLoading({ title: "正在发布评论……" });
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/user_comment_product?uid=' + app.globalData.uid+'&unique=' + unique,
-            data: {comment: comment, product_score: product_score, service_score: service_score, pics: pics},
-            method: 'post',
-            header: header,
-            success: function (res) {
-                wx.hideLoading();
-                if (res.data.code==200){
-                    wx.showToast({
-                        title: '评价成功',
-                        icon: 'success',
-                        duration: 1000
-                    })
-                    setTimeout(function(){
-                        wx.navigateTo({
-                            url: '/pages/orders-con/orders-con?order_id='+that.data.uni,
-                        })
-                    },1200)
-                }else{
-                    wx.showToast({
-                        title: res.data.msg,
-                        icon: 'none',
-                        duration: 2000
-                    })
-                }
-            },
-            fail: function (res) {
-                console.log('submit fail');
-            },
-            complete: function (res) {
-                console.log('submit complete');
+              })
             }
             }
-        });
-    },
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
+          });
+        }
+      }
+    });  
+  },
+  formSubmit:function(e){
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var that = this;
+    var unique = that.data.unique;
+    var comment = e.detail.value.comment;
+    var product_score = that.data.xing;
+    var service_score = that.data.xing2;
+    var pics = []; 
+    var dataimg = that.data.dataimg;
+    for (var i = 0; i < dataimg.length;i++){
+      pics.push(that.data.url+dataimg[i].data.url)
+    };
+    if (comment==""){
+      wx.showToast({
+        title: '请填写你对宝贝的心得!',
+        icon: 'none',
+        duration: 2000
+      })
+      return false;
+    }
+    wx.showLoading({ title: "正在发布评论……" });
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/user_comment_product?uid=' + app.globalData.uid+'&unique=' + unique,
+      data: {comment: comment, product_score: product_score, service_score: service_score, pics: pics},
+      method: 'post',
+      header: header,
+      success: function (res) {
+        wx.hideLoading();
+        if (res.data.code==200){
+          wx.showToast({
+            title: '评价成功',
+            icon: 'success',
+            duration: 1000
+          })
+          setTimeout(function(){
+             wx.navigateTo({
+               url: '/pages/orders-con/orders-con?order_id='+that.data.uni,
+             })
+          },1200)
+        }else{
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+        }
+      },
+      fail: function (res) {
+        console.log('submit fail');
+      },
+      complete: function (res) {
+        console.log('submit complete');
+      }
+    });
+  },
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
 
 
-    },
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
 
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
 
 
-    },
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
 
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
 
 
-    }
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
 })
 })

+ 4 - 1
application/routine/view/crmebN/pages/comment-con/comment-con.wxml

@@ -12,7 +12,10 @@
         <textarea placeholder='宝贝满足你的期待么?说说你的想法,分享给想买的他们吧~' placeholder-class='placeholder' name = 'comment'></textarea>
         <textarea placeholder='宝贝满足你的期待么?说说你的想法,分享给想买的他们吧~' placeholder-class='placeholder' name = 'comment'></textarea>
         <view class='imgul'>
         <view class='imgul'>
             <block wx:for="{{dataimg}}">
             <block wx:for="{{dataimg}}">
-               <view class='imgpic'><image src='{{url}}{{item.data.url}}' class='dataimg'></image><icon class='iconfont icon-guanbi guanbi'></icon></view>
+               <view class='imgpic'>
+               <image src='{{item.data.url}}' class='dataimg'></image>
+               <icon class='iconfont icon-guanbi guanbi' data-id='{{index}}' bindtap='delImages'></icon>
+               </view>
             </block>
             </block>
             <view class='upimg' bindtap='uploadpic' hidden='{{hidden}}'></view>
             <view class='upimg' bindtap='uploadpic' hidden='{{hidden}}'></view>
         </view>
         </view>

+ 2 - 1
application/routine/view/crmebN/pages/comment/comment.js

@@ -19,7 +19,8 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
-    app.setBarColor();
+    app.setBarColor(); 
+    app.setUserInfo();
     var productId = options.productId;
     var productId = options.productId;
     this.setData({
     this.setData({
       productId: productId
       productId: productId

+ 1 - 0
application/routine/view/crmebN/pages/coupon-status/coupon-status.js

@@ -20,6 +20,7 @@ Page({
   },
   },
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     if (options.cartId){
     if (options.cartId){
       this.setData({
       this.setData({
         cartId: options.cartId,
         cartId: options.cartId,

+ 0 - 1
application/routine/view/crmebN/pages/coupon/coupon.js

@@ -12,7 +12,6 @@ Page({
    
    
   },
   },
   headertaps:function(e){
   headertaps:function(e){
-    // console.log(e);
       this.setData({
       this.setData({
         _active: e.target.dataset.idx
         _active: e.target.dataset.idx
       });
       });

+ 1 - 1
application/routine/view/crmebN/pages/enter/enter.js

@@ -29,7 +29,7 @@ Page({
       dataType  : 'json',
       dataType  : 'json',
       success: function (res) {
       success: function (res) {
         that.setData({
         that.setData({
-          logo: res.data.data.site_logo,
+          logo: app.globalData.url + res.data.data.site_logo,
           name: res.data.data.site_name
           name: res.data.data.site_name
         })
         })
       }
       }

+ 1 - 0
application/routine/view/crmebN/pages/extension/extension.js

@@ -8,6 +8,7 @@ Page({
   },
   },
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     var header = {
     var header = {
       'content-type': 'application/x-www-form-urlencoded',
       'content-type': 'application/x-www-form-urlencoded',
     };
     };

+ 0 - 1
application/routine/view/crmebN/pages/index/index.js

@@ -58,7 +58,6 @@ Page({
       method: 'POST',
       method: 'POST',
       header: header,
       header: header,
       success: function (res) {
       success: function (res) {
-        console.log(res.data.data.banner);
         that.setData({
         that.setData({
           imgUrls: res.data.data.banner,
           imgUrls: res.data.data.banner,
           recommendLsit: res.data.data.best,
           recommendLsit: res.data.data.best,

+ 1 - 1
application/routine/view/crmebN/pages/index/index.wxss

@@ -2,7 +2,7 @@
 .swiper-item{position: relative; width: 100%;}
 .swiper-item{position: relative; width: 100%;}
 .swiper_banner swiper-item image{width: 100%; height: 400rpx;}
 .swiper_banner swiper-item image{width: 100%; height: 400rpx;}
 .swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal{width: 100%; padding-right: 30rpx;display: flex;justify-content:flex-end;box-sizing: border-box;}
 .swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal{width: 100%; padding-right: 30rpx;display: flex;justify-content:flex-end;box-sizing: border-box;}
-.nav{ width: 100%; padding:0 20rpx; box-sizing: border-box; height: 197rpx; align-items: center; background-color: #fff;}
+.nav{ width: 100%; padding:0 10rpx; box-sizing: border-box; height: 197rpx; align-items: center; background-color: #fff;}
 .nav .nav-item{width: 25%;}
 .nav .nav-item{width: 25%;}
 .nav .nav-item image{width: 80rpx; height:80rpx;}
 .nav .nav-item image{width: 80rpx; height:80rpx;}
 .nav .nav-item text{display: blcok;}
 .nav .nav-item text{display: blcok;}

+ 2 - 0
application/routine/view/crmebN/pages/integral-con/integral-con.js

@@ -16,6 +16,8 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
      this.getUserInfo();
      this.getUserInfo();
     this.getList();
     this.getList();
   },//user_integral_list
   },//user_integral_list

+ 55 - 63
application/routine/view/crmebN/pages/load/load.js

@@ -1,71 +1,63 @@
-// pages/load/load.js
 var app = getApp();
 var app = getApp();
 Page({
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
   data: {
-  
+    logo: '',
+    name: '',
+    spid: 0,
+    url: app.globalData.url,
   },
   },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
   onLoad: function (options) {
   onLoad: function (options) {
-    if (options.scene) {
-      app.globalData.spid = options.scene;
-    }
+    var that = this;
+    that.getEnterLogo();
     app.setBarColor();
     app.setBarColor();
-    app.getUserInfo();
+    if (options.scene) that.data.spid = options.scene;
+  },
+  getEnterLogo: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/login/get_enter_logo',
+      method: 'post',
+      dataType  : 'json',
+      success: function (res) {
+        that.setData({
+          logo: res.data.data.site_logo,
+          name: res.data.data.site_name
+        })
+      }
+    })
+  },
+  //获取用户信息并且授权
+  getUserInfo: function(e){
+    var userInfo = e.detail.userInfo;
+    userInfo.spid = this.data.spid;
+    wx.login({
+      success: function (res) {
+        if (res.code) {
+          userInfo.code = res.code;
+          wx.request({
+            url: app.globalData.url + '/routine/login/index',
+            method: 'post',
+            dataType  : 'json',
+            data: {
+              info: userInfo
+            },
+            success: function (res) {
+              app.globalData.uid = res.data.data.uid;
+              if (app.globalData.openPages != '' && app.globalData.openPages != undefined) {//跳转到指定页面
+                wx.navigateTo({
+                  url: app.globalData.openPages
+                })
+              } else {//跳转到首页
+                wx.reLaunch({
+                  url: '/pages/index/index'
+                })
+              }
+            }
+          })
+        } else {
+          console.log('登录失败!' + res.errMsg)
+        }
+      }
+    })
   },
   },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-  
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-  
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-  
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-  
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-  
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-  
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-  
-  }
 })
 })

+ 1 - 1
application/routine/view/crmebN/pages/load/load.json

@@ -1,3 +1,3 @@
 {
 {
-  "navigationBarTitleText": "引导页"
+  "navigationBarTitleText": "授权"
 }
 }

+ 7 - 3
application/routine/view/crmebN/pages/load/load.wxml

@@ -1,4 +1,8 @@
-<view class='loading-pic'>
-    <image src='/images/long.gif'></image>
-    <view>正在加载中...</view>
+<view class="warrant">
+     <view class='white'>
+        <view class='pictrue'></view>
+        <view class='tip'>您的信息和数据将受到保护</view>
+        <button class='but' type="primary" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="getUserInfo">授权并登录</button> 
+     </view>
+     <view class='mask'></view>
 </view>
 </view>

File diff suppressed because it is too large
+ 6 - 3
application/routine/view/crmebN/pages/load/load.wxss


+ 2 - 0
application/routine/view/crmebN/pages/login-status/login-status.js

@@ -13,6 +13,8 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
     this.getSiteServicePhone();
     this.getSiteServicePhone();
   },
   },
 
 

+ 5 - 0
application/routine/view/crmebN/pages/miao-list/miao-list.js

@@ -8,8 +8,13 @@ Page({
     lovely:'',
     lovely:'',
     url: app.globalData.urlImages,
     url: app.globalData.urlImages,
   },
   },
+  setTouchMove: function (e) {
+    var that = this;
+    wxh.home(that, e);
+  },
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     this.getList();
     this.getList();
   },
   },
   getList: function () {
   getList: function () {

+ 1 - 7
application/routine/view/crmebN/pages/miao-list/miao-list.wxml

@@ -31,10 +31,4 @@
       </block>
       </block>
    </view>
    </view>
 </view>
 </view>
-<movable-area class='index-con' >
-  <movable-view class='index-area' direction="all">
-      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
-      <image src='/images/home.png'></image>
-      </navigator>
-  </movable-view>
-</movable-area>
+<include src="/pages/home/home.wxml"/>

+ 1 - 0
application/routine/view/crmebN/pages/miao-list/miao-list.wxss

@@ -17,3 +17,4 @@
 .list-time{position:absolute;bottom:10rpx;font-size:45rpx;left:18rpx;}
 .list-time{position:absolute;bottom:10rpx;font-size:45rpx;left:18rpx;}
 .list-time>text{width:38rpx;height:38rpx;line-height:38rpx;text-align:center;display:inline-block;vertical-align:middle;background-color:#333333;color:#FFFFFF;font-size:20rpx;border-radius:5rpx;margin-right: 16rpx;}
 .list-time>text{width:38rpx;height:38rpx;line-height:38rpx;text-align:center;display:inline-block;vertical-align:middle;background-color:#333333;color:#FFFFFF;font-size:20rpx;border-radius:5rpx;margin-right: 16rpx;}
 .list-time-top{background-color:rgba(255, 255, 255, 0.5);position:absolute;bottom:0;width:100%;height:60rpx;}
 .list-time-top{background-color:rgba(255, 255, 255, 0.5);position:absolute;bottom:0;width:100%;height:60rpx;}
+@import "/pages/home/home.wxss"; 

+ 5 - 0
application/routine/view/crmebN/pages/mycut/mycut.js

@@ -16,11 +16,16 @@ Page({
     countDownSecond:"00"
     countDownSecond:"00"
   },
   },
 
 
+  setTouchMove: function (e) {
+    var that = this;
+    wxh.home(that, e);
+  },
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     var that = this;
     var that = this;
     var timeStamp = "1912245455"
     var timeStamp = "1912245455"
     wxh.time2(timeStamp, that);
     wxh.time2(timeStamp, that);

+ 1 - 7
application/routine/view/crmebN/pages/mycut/mycut.wxml

@@ -41,10 +41,4 @@
         </view>
         </view>
     </block>
     </block>
 </view>
 </view>
-<movable-area class='index-con' >
-  <movable-view class='index-area' direction="all">
-      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
-      <image src='/images/home.png'></image>
-      </navigator>
-  </movable-view>
-</movable-area>
+<include src="/pages/home/home.wxml"/>

+ 1 - 0
application/routine/view/crmebN/pages/mycut/mycut.wxss

@@ -14,3 +14,4 @@
 .bottom-flag{font-size:26rpx;color:#FFA200;}
 .bottom-flag{font-size:26rpx;color:#FFA200;}
 .bottom-but{width:140rpx;height:58rpx;text-align:center;line-height:58rpx;border-radius:100rpx;background-color:#FF3D3D;color:#fff;font-size:24rpx;box-shadow:-1rpx 0rpx 5rpx #FF3D3D;}
 .bottom-but{width:140rpx;height:58rpx;text-align:center;line-height:58rpx;border-radius:100rpx;background-color:#FF3D3D;color:#fff;font-size:24rpx;box-shadow:-1rpx 0rpx 5rpx #FF3D3D;}
 .bottom-on{color:#999999!important;}
 .bottom-on{color:#999999!important;}
+@import "/pages/home/home.wxss"; 

+ 1 - 0
application/routine/view/crmebN/pages/new-con/new-con.js

@@ -17,6 +17,7 @@ Page({
   onLoad: function (options) {
   onLoad: function (options) {
     var that = this;
     var that = this;
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     if (options.id){
     if (options.id){
       that.setData({
       that.setData({
         newId: options.id
         newId: options.id

+ 1 - 0
application/routine/view/crmebN/pages/new-list/new-list.js

@@ -23,6 +23,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     this.getNewList();
     this.getNewList();
     this.getArticleBanner();
     this.getArticleBanner();
     this.getArticleHot();
     this.getArticleHot();

+ 1 - 0
application/routine/view/crmebN/pages/news-list/news-list.js

@@ -20,6 +20,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     this.getNoticeList();
     this.getNoticeList();
   },
   },
   getNoticeList:function(){
   getNoticeList:function(){

+ 2 - 1
application/routine/view/crmebN/pages/order-confirm/order-confirm.js

@@ -8,7 +8,7 @@ Page({
   data: {
   data: {
     cartArr: [
     cartArr: [
       { "name": "微信", "icon": "icon-weixinzhifu", value:'weixin'},
       { "name": "微信", "icon": "icon-weixinzhifu", value:'weixin'},
-      // { "name": "余额支付", "icon": "icon-yuezhifu", value: 'yue' },
+      { "name": "余额支付", "icon": "icon-yuezhifu", value: 'yue' },
       // { "name": "线下付款", "icon": "icon-wallet", value: 'offline' },
       // { "name": "线下付款", "icon": "icon-wallet", value: 'offline' },
       // { "name": "到店自提", "icon": "icon-dianpu", value: 'ziti'  },
       // { "name": "到店自提", "icon": "icon-dianpu", value: 'ziti'  },
     ],
     ],
@@ -39,6 +39,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     var that = this;
     var that = this;
     if (options.pinkId){
     if (options.pinkId){
       that.setData({
       that.setData({

+ 265 - 263
application/routine/view/crmebN/pages/orders-con/orders-con.js

@@ -3,288 +3,290 @@ var app = getApp();
 var wxh = require('../../utils/wxh.js');
 var wxh = require('../../utils/wxh.js');
 Page({
 Page({
 
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        url: app.globalData.urlImages
-    },
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    url: app.globalData.urlImages
+  },
 
 
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (e) {
-        app.setBarColor();
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded'
-        };
-        var uni = e.order_id;
-        var that = this;
-        wx.showLoading({ title: "正在加载中……" });
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/get_order?uid=' + app.globalData.uid,
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (e) {
+    app.setBarColor();
+    app.globalData.openPages = '/pages/orders-con/orders-con?order_id=' + e.order_id;
+    app.setUserInfo();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var uni = e.order_id;
+    var that = this;
+    wx.showLoading({ title: "正在加载中……" });
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_order?uid=' + app.globalData.uid,
+      data: { uni: uni },
+      method: 'get',
+      header: header,
+      success: function (res) {
+        wx.hideLoading();
+        that.setData({
+          ordercon:res.data.data
+        });
+      },
+      fail: function (res) {
+        console.log('submit fail');
+      },
+      complete: function (res) {
+        console.log('submit complete');
+      }
+    });
+  },
+  getPay:function(e){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/pay_order?uid=' + app.globalData.uid +'&uni='+e.target.dataset.id,
+      method: 'get',
+      success: function (res) {
+        var data = res.data.data;
+        if (res.data.code == 200 && res.data.data.status == 'WECHAT_PAY') {
+          var jsConfig = res.data.data.result.jsConfig;
+          console.log(jsConfig);
+          wx.requestPayment({
+            timeStamp: jsConfig.timeStamp,
+            nonceStr: jsConfig.nonceStr,
+            package: jsConfig.package,
+            signType: jsConfig.signType,
+            paySign: jsConfig.paySign,
+            success: function (res) {
+              wx.showToast({
+                title: '支付成功',
+                icon: 'success',
+                duration: 1000,
+              })
+              setTimeout(function () {
+                wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+                  url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+                })
+              }, 1200)
+            },
+            fail: function (res) {
+              wx.showToast({
+                title: '支付失败',
+                icon: 'success',
+                duration: 1000,
+              })
+              // setTimeout(function () {
+              //   wx.navigateTo({
+              //     url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+              //   })
+              // }, 1200)
+            },
+            complete: function (res) {
+              console.log(res);
+              if (res.errMsg == 'requestPayment:cancel') {
+                wx.showToast({
+                  title: '取消支付',
+                  icon: 'none',
+                  duration: 1000,
+                })
+                // setTimeout(function () {
+                //   wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+                //     url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+                //   })
+                // }, 1200)
+              }
+            },
+          })
+        } else if (res.data.code == 200){
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'success',
+            duration: 2000
+          })
+          setTimeout(function () {
+            wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+              url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+            })
+          }, 1200)
+        }else{
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 2000
+          })
+          setTimeout(function () {
+            wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+              url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+            })
+          }, 1200)
+        }
+      },
+      fail: function (res) {
+        console.log('submit fail');
+      }
+    });
+  },
+  delOrder:function(e){
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var uni = e.currentTarget.dataset.uni;
+    var that = this;
+    wx.showModal({
+      title: '确认删除订单?',
+      content: '订单删除后将无法查看',
+      success: function (res) {
+        if (res.confirm) {
+          wx.request({
+            url: app.globalData.url + '/routine/auth_api/user_remove_order?uid=' + app.globalData.uid,
             data: { uni: uni },
             data: { uni: uni },
             method: 'get',
             method: 'get',
             header: header,
             header: header,
             success: function (res) {
             success: function (res) {
-                wx.hideLoading();
-                that.setData({
-                    ordercon:res.data.data
-                });
+              if (res.data.code == 200) {
+                wx.showToast({
+                  title: '成功',
+                  icon: 'success',
+                  duration: 2000
+                })
+                setTimeout(function(){
+                  wx.navigateTo({
+                    url: '/pages/orders-list/orders-list',
+                  })
+                },1500)
+              } else {
+                wx.showToast({
+                  title: res.data.msg,
+                  icon: 'none',
+                  duration: 2000
+                })
+              }
+              // that.setData({
+              //   ordercon: that.data.ordercon
+              // });
             },
             },
             fail: function (res) {
             fail: function (res) {
-                console.log('submit fail');
+              console.log('submit fail');
             },
             },
             complete: function (res) {
             complete: function (res) {
-                console.log('submit complete');
+              console.log('submit complete');
             }
             }
-        });
-    },
-    getPay:function(e){
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/pay_order?uid=' + app.globalData.uid +'&uni='+e.target.dataset.id,
+          });
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
+      }
+    })
+  },
+  goTel:function(e){
+    console.log(e);
+    wx.makePhoneCall({
+      phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
+    })
+  },
+  goJoinPink:function(e){
+    var uni = e.currentTarget.dataset.uni;
+    wx.navigateTo({
+      url: '/pages/join-pink/index?id=' + uni,
+    })
+  },
+  confirmOrder:function(e){
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded'
+    };
+    var uni = e.currentTarget.dataset.uni;
+    var that = this;
+    wx.showModal({
+      title: '确认收货',
+      content: '为保障权益,请收到货确认无误后,再确认收货',
+      success: function (res) {
+        if (res.confirm) {
+          wx.request({
+            url: app.globalData.url + '/routine/auth_api/user_take_order?uid=' + app.globalData.uid,
+            data: { uni: uni },
             method: 'get',
             method: 'get',
+            header: header,
             success: function (res) {
             success: function (res) {
-                var data = res.data.data;
-                if (res.data.code == 200 && res.data.data.status == 'WECHAT_PAY') {
-                    var jsConfig = res.data.data.result.jsConfig;
-                    console.log(jsConfig);
-                    wx.requestPayment({
-                        timeStamp: jsConfig.timeStamp,
-                        nonceStr: jsConfig.nonceStr,
-                        package: jsConfig.package,
-                        signType: jsConfig.signType,
-                        paySign: jsConfig.paySign,
-                        success: function (res) {
-                            wx.showToast({
-                                title: '支付成功',
-                                icon: 'success',
-                                duration: 1000,
-                            })
-                            setTimeout(function () {
-                                wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
-                                    url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
-                                })
-                            }, 1200)
-                        },
-                        fail: function (res) {
-                            wx.showToast({
-                                title: '支付失败',
-                                icon: 'success',
-                                duration: 1000,
-                            })
-                            // setTimeout(function () {
-                            //   wx.navigateTo({
-                            //     url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
-                            //   })
-                            // }, 1200)
-                        },
-                        complete: function (res) {
-                            console.log(res);
-                            if (res.errMsg == 'requestPayment:cancel') {
-                                wx.showToast({
-                                    title: '取消支付',
-                                    icon: 'none',
-                                    duration: 1000,
-                                })
-                                // setTimeout(function () {
-                                //   wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
-                                //     url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
-                                //   })
-                                // }, 1200)
-                            }
-                        },
-                    })
-                } else if (res.data.code == 200){
-                    wx.showToast({
-                        title: res.data.msg,
-                        icon: 'success',
-                        duration: 2000
-                    })
-                    setTimeout(function () {
-                        wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
-                            url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
-                        })
-                    }, 1200)
-                }else{
-                    wx.showToast({
-                        title: res.data.msg,
-                        icon: 'none',
-                        duration: 2000
-                    })
-                    setTimeout(function () {
-                        wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
-                            url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
-                        })
-                    }, 1200)
-                }
+              if(res.data.code==200){
+                wx.navigateTo({
+                  url: '/pages/orders-list/orders-list?nowstatus=4',
+                })
+              }else{
+                wx.showToast({
+                  title: res.data.msg,
+                  icon: 'none',
+                  duration: 2000
+                })
+              }
+              that.setData({
+                ordercon: that.data.ordercon
+              });
             },
             },
             fail: function (res) {
             fail: function (res) {
-                console.log('submit fail');
-            }
-        });
-    },
-    delOrder:function(e){
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded'
-        };
-        var uni = e.currentTarget.dataset.uni;
-        var that = this;
-        wx.showModal({
-            title: '确认删除订单?',
-            content: '订单删除后将无法查看',
-            success: function (res) {
-                if (res.confirm) {
-                    wx.request({
-                        url: app.globalData.url + '/routine/auth_api/user_remove_order?uid=' + app.globalData.uid,
-                        data: { uni: uni },
-                        method: 'get',
-                        header: header,
-                        success: function (res) {
-                            if (res.data.code == 200) {
-                                wx.showToast({
-                                    title: '成功',
-                                    icon: 'success',
-                                    duration: 2000
-                                })
-                                setTimeout(function(){
-                                    wx.navigateTo({
-                                        url: '/pages/orders-list/orders-list',
-                                    })
-                                },1500)
-                            } else {
-                                wx.showToast({
-                                    title: res.data.msg,
-                                    icon: 'none',
-                                    duration: 2000
-                                })
-                            }
-                            // that.setData({
-                            //   ordercon: that.data.ordercon
-                            // });
-                        },
-                        fail: function (res) {
-                            console.log('submit fail');
-                        },
-                        complete: function (res) {
-                            console.log('submit complete');
-                        }
-                    });
-                } else if (res.cancel) {
-                    console.log('用户点击取消')
-                }
-            }
-        })
-    },
-    goTel:function(e){
-        console.log(e);
-        wx.makePhoneCall({
-            phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
-        })
-    },
-    goJoinPink:function(e){
-        var uni = e.currentTarget.dataset.uni;
-        wx.navigateTo({
-            url: '/pages/join-pink/index?id=' + uni,
-        })
-    },
-    confirmOrder:function(e){
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded'
-        };
-        var uni = e.currentTarget.dataset.uni;
-        var that = this;
-        wx.showModal({
-            title: '确认收货',
-            content: '为保障权益,请收到货确认无误后,再确认收货',
-            success: function (res) {
-                if (res.confirm) {
-                    wx.request({
-                        url: app.globalData.url + '/routine/auth_api/user_take_order?uid=' + app.globalData.uid,
-                        data: { uni: uni },
-                        method: 'get',
-                        header: header,
-                        success: function (res) {
-                            if(res.data.code==200){
-                                wx.navigateTo({
-                                    url: '/pages/orders-list/orders-list?nowstatus=4',
-                                })
-                            }else{
-                                wx.showToast({
-                                    title: res.data.msg,
-                                    icon: 'none',
-                                    duration: 2000
-                                })
-                            }
-                            that.setData({
-                                ordercon: that.data.ordercon
-                            });
-                        },
-                        fail: function (res) {
-                            console.log('submit fail');
-                        },
-                        complete: function (res) {
-                            console.log('submit complete');
-                        }
-                    });
-                } else if (res.cancel) {
-                    console.log('用户点击取消')
-                }
+              console.log('submit fail');
+            },
+            complete: function (res) {
+              console.log('submit complete');
             }
             }
-        })
-    },
-    goIndex:function(){
-        wx.switchTab({
-            url: '/pages/index/index'
-        })
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
+          });
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
+      }
+    })
+  },
+  goIndex:function(){
+     wx.switchTab({
+       url: '/pages/index/index'
+     })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
 
 
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
 
 
-    },
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
 
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
 
 
-    },
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
 
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
 
 
-    }
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
 })
 })

+ 1 - 3
application/routine/view/crmebN/pages/orders-con/orders-con.wxml

@@ -116,8 +116,6 @@
    <view wx:if="{{ordercon._status._type==1 && ordercon.combination_id}}" class='pay-btn' bindtap='goJoinPink' data-uni='{{ordercon.pink_id}}'>查看拼团</view> 
    <view wx:if="{{ordercon._status._type==1 && ordercon.combination_id}}" class='pay-btn' bindtap='goJoinPink' data-uni='{{ordercon.pink_id}}'>查看拼团</view> 
    <navigator wx:if="{{ordercon._status._type==2 && ordercon.delivery_type == 'express'}}" hover-class="none" url='/pages/logistics/logistics?orderId={{ordercon.order_id}}'><view class='delete-btn' >查看物流</view></navigator>
    <navigator wx:if="{{ordercon._status._type==2 && ordercon.delivery_type == 'express'}}" hover-class="none" url='/pages/logistics/logistics?orderId={{ordercon.order_id}}'><view class='delete-btn' >查看物流</view></navigator>
    <view wx:if="{{ordercon._status._type==2}}" class='pay-btn' bindtap='confirmOrder' data-uni='{{ordercon.order_id}}'>确认收货</view> 
    <view wx:if="{{ordercon._status._type==2}}" class='pay-btn' bindtap='confirmOrder' data-uni='{{ordercon.order_id}}'>确认收货</view> 
-   <view wx:if="{{ordercon._status._type==4}}" class='delete-btn' bindtap='delOrder' data-uni='{{ordercon.order_id}}'>删除订单</view>
-   <!-- <navigator  wx:if="{{ordercon._status._type==3}}" hover-class="none" url='/pages/product-con/index'><view class='delete-btn'>再次购买</view></navigator> -->
-   <!-- <navigator wx:if="{{ordercon._status._type==3}}" hover-class="none" url='/pages/comment-con/comment-con?order_id={{ordercon.order_id}}'><view class='pay-btn'>立即评价</view></navigator>  -->
+   <view wx:if="{{ordercon._status._type==4 || ordercon._status._type==0}}" class='delete-btn' bindtap='delOrder' data-uni='{{ordercon.order_id}}'>删除订单</view>
    <navigator  wx:if="{{!ordercon.seckill_id && !ordercon.bargain_id && !ordercon.combination_id && (ordercon._status._type==3||ordercon._status._type==4)}}" hover-class="none" bindtap='goIndex'><view class='pay-btn'>再次购买</view></navigator> 
    <navigator  wx:if="{{!ordercon.seckill_id && !ordercon.bargain_id && !ordercon.combination_id && (ordercon._status._type==3||ordercon._status._type==4)}}" hover-class="none" bindtap='goIndex'><view class='pay-btn'>再次购买</view></navigator> 
 </view>
 </view>

+ 4 - 0
application/routine/view/crmebN/pages/orders-list/orders-list.js

@@ -13,6 +13,10 @@ Page({
     title: "玩命加载中...",
     title: "玩命加载中...",
     hidden: false
     hidden: false
   },
   },
+  setTouchMove: function (e) {
+    var that = this;
+    wxh.home(that, e);
+  },
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */

+ 1 - 7
application/routine/view/crmebN/pages/orders-list/orders-list.wxml

@@ -52,12 +52,6 @@
   </block>
   </block>
   <view class='loading flex'><icon class='iconfont icon-jiazaizhong loadingpic' hidden='{{hidden}}'></icon>{{title}}</view>
   <view class='loading flex'><icon class='iconfont icon-jiazaizhong loadingpic' hidden='{{hidden}}'></icon>{{title}}</view>
 </view>
 </view>
-<movable-area class='index-con' >
-  <movable-view class='index-area' direction="all">
-      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
-      <image src='/images/home.png'></image>
-      </navigator>
-  </movable-view>
-</movable-area>
+<include src="/pages/home/home.wxml"/>
 
 
 
 

+ 2 - 1
application/routine/view/crmebN/pages/orders-list/orders-list.wxss

@@ -27,4 +27,5 @@
 .info-list .pro-item:last-child .wrapper{border-bottom: 0;}
 .info-list .pro-item:last-child .wrapper{border-bottom: 0;}
 .state-ytk{color:#333!important;}
 .state-ytk{color:#333!important;}
 .youfei{font-size:22rpx;}
 .youfei{font-size:22rpx;}
-.kuang{border:1rpx solid #999!important;background-color:#fff!important;color:#999!important;}
+.kuang{border:1rpx solid #999!important;background-color:#fff!important;color:#999!important;}
+@import "/pages/home/home.wxss"; 

+ 2 - 0
application/routine/view/crmebN/pages/payment/payment.js

@@ -14,6 +14,8 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
     this.getUserInfo();
     this.getUserInfo();
   },
   },
   getUserInfo:function(){
   getUserInfo:function(){

+ 60 - 0
application/routine/view/crmebN/pages/product-con/index.js

@@ -8,6 +8,7 @@ Page({
    * 页面的初始数据
    * 页面的初始数据
    */
    */
   data: {
   data: {
+    posterImage:'',//海报路径
     attrName:'',
     attrName:'',
     attr:'选择商品属性',
     attr:'选择商品属性',
     attrValue:'',
     attrValue:'',
@@ -42,6 +43,10 @@ Page({
     status:0,
     status:0,
     actionSheetHidden:true,
     actionSheetHidden:true,
   },
   },
+  setTouchMove: function (e) {
+    var that = this;
+    wxh.home(that, e);
+  },
   goPhone: function () {
   goPhone: function () {
     wx.request({
     wx.request({
       url: app.globalData.url + '/routine/auth_api/get_site_phone?uid=' + app.globalData.uid,
       url: app.globalData.url + '/routine/auth_api/get_site_phone?uid=' + app.globalData.uid,
@@ -136,6 +141,61 @@ Page({
       actionSheetHidden: !this.data.actionSheetHidden
       actionSheetHidden: !this.data.actionSheetHidden
     })
     })
   },
   },
+  savePosterPath:function(){
+    var that = this;
+     wx.downloadFile({
+       url: that.data.posterImage,
+       success: function(res) {
+         var path = res.tempFilePath;
+         wx.saveImageToPhotosAlbum({
+           filePath: path,
+           success: function(res) {
+             wx.showToast({
+               title: '保存成功',
+               icon: 'success',
+               duration: 1500,
+             })
+           },
+           fail: function (res) {
+             wx.showToast({
+               title: '保存失败',
+               icon: 'none',
+               duration: 1500,
+             })
+             },
+           complete: function(res) {},
+         })
+       },
+       fail: function(res) {},
+       complete: function(res) {},
+     })
+  },
+  goPoster:function(){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/poster?uid=' + app.globalData.uid,
+      method: 'GET',
+      data: {
+        id: that.data.id,
+      },
+      success: function (res) {
+        if(res.data.code == 200){
+          that.setData({
+            posterImage: app.globalData.url + res.data.msg,
+            actionSheetHidden: !that.data.actionSheetHidden
+          })
+          that.savePosterPath();
+        }else{
+          wx.showToast({
+            title: res.data.msg,
+            icon: 'none',
+            duration: 1500,
+            mask: true,
+          })
+        }
+      }
+    })
+  },
   goPhoto:function(){
   goPhoto:function(){
     var that = this;
     var that = this;
     wx.showActionSheet({
     wx.showActionSheet({

+ 16 - 14
application/routine/view/crmebN/pages/product-con/index.wxml

@@ -15,13 +15,21 @@
     </view>
     </view>
     <action-sheet hidden="{{actionSheetHidden}}" bindchange="listenerActionSheet" >
     <action-sheet hidden="{{actionSheetHidden}}" bindchange="listenerActionSheet" >
       <action-sheet-item >
       <action-sheet-item >
-          <button open-type="share" class='contact'>发送给朋友</button>
+          <button open-type="share" class='contact' >
+            <view class='iconn'></view>
+            发送给朋友
+          </button>
+          <button class='contact' bindtap='goPoster' >
+            <view class='iconn iconn1'></view>
+            生成海报
+          </button>
+          <!-- <view bindtap='goPoster' class='action-sheet'>
+            <view class='iconn iconn1'></view>
+            生成海报
+          </view> -->
       </action-sheet-item>
       </action-sheet-item>
-      <!-- <action-sheet-item bindtap='goPhoto' class='action-sheet'>
-      生成海报
-      </action-sheet-item> -->
       <!--自动隐藏action-sheet-->
       <!--自动隐藏action-sheet-->
-      <action-sheet-cancel>取消</action-sheet-cancel>
+      <!-- <action-sheet-cancel>取消</action-sheet-cancel> -->
   </action-sheet>
   </action-sheet>
     <view class='price-wrapper flex'>
     <view class='price-wrapper flex'>
       <view class='price'><text>¥</text>{{storeInfo.price}}</view>
       <view class='price'><text>¥</text>{{storeInfo.price}}</view>
@@ -38,10 +46,10 @@
       <view>销量:{{storeInfo.sales}}{{storeInfo.unit_name}}</view>
       <view>销量:{{storeInfo.sales}}{{storeInfo.unit_name}}</view>
     </view>
     </view>
   </view>
   </view>
-  <!-- <view class='block-bar' bindtap='goCoupon'>
+  <view class='block-bar' bindtap='goCoupon'>
     <text class='title'>领券</text>
     <text class='title'>领券</text>
     <text>领取优惠券 </text>
     <text>领取优惠券 </text>
-  </view> -->
+  </view>
   <!-- <view class='block-bar integral' wx:if="{{storeInfo.give_integral > 0}}">
   <!-- <view class='block-bar integral' wx:if="{{storeInfo.give_integral > 0}}">
     <text class='title'>积分</text>
     <text class='title'>积分</text>
     <text>购买可获得{{storeInfo.give_integral}}积分</text>
     <text>购买可获得{{storeInfo.give_integral}}积分</text>
@@ -108,12 +116,6 @@
     <view class='payment-btn' bindtap='goOrder'>确认下单</view>
     <view class='payment-btn' bindtap='goOrder'>确认下单</view>
   </view>
   </view>
 </view>
 </view>
-<movable-area class='index-con' >
-  <movable-view class='index-area' direction="all">
-      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
-      <image src='/images/home.png'></image>
-      </navigator>
-  </movable-view>
-</movable-area>
+<include src="/pages/home/home.wxml"/>
 <include src="/pages/foo-tan/foo-tan.wxml"/>  
 <include src="/pages/foo-tan/foo-tan.wxml"/>  
 <import src="/wxParse/wxParse.wxml"/>
 <import src="/wxParse/wxParse.wxml"/>

File diff suppressed because it is too large
+ 10 - 4
application/routine/view/crmebN/pages/product-con/index.wxss


+ 1 - 0
application/routine/view/crmebN/pages/product-countdown/index.js

@@ -30,6 +30,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     if (options.id){
     if (options.id){
       this.setData({
       this.setData({
         seckillId: options.id
         seckillId: options.id

+ 3 - 1
application/routine/view/crmebN/pages/product-countdown/index.wxml

@@ -99,4 +99,6 @@
 </movable-area>
 </movable-area>
 
 
 <include src="/pages/foo-tan/foo-tan.wxml"/>  
 <include src="/pages/foo-tan/foo-tan.wxml"/>  
-<import src="/wxParse/wxParse.wxml"/>
+<import src="/wxParse/wxParse.wxml"/>
+ 
+

+ 4 - 3
application/routine/view/crmebN/pages/product-countdown/index.wxss

@@ -53,6 +53,7 @@ swiper-item{position: relative; width: 100%;}
 .item-span{min-width:20rpx;height:20rpx;border-radius:50rpx;background-color:#ff3d3d;color: #fff;display:block;font-size:12rpx;text-align:center;line-height:20rpx;position:absolute;right:23rpx;top:0;}
 .item-span{min-width:20rpx;height:20rpx;border-radius:50rpx;background-color:#ff3d3d;color: #fff;display:block;font-size:12rpx;text-align:center;line-height:20rpx;position:absolute;right:23rpx;top:0;}
 .countdown-time text{height:35rpx;padding:0 8rpx;display:inline-block;background-color:#fff;color:#ff3d3d;line-height:35rpx;border-radius:5rpx;margin-top:8rpx;}
 .countdown-time text{height:35rpx;padding:0 8rpx;display:inline-block;background-color:#fff;color:#ff3d3d;line-height:35rpx;border-radius:5rpx;margin-top:8rpx;}
   @import "/pages/foo-tan/foo-tan.wxss";  
   @import "/pages/foo-tan/foo-tan.wxss";  
-  @import "/wxParse/wxParse.wxss";
- .wxParse-p{margin-bottom:-4px;
-}
+  @import "/wxParse/wxParse.wxss"; 
+
+
+

File diff suppressed because it is too large
+ 598 - 728
application/routine/view/crmebN/pages/productSort/productSort.js


+ 2 - 0
application/routine/view/crmebN/pages/promotion-card/promotion-card.js

@@ -15,6 +15,8 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
     var that = this;
     var that = this;
     var header = {
     var header = {
       'content-type': 'application/x-www-form-urlencoded',
       'content-type': 'application/x-www-form-urlencoded',

+ 145 - 144
application/routine/view/crmebN/pages/promotion-order/promotion-order.js

@@ -1,154 +1,155 @@
 var app = getApp();
 var app = getApp();
 // pages/promotion-order/promotion-order.js
 // pages/promotion-order/promotion-order.js
 Page({
 Page({
-    data: {
-        url: app.globalData.urlImages,
-        currentTab:"",
-        hiddens:true,
-        icondui:0,
-        icondui2: 0,
-        alloeder: ['全部订单', '已评价', '已发货'],
-        allOrder:"全部订单",
-        promoter:"推广粉丝",
-        promoterList: [],
-        orderlist:[],
-        orderconut:'',
-        ordermoney:''
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        app.setBarColor();
-        app.setUserInfo();
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded',
-        };
-        this.orderlist();
-        this.extension(header);
-        this.orderlistmoney();
-
-    },
-    extension: function (header){
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
-            method: 'POST',
-            header: header,
-            success: function (res) {
-                // console.log(res.data.data);
-                if (res.data.code==200){
-                    that.setData({
-                        promoterList: res.data.data.list
-                    })
-                }else{
-                    that.setData({
-                        promoterList: []
-                    })
-                }
-            }
-        });
-    },
-    spread: function () {
-        wx.navigateTo({
-            url: '../../pages/spread/spread',
-            success: function (res) { },
-            fail: function (res) { },
-            complete: function (res) { },
-        })
-    },
-
-    ordertap:function(e){
-        var currentTab = e.target.dataset.index;
-        this.setData({
-            currentTab:currentTab,
-            hiddens:false
-        })
-        console.log(this.data.currentTab)
-    },
-    icondui:function(e){
-        var that=this;
-        var icondui = e.target.dataset.ider;
+  data: {
+    url: app.globalData.urlImages,
+    currentTab:"",
+    hiddens:true,
+    icondui:0,
+    icondui2: 0,
+    alloeder: ['全部订单', '已评价', '已发货'],
+    allOrder:"全部订单",
+    promoter:"推广粉丝",
+    promoterList: [],
+    orderlist:[],
+    orderconut:'',
+    ordermoney:''
+  },
 
 
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    this.orderlist();
+    this.extension(header);
+    this.orderlistmoney();
+    
+  },
+  extension: function (header){
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        // console.log(res.data.data);
+        if (res.data.code==200){
+          that.setData({
+            promoterList: res.data.data.list
+          })
+        }else{
         that.setData({
         that.setData({
-            icondui: icondui,
-            hiddens: true,
-            allOrder: that.data.alloeder[icondui],
-            currentTab: -1
+          promoterList: []
         })
         })
-        that.orderlist();
-        this.orderlistmoney();
-    },
-    icondui2:function(e){
-        var that = this;
-        var icondui2 = e.target.dataset.ider;
-        var promoterLists = that.data.promoterList;
-        var len = promoterLists.length;
-        for (var index in promoterLists){
-            if (promoterLists[index]['uid'] == icondui2){
-                var promoter = promoterLists[index]['nickname'];
-            }
         }
         }
+      }
+    });
+  },
+  spread: function () {
+    wx.navigateTo({
+      url: '../../pages/spread/spread',
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  },
+ 
+  ordertap:function(e){
+    var currentTab = e.target.dataset.index;
+    this.setData({
+     currentTab:currentTab,
+     hiddens:false
+    })
+    console.log(this.data.currentTab)
+  },
+  icondui:function(e){
+    var that=this;
+    var icondui = e.target.dataset.ider;
 
 
-        that.setData({
-            icondui2: icondui2,
-            hiddens: true,
-            promoter: promoter,
-            currentTab: -1
-        })
-        that.orderlist();
-    },
-    zhaoguan:function(e){
-        this.setData({
-            hiddens: true,
-            currentTab: -1
-        })
-    },
-    orderlist: function (){
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded',
-        };
-        var that = this;
-        var icondui = that.data.icondui;
-        var icondui2 = that.data.icondui2;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/subordinateOrderlist?uid=' + app.globalData.uid,
-            data: { uid: icondui2, status: icondui},
-            method: 'POST',
-            header: header,
-            success: function (res) {
-                if (res.data.code==200){
-                    that.setData({
-                        orderlist: res.data.data
-                    })
-                }else{
-                    that.setData({
-                        orderlist: []
-                    })
-                }
-            }
-        })
-    },
-    orderlistmoney: function () {
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/subordinateOrderlistmoney?uid=' + app.globalData.uid,
-            data: { status: that.data.icondui},
-            method: 'POST',
-            success: function (res) {
-                if (res.data.code == 200) {
-                    that.setData({
-                        ordermoney: res.data.data.sum,
-                        orderconut: res.data.data.cont
-                    })
-                } else {
-                    that.setData({
-                        ordermoney:'',
-                        orderconut:''
-                    })
-                }
-            }
-        })
+    that.setData({
+      icondui: icondui,
+      hiddens: true,
+      allOrder: that.data.alloeder[icondui],
+      currentTab: -1
+    })
+    that.orderlist();
+    this.orderlistmoney();
+  },
+  icondui2:function(e){
+    var that = this;
+    var icondui2 = e.target.dataset.ider;
+    var promoterLists = that.data.promoterList;
+    var len = promoterLists.length;
+    for (var index in promoterLists){
+      if (promoterLists[index]['uid'] == icondui2){
+        var promoter = promoterLists[index]['nickname'];
+      }
     }
     }
+
+    that.setData({
+      icondui2: icondui2,
+      hiddens: true,
+      promoter: promoter,
+      currentTab: -1
+    })
+    that.orderlist();
+  },
+  zhaoguan:function(e){
+    this.setData({
+      hiddens: true,
+      currentTab: -1
+    })
+  },
+  orderlist: function (){
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+   var that = this;
+   var icondui = that.data.icondui;
+   var icondui2 = that.data.icondui2;
+   wx.request({
+     url: app.globalData.url + '/routine/auth_api/subordinateOrderlist?uid=' + app.globalData.uid,
+     data: { uid: icondui2, status: icondui},
+     method: 'POST',
+     header: header,
+     success: function (res) { 
+       if (res.data.code==200){
+         that.setData({
+           orderlist: res.data.data
+         })
+       }else{
+       that.setData({
+         orderlist: []
+       })
+       }
+     }
+   })
+ },
+  orderlistmoney: function () {
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/subordinateOrderlistmoney?uid=' + app.globalData.uid,
+      data: { status: that.data.icondui},
+      method: 'POST',
+      success: function (res) {
+        if (res.data.code == 200) {
+          that.setData({
+            ordermoney: res.data.data.sum,
+            orderconut: res.data.data.cont
+          })
+        } else {
+          that.setData({
+            ordermoney:'',
+            orderconut:''
+          })
+        }
+      }
+    })
+  }
+  
 })
 })

+ 1 - 0
application/routine/view/crmebN/pages/refund-order/refund-order.js

@@ -18,6 +18,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     this.getorderlist();
     this.getorderlist();
   },
   },
   searchSubmit: function () {
   searchSubmit: function () {

+ 1 - 0
application/routine/view/crmebN/pages/refund-page/refund-page.js

@@ -20,6 +20,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
      if (options.orderId){
      if (options.orderId){
        this.setData({
        this.setData({
          orderId: options.orderId
          orderId: options.orderId

+ 1 - 0
application/routine/view/crmebN/pages/refunding/refunding.js

@@ -16,6 +16,7 @@ Page({
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
     app.setBarColor();
     app.setBarColor();
+    app.setUserInfo();
     if (options.id){
     if (options.id){
         this.setData({
         this.setData({
           orderId: options.id
           orderId: options.id

+ 5 - 0
application/routine/view/crmebN/pages/spread/spread.js

@@ -1,4 +1,5 @@
 var app = getApp();
 var app = getApp();
+var wxh = require('../../utils/wxh.js');
 // pages/spread/spread.js
 // pages/spread/spread.js
 Page({
 Page({
 
 
@@ -16,6 +17,10 @@ Page({
     hiddens:true
     hiddens:true
   },
   },
 
 
+  setTouchMove: function (e) {
+    var that = this;
+    wxh.home(that, e);
+  },
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */

+ 1 - 7
application/routine/view/crmebN/pages/spread/spread.wxml

@@ -45,10 +45,4 @@
      <view class='tan-footer'>分销二维码</view>
      <view class='tan-footer'>分销二维码</view>
 </view>
 </view>
 <view class='zhao' hidden='{{hiddens}}' bindtap='tanguan'></view>
 <view class='zhao' hidden='{{hiddens}}' bindtap='tanguan'></view>
-<movable-area class='index-con' >
-  <movable-view class='index-area' direction="all">
-      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
-      <image src='/images/home.png'></image>
-      </navigator>
-  </movable-view>
-</movable-area>
+<include src="/pages/home/home.wxml"/>

+ 1 - 0
application/routine/view/crmebN/pages/spread/spread.wxss

@@ -32,5 +32,6 @@ page{background-color:#fff;}
 .tan-icon{position:absolute;top:-218rpx;right:-153rpx;font-size:30rpx!important;width:60rpx;height:60rpx;text-align:center;line-height:60rpx;background-color:#E0E0E0;color:#A0A0A0;border-radius:50%;}
 .tan-icon{position:absolute;top:-218rpx;right:-153rpx;font-size:30rpx!important;width:60rpx;height:60rpx;text-align:center;line-height:60rpx;background-color:#E0E0E0;color:#A0A0A0;border-radius:50%;}
 .text-infos{display: flex;align-items: center; margin-left:20rpx;}
 .text-infos{display: flex;align-items: center; margin-left:20rpx;}
 .icon-erweima1{position: relative;top:5rpx;margin-right:10rpx;}
 .icon-erweima1{position: relative;top:5rpx;margin-right:10rpx;}
+@import "/pages/home/home.wxss"; 
 
 
 
 

+ 130 - 125
application/routine/view/crmebN/pages/user/user.js

@@ -1,133 +1,138 @@
 var app = getApp();
 var app = getApp();
+var wxh = require('../../utils/wxh.js');
 // pages/user/user.js
 // pages/user/user.js
 Page({
 Page({
 
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        url: app.globalData.urlImages,
-        userinfo:[],
-        orderStatusNum:[],
-        coupon:'',
-        collect:''
-    },
+  /**
+   * 页面的初始数据
+   */
+  data: {
+  url: app.globalData.urlImages,
+  userinfo:[],
+  orderStatusNum:[],
+  coupon:'',
+  collect:''
+  },
 
 
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        app.setBarColor();
-        app.setUserInfo();
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded',
-        };
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
-            method: 'POST',
-            header: header,
-            success: function (res) {
-                that.setData({
-                    userinfo: res.data.data,
-                    orderStatusNum: res.data.data.orderStatusNum
-                })
-            }
-        });
-    },
-    goNotification:function(){
-        wx.navigateTo({
-            url: '/pages/news-list/news-list',
+  setTouchMove: function (e) {
+    var that = this;
+    wxh.home(that, e);
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    app.setBarColor();
+    app.setUserInfo();
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        that.setData({
+          userinfo: res.data.data,
+          orderStatusNum: res.data.data.orderStatusNum
         })
         })
-    },
-    onShow: function () {
-        var header = {
-            'content-type': 'application/x-www-form-urlencoded',
-        };
-        var that = this;
-        wx.request({
-            url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
-            method: 'POST',
-            header: header,
-            success: function (res) {
-                that.setData({
-                    userinfo: res.data.data
-                })
-            }
-        });
-    },
-    /**
-     * 生命周期函数--我的余额
-     */
-    money:function(){
-        wx.navigateTo({
-            url: '/pages/main/main?now=' + this.data.userinfo.now_money + '&uid='+app.globalData.uid,
-            success: function (res) { },
-            fail: function (res) { },
-            complete: function (res) { },
+      }
+    });
+  },
+  goNotification:function(){
+      wx.navigateTo({
+        url: '/pages/news-list/news-list',
+      })
+  },
+  onShow: function () {
+    var header = {
+      'content-type': 'application/x-www-form-urlencoded',
+    };
+    var that = this;
+    wx.request({
+      url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+      method: 'POST',
+      header: header,
+      success: function (res) {
+        that.setData({
+          userinfo: res.data.data
         })
         })
-    },
-    /**
-     * 生命周期函数--我的积分
-     */
-    integral: function () {
-        wx.navigateTo({
-            url: '/pages/integral-con/integral-con?inte=' + this.data.userinfo.integral + '&uid=' + app.globalData.uid,
-            success: function (res) { },
-            fail: function (res) { },
-            complete: function (res) { },
-        })
-    },
-    /**
-     * 生命周期函数--我的优惠卷
-     */
-    coupons: function () {
-        wx.navigateTo({
-            url: '/pages/coupon/coupon',
-            success: function (res) { },
-            fail: function (res) { },
-            complete: function (res) { },
-        })
-    },
-    /**
-     * 生命周期函数--我的收藏
-     */
-    collects: function () {
-        wx.navigateTo({
-            url: '/pages/collect/collect',
-        })
-    },
-    /**
-     * 生命周期函数--我的推广人
-     */
-    extension:function(){
-        wx.navigateTo({
-            url: '/pages/feree/feree',
-            success: function (res) { },
-            fail: function (res) { },
-            complete: function (res) { },
-        })
-    },
-    /**
-     * 生命周期函数--我的推广
-     */
-    myextension: function () {
-        wx.navigateTo({
-            url: '/pages/extension/extension',
-            success: function (res) { },
-            fail: function (res) { },
-            complete: function (res) { },
-        })
-    },
-    /**
-     * 生命周期函数--我的砍价
-     */
-    // cut_down_the_price:function(){
-    //   wx.navigateTo({
-    //     url: '../../pages/feree/feree',
-    //     success: function (res) { },
-    //     fail: function (res) { },
-    //     complete: function (res) { },
-    //   })
-    // }
+      }
+    });
+  },  
+   /**
+   * 生命周期函数--我的余额
+   */
+  money:function(){
+    wx.navigateTo({
+      url: '/pages/main/main?now=' + this.data.userinfo.now_money + '&uid='+app.globalData.uid,
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  },
+   /**
+   * 生命周期函数--我的积分
+   */
+  integral: function () {
+    wx.navigateTo({
+      url: '/pages/integral-con/integral-con?inte=' + this.data.userinfo.integral + '&uid=' + app.globalData.uid,
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  },
+   /**
+   * 生命周期函数--我的优惠卷
+   */
+  coupons: function () {
+    wx.navigateTo({
+      url: '/pages/coupon/coupon',
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  },
+   /**
+   * 生命周期函数--我的收藏
+   */
+  collects: function () {
+    wx.navigateTo({
+      url: '/pages/collect/collect',
+    })
+  },
+   /**
+   * 生命周期函数--我的推广人
+   */
+  extension:function(){
+    wx.navigateTo({
+      url: '/pages/feree/feree',
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  },
+   /**
+   * 生命周期函数--我的推广
+   */
+  myextension: function () {
+    wx.navigateTo({
+      url: '/pages/extension/extension',
+      success: function (res) { },
+      fail: function (res) { },
+      complete: function (res) { },
+    })
+  },
+   /**
+   * 生命周期函数--我的砍价
+   */
+  // cut_down_the_price:function(){
+  //   wx.navigateTo({
+  //     url: '../../pages/feree/feree',
+  //     success: function (res) { },
+  //     fail: function (res) { },
+  //     complete: function (res) { },
+  //   })
+  // }
 })
 })

+ 5 - 7
application/routine/view/crmebN/pages/user/user.wxml

@@ -147,10 +147,8 @@
     </view>
     </view>
   </view>
   </view>
 </view>
 </view>
-<movable-area class='index-con' >
-  <movable-view class='index-area' direction="all">
-      <navigator url='/pages/index/index' hover-class='none' open-type = "switchTab" >
-      <image src='/images/home.png'></image>
-      </navigator>
-  </movable-view>
-</movable-area>
+<include src="/pages/home/home.wxml"/>
+
+
+
+

+ 3 - 2
application/routine/view/crmebN/pages/user/user.wxss

@@ -15,9 +15,9 @@ min-width:26rpx;height:26rpx;text-align:center;line-height:26rpx;}
 .title-bar{padding:0 28rpx; height: 88rpx; align-items:  center; justify-content: space-between; border-bottom: 1px solid #f7f7f7; }
 .title-bar{padding:0 28rpx; height: 88rpx; align-items:  center; justify-content: space-between; border-bottom: 1px solid #f7f7f7; }
 .title-bar navigator{font-size: 24rpx; color:#999;}
 .title-bar navigator{font-size: 24rpx; color:#999;}
 .list-wrapper{ flex-wrap: wrap;  align-items: center;}
 .list-wrapper{ flex-wrap: wrap;  align-items: center;}
-.list-wrapper .item{width: 25%; text-align: center; margin-top:30rpx;position: relative}
+.list-wrapper .item{width: 25%; text-align: center;margin:20rpx 0;position: relative}
 .list-wrapper .item .iconfont{font-size: 45rpx;}
 .list-wrapper .item .iconfont{font-size: 45rpx;}
-.list-wrapper .item .text{font-size: 24rpx; color:#555;}
+.list-wrapper .item .text{font-size: 24rpx; color:#555;margin-top:10rpx;}
 
 
 .orders image{width: 42rpx; height: 45rpx;}
 .orders image{width: 42rpx; height: 45rpx;}
 .orders .list-wrapper{height: 142rpx;}
 .orders .list-wrapper{height: 142rpx;}
@@ -37,3 +37,4 @@ min-width:26rpx;height:26rpx;text-align:center;line-height:26rpx;}
 .contact-but{background-color:#ffffff;line-height:normal!important;}
 .contact-but{background-color:#ffffff;line-height:normal!important;}
 .contact-but::after{border:none;} 
 .contact-but::after{border:none;} 
 .item-span{min-width:26rpx;height:26rpx;border-radius:50rpx;background-color:#ff3d3d;color: #fff;display:block;font-size:20rpx;text-align:center;line-height:26rpx;position:absolute;right:46rpx;top:0;} 
 .item-span{min-width:26rpx;height:26rpx;border-radius:50rpx;background-color:#ff3d3d;color: #fff;display:block;font-size:20rpx;text-align:center;line-height:26rpx;position:absolute;right:46rpx;top:0;} 
+@import "/pages/home/home.wxss"; 

+ 9 - 0
application/routine/view/crmebN/utils/wxh.js

@@ -15,6 +15,14 @@ var carmin = function (that){
       minusStatus: minusStatus
       minusStatus: minusStatus
     });
     });
 }
 }
+//返回首页
+var home = function (that, e) {
+  if (e.touches[0].clientY < 500 && e.touches[0].clientY > 0) {
+    that.setData({
+      top: e.touches[0].clientY
+    })
+  }
+}
 //购物车加
 //购物车加
 var carjia = function(that){
 var carjia = function(that){
     var num = that.data.num;
     var num = that.data.num;
@@ -143,5 +151,6 @@ module.exports = {
   time: time,
   time: time,
   footan: footan,
   footan: footan,
   tapsize: tapsize,
   tapsize: tapsize,
+  home: home,
   time2: time2
   time2: time2
 }
 }

+ 1 - 1
application/routine/view/crmebN/wxParse/wxParse.wxss

@@ -17,9 +17,9 @@
     color: #666;
     color: #666;
     line-height: 1.8;
     line-height: 1.8;
 }
 }
-.wxParse-p{margin-bottom: -4px;}
 view{
 view{
     word-break:break-all;
     word-break:break-all;
+    margin-bottom: -5rpx;
 }
 }
 .wxParse-inline{
 .wxParse-inline{
     display: inline;
     display: inline;