绿满眶商城微信小程序-uniapp
peng
2025-10-23 63116e19824ceabc68a72f10b134d815f462e711
pages/order/myOrder.vue
@@ -112,6 +112,17 @@
              >
                优惠券卡包
              </view>
              <!-- 新增:定制商品样式 -->
              <view
                ripple
                shape="circle"
                class="cancel-btn"
                size="mini"
                             v-if="order.customizeFlag === 'CUSTOMIZE'"
                @click="opencustomize(order)"
              >
                定制商品
              </view>
                  <!-- 取消订单 -->
<!--                  <view
                    ripple
@@ -161,7 +172,7 @@
                shape="circle"
                class="cancel-btn"
                size="mini"
                v-if="order.orderStatus === 'COMPLETED'&& order.orderType !=='VIRTUAL'"
                v-if="order.orderStatus === 'COMPLETED'&& order.orderType !=='VIRTUAL'&& order.customizeFlag !=='CUSTOMIZE'"
                @click="buyBack(order)"
              >
                再来一单
@@ -175,6 +186,14 @@
                  </u-button> -->
                </view>
              </view>
            <view style="display: flex;justify-content: space-around;">
               <view class="" @click="callPhone">
                   客服热线: 19980834650
               </view>
               <view class="" @click="copyToClipboard">
                   客服微信: meiyikuang
               </view>
            </view>
            </view>
          </view>
          <uni-load-more :status="tabItem.loadStatus"></uni-load-more>
@@ -361,14 +380,14 @@
    // this.loadData(this.status);
  },
  onUnload() {
    let   param = this.actionParam;
    let   param = Object.assign({}, this.actionParam);
    if (this.sendOnShow)return
    param.pageStatus = "LEAVE"
    userAction(param)
  },
  onHide() {
    this.startHidenTime = Date.now()
    let   param = this.actionParam;
    let   param = Object.assign({}, this.actionParam);
    this.sendOnShow = true;
    param.pageStatus = "LEAVE"
    userAction(param)
@@ -376,12 +395,12 @@
  onShow() {
     getSessionId().then(res=>{
        this.pageSessionNo = res.data.data
      this.actionParam.sessionId = this.pageSessionNo
        if(this.pageSessionNo){
        let   param = this.actionParam;
           param.sessionId = this.pageSessionNo
        let   param = Object.assign({}, this.actionParam);
           userAction(param)
        }
     })
     })
    if(this.$options.filters.tipsToLogin()){
      if (!this.tabCurrentIndex) {
        this.initData(0);
@@ -419,11 +438,40 @@
    },
  },
  methods: {
     copyToClipboard(){
        uni.setClipboardData({
           data:'meiyikuang',
           success() {
              uni.showToast({
            title: '复制成功',
            icon: 'none'
              })
           }
        })
     },
     callPhone(){
        uni.showModal({
           title:'确认联系客服吗?',
           success(e) {
              if(e.confirm){
                 uni.makePhoneCall({
                    phoneNumber:'19980834650'
                 })
              }
           }
        })
     },
     openCouponPackage(order){
        console.log(order)
      uni.navigateTo({
         url:"/pages/order/cardPack?sn=" + order.sn
      })  
     },
     opencustomize(order){
        console.log(order)
           uni.navigateTo({
              url:"/pages/order/constomize/constomize?sn=" + order.sn
           })
     },
     //再来一单
     buyBack(order){
@@ -683,14 +731,14 @@
     * 查看物流
     */
    navigateToLogistics(order) {
      uni.navigateTo({
        url:
          "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
      });
      // uni.navigateTo({
      //   url:
      //     "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
      //       `/pages/order/deliverDetail?order_sn=${order.sn}`,
      // });
     uni.navigateTo({
       url:
         `/pages/order/deliverDetail?order_sn=${order.sn}`,
     });
    },
  },
};