From 004d650c6e92bf24651081407bcf8a3ee3abfa73 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Tue, 9 Jan 2024 16:10:02 +0800 Subject: [PATCH] 11111 --- main.js | 6 +++ pages/bind/bind_pickUpCard.vue | 4 +- pages/bind/bind_pickUpCard2.vue | 4 +- pages/cloud/detail_cloudCard.vue | 27 ++++++---- pages/cloud/optionalCard.vue | 76 ++++++++++++++++------------ pages/detail/detail_affeection.vue | 29 ++++++++--- pages/detail/detail_affeection2.vue | 25 ++++++++-- pages/detail/detail_enterprise.vue | 21 +++++--- pages/detail/detail_enterprise2.vue | 31 +++++++++--- pages/detail/detail_family.vue | 29 ++++++++--- pages/detail/detail_family2.vue | 25 ++++++++-- pages/home/cloudCard.vue | 4 +- pages/home/pickUpCard.vue | 77 ++++++++++++++++++++--------- pages/home/recordList.vue | 4 +- pages/home/recordList2.vue | 6 +-- 15 files changed, 259 insertions(+), 109 deletions(-) diff --git a/main.js b/main.js index 5c10179..25649ea 100644 --- a/main.js +++ b/main.js @@ -35,10 +35,16 @@ import bus from './common/bus.js'; //挂载到this上 Vue.prototype.$bus = bus; + import {pay} from './uni_modules/common-pay/utils/pay.js' //挂载到this上 Vue.prototype.$pay = pay; + +import {convertPrice} from './common/price.js' +//挂载到this上 +Vue.prototype.convertPrice = convertPrice; + const app = new Vue({ store, ...App diff --git a/pages/bind/bind_pickUpCard.vue b/pages/bind/bind_pickUpCard.vue index 05e34df..989f860 100644 --- a/pages/bind/bind_pickUpCard.vue +++ b/pages/bind/bind_pickUpCard.vue @@ -2,7 +2,7 @@ - @@ -42,7 +42,7 @@ - 绑定云菜窖卡 + 绑定云菜窖 提货编码 diff --git a/pages/bind/bind_pickUpCard2.vue b/pages/bind/bind_pickUpCard2.vue index c54a904..3631918 100644 --- a/pages/bind/bind_pickUpCard2.vue +++ b/pages/bind/bind_pickUpCard2.vue @@ -5,7 +5,7 @@ - @@ -45,7 +45,7 @@ - 绑定云菜窖卡 + 绑定云菜窖 提货编码 diff --git a/pages/cloud/detail_cloudCard.vue b/pages/cloud/detail_cloudCard.vue index e5e4847..0be86b9 100644 --- a/pages/cloud/detail_cloudCard.vue +++ b/pages/cloud/detail_cloudCard.vue @@ -16,7 +16,7 @@ + margin:20px 20px 0px 20px;padding-bottom: 10px; border-bottom: 2px #EFEFEF solid; justify-content: space-between;"> @@ -25,10 +25,10 @@ - 我要定 + 定制 - 个云菜窖 + 个菜窖 @@ -43,7 +43,7 @@ - + @@ -54,20 +54,20 @@ - {{item.remark}} + {{item.remark}} - {{item.jprice}}元/{{item.specificationUnit}} + {{item.jprice}}元/{{item.specificationUnit}} {{item.weight}}斤/{{item.unitName}} + style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 10px;;padding: 0px 5px;">{{item.weight}}斤/{{item.unitName}} - ¥{{item.totalValue}} + ¥{{item.totalValue}} @@ -140,8 +140,17 @@ this.page.endHeight = info.windowWidth * 0.8 this.request() + uni.$on("pay", (e) => { + + uni.switchTab({ + url: '/pages/home/pickUpCard' + }) + }) }, + onUnload() { + uni.$off('pay'); + }, onPageScroll(res) { // 渐变 this.$refs.nav.defaultColorBgAlpha(res) diff --git a/pages/cloud/optionalCard.vue b/pages/cloud/optionalCard.vue index 23087e0..f4b738e 100644 --- a/pages/cloud/optionalCard.vue +++ b/pages/cloud/optionalCard.vue @@ -16,7 +16,7 @@ + margin:20px 10px 0px 20px;padding-bottom:10px; border-bottom: 2px #EFEFEF solid;"> @@ -28,23 +28,17 @@ - 我要定 + 定制 - 个云菜窖 + 个菜窖 - - 您已经定制了 - {{page.weight}}斤 - ,满200斤可定制云菜窖 - - + style="display: flex;flex-direction: column;margin-top: 14px;"> @@ -52,7 +46,7 @@ - + @@ -71,14 +65,14 @@ style="display: flex;flex-direction: row;justify-content:space-between;margin-top: 5px;"> - {{item.jprice}}元/{{item.specificationUnit}} + {{item.jprice}}元/{{item.specificationUnit}} {{item.weight}}斤/{{item.unitName}} + style="border: 1px #EE752F solid; border-radius: 10px; color: #EE752F;font-size: 10px;;padding: 0px 5px;">{{item.weight}}斤/{{item.unitName}} - ¥{{item.price}} + ¥{{item.price}} @@ -92,26 +86,38 @@ - + + + + 温馨提示:已定制了 + {{page.weight}}斤 + ,满200斤可定制云菜窖 + - + - - 合计: - {{page.price}}元 + + 合计: + {{page.price}}元 + - - 结算 + 结算 + + + @@ -149,8 +155,17 @@ this.page.endHeight = info.windowWidth * 0.8 this.request() + uni.$on("pay", (e) => { + + uni.switchTab({ + url: '/pages/home/pickUpCard' + }) + }) }, + onUnload() { + uni.$off('pay'); + }, methods: { itemClick(goodsSid) { uni.navigateTo({ @@ -191,7 +206,7 @@ let num = 0; for (var i = 0; i < this.data.length; i++) { - num += Number(this.data[i].jprice) * Number(this.data[i].goodsNumber)* Number(this.data[i].weight); + num += Number(this.data[i].jprice) * Number(this.data[i].goodsNumber) * Number(this.data[i].weight); } console.log("num", num) @@ -244,8 +259,8 @@ }) } // console.log("ddd", list); - - if(list.length==0){ + + if (list.length == 0) { this.shortToast('请添加商品') return } @@ -262,9 +277,8 @@ _this.$api.createOrder(params).then((resp) => { // console.log("resp", resp); - this.$pay(resp) - }).catch(e => { - }) + this.$pay(resp) + }).catch(e => {}) } diff --git a/pages/detail/detail_affeection.vue b/pages/detail/detail_affeection.vue index aac5062..346b6a4 100644 --- a/pages/detail/detail_affeection.vue +++ b/pages/detail/detail_affeection.vue @@ -12,7 +12,7 @@ - 卡号:{{data.serialNumber}} + 窖号:{{data.serialNumber}} {{data.time}} @@ -153,7 +153,7 @@ - 亲情卡编码:{{item.code}} + 亲情窖编码:{{item.code}} 提货密码:{{item.codeKey}} 备注说明:{{item.remarks}} @@ -162,7 +162,7 @@ - {{item.goods}} + open-type="share">分享窖 @@ -289,9 +289,9 @@ - 卡券数量 + 菜窖数量 - @@ -588,9 +588,26 @@ console.log("data", res.target.dataset) var data = res.target.dataset.info this.shareCard(data.sid) + // ① + let shareData = JSON.stringify({ + params: { + code: data.code, + codeKey: data.codeKey, + customerSid: '' + }, + functionName: 'bindCard', + url: '/pages/detail/detail_affeection?sid=' + data.sid + + // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, + // FunctionName:'share! + }) + // 转码传输 + let value = encodeURIComponent(shareData) + return { title: '汇融惠享-云菜窖', - path: '/pages/bind/bind_pickUpCard?code=' + data.code + '&codeKey=' + data.codeKey, + // ② + path: '/pages/login/login?data=' + value, imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 success: function(res) { console.log('aaaa', "分享成功") diff --git a/pages/detail/detail_affeection2.vue b/pages/detail/detail_affeection2.vue index bf77f5d..f8e32a7 100644 --- a/pages/detail/detail_affeection2.vue +++ b/pages/detail/detail_affeection2.vue @@ -12,7 +12,7 @@ - 卡号:{{data.serialNumber}} + 窖号:{{data.serialNumber}} {{data.time}} @@ -149,7 +149,7 @@ - 亲情卡编码:{{item.code}} + 亲情窖编码:{{item.code}} 提货密码:{{item.codeKey}} 备注说明:{{item.remarks}} @@ -159,7 +159,7 @@ style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}} + open-type="share">分享窖 @@ -256,9 +256,26 @@ console.log("data", res.target.dataset) var data = res.target.dataset.info this.shareCard(data.sid) + // ① + let shareData = JSON.stringify({ + params: { + code: data.code, + codeKey: data.codeKey, + customerSid: '' + }, + functionName: 'bindCard', + url: '/pages/detail/detail_affeection?sid=' + data.sid + + // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, + // FunctionName:'share! + }) + // 转码传输 + let value = encodeURIComponent(shareData) + return { title: '汇融惠享-云菜窖', - path: '/pages/bind/bind_pickUpCard?code=' + data.code + '&codeKey=' + data.codeKey, + // ② + path: '/pages/login/login?data=' + value, imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 success: function(res) { console.log('aaaa', "分享成功") diff --git a/pages/detail/detail_enterprise.vue b/pages/detail/detail_enterprise.vue index 73ea4be..af29d76 100644 --- a/pages/detail/detail_enterprise.vue +++ b/pages/detail/detail_enterprise.vue @@ -12,7 +12,7 @@ - 卡号:{{data.serialNumber}} + 窖号:{{data.serialNumber}} {{data.time}} @@ -68,7 +68,7 @@ 总数:{{item.num}}{{item.unitName}} - 卡内剩余:{{item.lnum}}{{item.unitName}} + 窖内剩余:{{item.lnum}}{{item.unitName}} @@ -151,7 +151,7 @@ - 福礼卡编码:{{item.code}} + 亲情窖编码:{{item.code}} 提货密码:{{item.codeKey}} 备注说明:{{item.remarks}} @@ -161,7 +161,7 @@ {{item.goods}} + open-type="share">分享窖 @@ -215,9 +215,9 @@ --> - 卡券数量 + 菜窖数量 - @@ -559,7 +559,8 @@ let _this = this _this.$api.empcardBookingSave(this.data).then((resp) => { bus.$emit('order', "监听回调"); - uni.navigateBack() + // uni.navigateBack() + _this.$refs.nav.clickIcon() }).catch(e => { _this.shortToast(e.msg) @@ -597,6 +598,8 @@ // ① let shareData = JSON.stringify({ + + // 直接绑定 进入详情 params: { code: data.code, codeKey: data.codeKey, @@ -604,6 +607,10 @@ }, functionName: 'bindCard', url: '/pages/detail/detail_affeection?sid=' + data.sid + + // 分享 绑卡 + // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, + // FunctionName:'share! }) // 转码传输 let value = encodeURIComponent(shareData) diff --git a/pages/detail/detail_enterprise2.vue b/pages/detail/detail_enterprise2.vue index bfb4794..be1f7f4 100644 --- a/pages/detail/detail_enterprise2.vue +++ b/pages/detail/detail_enterprise2.vue @@ -12,7 +12,7 @@ - 卡号:{{data.serialNumber}} + 窖号:{{data.serialNumber}} {{data.time}} @@ -64,7 +64,7 @@ 总数:{{item.num}}{{item.unitName}} - 卡内剩余:{{item.lnum}}{{item.unitName}} + 窖内剩余:{{item.lnum}}{{item.unitName}} @@ -147,7 +147,7 @@ - 福礼卡编码:{{item.code}} + 亲情窖编码:{{item.code}} 提货密码:{{item.codeKey}} 备注说明:{{item.remarks}} @@ -157,7 +157,7 @@ style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}} + open-type="share">分享窖 @@ -252,16 +252,33 @@ console.log("data", res.target.dataset) var data = res.target.dataset.info this.shareCard(data.sid) + // ① + let shareData = JSON.stringify({ + params: { + code: data.code, + codeKey: data.codeKey, + customerSid: '' + }, + functionName: 'bindCard', + url: '/pages/detail/detail_affeection?sid=' + data.sid + + // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, + // FunctionName:'share! + }) + // 转码传输 + let value = encodeURIComponent(shareData) + return { title: '汇融惠享-云菜窖', - path: '/pages/bind/bind_pickUpCard?code=' + data.code + '&codeKey=' + data.codeKey, + // ② + path: '/pages/login/login?data=' + value, imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 success: function(res) { - console.log('aaaa',"分享成功") + console.log('aaaa', "分享成功") }, fail: function(res) { // 转发失败 - console.log('aaaa',"用户点击了取消") + console.log('aaaa', "用户点击了取消") } } }, diff --git a/pages/detail/detail_family.vue b/pages/detail/detail_family.vue index d877524..378c48b 100644 --- a/pages/detail/detail_family.vue +++ b/pages/detail/detail_family.vue @@ -12,7 +12,7 @@ - 卡号:{{data.serialNumber}} + 窖号:{{data.serialNumber}} {{data.time}} @@ -151,7 +151,7 @@ - 亲情卡编码:{{item.code}} + 亲情窖编码:{{item.code}} 提货密码:{{item.codeKey}} 备注说明:{{item.remarks}} @@ -160,7 +160,7 @@ - {{item.goods}} + open-type="share">分享窖 @@ -286,9 +286,9 @@ " bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll"> - 卡券数量 + 菜窖数量 - @@ -591,9 +591,26 @@ this.colseDialog2() console.log("data", res.target.dataset) var data = res.target.dataset.info this.shareCard(data.sid) + // ① + let shareData = JSON.stringify({ + params: { + code: data.code, + codeKey: data.codeKey, + customerSid: '' + }, + functionName: 'bindCard', + url: '/pages/detail/detail_affeection?sid=' + data.sid + + // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, + // FunctionName:'share! + }) + // 转码传输 + let value = encodeURIComponent(shareData) + return { title: '汇融惠享-云菜窖', - path: '/pages/bind/bind_pickUpCard?code=' + data.code + '&codeKey=' + data.codeKey, + // ② + path: '/pages/login/login?data=' + value, imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 success: function(res) { console.log('aaaa', "分享成功") diff --git a/pages/detail/detail_family2.vue b/pages/detail/detail_family2.vue index 730ddc5..91c4527 100644 --- a/pages/detail/detail_family2.vue +++ b/pages/detail/detail_family2.vue @@ -12,7 +12,7 @@ - 卡号:{{data.serialNumber}} + 窖号:{{data.serialNumber}} {{data.time}} @@ -150,7 +150,7 @@ - 亲情卡编码:{{item.code}} + 亲情窖编码:{{item.code}} 提货密码:{{item.codeKey}} 备注说明:{{item.remarks}} @@ -160,7 +160,7 @@ style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goods}} + open-type="share">分享窖 @@ -257,9 +257,26 @@ console.log("data", res.target.dataset) var data = res.target.dataset.info this.shareCard(data.sid) + // ① + let shareData = JSON.stringify({ + params: { + code: data.code, + codeKey: data.codeKey, + customerSid: '' + }, + functionName: 'bindCard', + url: '/pages/detail/detail_affeection?sid=' + data.sid + + // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, + // FunctionName:'share! + }) + // 转码传输 + let value = encodeURIComponent(shareData) + return { title: '汇融惠享-云菜窖', - path: '/pages/bind/bind_pickUpCard?code=' + data.code + '&codeKey=' + data.codeKey, + // ② + path: '/pages/login/login?data=' + value, imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 success: function(res) { console.log('aaaa', "分享成功") diff --git a/pages/home/cloudCard.vue b/pages/home/cloudCard.vue index 14795e5..e2dcd7a 100644 --- a/pages/home/cloudCard.vue +++ b/pages/home/cloudCard.vue @@ -19,7 +19,7 @@ + margin:5px 20px 0px 20px;padding-bottom: 10px; border-bottom: 2px #EFEFEF solid;"> @@ -66,7 +66,7 @@ - ¥{{item.price}} + ¥{{this.convertPrice(item.price) }} diff --git a/pages/home/pickUpCard.vue b/pages/home/pickUpCard.vue index 990d23a..7cf3f99 100644 --- a/pages/home/pickUpCard.vue +++ b/pages/home/pickUpCard.vue @@ -14,7 +14,10 @@ style="height: 45px;line-height: 45px;font-size: 17px;font-weight: 600; text-align: center;color: #FF7100;margin-left: 11px;">绑定新卡 --> - 绑定新卡 + + + @@ -54,7 +57,7 @@ 卡号:{{item.serialNumber}} + style="font-size: 13px;color: #333;width: calc(100vw - 190px);">窖号:{{item.serialNumber}} {{item.time}} @@ -76,18 +79,17 @@ - - 东北大白菜东北大白菜东北大白菜东北大白菜 + {{child.goodsName}} - 剩余4份/共10份 - 5斤/份 + {{child.content}} + {{child.remarks}} - @@ -123,7 +125,7 @@ 卡号:{{item.serialNumber}} + style="font-size: 13px;color: #333;width: calc(100vw - 190px);">窖号:{{item.serialNumber}} {{item.time}} @@ -179,7 +181,7 @@ 卡号:{{item.serialNumber}} + style="font-size: 13px;color: #333;width: calc(100vw - 190px);">窖号:{{item.serialNumber}} {{item.time}} @@ -373,52 +375,79 @@ .item { width: calc(100% - 5px); - border-radius: 8px; - background-color: rgba(255, 251, 248, 1); + background-color: rgba(255, 248, 248, 1); color: rgba(16, 16, 16, 1); - box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15); + box-shadow: 2px 3px 6px 0px rgba(255, 226, 222, 0.62); } .item2 { /* 加载背景图 */ - background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); + /* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); */ /* 让背景图基于容器大小伸缩 */ - background-size: 100% 100%; + /* background-size: 100% 100%; */ + /* width: calc(100% - 5px); */ + width: calc(100% - 5px); + border-radius: 8px; + background-color: rgba(255, 251, 248, 1); + color: rgba(16, 16, 16, 1); + box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15); } .item3 { /* 加载背景图 */ - background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_affection.png); + /* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_affection.png); */ /* 让背景图基于容器大小伸缩 */ - background-size: 100% 100%; - width: calc(100% - 5px); + /* background-size: 100% 100%; */ + /* width: calc(100% - 5px); */ + + border-radius: 8px; + background-color: rgba(255, 254, 249, 1); + color: rgba(16, 16, 16, 1); + box-shadow: 2px 3px 6px 0px rgba(224, 218, 168, 0.24); } .item4 { /* 加载背景图 */ - background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); + /* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); */ /* 让背景图基于容器大小伸缩 */ - background-size: 100% 100%; - width: calc(100% - 5px); + /* background-size: 100% 100%; */ + /* width: calc(100% - 5px); */ + width: calc(100% - 5px); + border-radius: 8px; + background-color: rgba(255, 251, 248, 1); + color: rgba(16, 16, 16, 1); + box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15); } .item5 { /* 加载背景图 */ - background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_enterprise.png); + /* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_enterprise.png); */ /* 让背景图基于容器大小伸缩 */ - background-size: 100% 100%; + /* background-size: 100% 100%; */ + /* width: calc(100% - 5px); */ + width: calc(100% - 5px); + border-radius: 8px; + background-color: rgba(255, 251, 248, 1); + color: rgba(16, 16, 16, 1); + box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15); } .item6 { /* 加载背景图 */ - background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); + /* background-image: url(https://supervise.yxtsoft.com/lpk/image/home_itemBj_lose.png); */ /* 让背景图基于容器大小伸缩 */ - background-size: 100% 100%; + /* background-size: 100% 100%; */ + /* width: calc(100% - 5px); */ + width: calc(100% - 5px); + border-radius: 8px; + background-color: rgba(255, 251, 248, 1); + color: rgba(16, 16, 16, 1); + box-shadow: 2px 3px 6px 0px rgba(238, 117, 47, 0.15); } diff --git a/pages/home/recordList.vue b/pages/home/recordList.vue index 2032f6f..375d565 100644 --- a/pages/home/recordList.vue +++ b/pages/home/recordList.vue @@ -80,7 +80,7 @@ {{item.bagName}} - 卡    号: + 窖    号: {{item.serialNumber}} @@ -134,7 +134,7 @@ {{item.bagName}} - 卡    号: + 窖    号: {{item.serialNumber}} diff --git a/pages/home/recordList2.vue b/pages/home/recordList2.vue index ec0ffe0..2d01a91 100644 --- a/pages/home/recordList2.vue +++ b/pages/home/recordList2.vue @@ -25,7 +25,7 @@ {{item.bagName}} - 卡    号: + 窖    号: {{item.serialNumber}} @@ -81,7 +81,7 @@ {{item.bagName}} - 卡    号: + 窖    号: {{item.serialNumber}} @@ -135,7 +135,7 @@ {{item.bagName}} - 卡    号: + 窖    号: {{item.serialNumber}}