Kaynağa Gözat

线上bug修改

喻文俊 3 yıl önce
ebeveyn
işleme
98fa6409ff

BIN
caimei-authentic-www.rar


+ 10 - 7
components/LdmCity/index.vue

@@ -14,9 +14,9 @@
         <span v-text="item.label" v-else></span>
       </div>
     </div>
-    <keep-alive>
-      <div class="option-group">
-        <div class="options" v-show="showOptions" :class="[translateX]">
+    <div class="option-group">
+      <keep-alive>
+        <div class="options" v-if="showOptions" :class="[translateX]">
           <div class="scroll-box">
             <div class="option" @click="onOptionsClick(emptyData)">全部</div>
             <div
@@ -28,8 +28,8 @@
             ></div>
           </div>
         </div>
-      </div>
-    </keep-alive>
+      </keep-alive>
+    </div>
   </div>
 </template>
 
@@ -121,6 +121,9 @@ export default {
       const parent = this.selectedValue[this.current - 1]
       this.list = parent.children
     },
+    setSelectValue(value) {
+      this.selectedValue = value
+    },
   },
 }
 </script>
@@ -302,10 +305,10 @@ export default {
           left: 4vw;
         }
         &.offset-1 {
-          transform: translateX(36vw);
+          transform: translateX(32vw);
         }
         &.offset-2 {
-          right: 4vw;
+          right: 12vw;
         }
 
         .scroll-box {

+ 9 - 5
components/SimpleCity/index.vue

@@ -14,9 +14,10 @@
         <span v-text="item.label" v-else></span>
       </div>
     </div>
-    <keep-alive>
-      <div class="option-group">
-        <div class="options" v-show="showOptions" :class="[translateX]">
+
+    <div class="option-group">
+      <keep-alive>
+        <div class="options" v-if="showOptions" :class="[translateX]">
           <div class="scroll-box">
             <div class="option" @click="onOptionsClick(emptyData)">全部</div>
             <div
@@ -28,8 +29,8 @@
             ></div>
           </div>
         </div>
-      </div>
-    </keep-alive>
+      </keep-alive>
+    </div>
   </div>
 </template>
 
@@ -121,6 +122,9 @@ export default {
       const parent = this.selectedValue[this.current - 1]
       this.list = parent.children
     },
+    setSelectValue(value) {
+      this.selectedValue = value
+    },
   },
 }
 </script>

+ 1 - 1
package.json

