Browse Source

feat:bug回归完毕

xzh 4 years ago
parent
commit
04f0de3ada

BIN
mobile/src/assets/images/refactor/conduct/house/item4-en.png


BIN
mobile/src/assets/images/refactor/conduct/shop/item2-en.png


+ 2 - 2
mobile/src/components/cinvoices/index.vue

@@ -145,7 +145,7 @@
         </div>
         <div class="address-input-item" v-if="selectedTxt === '企业'">
           <div class="address-sub">
-            <div class="top-title no-require">纳税人识别号</div>
+            <div class="top-title">纳税人识别号</div>
             <div class="ant-input">
               <input @blur="blurHandle" oninput="value=value.replace(/[^\d]/g,'')" maxlength='18' v-model="tempInvoice2.code" type="text" placeholder="请输入18位纳税人识别号" />
             </div>
@@ -236,7 +236,7 @@ export default {
         let title = isObject(this.tempInvoice2.title)
         let code = isObject(this.tempInvoice2.code)
         let emailAddress = isObject(this.tempInvoice2.emailAddress)
-        if (code && code.length !== 18) {
+        if (this.selectedTxt !== '个人' && (!code || code.length !== 18)) {
           return this.$toast.show('warn', this.langToast['21'])
         }
         if (!reg.email.test(emailAddress)) {

+ 3 - 4
mobile/src/components/citySelect/newModule.vue

@@ -159,8 +159,7 @@ export default {
         province,
         city,
         shipMobile,
-        shipName,
-        id
+        shipName
       } = this.tempAddress
 
       let isObject = function (obj) {
@@ -173,10 +172,10 @@ export default {
         province,
         city,
         shipMobile,
-        shipName,
-        id
+        shipName
       }
       let test = Object.keys(params)
+      console.log(test, params)
       for (let i = 0; i < test.length; i++) {
         if (!isObject(params[test[i]])) {
           return this.$toast.show('warn', this.langAccount.fill)

+ 3 - 0
mobile/src/components/invoices/index.vue

@@ -157,6 +157,9 @@ export default {
           return this.$toast.show('warn', '信息填写不完整')
         }
       }
+      if (params.code.length !== 18) {
+        return this.$toast.show('warn', '请输入18位的税务登记号')
+      }
 
       this.$http
         .post('user/invoice/save', params, {

+ 4 - 4
mobile/src/pages/about/index.vue

@@ -72,12 +72,12 @@ export default {
       imgs,
       swiperOption: {
         slidesPerView: 'auto',
-        autoplay: false,
+        autoplay: true,
         centeredSlides: true,
         watchSlidesProgress: true,
-        pagination: {
-          el: '.swiper-pagination'
-        },
+        // pagination: {
+        //   el: '.swiper-pagination'
+        // },
         loop: true,
         paginationClickable: true
       }

+ 5 - 0
mobile/src/pages/conduct/house/index.vue

@@ -56,6 +56,11 @@ export default {
       img: ISZH ? require('@/assets/images/refactor/conduct/house/item3.png') : require('@/assets/images/refactor/conduct/house/item3-en.png'),
       runAnimation: true
     })
+    this.$set(this.list, 3, {
+      name: this.$t('conduct.conductHouse.itemTitle3'),
+      img: ISZH ? require('@/assets/images/refactor/conduct/house/item4.png') : require('@/assets/images/refactor/conduct/house/item4-en.png'),
+      runAnimation: true
+    })
   }
 }
 </script>

+ 13 - 0
mobile/src/pages/conduct/shop/index.vue

@@ -15,6 +15,8 @@
 
 <script>
 import { i18n } from '@/lang'
+import { mapState } from 'vuex'
+
 export default {
   data () {
     return {
@@ -37,6 +39,17 @@ export default {
         }
       ]
     }
+  },
+  computed: {
+    ...mapState({
+      language: state => state.language.current
+    })
+  },
+  mounted () {
+    this.$set(this.list, 1, {
+      name: i18n.t('conduct.conductShop.itemTitle2'),
+      img: this.language === 'zh' ? require('@/assets/images/refactor/conduct/shop/item2.png') : require('@/assets/images/refactor/conduct/shop/item2-en.png')
+    })
   }
 }
 </script>

+ 5 - 1
mobile/src/pages/home/index.vue

@@ -8,7 +8,7 @@
       <p class="plate01-title" v-html="$t('home.bannerText')"></p>
       <img class="p1_bg" src="@/assets/images/refactor/home/plate01-img@2x.png" alt="">
       <div class="bottom">
-        <div @click="broadcast('https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/4dHouse/%E5%9B%9B%E7%BB%B4%E7%9C%8B%E7%9C%8BPro-%202020-7-22%E7%89%88%E6%9C%AC%288K%29.mp4')" class="btn-player">
+        <div @click="showDetailVideo" class="btn-player">
           <img src="@/assets/images/refactor/home/playBtn.png" alt="">
           <span >{{$t('home.bannerIntroVideo')}}</span>
           <div class="play-btn"></div>
@@ -104,6 +104,10 @@ export default {
     },
     gobuy () {
       this.language === 'en' ? window.location.href = 'https://www.alibaba.com/product-detail/4DKanKan-Pro-3D-camera-3D-space_62183626283.html?spm=a2700.icbuShop.74.1.66b35b10I4miJd' : this.$router.push({name: 'purchase'})
+    },
+    showDetailVideo () {
+      const videoUrl = this.language === 'zh' ? `https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/4dHouse/%E5%9B%9B%E7%BB%B4%E7%9C%8B%E7%9C%8BPro-%202020-7-22%E7%89%88%E6%9C%AC%288K%29.mp4` : `https://4dscene.4dage.com/new4dkk/v2/video/4DKanKanPro-en.mp4`
+      this.broadcast(videoUrl)
     }
   }
 }

+ 1 - 0
mobile/src/pages/layout/style.scss

@@ -138,6 +138,7 @@ $bannerHeight:50px;
         background-size: cover;
         border-radius: 50%;
         background-position: center center;
+        margin-left: 4px;
       }
        ul{
           position: absolute;

+ 6 - 0
mobile/src/pages/purchase/index.vue

@@ -535,4 +535,10 @@ export default {
       }
     }
   }
