panhui 4 tahun lalu
induk
melakukan
d694bcb750

+ 16 - 3
src/main/nine-space/src/router/index.js

@@ -421,11 +421,12 @@ router.beforeEach((to, from, next) => {
         window.open(url);
         return;
     }
+    console.log(to);
     if (!store.state.userInfo && to.meta.pageType !== Page.Login) {
         store
             .dispatch('getUserInfo')
             .then(() => {
-                next();
+                next(backNext(to));
             })
             .catch(() => {
                 if (to.meta.pageType != Page.Every) {
@@ -440,14 +441,26 @@ router.beforeEach((to, from, next) => {
                             next(false);
                         });
                 } else {
-                    next();
+                    next(backNext(to));
                 }
             });
     } else {
-        next();
+        next(backNext(to));
     }
 });
 router.afterEach((to, from) => {
     jsapiSign();
 });
+
+function backNext(to) {
+    if (to.path === '/collectionDetail') {
+        to.path = '/productDetail';
+        return to;
+    } else if (to.path === '/castingDetail') {
+        to.path = '/creatorDetail';
+        return to;
+    } else {
+        return;
+    }
+}
 export default router;

+ 5 - 2
src/main/nine-space/src/views/asset/GiveSearch.vue

@@ -12,8 +12,11 @@
                 autofocus
                 :left-icon="require('../../assets/svgs/icon-sosuo.svg')"
                 @search="getSearch"
-                @cancel="$router.go(-1)"
-            />
+            >
+                <template #action>
+                    <div @click="getSearch">搜索</div>
+                </template>
+            </van-search>
         </van-sticky>
         <van-list class="list" :immediate-check="false" :finished="finished" finished-text="" @load="getData">
             <div

+ 1 - 1
src/main/pc-space/src/components/Share.vue

@@ -30,7 +30,7 @@ export default {
     computed: {
         shareConfig() {
             return {
-                url: resolveUrl(this.$baseUrl, this.pageType + '?id=' + this.info.id),
+                url: resolveUrl(this.$baseUrl, '9th/' + this.pageType + '?id=' + this.info.id),
                 title: this.shareTitle, // 标题,默认读取 document.title 或者 <meta name="title" content="share.js" />
                 description: this.description, // 描述, 默认读取head标签:<meta name="description" content="PHP弱类型的实现原理分析" />
                 image: this.image, // 图片, 默认取网页中第一个img标签

+ 16 - 4
src/main/pc-space/src/router/index.js

@@ -253,24 +253,36 @@ router.beforeEach((to, from, next) => {
         store
             .dispatch('getUserInfo')
             .then(() => {
-                next();
+                next(backNext(to));
             })
             .catch(() => {
                 if (to.meta.checkLogin) {
                     MessageBox.confirm('用户未登录,是否立即登录', '提示', {
                         confirmButtonText: '立即登录'
                     }).then(() => {
-                        console.log(222);
                         eventBus.$emit('login');
                     });
                     next(false);
                 } else {
-                    next();
+                    next(backNext(to));
                 }
             });
     } else {
-        next();
+        next(backNext(to));
     }
 });
 
+
+
+function backNext(to) {
+    if (to.path === '/productDetail') {
+        to.path = '/collectionDetail';
+        return to;
+    } else if (to.path === '/creatorDetail') {
+        to.path = '/castingDetail';
+        return to;
+    } else {
+        return;
+    }
+}
 export default router;