@@ -3,7 +3,7 @@
   "version": "1.0.0",
   "private": true,
   "scripts": {
-    "dev": "cross-env ENV=production NODE_ENV=production nuxt",
+    "dev": "cross-env ENV=development NODE_ENV=development nuxt",
     "build:dev": "cross-env NODE_ENV=development ENV=development nuxt build",
     "build:stage": "cross-env NODE_ENV=staging ENV=staging nuxt build",
     "build:prod": "cross-env NODE_ENV=production ENV=production nuxt build",

+ 10 - 3
pages/_template/app/approve/club/index.vue

@@ -26,6 +26,7 @@
         <!-- 地区选择 -->
         <div class="city">
           <SimpleCity
+            ref="citySelect"
             @change="onCityChange"
             :options="cityList"
             labelName="name"
@@ -97,6 +98,7 @@ export default {
       },
       total: 0,
       cityList: [],
+      selectValue: [],
     }
   },
   computed: {
@@ -109,15 +111,13 @@ export default {
     const cacheData = this.$getStorage(this.routePrefix, 'club_list_data')
     if (cacheData) {
       this.initFromCache(cacheData)
+      this.$removeStorage(this.routePrefix, 'club_list_data')
     } else {
       this.initData()
       this.fetchCityList()
     }
   },
   beforeDestroy() {
-    this.$setStorage(this.routePrefix, 'club_list_data', this.$data, {
-      expiredTime: 5 * 60 * 1000,
-    })
     this.$toast.clear()
   },
   methods: {
@@ -125,6 +125,9 @@ export default {
     drawLogo,
     // 查看详情
     toDetail(item) {
+      this.$setStorage(this.routePrefix, 'club_list_data', this.$data, {
+        expiredTime: 5 * 60 * 1000,
+      })
       this.$setStorage(this.routePrefix, 'clubInfo', item)
       const url = `${this.routePrefix}/approve/club/detail?id=${item.authId}`
       this.$router.push(url)
@@ -138,6 +141,8 @@ export default {
       this.listQuery = cacheData.listQuery
       this.total = cacheData.total
       this.cityList = cacheData.cityList
+      this.selectValue = cacheData.selectValue
+      this.$refs.citySelect.setSelectValue(this.selectValue)
     },
     // 初始化页面数据
     async initData() {
@@ -196,6 +201,7 @@ export default {
       this.listQuery.provinceId = ''
       this.listQuery.cityId = ''
       this.listQuery.townId = ''
+      this.selectValue = selectValue
 
       selectValue.map((item, index) => {
         if (index === 0) {
@@ -444,6 +450,7 @@ export default {
           position: relative;
           margin-left: 3.2vw;
           .name {
+            width: 48vw;
             font-size: 4vw;
             color: #101010;
             font-weight: bold;

+ 3 - 1
pages/_template/ldm/approve/club/detail.vue

@@ -99,7 +99,7 @@ export default {
         console.log(error)
       }
       if (this.clubInfo.bannerList.length <= 0) {
-        this.clubInfo.bannerList.push('/placeholder.png')
+        this.clubInfo.bannerList.push('/ldm-placeholder.png')
       }
       if (!this.clubInfo.logo) {
         this.clubInfo.logo = drawLogo(this.clubInfo.authParty)
@@ -161,6 +161,7 @@ export default {
         margin: 0 auto;
         border-radius: 50%;
         box-shadow: 0 4px 24px rgb(200, 200, 200, 0.4);
+        background: #fff;
       }
       .name {
         font-size: 50px;
@@ -336,6 +337,7 @@ export default {
         margin: 0 auto;
         border-radius: 50%;
         box-shadow: 0 0.4vw 0.9vw rgba(200, 200, 200, 0.4);
+        background: #fff;
       }
       .name {
         font-size: 5vw;

+ 10 - 3
pages/_template/ldm/approve/club/index.vue

@@ -21,6 +21,7 @@
         <!-- 地区筛选 -->
         <div class="city">
           <LdmCity
+            ref="citySelect"
             @change="onCityChange"
             :options="cityList"
             labelName="name"
@@ -84,6 +85,7 @@ export default {
       },
       total: 0,
       cityList: [],
+      selectValue: [],
     }
   },
   computed: {
@@ -96,15 +98,13 @@ export default {
     const cacheData = this.$getStorage(this.routePrefix, 'club_list_data')
     if (cacheData) {
       this.initFromCache(cacheData)
+      this.$removeStorage(this.routePrefix, 'club_list_data')
     } else {
       this.initData()
       this.fetchCityList()
     }
   },
   beforeDestroy() {
-    this.$setStorage(this.routePrefix, 'club_list_data', this.$data, {
-      expiredTime: 5 * 60 * 1000,
-    })
     this.$toast.clear()
   },
   methods: {
@@ -112,6 +112,9 @@ export default {
     drawLogo,
     // 查看详情
     toDetail(item) {
+      this.$setStorage(this.routePrefix, 'club_list_data', this.$data, {
+        expiredTime: 5 * 60 * 1000,
+      })
       this.$setStorage(this.routePrefix, 'clubInfo', item)
       const url = `${this.routePrefix}/approve/club/detail?id=${item.authId}`
       this.$router.push(url)
@@ -125,6 +128,8 @@ export default {
       this.listQuery = cacheData.listQuery
       this.total = cacheData.total
       this.cityList = cacheData.cityList
+      this.selectValue = cacheData.selectValue
+      this.$refs.citySelect.setSelectValue(this.selectValue)
     },
     // 初始化页面数据
     async initData() {
@@ -185,6 +190,8 @@ export default {
       this.listQuery.cityId = ''
       this.listQuery.townId = ''
 
+      this.selectValue = selectValue
+
       selectValue.map((item, index) => {
         if (index === 0) {
           this.listQuery.provinceId = item.id

+ 5 - 0
plugins/axios.js

@@ -2,6 +2,7 @@
 import initApi from '@/apis/index'
 import Vue from 'vue'
 import { Dialog, Toast } from 'vant'
+// import {} from ''
 
 export default function (context) {
   const { $axios, redirect, store } = context
@@ -40,6 +41,10 @@ export default function (context) {
         theme: 'round-button',
         confirmButtonColor: 'linear-gradient(to left, #404040, #101010)',
       })
+
+      Vue.prototype.$removeStorage(store.getters.routePrefix, 'userInfo')
+      store.dispatch('user/logout')
+
       if (result === 'confirm') {
         redirect(store.getters.routePrefix)
       }

BIN
static/ldm-placeholder.png


+ 3 - 1
utils/map-utils.js

@@ -18,7 +18,7 @@ export function loactionSelf() {
   return new Promise((resolve, reject) => {
     mapInit(() => {
       const BMapGL = window.BMapGL
-      var geolocation = new BMapGL.Geolocation({
+      const geolocation = new BMapGL.Geolocation({
         // 是否使用高精度定位,默认:true
         enableHighAccuracy: true,
         // 设置定位超时时间,默认:无穷大
@@ -28,6 +28,8 @@ export function loactionSelf() {
       geolocation.enableSDKLocation()
       geolocation.getCurrentPosition(function (r) {
         // alert(JSON.stringify(r))
+        console.log(r)
+        // console.log(this)
         if (this.getStatus() === 0) {
           // alert(JSON.stringify(r))
           resolve({