Преглед на файлове

Merge branch 'master' of http://git.izouma.com/xiongzhu/9th

panhui преди 4 години
родител
ревизия
b762bf3be4

+ 38 - 3
src/main/nine-space/src/main.js

@@ -15,9 +15,44 @@ import Driver from './components/Driver.vue';
 import common from './mixins/common';
 import VueClipboard from 'vue-clipboard2';
 import queryString from 'query-string';
-import VConsole from 'vconsole';
-const vConsole = new VConsole();
-
+// import VConsole from 'vconsole';
+// const vConsole = new VConsole();
+store.commit('setFirstUrl', location.href);
+http.http
+    .get('/wx/jsapiSign', { url: location.href })
+    .then(res => {
+        wx.config({
+            debug: false,
+            appId: res.appId,
+            timestamp: res.timestamp,
+            nonceStr: res.nonceStr,
+            signature: res.signature,
+            jsApiList: [
+                'chooseWXPay',
+                'updateAppMessageShareData',
+                'updateTimelineShareData',
+                'hideAllNonBaseMenuItem',
+                'scanQRCode'
+            ]
+        });
+        wx.error(function (res) {
+            console.log(res);
+        });
+        wx.ready(function () {
+            wx.updateAppMessageShareData({
+                title: '第九空间',
+                desc: '全球首个基于区块链的游戏资产集换中心',
+                link: location.origin + '/9th',
+                imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
+            });
+            wx.updateTimelineShareData({
+                title: '第九空间-全球首个基于区块链的游戏资产集换中心',
+                link: location.origin + '/9th',
+                imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
+            });
+        });
+    })
+    .catch(e => {});
 createApp(App)
     .use(Vant)
     .use(http)

+ 38 - 35
src/main/nine-space/src/router/index.js

@@ -4,44 +4,47 @@ import { Page } from './Page';
 import { Dialog } from 'vant';
 import http from '../plugins/http';
 
