Commit b564ec3f authored by salitedfish's avatar salitedfish

bug 修复

parent 3b1799cf
src/assets/img/stamp.png

7.38 KB | W: | H:

src/assets/img/stamp.png

24.3 KB | W: | H:

src/assets/img/stamp.png
src/assets/img/stamp.png
src/assets/img/stamp.png
src/assets/img/stamp.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<img id="coverImg" :src="certificateData.cover" v-if="certificateData.cover" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" /> <img id="coverImg" :src="certificateData.cover" v-if="certificateData.cover" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img id="coverImg" v-else-if="!coverName" src="/img/cover.png" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" /> <img id="coverImg" v-else-if="!coverName" src="/img/cover.png" class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img id="coverImg" :src="showUploadFile" v-else class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" /> <img id="coverImg" :src="showUploadFile" v-else class=" max-w-20 xs:max-w-24 mx-auto mt-4 mb-4 max-h-32" />
<img src="./mark.png" class=" absolute right-20 bottom-0"/> <img src="./mark.png" class=" absolute right-20 bottom-0 w-1/5"/>
</div> </div>
<div class="float-box w-full absolute -bottom-10 text-3xs xs:text-2xs"> <div class="float-box w-full absolute -bottom-10 text-3xs xs:text-2xs">
<div class="w-11/12 p-2 flex-wrap mx-auto flex break-all bg-font-white shadow-md rounded text-font-black"> <div class="w-11/12 p-2 flex-wrap mx-auto flex break-all bg-font-white shadow-md rounded text-font-black">
......
...@@ -55,7 +55,13 @@ export default Vue.extend({ ...@@ -55,7 +55,13 @@ export default Vue.extend({
}; };
}, },
async mounted() { async mounted() {
this.$toast.loading({
message: '主题获取中',
duration: 20000,
})
this.serviceData = await this.$service.nftService.getThemeList(this.$route.query.id); this.serviceData = await this.$service.nftService.getThemeList(this.$route.query.id);
this.$toast.clear()
this.$toast.success('主题获取成功~')
}, },
components: { components: {
"Layout-Child": () => import("@/layout/Child.vue"), "Layout-Child": () => import("@/layout/Child.vue"),
......
...@@ -139,20 +139,20 @@ export default Vue.extend({ ...@@ -139,20 +139,20 @@ export default Vue.extend({
uploadType():any{ uploadType():any{
return this.$route.query.type return this.$route.query.type
}, },
uploadAccept():object{ uploadAccept():any{
switch(this.uploadType){ switch(this.uploadType){
case '剧本': case '剧本':
return {acceptTitle:'请上传剧本附件',acceptType:'.pdf,.doc,.docx,.txt',acceptText:'仅支持txt、doc、docx、pdf,文件大小限制在100M'} return {acceptTitle:'请上传剧本附件',acceptType:'.pdf,.doc,.docx,.txt',acceptText:'仅支持txt、doc、docx、pdf,文件大小限制在100M',acceptSize:1024*1024*100,acceptArray:['.pdf','.doc','docx','.txt']}
case '视频': case '视频':
return {acceptTitle:'请上传视频附件',acceptType:'video/*',acceptText:'上传视频仅支持MOV、MP4格式文件,大小限制为500M以内'} return {acceptTitle:'请上传视频附件',acceptType:'video/*',acceptText:'上传视频仅支持MOV、MP4格式文件,大小限制为500M以内',acceptSize:1024*1024*500,acceptArray:['.mp4','.mov']}
case '电影': case '电影':
return {acceptTitle:'请上传电影附件',acceptType:'video/*',acceptText:'上传电影仅支持MOV、MP4格式文件,大小限制为1G以内'} return {acceptTitle:'请上传电影附件',acceptType:'video/*',acceptText:'上传电影仅支持MOV、MP4格式文件,大小限制为1G以内',acceptSize:1024*1024*1024}
case '音频': case '音频':
return {acceptTitle:'请上传音频附件',acceptType:"audio/*",acceptText:'上传音频仅支持MP3格式文件,大小限制为100M以内'} return {acceptTitle:'请上传音频附件',acceptType:"audio/*",acceptText:'上传音频仅支持MP3格式文件,大小限制为100M以内',acceptSize:1024*1024*100,acceptArray:['.mp3']}
case '图片': case '图片':
return {acceptTitle:'请上传图片附件',acceptType:'image/*',acceptText:'仅支持png、jpg图片'} return {acceptTitle:'请上传图片附件',acceptType:'image/*',acceptText:'仅支持png、jpg图片',acceptArray:['.png','.jpg']}
case '封面图片': case '封面图片':
return {acceptTitle:'请上传封面图片',acceptType:'image/*',acceptText:'仅支持png、jpg图片'} return {acceptTitle:'请上传封面图片',acceptType:'image/*',acceptText:'仅支持png、jpg图片',acceptArray:['.png','.jpg']}
default: default:
return {acceptTitle:'',acceptType:'',acceptText:''} return {acceptTitle:'',acceptType:'',acceptText:''}
} }
...@@ -213,11 +213,18 @@ export default Vue.extend({ ...@@ -213,11 +213,18 @@ export default Vue.extend({
const ele = this.$refs[ref] as HTMLInputElement; const ele = this.$refs[ref] as HTMLInputElement;
const files = ele.files as FileList; const files = ele.files as FileList;
//限制大小 //限制大小
console.log(files[0].size); if(this.uploadAccept.acceptSize && files[0].size > this.uploadAccept.acceptSize) {
this.$toast('文件大小超出限制~')
return
}
//限制类型 //限制类型
console.log(files[0].type); const type_name = files[0].name.substring(files[0].name.lastIndexOf('.'),files[0].name.length)
if(this.uploadAccept.acceptArray && this.uploadAccept.acceptArray.indexOf(type_name) == -1) {
this.$toast('请上传指定类型文件~')
return
}
if (files && files.length >= 1) { if (files && files.length >= 1) {
this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.uploading; this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.uploading;
this.afterRead(files[0]); this.afterRead(files[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