Joe 3 years ago
parent
commit
cecfa58756
100 changed files with 1942 additions and 349 deletions
  1. 89 2
      App.vue
  2. 18 2
      main.js
  3. 5 0
      manifest.json
  4. 29 3
      pages.json
  5. 27 7
      pages/authen/identity.vue
  6. 51 22
      pages/authen/login.vue
  7. 111 104
      pages/confirm/confirm.vue
  8. 158 87
      pages/index/index.vue
  9. 488 0
      pages/list/list.vue
  10. 143 0
      pages/skip/skip.vue
  11. 333 0
      pages/succeed1/succeed1.vue
  12. 84 33
      pages/test/test.vue
  13. 11 3
      settings.js
  14. BIN
      static/icon/1_b01_down.2x.png
  15. BIN
      static/icon/1_b01_location.2x.png
  16. BIN
      static/icon/1_b01_search.2x.png
  17. BIN
      static/icon/goto.png
  18. BIN
      static/icon/icon_shuaxin.2x.png
  19. BIN
      store/Tomcat.lnk
  20. 91 45
      store/index.js
  21. 0 14
      store/modules/moduleA.js
  22. 0 27
      store/modules/moduleB.js
  23. 14 0
      store/modules/order.js
  24. 33 0
      store/modules/station.js
  25. 67 0
      store/modules/user.js
  26. 0 0
      unpackage/dist/build/.automator/mp-weixin/.automator.json
  27. 4 0
      unpackage/dist/build/mp-weixin/app.js
  28. 29 0
      unpackage/dist/build/mp-weixin/app.json
  29. 3 0
      unpackage/dist/build/mp-weixin/app.wxss
  30. 0 0
      unpackage/dist/build/mp-weixin/common/main.js
  31. 1 0
      unpackage/dist/build/mp-weixin/common/main.wxss
  32. 2 0
      unpackage/dist/build/mp-weixin/common/runtime.js
  33. 0 0
      unpackage/dist/build/mp-weixin/common/vendor.js
  34. 0 0
      unpackage/dist/build/mp-weixin/pages/authen/identity.js
  35. 5 0
      unpackage/dist/build/mp-weixin/pages/authen/identity.json
  36. 1 0
      unpackage/dist/build/mp-weixin/pages/authen/identity.wxml
  37. 1 0
      unpackage/dist/build/mp-weixin/pages/authen/identity.wxss
  38. 0 0
      unpackage/dist/build/mp-weixin/pages/authen/login.js
  39. 5 0
      unpackage/dist/build/mp-weixin/pages/authen/login.json
  40. 1 0
      unpackage/dist/build/mp-weixin/pages/authen/login.wxml
  41. 1 0
      unpackage/dist/build/mp-weixin/pages/authen/login.wxss
  42. 0 0
      unpackage/dist/build/mp-weixin/pages/confirm/confirm.js
  43. 7 0
      unpackage/dist/build/mp-weixin/pages/confirm/confirm.json
  44. 0 0
      unpackage/dist/build/mp-weixin/pages/confirm/confirm.wxml
  45. 0 0
      unpackage/dist/build/mp-weixin/pages/confirm/confirm.wxss
  46. 0 0
      unpackage/dist/build/mp-weixin/pages/index/index.js
  47. 7 0
      unpackage/dist/build/mp-weixin/pages/index/index.json
  48. 0 0
      unpackage/dist/build/mp-weixin/pages/index/index.wxml
  49. 1 0
      unpackage/dist/build/mp-weixin/pages/index/index.wxss
  50. 0 0
      unpackage/dist/build/mp-weixin/pages/list/list.js
  51. 5 0
      unpackage/dist/build/mp-weixin/pages/list/list.json
  52. 1 0
      unpackage/dist/build/mp-weixin/pages/list/list.wxml
  53. 0 0
      unpackage/dist/build/mp-weixin/pages/list/list.wxss
  54. 0 0
      unpackage/dist/build/mp-weixin/pages/skip/skip.js
  55. 5 0
      unpackage/dist/build/mp-weixin/pages/skip/skip.json
  56. 1 0
      unpackage/dist/build/mp-weixin/pages/skip/skip.wxml
  57. 0 0
      unpackage/dist/build/mp-weixin/pages/skip/skip.wxss
  58. 1 0
      unpackage/dist/build/mp-weixin/pages/succeed/succeed.js
  59. 5 0
      unpackage/dist/build/mp-weixin/pages/succeed/succeed.json
  60. 1 0
      unpackage/dist/build/mp-weixin/pages/succeed/succeed.wxml
  61. 0 0
      unpackage/dist/build/mp-weixin/pages/succeed/succeed.wxss
  62. 1 0
      unpackage/dist/build/mp-weixin/pages/test/test.js
  63. 5 0
      unpackage/dist/build/mp-weixin/pages/test/test.json
  64. 1 0
      unpackage/dist/build/mp-weixin/pages/test/test.wxml
  65. 1 0
      unpackage/dist/build/mp-weixin/pages/test/test.wxss
  66. 59 0
      unpackage/dist/build/mp-weixin/project.config.json
  67. 7 0
      unpackage/dist/build/mp-weixin/sitemap.json
  68. BIN
      unpackage/dist/build/mp-weixin/static/icon/1_b01_down.2x.png
  69. BIN
      unpackage/dist/build/mp-weixin/static/icon/1_b01_location.2x.png
  70. BIN
      unpackage/dist/build/mp-weixin/static/icon/1_b01_search.2x.png
  71. BIN
      unpackage/dist/build/mp-weixin/static/icon/6_d05_close.2x.png
  72. BIN
      unpackage/dist/build/mp-weixin/static/icon/a01-zhuyi.2x.png
  73. BIN
      unpackage/dist/build/mp-weixin/static/icon/cg.2x.png
  74. BIN
      unpackage/dist/build/mp-weixin/static/icon/dingdan.2x.png
  75. BIN
      unpackage/dist/build/mp-weixin/static/icon/forbid.png
  76. BIN
      unpackage/dist/build/mp-weixin/static/icon/goto.png
  77. BIN
      unpackage/dist/build/mp-weixin/static/icon/huiyuan-.2x.png
  78. BIN
      unpackage/dist/build/mp-weixin/static/icon/icon_shuaxin.2x.png
  79. BIN
      unpackage/dist/build/mp-weixin/static/icon/left.png
  80. BIN
      unpackage/dist/build/mp-weixin/static/icon/login.png
  81. BIN
      unpackage/dist/build/mp-weixin/static/icon/right.png
  82. BIN
      unpackage/dist/build/mp-weixin/static/icon/select.png
  83. BIN
      unpackage/dist/build/mp-weixin/static/icon/selected.png
  84. BIN
      unpackage/dist/build/mp-weixin/static/icon/sheng.2x.png
  85. BIN
      unpackage/dist/build/mp-weixin/static/icon/tipicon1.png
  86. BIN
      unpackage/dist/build/mp-weixin/static/icon/youhuiquan-2.2x.png
  87. BIN
      unpackage/dist/build/mp-weixin/static/icon/youhuiquan1.2x.png
  88. BIN
      unpackage/dist/build/mp-weixin/static/icon/youhuiquan2.2x.png
  89. 0 0
      unpackage/dist/build/mp-weixin/static/icon/youhuiquan3.2x.png
  90. BIN
      unpackage/dist/build/mp-weixin/static/logo.png
  91. 10 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
  92. 4 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json
  93. 1 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml
  94. 0 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
  95. 0 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js
  96. 6 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.json
  97. 0 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.wxml
  98. 2 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.wxss
  99. 0 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.js
  100. 6 0
      unpackage/dist/build/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.json

+ 89 - 2
App.vue

@@ -1,10 +1,97 @@
 <script>
+  let updateManager = null
+  let canIUse = true
+
+  class WxUpdate {
+    updateManager = wx.getUpdateManager();
+    canIUse = wx.canIUse('getUpdateManager');
+    
+    static getInstance(){
+      if (!this.instance) {
+        this.instance = new WxUpdate();
+      }
+      return this.instance
+    }
+    
+    check() {
+      const that = this
+      if (that.canIUse) {
+        that.updateManager.onCheckForUpdate(function(res) {
+          if (res.hasUpdate) {
+            wx.showModal({
+              title: '更新提示',
+              content: '检测到新版本,是否下载新版本并重启小程序?',
+              success: function(res) {
+                if (res.confirm) {
+                  that.downLoadAndUpdateApplet()
+                } else if (res.cancel) {
+                  wx.showModal({
+                    title: '温馨提示~',
+                    content: '本次版本更新比较重要,旧版本可能无法正常访问的哦~',
+                    showCancel: false,
+                    confirmText: "确定更新",
+                    success: function(res) {
+                      if (res.confirm) {
+                        that.downLoadAndUpdateApplet()
+                      }
+                    }
+                  })
+                }
+              }
+            })
+          }
+          // 不走if就是最新版
+        })
+      } else {
+        that.downLoadAndUpdateWeChat()
+      }
+    }
+    downLoadAndUpdateApplet() {
+      const that = this;
+      wx.showLoading();
+      that.updateManager.onUpdateReady(function() {
+        wx.hideLoading();
+        that.updateManager.applyUpdate()
+      })
+      that.updateManager.onUpdateFailed(function() {
+        wx.hideLoading();
+        wx.showModal({
+          title: '已经有新版本了哟~',
+          content: '新版本已经上线啦~,请您删除当前小程序,重新从公众号或搜索打开小程序哟~',
+        })
+      })
+    }
+    downLoadAndUpdateWeChat() {
+      wx.showModal({
+        title: '重要提示',
+        content: '您当前微信版本过低,使用过程可能会不稳定。点击确认立刻升级微信。',
+        success: function(res) {
+          if (res.confirm) {
+            wx.updateWeChatApp({
+              success: function(res) {
+                console.log('res', res)
+              },
+              fail: function(err) {
+                console.log('err', err)
+              },
+            })
+          }
+        }
+      })
+    }
+  }
+
   export default {
     onLaunch: function() {
-      console.log('App Launch')
+      //#ifdef MP-WEIXIN
+      WxUpdate.getInstance()
+      //#endif
     },
     onShow: function() {
-      console.log('App Show')
+      //#ifdef MP-WEIXIN
+      const wxUpdate = WxUpdate.getInstance()
+      wxUpdate.check();
+      //#endif
     },
     onHide: function() {
       console.log('App Hide')

+ 18 - 2
main.js

@@ -17,11 +17,27 @@ App.mpType = 'app'
 Vue.config.warnHandler = function(msg) {
   if (!msg.includes(
       'Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders.'
-      )) { 
-     // uniApp bug: https://ask.dcloud.net.cn/question/71966
+    )) {
+    // uniApp bug: https://ask.dcloud.net.cn/question/71966
     return console.warn && console.warn(msg)
   }
 }
+// 全局注入
+Vue.mixin({
+  computed: {
+    appId: () => store.state.appId,
+    phoneNumber: () => store.state.user.phoneNumber,
+    openId: () => store.state.user.openId,
+    unionId: () => store.state.user.unionId,
+    userInfo: () => store.state.user.userInfo,
+    stationId: () => store.state.station.stationId,
+    selectedGas: () => store.state.station.selectedGas,
+    labelId: () => store.state.station.labelId,
+    employeeId: () => store.state.station.employeeId,
+    orderInfo: () => store.state.order.orderInfo,
+    
+  }
+})
 
 
 const app = new Vue({

+ 5 - 0
manifest.json

@@ -60,6 +60,11 @@
         "usingComponents" : true,
         "uniStatistics" : {
             "enable" : true
+        },
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "获取附近的油站"
+            }
         }
     },
     "mp-alipay" : {

+ 29 - 3
pages.json

@@ -5,12 +5,20 @@
       "^uni-(.*)": "@/uni_modules/uni-$1/components/uni-$1/uni-$1.vue"
     }
   },
-  "pages": [{
+  "pages": [
+    {
+      "path": "pages/list/list",
+      "style": {
+        "navigationBarTitleText": "油站列表",
+        "enablePullDownRefresh": false
+      }
+    },{
     "path": "pages/index/index",
     "style": {
       "navigationBarTitleText": "一键加油"
     }
-  },{
+  },
+    {
     "path": "pages/test/test",
     "style": {
       "navigationBarTitleText": "测试页",
@@ -40,7 +48,25 @@
       "navigationBarTitleText": "订单确认",
       "enablePullDownRefresh": false
     }
-  }],
+  }    ,{
+            "path" : "pages/skip/skip",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/succeed1/succeed1",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
   "globalStyle": {
     "navigationBarTextStyle": "black",
     "navigationBarTitleText": "uni-app",

+ 27 - 7
pages/authen/identity.vue

@@ -21,7 +21,7 @@
       code获取
     </button>
     <button  @click="getCode" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
-      code获取
+      手机号获取
     </button>
     
     <!--  #endif -->
@@ -51,9 +51,19 @@
       }
     },
     computed: {
-      ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
-        "userInfo"
-      ])
+      // ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
+      //   "userInfo"
+      // ]),
+      // ...mapState({
+      //   appId: state => state.appId,
+      //   phoneNumber: state => state.user.phoneNumber,
+      //   // countryCode: state => state.user.countryCode,
+      //   // purePhoneNumber: state => state.user.purePhoneNumber,
+      //   openId: state => state.user.openId,
+      //   unionId: state => state.user.unionId,
+      //   userInfo: state => state.user.userInfo,
+      //   stationId: state => state.station.stationId,
+      // }),
     },
     async created() {
       let [err, loginData] = await uni.login();
@@ -105,6 +115,7 @@
       },
       ...mapMutations({
         updateUserInfo: "updateUserInfo",
+        clearUserInfo: "clearUserInfo"
       }),
       async getUserInfo(res) {
         let userInfo = undefined
@@ -117,24 +128,33 @@
           });
           const profileData = await wx.getUserProfile({
             lang: "zh_CN",
-            desc: "更好的推送体验"
+            desc: "更好的消费推送体验"
           })
           userInfo = profileData.userInfo
