diff --git a/common/baseurl.js b/common/baseurl.js index 3fdf07b..a16aa0d 100644 --- a/common/baseurl.js +++ b/common/baseurl.js @@ -4,7 +4,8 @@ //基础地址 // export const BASE_URL = 'https://h5.zhenpin.yhd.la/' // export const BASE_URL = 'https://h3.zhenpin.yhd.la/' -export const BASE_URL = 'https://h5.zhenpin.yhd.la/' +// export const BASE_URL = 'https://h5.zhenpin.yhd.la/' +export const BASE_URL = 'https://v3.zhenpin.yhd.la/zltwashV2/' export const BASE_URLS = 'http://47.97.35.139:19260/' export const BASE_URLSS = 'http://47.97.35.139:19270/' //微信appid diff --git a/pages/implement/implement.vue b/pages/implement/implement.vue index c1fbf5f..9064645 100644 --- a/pages/implement/implement.vue +++ b/pages/implement/implement.vue @@ -109,7 +109,7 @@ ref,onMounted } from 'vue' import { - onLoad,onReady + onLoad,onReady,onShow } from "@dcloudio/uni-app" import { rechagePlay @@ -148,6 +148,7 @@ const payIndexs = ref(0) onLoad((options) => { console.log(options); + uni.setStorageSync('netWordId',options.id) r.getInfoaApi(options.id) if(uni.getStorageSync('ciPly')==='次卡'){ headerIndex.value=2 @@ -156,6 +157,9 @@ uni.setStorageSync('ciPly','') } }) + onShow(()=>{ + s.upPay() + }) const remo = () => { headerIndex.value = 1 } @@ -221,7 +225,9 @@ } // s.getMiaoshu(infos.value[yuIndex.value]) onMounted(()=>{ - yuChecks(0) + setTimeout(()=>{ + yuChecks(0) + },1000) console.log("触发"); }) diff --git a/pages/my/my.vue b/pages/my/my.vue index 95e4f87..68ca8a5 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -239,6 +239,7 @@ } isUser() isPhoneNumber() + console.log("你的头像链接---------------:"+uni.getStorageSync('wxImg')); }) //检查登录状态 const isUser = () => { diff --git a/pages/myIntegral/myIntegral.vue b/pages/myIntegral/myIntegral.vue index 6adc450..27d338d 100644 --- a/pages/myIntegral/myIntegral.vue +++ b/pages/myIntegral/myIntegral.vue @@ -50,6 +50,13 @@ +{{item.updatePoints}} + + + + 暂无数据 + + {{item.commodityName}} @@ -59,6 +66,13 @@ -{{item.updatePoints}} + + + + 暂无数据 + + diff --git a/pages/orderForm/orderForm.vue b/pages/orderForm/orderForm.vue index e483366..5e1862b 100644 --- a/pages/orderForm/orderForm.vue +++ b/pages/orderForm/orderForm.vue @@ -4,11 +4,13 @@ + {{item}} + @@ -17,8 +19,9 @@ 订单号:{{item.orderId}} 进行中 已完成 - 已退款 + 退款中 未支付 + 已退款 @@ -52,6 +55,9 @@ + + + + + + + + + + + + 暂无数据 + + @@ -312,9 +365,10 @@ const o = order() const { orders, - total + total, + currentBtn } = storeToRefs(o) - const tag = ref(['全部', '进行中', '已完成', '已退款', '未支付']) + const tag = ref(['全部', '进行中', '已完成','退款中', '未支付','已退款']) const demos = ref([]) const titleMsg = ref('是否结束洗车?') const titles = ref('洗车订单') @@ -357,12 +411,18 @@ num: 2, Maxs: 0 }) - } else if (tag.value[tagIndex.value] === '已退款') { + } else if (tag.value[tagIndex.value] === '退款中') { orders.value=[] o.getOrders({ num: 3, Maxs: 0 - }) + }) + } else if(tag.value[tagIndex.value] === '已退款'){ + orders.value=[] + o.getOrders({ + num: 4, + Maxs: 0 + }) } else { orders.value=[] o.getOrders({ @@ -396,17 +456,6 @@ const onScroll = (e) => { console.log(e.target.scrollHeight); console.log(e); - // if(e.target.scrollHeight/2<=e.target.scrollTop&&tag.value[tagIndex.value]==='全部'){ - // o.getOrders('') - // }else if(e.target.scrollHeight/2<=e.target.scrollTop&&tag.value[tagIndex.value]==='进行中'){ - // o.getOrders(1) - // }else if(e.target.scrollHeight/2<=e.target.scrollTop&&tag.value[tagIndex.value]==='已完成'){ - // o.getOrders(2) - // }else if(e.target.scrollHeight/2<=e.target.scrollTop&&tag.value[tagIndex.value]==='已退款'){ - // o.getOrders(3) - // }else { - // o.getOrders(0) - // } if (tag.value[tagIndex.value] === '全部') { o.getOrders({ num: '', @@ -422,12 +471,18 @@ num: 2, Maxs: total.value }) - } else if (tag.value[tagIndex.value] === '已退款') { + } else if (tag.value[tagIndex.value] === '退款中') { o.getOrders({ num: 3, Maxs: total.value }) - } else { + } else if(tag.value[tagIndex.value] === '已退款'){ + orders.value=[] + o.getOrders({ + num: 4, + Maxs: 0 + }) + }else { o.getOrders({ num: 0, Maxs: total.value diff --git a/pages/secondaryCard/secondaryCard.vue b/pages/secondaryCard/secondaryCard.vue index 35ef193..e46838b 100644 --- a/pages/secondaryCard/secondaryCard.vue +++ b/pages/secondaryCard/secondaryCard.vue @@ -96,6 +96,24 @@ + + + + 温馨提示 + + + 确定开始洗车? + + + + 确定 + + + 取消 + + + + @@ -345,4 +371,81 @@ } } } + .queding { + width: 100%; + height: 100%; + position: absolute; + z-index: 100; + background-color: rgba(0, 0, 0, 0.7); + + .content { + position: absolute; + width: 630rpx; + height: 350rpx; + background-color: white; + border-radius: 20rpx 20rpx 20rpx 20rpx; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + + .titles { + width: 100%; + height: 44rpx; + font-weight: 600; + font-size: 32rpx; + color: black; + line-height: 44rpx; + text-align: center; + font-style: normal; + margin-top: 58rpx; + } + + .hear { + width: 100%; + height: 44rpx; + line-height: 44rpx; + text-align: center; + font-size: 28rpx; + box-sizing: border-box; + // background-color: saddlebrown; + margin-top: 32rpx + } + + .queding-bottom { + width: 100%; + height: 108rpx; + // background-color: red; + // position: absolute; + // bottom: 22rpx; + margin-top: 62rpx; + display: flex; + justify-content: center; + border-top: 1rpx solid #ccc; + + .queding-bottom-left { + width: 50%; + height: 108rpx; + text-align: center; + line-height: 108rpx; + // background-color: #70b6f2; + border-left: 1rpx solid #ccc; + color: #70b6f2; + letter-spacing: 5rpx; + // border-radius: 15rpx 15rpx 15rpx 15rpx; + } + + .queding-bottom-right { + width: 50%; + height: 108rpx; + text-align: center; + line-height: 108rpx; + // background-color: #70b6f2; + // border-radius: 15rpx 15rpx 15rpx 15rpx; + margin-left: 20rpx; + letter-spacing: 5rpx; + } + } + + } + } \ No newline at end of file diff --git a/stor/Coupons/coupons.js b/stor/Coupons/coupons.js index 2214ee4..b1b8936 100644 --- a/stor/Coupons/coupons.js +++ b/stor/Coupons/coupons.js @@ -175,7 +175,7 @@ export const coupons = defineStore('coupons', () => { }) uni.showToast({ icon:"none", - title:`${qaq.data[0]}` + title:`${qaq.msg}` }) } }) diff --git a/stor/getCard/getCard.js b/stor/getCard/getCard.js index b2b3c2a..85053d9 100644 --- a/stor/getCard/getCard.js +++ b/stor/getCard/getCard.js @@ -5,12 +5,16 @@ import { ref } from 'vue' import { - getCis + getCis,getShopid,getTimeStamps,start,getTincheCoupons, } from '../../api/api.js' export const getCard = defineStore('getCard', () => { const cardData = ref([]) const cardDataInvalidCards = ref([]) const cardDataValidCards=ref([]) + const que = ref(0) + const resDats = ref([]) + const scancode = ref([]) + const id = ref() const getCards = async()=>{ cardData.value= await getCis({phoneNumber:uni.getStorageSync('phoneNumber')}) cardData.value=cardData.value.data @@ -20,9 +24,151 @@ export const getCard = defineStore('getCard', () => { console.log(cardDataInvalidCards.value); console.log(cardDataValidCards.value); } + const quexio = (data)=>{ + que.value=0 + } + //更改弹窗 + + const getQ = (data) => { + q.value = data + navUrl(data) + } + //扫码 + const scanQrcode = (data) => { + // //获取url + resDats.value=data + console.log(resDats.value); + uni.scanCode({ + success: (res) => { + scancode.value = res.result + navUrl(res.result) + }, + fail: (err) => { + console.log(err); + } + }) + } + //截取url + const navUrl = (data) => { + if (data) { + //获取url + const url = decodeURIComponent(data); + let hasQuestionMark = /[\?]/.test(url); + if (hasQuestionMark) { + //以?分割 + const params = url.split('?')[1]; + //以&分割 + // console.log(params); + const paramList = params.split('&'); + let mid = ''; + paramList.forEach(item => { + const keyValue = item.split('='); + if (keyValue[0] === 'mid') { + mid = keyValue[1]; + } + }); + uni.setStorageSync('mid', mid) + console.log(mid); + } else { + const paramse = url.split('/m')[1] + console.log(paramse); + const paramseList = paramse.split('id/')[1] + console.log(paramseList); + const paramseL = paramseList.split('/')[0] + const mid = paramseL + uni.setStorageSync('mid', mid) + console.log(mid); + } + getShopid({ + mid: uni.getStorageSync('mid'), + phone: uni.getStorageSync('phoneNumber') + }).then((res) => { + console.log(res); + console.log(res.data.networkId); + id.value = res.data.networkId + que.value=1 + + }) + + + // const mids = Number(mid) + + } + } + //优惠券使用 + const goStar = ()=>{ + que.value=0 + getTimeStamps({ + phoneNumber: uni.getStorageSync('phoneNumber'), + amount: 0, + goodsId: resDats.value.id, + goodsType: 3, //洗车订单 + networkId:id.value, + payType: 3, // + deviceId: uni.getStorageSync('mid') + }).then(res5=>{ + console.log(res5); + if (res5 === "机器正在工作") { + uni.showToast({ + icon: "none", + title: `${res5}` + }) + + } else{ + start({ + mid: uni.getStorageSync('mid'), + price: 100, + time: 20*60, + description:'次卡', + orderId: res5, + phone: uni.getStorageSync('phoneNumber'), + openId: uni.getStorageSync('openid') + }).then(res6=>{ + if (res6.code == 200 || res6.code == 0) { + uni.showToast({ + icon: 'none', + title: '启动设备成功', + duration: 1000, + success: async(res) => { + + uni.setStorageSync('orderid', res5) + uni.setStorageSync('msg', '次卡') + uni.redirectTo({ + url: '/pages/complete/complete' + }) + const qaq = await getTincheCoupons({ + phoneNumber: uni.getStorageSync('phoneNumber') + }) + uni.showToast({ + icon:"none", + title:`${qaq.msg}` + }) + } + }) + } else { + uni.showToast({ + icon: 'none', + title: `${res6.data.statusText},请在我的页面联系客服解决`, + duration: 1200, + success: (res) => { + + uni.setStorageSync('orderid', orderid.value) + uni.setStorageSync('msg', '拉新券') + } + }) + } + }) + } + }) + } + return { cardDataInvalidCards, cardDataValidCards, - getCards + getCards, + que, + goStar, + scanQrcode, + quexio } }) \ No newline at end of file diff --git a/stor/index.js b/stor/index.js index 7da27a2..0408465 100644 --- a/stor/index.js +++ b/stor/index.js @@ -151,7 +151,7 @@ export const storindex = defineStore('storindex', () => { }) uni.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }) } }) @@ -397,7 +397,7 @@ export const storindex = defineStore('storindex', () => { console.log(qaq); uni.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }) } }) @@ -426,7 +426,7 @@ export const storindex = defineStore('storindex', () => { amount: 0, goodsId: datas.id, goodsType: 3, //洗车订单 - networkId: datas.networkId, + networkId: uni.getStorageSync('netWordId'), payType: 3, //次卡支付 deviceId: uni.getStorageSync('mid') }) @@ -466,7 +466,7 @@ export const storindex = defineStore('storindex', () => { }) uni.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }) } }) @@ -507,6 +507,9 @@ export const storindex = defineStore('storindex', () => { const playleix = (data) => { playl.value = data } + const upPay = ()=>{ + p.value = 0 + } return { wxPlay, wxPlayData, @@ -517,6 +520,7 @@ export const storindex = defineStore('storindex', () => { playleix, playl, yuePlay, - ciPlay + ciPlay, + upPay } }) \ No newline at end of file diff --git a/stor/order/order.js b/stor/order/order.js index c4db67f..2056a97 100644 --- a/stor/order/order.js +++ b/stor/order/order.js @@ -14,6 +14,8 @@ export const order = defineStore('order', () => { const orderid = ref('') const mid = ref('') const current =ref([]) + //控制进行中的按钮为退款失败 + const currentBtn = ref(0) const getOrders = (data) => { if(oNum.value===1){ return @@ -82,6 +84,7 @@ export const order = defineStore('order', () => { getOrders, getClose, total, - getRefundApi + getRefundApi, + currentBtn } }) \ No newline at end of file diff --git a/stor/shop/shop.js b/stor/shop/shop.js index 63e4698..a511d9a 100644 --- a/stor/shop/shop.js +++ b/stor/shop/shop.js @@ -104,19 +104,12 @@ export const shopStor = defineStore('shopStor', () => { phoneNumber: String(car.phoneNumber) }) console.log(shopSucces.value); - if (shopSucces.value.code === 200) { uni.showToast({ icon: "none", - title: `兑换成功` + title: `${shopSucces.value.msg}`, + duration:1000 }) - return - } else { - uni.showToast({ - icon: "none", - title: `兑换失败` - }) - return - } + } return { shop, diff --git a/unpackage/dist/dev/mp-weixin/common/baseurl.js b/unpackage/dist/dev/mp-weixin/common/baseurl.js index fbc524a..9a381e5 100644 --- a/unpackage/dist/dev/mp-weixin/common/baseurl.js +++ b/unpackage/dist/dev/mp-weixin/common/baseurl.js @@ -1,5 +1,5 @@ "use strict"; -const BASE_URL = "https://h5.zhenpin.yhd.la/"; +const BASE_URL = "https://v3.zhenpin.yhd.la/zltwashV2/"; const BASE_URLS = "http://47.97.35.139:19260/"; const BASE_URLSS = "http://47.97.35.139:19270/"; const appid = "wxc5f11d5f96fbd989"; diff --git a/unpackage/dist/dev/mp-weixin/pages/implement/implement.js b/unpackage/dist/dev/mp-weixin/pages/implement/implement.js index 794fc66..ef62e71 100644 --- a/unpackage/dist/dev/mp-weixin/pages/implement/implement.js +++ b/unpackage/dist/dev/mp-weixin/pages/implement/implement.js @@ -30,6 +30,7 @@ const _sfc_main = { const payIndexs = common_vendor.ref(0); common_vendor.onLoad((options) => { console.log(options); + common_vendor.index.setStorageSync("netWordId", options.id); r.getInfoaApi(options.id); if (common_vendor.index.getStorageSync("ciPly") === "次卡") { headerIndex.value = 2; @@ -38,6 +39,9 @@ const _sfc_main = { common_vendor.index.setStorageSync("ciPly", ""); } }); + common_vendor.onShow(() => { + s.upPay(); + }); const remo = () => { headerIndex.value = 1; }; @@ -91,7 +95,9 @@ const _sfc_main = { } }; common_vendor.onMounted(() => { - yuChecks(0); + setTimeout(() => { + yuChecks(0); + }, 1e3); console.log("触发"); }); return (_ctx, _cache) => { diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.js b/unpackage/dist/dev/mp-weixin/pages/my/my.js index 94f087d..cf35735 100644 --- a/unpackage/dist/dev/mp-weixin/pages/my/my.js +++ b/unpackage/dist/dev/mp-weixin/pages/my/my.js @@ -69,6 +69,7 @@ const _sfc_main = { } isUser(); isPhoneNumber(); + console.log("你的头像链接---------------:" + common_vendor.index.getStorageSync("wxImg")); }); const isUser = () => { if (common_vendor.index.getStorageSync("phoneNumber")) { diff --git a/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.js b/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.js index 3c60e1b..305548c 100644 --- a/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.js +++ b/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.js @@ -85,9 +85,11 @@ const _sfc_main = { }; }) } : {}, { - q: demo.value === 1 && common_vendor.unref(shopData).length > 0 + q: demo.value === 0 && common_vendor.unref(shopData).length <= 0 + }, demo.value === 0 && common_vendor.unref(shopData).length <= 0 ? {} : {}, { + r: demo.value === 1 && common_vendor.unref(shopData).length > 0 }, demo.value === 1 && common_vendor.unref(shopData).length > 0 ? { - r: common_vendor.f(common_vendor.unref(shopData)[mingXI.value].pointsList, (item, index, i0) => { + s: common_vendor.f(common_vendor.unref(shopData)[mingXI.value].pointsList, (item, index, i0) => { return { a: common_vendor.t(item.commodityName), b: common_vendor.t(item.orderTime), @@ -96,20 +98,22 @@ const _sfc_main = { }; }) } : {}, { - s: years.value === 1 + t: demo.value === 1 && common_vendor.unref(shopData).length <= 0 + }, demo.value === 1 && common_vendor.unref(shopData).length <= 0 ? {} : {}, { + v: years.value === 1 }, years.value === 1 ? { - t: common_vendor.f(common_vendor.unref(shopData), (item, index, i0) => { + w: common_vendor.f(common_vendor.unref(shopData), (item, index, i0) => { return { a: common_vendor.t(item.date), b: item.id, c: common_vendor.o(($event) => getList(index), item.id) }; }), - v: common_vendor.o(closes) + x: common_vendor.o(closes) } : {}, { - w: explainShow.value === 1 + y: explainShow.value === 1 }, explainShow.value === 1 ? { - x: common_vendor.o(close) + z: common_vendor.o(close) } : {}); }; } diff --git a/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.wxml b/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.wxml index bdb5efa..0a7c58f 100644 --- a/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/myIntegral/myIntegral.wxml @@ -1 +1 @@ -积分明细 积分说明 > 我的总积分 {{c}}{{e}} 积分获取 积分使用 月总使用积分:{{l}} 月总获取积分:{{n}}{{item.a}}{{item.b}} +{{item.c}}{{item.a}}{{item.b}} -{{item.c}} 请选择日期 {{item.a}} \ No newline at end of file +积分明细 积分说明 > 我的总积分 {{c}}{{e}} 积分获取 积分使用 月总使用积分:{{l}} 月总获取积分:{{n}}{{item.a}}{{item.b}} +{{item.c}} 暂无数据 {{item.a}}{{item.b}} -{{item.c}} 暂无数据 请选择日期 {{item.a}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.js b/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.js index b6c99cf..4dbcc0f 100644 --- a/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.js +++ b/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.js @@ -20,9 +20,10 @@ const _sfc_main = { const o = stor_order_order.order(); const { orders, - total + total, + currentBtn } = common_vendor.storeToRefs(o); - const tag = common_vendor.ref(["全部", "进行中", "已完成", "已退款", "未支付"]); + const tag = common_vendor.ref(["全部", "进行中", "已完成", "退款中", "未支付", "已退款"]); common_vendor.ref([]); const titleMsg = common_vendor.ref("是否结束洗车?"); const titles = common_vendor.ref("洗车订单"); @@ -61,12 +62,18 @@ const _sfc_main = { num: 2, Maxs: 0 }); - } else if (tag.value[tagIndex.value] === "已退款") { + } else if (tag.value[tagIndex.value] === "退款中") { orders.value = []; o.getOrders({ num: 3, Maxs: 0 }); + } else if (tag.value[tagIndex.value] === "已退款") { + orders.value = []; + o.getOrders({ + num: 4, + Maxs: 0 + }); } else { orders.value = []; o.getOrders({ @@ -115,11 +122,17 @@ const _sfc_main = { num: 2, Maxs: total.value }); - } else if (tag.value[tagIndex.value] === "已退款") { + } else if (tag.value[tagIndex.value] === "退款中") { o.getOrders({ num: 3, Maxs: total.value }); + } else if (tag.value[tagIndex.value] === "已退款") { + orders.value = []; + o.getOrders({ + num: 4, + Maxs: 0 + }); } else { o.getOrders({ num: 0, @@ -174,35 +187,39 @@ const _sfc_main = { }, item.status === 3 ? {} : {}, { e: item.status === 0 }, item.status === 0 ? {} : {}, { - f: common_vendor.t(item.networkName), - g: item.goodsName != "未查询到该商品" + f: item.status === 4 + }, item.status === 4 ? {} : {}, { + g: common_vendor.t(item.networkName), + h: item.goodsName != "未查询到该商品" }, item.goodsName != "未查询到该商品" ? { - h: common_vendor.t(item.goodsName) + i: common_vendor.t(item.goodsName) } : {}, { - i: item.goodsName === "未查询到该商品" + j: item.goodsName === "未查询到该商品" }, item.goodsName === "未查询到该商品" ? {} : {}, { - j: common_vendor.t(item.orderTime), - k: item.deviceId != null + k: common_vendor.t(item.orderTime), + l: item.deviceId != null }, item.deviceId != null ? { - l: common_vendor.t(item.deviceId ? item.deviceId : "") + m: common_vendor.t(item.deviceId ? item.deviceId : "") } : {}, { - m: common_vendor.t(item.amount), - n: item.status != 0 + n: common_vendor.t(item.amount), + o: item.status != 0 }, item.status != 0 ? { - o: common_vendor.t(item.amount) + p: common_vendor.t(item.amount) } : {}, { - p: item.status === 0 + q: item.status === 0 }, item.status === 0 ? {} : {}, { - q: item.status === 1 + r: item.status === 1 }, item.status === 1 ? { - r: common_vendor.o(($event) => goOks(index), item.id) + s: common_vendor.o(($event) => goOks(index), item.id) } : {}, { - s: item.status === 2 + t: item.status === 2 }, item.status === 2 ? {} : {}, { - t: item.status === 3 + v: item.status === 3 }, item.status === 3 ? {} : {}, { - v: common_vendor.o(($event) => goComplete(index), item.id), - w: item.id + w: item.status === 4 + }, item.status === 4 ? {} : {}, { + x: common_vendor.o(($event) => goComplete(index), item.id), + y: item.id }); }) } : {}, { @@ -339,28 +356,63 @@ const _sfc_main = { } : {}, { q: tagIndex.value === 4 && common_vendor.unref(orders).length <= 0 }, tagIndex.value === 4 && common_vendor.unref(orders).length <= 0 ? {} : {}, { - r: common_vendor.o(onScroll), - s: shibai.value === 1 + r: tagIndex.value === 5 && common_vendor.unref(orders).length > 0 + }, tagIndex.value === 5 && common_vendor.unref(orders).length > 0 ? { + s: common_vendor.f(common_vendor.unref(orders), (item, index, i0) => { + return common_vendor.e({ + a: common_vendor.t(item.orderId), + b: item.status === 4 + }, item.status === 4 ? {} : {}, { + c: common_vendor.t(item.networkName), + d: item.goodsName != "未查询到该商品" + }, item.goodsName != "未查询到该商品" ? { + e: common_vendor.t(item.goodsName) + } : {}, { + f: item.goodsName === "未查询到该商品" + }, item.goodsName === "未查询到该商品" ? {} : {}, { + g: common_vendor.t(item.orderTime), + h: item.deviceId != null + }, item.deviceId != null ? { + i: common_vendor.t(item.deviceId ? item.deviceId : "") + } : {}, { + j: common_vendor.t(item.amount), + k: item.status != 0 + }, item.status != 0 ? { + l: common_vendor.t(item.amount) + } : {}, { + m: item.status === 0 + }, item.status === 0 ? {} : {}, { + n: item.status === 4 + }, item.status === 4 ? {} : {}, { + o: common_vendor.o(($event) => goComplete(index), item.id), + p: item.id + }); + }) + } : {}, { + t: tagIndex.value === 5 && common_vendor.unref(orders).length <= 0 + }, tagIndex.value === 5 && common_vendor.unref(orders).length <= 0 ? {} : {}, { + v: common_vendor.o(onScroll), + w: shibai.value === 1 }, shibai.value === 1 ? { - t: common_vendor.o(closeShibai) + x: common_vendor.o(closeShibai) } : {}, { - v: hujiao.value === 1 + y: hujiao.value === 1 }, hujiao.value === 1 ? { - w: common_vendor.o(($event) => hujiao.value = 0), - x: common_vendor.o(dianhua) + z: common_vendor.o(($event) => hujiao.value = 0), + A: common_vendor.o(dianhua) } : {}, { - y: moneyRefund.value === 0 + B: moneyRefund.value === 0 }, moneyRefund.value === 0 ? { - z: inputBoxVlaue.value, - A: common_vendor.o(($event) => inputBoxVlaue.value = $event.detail.value), - B: common_vendor.o(($event) => moneyRefund.value = 1), - C: common_vendor.o(getMoneyRefund) + C: inputBoxVlaue.value, + D: common_vendor.o(($event) => inputBoxVlaue.value = $event.detail.value), + E: common_vendor.o(($event) => moneyRefund.value = 1), + F: common_vendor.o(getMoneyRefund) } : {}, { - D: ccc.value === 1 + G: ccc.value === 1 }, ccc.value === 1 ? { - E: common_vendor.o(cloSe), - F: common_vendor.o(oks), - G: common_vendor.p({ + H: common_vendor.o(cloSe), + I: common_vendor.o(oks), + J: common_vendor.p({ titleMsg: titleMsg.value }) } : {}); diff --git a/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.wxml b/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.wxml index d12b30d..6123ead 100644 --- a/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/orderForm/orderForm.wxml @@ -1 +1 @@ -{{item.a}}订单号:{{item.a}} 进行中已完成已退款未支付{{item.f}}{{item.h}}X1 拉新券X1{{item.j}}{{item.l}}原价¥ {{item.m}} 实付款¥{{item.o}}0 申请退款 暂无数据 订单号:{{item.b}} 进行中{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.l}} 申请退款 暂无数据 订单号:{{item.b}}已完成{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.l}} 暂无数据 订单号:{{item.b}}已退款{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.l}} 暂无数据 订单号:{{item.b}}未支付{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.m}}0 暂无数据 失败原因很抱歉,由于您的信息有误,有部分退款失败,请您确认信息并重新提交 客服电话 176-0532-6897 为了保证服务质量,您的通话可能会被录音 请输入退款原因 取消 确定 \ No newline at end of file +{{item.a}}订单号:{{item.a}} 进行中已完成退款中未支付已退款{{item.g}}{{item.i}}X1 拉新券X1{{item.k}}{{item.m}}原价¥ {{item.n}} 实付款¥{{item.p}}0 申请退款 暂无数据 订单号:{{item.b}} 进行中{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.l}} 申请退款 暂无数据 订单号:{{item.b}}已完成{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.l}} 暂无数据 订单号:{{item.b}}退款中{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.l}} 暂无数据 订单号:{{item.b}}未支付{{item.d}}{{item.f}}X1 拉新券X1{{item.h}}{{item.j}}原价¥ {{item.k}} 实付款¥{{item.m}}0 暂无数据 订单号:{{item.a}}已退款{{item.c}}{{item.e}}X1 拉新券X1{{item.g}}{{item.i}}原价¥ {{item.j}} 实付款¥{{item.l}}0 暂无数据 失败原因很抱歉,由于您的信息有误,有部分退款失败,请您确认信息并重新提交 客服电话 176-0532-6897 为了保证服务质量,您的通话可能会被录音 请输入退款原因 取消 确定 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.js b/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.js index d3c3c73..7ce82ac 100644 --- a/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.js +++ b/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.js @@ -13,9 +13,9 @@ if (!Math) { const _sfc_main = { __name: "secondaryCard", setup(__props) { - const h = stor_home_home.home(); + stor_home_home.home(); const c = stor_getCard_getCard.getCard(); - const { cardDataValidCards, cardDataInvalidCards } = common_vendor.storeToRefs(c); + const { cardDataValidCards, cardDataInvalidCards, que } = common_vendor.storeToRefs(c); c.getCards(); const headerindex = common_vendor.ref(1); const titles = common_vendor.ref("洗车次卡"); @@ -28,8 +28,14 @@ const _sfc_main = { headerindex.value = 2; }; common_vendor.ref([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - const goSencd = () => { - h.scanQrcode("次卡"); + const goSencd = (index) => { + c.scanQrcode(cardDataValidCards.value[index]); + }; + const quedingsa = () => { + c.goStar(); + }; + const quedinga = () => { + c.quexio(); }; return (_ctx, _cache) => { return common_vendor.e({ @@ -55,7 +61,7 @@ const _sfc_main = { c: common_vendor.t(item.minute), d: common_vendor.t(item.endTime) }, headerindex.value === 1 ? { - e: common_vendor.o(($event) => goSencd(), item.id) + e: common_vendor.o(($event) => goSencd(index), item.id) } : {}, headerindex.value === 2 ? {} : {}, { f: item.id }); @@ -84,7 +90,12 @@ const _sfc_main = { o: headerindex.value === 1 && !common_vendor.unref(cardDataValidCards) }, headerindex.value === 1 && !common_vendor.unref(cardDataValidCards) ? {} : {}, { p: headerindex.value === 2 && !common_vendor.unref(cardDataInvalidCards) - }, headerindex.value === 2 && !common_vendor.unref(cardDataInvalidCards) ? {} : {}); + }, headerindex.value === 2 && !common_vendor.unref(cardDataInvalidCards) ? {} : {}, { + q: common_vendor.unref(que) === 1 + }, common_vendor.unref(que) === 1 ? { + r: common_vendor.o(quedingsa), + s: common_vendor.o(quedinga) + } : {}); }; } }; diff --git a/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxml b/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxml index c140267..608c5e9 100644 --- a/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxml @@ -1 +1 @@ - 可用次卡 失效次卡 剩余{{item.a}}{{item.b}} 每次上限使用{{item.c}}分钟 有效期至 {{item.d}} 使用 剩余{{item.a}}{{item.b}} 每次上限使用{{item.c}}分钟 已失效,有效期至 {{item.d}} 使用 暂无数据 暂无数据 \ No newline at end of file + 可用次卡 失效次卡 剩余{{item.a}}{{item.b}} 每次上限使用{{item.c}}分钟 有效期至 {{item.d}} 使用 剩余{{item.a}}{{item.b}} 每次上限使用{{item.c}}分钟 已失效,有效期至 {{item.d}} 使用 暂无数据 暂无数据 温馨提示 确定开始洗车? 确定 取消 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxss b/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxss index 626a563..a971c9c 100644 --- a/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/secondaryCard/secondaryCard.wxss @@ -202,4 +202,66 @@ } .secondaryCard .secondaryCard-auto .cardActive { border: 1rpx solid #1a97f7; +} +.queding { + width: 100%; + height: 100%; + position: absolute; + z-index: 100; + background-color: rgba(0, 0, 0, 0.7); +} +.queding .content { + position: absolute; + width: 630rpx; + height: 350rpx; + background-color: white; + border-radius: 20rpx 20rpx 20rpx 20rpx; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.queding .content .titles { + width: 100%; + height: 44rpx; + font-weight: 600; + font-size: 32rpx; + color: black; + line-height: 44rpx; + text-align: center; + font-style: normal; + margin-top: 58rpx; +} +.queding .content .hear { + width: 100%; + height: 44rpx; + line-height: 44rpx; + text-align: center; + font-size: 28rpx; + box-sizing: border-box; + margin-top: 32rpx; +} +.queding .content .queding-bottom { + width: 100%; + height: 108rpx; + margin-top: 62rpx; + display: flex; + justify-content: center; + border-top: 1rpx solid #ccc; +} +.queding .content .queding-bottom .queding-bottom-left { + width: 50%; + height: 108rpx; + text-align: center; + line-height: 108rpx; + border-left: 1rpx solid #ccc; + color: #70b6f2; + letter-spacing: 5rpx; +} +.queding .content .queding-bottom .queding-bottom-right { + width: 50%; + height: 108rpx; + text-align: center; + line-height: 108rpx; + margin-left: 20rpx; + letter-spacing: 5rpx; } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/stor/Coupons/coupons.js b/unpackage/dist/dev/mp-weixin/stor/Coupons/coupons.js index a3a6c3b..32fd6a4 100644 --- a/unpackage/dist/dev/mp-weixin/stor/Coupons/coupons.js +++ b/unpackage/dist/dev/mp-weixin/stor/Coupons/coupons.js @@ -143,7 +143,7 @@ const coupons = common_vendor.defineStore("coupons", () => { }); common_vendor.index.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }); } }); diff --git a/unpackage/dist/dev/mp-weixin/stor/getCard/getCard.js b/unpackage/dist/dev/mp-weixin/stor/getCard/getCard.js index f043252..445c8cf 100644 --- a/unpackage/dist/dev/mp-weixin/stor/getCard/getCard.js +++ b/unpackage/dist/dev/mp-weixin/stor/getCard/getCard.js @@ -5,6 +5,10 @@ const getCard = common_vendor.defineStore("getCard", () => { const cardData = common_vendor.ref([]); const cardDataInvalidCards = common_vendor.ref([]); const cardDataValidCards = common_vendor.ref([]); + const que = common_vendor.ref(0); + const resDats = common_vendor.ref([]); + const scancode = common_vendor.ref([]); + const id = common_vendor.ref(); const getCards = async () => { cardData.value = await api_api.getCis({ phoneNumber: common_vendor.index.getStorageSync("phoneNumber") }); cardData.value = cardData.value.data; @@ -13,10 +17,131 @@ const getCard = common_vendor.defineStore("getCard", () => { console.log(cardDataInvalidCards.value); console.log(cardDataValidCards.value); }; + const quexio = (data) => { + que.value = 0; + }; + const scanQrcode = (data) => { + resDats.value = data; + console.log(resDats.value); + common_vendor.index.scanCode({ + success: (res) => { + scancode.value = res.result; + navUrl(res.result); + }, + fail: (err) => { + console.log(err); + } + }); + }; + const navUrl = (data) => { + if (data) { + const url = decodeURIComponent(data); + let hasQuestionMark = /[\?]/.test(url); + if (hasQuestionMark) { + const params = url.split("?")[1]; + const paramList = params.split("&"); + let mid = ""; + paramList.forEach((item) => { + const keyValue = item.split("="); + if (keyValue[0] === "mid") { + mid = keyValue[1]; + } + }); + common_vendor.index.setStorageSync("mid", mid); + console.log(mid); + } else { + const paramse = url.split("/m")[1]; + console.log(paramse); + const paramseList = paramse.split("id/")[1]; + console.log(paramseList); + const paramseL = paramseList.split("/")[0]; + const mid = paramseL; + common_vendor.index.setStorageSync("mid", mid); + console.log(mid); + } + api_api.getShopid({ + mid: common_vendor.index.getStorageSync("mid"), + phone: common_vendor.index.getStorageSync("phoneNumber") + }).then((res) => { + console.log(res); + console.log(res.data.networkId); + id.value = res.data.networkId; + que.value = 1; + }); + } + }; + const goStar = () => { + que.value = 0; + api_api.getTimeStamps({ + phoneNumber: common_vendor.index.getStorageSync("phoneNumber"), + amount: 0, + goodsId: resDats.value.id, + goodsType: 3, + //洗车订单 + networkId: id.value, + payType: 3, + // + deviceId: common_vendor.index.getStorageSync("mid") + }).then((res5) => { + console.log(res5); + if (res5 === "机器正在工作") { + common_vendor.index.showToast({ + icon: "none", + title: `${res5}` + }); + } else { + api_api.start({ + mid: common_vendor.index.getStorageSync("mid"), + price: 100, + time: 20 * 60, + description: "次卡", + orderId: res5, + phone: common_vendor.index.getStorageSync("phoneNumber"), + openId: common_vendor.index.getStorageSync("openid") + }).then((res6) => { + if (res6.code == 200 || res6.code == 0) { + common_vendor.index.showToast({ + icon: "none", + title: "启动设备成功", + duration: 1e3, + success: async (res) => { + common_vendor.index.setStorageSync("orderid", res5); + common_vendor.index.setStorageSync("msg", "次卡"); + common_vendor.index.redirectTo({ + url: "/pages/complete/complete" + }); + const qaq = await api_api.getTincheCoupons({ + phoneNumber: common_vendor.index.getStorageSync("phoneNumber") + }); + common_vendor.index.showToast({ + icon: "none", + title: `${qaq.msg}` + }); + } + }); + } else { + common_vendor.index.showToast({ + icon: "none", + title: `${res6.data.statusText},请在我的页面联系客服解决`, + duration: 1200, + success: (res) => { + common_vendor.index.setStorageSync("orderid", orderid.value); + common_vendor.index.setStorageSync("msg", "拉新券"); + } + }); + } + }); + } + }); + }; return { cardDataInvalidCards, cardDataValidCards, - getCards + getCards, + que, + goStar, + scanQrcode, + quexio }; }); exports.getCard = getCard; diff --git a/unpackage/dist/dev/mp-weixin/stor/index.js b/unpackage/dist/dev/mp-weixin/stor/index.js index a3b0ade..50ccc25 100644 --- a/unpackage/dist/dev/mp-weixin/stor/index.js +++ b/unpackage/dist/dev/mp-weixin/stor/index.js @@ -112,7 +112,7 @@ const storindex = common_vendor.defineStore("storindex", () => { }); common_vendor.index.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }); } }); @@ -349,7 +349,7 @@ const storindex = common_vendor.defineStore("storindex", () => { console.log(qaq); common_vendor.index.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }); } }); @@ -379,7 +379,7 @@ const storindex = common_vendor.defineStore("storindex", () => { goodsId: datas.id, goodsType: 3, //洗车订单 - networkId: datas.networkId, + networkId: common_vendor.index.getStorageSync("netWordId"), payType: 3, //次卡支付 deviceId: common_vendor.index.getStorageSync("mid") @@ -419,7 +419,7 @@ const storindex = common_vendor.defineStore("storindex", () => { }); common_vendor.index.showToast({ icon: "none", - title: `${qaq.data[0]}` + title: `${qaq.msg}` }); } }); @@ -456,6 +456,9 @@ const storindex = common_vendor.defineStore("storindex", () => { const playleix = (data) => { playl.value = data; }; + const upPay = () => { + p.value = 0; + }; return { wxPlay, wxPlayData, @@ -466,7 +469,8 @@ const storindex = common_vendor.defineStore("storindex", () => { playleix, playl, yuePlay, - ciPlay + ciPlay, + upPay }; }); exports.storindex = storindex; diff --git a/unpackage/dist/dev/mp-weixin/stor/order/order.js b/unpackage/dist/dev/mp-weixin/stor/order/order.js index 3d5d829..53a11e6 100644 --- a/unpackage/dist/dev/mp-weixin/stor/order/order.js +++ b/unpackage/dist/dev/mp-weixin/stor/order/order.js @@ -8,6 +8,7 @@ const order = common_vendor.defineStore("order", () => { common_vendor.ref(""); common_vendor.ref(""); const current = common_vendor.ref([]); + const currentBtn = common_vendor.ref(0); const getOrders = (data) => { if (oNum.value === 1) { return; @@ -69,7 +70,8 @@ const order = common_vendor.defineStore("order", () => { getOrders, getClose, total, - getRefundApi + getRefundApi, + currentBtn }; }); exports.order = order; diff --git a/unpackage/dist/dev/mp-weixin/stor/shop/shop.js b/unpackage/dist/dev/mp-weixin/stor/shop/shop.js index d7daa26..214dce2 100644 --- a/unpackage/dist/dev/mp-weixin/stor/shop/shop.js +++ b/unpackage/dist/dev/mp-weixin/stor/shop/shop.js @@ -62,19 +62,11 @@ const shopStor = common_vendor.defineStore("shopStor", () => { phoneNumber: String(car.phoneNumber) }); console.log(shopSucces.value); - if (shopSucces.value.code === 200) { - common_vendor.index.showToast({ - icon: "none", - title: `兑换成功` - }); - return; - } else { - common_vendor.index.showToast({ - icon: "none", - title: `兑换失败` - }); - return; - } + common_vendor.index.showToast({ + icon: "none", + title: `${shopSucces.value.msg}`, + duration: 1e3 + }); }; return { shop,