From 7cc2711f915d6e02a299a705f0b531c347028b64 Mon Sep 17 00:00:00 2001 From: unknown <573515615@qq.com> Date: Wed, 29 Oct 2025 23:00:52 +0800 Subject: [PATCH] =?UTF-8?q?'=E8=B5=84=E9=87=91=E5=88=97=E8=A1=A8'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/api.js | 3 ++- pages/mine/priceRecord.vue | 7 +++++-- pages/poster/sharePoster.vue | 1 - pages/poster/wanl-poster.vue | 16 ++++++++++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/config/api.js b/config/api.js index 59c9470..99007a5 100644 --- a/config/api.js +++ b/config/api.js @@ -144,4 +144,5 @@ export const verifyPayPassword = (data, callback) => post('api/recover/person/ve export const priceList = (data, callback) => post('api/recover/personmoneylog/index', data, callback); export const uploadImg = (data, callback) => upload('api/feedback/upload', data, callback); export const allarealist = (data, callback) => post('api/recover/area/allarealist', data, callback); -export const qrcode = (data, callback) => post('api/promotion/qrcode', data, callback); +export const qrcode = (data, callback) => post('api/promotion/generate', data, callback); + diff --git a/pages/mine/priceRecord.vue b/pages/mine/priceRecord.vue index a8929ba..ce1f5d7 100644 --- a/pages/mine/priceRecord.vue +++ b/pages/mine/priceRecord.vue @@ -49,7 +49,7 @@ components:{ }, onLoad() { - + this.getPriceList() }, onShow() { @@ -57,7 +57,10 @@ methods: { getPriceList(){ var _this = this; - _this.$api.priceList({},res=>{ + _this.$api.priceList({ + page: this.page, + limit: this.limit + },res=>{ if(res.code == '1'){ if(res.data.user.avatar){ _this.avatar = res.data.user.avatar diff --git a/pages/poster/sharePoster.vue b/pages/poster/sharePoster.vue index 171874a..3327ce4 100644 --- a/pages/poster/sharePoster.vue +++ b/pages/poster/sharePoster.vue @@ -133,7 +133,6 @@ }); } }); - //#endif } } diff --git a/pages/poster/wanl-poster.vue b/pages/poster/wanl-poster.vue index b8db9a3..73b8e88 100644 --- a/pages/poster/wanl-poster.vue +++ b/pages/poster/wanl-poster.vue @@ -64,8 +64,8 @@ that.ctx.fillRect(0, 0, that.canvasW, that.canvasH); //添加图片展示 that.ctx.drawImage(_imgInfo.path, 0, 0, that.canvasW, that.canvasH); - - let _qrcodeImg = await that.getImageInfo({img: 'https://admin.dbcdq.cn/assets/img/icon/bg1.png'}); + let urlcode = await that.getCode(); + let _qrcodeImg = await that.getImageInfo({img: urlcode}); this.$api.qrcode({},res=>{ if(res.code == '1'){ @@ -90,6 +90,16 @@ console.log('15') }, 500); }, + async getCode(){ + return new Promise((resolve, errs) => { + this.$api.qrcode({},res=>{ + if(res.code == '1'){ + console.log(res.data.promotion_code,'dfffffqqq'); + resolve(res.data.promotion_code); + } + }) + }); + }, async getImageInfo({ img }) { @@ -131,7 +141,6 @@ }, // 手动保存 toSave(url) { - //#ifndef H5 uni.getImageInfo({ src: url, success: function(image) { @@ -147,7 +156,6 @@ }); } }); - //#endif } } };