xiebaomin 1 年間 前
コミット
8c8f03934d

+ 3 - 1
public/index.html

@@ -8,13 +8,15 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.png">
     <title><%= htmlWebpackPlugin.options.title %></title>
-    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
   </head>
   <body>
+    <!--<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>-->
     <noscript>
       <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
     </noscript>
     <div id="app"></div>
+    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
+
     <!-- built files will be auto injected -->
   </body>
 </html>

+ 7 - 1
src/Layout/TabItem/index.vue

@@ -3,7 +3,7 @@
     <van-tabbar-item
       v-for="(menu, index) in menuList"
       :key="index"
-      @click.stop="$ApiRouter(`${menu.link}`)"
+      @click.stop="activeMenu(menu)"
       >
       <span>{{ menu.name }}</span>
       <template #icon="props">
@@ -20,6 +20,12 @@ export default {
       type: Array,
       default: () => []
     }
+  },
+  methods: {
+    activeMenu (menu) {
+      sessionStorage.setItem('activeMenu', menu.id)
+      this.$ApiRouter(`${menu.link}`)
+    }
   }
 }
 </script>

+ 1 - 1
src/Layout/Tabbar/index.vue

@@ -10,7 +10,7 @@
 export default {
   data () {
     return {
-      active: 0
+      active: sessionStorage.getItem('activeMenu') * 1
     }
   }
 }

+ 2 - 2
src/components/distri-logo.vue

@@ -8,8 +8,8 @@
         colorDark="#333"
         backgroundColor="#fff"
         :logoSrc="lgoImg"
-        :logoScale="0.2"
-        :logoMargin="100"
+        logoScale="0.21"
+        logoMargin="20px"
         :callback="getCode"
       ></vue-qr>
     </div>

+ 6 - 2
src/components/field-image-code.vue

@@ -26,7 +26,7 @@
           v-model="imgCode"
           class="img-code"
           placeholder="请输入图片验证码"
-          :rules="[{ validator: validatorImgCode, message: '请输入图片验证码' }]"
+          :rules="[{ validator: validatorImgCode }]"
           maxlength="4"
         />
         <div class="img-refresh">
