Selaa lähdekoodia

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

yuanyuan 3 vuotta sitten
vanhempi
commit
239b582a65

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://www.raex.vip/
+VUE_APP_BASE_URL=https://test.raex.vip/
 NODE_ENV=development
 VUE_APP_PUBLIC_PATH=/
 ASSETS_PATH=raex

+ 2 - 2
src/components/auction/asset.vue

@@ -353,13 +353,13 @@ export default {
                     }
                     if (this.inWeixin) {
                         wx.updateAppMessageShareData({
-                            title: '第九空间-' + res.name,
+                            title: 'RAEX绿洲-' + res.name,
                             desc: '全球首个基于区块链的游戏资产集换中心',
                             link: location.origin + '/9th/productDetail/' + res.id,
                             imgUrl: this.getImg(this.changeImgs(this.banners), '', 300)
                         });
                         wx.updateTimelineShareData({
-                            title: '第九空间-' + res.name,
+                            title: 'RAEX绿洲-' + res.name,
                             link: location.origin + '/9th/productDetail/' + res.id,
                             imgUrl: this.getImg(this.changeImgs(this.banners), '', 300)
                         });

+ 8 - 7
src/router/index.js

@@ -6,16 +6,17 @@ import http from '../plugins/http';
 
 jsapiSign();
 function jsapiSign() {
-    return;
+    // return;
     // eslint-disable-next-line no-unreachable
     setTimeout(() => {
+        console.log(/micromessenger/i.test(navigator.userAgent))
         if (/micromessenger/i.test(navigator.userAgent)) {
             if (/localhost|(192\.168)/i.test(location.host)) {
                 return;
             }
             let isIOS = /iphone|ipad/i.test(navigator.userAgent);
             http.http
-                .get('/wx/jsapiSign', { url: isIOS ? store.state.firstUrl : location.origin + location.href })
+                .get('/wx/jsapiSign', { url: isIOS ? store.state.firstUrl : location.origin + location.pathname })
                 .then(res => {
                     wx.config({
                         debug: false,
@@ -37,14 +38,15 @@ function jsapiSign() {
                     });
                     wx.ready(function () {
                         wx.updateAppMessageShareData({
-                            desc: '全球首个基于区块链的游戏资产集换中心',
+                            title: 'RAEX绿洲元宇宙:全球首个基于区块链的元宇宙物资集换平台',
+                            desc: '共同开启元宇宙探索之旅!',
                             link: location.origin + '/9th',
-                            imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
+                            imgUrl: 'https://cdn.raex.vip/nft/2023-02-03-15-26-31pSjRXlXn.png'
                         });
                         wx.updateTimelineShareData({
-                            title: '绿洲宇宙-全球首个基于区块链的游戏资产集换中心',
+                            title: 'RAEX绿洲元宇宙:全球首个基于区块链的元宇宙物资集换平台',
                             link: location.origin + '/9th',
-                            imgUrl: 'https://9space-2021.oss-cn-shenzhen.aliyuncs.com/nft/2021-11-05-15-58-30YwqLzMjy.jpg'
+                            imgUrl: 'https://cdn.raex.vip/nft/2023-02-03-15-26-31pSjRXlXn.png'
                         });
                     });
                 })
@@ -52,7 +54,6 @@ function jsapiSign() {
         }
     }, 200);
 }
-jsapiSign();
 const routes = [
     {
         path: '/',

+ 1 - 1
src/views/StarMap.vue

@@ -265,4 +265,4 @@ export default {
     top: calc(var(--safe-top) + 16px);
     z-index: 20;
 }
-</style>
+</style>

+ 2 - 2
src/views/asset/Detail.vue

@@ -894,13 +894,13 @@ export default {
                     });
                 }
                 wx.updateAppMessageShareData({
-                    title: '绿洲宇宙-' + res.name,
+                    title: 'RAEX绿洲-' + res.name,
                     desc: '全球首个基于区块链的游戏资产集换中心',
                     link: location.origin + '/9th/assetDetail?id=' + res.id,
                     imgUrl: this.getImg(this.changeImgs(this.banners), '', 600)
                 });
                 wx.updateTimelineShareData({
-                    title: '绿洲宇宙-' + res.name,
+                    title: 'RAEX绿洲-' + res.name,
                     link: location.origin + '/9th/assetDetail?id=' + res.id,
                     imgUrl: this.getImg(this.changeImgs(this.banners), '', 600)
                 });

+ 2 - 2
src/views/product/Detail.vue

@@ -705,13 +705,13 @@ export default {
                     }
                     if (this.inWeixin) {
                         wx.updateAppMessageShareData({
-                            title: '绿洲宇宙-' + res.name,
+                            title: 'RAEX绿洲-' + res.name,
                             desc: '全球首个基于区块链的游戏资产集换中心',
                             link: location.origin + '/9th/productDetail/' + res.id,
                             imgUrl: this.getImg(this.changeImgs(this.banners), '', 300)
                         });
                         wx.updateTimelineShareData({
-                            title: '绿洲宇宙-' + res.name,
+                            title: 'RAEX绿洲-' + res.name,
                             link: location.origin + '/9th/productDetail/' + res.id,
                             imgUrl: this.getImg(this.changeImgs(this.banners), '', 300)
                         });

+ 75 - 22
src/views/star/Create.vue

@@ -2,12 +2,14 @@
     <div class="container">
         <van-sticky :offset-top="barHeight">
             <div class="steps">
-                <div class="step" :class="{ active: step >= index }" v-for="(item, index) in steps" :key="index">
-                    <div class="box">
-                        <div>{{ index + 1 }}</div>
+                <template v-for="(item, index) in steps" :key="index">
+                    <div class="step" :class="{ active: step >= item.step }">
+                        <div class="box">
+                            <div>{{ index + 1 }}</div>
+                        </div>
+                        <div class="step-text">{{ item.name }}</div>
                     </div>
-                    <div class="step-text">{{ item }}</div>
-                </div>
+                </template>
             </div>
         </van-sticky>
 
@@ -129,8 +131,10 @@
             </div>
             <!-- //未下单 -->
             <div class="btn btns" v-if="!orderId">
-                <van-button type="primary" @click="step = 0" plain round> 上一步</van-button>
-                <van-button round type="primary" native-type="submit">提交铸造</van-button>
+                <van-button type="primary" v-if="pageType !== 'money'" @click="step = 0" plain round>
+                    上一步</van-button
+                >
+                <van-button class="btn1" round type="primary" native-type="submit">提交铸造</van-button>
             </div>
             <div class="btn btns" v-else>
                 <van-button type="primary" @click="$router.go(-1)" plain round> 返回</van-button>
@@ -158,7 +162,7 @@ import 'vue3-lottie/dist/style.css';
 import star2JSON from '../../assets/lottie/star2.json';
 import pictureCropper from '../../components/PictureCropper.vue';
 import { getCurrentInstance, onMounted, reactive, ref, watch } from 'vue-demi';
-import { useRouter } from 'vue-router';
+import { useRouter, useRoute } from 'vue-router';
 import starPay from '../../components/star/pay.vue';
 import { usePageVisibility } from '@vant/use';
 
@@ -173,6 +177,51 @@ export default {
         return { empty: false, list: [], refreshing: false, url: '/asset/all', photoAssetId: 0, info: {}, star2JSON };
     },
     setup() {
+        //步骤
+        const step = ref(0);
+        //步骤名称
+        const steps = ref([
+            {
+                name: '销毁藏品',
+                step: 0
+            },
+            {
+                name: '上传星图',
+                step: 1
+            },
+            {
+                name: '星图铸造',
+                step: 2
+            },
+            {
+                name: '提交审核',
+                step: 3
+            }
+        ]);
+        //页面铸造方式(销毁藏品/支付)
+        const pageType = ref('destory');
+        const route = useRoute();
+        if (route.query.type) {
+            pageType.value = route.query.type;
+        }
+        if (pageType.value === 'money') {
+            steps.value = [
+                {
+                    name: '上传星图',
+                    step: 1
+                },
+                {
+                    name: '星图铸造',
+                    step: 2
+                },
+                {
+                    name: '提交审核',
+                    step: 3
+                }
+            ];
+            step.value = 1;
+        }
+
         //剪切图片
         const form = reactive({
             pic: [],
@@ -197,11 +246,6 @@ export default {
             file.type = file.file.type;
         };
 
-        //步骤
-        const step = ref(0);
-        //步骤名称
-        const steps = ref(['销毁藏品', '上传星图', '星图铸造', '提交审核']);
-
         //选择消除藏品
         const chooseId = ref(0);
         const router = useRouter();
@@ -302,6 +346,7 @@ export default {
         });
 
         return {
+            pageType,
             form,
             updateImg,
             cropperRef,
@@ -356,23 +401,26 @@ export default {
             let form = {
                 ...this.form,
                 userId: this.$store.state.userInfo.id,
-                destroyAssetId: this.chooseId,
                 status: 'PENDING',
                 ownerId: this.$store.state.userInfo.id
             };
+
+            //销毁藏品
+            if (this.pageType !== 'money') {
+                form.destroyAssetId = this.chooseId;
+                form.destroyed = true;
+                form.price = this.price || 0;
+            } else {
+                //支付金额
+                form.destroyed = false;
+                form.price = this.price || 0;
+            }
             form.pic = {
                 name: form.pic[0].name,
                 url: form.pic[0].url,
                 type: form.pic[0].type,
                 thumb: null
             };
-            if (this.price) {
-                form.destroyed = true;
-                form.price = this.price;
-            } else {
-                form.destroyed = true;
-                form.price = 0;
-            }
             this.$toast.loading({
                 message: '加载中...',
                 forbidClick: true
@@ -381,7 +429,7 @@ export default {
                 .post('/photoAsset/save', form, { body: 'json' })
                 .then(res => {
                     this.$toast.clear();
-                    if (this.price) {
+                    if (res.price) {
                         this.orderStatus = res.orderStatus;
                         this.orderId = res.id;
                         this.payEvent();
@@ -417,6 +465,7 @@ export default {
     background: #fcdfa2;
     height: 72px;
     .flex();
+    justify-content: center;
     .step {
         width: 25vw;
         .flex-col();
@@ -580,6 +629,10 @@ export default {
             flex-grow: 1;
             margin-left: 16px;
         }
+
+        &.btn1 {
+            flex-grow: 1;
+        }
     }
 }
 .van-form {