beibo 5 months ago
parent
commit
f438f26c50

+ 33 - 17
components/activity/sku.js

@@ -557,17 +557,33 @@ Component({
557 557
           this.data.initialSku.selectedNum = val;
558 558
           break;
559 559
       }
560
-      if (parseInt(this.data.initialSku.selectedNum) > this.data.sku.stock_num) {
561
-        util.showTips("库存不足");
562
-        this.data.initialSku.selectedNum = this.data.sku.stock_num;
563
-      }
564
-      if ((type == 'minus' || type == 'modfiy') && (parseInt(this.data.initialSku.selectedNum) < this.data.sku.minT || util.isEmpty(this.data.initialSku.selectedNum))) {
565
-        util.showTips("至少选择" + this.data.sku.minT + "件");
566
-        this.data.initialSku.selectedNum = this.data.sku.minT;
567
-      }
568
-      if ((type == 'plus' || type == 'modfiy') && parseInt(this.data.initialSku.selectedNum) > this.data.sku.maxT) {
569
-        util.showTips("最大只能购买" + this.data.sku.maxT + "件");
570
-        this.data.initialSku.selectedNum = this.data.sku.maxT;
560
+      // 不选择排期 和默认项比较
561
+      if (this.data.checkScheduling == 1) {
562
+        if (parseInt(this.data.initialSku.selectedNum) > this.data.defaultPackage[0].stock_num) {
563
+          util.showTips("库存不足");
564
+          this.data.initialSku.selectedNum = this.data.defaultPackage[0].actnum;
565
+        }
566
+        if ((type == 'minus' || type == 'modfiy') && (parseInt(this.data.initialSku.selectedNum) < this.data.defaultPackage[0].minT || util.isEmpty(this.data.initialSku.selectedNum))) {
567
+          util.showTips("至少选择" + this.data.defaultPackage[0].minT + "件");
568
+          this.data.initialSku.selectedNum = this.data.defaultPackage[0].minT;
569
+        }
570
+        if ((type == 'plus' || type == 'modfiy') && parseInt(this.data.initialSku.selectedNum) > this.data.defaultPackage[0].maxT) {
571
+          util.showTips("最大只能购买" + this.data.defaultPackage[0].maxT + "件");
572
+          this.data.initialSku.selectedNum = this.data.defaultPackage[0].maxT;
573
+        }
574
+      } else {
575
+        if (parseInt(this.data.initialSku.selectedNum) > this.data.sku.stock_num) {
576
+          util.showTips("库存不足");
577
+          this.data.initialSku.selectedNum = this.data.sku.stock_num;
578
+        }
579
+        if ((type == 'minus' || type == 'modfiy') && (parseInt(this.data.initialSku.selectedNum) < this.data.sku.minT || util.isEmpty(this.data.initialSku.selectedNum))) {
580
+          util.showTips("至少选择" + this.data.sku.minT + "件");
581
+          this.data.initialSku.selectedNum = this.data.sku.minT;
582
+        }
583
+        if ((type == 'plus' || type == 'modfiy') && parseInt(this.data.initialSku.selectedNum) > this.data.sku.maxT) {
584
+          util.showTips("最大只能购买" + this.data.sku.maxT + "件");
585
+          this.data.initialSku.selectedNum = this.data.sku.maxT;
586
+        }
571 587
       }
572 588
       this.setData({
573 589
         initialSku: this.data.initialSku
@@ -665,7 +681,8 @@ Component({
665 681
         method: "POST",
666 682
         load: true
667 683
       }, function (data) {
668
-        // console.log(data.data,67676767)
684
+        data.data = JSON.parse(data.data)
685
+        console.log(data.data, 67676767)
669 686
         if (data.code == 0) {
670 687
           let totalPrice = that.data.initialSku.selectedNum * that.data.defaultPackage[0].price * 100
671 688
           // console.log('商品数', that.data.initialSku.selectedNum, '价格', that.data.defaultPackage[0].price, '总价', totalPrice)
@@ -699,13 +716,12 @@ Component({
699 716
             },
700 717
             goodsPage: {
701 718
               path: "/pages/order/success/index",
702
-              // todo:orderid不对
703 719
               params: {
704
-                orderid: data.data
720
+                orderid: data.data.orderid
705 721
               },
706 722
             },
707 723
             callbackData: {
708
-              out_order_no: data.data
724
+              out_order_no: data.data.outTradeNo
709 725
             }, // 透传数据,开发者自定义字段 非必传
710 726
             tradeOption: {
711 727
               life_trade_flag: 0 // 0:非融合链路(默认值)  1:走融合链路(标准融合/完全融合)
@@ -716,9 +732,9 @@ Component({
716 732
                 outOrderNo
717 733
               } = res;
718 734
               console.log("success res", res);
719
-              console.log("orderId", orderId, "outOrderNo", outOrderNo);
735
+              console.log("orderId", orderId,data.data.orderId, "outOrderNo", outOrderNo);
720 736
               tt.navigateTo({
721
-                url: '/pages/order/success/index?orderid=' + orderId
737
+                url: '/pages/order/success/index?orderid=' + data.data.orderId
722 738
               });
723 739
               this.setData({
724 740
                 orderId,

+ 1 - 1
components/activity/sku.ttml

@@ -8,7 +8,7 @@
8 8
       <checkbox checked="{{checkeduseCoin}}" color="#ee3a43" />仅显示可用宝贝币的场次
9 9
     </checkbox-group>
10 10
     <!-- 补缴费用说明 -->
11
-    <!-- wx:if="{{orderInfo.dayBeforeStart}}" -->
11
+    <!-- tt:if="{{orderInfo.dayBeforeStart}}" -->
12 12
     <!-- <view tt:if="{{orderInfo}}">
13 13
       <view class="modular modular-pad" tt:if="{{orderInfo.refundRule!=5}}">
14 14
         <view class="modal-title">补缴费用</view>

+ 1 - 1
components/cashCoupon/index.ttml

@@ -5,7 +5,7 @@
5 5
   </view>
6 6
   <view class='box'>
7 7
     <view class='box-overflow'>
8
-      <view class='voucher-list white-bg' wx:for="{{vouchers}}" wx:key="*this">
8
+      <view class='voucher-list white-bg' tt:for="{{vouchers}}" tt:key="*this">
9 9
         <view class='price'>
10 10
           <text class='font12'>¥</text>{{item.price}}
11 11
         </view>

+ 1 - 1
components/photoList/index.ttml

@@ -50,7 +50,7 @@
50 50
   </view>
51 51
 </scroll-view>
52 52
 
53
-<!-- <block wx:if="{{!selectMore}}"> -->
53
+<!-- <block tt:if="{{!selectMore}}"> -->
54 54
 <slot name="bottomBtn" tt:if="{{!selectMore}}"></slot>
55 55
 <!-- </block> -->
56 56
 <view class="btn-bottom" tt:else>

+ 1 - 1
pages/account/cards/index.ttml

@@ -12,7 +12,7 @@
12 12
     <view class="label">购买信息</view>
13 13
   </view>
14 14
 </view>
15
-<!-- <view class="tab-bar white-bg" wx:if="{{isSelected}}">
15
+<!-- <view class="tab-bar white-bg" tt:if="{{isSelected}}">
16 16
   <view class="tab-item {{ctype == 0 ? 'active' : ''}}" data-index="0" bindtap="setTabbar">
17 17
     <view class="label">儿童单飞信息</view>
18 18
   </view>

+ 5 - 5
pages/account/coin/cash.ttml

@@ -4,8 +4,8 @@
4 4
   <view class="content-box content-pad">
5 5
     <view class="font12 cash-text rule-text-line">
6 6
       <view class="font16">- 提现说明 -</view>
7
-      <view wx:if="{{info.scale<1}}">满{{info.minprice}}可提现,<text class="red">只按{{info.scale*100}}%提现</text>,建议您购买活动</view>
8
-      <view wx:else>可抵扣活动,满100元可提现。</view>
7
+      <view tt:if="{{info.scale<1}}">满{{info.minprice}}可提现,<text class="red">只按{{info.scale*100}}%提现</text>,建议您购买活动</view>
8
+      <view tt:else>可抵扣活动,满100元可提现。</view>
9 9
     </view>
10 10
     <view class='list-block'>
11 11
       <view class='item-content'>
@@ -15,7 +15,7 @@
15 15
         </view>
16 16
         <view class='item-after'>元</view>
17 17
       </view>
18
-      <view class='item-content' wx:if="{{info.scale<1}}">
18
+      <view class='item-content' tt:if="{{info.scale<1}}">
19 19
         <view class='item-title label'>折后金额:</view>
20 20
         <view class='item-input red'>{{okPriceText}}</view>
21 21
       </view>
@@ -26,7 +26,7 @@
26 26
           <label class="radio"><radio value="2" color="#EE3A43" checked="{{payType == 2 ? true:false}}"/>银行卡</label>
27 27
         </radio-group>
28 28
       </view>
29
-      <block wx:if="{{payType == 0}}">
29
+      <block tt:if="{{payType == 0}}">
30 30
         <view class='item-content'>
31 31
           <view class='item-title label'>支付宝姓名:</view>
32 32
           <view class='item-input'>
@@ -40,7 +40,7 @@
40 40
           </view>
41 41
         </view>
42 42
       </block>
43
-      <block wx:else>
43
+      <block tt:else>
44 44
         <view class='item-content'>
45 45
           <view class='item-title label'>姓名:</view>
46 46
           <view class='item-input'>

+ 1 - 1
pages/account/monetaryCenter/index.ttml

@@ -48,7 +48,7 @@
48 48
       </view>
49 49
       <view class="type-item">
50 50
         <view class="type-item-box {{defaultLevel==3?'act_privilege':''}}" data-index="3" bindtap="checkOptions">
51
-          <!-- <text class='icon icon-lock font16 position-icon 'wx:if="{{initialSwipe<1}}"></text> -->
51
+          <!-- <text class='icon icon-lock font16 position-icon 'tt:if="{{initialSwipe<1}}"></text> -->
52 52
           <text class='icon icon-vip-privilege' style="line-height: .8;"></text>
53 53
           <view class="type-item-name">抢购特权</view>
54 54
         </view>

+ 11 - 5
pages/account/setting/index.js

@@ -6,11 +6,14 @@ Page({
6 6
     userInfo: app.globalData.userInfo
7 7
   },
8 8
   onShow() {
9
-    this.setData({ userInfo: app.globalData.userInfo });
9
+    this.setData({
10
+      userInfo: app.globalData.userInfo
11
+    });
10 12
     this.isRecomCode();
11 13
   },
12 14
   isRecomCode() {
13
-    let that = this,userInfo = app.globalData.userInfo;
15
+    let that = this,
16
+      userInfo = app.globalData.userInfo;
14 17
     util.ajax({
15 18
       func: "user/inviter/code",
16 19
       load: false
@@ -18,7 +21,9 @@ Page({
18 21
       if (res.code == 0) {
19 22
         userInfo.recomCode = !util.isEmpty(res.data.inviterCode) ? res.data.inviterCode : userInfo.recomCode;
20 23
         tt.setStorageSync("WXuserInfo", userInfo);
21
-        that.setData({ isRecomClick: res.data.show == 0 && util.isEmpty(res.data.inviterCode) ? 0 : 1 });
24
+        that.setData({
25
+          isRecomClick: res.data.show == 0 && util.isEmpty(res.data.inviterCode) ? 0 : 1
26
+        });
22 27
       }
23 28
     });
24 29
   },
@@ -35,11 +40,12 @@ Page({
35 40
               tt.removeStorageSync("WXuserInfo");
36 41
               tt.removeStorageSync("nps");
37 42
               app.globalData.userInfo = null;
38
-              tt.redirectTo({
43
+              console.log(676676)
44
+              tt.reLaunch({
39 45
                 url: '/pages/home/account'
40 46
               });
41 47
             } else
42
-            util.showTips(res.reason);
48
+              util.showTips(res.reason);
43 49
           });
44 50
         }
45 51
       }

+ 1 - 1
pages/account/setting/index.ttml

@@ -8,7 +8,7 @@
8 8
     </view>
9 9
   </view>
10 10
 
11
-  <!-- <view class="septal-top-line" wx:if="{{userInfo && isRecomClick == 1}}">
11
+  <!-- <view class="septal-top-line" tt:if="{{userInfo && isRecomClick == 1}}">
12 12
     <view class="cell ceill-link cell-media" data-url="/pages/home/referre?type=account" bindtap='navigatorURl'>
13 13
       <view class="cell-value">邀请我的人</view>
14 14
     </view>

+ 2 - 2
pages/growup/findPhoto/index.ttml

@@ -14,7 +14,7 @@
14 14
     <scroll-view class="scroll-view_H" scroll-x="true">
15 15
       <image tt:for="{{faceResult}}" tt:key="index" src="{{item.imageUrl||'../../../images/login.png'}}" mode class="headPhoto {{faceResultIndex==index?'checked':''}}" bindtap="headCheck" data-index="{{index}}" />
16 16
     </scroll-view>
17
-    <!-- <view class="noData" wx:else></view> -->
17
+    <!-- <view class="noData" tt:else></view> -->
18 18
   </view>
19 19
   <view slot='photoListContent'>
20 20
     <checkbox-group bindchange="checkboxChange" class="checkbox" tt:if="{{photoData&&photoData.length>0}}">
@@ -22,7 +22,7 @@
22 22
     </checkbox-group>
23 23
     <view class="noData" tt:if="{{(!faceResult||faceResult.length==0)&&(imgList&&imgList.length>0)}}">未搜索到照片,请重新上传一张单人正脸照~</view>
24 24
     <view class="noData" tt:elif="{{(!photoData||photoData.length==0)&&(imgList&&imgList.length>0)}}">未找到照片,请换张照片重试~</view>
25
-    <!-- <view slot='bottomBtn' class="btn-bottom" wx:if="{{imgList&&imgList.length>0}}">
25
+    <!-- <view slot='bottomBtn' class="btn-bottom" tt:if="{{imgList&&imgList.length>0}}">
26 26
       <view class="refreshBtn" bindtap="getLatestResults">获取最新结果</view>
27 27
     </view> -->
28 28
   </view>

+ 2 - 2
pages/growup/take/take.ttml

@@ -116,10 +116,10 @@
116 116
     <view class="expression">{{info.expression}}</view>
117 117
   </view>
118 118
   <!-- <view class='mTop5 font14 content' bindlongtap='copy' data-type="s_expression">
119
-    <view wx:for-items="{{info.expressionList}}" wx:key="*this" class='mTop5'>
119
+    <view tt:for-items="{{info.expressionList}}" tt:key="*this" class='mTop5'>
120 120
       <text class='red'>{{item.deadline}}:</text>{{item.expression}}
121 121
     </view>
122
-    <view class='mTop5'><text class='red' wx:if="{{info.s_expression}}">总结:</text>{{info.s_expression}}</view>
122
+    <view class='mTop5'><text class='red' tt:if="{{info.s_expression}}">总结:</text>{{info.s_expression}}</view>
123 123
   </view> -->
124 124
 </view>
125 125
 <view class='noData' tt:else><text class="icon icon-info"></text><text>暂无记录\n有问题请联系宝大大!</text></view>

+ 6 - 6
pages/home/account.ttml

@@ -29,10 +29,10 @@
29 29
     </view>
30 30
     <view class="accont-nologin" tt:else>
31 31
       <text class='icon icon-info'></text>
32
-      <button bindgetphonenumber='getPhoneNumber' open-type="getPhoneNumber" class="middle">点击登录 / 注册</button>
32
+      <button bindgetphonenumber='getPhoneNumber' open-type="getPhoneNumber" class="middle">授权手机号快捷登录</button>
33 33
     </view>
34 34
   </view>
35
-  <!-- <view class="red user-b row-flex" wx:if="{{userInfo}}">
35
+  <!-- <view class="red user-b row-flex" tt:if="{{userInfo}}">
36 36
     <view class="col-8 link">
37 37
       <view class="font14 fontWei">享折扣</view>
38 38
       <view class='label font12'>宝贝币当钱用</view>
@@ -65,7 +65,7 @@
65 65
       style="width: 100%;"></image>
66 66
   </navigator>
67 67
 </view>
68
-<!-- <view class='wallet-box white-bg' wx:if="{{isWallet == 1 && userInfo['roleType'] == 'normal'}}">
68
+<!-- <view class='wallet-box white-bg' tt:if="{{isWallet == 1 && userInfo['roleType'] == 'normal'}}">
69 69
     <view class='label' data-url="/pages/account/coin/index" bindtap='navigatorURl'>
70 70
       <view class="font18 {{stat.refreshCoin == 1 ? 'info':''}}">
71 71
         <text class="red ">{{userInfo ? userInfo.coin : "0.00"}}</text>
@@ -81,11 +81,11 @@
81 81
       <text class="font12">邀请用户</text>
82 82
     </view>
83 83
 </view> -->
84
-<!-- <view class='account-icon septal-top-line account-icon-five' wx:if="{{userInfo['roleType'] == 'sharer' || userInfo['roleType'] == 'organ'}}">
84
+<!-- <view class='account-icon septal-top-line account-icon-five' tt:if="{{userInfo['roleType'] == 'sharer' || userInfo['roleType'] == 'organ'}}">
85 85
   <view class="title-wrap" data-url="/pages/sharingHome/index?{{userInfo['roleType'] == 'sharer'?('shareStatus='+stat.shareStatus):('organStatus='+stat.organStatus)}}" bindtap='navigatorURl'>
86 86
     <view class="title title-link">
87 87
       {{userInfo['roleType'] == 'sharer' ? '分享家中心' : '机构中心'}}
88
-      <text class="gray share-status" wx:if="{{(userInfo['roleType'] == 'sharer' && stat.shareStatus==2)||(userInfo['roleType'] == 'organ' && stat.organStatus==2)}}">已停用</text>
88
+      <text class="gray share-status" tt:if="{{(userInfo['roleType'] == 'sharer' && stat.shareStatus==2)||(userInfo['roleType'] == 'organ' && stat.organStatus==2)}}">已停用</text>
89 89
     </view>
90 90
   </view>
91 91
   <view class="row-flex">
@@ -250,7 +250,7 @@
250 250
   </view>
251 251
 </view>
252 252
 <!-- <view class="septal-top-line setting-line">
253
-  <view class="cell ceill-link cell-media" wx:if="{{(userInfo.roleType == 'sharer' && stat.shareStatus!=2) || (userInfo.roleType == 'organ' && stat.organStatus!=2)}}" data-url="/pages/account/invite/index" bindtap='navigatorURl'>
253
+  <view class="cell ceill-link cell-media" tt:if="{{(userInfo.roleType == 'sharer' && stat.shareStatus!=2) || (userInfo.roleType == 'organ' && stat.organStatus!=2)}}" data-url="/pages/account/invite/index" bindtap='navigatorURl'>
254 254
     <view class="cell-value">
255 255
       <text class='icon icon-bill'></text>
256 256
       <text class="middlee">邀请海报</text>

+ 2 - 2
pages/home/referre.ttml

@@ -20,7 +20,7 @@
20 20
     </view>
21 21
     <view class="center mTop20{{info.roleType == 'sharer' || info.roleType == 'organ' ? '' : ' buttons-row'}}" style="{{info.roleType == 'sharer' || info.roleType == 'organ' ? 'align-items:flex-end':''}}" tt:if="{{userInfo.recomCode.length <= 0}}">
22 22
       <button class="button button-radius button-big button-warn s-button" bindtap='submit'>确定领取</button>
23
-      <!-- <view bindtap='back' class="mTop240 font14" wx:if="{{type != 'account' && (info.roleType == 'sharer' || info.roleType == 'organ')}}">不领跳过 </view> -->
23
+      <!-- <view bindtap='back' class="mTop240 font14" tt:if="{{type != 'account' && (info.roleType == 'sharer' || info.roleType == 'organ')}}">不领跳过 </view> -->
24 24
     </view>
25 25
   </view>
26 26
 </view>
@@ -31,7 +31,7 @@
31 31
   </view>
32 32
   <view class='box'>
33 33
     <view class='box-overflow'>
34
-      <view class='voucher-list white-bg' wx:for="{{vouchers}}" wx:key="*this">
34
+      <view class='voucher-list white-bg' tt:for="{{vouchers}}" tt:key="*this">
35 35
         <view class='price'>
36 36
           <text class='font12'>¥</text>{{item.price}}
37 37
         </view>

+ 26 - 20
pages/order/detail/index.js

@@ -34,6 +34,7 @@ Page({
34 34
     selectIsShow: false, //更多下拉框是否显示
35 35
     toHome: false, //去首页
36 36
     IMShow: false,
37
+    pendingStatus: 0,
37 38
     orderId: '',
38 39
     // 客服抖音号 todo:
39 40
     imId: 'Haimli',
@@ -555,21 +556,19 @@ Page({
555 556
     });
556 557
   },
557 558
   goPay() {
558
-    let that = this,
559
-      btype = 0;
560
-    util.WXPay({
561
-      orderid: this.data.info.orderid,
562
-      btype: that.data.query.presellStatus == 2 ? 0 : that.data.query.presellStatus
563
-    }, this.data.info.aid, this.data.info.title).then(function () {
564
-
565
-      that.data.query.otype = 2;
566
-      that.setData({
567
-        query: that.data.query
568
-      });
569
-      that.getData();
570
-    }, function (msg) {
571
-      utils.showTips(msg);
572
-    });
559
+    let that = this;
560
+    console.log('付款');
561
+    util.TTPay(this.data.info.outTradeNo)
562
+      .then(res => {
563
+        that.data.query.otype = 2;
564
+        that.setData({
565
+          query: that.data.query
566
+        });
567
+        that.getData();
568
+      })
569
+      .catch(err => {
570
+        util.showTips(err.errMsg);
571
+      })
573 572
   },
574 573
   trip(e) {
575 574
     let datas = this.data.info;
@@ -582,13 +581,20 @@ Page({
582 581
     });
583 582
   },
584 583
   scheduling(e) {
585
-    let oid = e.currentTarget.dataset.oid,
586
-      optionId = e.currentTarget.dataset.optionid;
587
-    tt.navigateTo({
588
-      url: '/pages/order/scheduling/scheduling?oid=' + oid + '&optionId=' + optionId
589
-    });
584
+    console.log(e)
585
+    this.setData({
586
+      IMShow: true,
587
+      pendingStatus: e.target.dataset.pendingstatus
588
+    })
590 589
   },
591 590
   refund(e) {
591
+    if (this.data.info.sessionName != '暂不选择') {
592
+      this.setData({
593
+        IMShow: true,
594
+        pendingStatus: 3
595
+      })
596
+      return
597
+    }
592 598
     console.log(e);
593 599
     let index = e.currentTarget.dataset.index;
594 600
     let datas = this.data.info,

+ 40 - 35
pages/order/detail/index.ttml

@@ -8,10 +8,9 @@
8 8
 <view class="bottom">
9 9
   <!-- 底部左侧按钮组 -->
10 10
   <view class="bottom-left" id="bottom-left">
11
-    <view tt:if="{{info.orderStatus==2&&info.atype=='0'}}" class="icon-tab" bindtap="showMore">
11
+    <!-- <view tt:if="{{info.orderStatus==2&&info.atype=='0'}}" class="icon-tab" bindtap="showMore">
12 12
       <view class="more" id="more">
13
-        <!-- 上拉框 -->
14
-        <!-- class="{{((info.verifyStatus!==1&&!info.comment && info.comment == ''&&info.comment.modified !== 0)||(!info.comment && info.comment == ''&&info.comment.modified !== 0))?'select_box':'select_boxTwo select_boxThr'}}" -->
13
+        上拉框
15 14
         <view class="selectBorder" tt:if="{{selectIsShow}}">
16 15
           <view tt:if="{{info.orderStatus==2&&info.timeEnd==1}}" class="select_one" bindtap="invoicing">申请开票</view>
17 16
           <view tt:if="{{info.orderStatus==2&&info.timeEnd==1}}" class="div"></view>
@@ -34,43 +33,41 @@
34 33
           alt />
35 34
         <view class="name">更多</view>
36 35
       </view>
37
-    </view>
36
+    </view> -->
38 37
     <view class='icon-tab' bindtap="jumpPage">
39 38
       <text class="icon icon-home"></text>
40 39
       <view class="name">首页</view>
41 40
     </view>
42 41
     <!-- 客服 -->
43
-    <button tt:if="{{info.orderStatus==2&&info.atype=='0'?false:true}}" open-type="im" data-im-id="{{ imId }}"
44
-      data-im-type="{{imType}}" data-biz-line="{{lineType}}" data-goods-id="{{datas.aid}}" bindim="imCallback"
45
-      class="shareBtn ">
42
+    <button open-type="im" data-im-id="{{ imId }}" data-im-type="{{imType}}" data-biz-line="{{lineType}}"
43
+      data-goods-id="{{datas.aid}}" bindim="imCallback" class="shareBtn ">
46 44
       <text class="icon icon-cus-service"></text>
47 45
       <text class="name">客服</text> </button>
48
-    <view class="icon-tab"
46
+    <!-- <view class="icon-tab"
49 47
       tt:if="{{info.atype!='1' && info.orderStatus==2 && info.detailStopUpdate!=1 && ( info.waitComment!=2 ||(info.comment.additional == 1 && info.comment.modified == 1))}}"
50 48
       bindtap="editOrderDetail">
51 49
       <text class="icon icon-bj"></text>
52 50
       <view class="name">修改信息</view>
53
-    </view>
51
+    </view> -->
54 52
     <view class="icon-tab" tt:if="{{info.orderStatus == 1 && info.waitPayResult!=1}}"
55 53
       data-presellStatus="{{query.presellStatus}}" bindtap="cancelOrder">
56 54
       <text class="icon icon-cancel-order"></text>
57 55
       <view class="name">{{query.presellStatus ==2?'取消支付':'取消订单'}}</view>
58 56
     </view>
59
-    <view class="icon-tab"
57
+    <!-- <view class="icon-tab"
60 58
       tt:if="{{info.orderStatus==2&&info.atype=='0'?false:true&&info.comment && info.comment != ''&&info.comment.modified == 0}}"
61 59
       data-index="1" bindtap="actEvaluate">
62 60
       <text class="icon icon-bj"></text>
63 61
       <view class="name">修改评价</view>
64
-    </view>
62
+    </view> -->
65 63
   </view>
66 64
   <!--—— 底部右侧按钮 ——-->
67 65
   <view class="bottom-right">
68 66
     <!-- 填写退货单号 -->
69
-    <button tt:if="{{info.atype==1&&info.orderStatus==3&&info.subOrders[0].status==6}}"
70
-      class="button button-warn share-group" bindtap="showAddressPopup">填写退货单号</button>
67
+    <!-- <button tt:if="{{info.atype==1&&info.orderStatus==3&&info.subOrders[0].status==6}}"
68
+      class="button button-warn share-group" bindtap="showAddressPopup">填写退货单号</button> -->
71 69
     <!-- 完成支付 -->
72
-    <button class="button button-warn share-group" tt:elif="{{info.orderStatus == 1&& info.waitPayResult != 1}}"
73
-      bindtap="goPay">继续支付</button>
70
+    <button class="button button-warn share-group" tt:if="{{info.orderStatus == 1}}" bindtap="goPay">继续支付</button>
74 71
     <!-- 活动评价 -->
75 72
     <button class="button button-warn share-group"
76 73
       tt:elif="{{info.waitComment == 1&&info.orderStatus!=3&&info.orderStatus!=4&&(query.otype==0||query.otype==3)}}"
@@ -88,22 +85,23 @@
88 85
       tt:elif="{{info.comment.additional == 1 && info.comment.additionalComment.modified == 0&&(query.otype==0||query.otype==3)}}"
89 86
       bindtap="editEvaluate">修改追评</button> -->
90 87
     <!-- 支付尾款 -->
91
-    <button type="warn" tt:elif="{{info.atype == 0 && info.orderStatus ==4 && info.needPayBalance==1}}"
88
+    <!-- <button type="warn" tt:elif="{{info.atype == 0 && info.orderStatus ==4 && info.needPayBalance==1}}"
92 89
       class="button button-warn share-group" data-aid="{{info.aid}}" data-orderid="{{query.orderid}}"
93 90
       data-presellStatus="{{query.presellStatus}}" data-otype="{{query.otype}}" data-campSex="{{info.campSex}}"
94
-      data-military="{{info.military}}" bindtap="jumpBalancePayment">支付尾款</button>
91
+      data-military="{{info.military}}" bindtap="jumpBalancePayment">支付尾款</button> -->
95 92
     <!-- 分享拼团 -->
96
-    <button class="button button-warn share-group"
93
+    <!-- <button class="button button-warn share-group"
97 94
       tt:elif="{{info.orderStatus == 2 && info.groupinfo && info.groupinfo.groupbook == 1 && !info.groupinfo.groupid && query.otype != '3'}}"
98
-      open-type="share">分享拼团</button>
95
+      open-type="share">分享拼团</button> -->
99 96
     <!-- 邀请拼团 -->
100
-    <button class="button button-warn share-group"
97
+    <!-- <button class="button button-warn share-group"
101 98
       tt:elif="{{info.groupinfo && info.groupinfo.discount&&info.groupinfo.groupbook==1&&info.groupinfo.gstatus == 0 && query.otype != '3'}}"
102
-      data-invitefbtn="1" bindtap="inviteGroup">邀请拼团</button>
99
+      data-invitefbtn="1" bindtap="inviteGroup">邀请拼团</button> -->
103 100
     <!-- 邀请好友参加 -->
104
-    <!-- <button class="button button-warn share-group" wx:elif="{{info.atype==0&& info.timeContrast&& info.waitComment != 1 &&((info.groupinfo.groupbook != 1 || (info.groupinfo.groupbook == 1 && info.orderStatus==6)) && (info.orderStatus==2 || (info.orderStatus==4&& info.needPayBalance!=1) || info.orderStatus==6))}}" bindtap="inviteGroup" data-invitefbtn="0">邀请好友</button> -->
105
-    <button class="button button-warn share-group" tt:elif="{{info.orderStatus != 3&&info.timeContrast}}"
106
-      bindtap="inviteGroup" data-invitefbtn="0">邀请好友</button>
101
+    <!-- <button class="button button-warn share-group" tt:elif="{{info.atype==0&& info.timeContrast&& info.waitComment != 1 &&((info.groupinfo.groupbook != 1 || (info.groupinfo.groupbook == 1 && info.orderStatus==6)) && (info.orderStatus==2 || (info.orderStatus==4&& info.needPayBalance!=1) || info.orderStatus==6))}}" bindtap="inviteGroup" data-invitefbtn="0">邀请好友</button> -->
102
+    <!-- <button class="button button-warn share-group" tt:elif="{{info.orderStatus != 3&&info.timeContrast}}"
103
+      bindtap="inviteGroup" data-invitefbtn="0">邀请好友</button> -->
104
+    <button class="button button-warn share-group" tt:else bindtap="inviteGroup" data-invitefbtn="0"></button>
107 105
   </view>
108 106
 </view>
109 107
 <view class="content" style="padding-bottom: 90rpx;">
@@ -178,12 +176,12 @@
178 176
         <view class="cell-title">旅游电子合同</view>
179 177
         <view class="cell-value">
180 178
           <button plain size="mini" type="warn" data-type="电子合同" bindtap="lookContract" data-url="{{info.agreementUrl}}"
181
-            class="button button-radius contract">点击查看</button>
179
+            class="button button-radius contract button-warn button-border">点击查看</button>
182 180
         </view>
183 181
       </view>
184 182
 
185 183
 
186
-      <!-- wx:if="{{info.travelPlanUrl!=null}}" -->
184
+      <!-- tt:if="{{info.travelPlanUrl!=null}}" -->
187 185
       <view class="cell" tt:if="{{info.travelPlanUrl!=null}}">
188 186
         <view class="cell-title">行程单</view>
189 187
         <view class="cell-value">
@@ -257,7 +255,7 @@
257 255
 
258 256
   <view class="content-box-pad white-bg mTop10" tt:if="{{info.atype == 0}}">
259 257
     <view class="order-title order-title-line order-title-button">消费码</view>
260
-    <!-- <button type="warn" wx:if="{{info.orderStatus ==4 && info.needPayBalance==1}}" size="mini" class="button button-radius" data-aid="{{info.aid}}" data-orderid="{{query.orderid}}" data-presellStatus="{{query.presellStatus}}" data-otype="{{query.otype}}" data-campSex="{{info.campSex}}" data-military="{{info.military}}" plain bindtap="jumpBalancePayment">支付尾款</button> -->
258
+    <!-- <button type="warn" tt:if="{{info.orderStatus ==4 && info.needPayBalance==1}}" size="mini" class="button button-radius" data-aid="{{info.aid}}" data-orderid="{{query.orderid}}" data-presellStatus="{{query.presellStatus}}" data-otype="{{query.otype}}" data-campSex="{{info.campSex}}" data-military="{{info.military}}" plain bindtap="jumpBalancePayment">支付尾款</button> -->
261 259
     <view class="sub-order" tt:for="{{info.subOrders}}" tt:key="index">
262 260
       <view class="sub-order-password {{item.status == 1 ? ' link':''}}" bindtap="qrcode" data-status="{{item.status}}"
263 261
         data-password="{{item.password}}">
@@ -273,20 +271,25 @@
273 271
       </view>
274 272
       <view class="sub-order-footer mTop10 right"
275 273
         tt:if="{{item.status == 15 || item.status == 1 || item.status == 6 || info.isManyDay == 1 || item.changeStatus!=2}}">
276
-        <!-- wx:if="{{(item.status == 1 || item.status == 15) && item.canRefund}}" -->
274
+        <!-- tt:if="{{(item.status == 1 || item.status == 15) && item.canRefund}}" -->
275
+        <!-- 已选择排期不可退款 -->
277 276
         <button size="mini" class="button refund button-plain-gray button-radius"
278 277
           tt:if="{{(item.status == 1 || item.status == 15)&& item.canRefund}}" bindtap="refund"
279 278
           data-password="{{item.password}}" data-status="{{item.status}}" data-index="{{index}}">申请退款</button>
280 279
         <button size="mini" class="button cancelRefund button-plain-gray button-radius" tt:if="{{item.status == 6}}"
281 280
           bindtap="cancelRefund" data-password="{{item.password}}">取消退款</button>
282
-        <button size="mini" class="button refund button-plain-gray button-radius" tt:if="{{item.changeStatus!=2}}"
281
+        <!-- <button size="mini" class="button refund button-plain-gray button-radius" tt:if="{{item.changeStatus!=2}}"
283 282
           data-status="{{item.changeStatus}}" data-oid="{{item.oid}}"
284
-          bindtap="changeMeals">{{item.changeStatus==0?'更换场次':'申请中'}}</button>
283
+          bindtap="changeMeals">{{item.changeStatus==0?'更换场次':'申请中'}}</button> -->
285 284
         <button plain size="mini" type="warn" bindtap="lookContract" data-url="{{item.noticeUrl}}"
286 285
           class="button button-radius" tt:if="{{item.noticeUrl}}">营前须知</button>
287
-        <!-- <button size="mini" plain type="warn" class="button button-radius" wx:if="{{info.isManyDay == 1 && item.status == 1}}" bindtap="trip" data-refundpwd="{{item.password}}">补充营员信息</button> -->
288
-        <button size="mini" type="warn" bindtap="scheduling" data-oid="{{item.oid}}" data-optionId="{{item.optionId}}"
289
-          class="button button-radius button-warn" tt:if="{{item.optionId && item.showSchedule==1}}">选择排期</button>
286
+        <!-- <button size="mini" plain type="warn" class="button button-radius" tt:if="{{info.isManyDay == 1 && item.status == 1}}" bindtap="trip" data-refundpwd="{{item.password}}">补充营员信息</button> -->
287
+        <button size="mini" type="warn" bindtap="scheduling" data-pendingStatus="2" data-oid="{{item.oid}}"
288
+          data-optionId="{{item.optionId}}" class="button refund button-plain-gray button-radius"
289
+          tt:if="{{info.sessionName=='暂不选择'&&info.idcardCount<info.num}}">选择排期</button>
290
+        <button size="mini" type="warn" bindtap="scheduling" data-pendingStatus="1" data-oid="{{item.oid}}"
291
+          data-optionId="{{item.optionId}}" class="button refund button-plain-gray button-radius"
292
+          tt:if="{{info.sessionName!='暂不选择'&&info.idcardCount<info.num}}">添加出行人</button>
290 293
       </view>
291 294
     </view>
292 295
   </view>
@@ -336,7 +339,7 @@
336 339
     </view>
337 340
   </view>
338 341
 
339
-  <!-- <view class="content-box-pad white-bg mTop10" wx:if="{{info.expList && info.expList.length > 0}}">
342
+  <!-- <view class="content-box-pad white-bg mTop10" tt:if="{{info.expList && info.expList.length > 0}}">
340 343
     <view class="order-title order-title-line">营员包裹信息</view>
341 344
   </view> -->
342 345
 
@@ -398,7 +401,9 @@
398 401
 <noticePopup show="{{IMShow}}">
399 402
   <view class="popupContent">
400 403
     <view class="contentText">
401
-      <view class="num font14" style="margin: 40rpx 0;">已预约消费码无法申请退款,请联系客服进行处理~</view>
404
+      <view class="num font14" style="margin: 40rpx 0;" tt:if="{{pendingStatus==1}}">请联系客服进行出行人的添加~</view>
405
+      <view class="num font14" style="margin: 40rpx 0;" tt:elif="{{pendingStatus==2}}">请联系客服进行排期选择~</view>
406
+      <view class="num font14" style="margin: 40rpx 0;" tt:else>已预约消费码无法申请退款,请联系客服进行处理~</view>
402 407
       <block>
403 408
         <view class="flex" style="display: flex;width: 100%;">
404 409
           <view class="button button-plain-gray  button-big btnSize" bindtap="cleanIMShow"> 取消

+ 2 - 2
pages/order/detail/index.ttss

@@ -686,9 +686,9 @@
686 686
 }
687 687
 
688 688
 
689
-.button {
689
+/* .button {
690 690
   border-radius: 20rpx;
691
-}
691
+} */
692 692
 
693 693
 .btnSize {
694 694
   width: 30%;

+ 3 - 3
pages/order/editOrderDetail/index.ttml

@@ -106,7 +106,7 @@
106 106
               <view class="red"><text class="codeDetail" bindtap="certificates"><text class="icon icon-alternate red"></text>证件要求</text></view>
107 107
             </view>
108 108
             <view class="aImage">
109
-              <!-- <view wx:if="{{Passporturl==''}}" class="add" bindtap="upPassport"></view> -->
109
+              <!-- <view tt:if="{{Passporturl==''}}" class="add" bindtap="upPassport"></view> -->
110 110
               <view class="addBox" data-index="{{index}}" bindtap="upPassport">
111 111
                 <view tt:if="{{item.passport==''||item.passport==null}}" class="addIcon passIcon">
112 112
                   <text></text>
@@ -131,7 +131,7 @@
131 131
             <view class="childId" tt:if="{{documentType==0}}">
132 132
               <view class="childID_left">
133 133
                 <view class="childOne">
134
-                  <!-- <view wx:if="{{positive==''}}" class="addId" bindtap="upId"></view> -->
134
+                  <!-- <view tt:if="{{positive==''}}" class="addId" bindtap="upId"></view> -->
135 135
                   <view class="icon" data-index="{{index}}" tt:if="{{item.idCardFront==null||item.idCardFront==''}}" bindtap="upId">
136 136
                     <view class="addIcon passIcon area">
137 137
                       <text></text>
@@ -144,7 +144,7 @@
144 144
                   <view class="idDesc">儿童身份证正面</view>
145 145
                 </view>
146 146
                 <view class="childOne2">
147
-                  <!-- <view class="addId" wx:if="{{otherSide==''}}" bindtap="upsideID">
147
+                  <!-- <view class="addId" tt:if="{{otherSide==''}}" bindtap="upsideID">
148 148
       </view> -->
149 149
                   <view class="icon" data-index="{{index}}" tt:if="{{item.idCardBack==null||item.idCardBack==''}}" bindtap="upsideID">
150 150
                     <view class="addIcon passIcon area">

+ 1 - 1
pages/order/feedback/index.ttml

@@ -69,7 +69,7 @@
69 69
         </view>
70 70
       </view>
71 71
     </view>
72
-    <!-- <view class="comment-btn" bindtap="jumpPage" wx:if="{{info.waitComment == 1 ||(info.waitComment == 2&&info.comment.additional==0)}}">立即评价</view> -->
72
+    <!-- <view class="comment-btn" bindtap="jumpPage" tt:if="{{info.waitComment == 1 ||(info.waitComment == 2&&info.comment.additional==0)}}">立即评价</view> -->
73 73
     <button class="comment-btn" tt:if="{{info.waitComment == 0||info.waitComment==1&&info.orderStatus!=3&&info.orderStatus!=4}}" bindtap="actEvaluate">立即评价</button>
74 74
     <!-- <button class="comment-btn" bindtap="actEvaluate">立即评价~</button> -->
75 75
     <!-- 追加评价 -->

+ 15 - 38
pages/order/index/order.js

@@ -37,6 +37,13 @@ Page({
37 37
       IMShow: false
38 38
     })
39 39
   },
40
+  showIm(e) {
41
+    console.log(e)
42
+    this.setData({
43
+      IMShow: true,
44
+      pendingStatus: e.target.dataset.pendingstatus
45
+    })
46
+  },
40 47
   onLoad(options) {
41 48
     console.log(options);
42 49
     this.data.queryData.otype = options.otype || 0;
@@ -173,45 +180,15 @@ Page({
173 180
   },
174 181
   // 立即支付(支付尾款) --待付款状态
175 182
   pay(e) {
176
-    // let that = this;
183
+    let that = this;
177 184
     console.log(e, '付款');
178
-    tt.continueToPay({
179
-      orderId: '', // 内部订单号
180
-      outOrderNo: e.target.dataset.orderid, // 外部订单号 2个订单号必填一个
181
-      success: (res) => {
182
-        const {
183
-          orderId,
184
-          outOrderNo
185
-        } = res;
186
-        console.log("success res", res);
187
-        console.log("orderId", orderId, "outOrderNo", outOrderNo);
188
-      },
189
-      fail: (res) => {
190
-        const {
191
-          orderId,
192
-          outOrderNo,
193
-          errNo,
194
-          errMsg,
195
-          errLogId
196
-        } = res;
197
-        if (errLogId) {
198
-          console.log("查询订单信息失败", errNo, errMsg, errLogId);
199
-        }
200
-        if (orderId || outOrderNo) {
201
-          console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
202
-        }
203
-      },
204
-    });
205
-
206
-    // let presellstatus = e.currentTarget.dataset.presellstatus;
207
-    // util.WXPay({
208
-    //   orderid: e.target.dataset.orderid,
209
-    //   btype: presellstatus == 2 ? 0 : presellstatus
210
-    // }, that.data.aid, that.data.title).then(function () {
211
-    //   that.getList(false);
212
-    // }, function (res) {
213
-    //   if (res.code != 0) util.showTips(res.reason);
214
-    // });
185
+    util.TTPay(e.target.dataset.outtradeno)
186
+      .then(res => {
187
+        that.getList(false);
188
+      })
189
+      .catch(err => {
190
+        util.showTips(err.errMsg);
191
+      })
215 192
   },
216 193
   errorImg(e) {
217 194
     this.data.list[e.currentTarget.dataset.index].logo = "/images/noimg.png";

+ 18 - 18
pages/order/index/order.ttml

@@ -41,9 +41,9 @@
41 41
           <text class="font12 black">
42 42
             {{item.atype == 0 ? '场次':'颜色'}}:{{item.sessionName}}
43 43
             {{item.atype == 0 ? (item.military == 1?'排':'套餐'):'尺寸'}}:<block tt:for="{{item.meals}}" tt:for-index="i"
44
-              tt:for-item="itemName" tt:key="i">{{item.sessionName=='暂不选择'?'暂不选择':itemName.policyName}} <text
45
-                tt:if="{{item.military == 1}}">({{item.campSex==0?'仅女生可报':(item.campSex==1?'仅男生可报':'不限性别')}})</text>
46
-              <text wx:if="{{item.sessionName!='暂不选择}}">({{itemName.num}})</text>
44
+              tt:for-item="itemName" tt:key="i">{{item.sessionName=='暂不选择'?'暂不选择':itemName.policyName}}
45
+              <text tt:if="{{item.military == 1}}">({{item.campSex==0?'仅女生可报':(item.campSex==1?'仅男生可报':'不限性别')}})</text>
46
+              <text tt:if="{{item.sessionName!='暂不选择'}}">({{itemName.num}})</text>
47 47
             </block>
48 48
             <text class="r-float red">¥<text class="font16">{{item.price}}</text></text>
49 49
           </text>
@@ -56,8 +56,9 @@
56 56
       <!-- <button size="mini" class="button button-plain-gray button-radius"
57 57
         tt:if="{{item.status==1 && item.presellStatus != 2 && item.waitPayResult!=1}}" bindtap="cancelOrder"
58 58
         data-orderid="{{item.orderid}}">取消订单</button> -->
59
+
59 60
       <button plain size="mini" type="warn" class="button button-radius"
60
-        tt:if="{{item.status==1 && item.waitPayResult!=1}}" bindtap="pay" data-orderid="{{item.orderid}}"
61
+        tt:if="{{item.status==1 && item.waitPayResult!=1}}" bindtap="pay" data-outTradeNo="{{item.outTradeNo}}"
61 62
         data-presellStatus="{{item.presellStatus}}" data-status="item.status">{{item.presellStatus == 0 ?
62 63
         '我要付款':(item.presellStatus == 2 ? '支付尾款':'支付预付金')}}</button>
63 64
       <block tt:elif="{{item.status == 13 }}">
@@ -78,24 +79,23 @@
78 79
           </navigator>
79 80
         </block>
80 81
       </block>
81
-      <block
82
-        tt:elif="{{(item.groupbook == 1 &&  item.status == 2 && (item.presellStatus == 0||item.presellStatus == 2)) || (item.groupbook == 1 && item.status == 13 && item.needPayBalance==0)}}">
82
+      <!-- 待参加 -->
83
+      <block tt:elif="{{item.status == 2&&item.idcardCount<item.num }}">
84
+        <button plain size="mini" type="warn" class="button button-radius invite-group"
85
+          tt:if="{{item.sessionName != '暂不选择'&&item.idcardCount<item.num}}" data-info="{{item}}"
86
+          data-title="{{item.atitle}}" data-aid="{{item.aid}}" data-sid="{{item.sid}}" data-orderid="{{item.orderid}}"
87
+          data-logo="{{item.logo}}" data-pendingStatus="1" bindtap="showIm">添加出行人</button>
83 88
         <button plain size="mini" type="warn" class="button button-radius invite-group"
84
-          tt:if="{{(item.groupbook == 1 &&  item.status == 2 && (item.presellStatus == 0||item.presellStatus == 2)) || (item.groupbook == 1 && item.status == 13 && item.needPayBalance==0)}}"
85
-          data-info="{{item}}" data-title="{{item.atitle}}" data-aid="{{item.aid}}" data-sid="{{item.sid}}"
86
-          data-orderid="{{item.orderid}}" data-logo="{{item.logo}}" data-inviteFbtn="1"
87
-          bindtap="inviteGroup">添加出行人</button>
89
+          tt:elif="{{item.sessionName == '暂不选择'&&item.idcardCount<item.num}}" data-info="{{item}}"
90
+          data-title="{{item.atitle}}" data-aid="{{item.aid}}" data-sid="{{item.sid}}" data-orderid="{{item.orderid}}"
91
+          data-logo="{{item.logo}}" data-status="{{item.status}}" data-pendingStatus="2" bindtap="showIm">选择排期</button>
88 92
       </block>
89
-      <button plain size="mini" type="warn" class="button button-radius invite-group"
90
-        tt:elif="{{item.atype==0&& item.timeContrast &&item.groupbook != 1 && (item.status == 2  && (item.presellStatus == 0||item.presellStatus == 2) || (item.status == 13 && item.needPayBalance==0))}}"
91
-        data-info="{{item}}" data-title="{{item.atitle}}" data-aid="{{item.aid}}" data-sid="{{item.sid}}"
92
-        data-orderid="{{item.orderid}}" data-logo="{{item.logo}}" data-status="{{item.status}}" data-inviteFbtn="0"
93
-        bindtap="inviteGroup">选择排期</button>
93
+
94 94
       <block tt:elif="{{item.status == 3}}">
95 95
         <text tt:if="{{item.atype == 0}}">评价后可随机获得50~100枚宝贝币</text>
96 96
         <button bindtap="comment" data-orderid="{{item.orderid}}" plain size="mini" type="warn"
97 97
           class="button button-radius comment" tt:if="{{item.status == 3}}">立即评价
98
-          <!-- <text class="badge--fixed" wx:if="{{item.atype == 0}}">+50~100</text> -->
98
+          <!-- <text class="badge--fixed" tt:if="{{item.atype == 0}}">+50~100</text> -->
99 99
         </button>
100 100
       </block>
101 101
       <button plain size="mini" type="warn" class="button button-radius cancel-refund"
@@ -115,13 +115,13 @@
115 115
 <view class='noData' hidden='{{list.length > 0}}'><text class="icon icon-info"></text><text>~没有相关订单~</text></view>
116 116
 <view class='load-more' hidden="{{loadMore}}">下面没有了哦</view>
117 117
 <!-- 底部悬浮关注服务号 -->
118
-<bottomSuspension></bottomSuspension>
118
+<!-- <bottomSuspension></bottomSuspension> -->
119 119
 
120 120
 <!-- 弹窗 -->
121 121
 <noticePopup show="{{IMShow}}">
122 122
   <view class="popupContent">
123 123
     <view class="contentText">
124
-      <view class="num" style="margin: 40rpx 0;">{{pendingStatus?'请联系客服进行排期选择~':'请联系客服进行出行人的添加~'}}</view>
124
+      <view class="num" style="margin: 40rpx 0;">{{pendingStatus!=1?'请联系客服进行排期选择~':'请联系客服进行出行人的添加~'}}</view>
125 125
       <block>
126 126
         <view class="flex" style="display: flex;width: 100%;">
127 127
           <view class="button button-plain-gray  button-big btnSize" bindtap="cleanIMShow"> 取消

+ 11 - 0
pages/order/index/order.ttss

@@ -133,6 +133,17 @@
133 133
   font-size: 20rpx;
134 134
 }
135 135
 
136
+.button::after {
137
+  border: none;
138
+}
139
+
140
+.button {
141
+  background-color: #fff;
142
+  color: #ee3a43;
143
+  border: 1px solid #ee3a43;
144
+  border-radius: 40rpx !important;
145
+}
146
+
136 147
 navigator {
137 148
   display: flex;
138 149
   align-items: center;

+ 4 - 4
pages/order/invoicingDetail/index.ttml

@@ -44,21 +44,21 @@
44 44
   <!-- 公司名称 -->
45 45
   <view class="invoicType">
46 46
     <view class="type">公司名称</view>
47
-    <!-- wx:if="{{invoiceDetail.status==1||invoiceDetail.status==2}}" -->
47
+    <!-- tt:if="{{invoiceDetail.status==1||invoiceDetail.status==2}}" -->
48 48
     <view class="typeInfo">{{invoiceOneDetail.company}}</view>
49
-    <!-- <input wx:if="{{invoiceDetail.status!==2}}" bindinput="bindinput" data-type="email" class="typeInput" type="text" value="{{invoiceOneDetail.company?invoiceOneDetail.company:''}}" placeholder="请填写电子邮箱" placeholder-style="font-size:22rpx;color: #959595;" /> -->
49
+    <!-- <input tt:if="{{invoiceDetail.status!==2}}" bindinput="bindinput" data-type="email" class="typeInput" type="text" value="{{invoiceOneDetail.company?invoiceOneDetail.company:''}}" placeholder="请填写电子邮箱" placeholder-style="font-size:22rpx;color: #959595;" /> -->
50 50
   </view>
51 51
   <!-- 税号 -->
52 52
   <view class="invoicType">
53 53
     <view class="type">税号</view>
54 54
     <view class="typeInfo">{{invoiceOneDetail.dutyNumber}}</view>
55
-    <!-- <input wx:if="{{invoiceDetail.status!==2}}" bindinput="bindinput" data-type="email" class="typeInput" type="text" value="{{invoiceOneDetail.dutyNumber?invoiceOneDetail.dutyNumber:''}}" placeholder="请填写税号" placeholder-style="font-size:22rpx;color: #959595;" /> -->
55
+    <!-- <input tt:if="{{invoiceDetail.status!==2}}" bindinput="bindinput" data-type="email" class="typeInput" type="text" value="{{invoiceOneDetail.dutyNumber?invoiceOneDetail.dutyNumber:''}}" placeholder="请填写税号" placeholder-style="font-size:22rpx;color: #959595;" /> -->
56 56
   </view>
57 57
   <!-- 接收邮箱 -->
58 58
   <view class="invoicEmail">
59 59
     <view class="type">接收邮箱</view>
60 60
     <view class="typeInfo">{{invoiceOneDetail.email}}</view>
61
-    <!-- <input wx:if="{{invoiceDetail.status==2}}" bindinput="bindinput" data-type="email" class="typeInput" type="text" value="{{invoiceOneDetail.email?invoiceOneDetail.email:''}}" placeholder="请填写邮箱" placeholder-style="font-size:22rpx;color: #959595;" /> -->
61
+    <!-- <input tt:if="{{invoiceDetail.status==2}}" bindinput="bindinput" data-type="email" class="typeInput" type="text" value="{{invoiceOneDetail.email?invoiceOneDetail.email:''}}" placeholder="请填写邮箱" placeholder-style="font-size:22rpx;color: #959595;" /> -->
62 62
   </view>
63 63
 </view>
64 64
 

+ 71 - 170
pages/order/refund/refund.js

@@ -16,7 +16,7 @@ Page({
16 16
     groupId: '',
17 17
     reasonList: [],
18 18
     reasonIndex: 0,
19
-    default: "请选择 >",
19
+    defaultText: "请选择 >",
20 20
     // 控制sku
21 21
     showSku: false,
22 22
     refundShow: false,
@@ -250,7 +250,7 @@ Page({
250 250
           that.updateTime();
251 251
         }
252 252
       } else
253
-      util.showTips(res.reason);
253
+        util.showTips(res.reason);
254 254
     });
255 255
   },
256 256
   // 默认评价弹窗
@@ -345,14 +345,7 @@ Page({
345 345
 
346 346
 
347 347
   },
348
-  onShow() {
349
-
350
-    // if (this.data.atype != "1") {
351
-    //   this.OrderInfo();
352
-    //   this.getData1();
353
-    // }
354
-
355
-  },
348
+  onShow() {},
356 349
   // 切换退款原因
357 350
   changeReason(e) {
358 351
     console.log(e.detail.value);
@@ -369,7 +362,7 @@ Page({
369 362
     this.data.reasonIndex = e.detail.value;
370 363
     this.setData({
371 364
       reasonIndex: this.data.reasonIndex,
372
-      default: this.data.reasonList[this.data.reasonIndex]
365
+      defaultText: this.data.reasonList[this.data.reasonIndex]
373 366
     });
374 367
   },
375 368
   getData() {
@@ -385,19 +378,20 @@ Page({
385 378
     }, function (res) {
386 379
       if (res.code == 0) {
387 380
         let reasonData = [];
388
-        if (res.data.atype == '1') {//电商
381
+        if (res.data.atype == '1') { //电商
389 382
           reasonData = [{
390
-            type: 5,
391
-            txt: '不喜欢/不想要'
392
-          },
393
-          {
394
-            type: 6,
395
-            txt: '质量问题'
396
-          },
397
-          {
398
-            type: 0,
399
-            txt: '其他原因'
400
-          }];
383
+              type: 5,
384
+              txt: '不喜欢/不想要'
385
+            },
386
+            {
387
+              type: 6,
388
+              txt: '质量问题'
389
+            },
390
+            {
391
+              type: 0,
392
+              txt: '其他原因'
393
+            }
394
+          ];
401 395
 
402 396
         } else {
403 397
           if (that.data.status == 15) {
@@ -407,21 +401,22 @@ Page({
407 401
             }], current = 4;
408 402
           } else {
409 403
             reasonData = [{
410
-              type: 1,
411
-              txt: '行程有变'
412
-            },
413
-            {
414
-              type: 2,
415
-              txt: '买多了/买错了'
416
-            },
417
-            {
418
-              type: 3,
419
-              txt: '孩子突发身体原因'
420
-            },
421
-            {
422
-              type: 0,
423
-              txt: '其他原因'
424
-            }];
404
+                type: 1,
405
+                txt: '行程有变'
406
+              },
407
+              {
408
+                type: 2,
409
+                txt: '买多了/买错了'
410
+              },
411
+              {
412
+                type: 3,
413
+                txt: '孩子突发身体原因'
414
+              },
415
+              {
416
+                type: 0,
417
+                txt: '其他原因'
418
+              }
419
+            ];
425 420
 
426 421
 
427 422
           }
@@ -430,16 +425,14 @@ Page({
430 425
           console.log(item);
431 426
           that.data.reasonList.push(item.txt);
432 427
         });
433
-        if (reasonData.length == 1) {
434
-          that.data.default = "候补退款";
435
-        }
428
+
436 429
         that.setData({
437
-          default: that.data.default,
438 430
           datas: res.data,
439 431
           reasonData,
440 432
           current: reasonData[0].type,
441 433
           reasonList: that.data.reasonList
442 434
         });
435
+        console.log(that.data.defaultText, 7)
443 436
       }
444 437
     });
445 438
   },
@@ -468,150 +461,58 @@ Page({
468 461
   },
469 462
   refundRequest() {
470 463
     let that = this,
471
-      reason = this.data.reason,
472 464
       current = this.data.current;
473
-    console.log(current);
474
-    let type = 0;
475
-    if (this.data.default == "行程有变") {
476
-      type = 1;
477
-    } else if (this.data.default == "买多了/买错了") {
478
-      type = 2;
479
-    } else if (this.data.default == "孩子突发身体原因") {
480
-      type = 3;
481
-    } else if (this.data.default == "其他原因") {
482
-      type = 0;
483
-
484
-    } else if (this.data.default == "候补退款") {
485
-      type = 4;
486
-    } else if (this.data.default == "质量问题") {
487
-      type = 6;
488
-    } else if (this.data.default == "不喜欢/不想要") {
489
-      type = 5;
490
-    }
491
-    if (this.data.default == "请选择 >" || type == -1) {
465
+    console.log(current, 78787);
466
+    if (this.data.defaultText == "请选择 >") {
492 467
       util.showTips("请选择退款原因");
493 468
       return false;
494 469
     }
495
-    if (this.data.showtext == true && util.isEmpty(reason)) {
470
+    if (this.data.showtext == true && util.isEmpty(this.data.reason)) {
496 471
       util.showTips("请填写退款原因");
497 472
       return false;
498 473
     }
499
-    if (current == 0 && reason == '') {
500
-      util.showTips('请输入退款原因。');
501
-      return false;
502
-    }
503
-    if (this.data.dayBeforeStart <= 0) {
504
-      util.showTips("活动已开始,无法提交退款申请");
505
-      tt.navigateBack({
506
-        delta: 1
507
-      });
508
-      return;
509
-    }
510
-    if (this.data.current == 1 && this.data.orderInfo.overdue == 1) {
511
-      if (util.isEmpty(this.data.AlipayNum)) {
512
-        util.showTips("支付宝户号不能为空");
513
-        return;
514
-      }
515
-      if (util.isEmpty(this.data.accountNum)) {
516
-        util.showTips("支付宝账号不能为空");
517
-        return;
518
-      }
519
-    } else if (this.data.current == 2 && this.data.orderInfo.overdue == 1) {
520
-      if (util.isEmpty(this.data.carName)) {
521
-        util.showTips("卡户名不能为空");
522
-        return;
523
-      }
524
-      if (util.isEmpty(this.data.bankName)) {
525
-        util.showTips("银行名称不能为空");
526
-        return;
527
-      }
528
-      if (util.isEmpty(this.data.BankcardNo)) {
529
-        util.showTips("银行卡号不能为空");
530
-        return;
531
-      }
532
-      if (util.isEmpty(this.data.Bankofdeposit)) {
533
-        util.showTips("开户行不能为空");
534
-        return;
535
-      }
536
-    }
537
-    let desc = "";
538
-    if (this.data.current == 1) {
539
-      desc = "支付宝";
540
-    } else if (this.data.current == 2) {
541
-      desc = "银行卡";
542
-    }
543
-    console.log(that.data.orderInfo);
544 474
     util.ajax({
545
-      func: "order/commit_refund",
475
+      func: "tiktok/order/preRefund/detail",
546 476
       data: {
547
-        "reasonType": type,
548
-        "reason": reason,
549
-        "orderid": that.data.orderid,
550
-        "password": that.data.refundpwd || "",
551
-        "type": '0',
552
-        "priceInfo": that.data.orderInfo,
553
-
554
-        "receiveAccount": that.data.orderInfo.overdue == 0 ? '' : that.data.current == 1 ? "支付宝" + "    " + that.data.AlipayNum + "    " + that.data.accountNum : "银行卡" + "    " + that.data.carName + "    " + that.data.bankName + "    " + that.data.BankcardNo + "    " + that.data.Bankofdeposit
555
-      },
556
-      method: "POST",
557
-      load: true,
558
-      title: '提交中'
477
+        "oid": that.data.oid
478
+      }
559 479
     }, function (res) {
560 480
       console.log(res);
561 481
       if (res.code == 0) {
562
-        tt.setStorageSync('_REFUND_', 'REFUND');
563
-        that.setData({
564
-          refundBack: res.reason,
565
-          mask: true
566
-        });
567
-      } else if (res.code == -10) {
568
-        tt.showModal({
569
-          title: "提示",
570
-          content: res.reason,
571
-          success(res) {
572
-            if (res.confirm) {
573
-              tt.navigateBack({
574
-                delta: 1
575
-              });
576
-            } else if (res.cancel) {
577
-              console.log('用户点击取消');
578
-            }
579
-          }
580
-        });
581
-      } else if (res.code == -11) {
582
-        tt.showModal({
583
-          title: "提示",
584
-          content: res.reason,
585
-          showCancel: false,
586
-          success: function (res) {
587
-            if (res.confirm) {
588
-              that.onLoad({
589
-                index: that.data.index,
590
-                oid: that.data.oid,
591
-                refundpwd: that.data.refundpwd,
592
-                orderid: that.data.orderid,
593
-                status: that.data.refundStatus,
594
-                groupId: that.data.groupid || ''
595
-              });
596
-              // that.onReady()
597
-            }
598
-          }
482
+        tt.applyRefund({
483
+          refundInfo: {
484
+            reason: [this.data.defaultText], // 退款理由 必填
485
+            note: this.data.reason, // 备注 非必填
486
+          },
487
+          outOrderNo: this.data.datas.outTradeNo, // 外部订单号 必填
488
+          itemOrderList: [res.data],
489
+          success: res => {
490
+            that.setData({
491
+              mask: true
492
+            });
493
+            const {
494
+              orderId,
495
+              outOrderNo,
496
+              refundId
497
+            } = res;
498
+            console.log('申请退款成功');
499
+            console.log('orderId', orderId, 'outRefundNo', outRefundNo, 'refundId', refundId);
500
+          },
501
+          fail: res => {
502
+            const {
503
+              errNo,
504
+              errMsg,
505
+              errLogId
506
+            } = res;
507
+            util.showTips(errMsg);
508
+            console.log('申请失败', errNo, errMsg, errLogId);
509
+          },
599 510
         });
600 511
       } else {
601
-        tt.showModal({
602
-          title: "提示",
603
-          content: res.reason,
604
-          showCancel: false,
605
-          success: function (res) {
606
-            if (res.confirm) {
607
-              tt.navigateBack({
608
-                delta: 1
609
-              });
610
-            }
611
-          }
612
-        });
512
+        util.showTips(res.reason);
613 513
       }
614 514
     });
515
+
615 516
   },
616 517
   onReady() {
617 518
 

+ 1 - 1
pages/order/refund/refund.ttml

@@ -16,7 +16,7 @@
16 16
     <view class="reason">
17 17
       <view>退款原因:</view>
18 18
       <picker bindchange="changeReason" value="{{reasonIndex}}" range="{{reasonList}}">
19
-        <view class="grey">{{default}}</view>
19
+        <view class="grey">{{defaultText}}</view>
20 20
       </picker>
21 21
     </view>
22 22
     <textarea tt:if="{{showtext == true }}" class="textarea" bindinput="confirm" placeholder="请填写原因"></textarea>

+ 2 - 2
pages/order/scratch/scratch.ttml

@@ -23,7 +23,7 @@
23 23
 		</view>
24 24
 	</view>
25 25
 	<!-- <view class="scarTit">每次活动评价后获得一次刮奖机会</view>
26
-	<view class="scratch" wx:if="{{isGet}}">
26
+	<view class="scratch" tt:if="{{isGet}}">
27 27
 		<image class="column img-one" src="/images/1.png"></image>
28 28
 		<image class="column img-two" src="/images/2.png"></image>
29 29
 		<view class="column prize">
@@ -35,7 +35,7 @@
35 35
 	        bindtouchstart="touchStart"
36 36
 	        bindtouchmove="touchMove"
37 37
 	        bindtouchend="touchEnd"
38
-	        wx:if="{{flag}}">
38
+	        tt:if="{{flag}}">
39 39
 	    </canvas>
40 40
 	</view> -->
41 41
 </view>

+ 2 - 2
pages/product/Previous/index.ttml

@@ -15,7 +15,7 @@
15 15
 
16 16
 <view class="image_box">
17 17
   <view tt:if="{{isshare==1&&scrollTop < 120}}" bindtap='backHome' class='icon-home backHome'></view>
18
-  <!-- wx:if="{{scrollTop <320}}" -->
18
+  <!-- tt:if="{{scrollTop <320}}" -->
19 19
   <view tt:if="{{isshare==0&&scrollTop < 120}}" class='leftBack' bindtap="backJT"></view>
20 20
   <image class="{{scrollTop > 100 ? 'unxiangqi':'xiangqi'}} TopImage" src="{{topImgText.historyBgImage}}" mode="widthFix"></image>
21 21
   <view class="title">
@@ -41,7 +41,7 @@
41 41
       <!-- 图片 -->
42 42
       <image mode="aspectFill" bindtap="previewImage" data-index="{{index}}" tt:if="{{item.type==4}}" data-imgurl="{{item.logo}}" class="image" src="{{item.logo}}?x-oss-process=image/resize,m_fill,w_400,h_400"></image>
43 43
       <view tt:if="{{item.type==3||item.type==2}}" class="{{[index%15==0?'icon icon-video-play iconAdd2':'icon icon-video-play iconAdd']}}"></view>
44
-      <!-- <image wx:if="{{item.type==4}}" class="{{[index%15==0?'lfImg':'img']}}" src="https://img.bbztx.com/image_test/upload/thumbs/20230227/logo/1677472021719085091.png" mode="" /> -->
44
+      <!-- <image tt:if="{{item.type==4}}" class="{{[index%15==0?'lfImg':'img']}}" src="https://img.bbztx.com/image_test/upload/thumbs/20230227/logo/1677472021719085091.png" mode="" /> -->
45 45
     </view>
46 46
     <view class="box"></view>
47 47
   </view>

+ 2 - 2
pages/product/activity/index.ttml

@@ -91,7 +91,7 @@
91 91
           <image src="{{datas.logo}}" class="slide-image" width="355" height="150" />
92 92
         </swiper-item>
93 93
       </block>
94
-      <!-- <view class="act-tip" wx:if="{{userInfo.roleType=='sharer'&& userInfo.shareStatus==1&&datas.shareCommission>0}}">邀约好友报名 最高可赚{{datas.shareCommission}}元</view> -->
94
+      <!-- <view class="act-tip" tt:if="{{userInfo.roleType=='sharer'&& userInfo.shareStatus==1&&datas.shareCommission>0}}">邀约好友报名 最高可赚{{datas.shareCommission}}元</view> -->
95 95
     </swiper>
96 96
     <view class="product-info-line" style="{{datas.qptype == 1 ? 'padding:0':''}}">
97 97
       <!-- 拼团 -->
@@ -309,7 +309,7 @@
309 309
         <image mode="aspectFill" bindtap="actPreviewImage" data-index="{{index}}" data-imgurl="{{item.logo}}"
310 310
           class="bottom_li" src="{{item.logo}}" tt:if="{{item.type==4}}"></image>
311 311
         <view tt:if="{{item.type==3||item.type==2}}" class="icon icon-video-play iconAdd"></view>
312
-        <!-- <image wx:if="{{item.type==4}}" class="img" src="https://img.bbztx.com/image_test/upload/202302/imgicon.png" mode="" /> -->
312
+        <!-- <image tt:if="{{item.type==4}}" class="img" src="https://img.bbztx.com/image_test/upload/202302/imgicon.png" mode="" /> -->
313 313
       </view>
314 314
     </view>
315 315
   </view>

+ 3 - 3
pages/product/component/goodsSku.ttml

@@ -4,8 +4,8 @@
4 4
   <!-- <view class="sku-header">
5 5
     <view class="sku-header__goods-info">
6 6
       <view class="sku__goods-name ellipsis">{{info.title}}</view>
7
-      <view class="sku__goods-price" wx:if="{{presellOpen==0}}">¥{{sku.price}}</view>
8
-      <view wx:if="{{presellOpen != 0}}">
7
+      <view class="sku__goods-price" tt:if="{{presellOpen==0}}">¥{{sku.price}}</view>
8
+      <view tt:if="{{presellOpen != 0}}">
9 9
         <view>预付金:<text class="sku__goods-price">¥{{sku.presellPrice}}</text></view>
10 10
         <view>活动价:<text class="sku__goods-price">¥{{sku.price}}</text></view>
11 11
       </view>
@@ -39,7 +39,7 @@
39 39
           <view class="stepper__plus {{initialSku.selectedNum>=sku.stock_num?'stepper__plus__diabled':(initialSku.selectedNum >= sku.maxT?'stepper__plus__diabled':'')}}" data-type="plus" bindtap="quantity"></view>
40 40
         </view>
41 41
       </view>
42
-      <!-- <view class="van-sku__quota" wx:if="{{sku.maxT <= sku.quota}}">每人限购{{sku.maxT}}件</view> -->
42
+      <!-- <view class="van-sku__quota" tt:if="{{sku.maxT <= sku.quota}}">每人限购{{sku.maxT}}件</view> -->
43 43
       <view class="van-sku__quota">
44 44
         <view class="sku-price">¥{{sku.price}}</view>
45 45
       </view>

+ 4 - 4
pages/product/goods/detail.ttml

@@ -11,10 +11,10 @@
11 11
   <button class="button button-white" bindtap="chat">
12 12
     <text class="middle icon-chat font20 red"></text><text class="middle"> 咨询</text>
13 13
   </button>
14
-  <view class="button button-warn" bindtap="goPay" wx:if="{{datas.status == 0 && datas.canbuy == 0}}">立即购买</view>
15
-  <view class="button disabled" wx:if="{{datas.status == 0 && datas.canbuy != 0}}">立即购买</view>
16
-  <view class="button disabled" wx:if="{{datas.status == 2}}">已满额</view>
17
-  <view class="button disabled" wx:if="{{datas.status == 3}}">已下架</view>
14
+  <view class="button button-warn" bindtap="goPay" tt:if="{{datas.status == 0 && datas.canbuy == 0}}">立即购买</view>
15
+  <view class="button disabled" tt:if="{{datas.status == 0 && datas.canbuy != 0}}">立即购买</view>
16
+  <view class="button disabled" tt:if="{{datas.status == 2}}">已满额</view>
17
+  <view class="button disabled" tt:if="{{datas.status == 3}}">已下架</view>
18 18
 </view> -->
19 19
 <!-- 底部按钮 -->
20 20
 <view class="barOnBottom ">

+ 1 - 1
pages/product/goods/index.ttml

@@ -21,7 +21,7 @@
21 21
 		<goodList list="{{dataList}}" updateLoading="{{updateLoading}}" goodsTypeId="{{typeTid}}" isAllLoaded="{{isHideLoadMore}}"></goodList>
22 22
 	</scroll-view>
23 23
 </view>
24
-<!-- <view class='load-more' wx:if="{{isHideLoadMore}}">下面没有了哦</view> -->
24
+<!-- <view class='load-more' tt:if="{{isHideLoadMore}}">下面没有了哦</view> -->
25 25
 <navigator class="common_fix common_home" tt:if="{{currentPages == 1}}" open-type="reLaunch" url="/pages/home/index" hover-class="none">
26 26
 	<text class="icon icon-home"></text>
27 27
 </navigator>

+ 5 - 5
pages/sharingHome/shareCash.ttml

@@ -4,9 +4,9 @@
4 4
   <view class="content-box content-pad">
5 5
     <view class="font12 cash-text rule-text-line">
6 6
       <view class="font16">- 提现说明 -</view>
7
-      <view class="font14 m-top5" wx:if="{{info.userRoleType=='sharer'}}">满<text class="red">{{info.maxCashCoin}}元</text>可提现,满<text class="red">{{info.maxUseCoin}}元</text>购买活动可抵扣</view>
8
-      <view wx:else>可抵扣活动,满<text class="red">{{info.organCashCoin}}</text>元可提现。</view>
9
-      <view class="font14 m-top5" wx:if="{{info.userRoleType == 'sharer'}}">每月累计提现超<text class="red">800元</text>,需扣除20%个人所得税</view>
7
+      <view class="font14 m-top5" tt:if="{{info.userRoleType=='sharer'}}">满<text class="red">{{info.maxCashCoin}}元</text>可提现,满<text class="red">{{info.maxUseCoin}}元</text>购买活动可抵扣</view>
8
+      <view tt:else>可抵扣活动,满<text class="red">{{info.organCashCoin}}</text>元可提现。</view>
9
+      <view class="font14 m-top5" tt:if="{{info.userRoleType == 'sharer'}}">每月累计提现超<text class="red">800元</text>,需扣除20%个人所得税</view>
10 10
     </view>
11 11
     <view class='list-block'>
12 12
       <view class='item-content'>
@@ -23,7 +23,7 @@
23 23
           <label class="radio"><radio value="2" color="#EE3A43" checked="{{payType == 2 ? true:false}}"/>银行卡</label>
24 24
         </radio-group>
25 25
       </view>
26
-      <block wx:if="{{payType == 0}}">
26
+      <block tt:if="{{payType == 0}}">
27 27
         <view class='item-content'>
28 28
           <view class='item-title label'>支付宝姓名:</view>
29 29
           <view class='item-input'>
@@ -43,7 +43,7 @@
43 43
           </view>
44 44
         </view>
45 45
       </block>
46
-      <block wx:else>
46
+      <block tt:else>
47 47
         <view class='item-content'>
48 48
           <view class='item-title label'>姓名:</view>
49 49
           <view class='item-input'>

+ 2 - 2
pages/turntable/hairpin/index.ttml

@@ -5,8 +5,8 @@
5 5
     请上传真实发圈截图,请勿虚假上传,一经查实,取消抽奖资格。若有疑问请联系客服。
6 6
   </view>
7 7
   <view class="body">
8
-    <view class="add_btn" wx:if="{{!picture}}" bindtap="selectPic">+</view>
9
-    <view class="pictureView" wx:else>
8
+    <view class="add_btn" tt:if="{{!picture}}" bindtap="selectPic">+</view>
9
+    <view class="pictureView" tt:else>
10 10
       <view class="deleteIcon" bindtap="deletPic">X</view>
11 11
       <image src="{{picture}}" mode="widthFix"></image>
12 12
     </view>

File diff suppressed because it is too large
+ 1131 - 161
static/common.ttss


+ 1 - 1
static/font.ttss

@@ -200,7 +200,7 @@
200 200
   content: "\e96b";
201 201
   color: #ee3a43;
202 202
 }
203
-.icon-wx::before {
203
+.icon-tt::before {
204 204
   content: "\e96c";
205 205
   color: #01913a;
206 206
 }

+ 61 - 192
utils/util.js

@@ -178,7 +178,9 @@ module.exports = {
178 178
     return new Promise(function (resolve, reject) {
179 179
       that.ajax({
180 180
         func: 'v2/user/stat',
181
-        data:{tiktokOrder:1},
181
+        data: {
182
+          tiktokOrder: 1
183
+        },
182 184
         load: false
183 185
       }, (res) => {
184 186
         if (res.code == 0) {
@@ -199,14 +201,15 @@ module.exports = {
199 201
       tt.navigateTo({
200 202
         url: url
201 203
       });
202
-    } else {
203
-      // 静默登录
204
-      this.silentLogin().then((res) => {
205
-        tt.navigateTo({
206
-          url: url
207
-        });
208
-      });
209 204
     }
205
+    // else {
206
+    //   // 静默登录
207
+    //   this.silentLogin().then((res) => {
208
+    //     tt.navigateTo({
209
+    //       url: url
210
+    //     });
211
+    //   });
212
+    // }
210 213
   },
211 214
   isTimeLeng(val) {
212 215
     var s = val.toString();
@@ -271,38 +274,38 @@ module.exports = {
271 274
       do {
272 275
         c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
273 276
       } while (
274
-      i < len && c1 == -1);
277
+        i < len && c1 == -1);
275 278
       if (c1 == -1)
276
-      break;
279
+        break;
277 280
       /* c2 */
278 281
       do {
279 282
         c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
280 283
       } while (
281
-      i < len && c2 == -1);
284
+        i < len && c2 == -1);
282 285
       if (c2 == -1)
283
-      break;
286
+        break;
284 287
       out += String.fromCharCode(c1 << 2 | (c2 & 0x30) >> 4);
285 288
       /* c3 */
286 289
       do {
287 290
         c3 = str.charCodeAt(i++) & 0xff;
288 291
         if (c3 == 61)
289
-        return out;
292
+          return out;
290 293
         c3 = base64DecodeChars[c3];
291 294
       } while (
292
-      i < len && c3 == -1);
295
+        i < len && c3 == -1);
293 296
       if (c3 == -1)
294
-      break;
297
+        break;
295 298
       out += String.fromCharCode((c2 & 0XF) << 4 | (c3 & 0x3C) >> 2);
296 299
       /* c4 */
297 300
       do {
298 301
         c4 = str.charCodeAt(i++) & 0xff;
299 302
         if (c4 == 61)
300
-        return out;
303
+          return out;
301 304
         c4 = base64DecodeChars[c4];
302 305
       } while (
303
-      i < len && c4 == -1);
306
+        i < len && c4 == -1);
304 307
       if (c4 == -1)
305
-      break;
308
+        break;
306 309
       out += String.fromCharCode((c3 & 0x03) << 6 | c4);
307 310
     }
308 311
     return this.utf8to16(out);
@@ -367,8 +370,8 @@ module.exports = {
367 370
     isFormat = isFormat != undefined ? isFormat : true;
368 371
     // date = new Date(date.replace(/-/g, "/"));
369 372
     date = typeof date == "string" ?
370
-    new Date(date.replace(/-/g, "/")) :
371
-    new Date(date);
373
+      new Date(date.replace(/-/g, "/")) :
374
+      new Date(date);
372 375
     var format = format || "yyyy-MM-dd hh:mm:ss",
373 376
       o = {
374 377
         "M+": date.getMonth() + 1,
@@ -490,7 +493,7 @@ module.exports = {
490 493
     format = format || "yyyy-MM-dd";
491 494
     return this.formatDate(this.formatUnixtimestamp(new Date().getTime()), format, false);
492 495
   },
493
-  datedifference: function (sDate1, sDate2, compareSec) {//compareSec  ——是否比较至秒级 true-是  -false 否
496
+  datedifference: function (sDate1, sDate2, compareSec) { //compareSec  ——是否比较至秒级 true-是  -false 否
494 497
     var dateSpan, tempDate, iDays;
495 498
     sDate1 = Date.parse(sDate1);
496 499
     sDate2 = Date.parse(sDate2);
@@ -506,7 +509,7 @@ module.exports = {
506 509
   isObjEmpty: function (obj) {
507 510
     for (var prop in obj) {
508 511
       if (obj.hasOwnProperty(prop))
509
-      return false;
512
+        return false;
510 513
     }
511 514
     return true;
512 515
   },
@@ -618,7 +621,7 @@ module.exports = {
618 621
     return "成人";
619 622
   },
620 623
   getAge: function (strBirthday) {
621
-    var returnAge,strBirthdayArr = strBirthday.split("-"),
624
+    var returnAge, strBirthdayArr = strBirthday.split("-"),
622 625
       birthYear = strBirthdayArr[0],
623 626
       birthMonth = strBirthdayArr[1],
624 627
       birthDay = strBirthdayArr[2],
@@ -730,7 +733,7 @@ module.exports = {
730 733
             });
731 734
           }, 1000);
732 735
         } else
733
-        that.showTips(res.reason);
736
+          that.showTips(res.reason);
734 737
       });
735 738
     });
736 739
   },
@@ -774,122 +777,36 @@ module.exports = {
774 777
     }
775 778
   },
776 779
   // 微信支付
777
-  WXPay(data, aid, title, alone, method) {
778
-    let that = this,
779
-      app = getApp(),
780
-      userInfo = app.globalData.userInfo;
781
-    data.applet = '1';
782
-    data.tradeType = 'JSAPI';
783
-    data.openid = userInfo.socialUid;
784
-    console.log(data);
780
+  TTPay(outOrderNo) {
785 781
     return new Promise(function (resolve, reject) {
786
-      that.ajax({
787
-        func: "weixin/npre", //获取微信支付所需信息
788
-        data: data,
789
-        load: true,
790
-        title: '请求中'
791
-        // method:'POST'
792
-      }, function (res) {
793
-        if (res.code == 0) {
794
-          let datas = res.data;
795
-          tt.requestPayment({
796
-            'timeStamp': datas.timestamp,
797
-            'nonceStr': datas.nonce_str,
798
-            'package': datas.package,
799
-            'signType': datas.signType,
800
-            'paySign': datas.sign,
801
-            'success': function (result) {
802
-              that.payResultWait(datas.orderid);
803
-              tt.reportAnalytics('order_pay', {
804
-                aid: aid,
805
-                title: title
806
-              });
807
-              resolve({
808
-                orderid: datas.orderid,
809
-                tradeChannelWeixin: res.tradeChannelWeixin,
810
-                btype: data.btype
811
-              });
812
-              //CMBC --民生支付
813
-            },
814
-            'fail': function (result) {
815
-              tt.showModal({
816
-                title: '提示',
817
-                content: '订单有5分钟的支付时间,超时后将自动取消订单,确定暂不支付?',
818
-                confirmText: '继续支付',
819
-                cancelText: '暂不支付',
820
-                confirmColor: '#ee3a43',
821
-                success: function (res) {
822
-                  if (res.confirm) {
823
-                    data.orderid = datas.orderid;
824
-                    if (data.btype == 2) {
825
-                      data.btype = 0;
826
-                    }
827
-                    that.WXPay(data, aid, title, alone).then((orderid) => {
828
-                      var pages = getCurrentPages();
829
-                      var currentPage = pages[pages.length - 2];
830
-                      if (currentPage.route == "pages/product/activity/index" || currentPage.route == "pages/order/index/order" || currentPage.route == "pages/order/detail/index") {
831
-                        let info = [];
832
-                        info.push('orderid=' + orderid);
833
-                        info.push('alone=' + alone);
834
-                        info.push('btype=' + data.btype);
835
-                        if (data.btype == 1) {
836
-                          info.push('presellOpen=' + method);
837
-                        } else if (data.btype == 2) {
838
-                          info.push('presellStatus=' + method);
839
-                        } else {
840
-                          info.push('presellOpen=' + method);
841
-                        }
842
-                        // wx.navigateTo({
843
-                        //   url: '/pages/order/success/index?orderid=' + orderid + '&alone=' + alone + '&presellOpen='+method+'&btype='+data.btype
844
-                        // });
845
-                        tt.navigateTo({
846
-                          url: '/pages/order/success/index?' + info.join('&')
847
-                        });
848
-                      }
849
-                    });
850
-                  } else if (res.cancel) {
851
-                    // if(!that.isEmpty(data.orderid)){
852
-                    //   that.ajax({
853
-                    //     func: 'order/pay/cancel',
854
-                    //     data: { "oldOrderid": data.orderid, "orderid": datas.orderid },
855
-                    //     load: false
856
-                    //   }, function (res) {
857
-                    //     reject(res);
858
-                    //   });
859
-                    // }else {
860
-                    //   reject(res);
861
-                    // }
862
-                    var pages = getCurrentPages();
863
-                    var currentPage = pages[pages.length - 1];
864
-                    if (currentPage.route == "pages/product/buy/index") {
865
-                      let info = 'orderid=' + datas.orderid + '&otype=1';
866
-                      if (data.btype == 1) {
867
-                        info = method == 0 ? info + '&presellStatus=0' : info + '&presellStatus=1';
868
-                      } else if (data.btype == 2) {
869
-                        info = info + '&presellStatus=' + method;
870
-                      } else if (data.btype == 0) {
871
-                        info = info + '&presellStatus=0';
872
-                      } else if (data.btype == 3) {
873
-                        info = info + '&presellStatus=0';
874
-                      }
875
-                      tt.navigateTo({
876
-                        url: '/pages/order/detail/index?' + info
877
-                      });
878
-                    }
879
-                    if (currentPage.route == 'pages/product/balancePayment/balancePayment') {
880
-                      let info = 'orderid=' + datas.orderid + '&otype=1' + '&presellStatus=2';
881
-                      tt.navigateTo({
882
-                        url: '/pages/order/detail/index?' + info
883
-                      });
884
-                    }
885
-                  }
886
-                }
887
-              });
888
-            }
889
-          });
890
-        } else {
782
+      tt.continueToPay({
783
+        orderId: '', // 内部订单号
784
+        outOrderNo: outOrderNo, // 外部订单号 2个订单号必填一个
785
+        success: (res) => {
786
+          const {
787
+            orderId,
788
+            outOrderNo
789
+          } = res;
790
+          console.log("success res", res);
791
+          console.log("orderId", orderId, "outOrderNo", outOrderNo);
792
+          resolve();
793
+        },
794
+        fail: (res) => {
795
+          const {
796
+            orderId,
797
+            outOrderNo,
798
+            errNo,
799
+            errMsg,
800
+            errLogId
801
+          } = res;
891 802
           reject(res);
892
-        }
803
+          if (errLogId) {
804
+            console.log("查询订单信息失败", errNo, errMsg, errLogId);
805
+          }
806
+          if (orderId || outOrderNo) {
807
+            console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
808
+          }
809
+        },
893 810
       });
894 811
     });
895 812
   },
@@ -900,7 +817,7 @@ module.exports = {
900 817
     options.load = typeof options.load == "undefined" ? false : options.load;
901 818
     options.title = typeof options.title == "undefined" ? false : options.title;
902 819
     options.method = typeof options.method == "undefined" ? "GET" : options.method;
903
-    if (options.load && options.title) {//评价相关接口调用弹窗避免重复调用
820
+    if (options.load && options.title) { //评价相关接口调用弹窗避免重复调用
904 821
       tt.showLoading({
905 822
         title: options.title,
906 823
         mask: true
@@ -1039,54 +956,6 @@ module.exports = {
1039 956
 
1040 957
     });
1041 958
 
1042
-    // wx.getLocation({
1043
-    //   type: 'wgs84',
1044
-    //   success: function (res) {
1045
-    //     var myAmapFun = new self.amapFile.AMapWX({
1046
-    //       key: "4048819e3a45aa1cbac417a4e45f44aa"
1047
-    //     }); //  oldKey —— bae2697f5d1a1e5db9dd855e7cd083bf
1048
-    //     myAmapFun.getRegeo({
1049
-    //       location: res.longitude + ',' + res.latitude,
1050
-    //       success: function (data) {
1051
-    //         data[0]['regeocodeData']['addressComponent']['latitude'] = res.latitude;
1052
-    //         data[0]['regeocodeData']['addressComponent']['longitude'] = res.longitude;
1053
-    //         if (typeof (data[0]['regeocodeData']['addressComponent']['city']) == "object") {
1054
-    //           data[0]['regeocodeData']['addressComponent']['city'] = data[0]['regeocodeData']['addressComponent']['city'].join("");
1055
-    //         }
1056
-    //         data[0]['regeocodeData']['addressComponent']['city'] = self.isEmpty(data[0]['regeocodeData']['addressComponent']['city']) ? data[0]['regeocodeData']['addressComponent']['province'] : data[0]['regeocodeData']['addressComponent']['city'];
1057
-    //         data[0]['regeocodeData']['addressComponent']['city'] = data[0]['regeocodeData']['addressComponent']['city'].replace("市", "");
1058
-    //         self.businessCity().then(function (citys) {
1059
-    //           console.log(88888,citys,data)
1060
-
1061
-    //           let getCity = wx.getStorageSync("city") || {};
1062
-    //           if (citys.includes(data[0]['regeocodeData']['addressComponent']['city']) || !self.isObjEmpty(getCity)) {
1063
-    //             if (!self.isObjEmpty(getCity) && type == undefined) data[0]['regeocodeData']['addressComponent'] = getCity;
1064
-    //             typeof (callback) == "function" ? callback({
1065
-    //               code: 0,
1066
-    //               data: data[0]['regeocodeData']['addressComponent'],
1067
-    //               msg: "省市获取成功。"
1068
-    //             }) : "";
1069
-    //           } else {
1070
-    //             typeof (callback) == "function" ? callback({
1071
-    //               code: 2,
1072
-    //               data: data[0]['regeocodeData']['addressComponent'],
1073
-    //               msg: "省市获取失败。"
1074
-    //             }) : "";
1075
-    //           }
1076
-    //         });
1077
-    //       },
1078
-    //     });
1079
-    //   },
1080
-    //   fail: function (info) {
1081
-    //     typeof (callback) == "function" ? callback({
1082
-    //       code: 1,
1083
-    //       data: {
1084
-    //         city: "未知城市"
1085
-    //       },
1086
-    //       msg: "省市获取失败。"
1087
-    //     }) : "";
1088
-    //   }
1089
-    // });
1090 959
   },
1091 960
   // 支付成功后调用(不做回调处理)
1092 961
   payResultWait(orderid) {
@@ -1204,7 +1073,7 @@ module.exports = {
1204 1073
     return new Promise(function (resolve, reject) {
1205 1074
       that.loadCity(function (res) {
1206 1075
         let city = app.globalData.city;
1207
-        if (res.code == 0) {//获取地址成功
1076
+        if (res.code == 0) { //获取地址成功
1208 1077
           app.globalData.locationCity = res.data.city;
1209 1078
           if (!that.isObjEmpty(city) && res.data.city != city.city && app.globalData.path == 'pages/index/index') {
1210 1079
             tt.hideLoading();
@@ -1227,8 +1096,8 @@ module.exports = {
1227 1096
             tt.setStorageSync("city", app.globalData.city);
1228 1097
             resolve(true);
1229 1098
           }
1230
-        } else if (res.code == 1 || res.code == 2) {//获取地址失败
1231
-          if (that.isObjEmpty(city) || res.code == 2) {//全局地址为空
1099
+        } else if (res.code == 1 || res.code == 2) { //获取地址失败
1100
+          if (that.isObjEmpty(city) || res.code == 2) { //全局地址为空
1232 1101
             var e = getCurrentPages(),
1233 1102
               url = e.length <= 0 ? "/pages/index/index" : "/" + e[e.length - 1].route;
1234 1103
             reject('reject');
@@ -1237,7 +1106,7 @@ module.exports = {
1237 1106
             tt.redirectTo({
1238 1107
               url: '/pages/city/list?query=selectCity&url=' + url
1239 1108
             });
1240
-          } else {//全局地址city['city']存在
1109
+          } else { //全局地址city['city']存在
1241 1110
             resolve(true);
1242 1111
           }
1243 1112
         }
@@ -1255,7 +1124,7 @@ module.exports = {
1255 1124
           let it = {};
1256 1125
           it.version = "applet_v1.0.0";
1257 1126
           it.code = res.code;
1258
-          console.log(res.code,'code')
1127
+          console.log(res.code, 'code')
1259 1128
           it.target = 'app';
1260 1129
           that.ajax({
1261 1130
             func: "v2/login/douyin/applet_login",