Commit 75bb241b authored by salitedfish's avatar salitedfish

bug修复

parent 4cb1c897
...@@ -159,7 +159,7 @@ export default Vue.extend({ ...@@ -159,7 +159,7 @@ export default Vue.extend({
components: { components: {
"app-icon": () => import("@/components/common/Icon.vue"), "app-icon": () => import("@/components/common/Icon.vue"),
ActionSheet, ActionSheet,
"app-tag": () => import("@/components/common/Tag2.vue"), // "app-tag": () => import("@/components/common/Tag2.vue"),
}, },
props: { props: {
value: [String, Number], value: [String, Number],
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<div class="code-confirm flex flex-row item-center content-center justify-center text-font-white h-full" @click.stop> <div class="code-confirm flex flex-row item-center content-center justify-center text-font-white h-full" @click.stop>
<div class="self-center rounded-lg" :class="!CodeData.onAction?' bg-white':''"> <div class="self-center rounded-lg" :class="!CodeData.onAction?' bg-white':''">
<div class=" flex flex-col text-zx-blue-light p-6 px-10" v-if="!CodeData.onAction"> <div class=" flex flex-col text-zx-blue-light p-6 px-10" v-if="!CodeData.onAction">
<div class=' text-zx-blue-light flex justify-between'> <div class=' text-zx-blue-light flex justify-between items-center'>
<div class="flex-1 text-center">安全验证</div> <div class="flex-1 text-center">安全验证</div>
<app-icon name="icon-shanchu" size="8px" @click.native="closeOverlay"></app-icon> <app-icon name="icon-shanchu" size="10px" @click.native="closeOverlay" color="#2b446c"></app-icon>
</div> </div>
<div class='text-xs my-1 mt-5'>验证码已发送到您绑定的手机</div> <div class='text-xs my-1 mt-5'>验证码已发送到您绑定的手机</div>
<input type="number" class=" bg-zx-btn-disabled-bg text-zx-blue-light py-2 px-2 w-48 mb-3 rounded-md text-sm" v-model="codeValue" placeholder="请输入验证码"> <input type="number" class=" bg-zx-btn-disabled-bg text-zx-blue-light py-2 px-2 w-48 mb-3 rounded-md text-sm" v-model="codeValue" placeholder="请输入验证码">
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<img :src="url" alt="" class=" w-full h-full rounded" @click="showImgPreview(index)" v-if="uploadType == 'img'"> <img :src="url" alt="" class=" w-full h-full rounded" @click="showImgPreview(index)" v-if="uploadType == 'img'">
<div class=" h-8 text-center absolute bottom-1 left-1 right-1 bg-gray-500 opacity-80 text-white leading-8 text-xs" v-if="index == 0 && uploadType == 'img'">默认封面</div> <div class=" h-8 text-center absolute bottom-1 left-1 right-1 bg-gray-500 opacity-80 text-white leading-8 text-xs" v-if="index == 0 && uploadType == 'img'">默认封面</div>
<video :src="url" controls="controls" class="w-full h-full rounded" v-if="uploadType == 'video'"/> <video :src="url" controls="controls" class="w-full h-full rounded" v-if="uploadType == 'video'"/>
<app-icon name='icon-fahangnft' class="delete-icon absolute -top-1 -right-0.5 w-1/6 rounded-full bg-white" size='22px' color='#f68585' @click.native="deleteImg(index)"></app-icon> <app-icon name='icon-fahangnft' class="delete-icon absolute -top-1 right-0.5 w-1/6 rounded-full bg-white" size='22px' color='#f68585' @click.native="deleteImg(index)"></app-icon>
</div> </div>
<div v-if="fileList.length < maxCount" @click="upload" class=" h-32 w-1/3 text-zx-blue-light p-1"> <div v-if="fileList.length < maxCount" @click="upload" class=" h-32 w-1/3 text-zx-blue-light p-1">
<div class=" h-full w-full bg-zx-btn-disabled-bg relative"> <div class=" h-full w-full bg-zx-btn-disabled-bg relative">
...@@ -48,7 +48,7 @@ export default Vue.extend({ ...@@ -48,7 +48,7 @@ export default Vue.extend({
dom.value = '' dom.value = ''
}, },
deleteImg(index:number):void{ deleteImg(index:number):void{
this.$emit('deleteImg',index) this.$emit('deleteFile',index)
}, },
showImgPreview(index:number):void{ showImgPreview(index:number):void{
ImagePreview({images:this.urlList,startPosition:index}) ImagePreview({images:this.urlList,startPosition:index})
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
></textarea> ></textarea>
</div> </div>
<upload-img :fileList="fileList" :maxCount='9' @fileChange="fileChange" @deleteImg="deleteImg"></upload-img> <upload-file :fileList="fileList" :maxCount='9' @fileChange="fileChange" @deleteFile="deleteFile"></upload-file>
<app-cell <app-cell
v-model="createNFT.value_name" v-model="createNFT.value_name"
...@@ -397,7 +397,7 @@ export default Vue.extend({ ...@@ -397,7 +397,7 @@ export default Vue.extend({
"app-btn": () => import("@/components/common/Btn.vue"), "app-btn": () => import("@/components/common/Btn.vue"),
// certificate: () => import("./components/certificate/index.vue"), // certificate: () => import("./components/certificate/index.vue"),
// BreedingRhombusSpinner // BreedingRhombusSpinner
'uploadImg': ()=>import('./components/uploadImg/uploadFile.vue'), 'uploadFile': ()=>import('./components/uploadFile/uploadFile.vue'),
}, },
async mounted() { async mounted() {
...@@ -516,7 +516,7 @@ export default Vue.extend({ ...@@ -516,7 +516,7 @@ export default Vue.extend({
} }
}, },
//删除图片 //删除图片
async deleteImg(index:number){ async deleteFile(index:number){
//删除oss上的文件 //删除oss上的文件
if(this.fileList[index].fileUrl){ if(this.fileList[index].fileUrl){
await this.$service.nftService.deleteOssFile({ await this.$service.nftService.deleteOssFile({
......
<template> <template>
<div> <div>
<van-swipe class="my-swipe h-72" indicator-color="white" @change="setImgPreview"> <van-swipe class="my-swipe h-72" indicator-color="white" @change="setImgPreview" >
<van-swipe-item v-for="(url,index) in urlList" :key="url+index" class="flex items-center" @click="showImgPreview"> <van-swipe-item v-for="(url,index) in urlList" :key="url+index" class="flex items-center" @click="showImgPreview">
<img v-lazy="url" alt="" class=" max-h-72 mx-auto " > <img v-lazy="url" alt="" class=" max-h-72 mx-auto " >
</van-swipe-item> </van-swipe-item>
......
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
</div> </div>
</div> --> </div> -->
<!-- 不是纪念版NFT --> <!-- 不是纪念版NFT -->
<file-swipe :urlList="urlList"></file-swipe> <van-swipe class="my-swipe h-72" indicator-color="#2b446c" @change="setImgPreview">
<van-swipe-item v-for="url in urlList" :key="url" class="flex items-center" @click="showImgPreview">
<img v-lazy="url" alt="" class=" max-h-72 mx-auto " >
</van-swipe-item>
</van-swipe>
<!-- <file-swipe :urlList="urlList"></file-swipe> -->
<!-- <app-collectionCard :colletionData="nftData" v-else></app-collectionCard> --> <!-- <app-collectionCard :colletionData="nftData" v-else></app-collectionCard> -->
<!-- <div> --> <!-- <div> -->
<!-- <div class="h-72 flex items-center"> --> <!-- <div class="h-72 flex items-center"> -->
...@@ -405,12 +410,13 @@ import anquanzhongxin89 from "@/assets/img/check.png"; ...@@ -405,12 +410,13 @@ import anquanzhongxin89 from "@/assets/img/check.png";
import chakan from "@/assets/img/upload.png"; import chakan from "@/assets/img/upload.png";
import atupian from "@/assets/img/transfer.png"; import atupian from "@/assets/img/transfer.png";
import BOSSyingyetingchushi from "@/assets/img/certigicate.png"; import BOSSyingyetingchushi from "@/assets/img/certigicate.png";
import { Overlay,ActionSheet,Lazyload} from "vant"; import { Overlay,ActionSheet,Swipe,SwipeItem,Lazyload,ImagePreview } from "vant";
import download from "downloadjs"; import download from "downloadjs";
import FileSwipe from "./components/fileSwipe.vue";
Vue.use(Overlay); Vue.use(Overlay);
Vue.use(ActionSheet); Vue.use(ActionSheet);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Lazyload); Vue.use(Lazyload);
const apps = [ const apps = [
{ {
...@@ -465,6 +471,7 @@ export default Vue.extend({ ...@@ -465,6 +471,7 @@ export default Vue.extend({
showManage: false, showManage: false,
manageActions:[{name:'NFT转账'}], manageActions:[{name:'NFT转账'}],
urlList:[], urlList:[],
imgPreviewIndex:0,
}; };
}, },
computed:{ computed:{
...@@ -525,8 +532,7 @@ export default Vue.extend({ ...@@ -525,8 +532,7 @@ export default Vue.extend({
"certificate": () => import("@/view/NFT/Create/components/certificate/index.vue"), "certificate": () => import("@/view/NFT/Create/components/certificate/index.vue"),
SkeletonNftDetail, SkeletonNftDetail,
'sourceSearch': ()=>import('./components/sourceSearch.vue'), 'sourceSearch': ()=>import('./components/sourceSearch.vue'),
'fileSwipe': ()=>import('./components/fileSwipe.vue'), // 'fileSwipe': ()=>import('./components/fileSwipe.vue'),
FileSwipe
}, },
methods: { methods: {
onSelect(item:any){ onSelect(item:any){
...@@ -553,7 +559,14 @@ export default Vue.extend({ ...@@ -553,7 +559,14 @@ export default Vue.extend({
showManage:false showManage:false
}) })
}, },
setImgPreview(index: number){
this.imgPreviewIndex = index
},
showImgPreview(){
ImagePreview({images:this.urlList,startPosition:this.imgPreviewIndex})
},
confirmBtn() { confirmBtn() {
console.log(this.nftData.status);
if(!this.$route.query.officia) { if(!this.$route.query.officia) {
this.showoverlay = true this.showoverlay = true
if(this.nftData.fileUrl && this.nftData.isCommemorate == 0) { if(this.nftData.fileUrl && this.nftData.isCommemorate == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment