|
@@ -13,54 +13,61 @@
|
|
|
{{ info.name }}
|
|
{{ info.name }}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="time">活动时间:04-01 16:00 - 04-01 18:00</div>
|
|
|
|
|
|
|
+ <div class="time" v-if="info.endTime && info.startTime">
|
|
|
|
|
+ 活动时间:{{ formatTime(info.startTime) }} ~ {{ formatTime(info.endTime) }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="time" v-else-if="info.endTime">活动结束时间: {{ info.endTime }}</div>
|
|
|
|
|
+ <div class="time" v-else-if="info.startTime">活动开始时间:{{ info.startTime }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="card">
|
|
<div class="card">
|
|
|
<div class="card-title">活动说明</div>
|
|
<div class="card-title">活动说明</div>
|
|
|
<div class="card-detail" v-html="info.detail"></div>
|
|
<div class="card-detail" v-html="info.detail"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="activity_need">
|
|
|
|
|
- <div class="activity_need_top">
|
|
|
|
|
- <div class="activity_need_top_left">合成所需藏品</div>
|
|
|
|
|
- <div class="activity_need_top_right" @click="showBottom = true">选择持有藏品</div>
|
|
|
|
|
|
|
+ <template v-if="showList.length > 0">
|
|
|
|
|
+ <div class="activity_need">
|
|
|
|
|
+ <div class="activity_need_top">
|
|
|
|
|
+ <div class="activity_need_top_left">合成所需藏品</div>
|
|
|
|
|
+ <div class="activity_need_top_right" @click="chooseEvent">选择持有藏品</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="activity_need_list">
|
|
|
|
|
+ <div class="activity_need_list_con" v-for="(item, index) in showList" :key="index">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ width="96"
|
|
|
|
|
+ height="96"
|
|
|
|
|
+ :src="getImg(changeImgs(item.collection?.pic))"
|
|
|
|
|
+ radius="8"
|
|
|
|
|
+ fit="cover"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="num">{{ item.chooseIds.length }}/{{ item.num }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="activity_need_list">
|
|
|
|
|
- <div class="activity_need_list_con" v-for="(item, index) in needList" :key="index">
|
|
|
|
|
|
|
+ <div class="activity_synthesis" v-if="airDropCollection.length > 0">
|
|
|
|
|
+ <div class="activity_synthesis_title">合成品</div>
|
|
|
|
|
+ <div class="activity_synthesis_details" v-for="(item, index) in airDropCollection" :key="index">
|
|
|
<van-image
|
|
<van-image
|
|
|
- width="calc(26vw - 1.5px)"
|
|
|
|
|
- height="calc(26vw - 1.5px)"
|
|
|
|
|
- :src="getImg(info.cover)"
|
|
|
|
|
|
|
+ width="96"
|
|
|
|
|
+ height="96"
|
|
|
|
|
+ :src="getImg(changeImgs(item.collection.pic))"
|
|
|
radius="8"
|
|
radius="8"
|
|
|
fit="cover"
|
|
fit="cover"
|
|
|
/>
|
|
/>
|
|
|
- <div></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="activity_synthesis">
|
|
|
|
|
- <div class="activity_synthesis_title">合成品</div>
|
|
|
|
|
- <div class="activity_synthesis_details">
|
|
|
|
|
- <van-image
|
|
|
|
|
- width="calc(26vw - 1.5px)"
|
|
|
|
|
- height="calc(26vw - 1.5px)"
|
|
|
|
|
- :src="getImg(info.cover)"
|
|
|
|
|
- radius="8"
|
|
|
|
|
- fit="cover"
|
|
|
|
|
- />
|
|
|
|
|
- <div class="activity_synthesis_details_con">
|
|
|
|
|
- <div class="activity_synthesis_details_con_one">野稻凭证 D1-0 凭证 *1</div>
|
|
|
|
|
- <div class="activity_synthesis_details_con_two">收藏品</div>
|
|
|
|
|
|
|
+ <div class="activity_synthesis_details_con">
|
|
|
|
|
+ <div class="activity_synthesis_details_con_one">{{ item.collection.name }}</div>
|
|
|
|
|
+ <div class="activity_synthesis_details_con_two">收藏品</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="activity_synthesis_details_num">x{{ item.num }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </template>
|
|
|
<!-- <div class="detail" v-html="info.detail"></div> -->
|
|
<!-- <div class="detail" v-html="info.detail"></div> -->
|
|
|
<template v-if="info.onShelf">
|
|
<template v-if="info.onShelf">
|
|
|
- <van-notice-bar
|
|
|
|
|
|
|
+ <!-- <van-notice-bar
|
|
|
color="#FF4F50"
|
|
color="#FF4F50"
|
|
|
background="#271515"
|
|
background="#271515"
|
|
|
text="商品为定制化产品,定制周期较长,且不允许退货"
|
|
text="商品为定制化产品,定制周期较长,且不允许退货"
|
|
|
z-index="99"
|
|
z-index="99"
|
|
|
- />
|
|
|
|
|
|
|
+ /> -->
|
|
|
<div class="action-btn">
|
|
<div class="action-btn">
|
|
|
<!-- <div class="info">
|
|
<!-- <div class="info">
|
|
|
<div class="text1">限量</div>
|
|
<div class="text1">限量</div>
|
|
@@ -72,10 +79,50 @@
|
|
|
|
|
|
|
|
<div class="flex1"></div>
|
|
<div class="flex1"></div>
|
|
|
<van-button :disabled="startTime" type="primary" round v-if="startTime">{{ startTime }}</van-button>
|
|
<van-button :disabled="startTime" type="primary" round v-if="startTime">{{ startTime }}</van-button>
|
|
|
|
|
+
|
|
|
|
|
+ <van-button
|
|
|
|
|
+ v-else-if="isSolded"
|
|
|
|
|
+ :disabled="isSolded"
|
|
|
|
|
+ :class="{ not: !holdingFlag || isSolded }"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ round
|
|
|
|
|
+ >
|
|
|
|
|
+ 已售罄
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ <van-button
|
|
|
|
|
+ v-else-if="!holdingFlag"
|
|
|
|
|
+ :disabled="!holdingFlag"
|
|
|
|
|
+ :class="{ not: !holdingFlag || isSolded }"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ round
|
|
|
|
|
+ >
|
|
|
|
|
+ 持有指定藏品才能铸造
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ <template v-else-if="showList.length > 0">
|
|
|
|
|
+ <van-button type="primary" class="not" round v-if="denied">
|
|
|
|
|
+ <div class="btn-text">材料不足</div>
|
|
|
|
|
+ <div class="btn-sub" v-if="showStok && !isSolded">
|
|
|
|
|
+ <div>剩余 {{ info.stock }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ <van-button type="primary" round v-else-if="!canNext" @click="chooseEvent">
|
|
|
|
|
+ <div class="btn-text">选择持有藏品</div>
|
|
|
|
|
+ <div class="btn-sub" v-if="showStok && !isSolded">
|
|
|
|
|
+ <div>剩余 {{ info.stock }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ <van-button type="primary" round v-else @click="goSubmit">
|
|
|
|
|
+ <div class="btn-text">立即合成</div>
|
|
|
|
|
+ <div class="btn-sub" v-if="showStok && !isSolded">
|
|
|
|
|
+ <div>剩余 {{ info.stock }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<van-button
|
|
<van-button
|
|
|
v-else
|
|
v-else
|
|
|
:disabled="isSolded"
|
|
:disabled="isSolded"
|
|
|
- :class="{ not: !holdingFlag }"
|
|
|
|
|
|
|
+ :class="{ not: !holdingFlag || isSolded }"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
round
|
|
round
|
|
|
@click="goBuild"
|
|
@click="goBuild"
|
|
@@ -104,49 +151,128 @@
|
|
|
@click="showBottom = false"
|
|
@click="showBottom = false"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="activity_collection_selection_list" v-for="(item, index) in needList" :key="index">
|
|
|
|
|
|
|
+ <div class="activity_collection_selection_list" v-for="(item, index) in showList" :key="index">
|
|
|
<div class="activity_collection_selection_list_con">
|
|
<div class="activity_collection_selection_list_con">
|
|
|
- <div class="activity_collection_selection_list_con_left">
|
|
|
|
|
- <van-image
|
|
|
|
|
- width="calc(21vw + 1.25px)"
|
|
|
|
|
- height="calc(21vw + 1.25px)"
|
|
|
|
|
- :src="getImg(info.cover)"
|
|
|
|
|
- radius="8"
|
|
|
|
|
- fit="cover"
|
|
|
|
|
- />
|
|
|
|
|
- <div class="activity_collection_selection_list_con_left_content">
|
|
|
|
|
- <div class="activity_collection_selection_list_con_left_content_one">种子</div>
|
|
|
|
|
- <div class="activity_collection_selection_list_con_left_content_two">编号:122,123</div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="activity_collection_selection_list_con_left_content_threes"
|
|
|
|
|
- v-if="selectDisplay"
|
|
|
|
|
- @click="selectDisplay = false"
|
|
|
|
|
- >
|
|
|
|
|
- <div>选择其他编号</div>
|
|
|
|
|
- <img
|
|
|
|
|
- :src="require('../../assets/icon_intershouqi@3x.png')"
|
|
|
|
|
- alt=""
|
|
|
|
|
- class="activity_collection_selection_list_con_left_content_threes_img"
|
|
|
|
|
|
|
+ <div class="activity_collection_selection_list_con_top">
|
|
|
|
|
+ <div class="activity_collection_selection_list_con_left">
|
|
|
|
|
+ <div class="activity-collection">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ width="80"
|
|
|
|
|
+ height="80"
|
|
|
|
|
+ :src="getImg(changeImgs(item.collection?.pic))"
|
|
|
|
|
+ radius="8"
|
|
|
|
|
+ fit="cover"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <div class="num">{{ item.chooseIds.length }}/{{ item.num }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="activity_collection_selection_list_con_left_content">
|
|
|
|
|
+ <div class="activity_collection_selection_list_con_left_content_one">
|
|
|
|
|
+ {{ item.tag.name }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-html="getName(item.ownCollections, item.chooseIds)"
|
|
|
|
|
+ class="activity_collection_selection_list_con_left_content_two"
|
|
|
|
|
+ ></div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="activity_collection_selection_list_con_left_content_threes"
|
|
|
|
|
+ @click="changeShowMore(index)"
|
|
|
|
|
+ v-if="item.ownCollections.length > 0"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div>选择其他藏品</div>
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="
|
|
|
|
|
+ selectDisplay
|
|
|
|
|
+ ? require('../../assets/icon_intershouqi@3x.png')
|
|
|
|
|
+ : require('../../assets/icon_interzhankai@3x.png')
|
|
|
|
|
+ "
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="activity_collection_selection_list_con_left_content_threes_img"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="activity_collection_selection_list_con_right" v-if="item.chooseIds.length === item.num">
|
|
|
|
|
+ 已集齐
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="activity_collection_selection_list_con_rightbuy"
|
|
|
|
|
+ v-if="item.ownCollections.length < item.num"
|
|
|
|
|
+ @click="goBuy(item.tag.name)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 去购买
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="activity_collection_selection_subclass" v-if="item.showMoreCollection">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="require('../../assets/png-jiantou@3x.png')"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="activity_collection_selection_subclass_img"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="activity_collection_selection_subclass_list">
|
|
|
<div
|
|
<div
|
|
|
- class="activity_collection_selection_list_con_left_content_three"
|
|
|
|
|
- v-else
|
|
|
|
|
- @click="selectDisplay = true"
|
|
|
|
|
|
|
+ class="activity_collection_selection_subclass_list_con"
|
|
|
|
|
+ v-for="(pro, proIndex) in item.ownCollections"
|
|
|
|
|
+ :key="proIndex"
|
|
|
|
|
+ @click="chooseCollection(index, pro.id)"
|
|
|
>
|
|
>
|
|
|
- <div>选择其他编号</div>
|
|
|
|
|
|
|
+ <div class="activity_collection_selection_subclass_list_con_left">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ width="60"
|
|
|
|
|
+ height="60"
|
|
|
|
|
+ radius="8"
|
|
|
|
|
+ :src="getImg(changeImgs(pro.pic, 600))"
|
|
|
|
|
+ fit="contain"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="activity_collection_selection_subclass_list_con_left_content">
|
|
|
|
|
+ <div class="activity_collection_selection_subclass_list_con_left_content_title">
|
|
|
|
|
+ {{ pro.name }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="pro.number"
|
|
|
|
|
+ class="activity_collection_selection_subclass_list_con_left_content_number"
|
|
|
|
|
+ >
|
|
|
|
|
+ 编号{{ pro.number }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<img
|
|
<img
|
|
|
- :src="require('../../assets/icon_interzhankai@3x.png')"
|
|
|
|
|
|
|
+ class="activity_collection_selection_subclass_list_con_right_img"
|
|
|
|
|
+ :src="icons[isChoose(pro.id, item.chooseIds) ? 0 : isElseChoose(pro.id, index) ? 2 : 1]"
|
|
|
alt=""
|
|
alt=""
|
|
|
- class="activity_collection_selection_list_con_left_content_three_img"
|
|
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <div class="activity_collection_selection_list_con_right">已集齐</div> -->
|
|
|
|
|
- <div class="activity_collection_selection_list_con_rightbuy" @click="goHome">去购买</div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- div
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <div class="synthetic_quantity">
|
|
|
|
|
+ <div class="synthetic_quantity_title">合成数量</div>
|
|
|
|
|
+ <div class="synthetic_quantity_con">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="require('../../assets/icon-bukejianshaoone@3x.png')"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="synthetic_quantity_con_img"
|
|
|
|
|
+ v-if="castingQuantity == 1"
|
|
|
|
|
+ />
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="require('../../assets/icon-jiaone@3x.png')"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="synthetic_quantity_con_img"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ @click="odd"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="synthetic_quantity_con_number">{{ castingQuantity }}</div>
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="require('../../assets/icon-jiatwo@3x.png')"
|
|
|
|
|
+ alt=""
|
|
|
|
|
+ class="synthetic_quantity_con_img"
|
|
|
|
|
+ @click="add"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <div class="confirm_synthesis" @click="confirmSynthesis">
|
|
|
|
|
+ <div class="confirm_synthesis_con">确认</div>
|
|
|
</div>
|
|
</div>
|
|
|
</van-popup>
|
|
</van-popup>
|
|
|
<!-- <div class="activity_bg" v-if="showBottom"></div> -->
|
|
<!-- <div class="activity_bg" v-if="showBottom"></div> -->
|
|
@@ -154,7 +280,9 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { abs } from 'mathjs';
|
|
import { abs } from 'mathjs';
|
|
|
|
|
+import product from '../../mixins/product';
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ mixins: [product],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
info: {},
|
|
info: {},
|
|
@@ -165,15 +293,97 @@ export default {
|
|
|
selectDisplay: false,
|
|
selectDisplay: false,
|
|
|
showCollections: [],
|
|
showCollections: [],
|
|
|
needList: [],
|
|
needList: [],
|
|
|
- activityId: 0
|
|
|
|
|
|
|
+ activityId: 0,
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ castingQuantity: 1,
|
|
|
|
|
+ allTags: [],
|
|
|
|
|
+ showList: [],
|
|
|
|
|
+ icons: [
|
|
|
|
|
+ require('@assets/icon_gouxuan_pre.png'),
|
|
|
|
|
+ require('@assets/icon_gouxuan_huise.png'),
|
|
|
|
|
+ require('@assets/icon_bukexuan.png')
|
|
|
|
|
+ ]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ showTagsMap() {
|
|
|
|
|
+ let list = [];
|
|
|
|
|
+ let _map = this.showTagsMap;
|
|
|
|
|
+ _map.values().forEach(item => {
|
|
|
|
|
+ list.push({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ collection: item.collections ? item.collections[0] : {},
|
|
|
|
|
+ chooseNum: 0,
|
|
|
|
|
+ chooseIds: [],
|
|
|
|
|
+ showMoreCollection: false,
|
|
|
|
|
+ ownCollections: [...item.ownCollections]
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ this.showList = list;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
computed: {
|
|
computed: {
|
|
|
isSolded() {
|
|
isSolded() {
|
|
|
return !this.info.stock || this.info.stock < 0;
|
|
return !this.info.stock || this.info.stock < 0;
|
|
|
},
|
|
},
|
|
|
showStok() {
|
|
showStok() {
|
|
|
return [...this.showCollections].includes(this.activityId);
|
|
return [...this.showCollections].includes(this.activityId);
|
|
|
|
|
+ },
|
|
|
|
|
+ showTagsMap() {
|
|
|
|
|
+ let allTags = [...this.allTags];
|
|
|
|
|
+ let _map = new Map();
|
|
|
|
|
+ allTags.forEach(item => {
|
|
|
|
|
+ let _info = {
|
|
|
|
|
+ num: 0
|
|
|
|
|
+ };
|
|
|
|
|
+ if (_map.has(item.detail.tag.name)) {
|
|
|
|
|
+ _info = _map.get(item.detail.tag.name);
|
|
|
|
|
+ }
|
|
|
|
|
+ _map.set(item.detail.tag.name, {
|
|
|
|
|
+ ..._info,
|
|
|
|
|
+ ...item.detail,
|
|
|
|
|
+ num: _info.num + item.detail.num,
|
|
|
|
|
+ ownCollections: []
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ let _list = [...this.list];
|
|
|
|
|
+ _list.forEach(item => {
|
|
|
|
|
+ _map.keys().forEach(key => {
|
|
|
|
|
+ let tagId = _map.get(key).tag.id;
|
|
|
|
|
+ let tags = item.tags.map(item => {
|
|
|
|
|
+ return item.id;
|
|
|
|
|
+ });
|
|
|
|
|
+ if (tags.includes(tagId)) {
|
|
|
|
|
+ let ownCollections = _map.get(key).ownCollections;
|
|
|
|
|
+ _map.get(key, {
|
|
|
|
|
+ ..._map.get(key),
|
|
|
|
|
+ ownCollections: ownCollections.push(item)
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return _map;
|
|
|
|
|
+ },
|
|
|
|
|
+ airDropCollection() {
|
|
|
|
|
+ return this.info ? this.info.airDropCollection || [] : [];
|
|
|
|
|
+ },
|
|
|
|
|
+ canNext() {
|
|
|
|
|
+ let showList = [...this.showList];
|
|
|
|
|
+ let info = showList.find(item => {
|
|
|
|
|
+ return item.chooseIds.length !== item.num;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return !info;
|
|
|
|
|
+ },
|
|
|
|
|
+ denied() {
|
|
|
|
|
+ let showList = [...this.showList];
|
|
|
|
|
+ let info = showList.find(item => {
|
|
|
|
|
+ return item.ownCollections.length < item.num;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return !!info;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -184,8 +394,154 @@ export default {
|
|
|
this.showCollections = res.value.split(',');
|
|
this.showCollections = res.value.split(',');
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ this.getList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ formatTime(str) {
|
|
|
|
|
+ return this.dayjs(str).format('MM-DD HH:mm');
|
|
|
|
|
+ },
|
|
|
|
|
+ chooseEvent() {
|
|
|
|
|
+ this.checkLogin().then(res => {
|
|
|
|
|
+ this.showBottom = true;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ goSubmit() {
|
|
|
|
|
+ this.checkTips().then(() => {
|
|
|
|
|
+ let chooseIds = [];
|
|
|
|
|
+ let nums = [];
|
|
|
|
|
+ [...this.showList].forEach(item => {
|
|
|
|
|
+ chooseIds.push(item.chooseIds);
|
|
|
|
|
+ nums.push(item.chooseIds[0] + '_' + item.chooseIds.length);
|
|
|
|
|
+ });
|
|
|
|
|
+ let query = {
|
|
|
|
|
+ assets: chooseIds.flat().join(','),
|
|
|
|
|
+ activityId: this.activityId,
|
|
|
|
|
+ numList: nums.join(',')
|
|
|
|
|
+ };
|
|
|
|
|
+ if (this.$route.query.test) {
|
|
|
|
|
+ query.test = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/activitySubmit',
|
|
|
|
|
+ query
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ checkTips() {
|
|
|
|
|
+ if (this.info.consume) {
|
|
|
|
|
+ return this.$dialog.confirm({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ message: `兑换后选择的藏品将被销毁,确认将选择的藏品进行兑换吗?`,
|
|
|
|
|
+ allowHtml: true
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return Promise.resolve();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ goBuy(search) {
|
|
|
|
|
+ let matching = /(?:\d\d)\/(\d\d)/;
|
|
|
|
|
+ if (matching.test(search)) {
|
|
|
|
|
+ let newSearch = search.split(':')[1].trim();
|
|
|
|
|
+ this.$router.push('/productSearch?search=' + newSearch);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$router.push('/productSearch?search=' + search);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ changeShowMore(index) {
|
|
|
|
|
+ let showList = [...this.showList];
|
|
|
|
|
+ showList.forEach((item, colIndex) => {
|
|
|
|
|
+ if (colIndex === index) {
|
|
|
|
|
+ item.showMoreCollection = !item.showMoreCollection;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ item.showMoreCollection = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.showList = showList;
|
|
|
|
|
+ },
|
|
|
|
|
+ getName(list, chooseIds) {
|
|
|
|
|
+ let str = '';
|
|
|
|
|
+ chooseIds.forEach((item, index) => {
|
|
|
|
|
+ let _info = list.find(_collection => {
|
|
|
|
|
+ return item == _collection.id;
|
|
|
|
|
+ });
|
|
|
|
|
+ if (index == 0) {
|
|
|
|
|
+ str += _info.number ? '编号:' : '藏品:';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ str += ',';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (_info.number) {
|
|
|
|
|
+ str += _info.number;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ str += _info.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return str;
|
|
|
|
|
+ },
|
|
|
|
|
+ chooseCollection(index, id) {
|
|
|
|
|
+ let showList = [...this.showList];
|
|
|
|
|
+ let _info = showList[index];
|
|
|
|
|
+ if (this.isChoose(id, _info.chooseIds)) {
|
|
|
|
|
+ let _infoIndex = _info.chooseIds.findIndex(item => {
|
|
|
|
|
+ return id === item;
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(_infoIndex);
|
|
|
|
|
+ showList[index].chooseIds.splice(_infoIndex, 1);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (showList[index].chooseIds.length === showList[index].num) {
|
|
|
|
|
+ this.$toast(`只能选择${showList[index].num}个藏品`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.isElseChoose(id, index)) {
|
|
|
|
|
+ this.$toast(`其他标签下已经选择该藏品`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ showList[index].chooseIds.push(id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.showList = showList;
|
|
|
|
|
+ },
|
|
|
|
|
+ isChoose(id, list) {
|
|
|
|
|
+ return list.includes(id);
|
|
|
|
|
+ },
|
|
|
|
|
+ isElseChoose(id, index) {
|
|
|
|
|
+ const showList = [...this.showList];
|
|
|
|
|
+ let chooseIds = [];
|
|
|
|
|
+ showList.forEach(item => {
|
|
|
|
|
+ chooseIds.push(item.chooseIds);
|
|
|
|
|
+ });
|
|
|
|
|
+ chooseIds = chooseIds.flat();
|
|
|
|
|
+ console.log(chooseIds.includes(id));
|
|
|
|
|
+ console.log(!this.isChoose(id, showList[index].chooseIds));
|
|
|
|
|
+ return chooseIds.includes(id) && !this.isChoose(id, showList[index].chooseIds);
|
|
|
|
|
+ },
|
|
|
|
|
+ getList(refresh, done) {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .get('/asset/assetsForMint', {
|
|
|
|
|
+ page: 0,
|
|
|
|
|
+ size: 9999,
|
|
|
|
|
+ mintActivityId: this.activityId,
|
|
|
|
|
+ refresh
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.list = res.content;
|
|
|
|
|
+ this.empty = res.empty;
|
|
|
|
|
+ done && done();
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$toast.clear();
|
|
|
|
|
+ done && done();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ odd() {
|
|
|
|
|
+ this.castingQuantity = this.castingQuantity - 1;
|
|
|
|
|
+ },
|
|
|
|
|
+ add() {
|
|
|
|
|
+ this.castingQuantity = this.castingQuantity + 1;
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmSynthesis() {
|
|
|
|
|
+ this.showBottom = false;
|
|
|
|
|
+ },
|
|
|
goHome() {
|
|
goHome() {
|
|
|
this.$router.push('/home');
|
|
this.$router.push('/home');
|
|
|
},
|
|
},
|
|
@@ -205,13 +561,17 @@ export default {
|
|
|
if (res.scheduleSale && init && res.startTime) {
|
|
if (res.scheduleSale && init && res.startTime) {
|
|
|
this.getTime();
|
|
this.getTime();
|
|
|
}
|
|
}
|
|
|
- if (res.holdingTags && res.holdingTags.length) {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ (res.holdingTags && res.holdingTags.length) ||
|
|
|
|
|
+ (res.holdingTagsList && res.holdingTagsList.length)
|
|
|
|
|
+ ) {
|
|
|
this.$http.get('/mintOrder/checkHolding', { id: this.activityId }).then(res => {
|
|
this.$http.get('/mintOrder/checkHolding', { id: this.activityId }).then(res => {
|
|
|
this.holdingFlag = res;
|
|
this.holdingFlag = res;
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.holdingFlag = true;
|
|
this.holdingFlag = true;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.allTags = res.rule.and;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
pad(n, width, z) {
|
|
pad(n, width, z) {
|
|
@@ -394,8 +754,15 @@ export default {
|
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.card-detail {
|
|
|
|
|
|
|
+/deep/.card-detail {
|
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
|
|
|
+ p {
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.activity_need {
|
|
.activity_need {
|
|
|
margin: 16px 16px 0px;
|
|
margin: 16px 16px 0px;
|
|
@@ -432,6 +799,20 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
.activity_need_list_con {
|
|
.activity_need_list_con {
|
|
|
margin-right: 12px;
|
|
margin-right: 12px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ .num {
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 16px;
|
|
|
|
|
+ background: #3ab200;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 8px;
|
|
|
|
|
+ right: 8px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -450,8 +831,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
.activity_synthesis_details {
|
|
.activity_synthesis_details {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ .van-image {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
.activity_synthesis_details_con {
|
|
.activity_synthesis_details_con {
|
|
|
- margin-left: 16px;
|
|
|
|
|
|
|
+ padding: 0 12px 0 16px;
|
|
|
.activity_synthesis_details_con_one {
|
|
.activity_synthesis_details_con_one {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
@@ -466,6 +850,16 @@ export default {
|
|
|
line-height: 18px;
|
|
line-height: 18px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .activity_synthesis_details_num {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_synthesis_details + .activity_synthesis_details {
|
|
|
|
|
+ margin-top: 12px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.activity_collection_selection_top {
|
|
.activity_collection_selection_top {
|
|
@@ -484,19 +878,24 @@ export default {
|
|
|
height: 22px;
|
|
height: 22px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-.activity_collection_selection_list_con {
|
|
|
|
|
|
|
+.activity_collection_selection_list {
|
|
|
margin: 0px 16px 16px;
|
|
margin: 0px 16px 16px;
|
|
|
|
|
+}
|
|
|
|
|
+.activity_collection_selection_list_con {
|
|
|
padding: 12px;
|
|
padding: 12px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
background: #2b3038;
|
|
background: #2b3038;
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ .activity_collection_selection_list_con_top {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ }
|
|
|
.activity_collection_selection_list_con_left {
|
|
.activity_collection_selection_list_con_left {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
.activity_collection_selection_list_con_left_content {
|
|
.activity_collection_selection_list_con_left_content {
|
|
|
- margin-left: 12px;
|
|
|
|
|
|
|
+ padding: 0 12px;
|
|
|
|
|
+ .flex-col();
|
|
|
.activity_collection_selection_list_con_left_content_one {
|
|
.activity_collection_selection_list_con_left_content_one {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
@@ -533,6 +932,7 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
font-size: 11px;
|
|
font-size: 11px;
|
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
|
|
|
+ align-self: flex-start;
|
|
|
.activity_collection_selection_list_con_left_content_threes_img {
|
|
.activity_collection_selection_list_con_left_content_threes_img {
|
|
|
width: 18px;
|
|
width: 18px;
|
|
|
height: 18px;
|
|
height: 18px;
|
|
@@ -551,6 +951,7 @@ export default {
|
|
|
line-height: 28px;
|
|
line-height: 28px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
.activity_collection_selection_list_con_rightbuy {
|
|
.activity_collection_selection_list_con_rightbuy {
|
|
|
width: 59px;
|
|
width: 59px;
|
|
@@ -562,6 +963,129 @@ export default {
|
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
|
line-height: 28px;
|
|
line-height: 28px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.activity_collection_selection_subclass {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ padding-top: 13px;
|
|
|
|
|
+ .activity_collection_selection_subclass_img {
|
|
|
|
|
+ width: 70px;
|
|
|
|
|
+ height: 16px;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -3px;
|
|
|
|
|
+ left: 98px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_collection_selection_subclass_list {
|
|
|
|
|
+ max-height: 236px;
|
|
|
|
|
+ background: #363d47;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ padding: 12px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ transition: 0.5s;
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con_left {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con_left_content {
|
|
|
|
|
+ margin-left: 12px;
|
|
|
|
|
+
|
|
|
|
|
+ .van-image {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con_left_content_title {
|
|
|
|
|
+ width: calc(54vw);
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ margin-bottom: 2px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con_left_content_number {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #939599;
|
|
|
|
|
+ line-height: 18px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con_right_img {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .activity_collection_selection_subclass_list_con:last-of-type {
|
|
|
|
|
+ margin-bottom: 0px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.synthetic_quantity {
|
|
|
|
|
+ margin: 8px 16px 60px;
|
|
|
|
|
+ .synthetic_quantity_title {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .synthetic_quantity_con {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ .synthetic_quantity_con_img {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .synthetic_quantity_con_number {
|
|
|
|
|
+ width: 60px;
|
|
|
|
|
+ height: 28px;
|
|
|
|
|
+ background: #2b3038;
|
|
|
|
|
+ border-radius: 2px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 28px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ margin-left: 10px;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.confirm_synthesis {
|
|
|
|
|
+ height: 56px;
|
|
|
|
|
+ padding: 9px 48px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ .confirm_synthesis_con {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ background: #3ab200;
|
|
|
|
|
+ border-radius: 19px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 38px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.activity-collection {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ .num {
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ line-height: 16px;
|
|
|
|
|
+ background: #3ab200;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 8px;
|
|
|
|
|
+ right: 8px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|