Browse Source

before move getreq to app model

stanley-king 4 năm trước cách đây
mục cha
commit
d3687c2023

+ 16 - 0
app.js

@@ -82,6 +82,22 @@ App({
             url: page,
         })
     },
+    switchtab(page) {
+        this.globalData.authPages.forEach(prefix => {
+            if(page.indexOf(prefix) == 0) {
+                if(!this.globalData.userInfo) {
+                    wx.navigateTo({
+                        url: '/pages/auth/auth',
+                    })
+                    return;
+                }                
+            }            
+        });
+        
+        wx.switchTab({
+            url: page,
+        })
+    },
     getValueByKey(key = '', data = []){
         if(!data.length) return {}
         return data.filter(val => val.card_type === key)[0] || {}

+ 16 - 18
config.js

@@ -1,7 +1,7 @@
 // let api = "https://passport.lrlz.com/mobile/index.php";
 // let api = "http://www.xyzshops.cn/mobile/index.php";
-// let api = "http://192.168.1.200/mobile/index.php";
-let api = "https://www.xyzshops.cn/mobile/index.php";
+let api = "http://192.168.1.200/mobile/index.php";
+// let api = "https://www.xyzshops.cn/mobile/index.php";
 
 let app = getApp();
 
@@ -23,14 +23,11 @@ function getReq(data, callback, method)
   if(act.indexOf('member_') == 0)
   {
     console.log(act + ' must check login status.')
-    // wx.navigateTo({
-    //   url: '/pages/auth/auth',
-    // })
-    // if(!app.globalData.userInfo) {
-    //   wx.navigateTo({
-    //     url: '/pages/auth/auth',
-    //   })
-    // }
+    if(!app.globalData.userInfo) {
+      wx.navigateTo({
+        url: '/pages/auth/auth',
+      })
+    }
   } 
   else {
     console.log('act = ' + act);
@@ -55,14 +52,15 @@ function getReq(data, callback, method)
     header,
     success(res) 
     {
-      if(res.data.code == 10014) {
-        wx.navigateTo({
-          url: '/pages/auth/auth',
-        })
-      }
-      else {
-        callback(res.data)
-      }
+      // if(res.data.code == 10014) {
+      //   wx.navigateTo({
+      //     url: '/pages/auth/auth',
+      //   })
+      // }
+      // else {
+      //   callback(res.data)
+      // }
+      callback(res.data)
     },
     fail() 
     {

+ 45 - 30
pages/components/auth/auth.js

@@ -15,58 +15,73 @@ Component({
    */
   data: {
     phone_iv: '',
-    phone_encryptedData: ''
+    phone_encryptedData: '',
+    showAuthName:true,
+    showAuthPhone:false,
+    userInfoE:{},
   },
 
   /**
    * 组件的方法列表
    */
   methods: {
-    getPhoneNumber: function(e) { 
+    userPhoneHandler: function(e) { 
       console.log(e.detail.errMsg) 
       console.log(e.detail.iv) 
       console.log(e.detail.encryptedData) 
       this.phone_encryptedData = e.detail.encryptedData
       this.phone_iv = e.detail.iv
+      this.wxauthen(this.userInfoE)
     },
     userInfoHandler(e) 
     {
-      let self = this
       if (e.detail.errMsg == "getUserInfo:ok") 
       {
         app.globalData.userInfo = e.detail.userInfo;
         app.globalData.userInfo.nickname = e.detail.userInfo.nickName;
-        let userInfo = app.globalData.userInfo;
-        if (app.globalData.userId.unionid) {
-          userInfo = Object.assign({}, app.globalData.userId, app.globalData.userInfo);
-        }
-        else {
-          let { encryptedData, iv, signature } = e.detail
-          userInfo = Object.assign({}, { encryptedData }, { signature }, { iv }, userInfo)
-        }
-        let phoneInfo = {iv: self.phone_iv,encryptedData: self.phone_encryptedData}
-        let params = {
-          user_info: userInfo,
-          phone_info: phoneInfo,
-          act: "login",
-          op: "wxauthen"
-        }
-        getReq(params, function (res) 
-        {
-          if (res.code == 200) {
-            self.triggerEvent('getAuth', {
-              userInfo
-            })
+        this.userInfoE = e
+        this.wxauthen(e)
+      }
+    },
+    wxauthen: function (eInfo) {
+      let userInfo = eInfo.detail.userInfo;
+      if (app.globalData.userId.unionid) {
+        userInfo = Object.assign({}, app.globalData.userId, app.globalData.userInfo);
+      }
+      else {
+        let { encryptedData, iv, signature } = e.detail
+        userInfo = Object.assign({}, { encryptedData }, { signature }, { iv }, userInfo)
+      }
+      let phoneInfo = { iv: this.phone_iv, encryptedData: this.phone_encryptedData }
+      let params = {
+        user_info: userInfo,
+        phone_info: phoneInfo,
+        act: "login",
+        op: "wxauthen"
+      }
+
+      let self = this;
+      getReq(params, function (res) {
+        if (res.code == 200) {
+          let datas = res.datas;
+          if (datas.hasmobile == false) {
+            self.setData({showAuthName:false,showAuthPhone:true})
           }
           else {
-            wx.showToast({
-              icon: 'none',
-              title: '登陆失败',
-              duration: 2000
+            // self.setData({showAuthName:true,showAuthPhone:false})
+            self.triggerEvent('getAuth', {
+              userInfo
             })
           }
-        })
-      }
+        }
+        else {
+          wx.showToast({
+            icon: 'none',
+            title: '登陆失败',
+            duration: 2000
+          })
+        }
+      })
     }
   }
 })

+ 7 - 2
pages/components/auth/auth.wxml

@@ -3,8 +3,13 @@
   <view class="auth_text">
     <view>您暂未获取微信授权,将无法领取红包、加入购物车、下单等功能。点击“授权登录”后,您将使用全部功能。</view>
   </view>
-  <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">授权手机号码</button>
-  <button style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' 
+
+  <button wx:if="{{showAuthName}}" 
+          style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' 
           open-type="getUserInfo"
           bindgetuserinfo="userInfoHandler">授权登录</button>
+  <button wx:if="{{showAuthPhone}}" 
+          open-type="getPhoneNumber" 
+    		  bindgetphonenumber="userPhoneHandler"
+  	  	  style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' >授权手机号码</button>
 </view>

+ 1 - 3
pages/components/blockItem/blockItem.js

@@ -146,9 +146,7 @@ Component({
           else if(prefix == 'xyzshop://www.xyzshops.com/NavigatePage')
             switch(params.page){
               case "oil" : 
-                wx.switchTab({
-                  url: '/pages/postage/postage'
-                })
+                app.switchtab('/pages/postage/postage')
                 break;
               case "phone" : 
                 app.navigateto('/pages/phoneCharges/phoneCharges') 

+ 29 - 9
pages/myhome/myhome.js

@@ -12,7 +12,8 @@ Page({
     memberInfo: {},
     sinopec:{},
     petrochina:{},
-    phone: {}
+    phone: {},
+    userInfo: app.globalData.userInfo
   },
 
   handleMore(e) {
@@ -37,14 +38,22 @@ Page({
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
+  onShow: function () 
+  {
+    if(!app.globalData.userInfo) {
+      return;
+    }
+    this.setData({
+      userInfo: app.globalData.userInfo
+    })
+
     getReq({
-      act: 'member_info',
-      op: 'index',
-      page_type: 'oil'
-    }, (res) => {
-      this.setData({
-        firstLoad: false
+        act: 'member_info',
+        op: 'index',
+        page_type: 'oil'
+      }, (res) => {
+        this.setData({
+          firstLoad: false
       });
       if (res.code == 200) {
         if(res.datas) {
@@ -55,10 +64,21 @@ Page({
           this.setData({ memberInfo: {...res.datas}, phone, petrochina, sinopec })
         }
       } else {
-        app.showToast(res.message)
+          app.showToast(res.message)
       }
     })
   },
+  getAuth(e) {
+    let { userInfo } = e.detail
+    if (userInfo) {
+      this.setData({
+        userInfo:userInfo
+      })
+      wx.reLaunch({
+        url: '/pages/index/index'
+      });
+    }
+  },
 
   /**
    * 生命周期函数--监听页面隐藏

+ 4 - 1
pages/myhome/myhome.json

@@ -1,5 +1,8 @@
 {
   "navigationBarTitleText": "个人中心",
   "navigationBarBackgroundColor": "#fe7124",
-  "navigationBarTextStyle": "white"
+  "navigationBarTextStyle": "white",
+  "usingComponents": {
+    "auth": "../components/auth/auth"
+  }
 }

+ 53 - 0
pages/myhome/myhome.wxml

@@ -1,5 +1,6 @@
 <!--pages/myhome/myhome.wxml-->
 <view class="myhome-wrp">
+  <auth wx:if="{{!userInfo}}" bind:getAuth="getAuth"></auth>
   <view class="topbg"></view>
   <view class="header">
     <image src="{{memberInfo.member_avatar}}" class="avtor"></image>
@@ -10,6 +11,58 @@
     </view>
   </view>
 
+  <view class="order_list">
+    <view class='order_title flex_1px_d' bindtap='skip_all_order'>
+      <text>我的订单</text>
+      <text class='look_all_order arrow_right' decode="{{true}}">查看全部订单&nbsp;</text>
+    </view>
+
+    <view class='order_info'>
+      <view>
+        <navigator url="/pages/order_tabs/orderTabs?state_type=state_new" hover-class="none" class="pos_rel">
+          <image style='width:35rpx;height: 35rpx;' src='../../image/person/payments_due_icon.png'></image>
+          <view class="mt8">
+            <text>待付款</text>
+          </view>
+          <view class="sub_count" wx:if="{{pre_pay_count}}">{{pre_pay_count}}</view>
+        </navigator>
+      </view>
+      <view>
+        <navigator url="/pages/order_tabs/orderTabs?state_type=state_pay" hover-class="none" class="pos_rel">
+          <image style='width:35rpx;height: 35rpx;' src='../../image/person/shipping_term_icon.png'></image>
+          <view class="mt8">
+            <text>待发货</text>
+          </view>
+          <view class="sub_count" wx:if="{{pre_send_count}}">{{pre_send_count}}</view>
+        </navigator>
+      </view>
+      <view>
+        <navigator url="/pages/order_tabs/orderTabs?state_type=state_send" hover-class="none" class="pos_rel">
+          <image style='width:35rpx;height: 35rpx;' src='../../image/person/goods_receipt_icon.png'></image>
+          <view class="mt8">
+            <text>待收货</text>
+          </view>
+          <view class="sub_count" wx:if="{{pre_receive_count}}">{{pre_receive_count}}</view>
+        </navigator>
+      </view>
+      <view>
+        <navigator url="/pages/order_tabs/orderTabs?state_type=state_success" hover-class="none" class="pos_rel">
+          <image style='width:35rpx;height: 35rpx;' src='../../image/person/evaluated_icon.png'></image>
+          <view class="mt8">
+            <text>已收货</text>
+          </view>
+          <view class="sub_count" wx:if="{{evaluate_count}}">{{evaluate_count}}</view>
+        </navigator>
+      </view>
+      <view bindtap='refund'>
+        <image style='width:35rpx;height: 35rpx;' src='../../image/person/refund_terms_icon.png'></image>
+        <view class="mt8">
+          <text>退款/售后</text>
+        </view>
+      </view>
+    </view>
+  </view>
+
   <view class="card">
     <view class="card-title" bindtap="handleMore" data-cardtype="sinopec">
       <image src="/image/myhome/icon-postage.png" class="icon icon-postage"></image>

+ 45 - 0
pages/myhome/myhome.wxss

@@ -108,4 +108,49 @@
 }
 .bg-blue{
   background: linear-gradient(to right, #006ec9 0%,#2599d8 100%);
+}
+.order_list {
+  position: relative;
+  margin-top: 22rpx;
+  font-size: 30rpx;
+  background: #ffffff;
+}
+
+.order_list .order_title {
+  position: relative;
+  display: flex;
+  height: 104rpx;
+  box-sizing: border-box;
+  line-height: 104rpx;
+  padding: 0 40rpx;
+}
+.order_list .order_title text {
+  color: #666;
+  flex: 1;
+}
+
+.order_list .order_title .look_all_order {
+  font-size: 24rpx;
+  text-align: right;
+  color: #999;
+}
+
+.order_list .order_info {
+  display: flex;
+  padding: 40rpx;
+}
+
+.order_list .order_info>view {
+  flex: 1;
+  text-align: center;
+  font-size: 20rpx;
+  color: #999;
+}
+.order_list .order_info image {
+  vertical-align: middle;
+}
+.order_list .order_info text {
+   display: inline-block;
+   height: 30rpx;
+   margin-top: 10rpx; 
 }

+ 340 - 0
pages/order_tabsec/orderTabs.js

@@ -0,0 +1,340 @@
+// pages/order_tabs/orderTabs.js
+const getReq = require('../../config.js').getReq
+import recordSource from '../../utils/recordSource'
+let app = getApp()
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    hasmore: false,
+    orders: [],
+    addTimes: [],
+    curpage: 1,
+    tabs: [
+      {
+        name: "全部",
+        type: ""
+      },
+      {
+        name: "待付款",
+        type: 'state_new'
+      },
+      {
+        name: "待发货",
+        type: 'state_pay'
+      },
+      {
+        name: "待收货",
+        type: 'state_send'
+      },
+      {
+        name: "已收货",
+        type: 'state_success'
+      }
+    ],
+    selectedIndex: 0,
+    state_type: '',
+    tabs_title: '',
+    loading: false,
+    fromSource: '',
+    firstLoad: true
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    let state_type = options.state_type || this.data.state_type;
+    switch (state_type) {
+      case '': {
+        this.setData({
+          selectedIndex: 0,
+          state_type,
+          tabs_title: '全部'
+        })
+        break;
+      }
+      case 'state_new': {
+        this.setData({
+          selectedIndex: 1,
+          state_type,
+          tabs_title: '待付款'
+        })
+        break;
+      }
+      case 'state_pay': {
+        this.setData({
+          selectedIndex: 2,
+          state_type,
+          tabs_title: '待发货'
+        })
+        break;
+      }
+      case 'state_send': {
+        this.setData({
+          selectedIndex: 3,
+          state_type,
+          tabs_title: '待收货'
+        })
+        break;
+      }
+      case 'state_success': {
+        this.setData({
+          selectedIndex: 4,
+          state_type,
+          tabs_title: '已收货'
+        })
+        break;
+      }
+    }
+    this.req_datas(state_type);
+  },
+
+  req_datas(type) {
+    let fromSource = recordSource(app, `act=member_order&op=list&page=15&curpage=${this.data.curpage}&state_type=${type}&client_type=mini`)
+    this.setData({
+      loading: true,
+      fromSource: app.globalData.fromSource
+    });
+    wx.showLoading({
+      title: '加载中',
+    });
+    if (type != this.data.state_type) {
+      this.setData({
+        hasmore: false,
+        orders: [],
+        addTimes: [],
+        curpage: 1,
+        state_type: type
+      });
+    }
+    let self = this;
+    getReq({
+      act: 'member_order',
+      op: 'list',
+      page: 15,
+      curpage: this.data.curpage,
+      state_type: type,
+      from: fromSource
+    }, function (res) {
+      let orders = res.datas.orders;
+      let addTimes = [];
+      let hasmore = false;
+      let curpage = self.data.curpage
+      for (let item of orders) {
+        addTimes.push(self.timeFormat(item.order_info.add_time));
+      }
+      if (res.datas.mobile_page.hasmore) {
+        hasmore = true;
+        curpage = self.data.curpage + 1;
+      }
+      else {
+        hasmore = false;
+      }
+      self.setData({
+        hasmore,
+        curpage,
+        orders: self.data.orders.concat(orders),
+        addTimes: self.data.addTimes.concat(addTimes),
+        loading: false,
+        firstLoad: false
+      });
+
+      wx.hideLoading();
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    if(!this.data.firstLoad) {
+      app.setFromSource(this.data.fromSource)
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    if (this.data.hasmore) {
+      this.req_datas(this.data.state_type);
+    }
+  },
+
+  timeFormat(time) {
+    let date = new Date(time * 1000);
+    let year = date.getFullYear();
+    let month = date.getMonth() + 1;
+    let day = date.getDate();
+    return `${year}-${month}-${day}`;
+  },
+
+  selectTab(e) {
+    let index = e.target.dataset.index;
+    let type = e.target.dataset.type;
+    if (type == this.data.state_type) {
+      return;
+    }
+    else {
+      switch (type) {
+        case '': {
+          this.setData({
+            selectedIndex: index,
+            tabs_title: '全部'
+          })
+          break;
+        }
+        case 'state_new': {
+          this.setData({
+            selectedIndex: index,
+            tabs_title: '待付款'
+          })
+          break;
+        }
+        case 'state_pay': {
+          this.setData({
+            selectedIndex: index,
+            tabs_title: '待发货'
+          })
+          break;
+        }
+        case 'state_send': {
+          this.setData({
+            selectedIndex: index,
+            tabs_title: '待收货'
+          })
+          break;
+        }
+        case 'state_success': {
+          this.setData({
+            selectedIndex: index,
+            tabs_title: '已收货'
+          })
+          break;
+        }
+      }
+      this.req_datas(type);
+    }
+  },
+  change_order_state(action, order_id, index) {
+    let self = this;
+    getReq({
+      act: 'member_order',
+      op: 'change_state',
+      act_type: action,
+      order_id: order_id
+    }, function (res) {
+      if (res.code != 200) {
+        wx.showToast({
+          title: res.message,
+          icon: 'none'
+        })
+      }
+      else {
+        let orders = self.data.orders;
+        let addTimes = self.data.addTimes;
+        orders.splice(index, 1);
+        addTimes.splice(index, 1);
+        self.setData({
+          orders,
+          addTimes
+        })
+      }
+    })
+  },
+  order_action(e) {
+    const action = e.target.dataset.action;
+    const order_id = e.target.dataset.orderid;
+    const order_sn = e.target.dataset.sordersn;
+    const pay_sn = e.target.dataset.paysn;
+    const index = e.target.dataset.index;
+    let self = this;
+    switch (action) {
+      case "if_delete": {
+        wx.showModal({
+          title: "提示",
+          content: "您确定要删除该订单吗?",
+          success: function (res) {
+            if (res.confirm) {
+              self.change_order_state(action, order_id, index);
+            }
+            else if (res.cancel) {
+              return;
+            }
+          }
+        })
+        break;
+      }
+      case "if_deliver": {
+        let url = encodeURIComponent("https://passport.lrlz.com/mobile/index.php?act=member_order&op=search_deliver&order_id=");
+        app.navigateto(`/pages/webView/webView?url=${url}${order_id}`)
+        break;
+      }
+      case "if_cancel": {
+        wx.showModal({
+          title: "提示",
+          content: "您确定要取消该订单吗?",
+          success: function (res) {
+            if (res.confirm) {
+              self.change_order_state(action, order_id, index);
+            }
+            else if (res.cancel) {
+              return;
+            }
+          }
+        })
+        break;
+      }
+      case "if_receive": {
+        wx.showModal({
+          title: "提示",
+          content: "您确定收货吗?",
+          success: function (res) {
+            if (res.confirm) {
+              self.change_order_state(action, order_id, index);
+            }
+            else if (res.cancel) {
+              return;
+            }
+          }
+        })
+        break;
+      }
+      case "if_payment": {
+        app.navigateto(`/pages/orderPaySn/orderPaySn?pay_sn=${pay_sn}`)
+      }
+
+    }
+  }
+})

+ 6 - 0
pages/order_tabsec/orderTabs.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "我的订单",
+  "usingComponents": {
+    
+  }
+}

+ 51 - 0
pages/order_tabsec/orderTabs.wxml

@@ -0,0 +1,51 @@
+<view class='tabs vux-1px-b'>
+  <block wx:key="{{index}}" wx:for="{{tabs}}">
+    <view class='tabs_item {{selectedIndex == index?"selected":""}}' data-type="{{item.type}}" data-index="{{index}}" bindtap='selectTab'>{{item.name}}</view>
+  </block>
+</view>
+<view style='height:88rpx;'></view>
+<view class="order_list" wx:if="{{orders.length > 0}}">
+  <block wx:key="{{index}}" wx:for-index="idx" wx:for="{{orders}}">
+    <view class='order_item'>
+      <view class='order_time'>
+          <text class='add_time'>{{addTimes[idx]}}</text>
+          <text class='state_desc'>{{item.order_info.state_desc}}</text>
+      </view>
+      <block wx:key="{{index}}" wx:for-item="goods_list"  wx:for="{{item.order_goods}}">
+        <view class='order_content align_center'>
+        <view class='order_image'>
+          <image style='width:140rpx;height: 140rpx;' src='{{goods_list.goods_image}}'></image>
+        </view>
+        <view class='order_info'>
+          <view>
+            <text class='goods_name'>{{goods_list.goods_name}}</text>
+          </view>
+          <view>
+            <text class='goods_spec'>{{goods_list.goods_spec}}</text>
+          </view>
+        </view>
+        <view class='order_price'>
+          <view>¥{{goods_list.goods_price}}</view>
+          <view>x{{goods_list.goods_num}}</view>
+        </view>
+      </view>
+      </block>
+      <view class='order_total'>
+        <text>共{{item.order_goods.length}}件 合计:<text class='order_amount mr6'>¥{{item.order_info.pay_cash}}</text> 
+        <block wx:if="{{item.order_info.shipping_fee}}">(含运费¥{{item.order_info.shipping_fee}})</block>
+        <block wx:else>(免运费)</block>
+      </text>
+      </view>
+      <view class='order_handle'>
+        <block wx:key="{{index}}" wx:for="{{item.actions}}" wx:for-item="action">
+          <text wx:if="{{(action.action != 'if_evaluation') && (action.action != 'if_refund_cancel')}}" data-action="{{action.action}}" data-orderid="{{item.order_info.order_id}}" data-ordersn="{{item.order_info.order_sn}}" data-index="{{idx}}" data-paysn="{{item.order_info.pay_sn}}" bindtap='order_action'>{{action.title}}</text>  
+        </block> 
+      </view>
+    </view>
+  </block>    
+</view>
+<view class='empty_order' wx:if="{{orders.length <= 0 && loading == false}}">
+  <image class="empty_order_icon" src="../../image/empty_order.png"></image>
+  <view class="emoty_order_title">您还没有相关的订单</view>
+  <view class="emoty_order_subtitle">可以去看看有哪些想买的</view>
+</view>

+ 134 - 0
pages/order_tabsec/orderTabs.wxss

@@ -0,0 +1,134 @@
+.order_item {
+  font-size: 24rpx;
+  margin-top: 15rpx;
+  background: #fff;
+}
+
+.order_time {
+  position: relative;
+  display: flex;
+  padding: 10rpx 15rpx;
+}
+
+.order_time::after {
+  content: "";
+  position: absolute;
+  bottom: 0;
+  right: 0;
+  width: 100%;
+  height: 2rpx;
+  background: #d9d9d9;
+  -webkit-transform: scaleY(0.5);
+  transform: scaleY(0.5);
+}
+
+.order_time text {
+  flex: 1;
+}
+
+.order_time text.state_desc, .order_price, .order_total, .order_handle {
+  text-align: right;
+}
+
+.order_content {
+  display: flex;
+  position: relative;
+  padding: 5rpx 15rpx;
+}
+
+.order_content::after {
+  content: "";
+  position: absolute;
+  bottom: 0;
+  right: 0;
+  width: 100%;
+  height: 2rpx;
+  background: #d9d9d9;
+  -webkit-transform: scaleY(0.5);
+  transform: scaleY(0.5);
+}
+
+.order_info {
+  width: 500rpx;
+  padding-left: 15rpx;
+}
+
+.order_handle {
+  margin-top: 8rpx;
+}
+
+.order_total {
+  padding-right: 15rpx;
+  padding-top: 15rpx;
+  padding-bottom: 15rpx;
+}
+
+.order_handle text {
+  display: inline-block;
+  color: grey;
+  border: 1rpx solid grey;
+  border-radius: 5rpx;
+  padding: 10rpx 16rpx;
+  
+  margin: 15rpx;
+  font-size: 22rpx;
+}
+.goods_spec {
+  font-size:20rpx;
+  color:grey;
+  margin-top:20rpx;
+  display:inline-block;
+}
+.order_amount {
+  color: #333;
+}
+
+.tabs {
+  display: flex;
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: #ffffff;
+  font-size: 28rpx;
+  text-align: center;
+  z-index: 10;
+}
+
+.tabs view {
+  flex: 1;
+}
+
+.selected {
+  color: #333;
+  border-bottom: 3px solid #2b2b2b; 
+}
+
+.empty_order {
+  text-align: center;
+  font-size: 30rpx;
+}
+
+.empty_order text {
+  display: block;
+  height: 300rpx;
+  line-height: 300rpx;
+}
+.empty_order_icon {
+  width: 523rpx;
+  height: 300rpx;
+  margin: 120rpx auto 50rpx;
+}
+.emoty_order_title {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #333;
+  text-align: center;
+}
+.emoty_order_subtitle {
+  font-size: 24rpx;
+  color: #666;
+  text-align: center;
+}

+ 1 - 2
pages/person/person.wxml

@@ -98,8 +98,7 @@
     <view class='order_title flex_1px_d' bindtap='skip_help'>
       <text>帮助中心</text>
       <text class='look_all_order arrow_right' decode="{{true}}"></text>
-    </view>
-
+    </view>      
     <!-- <view class='order_title' bindtap="shareBonus">
       <text>测试红包</text>
       <text class='look_all_order arrow_right' decode="{{true}}"></text>

+ 1 - 3
pages/shopCart/shopCart.js

@@ -358,9 +358,7 @@ Page({
     app.navigateto(`/pages/confirmOrder/confirmOrder?iscart=1&cart_id=${cart_list}`)
   },
   skip_index() {
-    wx.switchTab({
-      url: "/pages/index/index"
-    })
+    app.switchtab("/pages/index/index")
   },
   toDetails(e) {
     let goods_id = e.currentTarget.dataset.goodsid