@@ -60,6 +60,10 @@ export default {
     leftIcon: {
       type: Boolean,
       default: () => true
+    },
+    type: {
+      type: Number,
+      default: () => 14
     }
   },
   data () {
@@ -115,7 +119,7 @@ export default {
         imgCode: this.imgCode,
         platformType: 1,
         isCheckCaptcha: 0,
-        activateCodeType: 7
+        activateCodeType: this.type
       }).then(() => {
         this.errMsg = ''
         this.showImageCode = false

+ 11 - 5
src/components/poster.vue

@@ -2,7 +2,7 @@
   <div class="poster">
     <van-overlay :show="show" @click="show = false, showPoster = false" class="overlay">
       <div class="wrapper">
-        <img :src="link" style="width: 71vw;
+        <img v-if="link" :src="link" style="width: 71vw;
         height: 128vw;
         margin-top: 10vw;" alt="">
       </div>
@@ -129,7 +129,7 @@ export default {
       return this.$route.query.cId
     },
     codeText () {
-      return `https://sell-b.caimei365.com/#/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`
+      return `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`
     }
   },
   watch: {
@@ -143,12 +143,15 @@ export default {
     userInfo: {
       async handler (val) {
         if (val) {
-          const data1 = await getBase64Image(val.image)
-          const data2 = await getBase64Image(val.qrCode)
+          console.log('val', val)
+          const data1 = await getBase64Image(val.image || 'https://static.caimei365.com/app/img/icon/default-head-new.png')
+          if (val.qrCode) {
+            const data2 = await getBase64Image(val.qrCode)
+            this.qrImg = data2
+          }
           const data3 = await getBase64Image(this.imgUrl)
           const data4 = await getBase64Image(this.bgUrl)
           this.userImg = data1
-          this.qrImg = data2
           this.cardImg = data3
           this.bgImg = data4
         }
@@ -167,6 +170,9 @@ export default {
       html2Canvas(html, { width: html.clientWidth, height: html.clientHeight, useCORS: true, allowTaint: true, dpi: 300 }).then(canvas => {
         console.log(canvas)
         this.link = canvas.toDataURL('image/png')
+        if (this.link) {
+
+        }
       })
     }
   }

+ 0 - 9
src/permission.js

@@ -3,7 +3,6 @@ import NProgress from 'nprogress'
 import store from './store'
 import 'nprogress/nprogress.css'
 import { getToken } from '@/util/auth'
-import { Toast } from 'vant'
 
 NProgress.configure({ showSpinner: false })
 
@@ -20,13 +19,6 @@ router.beforeEach((to, from, next) => {
       next({ path: '/pwlogin' })
       NProgress.done()
     } else {
-      const href = window.location.href
-      if (href.indexOf('/?code') > -1 && href.lastIndexOf('#') > 50) {
-        const urlArr = href.split('/?')
-        const leftUrl = urlArr[0] + '/#/'
-        const rightUrlArr = urlArr[1].split('#/')
-        location.href = `${leftUrl}${rightUrlArr[1]}?${rightUrlArr[0]}`
-      }
       if (!store.getters.userInfo) {
         store.dispatch('user/getUserInfo', store.getters.userId).then(() => {
           store.dispatch('institution/addressList').then(() => {
@@ -48,7 +40,6 @@ router.beforeEach((to, from, next) => {
       next()
       // 在免登录白名单,直接进入
     } else {
-      Toast.fail('登入失效请重新登录')
       next(`/pwlogin?redirect=${to.fullPath}`) // 否则全部重定向到登录页
       NProgress.done()
     }

+ 14 - 12
src/plugin/jsSdk.js

@@ -1,26 +1,28 @@
 import Vue from 'vue'
 import { appId } from '@/config/js-config'
 import { shareSDK } from '@/api/userApi/share'
-import SHA1 from 'crypto-js/sha1'
+// import SHA1 from 'crypto-js/sha1'
 
 const dev = process.env.NODE_ENV
 
-Vue.prototype.$wxReady = async (callback, apiList = []) => {
+Vue.prototype.$wxReady = async (callback, shareUrl) => {
   try {
     // console.log('当前页面地址:', url)
-    const nonceStr = Math.random()
-    const timestamp = Math.floor(Date.now() / 1000)
-    const url = `${location.origin}${location.pathname}${location.search}`
-    const res = await shareSDK({ url: 'http://localhost:8080/#/shopping-mall', appId })
-    const signature = SHA1(`jsapi_ticket=${res.ticket}&noncestr=${nonceStr}&timestamp=${timestamp}&url=${url}`).toString()
-    console.log(nonceStr, timestamp, url, signature)
+    // const nonceStr = Math.random()
+    // const timestamp = Math.floor(Date.now() / 1000)
+    const url = location.href
+    console.log(shareUrl, location)
+    const res = await shareSDK({ url: url, appId })
+    const wx = window.wx
+    if (!wx) return
+    // const signature = SHA1(`jsapi_ticket=${res.ticket}&noncestr=${nonceStr}&timestamp=${timestamp}&url=${encodeURIComponent(url)}`).toString()
     wx.config({
       debug: true, // 开启调试模式,调用的所有 api 的返回值会在客户端 alert 出来,若要查看传入的参数,可以在 pc 端打开,参数信息会通过 log 打出,仅在 pc 端时才会打印。
       appId: 'wx91c4152b60ca91a3', // 必填,公众号的唯一标识
-      timestamp: timestamp, // 必填,生成签名的时间戳
-      nonceStr: nonceStr, // 必填,生成签名的随机串
-      signature: signature, // 必填,签名
-      jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的 JS 接口列表
+      timestamp: res.timestamp, // 必填,生成签名的时间戳
+      nonceStr: res.noncestr, // 必填,生成签名的随机串
+      signature: res.signature, // 必填,签名
+      jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage'] // 必填,需要使用的 JS 接口列表
     })
     wx.ready(callback(wx))
     wx.error(function (error) {

+ 9 - 1
src/router/index.js

@@ -302,11 +302,19 @@ const routes = [
     meta: {
       title: '添加银行卡'
     }
+  },
+  {
+    path: '/card-comfirm-sub',
+    name: 'card-comfirm-sub',
+    component: () => import('@/views/pay/card-comfirm-sub.vue'),
+    meta: {
+      title: '添加银行卡'
+    }
   }
 ]
 
 const router = new VueRouter({
-  mode: 'hash',
+  mode: 'history',
   base: '',
   routes
 })

+ 9 - 9
src/util/http.js

@@ -26,10 +26,10 @@ request.interceptors.request.use(
     const isToken = Boolean((config.headers).isToken) // 根据请求配置是否需要为请求头添加token
     const isRepeated = Boolean((config.headers).isRepeated) // 根据请求配置判断是否需要防止重复提交请求
     Vue.$showLoading = true
-    Toast.loading({
-      message: '加载中...',
-      forbidClick: true
-    })
+    // Toast.loading({
+    //  message: '加载中...',
+    //  forbidClick: true
+    // })
     let cancelFunction // 引用取消请求的cancelToken
     // 挂载请求key
     config.requestKey = `${config.method}-${config.url}`
@@ -94,7 +94,7 @@ request.interceptors.response.use(
       window.sessionStorage.removeItem('MyUsersStore') // 移除sessionStorage中的缓存
       window.sessionStorage.clear()
       window.location.href = '/pwlogin'
-      Toast.fail('会话过期,请重新登陆')
+      Toast.fail('登录失效,请重新登陆')
       return Promise.reject(new Error('会话过期,请重新登陆'))
     } else if (code === 500) {
       Toast.fail(msg)
@@ -109,10 +109,10 @@ request.interceptors.response.use(
 
       return Promise.reject(new Error('未知错误,请联系管理员!'))
     } else {
-      Toast.loading({
-        message: '加载中...',
-        forbidClick: true
-      })
+      // Toast.loading({
+      //  message: '加载中...',
+      //  forbidClick: true
+      // })
       return Promise.resolve(data)
     }
   },

+ 8 - 1
src/views/goods-information/index.vue

@@ -2,7 +2,7 @@
   <div class="goods_info">
     <div style="position: sticky;top: 0;z-index: '66';">
       <nav-bar title="商品资料" @click-left="$router.back()"/>
-      <van-search v-model="formData.productName" placeholder="请输入搜索关键词" />
+      <van-search v-model="formData.productName" placeholder="请输入搜索关键词" @search="onSearch" @cancel="onCancel"/>
     </div>
     <div class="content" v-for="good, index in goodsList" :key="index">
       <goods-card @handlerEmit="handlerEmit" :storeInfo="good"/>
@@ -42,6 +42,13 @@ export default {
       const data = await getArchiveList(form)
       this.hasNextPage = data.hasNextPage
       this.goodsList = data.results
+    },
+    onSearch ($event) {
+      console.log($event)
+      this.getArchiveList()
+    },
+    onCancel () {
+      this.getArchiveList()
     }
   }
 }

+ 27 - 5
src/views/ins-intention-report/add.vue

@@ -21,8 +21,9 @@
             <div class="upload"></div>
             <div class="text">点击上传客户咨询的商品报备</div>
           </div>
-          <div class="upload" v-else>
-            <van-image :src="selectShop.mainImage"></van-image>
+          <div class="select" v-else>
+            <van-image :src="selectShop.mainImage" class="upload"></van-image>
+            <div class="text">{{ selectShop.name }}</div>
           </div>
         </div>
         <div class="label">上传凭证:<span style="color: #F94B4B;">(上传与客户直接的聊天记录,限6张)</span></div>
@@ -38,7 +39,7 @@
       </div>
       <van-button color="#FF5B00" @click="showModal = false">确认</van-button>
     </van-dialog>
-    <report-tips :show="showTips" @tipsHidden="tipsHidden"></report-tips>
+    <!--<report-tips :show="showTips" @tipsHidden="tipsHidden"></report-tips>-->
     <report-select-popup ref="select-popup" @handlerSelect="handlerSelect"></report-select-popup>
   </div>
 </template>
@@ -46,11 +47,11 @@
 <script>
 import { insIntentionReportAdd } from '../../api/userApi/ins-intention-report'
 import ReportSelectPopup from './components/report-select-popup.vue'
-import ReportTips from './components/report-tips.vue'
+// import ReportTips from './components/report-tips.vue'
 import { uploadImage } from '@/api/userApi/mine-card.js'
 export default {
   components: {
-    ReportTips,
+    // ReportTips,
     ReportSelectPopup
   },
   data () {
@@ -159,6 +160,27 @@ export default {
         color: #B2B2B2;
         font-size: 3.5vw;
       }
+      .upload { position: relative; }
+      .upload::after {
+        content: '';
+        position: absolute;
+        left: 50%;
+        top: 50%;
+        background: #ccc;
+        width: 1px;
+        height: 5vw;
+        transform: translate(-50%, -50%);
+      }
+      .upload::before {
+        content: '';
+        position: absolute;
+        left: 50%;
+        top: 50%;
+        background: #ccc;
+        width: 5vw;
+        height: 1px;
+        transform: translate(-50%, -50%);
+      }
     }
   }
 }

+ 27 - 6
src/views/ins-intention-report/components/report-select-popup.vue

@@ -5,13 +5,13 @@
         <van-search v-model="formData.name" placeholder="请输入搜索关键词" />
         <goods-radio :goodsList="dataList" @handlerSelect="handlerSelect" />
       </div>
+      <div class="btn"><van-button @click="showPopup = false" color="rgb(255, 91, 0)">确定</van-button></div>
     </van-action-sheet>
   </div>
 </template>
 
 <script>
 import { productList } from '@/api/userApi/shopping-mall'
-import { Toast } from 'vant'
 
 export default {
   data () {
@@ -19,7 +19,7 @@ export default {
       showPopup: false,
       radio: '',
       formData: {
-        pageSize: 5,
+        pageSize: 10,
         pageNum: 1,
         id: this.$store.getters.isManage ? this.$store.getters.userInfo.id : this.$store.getters.userInfo.parentId,
         name: ''
@@ -34,10 +34,6 @@ export default {
       if (val) {
         this.productList(this.formData)
       } else {
-        Toast.loading({
-          message: '加载中...',
-          forbidClick: true
-        })
         this.$emit('handlerSelect', this.selectShop)
       }
     }
@@ -62,9 +58,34 @@ export default {
 ::v-deep .van-action-sheet__content {
   padding: 0 3.2vw 0 3.2vw;
 }
+.van-search {
+  position: sticky;
+  top: 0;
+  z-index: 99;
+}
 .select-goods {
   display: flex;
   justify-content: space-between;
   align-items: center;
 }
+.goods-radio {
+  max-height: 80vw;
+  overflow-y: scroll;
+  box-sizing: border-box;
+}
+.btn {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: #fff;
+  z-index: 99;
+  position: sticky;
+  bottom: 0;
+  height: 20vw;
+}
+.van-button {
+  width: 80vw;
+  height: 11vw;
+}
 </style>

+ 70 - 74
src/views/ins-intention-report/components/report-tips.vue

@@ -1,29 +1,27 @@
 <template>
   <div>
     <van-overlay :show="show">
-      <div class="wrapper" @click.stop>
-        <div class="tips">
-          <img src="https://static.caimei365.com/app/mini-distribution/tips-bg.png" alt="">
-          <div class="tips-title">机构意向订单报备说明</div>
-          <div class="tip">分销员提交意向订单报备且成交后,平台会给予 相应的报备佣金奖励,方法如下:</div>
-          <div class="text">1、先提交机构意向订单报备;</div>
-          <div class="text">2、平台根据您提交的机构意向订单报备
-            信息进行审核,审核通过后,即可对该
-            意向订单进行下单采购;</div>
-          <div class="text">3、审核通过后的机构意向订单详情页面
-            可操作“分享采购意向确认”给机构进行
-            确认锁定,仅由您一人来全程跟踪服务。
-            当机构确认后,后面的人则无法对该机
-            构意向订单进行报备;</div>
-          <div class="text">4、机构意向订单若只有一人报备且成交
-            后,则可获得全部的报备佣金;</div>
-          <div class="text">5、若多人报备同一机构及商品意向订单,
-            其中一人成交订单后,则多人平均分配该
-            笔报备佣金。同时该机构及商品意向订单
-            成交后,不可再下单及报备。</div>
-          <div class="content-tip">注:请谨慎填写机构名称、意向商品、联系人及手机号。</div>
-          <van-button color="#FF5B00" @click="$emit('tipsHidden', false)">确定</van-button>
-        </div>
+      <div class="tips">
+        <img src="https://static.caimei365.com/app/mini-distribution/tips-bg.png" alt="">
+        <div class="tips-title">机构意向订单报备说明</div>
+        <div class="tip">分销员提交意向订单报备且成交后,平台会给予 相应的报备佣金奖励,方法如下:</div>
+        <div class="text">1、先提交机构意向订单报备;</div>
+        <div class="text">2、平台根据您提交的机构意向订单报备
+          信息进行审核,审核通过后,即可对该
+          意向订单进行下单采购;</div>
+        <div class="text">3、审核通过后的机构意向订单详情页面
+          可操作“分享采购意向确认”给机构进行
+          确认锁定,仅由您一人来全程跟踪服务。
+          当机构确认后,后面的人则无法对该机
+          构意向订单进行报备;</div>
+        <div class="text">4、机构意向订单若只有一人报备且成交
+          后,则可获得全部的报备佣金;</div>
+        <div class="text">5、若多人报备同一机构及商品意向订单,
+          其中一人成交订单后,则多人平均分配该
+          笔报备佣金。同时该机构及商品意向订单
+          成交后,不可再下单及报备。</div>
+        <div class="content-tip">注:请谨慎填写机构名称、意向商品、联系人及手机号。</div>
+        <van-button color="#FF5B00" @click="$emit('tipsHidden', false)">确定</van-button>
       </div>
     </van-overlay>
   </div>
@@ -47,60 +45,58 @@ export default {
   width: 100%;
   height: 100%;
 }
-.wrapper {
+.tips {
+  position: relative;
   display: flex;
   justify-content: center;
   align-items: center;
-  .tips {
-    position: relative;
-    img {
-      width: 100%;
-      position: absolute;
-      z-index: 1;
-      left: 0;
-      top: 0;
-    }
-    div {
-      z-index: 2;
-    }
-    width: 82vw;
-    border-radius: 1.2vw;
-    box-sizing: border-box;
-    background: #fff;
-    padding: 8.5vw 5.1vw 10.3vw 5.1vw;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    margin: 30vw auto;
-    .tips-title {
-      font-size: 4.8vw;
-      color: #333;
-      font-weight: 600;
-    }
-    .tip {
-      color: #999;
-      font-size: 3.2vw;
-      line-height: 5.3vw;
-      margin: 4.3vw 0 6.5vw 0;
-    }
-    .text {
-      margin-bottom: 4.3vw;
-      font-size: 3.7vw;
-      color: #333;
-      line-height: 6vw;
-      width: 100%;
-    }
-    .content-tip {
-      margin: 5vw 0 4.3vw 0;
-      color: #F94B4B;
-      font-size: 2.7vw;
-    }
-    ::v-deep .van-button {
-      width: 56vw;
-      height: 11.2vw;
-      border-radius: 1.1vw;
-      margin-top: 4.3vw;
-    }
+  img {
+    width: 100%;
+    position: absolute;
+    z-index: 1;
+    left: 0;
+    top: 0;
+  }
+  div {
+    z-index: 2;
+  }
+  width: 82vw;
+  border-radius: 1.2vw;
+  box-sizing: border-box;
+  background: #fff;
+  padding: 8.5vw 5.1vw 10.3vw 5.1vw;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin: 30vw auto;
+  .tips-title {
+    font-size: 4.8vw;
+    color: #333;
+    font-weight: 600;
+  }
+  .tip {
+    color: #999;
+    font-size: 3.2vw;
+    line-height: 5.3vw;
+    margin: 4.3vw 0 6.5vw 0;
+  }
+  .text {
+    margin-bottom: 4.3vw;
+    font-size: 3.7vw;
+    color: #333;
+    line-height: 6vw;
+    width: 100%;
+  }
+  .content-tip {
+    margin: 5vw 0 4.3vw 0;
+    color: #F94B4B;
+    font-size: 2.7vw;
+  }
+  ::v-deep .van-button {
+    width: 56vw;
+    height: 11.2vw;
+    border-radius: 1.1vw;
+    margin-top: 4.3vw;
   }
 }
 </style>

+ 1 - 1
src/views/ins-intention-report/components/search-head.vue

@@ -4,7 +4,7 @@
       <van-tab title="我的报备" />
       <van-tab title="成员报备" />
     </van-tabs>
-    <van-search v-model="value" placeholder="请输入搜索关键词" @input="$emit('onSearch', value)" @search="$emit('onSearch', value)"/>
+    <van-search v-model="value" placeholder="请输入搜索关键词" @input="$emit('onSearch', value)" @search="$emit('onSearch', value)" @cancel="$emit('onSearch', '')"/>
   </div>
 </template>
 

+ 2 - 4
src/views/ins-intention-report/detail.vue

@@ -22,10 +22,8 @@
     <div class="label">
       报备时间:<span>{{ resultInfo.createTime }}</span>
     </div>
-    <div class="label">
-      已报备人数:<span v-if="resultInfo.cmReportingClub"
-        >{{ resultInfo.cmReportingClub.distributionCount || 0 }}人</span
-      >
+    <div class="label" v-if="isReportAuditStatus(resultInfo.auditStatus)">
+      已报备人数:<span>{{ resultInfo.cmReportingClub.distributionCount || 0 }}人</span>
     </div>
     <div
       class="detail-btn"

+ 10 - 4
src/views/ins-intention-report/index.vue

@@ -41,20 +41,22 @@
       :noMore="!hasNextPage"
       @arriveBottom="getMoreInfo"
     />
-    <div class="to-report">
+    <div class="to-report" v-if="active === 0">
       <van-button color="#FF5B00" @click="$router.push('/ins-intention-add')"
         >去报备</van-button
       >
     </div>
+    <!--<report-tips :show="showTips" @tipsHidden="tipsHidden"></report-tips>-->
   </div>
 </template>
 
 <script>
 import { insIntentionReportList } from '../../api/userApi/ins-intention-report'
 import reportStatus from './mixins/index'
+import ReportTips from './components/report-tips.vue'
 import SearchHead from './components/search-head'
 export default {
-  components: { SearchHead },
+  components: { SearchHead, ReportTips },
   mixins: [reportStatus],
   data () {
     return {
@@ -64,6 +66,7 @@ export default {
         clubName: ''
       },
       active: 0,
+      showTips: true,
       dataList: [],
       hasNextPage: false
     }
@@ -77,6 +80,9 @@ export default {
     this.getInsIntentionReportList(this.active)
   },
   methods: {
+    tipsHidden (val) {
+      this.showTips = val
+    },
     getMoreInfo () {
       this.formData.pageNo += 1
       this.getInsIntentionReportList(this.active)
@@ -92,7 +98,7 @@ export default {
       this.getInsIntentionReportList(this.active)
     },
     handlerDetail ($event) {
-      this.$router.push(`/ins-intention-detail/?id=${$event.id}`)
+      this.$ApiRouter(`/ins-intention-detail/?id=${$event.id}`)
     },
     handlerPlaceOrder ($event) {
       this.$router.push(`/goods-detail?productId=${$event.productId}&typeId=0&isLock=1&cId=${$event.id}`)
@@ -105,7 +111,7 @@ export default {
       }
       const { results: data, hasNextPage } = await insIntentionReportList(form)
       this.hasNextPage = hasNextPage
-      this.dataList = [...data, ...this.dataList]
+      this.dataList = [...data]
     }
   }
 }

+ 2 - 2
src/views/login/forgotPW.vue

@@ -5,10 +5,10 @@
       <van-field
         placeholder="请输入手机号"
         v-model="formData.mobile"
-        :rules="[{ required: true, message: '请输入手机号' }]"
+        :rules="[{ required: true }]"
         maxlength="11"
       />
-      <field-image-code :mobile="formData.mobile" @handlerCode="handlerCode" />
+      <field-image-code :mobile="formData.mobile" @handlerCode="handlerCode" :type="15"/>
       <van-field
         type="password"
         placeholder="请输入密码"

+ 8 - 4
src/views/login/login.vue

@@ -8,13 +8,13 @@
         v-model="form.mobile"
         name="validator"
         placeholder="请输入手机号"
-        :rules="[{ validator: validatorMobile, message: '请输入正确的手机号' }]"
+        :rules="[{ validator: validatorMobile }]"
         label=""
         type="digit"
         maxlength="11"
         left-icon="https://static.caimei365.com/app/mini-distribution/phone.png"
       />
-      <field-image-code :mobile="form.mobile" @handlerCode="handlerCode" :leftIcon="false"/>
+      <field-image-code :mobile="form.mobile" @handlerCode="handlerCode" :leftIcon="false" :type="14"/>
       <div class="pwLogin">
         <div @click="$ApiRouter('/pwlogin')">密码登录</div>
       </div>
@@ -47,11 +47,15 @@ export default {
   mounted () {},
   methods: {
     validatorMobile (val) {
-      return /1\d{10}/.test(val)
+      if (!(/1\d{10}/.test(val))) {
+        Toast.fail('请输入正确的手机号')
+      }
     },
     validatorVerification (val) {
       if (this.form.mobile) {
-        return /\d{6}/.test(val)
+        if (!(/\d{6}/.test(val))) {
+          Toast.fail('请输入正确的验证码')
+        }
       } else {
         this.validatorMobile(this.form.mobile)
       }

+ 5 - 4
src/views/login/pwlogin.vue

@@ -8,7 +8,7 @@
         v-model="form.mobileOrEmail"
         name="validator"
         placeholder="请输入手机号"
-        :rules="[{ validator: validatormobileOrEmail, message: '请输入正确的手机号' }]"
+        :rules="[{ validator: validatormobileOrEmail }]"
         label=""
         type="digit"
         maxlength="11"
@@ -18,10 +18,9 @@
         v-model="form.password"
         name="密码"
         placeholder="请输入密码"
-        :rules="[{ required: true, message: '请输入密码' }]"
+        :rules="[{ required: true }]"
         type="password"
         left-icon="https://static.caimei365.com/app/mini-distribution/clock.png"
-        maxlength="8"
       />
       <div class="pwLogin">
         <div @click="$ApiRouter('/login')">验证码登录</div>
@@ -50,7 +49,9 @@ export default {
   },
   methods: {
     validatormobileOrEmail (val) {
-      return /1\d{10}/.test(val)
+      if (!(/1\d{10}/.test(val))) {
+        Toast.fail('请输入正确的手机号')
+      }
     },
     onFailed (errorInfo) {
       console.log('failed', errorInfo)

+ 1 - 1
src/views/mine-card/index.vue

@@ -4,7 +4,7 @@
     <div class="card-item" @click="show = true">
       <div>头像</div>
       <div class="card-img">
-        <van-image :src="userInfo.image"></van-image>
+        <van-image :src="userInfo.image || 'https://static.caimei365.com/app/img/icon/default-head-new.png'"></van-image>
       </div>
       <i class="van-icon van-icon-arrow van-cell__right-icon"></i>
     </div>

+ 24 - 8
src/views/order-list/index.vue

@@ -125,9 +125,8 @@ export default {
       formData: {
         pageSize: 20,
         pageNum: 1,
-        serviceProviderId: this.$store.getters.userInfo.id, // 1381
         groupServiceId: 0,
-        listType: this.$route.query.active || 0,
+        listType: this.$route.query.active * 1 || 0,
         orderSubmitType: 1,
         type: 2,
         orderState: 0
@@ -154,6 +153,7 @@ export default {
     async handlerManage (id) {
       this.activeBtn = id
       this.formData.orderSubmitType = id
+      this.formData.serviceProviderId = this.$store.getters.userInfo.id
       const j =
       id === 1
         ? { id: this.$store.getters.userInfo.id }
@@ -203,13 +203,29 @@ export default {
     initAppMessageShareData (info) {
       this.$wxReady((wx) => {
         // 需在用户可能点击分享按钮前就先调用
-        wx.updateAppMessageShareData({
-          title: '分享订单', // 分享标题
-          desc: '分享订单', // 分享描述
-          link: `https://sell-b.caimei365.com/#/share?type=2&shopOrderId=${info.shopOrderId}&userId=${info.userId}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
-          imgUrl: 'https://static.caimei365.com/app/mini-distribution/qrcode.png', // 分享图标
+        // wx.updateAppMessageShareData({
+        //  title: '分享订单', // 分享标题
+        //  desc: '分享订单', // 分享描述
+        //  link: `https://sell-b.caimei365.com/share?type=2&shopOrderId=${info.shopOrderId}&userId=${info.userId}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+        //  imgUrl: 'https://static.caimei365.com/app/mini-distribution/qrcode.png', // 分享图标
+        //  fail: () => {
+        //    alert('updateAppMessageShareData: 设置错误')
+        //  },
+        //  success: () => {
+        //    alert('updateAppMessageShareData: 设置成功')
+        //  }
+        // })
+        wx.onMenuShareAppMessage({
+          title: `http://sell-b.caimei365.com/share?type=2&shopOrderId=${info.shopOrderId}&userId=${info.userId}`, // 分享标题
+          desc: `http://sell-b.caimei365.com/share?type=2&shopOrderId=${info.shopOrderId}&userId=${info.userId}`, // 分享描述
+          link: `http://sell-b.caimei365.com/share?type=2&shopOrderId=${info.shopOrderId}&userId=${info.userId}&active=0`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+          imgUrl: 'http://sell-b.caimei365.com/favicon.png', // 分享图标
+          type: 'link',
+          success: () => {
+            alert('onMenuShareAppMessage: 设置成功')
+          },
           fail: () => {
-            this.initAppMessageShareData(info)
+            alert('onMenuShareAppMessage: 设置失败')
           }
         })
       })

+ 9 - 7
src/views/order-list/order-pay.vue

@@ -2,7 +2,7 @@
   <div>
     <nav-bar title="支付订单" @click-left="$router.back()" />
     <div class="list" v-for="item in orderList" :key="item.orderId">
-      <order-goods-info :goodInfo="item" :productInfo="item.orderProductList[0]"></order-goods-info>
+      <order-goods-info :goodInfo="item" :productInfo="item.orderProductList[0]" :showStatus="false"></order-goods-info>
       <div class="label">
         运费
         <span>{{ item.postageInfo }}</span>
@@ -16,11 +16,11 @@
         <span style="color: #F85050;">{{ '¥' + item.obligation }}</span>
       </div>
       <div class="pay">
-        <div class="pay-btn">
-          <van-button color="#FF5B00" @click="payMent(item)">线上支付</van-button>
+        <div class="pay-btn" v-if="item.onlinePay === 0 || item.onlinePay === 1">
+          <van-button color="#FF5B00" @click="payMentOnline(item)">线上支付</van-button>
         </div>
-        <div class="pay-btn">
-          <van-button color="#FF5B00" @click="payMent(item)">线下支付</van-button>
+        <div class="pay-btn" v-if="item.onlinePay === 0 || item.onlinePay === 2">
+          <van-button color="#FF5B00" @click="payMentOffline(item)">线下支付</van-button>
         </div>
       </div>
     </div>
@@ -50,9 +50,11 @@ export default {
       const data = await orderPayList({ orderId: this.orderId })
       this.orderList = data
     },
-    payMent ($event) {
+    payMentOnline ($event) {
       return this.$router.push(`/paymentOnline?shopOrderId=${$event.shopOrderId}`)
-      // else return this.$router.push(`/paymentOffline?shopOrderId=${$event.shopOrderId}`)
+    },
+    payMentOffline ($event) {
+      return this.$router.push(`/paymentOffline?shopOrderId=${$event.shopOrderId}`)
     }
   }
 }

+ 4 - 1
src/views/order-report/detail.vue

@@ -65,6 +65,9 @@ export default {
   computed: {
     id () {
       return this.$route.query.id
+    },
+    settleStatus () {
+      return this.$route.query.settleStatus
     }
   },
   methods: {
@@ -77,7 +80,7 @@ export default {
       })
     },
     async orderReportDetail () {
-      const data = await orderReportDetail({ id: this.id })
+      const data = await orderReportDetail({ id: this.id, settleStatus: this.settleStatus })
       this.form = data.cmDistribution
       this.orderList = data.paginationVo.results
     }

+ 4 - 3
src/views/order-report/index.vue

@@ -20,7 +20,7 @@
       <order-report-search @search="searchType"/>
     </div>
     <div class="order-report-list">
-      <div class="report-card" v-for="i in dataList" :key="i.id" @click="$ApiRouter(`/order-report-detail?id=${i.id}`)">
+      <div class="report-card" v-for="i in dataList" :key="i.id" @click="$ApiRouter(`/order-report-detail?id=${i.id}&settleStatus=${activeName}`)">
         <div class="card-item">
           <div>成员姓名:<span>{{ i.name }}</span></div>
         </div>
@@ -72,7 +72,7 @@ export default {
         }
       ],
       formData: {
-        linkName: '',
+        linkMan: '',
         mobile: '',
         parentId: this.$store.getters.userInfo.id
       },
@@ -89,8 +89,9 @@ export default {
   },
   methods: {
     searchType ($event) {
-      this.formData.linkName = $event.name
+      this.formData.linkMan = $event.name
       this.formData.mobile = $event.phone
+      this.orderReportList()
     },
     async orderReportList () {
       const data = await orderReportList(Object.assign(this.formData, { settleStatus: this.activeName }))

+ 5 - 2
src/views/order-sales/detail.vue

@@ -78,7 +78,7 @@ export default {
       formData: {
         shopOrderNo: '',
         startTime: '',
-        entTime: '',
+        endTime: '',
         pageNum: 1,
         pageSize: 10
       },
@@ -101,6 +101,9 @@ export default {
     },
     id () {
       return this.$route.query.id
+    },
+    payWay () {
+      return this.$route.query.payWay
     }
   },
   mounted () {
@@ -126,7 +129,7 @@ export default {
       this.showEndPicker = false
     },
     async orderSaleDetail () {
-      const data = await orderSaleDetail(Object.assign(this.formData, { id: this.id }))
+      const data = await orderSaleDetail(Object.assign(this.formData, { id: this.id, splitSettleStatus: this.status, payWay: this.payWay }))
       this.distributionInfo = data.cmDistribution
       this.dataList = data.paginationVo.results
     },

+ 1 - 1
src/views/order-sales/index.vue

@@ -112,7 +112,7 @@ export default {
       this.dataList = data.cmDistributionList
     },
     handlerDetail (item) {
-      this.$ApiRouter('/order-sales-detail?status=' + this.formData.splitSettleStatus + `&id=${item.id}`)
+      this.$ApiRouter('/order-sales-detail?status=' + this.formData.splitSettleStatus + `&id=${item.id}` + '&payWay=' + this.formData.payWay)
     }
   }
 }

+ 16 - 14
src/views/pay/addBanks.vue

@@ -2,11 +2,11 @@
   <div>
     <nav-bar title="添加银行卡" @click-left="$router.back()" />
     <div class="content">
-      <van-field v-model="formData.quickPayBankNumber" label="卡号" />
+      <van-field v-model="formData.quickPayBankNumber" label="卡号" input-align="right" />
       <van-cell is-link title="卡类型" :value="type" @click="show = true" />
-      <van-field v-model="formData.quickPayUserName" label="姓名" />
-      <van-field v-model="formData.idCard" label="身份证" />
-      <van-field v-model="formData.quickPayMobile" type="tel" label="预留手机号" />
+      <van-field v-model="formData.quickPayUserName" label="姓名" input-align="right" />
+      <van-field v-model="formData.idCard" label="身份证" input-align="right" />
+      <van-field v-model="formData.quickPayMobile" type="tel" label="预留手机号" input-align="right" />
       <van-cell is-link title="有效期" :value="type" @click="showTimePicker = true" v-if="pickerIndex === 2"/>
       <van-field v-model="formData.cvvCode" label="cvv2" v-if="pickerIndex === 2"/>
     </div>
@@ -19,10 +19,11 @@
 
 <script>
 import { orderPayQuickPay, orderPayQuickBindCard } from '@/api/institutionApi/pay'
+import { Toast } from 'vant'
 export default {
   data () {
     return {
-      show: true,
+      show: false,
       formData: {
         userId: '',
         quickPayBankNumber: '',
@@ -30,7 +31,8 @@ export default {
         idCard: '',
         quickPayMobile: '',
         cvvCode: '',
-        quickPayBankExpireTime: ''
+        quickPayBankExpireTime: '',
+        bankType: 1
       },
       actions: [{ id: 1, name: '借记卡' }, { id: 2, name: '贷记卡' }],
       type: '借记卡',
@@ -72,27 +74,27 @@ export default {
       // 直接绑卡
       try {
         const res = await orderPayQuickBindCard(this.formData)
-        console.log('res', res.data)
-        const data = JSON.stringify({ formData: this.formData, payData: res.data })
-        this.$api.navigateTo(`/pages/user/pay/card-comfirm-sub?type=${this.subType}&data=${data}`)
+        console.log('res', res)
+        const data = JSON.stringify({ formData: this.formData, payData: res })
+        this.$router.push(`/card-comfirm-sub?type=${this.subType}&data=${data}`)
       } catch (error) {
-        this.$util.msg(error.msg, 2000)
+        Toast.fail(error)
       }
     },
     async orderPayQuickPay () {
       // 绑卡并支付
       try {
         const res = await orderPayQuickPay(this.formData)
-        console.log('res', res.data)
+        console.log('res', res)
         const data = {
           formData: this.formData,
-          payData: res.data,
+          payData: res,
           orderId: this.orderId,
           payAmount: this.payAmount
         }
-        this.$api.navigateTo(`/pages/user/pay/card-comfirm-sub?type=${this.subType}&data=${JSON.stringify(data)}`)
+        this.$router.push(`/card-comfirm-sub?type=${this.subType}&data=${JSON.stringify(data)}`)
       } catch (error) {
-        this.$util.msg(error.msg, 2000)
+        Toast.fail(error)
       }
     }
   }

+ 265 - 0
src/views/pay/card-comfirm-sub.vue

@@ -0,0 +1,265 @@
+<!-- eslint-disable no-tabs -->
+<template>
+	<div class="container card clearfix">
+			<div class="card-content">
+				<div class="card-title" v-if="subType === 2 || subType === 3">
+					<div class="card-pay-text">¥{{ payAmount }}</div>
+				</div>
+				<div class="card-mains">
+					<div class="card-form-text">已发送至手机号 {{ phoneNumbe }}</div>
+					<div class="card-form">
+						<van-field
+							class="card-input"
+							v-model="codeParams.bindCode"
+							@input="handleInput"
+							type="number"
+							maxlength="6"
+							placeholder="请输入短信验证码"
+						/>
+						<div
+							class="card-form-code"
+							:class="isMobileDisabled ? 'disabled' : ''"
+							@click.stop="handleMobileCode"
+						>
+							<span>{{ mobileCodeText }}</span>
+						</div>
+					</div>
+				</div>
+				<div class="card-mains-btn">
+					<van-button
+						class="add-btn"
+						:disabled="disabled"
+						:class="[disabled ? 'disabled' : '']"
+						@click="handleAddCard"
+					>
+						{{ suBbtnText }}
+					</van-button>
+				</div>
+			</div>
+	</div>
+</template>
+<script>
+import { orderPayQuickPay, orderPayQuickBindCard } from '@/api/institutionApi/pay'
+export default {
+  data () {
+    return {
+      orderId: 0,
+      params: {},
+      payAmount: '',
+      isMobileDisabled: true, // 手机验证码按钮控制
+      mobilCount: '', // 倒计时
+      mobileCodeText: '重新发送',
+      mobilTime: null,
+      codeParams: {
+        orderId: '',
+        infoId: '',
+        bindCode: '',
+        flag: 1 // 1绑卡 2 付款
+      },
+      skeletonShow: true,
+      suBbtnText: '确认绑定'
+    }
+  },
+  mounted () {
+    this.initOption()
+  },
+  filters: {},
+  computed: {
+    phoneNumbe () {
+      // 手机号仅显示前三位及后四位数字,隐藏信息用*代替
+      return this.params.quickPayMobile.substr(0, 3) + '****' + this.params.quickPayMobile.substring(7)
+    },
+    disabled () {
+      return !(this.codeParams.bindCode.length > 4)
+    },
+    data () {
+      return JSON.parse(this.$route.query.data)
+    },
+    subType () { // 1直接绑卡  2//首次绑卡并支付 3//确认支付
+      return this.$route.query.type * 1
+    }
+  },
+  methods: {
+    initOption () {
+      this.params = this.data.params
+      this.codeParams = Object.assign(this.codeParams, this.data.payData)
+      if (this.subType === 1) {
+        this.codeParams.flag = 1
+      } else {
+        this.codeParams.flag = 2
+        this.orderId = this.data.orderId
+        this.payAmount = this.params.quickPayFlag === 2 ? this.data.payAmount : this.params.payAmount
+      }
+      this.handleCodeTime()
+      this.handleBbtnText(this.subType)
+    },
+    handleCodeTime () {
+      // 倒计时
+      const TIME_COUNT = 60
+      if (!this.mobilTime) {
+        this.mobilCount = TIME_COUNT
+        this.isMobileDisabled = true
+        this.mobilTime = setInterval(() => {
+          if (this.mobilCount > 1 && this.mobilCount <= TIME_COUNT) {
+            this.mobilCount--
+            this.mobileCodeText = this.mobilCount + '秒后重发'
+          } else {
+            this.isMobileDisabled = false
+            clearInterval(this.mobilTime)
+            this.mobilTime = null
+            this.mobileCodeText = '重新发送'
+          }
+        }, 1000)
+      }
+    },
+    handleBbtnText (value) {
+      const textMap = {
+        1: '确认绑定',
+        2: '确认绑定支付',
+        3: '确认支付'
+      }
+      this.suBbtnText = textMap[value]
+    },
+    async handleAddCard () {
+      // 提交绑定或支付
+      try {
+        const loadText = this.subType === 1 ? '绑定中...' : '支付中...'
+        const successMsg = this.subType === 1 ? '绑定成功' : '支付成功'
+        await this.PayService.orderPayQuickBindCode(this.codeParams, loadText)
+        this.$util.msg(successMsg, 2000, true, 'success')
+        setTimeout(() => {
+          this.handleSuccessHref()
+        }, 2000)
+      } catch (error) {
+        console.log(error)
+        this.$util.msg(error.msg, 2000)
+      }
+    },
+    handleSuccessHref () {
+      //  tiaozhuan
+      if (this.subType === 1) {
+        this.$api.navigateBack(2)
+      } else {
+        if (this.params.quickPayFlag === 1) {
+          const linkData = {
+            payAmount: this.params.payAmount,
+            shopOrderId: this.shopOrderId,
+            orderId: this.orderId,
+            type: 'success'
+          }
+          this.$api.redirectTo(`/order-success?data=${JSON.stringify({ data: linkData })}`)
+        } else {
+          this.$api.redirectTo('/pages/user/member/member')
+        }
+      }
+    },
+    handleMobileCode () {
+      // 获取短信验证码
+      this.isMobileDisabled = true
+      if (this.subType === 1) {
+        this.orderPayQuickBindCard()
+      } else {
+        this.orderPayQuickPay()
+      }
+    },
+    async orderPayQuickBindCard () {
+      // 直只绑卡
+      try {
+        await orderPayQuickBindCard(this.params)
+        this.handleCodeTime()
+      } catch (error) {
+        this.isMobileDisabled = false
+      }
+    },
+    async orderPayQuickPay () {
+      // 绑卡并支付
+      try {
+        await orderPayQuickPay(this.params)
+        this.handleCodeTime()
+      } catch (error) {
+        console.log(error)
+        this.isMobileDisabled = false
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.container-cash{
+  width: 100%;
+  .container-wrapper{
+    width:100%;
+    height: auto;
+    padding: 6vw 1.2vw 0 1.2vw;
+    box-sizing: border-box;
+    .cash-icon{
+      width: 100%;
+      height: 4.5vw;
+      text-align: center;
+      .iconfont{
+        font-size: 4vw;
+        &.icon-wancheng{
+          color:#00BE6F;
+        }
+        &.icon-shibai{
+          color:#F94B4B;
+        }
+      }
+    }
+    .cash-text{
+      width: 100%;
+      height: 4.5vw;
+      text-align: center;
+      font-size: 1.4vw;
+      color: #333333;
+      line-height: 4.5vw;
+      padding-bottom: 2vw;
+    }
+  }
+  .container-amount{
+    width: 100%;
+    height: 6.5vw;
+    box-sizing: border-box;
+    padding: 0 1.2vw;
+    margin-bottom: 1.2vw;
+    font-size: 1.4vw;
+    color: #333333;
+    line-height: 4.5vw;
+    border-top: 1vw solid #F7F7F7;
+    border-bottom: 1vw solid #F7F7F7;
+    .amount-label{
+      float: left;
+      font-weight: bold;
+    }
+    .amount-money{
+      float: right;
+      text-align: right;
+    }
+  }
+  .container-button{
+    width: 100%;
+    box-sizing: border-box;
+    padding: 4vw 3.75vw;
+    .btn{
+      width: 100%;
+      height: 4.5vw;
+      border-radius: 2.5vw;
+      line-height: 4.5vw;
+      box-sizing: border-box;
+      text-align: center;
+      font-size: 1.4vw;
+      color: #FFFFFF;
+      margin: 1.2vw 0;
+      &.btn-open{
+        background:#FFFFFF;
+        border: 1px solid #FF5B00;
+        color: #FF5B00;
+      }
+      &.btn-home{
+        background: linear-gradient(90deg, #FF9300 0%, #FF5B00 100%);
+      }
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/pay/mixins/pay.js

@@ -16,7 +16,7 @@ export default {
         shopOrderId: this.$route.query.shopOrderId,
         payAmount: this.$route.query.payAmount
       }
-      location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent('https://sell-b.caimei365.com/#/wechatpay')}&response_type=code&scope=snsapi_base&state=${JSON.stringify(orderInfo)}#wechat_redirect`
+      location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent('https://sell-b.caimei365.com/wechatpay')}&response_type=code&scope=snsapi_base&state=${JSON.stringify(orderInfo)}#wechat_redirect`
     },
     inItPayMent () {
       if (this.isWeChat && this.isShow === 0) {

+ 15 - 0
src/views/pay/order-success.vue

@@ -0,0 +1,15 @@
+<template>
+  <div>
+
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style lang="sass" scoped>
+
+</style>

+ 14 - 2
src/views/pay/paymentOnline.vue

@@ -32,9 +32,19 @@
         </div>
       </div>
       <div class="bank-pay">
-        <van-cell title="添加银行卡快捷支付" is-link to="addBanks?type=2" />
+        <van-cell title="添加银行卡快捷支付" is-link to="addBanks?type=2" v-if="bankList.length === 0"/>
         <van-radio-group v-model="radio">
           <van-cell-group>
+            <div v-if="bankList.length !== 0">
+              <van-cell :title="item.bankName" clickable @click="handlerPay(item)" :icon="'https://static.caimei365.com/app/img/pay/icon_' +
+              item.bankCode +
+              '_@2x.png'" v-for="item in bankList" :key="item.id">
+                <template #right-icon>
+                  <van-radio :name="item.id" />
+                </template>
+              </van-cell>
+              <van-cell title="添加别的银行卡快捷支付" is-link :to="`addBanks?type=2&userId=${shopOrder.userId}`" />
+            </div>
             <van-cell :title="item.title" clickable @click="handlerPay(item)" :icon="item.icon" v-for="item in payList" :key="item.id">
               <template #right-icon>
                 <van-radio :name="item.id" />
@@ -78,6 +88,7 @@ export default {
         shopOrderId: '',
         payType: 2
       },
+      orderData: {},
       payList: [
         {
           id: 1,
@@ -117,6 +128,7 @@ export default {
       this.userId = data.shopOrder.userId
       this.shopOrder = data.shopOrder
       this.bankList = data2
+      this.radio = data2.length > 0 && this.bankList[0].id
       this.discernReceipt = data.discernReceipt
     },
     async bankQuickPay () {
@@ -151,7 +163,7 @@ export default {
       }
     },
     handlerPay ($event) {
-      this.payName = $event.title
+      this.payName = $event.title || $event.bankName
       this.radio = $event.id
     },
     handlerShowDialog ($event) {

+ 1 - 1
src/views/share/index.vue

@@ -53,7 +53,7 @@ export default {
         if (this.type === 1) {
           this.$router.push(`/order-detail?shopOrderId=${query.shopOrderId}&userId=${query.userId}&isIns=1`)
         } else if (this.type === 2) {
-          this.$router.push(`/order-list?&uId=${query.userId}&isIns=1`)
+          this.$router.push(`/order-list?&uId=${query.userId}&isIns=1&active=${query.active}`)
         }
       } catch (error) {
         console.log(error)

+ 24 - 8
src/views/shopping-mall/detail.vue

@@ -35,6 +35,7 @@ export default {
         productId: 0,
         typeId: 0
       },
+      count: 0,
       productInfo: {},
       skus: {},
       imageList: [],
@@ -87,17 +88,32 @@ export default {
     initAppMessageShareData () {
       this.$wxReady((wx) => {
         // 需在用户可能点击分享按钮前就先调用
-        wx.updateAppMessageShareData({
-          title: '商品详情', // 分享标题
-          desc: '商品详情', // 分享描述
-          link: `https://sell-b.caimei365.com/#/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+        // wx.updateAppMessageShareData({
+        //  title: `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享标题
+        //  desc: `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享描述
+        //  link: `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+        //  imgUrl: 'https://static.caimei365.com/app/mini-distribution/qrcode.png', // 分享图标
+        //  fail: () => {
+        //    alert('updateAppMessageShareData: 设置错误')
+        //  },
+        //  success: () => {
+        //    alert('updateAppMessageShareData: 设置成功')
+        //  }
+        // }) // `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`
+        wx.onMenuShareAppMessage({
+          title: `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享标题
+          desc: `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享描述
+          link: `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
           imgUrl: 'https://static.caimei365.com/app/mini-distribution/qrcode.png', // 分享图标
-          fail: (err) => {
-            console.log('error: ' + err)
-            alert(err)
+          type: 'link',
+          success: () => {
+            alert('onMenuShareAppMessage: 设置成功')
+          },
+          fail: () => {
+            alert('onMenuShareAppMessage: 设置失败')
           }
         })
-      })
+      }, 'https://sell-b.caimei365.com/goods-detail?productId=1040&typeId=0&suid=666803&isIns=1')
     }
   }
 }

+ 27 - 0
src/views/shopping-mall/index.vue

@@ -29,6 +29,7 @@ export default {
   },
   mounted () {
     this.productList()
+    this.initAppMessageShareData()
   },
   methods: {
     getMoreInfo () {
@@ -42,6 +43,32 @@ export default {
       const { results: data, hasNextPage } = await productList(this.formData)
       this.dataList = [...data, ...this.dataList]
       this.hasNextPage = hasNextPage
+    },
+    // 分享当前页面
+    initAppMessageShareData () {
+      this.$wxReady((wx) => {
+        // 需在用户可能点击分享按钮前就先调用
+        wx.updateAppMessageShareData({
+          title: `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享标题
+          desc: `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享描述
+          link: `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+          imgUrl: 'https://static.caimei365.com/app/mini-distribution/qrcode.png' // 分享图标
+        }) // `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`
+        // wx.onMenuShareAppMessage({
+        //  title: `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享标题
+        //  desc: `https://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享描述
+        //  link: `http://sell-b.caimei365.com/goods-detail?productId=${this.productId}&typeId=0&suid=${this.$store.getters.userId}&isIns=1`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
+        //  imgUrl: 'https://static.caimei365.com/app/mini-distribution/qrcode.png', // 分享图标
+        //  type: 'link',
+        //  success: () => {
+        //    console.log('设置成功')
+        //    alert('设置成功')
+        //  },
+        //  fail: () => {
+        //    alert('设置失败')
+        //  }
+        // })
+      }, 'https://sell-b.caimei365.com/goods-detail?productId=1040&typeId=0&suid=666803&isIns=1')
     }
   }
 }