+  
+          userInfo = {
+            nickName:userInfo.nickName,
+            avatarUrl:userInfo.avatarUrl,
+            gender:userInfo.gender
+          }
           this.updateUserInfo(userInfo)
           this.getUserInfoLoading = false
           uni.hideLoading();
           const [redirectErr, redirectData] = await uni.redirectTo({
             url: "/pages/authen/login"
           })
-
         } catch (e) {
           this.getUserInfoLoading = false
           uni.hideLoading();
           uni.showToast({
-            title: '授权失败,请刷新小程序'
+            title: '请重新授权~',
+            icon:"error"
           })
+          this.clearUserInfo()
         }
         //#endif
+        
+        
         //#ifdef MP-ALIPAY
         my.getOpenUserInfo({
           fail: (res) => {},

+ 51 - 22
pages/authen/login.vue

@@ -28,10 +28,25 @@
         getPhoneNumberLoading:false
       }
     },
+    async onShow() {
+      // 获得code有效码
+      let [err, loginData] = await uni.login();
+      this.code = loginData.code
+    },
     computed: {
-      ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
-        "userInfo"
-      ])
+      // ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
+      //   "userInfo"
+      // ]),
+      // ...mapState({
+      //   appId: state => state.appId,
+      //   phoneNumber: state => state.user.phoneNumber,
+      //   // countryCode: state => state.user.countryCode,
+      //   // purePhoneNumber: state => state.user.purePhoneNumber,
+      //   openId: state => state.user.openId,
+      //   unionId: state => state.user.unionId,
+      //   userInfo: state => state.user.userInfo,
+      //   stationId: state => state.station.stationId,
+      // }),
     },
     async created() {
       if(this.phoneNumber !== '' && this.openId !== '' && this.unionId !== '' ){
@@ -41,9 +56,8 @@
           return 
       }
       
-      let [err, loginData] = await uni.login();
-      this.code = loginData.code
- 
+      // let [err, loginData] = await uni.login();
+      // this.code = loginData.code
     },
     methods: {
       ...mapMutations({
@@ -52,7 +66,9 @@
         updateUserInfo: "updateUserInfo",
         updatePhoneNumber: "updatePhoneNumber",
         updateCountryCode: "updateCountryCode",
-        updatePurePhoneNumber: "updatePurePhoneNumber"
+        updatePurePhoneNumber: "updatePurePhoneNumber",
+        resetApplet: "resetApplet",
+        clearUserAuthen:"clearUserAuthen"
       }),
       //#ifdef MP-WEIXIN
       async getPhoneNumber(info) {
@@ -64,9 +80,8 @@
         
         if (info.detail.errMsg === "getPhoneNumber:ok") {
           try {
-            console.log(this.code)
-            let loginDataArr = await uni.login();
-            this.code = loginDataArr[1].code
+            // let loginDataArr = await uni.login();
+            // this.code = loginDataArr[1].code
             const iv = info.detail.iv
             const encryptedData = info.detail.encryptedData
             const keyData = await this.$Request({
@@ -78,11 +93,15 @@
               }
             })
             console.log("keyData", keyData)
-            const openId = keyData.openId
+            if(keyData.retCode !== 0){
+              throw new Error("获取加密数据失败")
+            }
+            const openId = keyData.data.openId
             this.updateOpenId(openId)
-            const unionId = keyData.unionId
+            const unionId = keyData.data.unionId
             this.updateUnionId(unionId)
-            const sessionKey = keyData.sessionKey
+            const sessionKey = keyData.data.sessionKey
+            console.log(encryptedData,iv)
             const decryptData = await this.$Request({
               url: "/decryptEncryptedData",
               method: "POST",
@@ -93,24 +112,28 @@
               }
             })
             console.log("decryptData", decryptData)
-            const phoneNumber = decryptData.phoneNumber // 全手机号
-            const countryCode = decryptData.countryCode // 区号
-            const purePhoneNumber = decryptData.purePhoneNumber // 不带区号的手机号
+            if(decryptData.retCode !== 0){
+              throw new Error("获取解密数据失败")
+            }
+            const phoneNumber = decryptData.data.phoneNumber // 全手机号
+            // const countryCode = decryptData.data.countryCode // 区号
+            // const purePhoneNumber = decryptData.data.purePhoneNumber // 不带区号的手机号
+            
             this.updatePhoneNumber(phoneNumber)
-            this.updateCountryCode(countryCode)
-            this.updatePhoneNumber(purePhoneNumber)
+            // this.updateCountryCode(countryCode)
+            // this.updatePhoneNumber(purePhoneNumber)
+            
             const AppUserInfoData = await this.$Request({
               url: "/addAppUserInfo",
               method: "POST",
               data: {
-                "userType": "2",
+                "userType": "1",
                 "openId": this.openId,
                 "blogNickName": this.userInfo.nickName,
                 "sexFlag": this.userInfo.gender === 1 ? 'M' : 'F',
                 "blogProfilePhoto": this.userInfo.avatarUrl,
                 "mobilePhone": this.phoneNumber,
                 "stationId": this.stationId, //油站Id
-                "stationName": this.stationName, //油站名称
                 "unionId": this.unionId
               }
             })
@@ -122,19 +145,25 @@
             uni.navigateBack({
               delta:1
             })
+            
             // console.log(redirectData)
           } catch (e) {
             this.getPhoneNumberLoading = false
             uni.hideLoading();
             uni.showToast({
-              title: '授权失败,请再次尝试一下'
+              title: '请重新授权~',
+              icon:"error"
             })
+            let [err, loginData] = await uni.login();
+            this.code = loginData.code
+            this.clearUserAuthen();            
           }
         } else {
           this.getPhoneNumberLoading = false
           uni.hideLoading();
           uni.showToast({
-            title: '授权拒绝,请登录后操作'
+            title: '请授权登录~',
+            icon:"error"
           })
         }
       },

+ 111 - 104
pages/confirm/confirm.vue

@@ -17,10 +17,10 @@
               <text>油品名:</text><text>{{selectedGas.oilName}}</text>
             </view>
             <view>
