panhui il y a 3 ans
Parent
commit
4ecf64ef7b
2 fichiers modifiés avec 6 ajouts et 30 suppressions
  1. 4 28
      src/views/StarMap.vue
  2. 2 2
      src/views/star/Create.vue

+ 4 - 28
src/views/StarMap.vue

@@ -36,7 +36,9 @@
             </div>
 
             <div class="create">
-                <van-button color="#00B897" round @click="createStar" block> 点击立即铸造链上星图 </van-button>
+                <van-button color="#00B897" round @click="$router.push('/starCreate')" block>
+                    点击立即铸造链上星图
+                </van-button>
             </div>
 
             <img class="content-bg" src="@assets/png-huise-bg@3x.png" alt="" />
@@ -53,14 +55,6 @@
         </van-list>
 
         <img src="../assets/png-zhiding.png" @click="goTop" class="goTop" v-if="bodyScroll > 200" alt="" />
-
-        <van-action-sheet
-            v-model:show="showAction"
-            :actions="actions"
-            cancel-text="取消"
-            close-on-click-action
-            @select="onSelect"
-        />
     </van-pull-refresh>
 </template>
 
@@ -102,24 +96,6 @@ const onRefresh = () => {
 
 //藏品组件
 import ProductInfo from '../components/product/productInfo.vue';
-
-function createStar() {
-    showAction.value = true;
-    //
-}
-
-const showAction = ref(false);
-const actions = ref([{ name: '消耗藏品铸造 ' }, { name: '支付铸造' }]);
-import { useRouter } from 'vue-router';
-const router = useRouter();
-function onSelect(info) {
-    router.push({
-        path: '/starCreate',
-        query: {
-            type: info.name === '消耗藏品铸造 ' ? 'destory' : 'money'
-        }
-    });
-}
 </script>
 
 <script>
@@ -289,4 +265,4 @@ export default {
     top: calc(var(--safe-top) + 16px);
     z-index: 20;
 }
-</style>
+</style>

+ 2 - 2
src/views/star/Create.vue

@@ -406,10 +406,10 @@ export default {
             };
 
             //销毁藏品
-            if (this.pageType === 'destory') {
+            if (this.pageType !== 'money') {
                 form.destroyAssetId = this.chooseId;
                 form.destroyed = true;
-                form.price = 0;
+                form.price = this.price || 0;
             } else {
                 //支付金额
                 form.destroyed = false;