diff --git a/src/page/homepage/tool/tooldetails.vue b/src/page/homepage/tool/tooldetails.vue index e1b6445..8a9991c 100644 --- a/src/page/homepage/tool/tooldetails.vue +++ b/src/page/homepage/tool/tooldetails.vue @@ -74,7 +74,7 @@
|
-
上架时间:{{ tool.onlineTime.slice(0, 10) }}
+
上架时间:{{ tool.onlineTime && tool.onlineTime.slice(0, 10) }}
@@ -434,15 +434,15 @@ ¥{{ serviceType == '测试服务(按次计)' ? buyTool.priceTime : buyTool.price }} + 1 - 1 {{ buyTool.deliverType }} @@ -657,6 +657,12 @@ export default { qrcode: VueQrcode, }, filters: {}, + watch:{ + serviceType(newval,oldval) { + this.amount = 1 + this.buyAmount = 1 + } + }, computed: { ...mapGetters(['paytype', 'tooltypelist', 'token', 'userinform']), addPriceAll() { @@ -677,38 +683,8 @@ export default { getTool(this.id).then((response) => { this.tool = response.tool - // 处理可下载链接 - // const selectItem = this.mp4Info.find((it) => it.name == this.tool.name) - // if (selectItem) { - // this.tool.videoUrl = selectItem.videoUrl - // this.tool.uploadApp = selectItem.uploadApp - // this.tool.uploadInstall = selectItem.uploadInstall - // this.tool.uploadUse = selectItem.uploadUse - // } - - // this.buyTool=response.tool; this.$emit('inform', this.tool) this.tool.amount = 1 - // this.images = response.fileInfoList - // this.images.forEach(item=>{ - // if(item.fileType == 'head'){ - // this.icon.push(item) - // }else if(item.fileType == 'detail'){ - // this.icon.push(item) - // } - // }) - // for (let index in this.images) { - // if (this.images[index].fileType == 'head') this.icon = this.images[index] - // else if (this.images[index].fileType == 'detail') { - // this.detailImages.push(this.images[index]) - // } else if (this.images[index].fileType == 'package') { - // this.packageUrl = this.images[index].fileId - // } else if (this.images[index].fileType == 'readme') { - // this.readmeUrl = this.images[index].fileId - // } else if (this.images[index].fileType == 'icon') { - // this.tool.img = this.images[index].fileUrl - // } - // } // 处理可下载文件fileType fileUrl filePath if (response.fileInfoList.length) {