From bc1ea11e37f85e9516f01ac57126e94a7a0014ce Mon Sep 17 00:00:00 2001 From: woody Date: Fri, 6 Jun 2025 11:25:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(gloabl):=20=E5=88=97=E8=A1=A8=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=B1=95=E7=A4=BA=E4=BD=BF=E7=94=A8=E5=B0=81=E9=9D=A2?= =?UTF-8?q?=E5=9B=BE=E5=AD=97=E6=AE=B5cover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/area-product-list/index.vue | 6 +- components/cartBtmList.vue | 2 +- components/postShare.vue | 104 +- pages/index/index.vue | 2 +- pages/other/index.vue | 4 +- pages/regiest/index.vue | 2 +- pages/selfService/orderPick/orderPick.vue | 4 +- pages/shareArea/index.vue | 86 +- pages/shoppingCar/index.vue | 2 +- pages/specialArea/list.vue | 1319 +++++++++++---------- 10 files changed, 813 insertions(+), 718 deletions(-) diff --git a/components/area-product-list/index.vue b/components/area-product-list/index.vue index 4965140..b1f9007 100644 --- a/components/area-product-list/index.vue +++ b/components/area-product-list/index.vue @@ -34,7 +34,11 @@ :key="item.pkWares" @click="handleProductClick(item)" > - + {{ item.waresName }} diff --git a/components/cartBtmList.vue b/components/cartBtmList.vue index 9ec480d..2d3e0f6 100644 --- a/components/cartBtmList.vue +++ b/components/cartBtmList.vue @@ -129,7 +129,7 @@ - + {{ item.waresName }} {{ item.waresCode }} diff --git a/components/postShare.vue b/components/postShare.vue index b014c11..2405286 100644 --- a/components/postShare.vue +++ b/components/postShare.vue @@ -1,35 +1,32 @@ @@ -68,11 +65,11 @@ export default { }, toShare(item) { let pkId = item.pkId - this.goodImg = item.cover1 + this.goodImg = item.cover || item.cover1 qrCode({ codeType: 1, waresId: pkId, - }).then((res) => { + }).then(res => { this.postImg = res.data this.toCanvas() // this.popShow = true @@ -90,7 +87,7 @@ export default { ctx.drawImage(imgBg, 0, 0, this.canvasW, this.canvasH) //插入图片 ctx.drawImage(imggoodList, 95, 175, 130, 130) ctx.drawImage(imgPost, 239, 392, 65, 65) - ctx.draw(true, (ret) => {}) + ctx.draw(true, ret => {}) }, 100) }, //获取图片缓存地址 @@ -98,7 +95,7 @@ export default { return new Promise((reslove, reject) => { uni.getImageInfo({ src: img, - success: (res) => { + success: res => { reslove(res.path) }, }) @@ -122,7 +119,7 @@ export default { uni.showModal({ title: '授权提示', content: '是否允许获取保存相册权限', - success: (res) => { + success: res => { if (res.confirm) { // 点击确定,则调用相册授权 uni.openSetting({ @@ -154,32 +151,35 @@ export default { saveLocal() { console.log('d') // canvas转图片 - uni.canvasToTempFilePath({ - canvasId: 'myCanvas', - success: function (res) { - console.log('res', res) - // // 保存相册 - uni.saveImageToPhotosAlbum({ - filePath: res.tempFilePath, - success: function () { - console.log('save success') - uni.showToast({ - title: '已保存在本地相册', - icon: 'none', - }) - }, - fail: function () { - uni.showToast({ - title: '保存失败', - icon: 'none', - }) - }, - }) + uni.canvasToTempFilePath( + { + canvasId: 'myCanvas', + success: function (res) { + console.log('res', res) + // // 保存相册 + uni.saveImageToPhotosAlbum({ + filePath: res.tempFilePath, + success: function () { + console.log('save success') + uni.showToast({ + title: '已保存在本地相册', + icon: 'none', + }) + }, + fail: function () { + uni.showToast({ + title: '保存失败', + icon: 'none', + }) + }, + }) + }, + fail: function (err) { + console.log('err', err) + }, }, - fail: function (err) { - console.log('err', err) - }, - },this) + this + ) }, }, } @@ -242,4 +242,4 @@ export default { background: rgba(0, 0, 0, 80%); overflow: hidden; } - \ No newline at end of file + diff --git a/pages/index/index.vue b/pages/index/index.vue index 6063eea..c7f54f5 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -83,7 +83,7 @@ > - + {{ item.waresName }} diff --git a/pages/other/index.vue b/pages/other/index.vue index 4a56ad0..3945701 100644 --- a/pages/other/index.vue +++ b/pages/other/index.vue @@ -270,7 +270,7 @@ > - + @@ -621,7 +621,7 @@ export default { achieveAmount: 0, price: 0, priceAmount: 0, - cover1: item.cover1, + cover1: item.cover || item.cover1, energySilo: 1, } }) diff --git a/pages/regiest/index.vue b/pages/regiest/index.vue index e172608..d01df26 100644 --- a/pages/regiest/index.vue +++ b/pages/regiest/index.vue @@ -753,7 +753,7 @@ export default { achieveAmount: 0, price: 0, priceAmount: 0, - cover1: item.cover1, + cover1: item.cover || item.cover1, energySilo: 1, } }) diff --git a/pages/selfService/orderPick/orderPick.vue b/pages/selfService/orderPick/orderPick.vue index 3cb8507..47e8518 100644 --- a/pages/selfService/orderPick/orderPick.vue +++ b/pages/selfService/orderPick/orderPick.vue @@ -28,7 +28,7 @@ - + {{aitem.waresName}} @@ -495,4 +495,4 @@ } } - \ No newline at end of file + diff --git a/pages/shareArea/index.vue b/pages/shareArea/index.vue index 7a3b4f2..07acef7 100644 --- a/pages/shareArea/index.vue +++ b/pages/shareArea/index.vue @@ -1,6 +1,6 @@ @@ -11,16 +11,18 @@ {{ zoneList[0].label }} --> - - + + - {{ item.waresPrice | numberToCurrency | isLocal }} + {{ + item.waresPrice | numberToCurrency | isLocal + }} - + - @@ -69,17 +73,15 @@ export default { computed: { ...mapGetters(['user']), }, - filters:{ - seles(value){ - - if(value>999){ - return 999 + '+' - }else{ - return value - } - - } + filters: { + seles(value) { + if (value > 999) { + return 999 + '+' + } else { + return value + } }, + }, data() { return { title: '', @@ -156,9 +158,9 @@ export default { .getAllGoods({ specialArea: this.specialArea, }) - .then((res) => { + .then(res => { this.goodsList = res.data - this.goodsList.forEach((item) => { + this.goodsList.forEach(item => { if (item.waresName.length > 8) { item.waresName = item.waresName.substring(0, 8) + '...' } @@ -171,9 +173,9 @@ export default { source: this.source, productCategory: this.productCategory, }) - .then((res) => { + .then(res => { this.goodsList = res.rows - this.goodsList.forEach((item) => { + this.goodsList.forEach(item => { if (item.waresName.length > 8) { item.waresName = item.waresName.substring(0, 8) + '...' } @@ -191,10 +193,12 @@ export default { min-height: 94vh; } .index_header { - background: #f9f9f9;; + background: #f9f9f9; height: 330rpx; font-size: 18px; - font-family: PingFang SC-Semibold, PingFang SC; + font-family: + PingFang SC-Semibold, + PingFang SC; font-weight: 600; color: #333333; text-align: center; @@ -243,7 +247,9 @@ export default { // width: 120rpx; text-align: center; font-size: 14px; - font-family: PingFang SC-Semibold, PingFang SC; + font-family: + PingFang SC-Semibold, + PingFang SC; font-weight: 600; color: #ed1d25; margin-right: 28rpx; @@ -341,7 +347,9 @@ export default { border: 1px solid #f33131; border-radius: 6px; font-size: 12px; - font-family: PingFang SC-Semibold, PingFang SC; + font-family: + PingFang SC-Semibold, + PingFang SC; font-weight: 600; color: #f33131; text-align: center; diff --git a/pages/shoppingCar/index.vue b/pages/shoppingCar/index.vue index 8aefe34..aacf388 100644 --- a/pages/shoppingCar/index.vue +++ b/pages/shoppingCar/index.vue @@ -157,7 +157,7 @@ - + {{ item.waresName }} {{ item.waresCode }} diff --git a/pages/specialArea/list.vue b/pages/specialArea/list.vue index 0400976..4f1b28f 100644 --- a/pages/specialArea/list.vue +++ b/pages/specialArea/list.vue @@ -1,662 +1,745 @@ \ No newline at end of file +.search { + margin: 10rpx 20rpx; + padding: 10rpx; + background: #eeeeee; + border-radius: 20px; + font-size: 14px; +} +