+.goods-name {
+  font-size: 22px;
+  font-weight: bold;
+  color: #202020;
+  margin-top: 15px;
+}
 </style>

+ 8 - 1
mobile/src/pages/purchasezhijia/index.vue

@@ -7,7 +7,8 @@
           :floder="'zhijiabrowse'"
          />
         <div class="txt-con">
-          <img class="p-logo" :src="this.language==='en'?`${$cdn}images/zhijia-logo-en.png`:`${$cdn}images/zhijia-logo-black.png`" alt="">
+          <h1 class="goods-name">{{$t('mall.jiaojia')}}</h1>
+          <!-- <img class="p-logo" :src="this.language==='en'?`${$cdn}images/zhijia-logo-en.png`:`${$cdn}images/zhijia-logo-black.png`" alt=""> -->
           <div class="p-label" v-html="langzhijia.dec"></div>
           <div class="p-price">{{langzhijia.price}}</div>
         </div>
@@ -196,4 +197,10 @@ export default {
   line-height: 20px;
   margin-top: 20px;
 }
+.goods-name {
+  font-size: 22px;
+  font-weight: bold;
+  color: #202020;
+  margin-top: 15px;
+}
 </style>

+ 9 - 9
mobile/src/pages/purchasezhijia/style.scss

@@ -9,7 +9,7 @@
       span{
         padding-right: 5%;
         font-size: 14px;
-        color: rgba(0, 0, 0, 0.7);
+        color: #202020;
         line-height: 18px;
         font-weight: bold;
       }
@@ -31,7 +31,7 @@
         // border-bottom: 1px solid rgba(0, 0, 0, 0.1);
         .p-title{
           font-size: 20px;
-          color: rgba(0,0,0,.7);
+          color:#202020;
           line-height: 24px;
           font-weight: 700;
         }
@@ -41,14 +41,14 @@
         }
         .p-label{
           font-size: 12px;
-          color: rgba(0,0,0,.7);
+          color:#202020;
           line-height: 16px;
         }
         .p-price{
           margin-top: 10px;
           font-size: 20px;
           line-height: 1;
-          color: rgba(0,0,0,.7);
+          color:#202020;
           font-weight: 700;
         }
       }