-              <text>油站价:</text><text>¥{{selectedGas.oilPrice}}/L</text>
+              <text>油站价:</text><text>¥{{selectedGas.oilPrice}}/{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
             </view>
             <view>
-              <text>优惠价:</text><text>¥{{orderInfo.discountPrice}}/L</text>
+              <text>优惠价:</text><text>¥{{orderInfo.discountPrice}}/{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
             </view>
           </view>
         </view>
@@ -35,15 +35,16 @@
         <view>
           <view class="icon oil"></view>加油升数
         </view>
-        <text>{{orderInfo.oilLiters}}L</text>
+        <text>{{orderInfo.oilLiters}}{{orderInfo.cardOilsType==4 ? "Kg" : "L"}}</text>
       </view>
       <view>
         <view>
           <view class="icon discount"></view>优惠金额
         </view>
-        <text>¥{{(orderInfo.receivableAmt - orderInfo.amt).toFixed(2)}}</text>
+        <text>¥{{payType === 1 ? (+orderInfo.discountAmt_dzk).toFixed(2):(+orderInfo.discountAmt).toFixed(2)}}</text>
       </view>
 
+      <!--      
       <view class="dispose coupon">
         <view class="title">
           <text>优惠券</text>
@@ -56,30 +57,38 @@
         <view class="extra">
           有可用的优惠券 >>
         </view>
-      </view>
-      <view class="dispose dzk">
+      </view> 
+      -->
+      <view class="dispose dzk" @click="selectPayType" v-if="orderInfo.oilsCardFlag == 1">
         <view class="title">
-          <text>电子卡支付</text>
-          <text>立减50元</text>
+          <text>电子卡</text>
+          <text>电子卡支付更优惠</text>
         </view>
         <view class="tip">
           <text class="icon"></text>
-          <text>优惠券和电子卡不可叠加</text>
+          <text v-show="availableCredit">您的{{ cardTypeTranslate[orderInfo.cardOilsType]}}余额<text>{{' ' +  orderInfo.balance + ' '}}</text>元,可用来支付此订单</text>
+          <text v-show="!availableCredit">{{ cardTypeTranslate[orderInfo.cardOilsType] }}余额<text>{{' ' +  orderInfo.balance + ' '}}</text>元,<text>不足以</text>完成此笔订单</text>
         </view>
-        <view class="extra icon" :class="[1 === 1 ? 'selected':'', availableCredit ? '':'forbid']"></view>
+        <view class="extra icon" :class="[payType === 1 ? 'selected':'', availableCredit ? '':'forbid']"></view>
       </view>
-<!--      <view>
+      <!--  
+      <view>
         <view>
           <view class="icon vip"></view>油站会员
         </view>
         <text>立刻开通</text>
-      </view> -->
+      </view> 
+      -->
     </view>
     <view class="submit">
       <view class="area">
-        <text>实付款</text>
-        <text>¥{{orderInfo.amt}}</text>
-        <button class="btn" @click="goSelectPayType" :loading="wxPayLoading" :disabled="wxPayLoading">
+        <text class="type" v-if="orderInfo.oilsCardFlag == 0" @click="selectPayType">实付款</text>
+        <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==2" @click="selectPayType">微信付款</text>
+        <text class="type" v-show="orderInfo.oilsCardFlag == 1 && payType==1" @click="selectPayType">电子卡付款</text>
+        <text class="icon" v-if="orderInfo.oilsCardFlag == 1 && availableCredit" @click="selectPayType"></text>
+        <text class="amount" v-show="payType==2">¥{{orderInfo.amt}}</text>
+        <text class="amount" v-show="payType==1">¥{{orderInfo.amt_dzk}}</text>
+        <button class="btn" @click="goPay" :loading="wxPayLoading" :disabled="wxPayLoading">
           提交订单
         </button>
       </view>
@@ -90,11 +99,11 @@
         </view>
         <view class="amount">
           <text>¥</text>
-          {{ orderInfo.amt }}
+          {{ payType==2 ? orderInfo.amt : orderInfo.amt_dzk}}
         </view>
-        <view class="type">
+        <view class="type" @click="selectPayType">
           <text>付款方式</text>
-          <text>电子卡支付</text>
+          <text> {{ payType==2  ? '微信支付' : '电子卡支付'}}</text>
           <text></text>
         </view>
         <button type="default" class="pay" @click="creditPay" :loading="creditPayLoading">
@@ -102,7 +111,7 @@
         </button>
       </view>
     </uni-popup>
-    <uni-popup ref="selectPayType" class="selectPayType" type="bottom" maskClick="false">
+<!--    <uni-popup ref="selectPayType" class="selectPayType" type="bottom" maskClick="false">
       <view class="cont">
         <view class="close" @click="closeSelectPayType">
         </view>
@@ -124,7 +133,7 @@
           确认
         </button>
       </view>
-    </uni-popup>
+    </uni-popup> -->
     <uni-popup ref="coupon" class="coupon" type="bottom" maskClick="false">
       <view class="coupon-container">
         <view class="close" @click="closeCoupon">
@@ -184,58 +193,57 @@
   export default {
     data() {
       return {
-        creditFlag: false,
-        payType: "", // 1电子卡 2微信
+        payType: 2, // 1电子卡 2微信
         wxPayLoading: false,
-        creditPayLoading: false
+        creditPayLoading: false,
+        cardTypeTranslate:['','汽油卡','柴油卡','非油品卡','LNG','CNG']
       };
     },
     computed: {
-      ...mapState(["orderInfo", "selectedGas", "openId", "stationId"]),
+      // ...mapState(["orderInfo", "selectedGas", "openId", "stationId"]),
+      // ...mapState({
+      //   orderInfo: state => state.order.orderInfo,
+      //   openId: state => state.user.openId,
+      //   stationId: state => state.station.stationId,
+      //   selectedGas: state => state.station.selectedGas,
+      // }),
       availableCredit() {
-        if (this.selectedGas.oilGunType == '2') {
+        if(this.orderInfo.oilsCardFlag == 0){
           return false
         }
-        if ((+this.orderInfo.balance) < (+this.orderInfo.amt)) {
+        if ((+this.orderInfo.balance) < (+this.orderInfo.amt_dzk)) {
           return false
         }
         return true
       },
-      tip() {
-        if (this.selectedGas.oilGunType == '2') {
-          return "非油品不可用电子卡支付"
-        }
-        if ((+this.orderInfo.balance) < (+this.orderInfo.amt)) {
-          if (this.orderInfo.cardOilsType == "1") {
-            return "汽油卡余额不足,请在微信公众号充值"
-          }
-          if (this.orderInfo.cardOilsType == "2") {
-            return "柴油卡余额不足,请在微信公众号充值"
-          }
-        }
-        return "电子卡余额充足,可以使用电子卡支付"
+      creditFlag(){
+        return this.orderInfo.oilsCardFlag == '1' ? true : false
       }
     },
     created() {
-      this.getCreditFlag()
+      // console.log(this.orderInfo)
+      this.initPayType()
     },
     mounted() {
       // this.$refs.pay.close()
       // this.$refs.coupon.open();
     },
     methods: {
+      ...mapMutations(["clearLabelId"]),
+      initPayType(){
+        if(this.orderInfo.oilsCardFlag == 1 && this.availableCredit){
+          this.payType = 1
+        }
+      },
       closeCoupon(){
         this.$refs.coupon.close();
       },
-      async goSelectPayType() {
-        if (!this.creditFlag) { //未启用电子卡
+      async creditPay() {
+        this.creditPayLoading = true;
+        if (this.payType === 2) {
           this.wxPay()
           return
         }
-        this.$refs.selectPayType.open()
-      },
-      async creditPay() {
-        this.creditPayLoading = true;
         uni.showLoading({
           title: '支付中...',
           mask: true
@@ -253,7 +261,7 @@
           }
           this.creditPayLoading = false;
           uni.hideLoading();
-          uni.navigateTo({
+          uni.redirectTo({
             url: "/pages/succeed/succeed"
           })
         } catch (e) {
@@ -262,9 +270,6 @@
           this.showToastAndGoback(e.toString())
         }
       },
-      cancelCreditPay() {
-        this.showToastAndGoback("你取消了电子卡支付")
-      },
       async wxPay() {
         this.wxPayLoading = true;
         uni.showLoading({
@@ -272,37 +277,19 @@
           mask: true
         });
         try {
-          // 因为后期要加入定时删除 所以此步骤来确认数据库里是否有此订单
-          // 如果没有定时删除任务,此步骤冗余
-          const PayOrderData = await this.$Request({
-            url: "/getPayOrderList",
-            data: {
-              "orderNo": this.orderInfo.ordNo,
-              "openId": this.openId,
-              "userType": 2
-            },
-          })
-          console.log(PayOrderData)
-          if (PayOrderData.retCode !== 0) {
-            throw new Error("获取order主键失败")
-          }
-          const orderId = PayOrderData.data[0].orderId
-          // 提供给服务端必要的信息,服务端生成随行付的支付信息,返回回来
           const JhPayData = await this.$Request({
             url: "/getJhPayInfo",
             method: "POST",
             data: {
-              "orderId": orderId,
+              "ordNo": this.orderInfo.ordNo,
               "openId": this.openId,
               "stationId": this.stationId,
-              "subject": this.orderInfo.stationName + "_" + this.selectedGas.oilName + this.selectedGas
-                .oilGunType == "1" ? "油品" : "非油品" + "支付订单",
-              "userType": "2"
+              "userType": "1"
             },
           })
           console.log(JhPayData)
           if (JhPayData.retCode !== 0) {
-            throw new Error("请求聚合支付下单接口失败")
+            throw new Error("请求信息失败")
           }
           if (JhPayData.data.code !== '0000') {
             throw new Error(JhPayData.data.msg)
@@ -324,8 +311,9 @@
 
           if (!!payData && payData.errMsg === "requestPayment:ok") {
             this.wxPayLoading = false;
+            this.clearLabelId();
             uni.hideLoading();
-            uni.navigateTo({
+            uni.redirectTo({
               url: "/pages/succeed/succeed"
             })
             return;
@@ -333,7 +321,7 @@
           this.wxPayLoading = false;
           uni.hideLoading();
           if (payErr.errMsg === "requestPayment:fail cancel") {
-            this.showToastAndGoback("取消了支付")
+            this.showToastAndGoback("取消了支付")
             return;
           }
           this.showToastAndGoback("支付失败")
@@ -354,29 +342,27 @@
           })
         }, 1500)
       },
-      async getCreditFlag() {
-        const PayOrderData = await this.$Request({
-          url: "/getStationCardEnabledFlag",
-          data: {
-            stationId: this.stationId
-          }
-        })
-        console.log(PayOrderData)
-        if (PayOrderData.retCode !== 0) {
-          this.showToastAndGoback("拉取电子卡启用状态失败")
-          return
-        }
-        this.creditFlag = PayOrderData.data == '1' ? true : false
-      },
-      selectPayType(type) {
-        if (!this.availableCredit && type == 1) {
+
+      // selectPayType(type) {
+      //   if (!this.availableCredit && type == 1) {
+      //     return
+      //   }
+      //   if (type === this.payType) {
+      //     this.payType = ""
+      //     return
+      //   }
+      //   this.payType = type
+      // },
+      
+      selectPayType() {
+        if (!this.availableCredit) {
           return
         }
-        if (type === this.payType) {
-          this.payType = ""
+        if (this.payType === 1) {
+          this.payType = 2
           return
         }
-        this.payType = type
+        this.payType = 1
       },
       goPay() {
         if (this.payType === 2) {
@@ -384,17 +370,17 @@
           return
         }
         if (this.payType === 1) {
-          this.$refs.selectPayType.close();
+          // this.$refs.selectPayType.close();
           this.$refs.pay.open()
         }
       },
       backToSelectPayType() {
         this.$refs.pay.close()
-        this.$refs.selectPayType.open();
+        // this.$refs.selectPayType.open();
       },
-      closeSelectPayType() {
-        this.$refs.selectPayType.close();
-      }
+      // closeSelectPayType() {
+      //   this.$refs.selectPayType.close();
+      // }
 
     }
   }
@@ -527,7 +513,6 @@
           }
 
           text.price {
-            font-size: 24rpx;
             color: #F3B235;
             line-height: 33rpx;
           }
@@ -541,7 +526,7 @@
         }
         view.dispose{
           width: 690rpx;
-          height: 138rpx;
+          height: 150rpx;
           position: relative;
           display: inline-block;
           .title{
@@ -579,14 +564,21 @@
               background: url(../../static/icon/tipicon1.png) no-repeat 0px 0px;
               background-size: 100% 100%;
             }
-            text:nth-child(2){
-              width: 220rpx;
+            text:nth-child(2),
+            text:nth-child(3){
               height: 28rpx;
               font-size: 20rpx;
               font-family: PingFangSC-Regular, PingFang SC;
               font-weight: 400;
               color: rgba(0, 0, 0, 0.4);
               line-height: 28rpx;
+              
+              text{
+                  font-size: 27rpx;
+                  font-weight: 800rpx;
+                  // color: #007AFF;
+                  color: #838383;
+              }
             }
           }
         }
@@ -643,19 +635,34 @@
           justify-content: flex-end;
           align-items: center;
 
-          text:nth-child(1) {
+          >.type{
             font-size: 28rpx;
             font-weight: 400;
             color: #111111;
             line-height: 40rpx;
           }
-
-          text:nth-child(2) {
+          >.amount{
             font-size: 30rpx;
             font-weight: 600;
             color: #f3b338;
             line-height: 40rpx;
           }
+          >.icon{
+            background: url(../../static/icon/1_b01_down.2x.png) no-repeat 0px 0px;
+            background-size: 100% 100%;
+            display: inline-block;
+            width: 13rpx;
+            height: 8rpx;
+            line-height: 40rpx;
+            margin-left: 10rpx;
+            margin-right: 15rpx;
+          }
+          // text:nth-child(2) {
+          //   font-size: 30rpx;
+          //   font-weight: 600;
+          //   color: #f3b338;
+          //   line-height: 40rpx;
+          // }
 
           .btn {
             margin-left: 20rpx;

+ 158 - 87
pages/index/index.vue

@@ -3,7 +3,7 @@
     <swiper :indicator-dots="true" indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#ffffff"
       :autoplay="true" :interval="4000" :duration="1000" circular>
       <swiper-item v-for="item in stationPicList" :key="item.id">
-        <image :src="item.url" mode="scaleToFill"></image>
+        <image :src="item" mode="scaleToFill"></image>
       </swiper-item>
     </swiper>
     <view class="box">
@@ -21,15 +21,16 @@
       </view>
       <view class="gun">
         <view v-for="item in cutGasList" @click="selectGas(item)"
-          :class="[item.oilGunId === selectedGas.oilGunId ? 'selected' : '']" :key="item.oilGunId">
+          :class="[item.oilGunId === selectedGas.oilGunId ? 'selected' : '', cutGasList.length === 2 || cutGasList.length ===4 ? 'lengthIs2Or4' : '',cutGasList.length ===1 ? 'lengthIs1' : '' ]"
+          :key="item.oilGunId">
           <text>{{ item.oilGunNo + "号油枪"}}</text>
           <text>{{item.oilName}}</text>
         </view>
-        <view @click="openMoreGun" :class="[showMoreGasSelected? 'selected':'']" v-if="cutGasList.length >= 5">
+        <view @click="openMoreGun" :class="[showMoreGasSelected? 'selected':'']" v-if="gasList.length > 6">
           <text class="more">更多>></text>
         </view>
       </view>
-      <view class="title">
+      <view class="title" @click="changeInputFocus">
         <view class="left">
           输入金额 |
           <text>建议询问加油员后输入</text>
@@ -37,14 +38,8 @@
       </view>
       <view class="amount">
         <view class="inp">
-          <input placeholder="点击输入金额" 
-            confirm-type="done" 
-            type="digit" 
-            step="0.01" 
-            min="0" 
-            @blur="inputAccount"
-            v-model="account"
-           />
+          <input placeholder="点击输入金额" confirm-type="done" type="digit" step="0.01" min="0" @blur="inputAccount"
+            v-model="account" :focus="inputFocusFlag" />
           <text>(元)</text>
         </view>
         <view class="btn">
@@ -54,7 +49,7 @@
           </view>
         </view>
       </view>
-      <view class="tip">
+      <view class="tip" @click="changeInputFocus">
         <image src="../../static/icon/a01-zhuyi.2x.png" mode="scaleToFill"></image>
         <text>请勿在油机旁使用手机</text>
       </view>
@@ -91,6 +86,8 @@
     mapMutations
   } from "vuex";
   import getPermission from "../../util/permission.js"
+  import Parse from "../../util/parse.js"
+
   export default {
     data() {
       return {
@@ -101,17 +98,21 @@
         accountList: [100, 200, 300, 400],
         account: "",
         loading: false,
+        inputFocusFlag: false,
+        employeeList: [],
       }
     },
     created() {
       this.init()
     },
+    async mounted() {
+    },
     computed: {
-      ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
-        "userInfo"
-      ]),
       cutGasList() {
-        return this.gasList.slice(0, 5)
+        if (this.gasList.length > 6) {
+          return this.gasList.slice(0, 5)
+        }
+        return this.gasList.slice(0, 6)
       },
       showMoreGasSelected() {
         if (!this.selectedGas) {
@@ -130,48 +131,105 @@
       }
     },
     methods: {
-      ...mapMutations(["updateOrderInfo", "updateSelectedGas"]),
-      init() {
-        // 轮播图
-        this.$Request({
-          url: "/getStationPicList",
-          method: "GET",
-          data: {
-            stationId: this.stationId
-          }
-        }).then((res) => {
-          if (res.retCode === 0) {
-            this.stationPicList = res.data
-          }
-        })
-        // 通知消息
-        this.$Request({
-          url: "/getStationNoticeInfo",
-          method: "GET",
-          data: {
-            stationId: this.stationId
+      ...mapMutations(["updateOrderInfo", "updateSelectedGas", "resetApplet"]),
+      async init() {
+        // 准入条件
+        if (!this.stationId) {
+          const parse = Parse.getInstance()
+          return parse.scanCode(true,{
+            showCancel: false,
+            content:'亲,请扫码进入~',
+          }).then(()=>{
+            this.init()
+          }).catch((err)=>{}); 
+          // this.scanCode("亲,请扫码进入~").then(()=>{
+          //   this.init()
+          // });
+        }
+
+        try {
+          uni.showLoading({
+            title: '加载中~',
+            mask: true
+          });
+
+          const initDataPro = await this.$Request({
+            url: "/stationOilGunListNew",
+            method: "GET",
+            data: {
+              stationId: this.stationId,
+              personnelId: this.employeeId
+            }
+          })
+          if (initDataPro.retCode != 0) {
+            throw new Error("油站初始化失败")
           }
-        }).then((res) => {
-          if (res.retCode === 0) {
-            this.notice = res.data.notice.toString()
+          this.stationPicList = initDataPro.data.listPic
+          this.notice = initDataPro.data.notice
+          this.gasList = initDataPro.data.stationOilGunList
+          this.employeeList = initDataPro.data.personnalList
+          if (!this.employeeId && this.employeeList.length > 1) {
+            uni.hideLoading()
+            const parse = Parse.getInstance()
+            parse.scanCode(true,{
+              showCancel: true,
+              content:'此站点只能扫码进入~',
+            }).then(()=>{
+              this.init()
+            }).catch((err)=>{
+            
+            });
           }
-        })
 
-        // 获得油枪列表
-        this.$Request({
-          url: "/stationOilGunList",
-          data: {
-            stationId: this.stationId
+          if (this.gasList.length == 1) {
+            this.selectedGas = this.gasList[0]
+            this.updateSelectedGas(this.gasList[0])
           }
-        }).then((res) => {
-          if (res.retCode === 0) {
-            this.gasList = res.data
-          }
-        })
+          uni.hideLoading();
+
+        } catch (e) {
+          //TODO handle the exception
+          uni.hideLoading();
+          uni.showModal({
+            title: '≧▽≦*',
+            content: '矮油,初始化失败',
+            confirmText: "重新进入",
+            showCancel: false,
+            success: function(res) {
+              if (res.confirm) {
+                uni.redirectTo({
+                  url: "/pages/index/index"
+                })
+              }
+            }
+          });
+        }
       },
+      // async scanCode(msg) {
+      //   const showModalPro = await uni.showModal({
+      //     title: '~( ̄▽ ̄)~',
+      //     showCancel: !!this.stationId,
+      //     content: msg || '此站点只能扫码进入~',
+      //     cancelText: '返回',
+      //     confirmText: '立刻扫码',
+      //   })
+      //   if (showModalPro[1].cancel) {
+      //     uni.navigateBack({
+      //       delta: 1
+      //     })
+      //   } else if (showModalPro[1].confirm) {
+      //     const parse = Parse.getInstance()
+      //     return parse.scanCode().catch((err) => {
+      //       return this.scanCode(err)
+      //     });
+      //   }
+      // },
       change(e) {
         this.current = e.detail.current;
       },
+      changeInputFocus() {
+        this.inputFocusFlag = true
+      },
       openMoreGun() {
         this.$refs.popup.open()
       },
@@ -190,58 +248,63 @@
       selectAccount(ele) {
         this.account = ele
       },
-      creatOrder() {
+      async creatOrder() {
         if (!getPermission()) {
           return
         }
+
         this.loading = true
         uni.showLoading({
           title: '订单创建中...',
           mask: true
         });
-        this.$Request({
-          url: "/AddPayOrderInfoNew",
-          method: "POST",
-          data: {
-            "userType": "2",
-            "openId": this.openId,
-            "stationId": this.stationId,
-            "orderType": this.selectedGas.oilGunType, //油品是1 非油品2
-            "receivableAmt": this.account,
-            "oilName": this.selectedGas.oilName,
-            "payType": "wx", //wx 微信 dzk电子卡
-            "oilGun": this.selectedGas.oilGunNo
-          }
-        }).then((res) => {
-          if (res.retCode === 0) {
-            console.log(res.data)
-            this.updateOrderInfo(res.data)
-            this.loading = false
-            uni.hideLoading();
-            uni.navigateTo({
-              url: "/pages/confirm/confirm"
-            })
-          } else {
-            this.loading = false
-            uni.hideLoading();
-            uni.showToast({
-              title: '创建订单失败'
-            })
+
+        try {
+          const addNewOrderPro = await this.$Request({
+            url: "/AddPayOrderInfoNew",
+            method: "POST",
+            data: {
+              "userType": "1",
+              "openId": this.openId,
+              "stationId": this.stationId,
+              "receivableAmt": this.account,
+              "oilName": this.selectedGas.oilName,
+              "oilGun": this.selectedGas.oilGunNo,
+              "labelId": this.labelId,
+              "personnelId": this.employeeId,
+            }
+          })
+
+          if (addNewOrderPro.retCode != 0) {
+            throw new Error("创建失败~")
+            return
           }
-        }).catch((err) => {
-          uni.showToast({
-            title: '创建订单失败'
+          this.loading = false
+          uni.hideLoading();
+          this.updateOrderInfo(addNewOrderPro.data)
+
+          uni.navigateTo({
+            url: "/pages/confirm/confirm"
           })
-        }).finally((res) => {
+
+        } catch (e) {
           this.loading = false
-        })
+          uni.hideLoading();
+          uni.showToast({
+            icon: "error",
+            title: '请重试~'
+          })
+          this.resetApplet();
+        }
       },
       inputAccount(e) {
-        if(isNaN(+ e.detail.value)){
+        this.inputFocusFlag = false;
+        if (isNaN(+e.detail.value)) {
           this.account = ''
           return
         }
-        this.account = (+ e.detail.value).toFixed(2).toString()
+        this.account = (+e.detail.value).toFixed(2).toString()
+
         // // const reg = /^[1-9]{1,}(\.)?([0-9]{0,2})?/ // 最小数额1
         // const reg = /^[0-9]{1,}(\.)?([0-9]{0,2})?/  // 不设置最小数额
         // let res = e.detail.value.match(reg, "");
@@ -389,6 +452,14 @@
             }
           }
 
+          view.lengthIs2Or4 {
+            width: 280rpx;
+          }
+
+          view.lengthIs1 {
+            width: 480rpx;
+          }
+
           view.selected {
             background-color: #0ea374;
 

+ 488 - 0
pages/list/list.vue

@@ -0,0 +1,488 @@
+<template>
+
+  <view class="list">
+    
+    <view class="search">
+      <div class="dist_search">
+        <picker @change="bindPickerChange" :value="cityIndex" :range="cityArr">
+            <view class="district">{{cityArr[cityIndex]}}</view>
+        </picker>
+        <view class="icon"></view>
+      </div>
+      
+      <view class="separate">
+
+      </view>
+      <view class="inp">
+        <view class="icon">
+        </view>
+        <input type="text" v-model="filterCityText" placeholder="请输入油站名称" />
+      </view>
+    </view>
+    
+    <view class="postion">
+      <view class="icon"></view>
+      <view class="current" @click="reGetLocation">
+        当前位置:{{location}}
+      </view>
+      <view class="refresh" @click="refresh">
+      </view>
+    </view> 
+   
+
+    <view class="collection">
+      <view class="station" 
+        v-for="ele in filterCityArr"
+        @click="goBuy($event, ele.stationId)"
+      >
+        <view class="content">
+          <image :src="ele.stationPic" mode=""></image>
+          <view class="detail">
+            <view class="name">{{ ele.stationName }}</view>
+            <view class="other">
+              <text v-show="ele.distance!==undefined">{{ele.distance + ' '}}km | </text> 
+              {{ ' ' + ele.stationAddress }}
+            </view>
+          </view>
+        </view>
+        <view class="footer">
+          <view class="gothere" @click.stop="goThere($event, ele.stationLatitude, ele.stationLongitude)">
+            去这里
+          </view>
+          <view class="separator">|</view>
+          <view class="gobuy" @click.stop="goBuy($event, ele.stationId)">
+            去买单
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import {
+    mapState,
+    mapMutations,
+    mapGetters
+  } from "vuex";
+  import Parse from "../../util/parse.js"
+
+  // import getPermission from "../../util/permission.js"
+  export default {
+    data() {
+      return {
+        // notice: '',
+        stationList: [],
+        filterCityText: '',
+        res: {},
+        // cityArr:['泰安市','济南市'],
+        cityIndex:0,
+        location:'正在拼命拉取中...'
+      }
+    },
+    async created() {
+      // 调试
+      // wx.setEnableDebug({
+      //   enableDebug: true
+      // })
+
+      this.init()
+    },
+    computed: {
+      filterCityArr(){        
+        return this.stationList.filter((ele)=>{
+          if(this.cityArr[this.cityIndex] == '全部'){
+            return ele.stationName.includes(this.filterCityText) || ele.stationAddress.includes(this.filterCityText)
+          }
+          return ele.city === this.cityArr[this.cityIndex] && (ele.stationName.includes(this.filterCityText) || ele.stationAddress.includes(this.filterCityText))
+        })
+      },
+      cityArr(){
+        const cityArrSet = new Set(['全部']);
+        this.stationList.map((ele)=>{
+          cityArrSet.add(ele.city)
+        })
+        return [...cityArrSet]
+      }
+    },
+    methods: {
+      ...mapMutations(["updateStationId","clearEmployeeId"]),
+      test() {
+        console.log(132)
+      },
+      async init() {
+        uni.showLoading({
+          title: '加载中...',
+          mask: true
+        });
+        const oldStationList = this.stationList;
+        const oldLocation = this.location
+        try{
+          this.location = '正在拼命拉取中...'
+          const stationListData = await this.$Request({
+            url: "/getStationListByAppId",
+            method: "GET",
+            data: {
+              appId: this.appId
+            }
+          })
+          if(stationListData.retCode !== 0){
+            throw new Error("初始油站信息失败")
+          }
+          // 单站
+          if(stationListData.data.length === 1){
+            this.updateStationId(stationListData.data[0].stationId)
+            const [redirectErr, redirectData] = await uni.redirectTo({
+              url: "/pages/index/index"
+            })
+            return
+          }
+          this.stationList = stationListData.data;
+          const locationData = await uni.getLocation()
+          if(locationData[0] !== null && locationData[0].errMsg === 'getLocation:fail auth deny' ){
+            // 用户拒绝位置
+            this.location = "您拒绝了授权~"
+            uni.hideLoading();
+            return
+          }else if(locationData[0] !== null && locationData[0].errMsg === 'getLocation:fail 频繁调用会增加电量损耗,可考虑使用 wx.onLocationChange 监听地理位置变化' ){
+            // 频繁调用时兼容处理
+            this.location = oldLocation
+            this.stationList = oldStationList
+            uni.hideLoading();
+            return
+          }else if(locationData[0] !== null && locationData[0].errMsg === 'getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF' ){
+            this.location = "您的手机未开启定位"
+            uni.hideLoading();
+            return
+          }else if(locationData[0] !== null){
+            this.location = "没有获取到您的位置"
+            uni.hideLoading();
+            return
+          }
+          
+          const stationLocationData = await this.$Request({
+            url: "/getStationInfoListNew",
+            method: "GET",
+            data: {
+              stationLongitude:locationData[1].longitude,
+              stationLatitude: locationData[1].latitude,
+              pageNum: 1,
+              pageSize:1000,
+              appId: this.appId
+            }
+          })
+
+          if(stationLocationData.retCode !== 0){
+            throw new Error("获取定位信息失败")
+          }
+          this.stationList = stationLocationData.data.stationInfoResponseList
+          this.location = stationLocationData.data.address
+          // const stationLocationListData = await this.$Request({
+          //   url: "/getStationInfoList",
+          //   method: "GET",
+          //   data: {
+          //     stationLongitude:locationData[1].longitude,
+          //     stationLatitude: locationData[1].latitude,
+          //     pageNum: 1,
+          //     pageSize:1000,
+          //     appId: this.appId
+          //   }
+          // })
+          
+          // if(stationLocationListData.retCode !== 0){
+          //   throw new Error("获取详细油站信息失败")
+          // }
+          // this.stationList = stationLocationListData.data.stationInfoResponseList
+          
+          uni.hideLoading();
+        }catch(e){
+          // uni.hideLoading();
+          uni.showToast({
+            title: e
+          })
+        }
+      },
+      goBuy(e, stationId) {
+        e.stopPropagation()
+        this.updateStationId(stationId)
+        this.clearEmployeeId()
+        uni.navigateTo({
+          url: "/pages/index/index"
+        })
+        return
+      },
+      goThere(e, latitude, longitude) {
+        e.stopPropagation()
+        uni.openLocation({
+          latitude: parseFloat(latitude),
+          longitude: parseFloat(longitude),
+          success: function() {
+            console.log('success');
+          }
+        });
+      },
+      async refresh(){
+        // uni.getSetting({
+        //    success(res) {
+        //       console.log(res.authSetting)
+        //    }
+        // })
+        this.init()
+      },
+      async reGetLocation(){
+        const that = this
+        // try{
+          const getSetPro = await uni.getSetting()
+          if(getSetPro[0] === null){
+            if(!getSetPro[1].authSetting['scope.userLocation']){
+              uni.openSetting({
+                success(res) {
+                  if(res.authSetting['scope.userLocation']){
+                    that.refresh();
+                  }else{
+                    uni.showToast({
+                      icon:'error',
+                      title:'还没授权呦~',
+                      mask: true
+                    })
+                  }
+                }
+              })
+            }else{
+              that.refresh()
+            }
+          }else{
+            throw new Error("")
+          }
+          
+        // }catch(e){
+        //   uni.showToast({
+        //     icon:'error',
+        //     title:'授权时出错~',
+        //     duration:1200,
+        //     mask: true
+        //   })
+        //   setTimeout(()=>{
+        //     that.refresh();
+        //   },1600)
+        // } 
+      },
+      bindPickerChange(e){
+        this.cityIndex = e.detail.value
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  page {
+    .list {
+      padding: 30rpx;
+      background: #F6F6F6;
+      height: 100vh;
+
+      .search {
+        width: 690rpx;
+        height: 80rpx;
+        background: #FFFFFF;
+        box-shadow: 0px 2rpx 9rpx 4rpx rgba(99, 99, 99, 0.1);
+        border-radius: 40rpx;
+        // position: relative;
+        display:flex; 
+        flex-direction: row; 
+        justify-content:space-around;
+        align-items: center;
+        
+        
+        .dist_search {
+          // position: absolute;
+          // top: 20rpx;
+          // left: 30rpx;
+          // width: 100%;
+          height: 80rpx;
+          max-width: 130rpx;
+          white-space: nowrap;
+          display: flex;
+          margin-left: 20rpx;
+
+          .district {
+            height: 80rpx;
+            font-size: 28rpx;
+            font-weight: bold;
+            color: #111111;
+            line-height: 80rpx;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            max-width: 110rpx;
+          }
+
+          >.icon {
+            background: url(../../static/icon/1_b01_down.2x.png) no-repeat 0px 0px;
+            background-size: 100% 100%;
+            width: 13rpx;
+            height: 8rpx;
+            line-height: 80rpx;
+            margin-top: 38rpx;
+            margin-left: 10rpx;
+          }
+        }
+
+        .separate {
+          width: 1rpx;
+          height: 35rpx;
+          border: .5rpx solid #CCCCCC;
+          box-sizing: border-box;
+          // position: absolute;
+          // top: 20rpx;
+          // left: 180rpx;
+        }
+
+        .inp {
+          // position: absolute;
+          // top: 15rpx;
+          // left: 200rpx;
+          width: 450rpx;
+          height: 80rpx;
+          // position: relative;
+          
+
+          .icon {
+            display: inline-block;
+            background: url(../../static/icon/1_b01_search.2x.png) no-repeat 0px 0px;
+            background-size: 100% 100%;
+            width: 26rpx;
+            height: 26rpx;
+            margin-bottom: 25rpx;
+            // // top: 162rpx;
+            // position: absolute;
+            // top: 27rpx;
+          }
+
+          >input {
+            display: inline-block;
+            margin-left: 20rpx;
+            width: 310rpx;
+            height: 80rpx;
+            line-height: 80rpx;
+          }
+        }
+      }
+
+      .postion {
+        margin: 30rpx 30rpx 0 30rpx ;
+        
+        .icon {
+          background: url(../../static/icon/1_b01_location.2x.png) no-repeat 0px 0px;
+          background-size: 100% 100%;
+          width: 33rpx;
+          height: 35rpx;
+          display: inline-block;
+        }
+
+        .current {
+          margin-left: 20rpx;
+          display: inline-block;
+          height: 40rpx;
+          font-size: 28rpx;
+          color: #868686;
+          line-height: 40rpx;
+          max-width: 550rpx;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+        }
+
+        .refresh {
+          background: url(../../static/icon/icon_shuaxin.2x.png) no-repeat 0px 0px;
+          background-size: 100% 100%;
+          // background-color: #868686;
+          margin-top: 5rpx;
+          width: 27rpx;
+          height: 27rpx;
+          float: right;
+        }
+
+      }
+
+      .collection {
+        margin-top: 30rpx;
+
+        .station {
+          margin-bottom: 30rpx;
+          // padding: 30rpx;
+          padding: 40rpx;
+          width: 690rpx;
+          height: 285rpx;
+          background: #FFFFFF;
+          box-shadow: 0px 2rpx 9rpx 4rpx rgba(99, 99, 99, 0.1);
+          border-radius: 18rpx;
+          box-sizing: border-box;
+
+          .content {
+            display: flex;
+
+            >image {
+              width: 155rpx;
+              height: 155rpx;
+              display: inline-block;
+            }
+
+            .detail {
+              margin-left: 20rpx;
+              width: 450rpx;
+              height: 155rpx;
+              display: inline-block;
+
+              .name {
+                height: 45rpx;
+                font-size: 32rpx;
+                font-weight: bold;
+                color: #111111;
+                line-height: 45rpx;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+              }
+            }
+
+          }
+
+          .footer {
+            margin-top: 40rpx;
+            display: flex;
+            justify-content: space-around;
+
+            .gothere {
+              height: 40rpx;
+              width: 250rpx;
+              font-size: 28rpx;
+              font-weight: bold;
+              color: #6c6c6c;
+              line-height: 40rpx;
+              text-align: center;
+            }
+
+            .separator {
+              // width: 1px;
+              // height: 46rpx;
+              // border: 1px solid #CCCCCC;
+              color: #CCCCCC;
+            }
+
+            .gobuy {
+              height: 40rpx;
+              font-size: 28rpx;
+              font-weight:bold;
+              width: 250rpx;
+              color: #F3B235;
+              line-height: 40rpx;
+              text-align: center;
+            }
+          }
+        }
+      }
+    }
+
+  }
+</style>

+ 143 - 0
pages/skip/skip.vue

@@ -0,0 +1,143 @@
+<template>
+  <view class="skip">
+    <view class="bg">
+    </view>
+    <view class="text">
+      {{ tip }}
+    </view>
+  </view>
+</template>
+
+<script>
+  import {
+    mapState,
+    mapMutations
+  } from "vuex";
+  import Base64 from "../../util/base64.js"
+  import Parse from "../../util/parse.js"
+
+  export default {
+    data() {
+      return {
+        tip: "跳转中,请稍后..."
+      }
+    },
+    computed: {
+      // ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
+      //   "userInfo"
+      // ]),
+    },
+    created() {
+      uni.showLoading({
+        title: '跳转中...',
+        mask: true
+      });
+    },
+    async onLoad(e) {
+      const res = decodeURIComponent(e.q)
+      const parse = new Parse.getInstance();
+      const info = await parse.parseCode(res).catch((e) => {
+        uni.hideLoading()
+        return parse.scanCode(true, {
+          title: '( •̀ ω •́ )✧',
+          showCancel: false,
+          content: '亲,您扫的码不对哦~',
+          confirmText: '重新扫码',
+        })
+      })
+      this.goIndex();
+    },
+    methods: {
+      ...mapMutations(["updateStationId", "updateLabelId", "updateEmployeeId"]),
+      goIndex() {
+        uni.hideLoading();
+        uni.redirectTo({
+          url: "/pages/index/index"
+        })
+      },
+      goList() {
+        uni.hideLoading();
+        uni.redirectTo({
+          url: "/pages/list/list"
+        })
+      },
+      async parseCode(msg) {
+        const showModalPro = await uni.showModal({
+          title: '( •̀ ω •́ )✧',
+          showCancel: false,
+          content: '亲,扫码错误哦~',
+          confirmText: '重新扫码',
+        })
+        const scanCodePro = await uni.scanCode({
+          onlyFromCamera: true
+        })
+        // try {
+        //   const parse = new Parse.getInstance();
+        //   const info = await parse.start(res)
+        //   return Promise.resolve(info)
+        // } catch (e) {
+        //   const showModalPro = await uni.showModal({
+        //     title: '(~ ̄▽ ̄)~',
+        //     showCancel: false,
+        //     content: '您扫的二维码错误~',
+        //     confirmText: '重新扫码',
+        //   })
+        //   const scanCodePro = await uni.scanCode({
+        //     onlyFromCamera: true
+        //   })
+        //   this.scanCode();
+        // }
+      },
+      async scanCode() {
+        const showModalPro = await uni.showModal({
+          title: '(~ ̄▽ ̄)~',
+          showCancel: !!this.stationId,
+          content: msg || '此站点只能扫码进入~',
+          cancelText: '返回',
+          confirmText: '立刻扫码',
+        })
+        const parse = Parse.getInstance()
+        if (showModalPro[1].cancel) {
+          uni.navigateBack({
+            delta: 1
+          })
+        } else if (showModalPro[1].confirm) {
+          const parse = Parse.getInstance()
+          return parse.scanCode().catch((err) => {
+            return this.scanCode(err)
+          });
+        }
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  page {
+    .skip {
+      position: relative;
+
+      .bg {
+        // background: url(../../static/icon/1_b01_down.2x.png) no-repeat 0px 0px;
+        background: url(../../static/icon/goto.png) no-repeat 0px 0px;
+        background-size: 100% 100%;
+        width: 182rpx;
+        height: 216rpx;
+        position: absolute;
+        top: 238rpx;
+        left: 270rpx;
+      }
+
+      .text {
+        font-size: 40rpx;
+        width: 750rpx;
+        text-align: center;
+        font-weight: 550;
+        color: #000000;
+        line-height: 56rpx;
+        position: absolute;
+        top: 522rpx;
+      }
+    }
+  }
+</style>

+ 333 - 0
pages/succeed1/succeed1.vue

@@ -0,0 +1,333 @@
+<template>
+  <view class="succeed">
+    <view class="bg">
+      支付成功
+    </view>
+    <view class="container">
+
+      <view class="voucher">
+        <view class="title">支付凭证</view>
+        <view class="tip">请主动提供给加油员查看</view>
+        <view class="dashed">
+        </view>
+        <view class="arch">
+          <text></text>
+          <text></text>
+        </view>
+        <view class="content">
+          <view class="oil">
+            <text>油品</text>
+            <text>92#</text>
+          </view>
+          <view class="origin">
+            <text>应付</text>
+            <text>¥10.00</text>
+          </view>
+          <view class="amt">
+            <text>实付</text>
+            <text>¥11.20</text>
+          </view>
+          <view class="time">
+            <text>时间</text>
+            <text>11:20:00</text>
+          </view>
+        </view>
+
+      </view>
+
+      <view class="">
+        <view class="focus"> 更多优惠,请关注我们的公众号 </view>
+        <official-account class="official"></official-account>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import {
+    mapState,
+    mapMutations
+  } from "vuex";
+
+  export default {
+    data() {
+      return {
+        payType: 2, // 1电子卡 2微信
+        wxPayLoading: false,
+        creditPayLoading: false,
+        cardTypeTranslate: ['', '汽油卡', '柴油卡', '非油品卡', 'LNG', 'CNG']
+      };
+    },
+    computed: {
+      // ...mapState(["orderInfo", "selectedGas", "openId", "stationId"]),
+      // ...mapState({
+      //   orderInfo: state => state.order.orderInfo,
+      //   openId: state => state.user.openId,
+      //   stationId: state => state.station.stationId,
+      //   selectedGas: state => state.station.selectedGas,
+      // }),
+      availableCredit() {
+        if (this.orderInfo.oilsCardFlag == 0) {
+          return false
+        }
+        if ((+this.orderInfo.balance) < (+this.orderInfo.amt_dzk)) {
+          return false
+        }
+        return true
+      },
+      creditFlag() {
+        return this.orderInfo.oilsCardFlag == '1' ? true : false
+      }
+    },
+    created() {
+      // console.log(this.orderInfo)
+      // this.initPayType()
+    },
+    mounted() {
+      // this.$refs.pay.close()
+      // this.$refs.coupon.open();
+    },
+    methods: {
+      ...mapMutations(["clearLabelId"]),
+      initPayType() {
+        if (this.orderInfo.oilsCardFlag == 1 && this.availableCredit) {
+          this.payType = 1
+        }
+      },
+      closeCoupon() {
+        this.$refs.coupon.close();
+      },
+      async creditPay() {
+        this.creditPayLoading = true;
+        if (this.payType === 2) {
+          this.wxPay()
+          return
+        }
+        uni.showLoading({
+          title: '支付中...',
+          mask: true
+        });
+        try {
+          const creditPayData = await this.$Request({
+            url: "/dzkPaySet",
+            data: {
+              "ordNo": this.orderInfo.ordNo
+            },
+          })
+          console.log(creditPayData)
+          if (creditPayData.retCode !== 0) {
+            throw new Error(creditPayData.message)
+          }
+          this.creditPayLoading = false;
+          uni.hideLoading();
+          uni.redirectTo({
+            url: "/pages/succeed/succeed"
+          })
+        } catch (e) {
+          this.creditPayLoading = false;
+          uni.hideLoading();
+          this.showToastAndGoback(e.toString())
+        }
+      },
+      async wxPay() {
+        this.wxPayLoading = true;
+        uni.showLoading({
+          title: '拉取支付...',
+          mask: true
+        });
+        try {
+          const JhPayData = await this.$Request({
+            url: "/getJhPayInfo",
+            method: "POST",
+            data: {
+              "ordNo": this.orderInfo.ordNo,
+              "openId": this.openId,
+              "stationId": this.stationId,
+              "userType": "1"
+            },
+          })
+          console.log(JhPayData)
+          if (JhPayData.retCode !== 0) {
+            throw new Error("请求信息失败")
+          }
+          if (JhPayData.data.code !== '0000') {
+            throw new Error(JhPayData.data.msg)
+          }
+
+          let timeStamp = JhPayData.data.respData.payTimeStamp;
+          let nonceStr = JhPayData.data.respData.paynonceStr;
+          let payPackage = JhPayData.data.respData.payPackage;
+          let signType = JhPayData.data.signType;
+          let paySign = JhPayData.data.respData.paySign;
+          // 填写随行付的信息,启动支付
+          const [payErr, payData] = await uni.requestPayment({
+            'timeStamp': timeStamp,
+            'nonceStr': nonceStr,
+            'package': payPackage,
+            'signType': signType,
+            'paySign': paySign,
+          })
+
+          if (!!payData && payData.errMsg === "requestPayment:ok") {
+            this.wxPayLoading = false;
+            this.clearLabelId();
+            uni.hideLoading();
+            uni.redirectTo({
+              url: "/pages/succeed/succeed"
+            })
+            return;
+          }
+          this.wxPayLoading = false;
+          uni.hideLoading();
+          if (payErr.errMsg === "requestPayment:fail cancel") {
+            this.showToastAndGoback("取消了支付")
+            return;
+          }
+          this.showToastAndGoback("支付失败")
+        } catch (e) {
+          this.wxPayLoading = false;
+          uni.hideLoading();
+          this.showToastAndGoback(e.message)
+        }
+      },
+      showToastAndGoback(title) {
+        uni.showToast({
+          title,
+          mask: true
+        })
+        setTimeout(() => {
+          uni.navigateBack({
+            delta: 1
+          })
+        }, 1500)
+      },
+
+      // selectPayType(type) {
+      //   if (!this.availableCredit && type == 1) {
+      //     return
+      //   }
+      //   if (type === this.payType) {
+      //     this.payType = ""
+      //     return
+      //   }
+      //   this.payType = type
+      // },
+
+      selectPayType() {
+        if (!this.availableCredit) {
+          return
+        }
+        if (this.payType === 1) {
+          this.payType = 2
+          return
+        }
+        this.payType = 1
+      },
+      goPay() {
+        if (this.payType === 2) {
+          this.wxPay()
+          return
+        }
+        if (this.payType === 1) {
+          // this.$refs.selectPayType.close();
+          this.$refs.pay.open()
+        }
+      },
+      backToSelectPayType() {
+        this.$refs.pay.close()
+        // this.$refs.selectPayType.open();
+      },
+      // closeSelectPayType() {
+      //   this.$refs.selectPayType.close();
+      // }
+
+    }
+  }
+</script>
+
+<style lang="scss">
+  page {
+    width: 750rpx;
+    background: #F2F2F2;
+
+    .succeed {
+      .bg {
+        width: 750rpx;
+        height: 352rpx;
+        background: #0ca674;
+      }
+
+      // 占位元素
+      .container {
+        width: 690rpx;
+        margin: 0 auto;
+        margin-top: -150rpx;
+
+        .voucher {
+          width: 690rpx;
+          height: 540rpx;
+          background: #FFFFFF;
+          border-radius: 14rpx;
+          box-sizing: border-box;
+          padding: 21rpx;
+          box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.1);
+
+          .title {
+            height: 44rpx;
+            font-size: 33rpx;
+            font-family: PingFangSC-Semibold, PingFang SC;
+            font-weight: bolder;
+            color: #1C1C27;
+            line-height: 44rpx;
+            text-align: center;
+          }
+
+          .tip {
+            height: 34rpx;
+            font-size: 30rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: bold;
+            color: #F63932;
+            line-height: 34rpx;
+            text-align: center;
+            margin-top: 30rpx;
+          }
+
+          .dashed {
+            width: 500rpx;
+            border: 2rpx dashed #c0c0c0;
+            margin: 20rpx auto 0 auto;
+          }
+          .content{
+            height: 300rpx;
+            display: flex;
+            flex-direction: column;
+            justify-content: space-between;
+            margin: 40rpx 80rpx 0 80rpx;
+            
+            >view{
+              display: flex;
+              justify-content: space-between;
+              align-items: center;
+              
+              
+              text:nth-child(1){
+                font-size: 33rpx;
+                font-weight: bold;
+                color: #1C1C27;
+                line-height: 40rpx;
+              }
+              text:nth-child(2){
+                font-size: 33rpx;
+                font-weight: bold;
+                color: rgba(0, 0, 0, 0.5);
+                line-height: 40rpx;
+                color: #1C1C27;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 84 - 33
pages/test/test.vue

@@ -1,51 +1,102 @@
 <template>
-  <view class="content">
-    <button @click="open">打开弹窗</button>
+    <view>
+        <view class="uni-title uni-common-pl">地区选择器</view>
+        <view class="uni-list">
+            <view class="uni-list-cell">
+                <view class="uni-list-cell-left">
+                    当前选择
+                </view>
+                <view class="uni-list-cell-db">
+                    <picker @change="bindPickerChange" :value="index" :range="array">
+                        <view class="uni-input">{{array[index]}}</view>
+                    </picker>
+                </view>
+            </view>
+        </view>
 
-  </view>
+        <view class="uni-title uni-common-pl">时间选择器</view>
+        <view class="uni-list">
+            <view class="uni-list-cell">
+                <view class="uni-list-cell-left">
+                    当前选择
+                </view>
+                <view class="uni-list-cell-db">
+                    <picker mode="time" :value="time" start="09:01" end="21:01" @change="bindTimeChange">
+                        <view class="uni-input">{{time}}</view>
+                    </picker>
+                </view>
+            </view>
+        </view>
+
+        <view class="uni-title uni-common-pl">日期选择器</view>
+        <view class="uni-list">
+            <view class="uni-list-cell">
+                <view class="uni-list-cell-left">
+                    当前选择
+                </view>
+                <view class="uni-list-cell-db">
+                    <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+                        <view class="uni-input">{{date}}</view>
+                    </picker>
+                </view>
+            </view>
+        </view>
+    </view>
 </template>
 <script>
   import {
     mapState,
     mapGetters
   } from 'vuex'
-  export default {
-    name: "hah",
+export default {
     data() {
-      return {
-        code: ""
-      }
-    },
-    async created() {
-      this.$Request({
-        url: "/getStationNoticeInfo",
-        method: 'GET',
-        data: {
-          stationId: this.$store.state.stationId
+        const currentDate = this.getDate({
+            format: true
+        })
+        return {
+            title: 'picker',
+            array: ['中国', '美国', '巴西', '日本'],
+            index: 0,
+            date: currentDate,
+            time: '12:01'
         }
-      }).then((res) => {})
-      let [err, loginData] = await uni.login();
-      this.code = loginData.code
     },
     computed: {
-      ...mapState({
-        text: state => state.moduleA.text,
-        timestamp: state => state.moduleB.timestamp,
-      }),
-      ...mapState(["appId", "stationId", "phoneNumber", "countryCode", "purePhoneNumber", "openId", "unionId",
-        "userInfo"
-      ]),
-      ...mapGetters([
-        'timeString'
-      ])
+        startDate() {
+            return this.getDate('start');
+        },
+        endDate() {
+            return this.getDate('end');
+        }
     },
     methods: {
-      open() {
-        // 通过组件定义的ref调用uni-popup方法
-        this.$refs.popup.open()
-      }
+        bindPickerChange: function(e) {
+            console.log('picker发送选择改变,携带值为', e.target.value)
+            this.index = e.target.value
+        },
+        bindDateChange: function(e) {
+            this.date = e.target.value
+        },
+        bindTimeChange: function(e) {
+            this.time = e.target.value
+        },
+        getDate(type) {
+            const date = new Date();
+            let year = date.getFullYear();
+            let month = date.getMonth() + 1;
+            let day = date.getDate();
+
+            if (type === 'start') {
+                year = year - 60;
+            } else if (type === 'end') {
+                year = year + 2;
+            }
+            month = month > 9 ? month : '0' + month;
+            day = day > 9 ? day : '0' + day;
+            return `${year}-${month}-${day}`;
+        }
     }
-  }
+}
 </script>
 <style lang="scss">
   uni-popup {

+ 11 - 3
settings.js

@@ -29,10 +29,18 @@
 // const BASE_URL = 'http://localhost:8082'
 
 export default {
-  prefix:"/demo",
+  prefix:"demo",
+  // prefix:"prod",
+  // appId:"wxc0c46d44831aeeba",
+  // base_url:"https://www.huijy.net",
+  base_url:"https://mp.huijy.net",
+  // base_url:"192.168.31.99"
+  
+  // prefix:"prod",
+  // appId:"wx34dd5a7c8c5be1ef",
   appId:"wxe1135cd390b38a54",
-  stationId:1,
-  base_url:"https://www.huijy.net"
+  // appId:"wxc0c46d44831aeeba",
+  // base_url:"https://www.huijy.net"
 } 
 
 

BIN
static/icon/1_b01_down.2x.png


BIN
static/icon/1_b01_location.2x.png


BIN
static/icon/1_b01_search.2x.png


BIN
static/icon/goto.png


BIN
static/icon/icon_shuaxin.2x.png


BIN
store/Tomcat.lnk


+ 91 - 45
store/index.js

@@ -1,66 +1,112 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 import settings from "@/settings.js"
-import moduleA from '@/store/modules/moduleA'
-import moduleB from '@/store/modules/moduleB'
+import user from '@/store/modules/user'
+import order from '@/store/modules/order'
+import station from '@/store/modules/station'
 
 Vue.use(Vuex)
 export default new Vuex.Store({
   state: {
-    text: "我是moduleA模块下state.text的值",
     appId: settings.appId,
-    stationId: settings.stationId,
-    phoneNumber:uni.getStorageSync('phoneNumber') || "",
-    countryCode:uni.getStorageSync('countryCode') || "",
-    purePhoneNumber:uni.getStorageSync('purePhoneNumber') || "",
-    openId: uni.getStorageSync('openId') || "",
-    unionId: uni.getStorageSync('unionId') || "",
-    userInfo: !uni.getStorageSync('userInfo') ? {} : JSON.parse(uni.getStorageSync('userInfo')),
-    orderInfo:undefined,
-    selectedGas:undefined
+    // stationId: settings.stationId,
+    // phoneNumber:uni.getStorageSync('phoneNumber') || "",
+    // countryCode:uni.getStorageSync('countryCode') || "",
+    // purePhoneNumber:uni.getStorageSync('purePhoneNumber') || "",
+    // openId: uni.getStorageSync('openId') || "",
+    // unionId: uni.getStorageSync('unionId') || "",
+    // userInfo: !uni.getStorageSync('userInfo') ? {} : JSON.parse(uni.getStorageSync('userInfo')),
+    // orderInfo:undefined,
+    // selectedGas:undefined,
+    // labelId:undefined,
+    // employeeId:undefined,
+    
   },
   getters: {
-
   },
   mutations: {
-    updatePhoneNumber(state, phoneNumber) {
-      uni.setStorageSync('phoneNumber', phoneNumber);
-      state.phoneNumber = phoneNumber
-    },
-    updateCountryCode(state, countryCode) {
-      uni.setStorageSync('countryCode', countryCode);
-      state.countryCode = countryCode
-    },
-    updatePurePhoneNumber(state, purePhoneNumber) {
-      uni.setStorageSync('phoneNumber', phoneNumber);
-      state.purePhoneNumber = purePhoneNumber
-    },
-    updateOpenId(state, openId) { 
-      uni.setStorageSync('openId', openId);
-      state.openId = openId
-    },
-    updateUnionId(state, unionId) { 
-      uni.setStorageSync('unionId', unionId);
-      state.unionId = unionId
-    },
-    updateUserInfo(state, userInfo) {      
-      uni.setStorageSync('userInfo', JSON.stringify(userInfo));
-      state.userInfo = userInfo
-    },
-    updateOrderInfo(state, orderInfo){
-      state.orderInfo = orderInfo
-    },
-    updateSelectedGas(state, selectedGas){
-      state.selectedGas = selectedGas
-    }
+    // updatePhoneNumber(state, phoneNumber) {
+    //   uni.setStorageSync('phoneNumber', phoneNumber);
+    //   state.phoneNumber = phoneNumber
+    // },
+    // updateCountryCode(state, countryCode) {
+    //   uni.setStorageSync('countryCode', countryCode);
+    //   state.countryCode = countryCode
+    // },
+    // updatePurePhoneNumber(state, purePhoneNumber) {
+    //   uni.setStorageSync('phoneNumber', phoneNumber);
+    //   state.purePhoneNumber = purePhoneNumber
+    // },
+    // updateOpenId(state, openId) { 
+    //   uni.setStorageSync('openId', openId);
+    //   state.openId = openId
+    // },
+    // updateUnionId(state, unionId) {
+    //   uni.setStorageSync('unionId', unionId);
+    //   state.unionId = unionId
+    // },
+    
+    // clearUserAuthen(state){
+    //   uni.removeStorageSync('phoneNumber')
+    //   uni.removeStorageSync('countryCode')
+    //   uni.removeStorageSync('purePhoneNumber')
+    //   uni.removeStorageSync('openId')
+    //   uni.removeStorageSync('unionId')
+    //   state.phoneNumber = ''
+    //   state.countryCode = ''
+    //   state.purePhoneNumber = ''
+    //   state.openId = ''
+    //   state.unionId = ''
+    // },
     
+    // updateUserInfo(state, userInfo) {      
+    //   uni.setStorageSync('userInfo', JSON.stringify(userInfo));
+    //   state.userInfo = userInfo
+    // },
+    // clearUserInfo(state) {
+    //   uni.removeStorageSync('userInfo')
+    //   state.userInfo = {}
+    // },
     
+    // updateOrderInfo(state, orderInfo){
+    //   state.orderInfo = orderInfo
+    // },
+    // updateSelectedGas(state, selectedGas){
+    //   state.selectedGas = selectedGas
+    // },
+    // updateStationId(state, stationId){
+    //   state.stationId = stationId
+    // },
+    // updateLabelId(state, labelId) {
+    //   state.labelId = labelId
+    // },
+    // clearLabelId(state){
+    //   state.labelId = undefined
+    // },
+    // resetApplet(state){
+    //   uni.clearStorageSync()
+    //   state.phoneNumber = ''
+    //   state.countryCode = ''
+    //   state.purePhoneNumber = ''
+    //   state.countryCode = ''
+    //   state.purePhoneNumber = ''
+    //   state.openId = ""
+    //   state.unionId = ""
+    //   state.userInfo = {}
+    // },
+    // updateEmployeeId(state, employeeId){
+    //   state.employeeId = employeeId
+    // },
+    // clearEmployeeId(state){
+    //   state.employeeId = undefined
+    // }
   },
   actions: {
 
   },
   modules: {
-    moduleA,
-    moduleB
+    user,
+    order,
+    station
   }
 })

+ 0 - 14
store/modules/moduleA.js

@@ -1,14 +0,0 @@
-export default {
-    state: {
-        text:"我是moduleA模块下state.text的值"
-    },
-    getters: {
-
-    },
-    mutations: {
-
-    },
-    actions: { 
-
-    }
-}

+ 0 - 27
store/modules/moduleB.js

@@ -1,27 +0,0 @@
-export default {
-    state: {
-        timestamp: 1608820295//初始时间戳
-    },
-    getters: {
-        timeString(state) {//时间戳转换后的时间
-            var date = new Date(state.timestamp);
-            var year = date.getFullYear();
-            var mon  = date.getMonth()+1;
-            var day  = date.getDate();
-            var hours = date.getHours();
-            var minu = date.getMinutes();
-            var sec = date.getSeconds();
-            var trMon = mon<10 ? '0'+mon : mon
-            var trDay = day<10 ? '0'+day : day
-            return year+'-'+trMon+'-'+trDay+" "+hours+":"+minu+":"+sec;
-        }
-    },
-    mutations: {
-        updateTime(state){//更新当前时间戳
-            state.timestamp = Date.now()
-        }
-    },
-    actions: {
-
-    }
-}

+ 14 - 0
store/modules/order.js

@@ -0,0 +1,14 @@
+export default {
+  state: {
+    orderInfo: undefined,
+  },
+  getters: {},
+  mutations: {
+    updateOrderInfo(state, orderInfo) {
+      state.orderInfo = orderInfo
+    },    
+  },
+  actions: {
+
+  }
+}

+ 33 - 0
store/modules/station.js

@@ -0,0 +1,33 @@
+export default {
+  state: {
+    stationId: undefined,
+    labelId:undefined,
+    employeeId:undefined,
+    selectedGas:undefined,
+  },
+  getters: {
+  },
+  mutations: {
+    updateStationId(state, stationId){
+      state.stationId = stationId
+    },
+    updateSelectedGas(state, selectedGas){
+      state.selectedGas = selectedGas
+    },
+    updateLabelId(state, labelId) {
+      state.labelId = labelId
+    },
+    clearLabelId(state){
+      state.labelId = undefined
+    },
+    updateEmployeeId(state, employeeId){
+      state.employeeId = employeeId
+    },
+    clearEmployeeId(state){
+      state.employeeId = undefined
+    }
+  },
+  actions: {
+
+  }
+}

+ 67 - 0
store/modules/user.js

@@ -0,0 +1,67 @@
+export default {
+  state: {
+    text: "我是user模块下state.text的值",
+    //手机号
+    phoneNumber: uni.getStorageSync('phoneNumber') || "",
+    countryCode: uni.getStorageSync('countryCode') || "",
+    purePhoneNumber: uni.getStorageSync('purePhoneNumber') || "",
+    openId: uni.getStorageSync('openId') || "",
+    unionId: uni.getStorageSync('unionId') || "",
+    userInfo: !uni.getStorageSync('userInfo') ? {} : JSON.parse(uni.getStorageSync('userInfo')),
+  },
+  getters: {
+    getText(state) {
+      return 12
+    }
+  },
+  mutations: {
+    updateText(state) {
+      console.log(12222222)
+      console.log(state)
+    },
+    updatePhoneNumber(state, phoneNumber) {
+      uni.setStorageSync('phoneNumber', phoneNumber);
+      state.phoneNumber = phoneNumber
+    },
+    updateCountryCode(state, countryCode) {
+      uni.setStorageSync('countryCode', countryCode);
+      state.countryCode = countryCode
+    },
+    updatePurePhoneNumber(state, purePhoneNumber) {
+      uni.setStorageSync('phoneNumber', phoneNumber);
+      state.purePhoneNumber = purePhoneNumber
+    },
+    updateOpenId(state, openId) { 
+      uni.setStorageSync('openId', openId);
+      state.openId = openId
+    },
+    updateUnionId(state, unionId) {
+      uni.setStorageSync('unionId', unionId);
+      state.unionId = unionId
+    },
+    clearUserAuthen(state){
+      uni.removeStorageSync('phoneNumber')
+      uni.removeStorageSync('countryCode')
+      uni.removeStorageSync('purePhoneNumber')
+      uni.removeStorageSync('openId')
+      uni.removeStorageSync('unionId')
+      state.phoneNumber = ''
+      state.countryCode = ''
+      state.purePhoneNumber = ''
+      state.openId = ''
+      state.unionId = ''
+    },
+    updateUserInfo(state, userInfo) {
+      uni.setStorageSync('userInfo', JSON.stringify(userInfo));
+      state.userInfo = userInfo
+    },
+    clearUserInfo(state) {
+      uni.removeStorageSync('userInfo')
+      state.userInfo = {}
+    },
+
+  },
+  actions: {
+
+  }
+}

+ 0 - 0
unpackage/dist/build/.automator/mp-weixin/.automator.json


+ 4 - 0
unpackage/dist/build/mp-weixin/app.js

@@ -0,0 +1,4 @@
+
+require('./common/runtime.js')
+require('./common/vendor.js')
+require('./common/main.js')

+ 29 - 0
unpackage/dist/build/mp-weixin/app.json

@@ -0,0 +1,29 @@
+{
+  "pages": [
+    "pages/list/list",
+    "pages/index/index",
+    "pages/test/test",
+    "pages/succeed/succeed",
+    "pages/authen/identity",
+    "pages/authen/login",
+    "pages/confirm/confirm",
+    "pages/skip/skip"
+  ],
+  "subPackages": [],
+  "window": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "uni-app",
+    "navigationBarBackgroundColor": "#F8F8F8",
+    "backgroundColor": "#F8F8F8"
+  },
+  "uniStatistics": {
+    "enable": true
+  },
+  "permission": {
+    "scope.userLocation": {
+      "desc": "获取附近的油站"
+    }
+  },
+  "usingComponents": {},
+  "sitemapLocation": "sitemap.json"
+}

+ 3 - 0
unpackage/dist/build/mp-weixin/app.wxss

@@ -0,0 +1,3 @@
+@import './common/main.wxss';
+
+[data-custom-hidden="true"],[bind-data-custom-hidden="true"]{display: none !important;}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/common/main.js


+ 1 - 0
unpackage/dist/build/mp-weixin/common/main.wxss

@@ -0,0 +1 @@
+page::after{position:fixed;content:'';left:-1000px;top:-1000px;-webkit-animation:shadow-preload .1s;-webkit-animation-delay:3s;animation:shadow-preload .1s;animation-delay:3s}@-webkit-keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}@keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}100%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}

File diff suppressed because it is too large
+ 2 - 0
unpackage/dist/build/mp-weixin/common/runtime.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/common/vendor.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/authen/identity.js


+ 5 - 0
unpackage/dist/build/mp-weixin/pages/authen/identity.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "请求授权",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/authen/identity.wxml

@@ -0,0 +1 @@
+<view class="container"><image class="icon" src="../../static/icon/login.png" mode="scaleToFill"></image><view class="hr"></view><view class="content"><text>申请获取以下权限</text><text>获得你的公开信息(昵称、头像、地区等)</text></view><button loading="{{getUserInfoLoading}}" disabled="{{getUserInfoLoading}}" data-event-opts="{{[['tap',[['getUserInfo',['$event']]]]]}}" bindtap="__e">授权获取</button></view>

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/authen/identity.wxss

@@ -0,0 +1 @@
+page{width:750rpx;background-color:#f0f2f5;min-height:100vh}page .container{text-align:center}page .container .icon{margin-top:414rpx;width:508rpx;height:388rpx;margin-top:180rpx;display:inline-block}page .container .hr{margin-top:120rpx;display:inline-block;width:618rpx;height:2rpx;-webkit-box-sizing:border-box;box-sizing:border-box;border:1rpx solid rgba(0,0,0,.1)}page .container .content{margin-top:90rpx;display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;width:616rpx}page .container .content text:nth-child(1){height:44rpx;font-size:32rpx;color:#000;line-height:44rpx;text-align:left}page .container .content text:nth-child(2){height:44rpx;font-size:28rpx;text-align:left;color:rgba(0,0,0,.25);line-height:44rpx}page .container button{margin-top:90rpx;display:inline-block;width:616rpx;height:76rpx;background:-webkit-linear-gradient(327deg,#12a273,#12a273);background:linear-gradient(123deg,#12a273,#12a273);border-radius:38rpx;font-size:32rpx;color:#fff;line-height:76rpx}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/authen/login.js


+ 5 - 0
unpackage/dist/build/mp-weixin/pages/authen/login.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "登录",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/authen/login.wxml

@@ -0,0 +1 @@
+<view class="container"><image class="icon" src="../../static/icon/login.png" mode="scaleToFill"></image><view class="content"><button open-type="getPhoneNumber" loading="{{getPhoneNumberLoading}}" disabled="{{getPhoneNumberLoading}}" data-event-opts="{{[['getphonenumber',[['getPhoneNumber',['$event']]]]]}}" bindgetphonenumber="__e">授权登录</button><button type="default">手机登录</button><text>登录即代表同意《隐私政策》和《用户服务协议》</text></view></view>

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/authen/login.wxss

@@ -0,0 +1 @@
+page{width:750rpx;background-color:#f0f2f5;min-height:100vh}page .container{text-align:center}page .container .icon{margin-top:414rpx;width:508rpx;height:388rpx;margin-top:180rpx;display:inline-block}page .container .content{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin-top:210rpx}page .container .content button:nth-child(1){width:616rpx;height:76rpx;background:-webkit-linear-gradient(327deg,#12a273,#12a273);background:linear-gradient(123deg,#12a273,#12a273);border-radius:38rpx;font-size:32rpx;color:#fff;line-height:76rpx}page .container .content button:nth-child(2){width:616rpx;height:76rpx;background-color:#f0f2f5;border-radius:38rpx;font-size:32rpx;font-weight:400;color:rgba(0,0,0,.25);line-height:76rpx}page .container .content text{margin-top:42rpx;height:36rpx;font-size:26rpx;color:rgba(0,0,0,.5);line-height:36rpx}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/confirm/confirm.js


+ 7 - 0
unpackage/dist/build/mp-weixin/pages/confirm/confirm.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "订单确认",
+  "enablePullDownRefresh": false,
+  "usingComponents": {
+    "uni-popup": "/uni_modules/uni-popup/components/uni-popup/uni-popup"
+  }
+}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/confirm/confirm.wxml


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/confirm/confirm.wxss


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/index/index.js


+ 7 - 0
unpackage/dist/build/mp-weixin/pages/index/index.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "一键加油",
+  "usingComponents": {
+    "uni-notice-bar": "/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar",
+    "uni-popup": "/uni_modules/uni-popup/components/uni-popup/uni-popup"
+  }
+}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/index/index.wxml


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/mp-weixin/pages/index/index.wxss


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/list/list.js


+ 5 - 0
unpackage/dist/build/mp-weixin/pages/list/list.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "油站列表",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/list/list.wxml

@@ -0,0 +1 @@
+<view class="list"><view class="search"><view class="dist_search _div"><picker value="{{cityIndex}}" range="{{cityArr}}" data-event-opts="{{[['change',[['bindPickerChange',['$event']]]]]}}" bindchange="__e"><view class="district">{{cityArr[cityIndex]}}</view></picker><view class="icon"></view></view><view class="separate"></view><view class="inp"><view class="icon"></view><input type="text" placeholder="请输入油站名称" data-event-opts="{{[['input',[['__set_model',['','filterCityText','$event',[]]]]]]}}" value="{{filterCityText}}" bindinput="__e"/></view></view><view class="postion"><view class="icon"></view><view data-event-opts="{{[['tap',[['reGetLocation',['$event']]]]]}}" class="current" bindtap="__e">{{'当前位置:'+location+''}}</view><view data-event-opts="{{[['tap',[['refresh',['$event']]]]]}}" class="refresh" bindtap="__e"></view></view><view class="collection"><block wx:for="{{filterCityArr}}" wx:for-item="ele" wx:for-index="__i0__"><view data-event-opts="{{[['tap',[['goBuy',['$event','$0'],[[['filterCityArr','',__i0__,'stationId']]]]]]]}}" class="station" bindtap="__e"><view class="content"><image src="{{ele.stationPic}}" mode></image><view class="detail"><view class="name">{{ele.stationName}}</view><view class="other"><text hidden="{{!(ele.distance!==undefined)}}">{{ele.distance+' '+'km |'}}</text>{{''+(' '+ele.stationAddress)+''}}</view></view></view><view class="footer"><view data-event-opts="{{[['tap',[['goThere',['$event','$0','$1'],[[['filterCityArr','',__i0__,'stationLatitude']],[['filterCityArr','',__i0__,'stationLongitude']]]]]]]}}" class="gothere" catchtap="__e">去这里</view><view class="separator">|</view><view data-event-opts="{{[['tap',[['goBuy',['$event','$0'],[[['filterCityArr','',__i0__,'stationId']]]]]]]}}" class="gobuy" catchtap="__e">去买单</view></view></view></block></view></view>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/list/list.wxss


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/skip/skip.js


+ 5 - 0
unpackage/dist/build/mp-weixin/pages/skip/skip.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/skip/skip.wxml

@@ -0,0 +1 @@
+<view class="skip"><view class="bg"></view><view class="text">{{''+tip+''}}</view></view>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/skip/skip.wxss


+ 1 - 0
unpackage/dist/build/mp-weixin/pages/succeed/succeed.js

@@ -0,0 +1 @@
+(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/succeed/succeed"],{"0705":function(n,t,e){"use strict";var u;e.d(t,"b",(function(){return c})),e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){return u}));var c=function(){var n=this,t=n.$createElement;n._self._c},r=[]},"266e":function(n,t,e){"use strict";(function(n){e("a134"),e("921b");u(e("66fd"));var t=u(e("ce69"));function u(n){return n&&n.__esModule?n:{default:n}}n(t.default)}).call(this,e("543d")["createPage"])},"28ab":function(n,t,e){},"2f4e":function(n,t,e){"use strict";var u=e("28ab"),c=e.n(u);c.a},4617:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u={data:function(){return{}},methods:{}};t.default=u},"8ccf":function(n,t,e){"use strict";e.r(t);var u=e("4617"),c=e.n(u);for(var r in u)"default"!==r&&function(n){e.d(t,n,(function(){return u[n]}))}(r);t["default"]=c.a},ce69:function(n,t,e){"use strict";e.r(t);var u=e("0705"),c=e("8ccf");for(var r in c)"default"!==r&&function(n){e.d(t,n,(function(){return c[n]}))}(r);e("2f4e");var a,f=e("f0c5"),o=Object(f["a"])(c["default"],u["b"],u["c"],!1,null,null,null,!1,u["a"],a);t["default"]=o.exports}},[["266e","common/runtime","common/vendor"]]]);

+ 5 - 0
unpackage/dist/build/mp-weixin/pages/succeed/succeed.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "支付成功",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/succeed/succeed.wxml

@@ -0,0 +1 @@
+<view class="succeed"><view class="icon"></view><view class="text">订单支付成功</view><view class="focus">更多优惠,请关注我们的公众号</view><official-account class="official"></official-account></view>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/pages/succeed/succeed.wxss


+ 1 - 0
unpackage/dist/build/mp-weixin/pages/test/test.js

@@ -0,0 +1 @@
+(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/test/test"],{"0c7c":function(t,e,n){},"27cd":function(t,e,n){"use strict";(function(t){n("a134"),n("921b");a(n("66fd"));var e=a(n("a4dd"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},5750:function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return a}));var r=function(){var t=this,e=t.$createElement;t._self._c},u=[]},a4dd:function(t,e,n){"use strict";n.r(e);var a=n("5750"),r=n("df1a");for(var u in r)"default"!==u&&function(t){n.d(e,t,(function(){return r[t]}))}(u);n("ed4e");var c,i=n("f0c5"),d=Object(i["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],c);e["default"]=d.exports},df1a:function(t,e,n){"use strict";n.r(e);var a=n("eddd"),r=n.n(a);for(var u in a)"default"!==u&&function(t){n.d(e,t,(function(){return a[t]}))}(u);e["default"]=r.a},ed4e:function(t,e,n){"use strict";var a=n("0c7c"),r=n.n(a);r.a},eddd:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n("2f62");var a={data:function(){var t=this.getDate({format:!0});return{title:"picker",array:["中国","美国","巴西","日本"],index:0,date:t,time:"12:01"}},computed:{startDate:function(){return this.getDate("start")},endDate:function(){return this.getDate("end")}},methods:{bindPickerChange:function(t){console.log("picker发送选择改变,携带值为",t.target.value),this.index=t.target.value},bindDateChange:function(t){this.date=t.target.value},bindTimeChange:function(t){this.time=t.target.value},getDate:function(t){var e=new Date,n=e.getFullYear(),a=e.getMonth()+1,r=e.getDate();return"start"===t?n-=60:"end"===t&&(n+=2),a=a>9?a:"0"+a,r=r>9?r:"0"+r,"".concat(n,"-").concat(a,"-").concat(r)}}};e.default=a}},[["27cd","common/runtime","common/vendor"]]]);

+ 5 - 0
unpackage/dist/build/mp-weixin/pages/test/test.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "测试页",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/test/test.wxml

@@ -0,0 +1 @@
+<view><view class="uni-title uni-common-pl">地区选择器</view><view class="uni-list"><view class="uni-list-cell"><view class="uni-list-cell-left">当前选择</view><view class="uni-list-cell-db"><picker value="{{index}}" range="{{array}}" data-event-opts="{{[['change',[['bindPickerChange',['$event']]]]]}}" bindchange="__e"><view class="uni-input">{{array[index]}}</view></picker></view></view></view><view class="uni-title uni-common-pl">时间选择器</view><view class="uni-list"><view class="uni-list-cell"><view class="uni-list-cell-left">当前选择</view><view class="uni-list-cell-db"><picker mode="time" value="{{time}}" start="09:01" end="21:01" data-event-opts="{{[['change',[['bindTimeChange',['$event']]]]]}}" bindchange="__e"><view class="uni-input">{{time}}</view></picker></view></view></view><view class="uni-title uni-common-pl">日期选择器</view><view class="uni-list"><view class="uni-list-cell"><view class="uni-list-cell-left">当前选择</view><view class="uni-list-cell-db"><picker mode="date" value="{{date}}" start="{{startDate}}" end="{{endDate}}" data-event-opts="{{[['change',[['bindDateChange',['$event']]]]]}}" bindchange="__e"><view class="uni-input">{{date}}</view></picker></view></view></view></view>

+ 1 - 0
unpackage/dist/build/mp-weixin/pages/test/test.wxss

@@ -0,0 +1 @@
+uni-popup .pay-type{width:750rpx;height:750rpx;background-color:#4cd964}

+ 59 - 0
unpackage/dist/build/mp-weixin/project.config.json

@@ -0,0 +1,59 @@
+{
+  "description": "项目配置文件。",
+  "packOptions": {
+    "ignore": []
+  },
+  "setting": {
+    "urlCheck": false,
+    "es6": true,
+    "enhance": true,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": false,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": false,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "enableEngineNative": false,
+    "useIsolateContext": true,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "showES6CompileOption": false
+  },
+  "compileType": "miniprogram",
+  "libVersion": "",
+  "appid": "wx34dd5a7c8c5be1ef",
+  "projectname": "小程序",
+  "condition": {
+    "search": {
+      "list": []
+    },
+    "conversation": {
+      "list": []
+    },
+    "game": {
+      "list": []
+    },
+    "miniprogram": {
+      "list": []
+    }
+  }
+}

+ 7 - 0
unpackage/dist/build/mp-weixin/sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

BIN
unpackage/dist/build/mp-weixin/static/icon/1_b01_down.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/1_b01_location.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/1_b01_search.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/6_d05_close.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/a01-zhuyi.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/cg.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/dingdan.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/forbid.png


BIN
unpackage/dist/build/mp-weixin/static/icon/goto.png


BIN
unpackage/dist/build/mp-weixin/static/icon/huiyuan-.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/icon_shuaxin.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/left.png


BIN
unpackage/dist/build/mp-weixin/static/icon/login.png


BIN
unpackage/dist/build/mp-weixin/static/icon/right.png


BIN
unpackage/dist/build/mp-weixin/static/icon/select.png


BIN
unpackage/dist/build/mp-weixin/static/icon/selected.png


BIN
unpackage/dist/build/mp-weixin/static/icon/sheng.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/tipicon1.png


BIN
unpackage/dist/build/mp-weixin/static/icon/youhuiquan-2.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/youhuiquan1.2x.png


BIN
unpackage/dist/build/mp-weixin/static/icon/youhuiquan2.2x.png


+ 0 - 0
unpackage/dist/dev/mp-alipay/static/icon/youhuiquan@2x.png → unpackage/dist/build/mp-weixin/static/icon/youhuiquan3.2x.png


BIN
unpackage/dist/build/mp-weixin/static/logo.png


+ 10 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js

@@ -0,0 +1,10 @@
+(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uni_modules/uni-icons/components/uni-icons/uni-icons"],{"02d7":function(n,t,e){"use strict";var u;e.d(t,"b",(function(){return c})),e.d(t,"c",(function(){return i})),e.d(t,"a",(function(){return u}));var c=function(){var n=this,t=n.$createElement;n._self._c},i=[]},"0468":function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=c(e("ac64"));function c(n){return n&&n.__esModule?n:{default:n}}var i={name:"UniIcons",props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customIcons:{type:String,default:""}},data:function(){return{icons:u.default}},methods:{_onClick:function(){this.$emit("click")}}};t.default=i},2639:function(n,t,e){"use strict";e.r(t);var u=e("0468"),c=e.n(u);for(var i in u)"default"!==i&&function(n){e.d(t,n,(function(){return u[n]}))}(i);t["default"]=c.a},"4ecb":function(n,t,e){},"65b4":function(n,t,e){"use strict";var u=e("4ecb"),c=e.n(u);c.a},f8a0:function(n,t,e){"use strict";e.r(t);var u=e("02d7"),c=e("2639");for(var i in c)"default"!==i&&function(n){e.d(t,n,(function(){return c[n]}))}(i);e("65b4");var r,o=e("f0c5"),a=Object(o["a"])(c["default"],u["b"],u["c"],!1,null,"40add982",null,!1,u["a"],r);t["default"]=a.exports}}]);
+;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
+    'uni_modules/uni-icons/components/uni-icons/uni-icons-create-component',
+    {
+        'uni_modules/uni-icons/components/uni-icons/uni-icons-create-component':(function(module, exports, __webpack_require__){
+            __webpack_require__('543d')['createComponent'](__webpack_require__("f8a0"))
+        })
+    },
+    [['uni_modules/uni-icons/components/uni-icons/uni-icons-create-component']]
+]);

+ 4 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "component": true
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml

@@ -0,0 +1 @@
+<text data-event-opts="{{[['tap',[['_onClick',['$event']]]]]}}" class="{{['uni-icons','data-v-40add982',customIcons,customIcons?type:'']}}" style="{{'color:'+(color)+';'+('font-size:'+(size+'px')+';')}}" bindtap="__e">{{icons[type]}}</text>

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js


+ 6 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
+  },
+  "component": true
+}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.wxml


+ 2 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.wxss

@@ -0,0 +1,2 @@
+.uni-noticebar.data-v-f40a0e64{display:-webkit-box;display:-webkit-flex;display:flex;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:6px 12px;margin-bottom:10px}.uni-noticebar-close.data-v-f40a0e64{margin-right:5px}.uni-noticebar-icon.data-v-f40a0e64{margin-right:5px}.uni-noticebar__content-wrapper.data-v-f40a0e64{-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;overflow:hidden}.uni-noticebar__content-wrapper--single.data-v-f40a0e64{line-height:18px}.uni-noticebar__content-wrapper--single.data-v-f40a0e64,
+.uni-noticebar__content-wrapper--scrollable.data-v-f40a0e64{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}.uni-noticebar__content-wrapper--scrollable.data-v-f40a0e64{position:relative;height:18px}.uni-noticebar__content--scrollable.data-v-f40a0e64{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:block;overflow:hidden}.uni-noticebar__content--single.data-v-f40a0e64{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:0;-webkit-flex:none;flex:none;width:100%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.uni-noticebar__content-text.data-v-f40a0e64{font-size:14px;line-height:18px;word-break:break-all}.uni-noticebar__content-text--single.data-v-f40a0e64{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.uni-noticebar__content-text--scrollable.data-v-f40a0e64{position:absolute;display:block;height:18px;line-height:18px;white-space:nowrap;padding-left:100%;-webkit-animation:notice-data-v-f40a0e64 10s 0s linear infinite both;animation:notice-data-v-f40a0e64 10s 0s linear infinite both;-webkit-animation-play-state:paused;animation-play-state:paused}.uni-noticebar__more.data-v-f40a0e64{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding-left:5px}.uni-noticebar__more-text.data-v-f40a0e64{font-size:14px}@-webkit-keyframes notice-data-v-f40a0e64{100%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes notice-data-v-f40a0e64{100%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.js


+ 6 - 0
unpackage/dist/build/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "uni-transition": "/uni_modules/uni-transition/components/uni-transition/uni-transition"
+  },
+  "component": true
+}

Some files were not shown because too many files changed in this diff