Forráskód Böngészése

feat:修改一波bug

xzh 4 éve
szülő
commit
6f7d62c3e8

+ 9 - 3
mobile/src/components/browse/index.vue

@@ -4,9 +4,10 @@
       <swiper-slide class="swiper-slide" v-for="(item,index) in idata" :key="index">
         <div class="s-item" :style="{height:wh.width+'px'}" >
           <div v-if="item.video" class="video-bg">
-            <video  controls="controls" playsinline="playsinline" muted="muted" :poster="`${$cdn}images/${floder}/${item.video}.png`" >
-              <source :src="`${$cdn}images/${floder}/${item.big}.mp4`" type="video/mp4">
+            <video  controls="controls" playsinline="playsinline" muted="muted" :poster="`${$cdn}images/${floder}/${item.video}.png`" v-show="!navStatus" >
+              <source :src="`${$cdn}images/${floder}/${item.big}.mp4`" type="video/mp4" >
             </video>
+            <img :src="`${$cdn}images/${floder}/${item.big}.mp4?x-oss-process=video/snapshot,t_2000,f_jpg,w_750,h_420,m_fast`" v-show="navStatus">
           </div>
           <img v-else class="main-img" :src="`${$cdn}images/${floder}/${item.big}.png`">
         </div>
@@ -18,7 +19,7 @@
 <script>
 import 'swiper/dist/css/swiper.css'
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
-
+import { mapState } from 'vuex'
 let wh = {
   width: window.innerWidth,
   height: window.innerHeight
@@ -43,6 +44,11 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapState({
+      navStatus: state => state.user.navStatus
+    })
+  },
   methods: {
     goto (url) {
       window.open(url, '_blank')

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

@@ -5,7 +5,7 @@
         <div class="address-sub address-name">
           <div class="top-title">{{ $t('mall.receiver') }}</div>
           <div class="ant-input">
-            <input v-model="tempAddress.shipName" type="text" :placeholder="langAccount.placeholder.name" />
+            <input v-model="tempAddress.shipName" type="text" :placeholder="langAccount.placeholder.name" maxlength="10" />
           </div>
         </div>
       </div>
@@ -50,7 +50,7 @@
         <div class="address-sub">
           <!-- <div class="top-title">{{langAccount.placeholder.address}}</div> -->
           <div class="ant-input">
-            <input v-model="tempAddress.shipAddress" type="text" :placeholder="langAccount.placeholder.address" />
+            <input v-model="tempAddress.shipAddress" type="text" :placeholder="langAccount.placeholder.address" maxlength="50" />
           </div>
         </div>
       </div>

+ 10 - 2
mobile/src/pages/account/register/index.vue

@@ -58,6 +58,7 @@ import { Base64 } from 'js-base64'
 export default {
   computed: {
     ...mapState({
+      token: state => state.user.token,
       language: state => state.language.current,
       langToast: state => state.language.home.toast,
       langLogin: state => state.language.home.home.loginAside
@@ -204,8 +205,15 @@ export default {
       if (response.code !== 0) {
         return this.$toast.show('warn', this.langToast[response.code])
       }
-      this.$toast.show('success', this.langToast['23'], () => {
-        this.$router.push({path: '/login'})
+      this.$toast.showConfirm('success', this.langToast['23'], async () => {
+        let params1 = {
+          phoneNum: params.phoneNum,
+          password: encodeStr(Base64.encode(this.password))
+        }
+        await this.$store.dispatch('login', params1)
+        if (this.token) {
+          this.$router.push({name: 'information'})
+        }
       })
     }
   }

+ 3 - 0
mobile/src/pages/layout/header.vue

@@ -308,6 +308,9 @@ export default {
       } else {
         this.scene = []
       }
+    },
+    active (val) {
+      this.$store.dispatch('changeNavActive', val)
     }
   },
   mounted () {

+ 1 - 1
mobile/src/store/language/cn/toast.js

@@ -21,7 +21,7 @@ export default{
   '20': '请完善发票信息',
   '21': '请输入18位的税务登记号',
   '22': '请输入正确的手机号码',
-  '23': '账号注册成功,请登录',
+  '23': '注册成功,是否立刻登录?',
   '24': '密码修改成功,请重新登录',
   '25': '没有找到相应的记录',
   '26': '确定要解绑当前相机吗?',

+ 1 - 1
mobile/src/store/language/en/toast.js

@@ -21,7 +21,7 @@ export default{
   '20': 'Please complete the invoice information.',
   '21': 'Please enter the 18-digits tax number.',
   '22': 'Please enter a correct mobile number.',
-  '23': 'Signed up successfully. Log in now.',
+  '23': 'Signed up successfully. Log in now?',
   '24': 'Password reset. Please re-log in.',
   '25': 'No record found.',
   '26': 'Are you sure to unbind the current camera?',

+ 8 - 2
mobile/src/store/user.js

@@ -58,7 +58,8 @@ export default {
     invoice2: invoice2,
     invoice3: invoice3,
     ...dataObj,
-    addressList: []
+    addressList: [],
+    navStatus: false
   },
 
   mutations: {
@@ -81,7 +82,6 @@ export default {
       } catch (error) {
       }
     },
-
     info (state, data) {
       localStorage.setItem(data.name, JSON.stringify(data.val))
       state[data.name] = data.val
@@ -156,6 +156,9 @@ export default {
 
     UPDATEADDRESSLIST (state, list) {
       state.addressList = list
+    },
+    CHANGE_NAV_ACTIVE (state, status) {
+      state.navStatus = status
     }
   },
 
@@ -462,6 +465,9 @@ export default {
       return API.getReceiverList().then(res => {
         commit('UPDATEADDRESSLIST', res.data.data)
       })
+    },
+    changeNavActive ({ commit }, status) {
+      commit('CHANGE_NAV_ACTIVE', status)
     }
   }
 }