@@ -61,7 +61,7 @@
         }
         .attr{
           font-size: 14px;
-          color: rgba(0,0,0,.7);
+          color:#202020;
           line-height: 18px;
           font-weight: bold;
           margin: 12px 0 10px;
@@ -87,7 +87,7 @@
           width: 100%;
           padding: 0;
           font-size: 14px;
-          color: rgba(0,0,0,.7);
+          color:#202020;
           font-weight: bold;
           span{
             color: #1fe4dc;
@@ -102,7 +102,7 @@
           padding: 0;
           .icon-yuandian{
             font-size: 14px;
-            color: rgba(0, 0, 0, 0.7);
+            color: #202020;
             font-weight: bold;
           }
           ul{
@@ -114,7 +114,7 @@
               font-size: 12px;
               line-height: 1.5;
               position: relative;
-              color: rgba(0,0,0,.7);
+              color:#202020;
               &::before{
                 content: '';
                 width: 3px;
@@ -156,7 +156,7 @@
             font-size: 12px;
             line-height: 1.2;
             text-align: left;
-            color: rgba(0,0,0,.7);
+            color:#202020;
           }
         }
         .peijian{

+ 76 - 3
mobile/src/pages/userCenter/confirm/index.vue

@@ -81,6 +81,15 @@
            <span class="total-price">¥{{getSum()[1]}}</span>
           </div>
         </div>
+         <div class="agree">
+            <label class="check-con" @click="isAgree=!isAgree">
+              <span class="check-box">
+                <span class="checkbox-inner" :class="{'checkbox-inner-checked':isAgree}"></span>
+              </span>
+              同意<span style="" @click.stop="$router.push({name:'useimg',params:{id:'1v2',type:0,name: 'agreement'}})">四维看看销售协议</span>
+            </label>
+            <!-- <input type="checkbox" v-model="isAgree"> -->
+          </div>
         <!-- <div class="xieyi"><input type="checkbox" />我已阅读并同意四维看看用户协议</div> -->
       </div>
       <div class="btn-confirm" @click="next()">付款</div>
@@ -92,14 +101,22 @@
 import { mapState } from 'vuex'
 import cinvoices from '@/components/cinvoices'
 import payTypeModule from '@/components/payType'
+import browser from '@/util/browser'
 
+let paytypes = {
+  0: 'wechatMobilePay',
+  1: 'aliMobilePay'
+}
 var cloneObj = function (obj) {
   var newObj = {}
   if (obj instanceof Array) {
     newObj = []
   }
   for (var key in obj) {
-    var val = obj[key] || ''
+    var val = obj[key]
+    if (!obj[key] && obj[key] !== 0) {
+      val = ''
+    }
     newObj[key] = typeof val === 'object' ? cloneObj(val) : val
   }
   return newObj
@@ -182,7 +199,9 @@ export default {
       selectedTxt: '不需要发票',
       selectedId: 1,
       isShowAddress: true,
-      showinvoice: true
+      showinvoice: true,
+      isAgree: true,
+      isWeixin: browser.weixin
     }
   },
   methods: {
@@ -210,7 +229,8 @@ export default {
       temp['selectedTxt'] = this.selectedTxt
 
       this.$store.commit('PAYINFO', temp)
-      this.$router.push({path: '/submit'})
+      this.pay()
+      // this.$router.push({path: '/submit'})
     },
     getSum () {
       let sum = 0
@@ -220,6 +240,59 @@ export default {
         count += item.goodsCount
       })
       return [count, sum]
+    },
+    async pay () {
+      if (!this.isAgree) {
+        this.$toast.show('warn', '请阅读并同意四维看看销售协议')
+        return
+      }
+      let {invoice, goods, payType, receiver} = this.payinfo
+      let params = {
+        goods,
+        receiver,
+        invoice,
+        payType,
+        abroad: this.language === 'en' ? 1 : 0
+
+      }
+      let res = await this.$http
+        .post('user/order/placeOrder', params, {
+          headers: {
+            token: this.token
+          }
+        })
+
+      this.$store.commit('ORDERINFO', {
+        orderSn: res.data.data.orderSn,
+        price: res.data.data.goodsAmount,
+        orderType: 0
+      })
+      this.$store.dispatch('getCart')
+      let data = {
+        orderId: res.data.data.id,
+        orderType: 0
+      }
+
+      this.orderId = res.data.data.id
+      this.orderType = 0
+
+      if (Number(payType) !== 2) {
+        if (this.isWeixin) {
+          let hostName = window.location.hostname
+          return location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?redirect_uri=https%3a%2f%2f${hostName}%2fapi%2forder%2fpay%2fwechatPreJsPay%3forderId=${this.orderId}%26orderType=${Number(this.orderType)}&appid=wx779dbafb46bab697&response_type=code&scope=snsapi_base&state=1&connect_redirect=1#wechat_redirect`)
+        }
+        let response = await this.$http
+          .post(`order/pay/${paytypes[payType]}`, data, {
+            headers: {
+              token: this.token
+            }
+          })
+        let url = payType === 1 ? response.data.data.form : response.data.data.mweb_url
+        location.replace(url)
+      } else {
+        document.getElementById('formid').submit()
+        this.$toast.show('warn', this.langToast['3'])
+      }
     }
   },
   async mounted () {

BIN
pc/src/assets/images/home/1.jpg


BIN
pc/src/assets/images/home/solutions-sec.jpg


BIN
pc/src/assets/images/home/solutions-sec.png


+ 1 - 1
pc/src/page/home2/index.vue

@@ -146,7 +146,7 @@ export default {
         title: this.$t('home.plate1Item5'),
         title_sub: this.$t('home.plate1Item5'),
         desc: this.$t('home.plate1Item5SubTitle'),
-        img: require('@/assets/images/home/solutions-sec.png'),
+        img: require('@/assets/images/home/solutions-sec.jpg'),
         list: [this.$t('home.plate1Item5Desc1'), this.$t('home.plate1Item5Desc2')],
         link: '/conductSecury'
       }],

+ 2 - 1
pc/src/page/home2/style.scss

@@ -174,7 +174,8 @@
     .solution-bg {
       float: left;
       background-position: center center;
-      background-size: cover;
+      background-size: 736px auto;
+      background-repeat: no-repeat;
       width: 736px;
       height: 455px;
     }

+ 1 - 1
pc/src/page/mall/confirm/index.vue

@@ -139,7 +139,7 @@ export default {
   methods: {
     async pay () {
       if (!this.checked) {
-        this.$alert(this.$t('login.agreeXieyi'))
+        this.$alert('请阅读并同意四维看看销售协议')
         return
       }
       if (!this.address) {