-console.log(http);
 function jsapiSign() {
-    if (/micromessenger/i.test(navigator.userAgent)) {
-        http.http
-            .get('/wx/jsapiSign', { url: location.origin + location.pathname })
-            .then(res => {
-                res.debug = true;
-                res.jsApiList = [
-                    'chooseWXPay',
-                    'updateAppMessageShareData',
-                    'updateTimelineShareData',
-                    'hideAllNonBaseMenuItem',
-                    'scanQRCode'
-                ];
-                wx.config(res);
-                wx.ready(function () {
-                    wx.updateAppMessageShareData({
-                        title: '第九空间',
-                        desc: '全球首个基于区块链的游戏资产集换中心',
-                        link: location.origin + '/9th',
-                        imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg',
-                        success: function () {
-                            console.log('success');
-                        },
-                        fail: function (e) {
-                            console.log(e);
-                        }
+    setTimeout(() => {
+        if (/micromessenger/i.test(navigator.userAgent)) {
+            let isIOS = /iphone|ipad/i.test(navigator.userAgent);
+            http.http
+                .get('/wx/jsapiSign', { url: isIOS ? store.state.firstUrl : location.origin + location.href })
+                .then(res => {
+                    wx.config({
+                        debug: false,
+                        appId: res.appId,
+                        timestamp: res.timestamp,
+                        nonceStr: res.nonceStr,
+                        signature: res.signature,
+                        jsApiList: [
+                            'chooseWXPay',
+                            'updateAppMessageShareData',
+                            'updateTimelineShareData',
+                            'hideAllNonBaseMenuItem',
+                            'scanQRCode'
+                        ]
                     });
-                    wx.updateTimelineShareData({
-                        title: '第九空间-全球首个基于区块链的游戏资产集换中心',
-                        link: location.origin + '/9th',
-                        imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg',
-                        success: function () {}
+                    wx.error(function (res) {
+                        console.log(res);
                     });
-                });
-            })
-            .catch(e => {});
-    }
+                    wx.ready(function () {
+                        wx.updateAppMessageShareData({
+                            title: '第九空间',
+                            desc: '全球首个基于区块链的游戏资产集换中心',
+                            link: location.origin + '/9th',
+                            imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
+                        });
+                        wx.updateTimelineShareData({
+                            title: '第九空间-全球首个基于区块链的游戏资产集换中心',
+                            link: location.origin + '/9th',
+                            imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
+                        });
+                    });
+                })
+                .catch(e => {});
+        }
+    }, 200);
 }
 jsapiSign();
 const routes = [

+ 5 - 1
src/main/nine-space/src/store/index.js

@@ -4,7 +4,8 @@ import http from '../plugins/http';
 export default createStore({
     state: {
         finished: false,
-        userInfo: null
+        userInfo: null,
+        firstUrl: ''
     },
     mutations: {
         setFinished(state, finished) {
@@ -12,6 +13,9 @@ export default createStore({
         },
         setUserInfo(state, userInfo) {
             state.userInfo = userInfo;
+        },
+        setFirstUrl(state, url) {
+            state.firstUrl = url;
         }
     },
     actions: {

+ 79 - 74
src/main/pc-space/package-lock.json

@@ -1754,6 +1754,80 @@
         "webpack-chain": "^6.4.0",
         "webpack-dev-server": "^3.11.0",
         "webpack-merge": "^4.2.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
+          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.8.3",
+          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
+          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          }
+        }
       }
     },
     "@vue/cli-shared-utils": {
@@ -4140,6 +4214,11 @@
         "assert-plus": "^1.0.0"
       }
     },
+    "dayjs": {
+      "version": "1.10.7",
+      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.7.tgz",
+      "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig=="
+    },
     "de-indent": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
@@ -11231,80 +11310,6 @@
         }
       }
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.8.2",
-      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.2.tgz",
-      "integrity": "sha512-Nkq+z9mAsMEK+qkXgK+9Ia7D8w9uu9j4ut0IMT5coMfux3rCgIp1QBB1CYwY0M34A1nRMSONEaWXxAAw6xSl/Q==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.1.tgz",
-          "integrity": "sha512-g4miPa9uUrZz4iElkaVJgDFwKJGh8aQGM7pUL4ejXl6cu7kSb30seQOVGNMP6sW8j7DW77X68hJZ+GM7UGhXeQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
     "vue-router": {
       "version": "3.5.2",
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz",

+ 1 - 0
src/main/pc-space/package.json

@@ -9,6 +9,7 @@
     },
     "dependencies": {
         "axios": "^0.24.0",
+        "clipboard": "^2.0.8",
         "core-js": "^3.6.5",
         "dayjs": "^1.10.7",
         "element-ui": "^2.15.6",

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

@@ -126,7 +126,7 @@ export default {
         },
         init() {
             this.isShow = false;
-            this.Show = false;
+            this.Show = true;
             this.phoneLogin = false;
         },
         handleClose() {

+ 18 - 19
src/main/pc-space/src/components/PageHeader.vue

@@ -65,7 +65,7 @@ export default {
     },
     data() {
         return {
-            tabs: ['铸造者', '收藏探索', '数字盲盒', '我的NFT', '了解更多'],
+            // tabs: ['铸造者', '收藏探索', '数字盲盒', '我的NFT', '了解更多'],
             active: '',
             show: false,
             activeName: '',
@@ -112,18 +112,18 @@ export default {
     },
     methods: {
         ...mapMutations(['updateUserInfo']),
-        tab(item) {
-            this.active = item;
-            if (item === '铸造者') {
-                this.$router.push('/casting');
-            } else if (item === '收藏探索') {
-                this.$router.push('/collection');
-            } else if (item === '数字盲盒') {
-                this.$router.push('/collection?type=BLIND_BOX');
-            } else if (item === '我的NFT') {
-                this.$router.push('/my');
-            }
-        },
+        // tab(item) {
+        //     this.active = item;
+        //     if (item === '铸造者') {
+        //         this.$router.push('/casting');
+        //     } else if (item === '收藏探索') {
+        //         this.$router.push('/collection');
+        //     } else if (item === '数字盲盒') {
+        //         this.$router.push('/collection?type=BLIND_BOX');
+        //     } else if (item === '我的NFT') {
+        //         this.$router.push('/my');
+        //     }
+        // },
         batchRead() {},
         onCommand(command) {
             if (command === 'edit') {
@@ -203,7 +203,7 @@ export default {
         },
         parseQuery(query) {
             const res = {};
-
+            console.log(query);
             query = query.trim().replace(/^(\?|#|&)/, '');
 
             if (!query) {
@@ -242,10 +242,6 @@ export default {
 </script>
 <style lang="less" scoped>
 /deep/.btn-list {
-    .el-dropdown-menu__item {
-        font-weight: bold;
-        text-align: center;
-    }
     .el-tabs__nav-scroll {
         padding-left: 13px;
     }
@@ -255,7 +251,10 @@ export default {
         width: 300px;
     }
 }
-
+/deep/ .el-dropdown-menu__item {
+    font-weight: bold;
+    text-align: center;
+}
 /deep/.menus {
     padding: 15px 25px 0;
     .el-tabs__item {

+ 2 - 2
src/main/pc-space/src/components/RegisterInfo.vue

@@ -61,7 +61,7 @@
                 >
             </div>
             <div class="sub-btn" style="width: 300px" v-else>
-                <el-button type="primary" class="btn-block" @click="passwordFn2">确定</el-button>
+                <div class="btn1" @click="passwordFn2">立即登录</div>
                 <el-button style="background: #f2f3f5; color: #292c33" type="info" class="btn-block" @click="Login"
                     >想起密码,立即登录</el-button
                 >
@@ -111,7 +111,7 @@ export default {
             if (this.isShow2) {
                 return '注册';
             } else {
-                return '修改密码';
+                return '忘记密码';
             }
         }
     },

+ 4 - 4
src/main/pc-space/src/views/user/AccountData.vue

@@ -40,7 +40,7 @@
                     <div class="text2">昵称</div>
                     <div class="text3">{{ userInfo.username }}</div>
                 </div>
-                <div class="text4">修改</div>
+                <div class="text4" @click="Auths">修改</div>
             </div>
             <div class="box">
                 <div class="text">
@@ -50,7 +50,7 @@
                     <div class="text2">编码</div>
                     <div class="text3">{{ userInfo.id }}</div>
                 </div>
-                <div class="text4">修改</div>
+                <div class="text4">复制</div>
             </div>
             <!-- <div class="box">
                 <div class="text">
@@ -72,7 +72,7 @@
                     <div class="text2">邮箱</div>
                     <div class="text3">{{ userInfo.email || '暂无' }}</div>
                 </div>
-                <div class="text4">修改</div>
+                <div class="text4" @click="Auths">修改</div>
             </div>
             <div class="border"></div>
             <div class="name">账号安全</div>
@@ -116,7 +116,7 @@
                     <div class="text2">实名认证</div>
                     <div class="text3">{{ Status }}</div>
                 </div>
-                <div class="text4" @click="Auths">修改</div>
+                <div class="text4" @click="Auths">{{ Status }}</div>
             </div>
         </div>
     </div>

+ 20 - 25
src/main/pc-space/src/views/user/Give.vue

@@ -15,6 +15,7 @@
                     placeholder="请输入您想找到的作品名称…"
                     v-model="search"
                     clearable
+                    @change="onSearch"
                 >
                 </el-input>
             </div>
@@ -31,7 +32,7 @@
             <el-empty v-if="Empty" description="还没有该类型的藏品哦~"></el-empty>
         </div>
 
-        <div class="pagination-wrapper">
+        <!-- <div class="pagination-wrapper">
             <el-pagination
                 @size-change="onSizeChange"
                 @current-change="onCurrentChange"
@@ -42,12 +43,13 @@
                 :total="totalElements"
             >
             </el-pagination>
-        </div>
+        </div> -->
     </div>
 </template>
 <script>
 import CollectionInfo from '../../components/CollectionInfo.vue';
 import pageableTable from '../../mixins/pageableTable';
+import { mapState } from 'vuex';
 export default {
     components: { CollectionInfo },
     data() {
@@ -70,9 +72,11 @@ export default {
             search: '',
             type: '',
             empty: false
+            // url: '/collection/all'
         };
     },
     mixins: [pageableTable],
+    ...mapState(['userInfo']),
     computed: {
         showList() {
             return [...this.list]
@@ -80,6 +84,7 @@ export default {
                     return {
                         ...item,
                         index
+                        // search: this.search
                     };
                 })
                 .filter(item => {
@@ -93,6 +98,7 @@ export default {
     watch: {},
     mounted() {
         this.init();
+        // this.getData();
     },
     methods: {
         init() {
@@ -101,6 +107,17 @@ export default {
                 this.list = res;
             });
         }
+        // beforeGetData() {
+        //     return {
+        //         search: this.search,
+        //         query: {
+        //             userId: this.userInfo.id
+        //         }
+        //     };
+        // },
+        // setList(list) {
+        //     this.list = list;
+        // }
     }
 };
 </script>
@@ -284,29 +301,7 @@ export default {
 }
 
 .pagination-wrapper {
-    display: flex;
-    justify-content: center;
-    margin: 80px auto;
-
-    /deep/.el-pagination {
-        button:disabled {
-            background-color: transparent;
-            color: #939599;
-        }
-
-        .btn-next,
-        .btn-prev {
-            background: transparent;
-            color: #939599;
-        }
-        .el-pager li {
-            background-color: transparent;
-            color: #939599;
-            &.active {
-                color: @prim;
-            }
-        }
-    }
+    .pagination();
 }
 /deep/ .el-empty {
     margin: 0 auto;

+ 13 - 14
src/main/pc-space/src/views/user/MyLikes.vue

@@ -93,20 +93,19 @@ export default {
     computed: {
         ...mapState(['userInfo'])
     },
-    watch: {
-        type() {
-            this.$router
-                .replace({
-                    search: this.search,
-                    query: {
-                        userId: this.userInfo.id,
-                        type: this.type
-                    }
-                })
-                .catch(() => {});
-            this.getData();
-        }
-    },
+    // watch: {
+    //     type() {
+    //         this.$router
+    //             .replace({
+    //                 query: {
+    //                     userId: this.userInfo.id,
+    //                     type: this.type
+    //                 }
+    //             })
+    //             .catch(() => {});
+    //         this.getData();
+    //     }
+    // },
     mounted() {
         this.getData();
     },