更新库存不足提示订单列表增加退款中

main
Frontend-徐志烘 1 year ago
parent bc23bbd765
commit 7fe735a643

@ -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

@ -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("触发");
})
</script>

@ -239,6 +239,7 @@
}
isUser()
isPhoneNumber()
console.log("你的头像链接---------------:"+uni.getStorageSync('wxImg'));
})
//
const isUser = () => {

@ -50,6 +50,13 @@
+{{item.updatePoints}}
</view>
</view>
<view style="width: 100%;height: 500rpx;text-align: center;" v-if="demo===0&&shopData.length<=0">
<img style="width: 480rpx;height: 400rpx;margin-top: 60rpx;margin-left: 50%;transform: translateX(-50%);"
src="https://www.jiubaotongxue.love/image/demo111.png" alt="" />
<view style="width: 100%;height: 50rpx;line-height: 50rpx;text-align: center;">
暂无数据
</view>
</view>
<view class="box-flex" v-if="demo===1&&shopData.length>0" v-for="(item,index) in shopData[mingXI].pointsList" :key="item.id">
<view class="lefts">
<text class="t">{{item.commodityName}}</text>
@ -59,6 +66,13 @@
-{{item.updatePoints}}
</view>
</view>
<view style="width: 100%;height: 500rpx;text-align: center;" v-if="demo===1&&shopData.length<=0">
<img style="width: 480rpx;height: 400rpx;margin-top: 60rpx;margin-left: 50%;transform: translateX(-50%);"
src="https://www.jiubaotongxue.love/image/demo111.png" alt="" />
<view style="width: 100%;height: 50rpx;line-height: 50rpx;text-align: center;">
暂无数据
</view>
</view>
<!-- <view class="ts">
</view> -->

@ -4,11 +4,13 @@
<view class="tops">
</view>
<scroll-view style="width: 100%;height: 84rpx; position: fixed;z-index: 10;" scroll-x="true" >
<view class="orderForm-h">
<view class="txt" v-for="(item,index) in tag" :key="index" @click="tagBtn(index)">
<text class="txt-a" :class='{active:tagIndex===index}'>{{item}}</text>
</view>
</view>
</scroll-view>
<view class="ding-h">
</view>
@ -17,8 +19,9 @@
<view class="orderForm-b-t">
<text>订单号:{{item.orderId}}</text> <text class="blues" v-if="item.status===1"></text>
<text class="greens" v-if="item.status===2"></text>
<text class="greensa" v-if="item.status===3">退</text>
<text class="greensa" v-if="item.status===3">退</text>
<text class="reds" v-if="item.status===0"></text>
<text class="greensa" v-if="item.status===4">退</text>
</view>
<view class="orderForm-b-b">
@ -52,6 +55,9 @@
</view>
<view class="btnst" v-if="item.status===3">
<!-- 退款中 -->
</view>
<view class="btnst" v-if="item.status===4">
<!-- 退款成功 -->
</view>
<!-- <view class="btnsc" v-if="item.status===0" @click="openClose">
@ -157,7 +163,7 @@
<view class="orderForm-b-t">
<text>订单号:{{item.orderId}}</text>
<text class="greensa" v-if="item.status===3">退</text>
<text class="greensa" v-if="item.status===3">退</text>
</view>
@ -242,6 +248,53 @@
暂无数据
</view>
</view>
<view class="order-box" v-for="(item,index) in orders" :key="item.id" v-if="tagIndex===5&&orders.length>0">
<view class="orderForm-b" @click="goComplete(index)">
<view class="orderForm-b-t">
<text>订单号:{{item.orderId}}</text>
<text class="greensa" v-if="item.status===4">退</text>
</view>
<view class="orderForm-b-b">
<img class="b-b-i" src="https://www.jiubaotongxue.love/image/demo91.png" alt="" />
<view class="b-b-r">
<view class="b-b-r-t">
<text class="maxs">{{item.networkName}}</text>
</view>
<view class="b-b-r-b" v-if="item.goodsName!='未查询到该商品'">
{{item.goodsName}}<text>X1</text>
</view>
<view class="b-b-r-b" v-if="item.goodsName==='未查询到该商品'">
拉新券<text>X1</text>
</view>
<view class="b-b-r-b">
{{item.orderTime}}
</view>
<view class="b-b-r-cs" v-if="item.deviceId!=null">
{{item.deviceId ? item.deviceId :''}}
</view>
</view>
</view>
<view class="orderForm-b-m">
<text class="blacsa">原价 <text class="bla">{{item.amount}}</text> </text> <text
class="blu">实付款<text class="blues" v-if="item.status!=0">{{item.amount}}</text><text class="blues" v-if="item.status===0">0</text> </text>
<view class="btnst" v-if="item.status===4">
<!--退款成功-->
</view>
<!-- <view class="btnsc" v-if="item.status===0" @click="openClose">
查看原因
</view> -->
</view>
</view>
</view>
<view class="kong" style="width: 100%;height: 1000rpx;text-align: center;" v-if="tagIndex===5&&orders.length<=0">
<img style="width: 480rpx;height: 400rpx;margin-top: 360rpx;margin-left: 50%;transform: translateX(-50%);"
src="https://www.jiubaotongxue.love/image/demo111.png" alt="" />
<view style="width: 100%;height: 50rpx;line-height: 50rpx;text-align: center;">
暂无数据
</view>
</view>
<view class="ding">
@ -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

@ -96,6 +96,24 @@
</view>
</scroll-view>
</view>
<view class="queding" v-if="que===1">
<view class="content">
<view class="titles">
温馨提示
</view>
<view class="hear">
确定开始洗车?
</view>
<view class="queding-bottom">
<view class="queding-bottom-left" @click="quedingsa">
确定
</view>
<view class="queding-bottom-right" @click="quedinga">
取消
</view>
</view>
</view>
</view>
</template>
<script setup>
@ -109,7 +127,7 @@
} from '../../stor/home/home.js'
const h = home()
const c = getCard()
const {cardDataValidCards,cardDataInvalidCards} = storeToRefs(c)
const {cardDataValidCards,cardDataInvalidCards,que} = storeToRefs(c)
c.getCards()
const headerindex = ref(1)
const titles = ref('洗车次卡')
@ -122,8 +140,16 @@
headerindex.value = 2
}
const demo = ref([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
const goSencd = ()=>{
h.scanQrcode('次卡')
const goSencd = (index)=>{
// h.scanQrcode('')
c.scanQrcode(cardDataValidCards.value[index])
}
const quedingsa = () => {
c.goStar()
}
const quedinga = () => {
c.quexio()
}
</script>
@ -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;
}
}
}
}
</style>

@ -175,7 +175,7 @@ export const coupons = defineStore('coupons', () => {
})
uni.showToast({
icon:"none",
title:`${qaq.data[0]}`
title:`${qaq.msg}`
})
}
})

@ -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
}
})

@ -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
}
})

@ -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
}
})

@ -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,

@ -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";

@ -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) => {

@ -69,6 +69,7 @@ const _sfc_main = {
}
isUser();
isPhoneNumber();
console.log("你的头像链接---------------:" + common_vendor.index.getStorageSync("wxImg"));
});
const isUser = () => {
if (common_vendor.index.getStorageSync("phoneNumber")) {

@ -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)
} : {});
};
}

@ -1 +1 @@
<view class="myIntegral"><view class="top"><image class="left" src="https://www.jiubaotongxue.love/image/nav10.png" alt="" bindtap="{{a}}"/><text class="wen" style="font-size:36rpx">积分明细</text></view><view class="header"><view class="t" bindtap="{{b}}"> 积分说明 > </view><view class="c"> 我的总积分 </view><view class="b">{{c}}</view></view><view wx:if="{{d}}" class="title" bindtap="{{f}}">{{e}}<image class="r" src="https://www.jiubaotongxue.love/image/demo71.png" alt=""/></view><scroll-view class="auto-mingxi" scroll-y="true"><view class="box"><view class="title"><view class="{{['left', g && 'active']}}" bindtap="{{h}}"> 积分获取 </view><view class="{{['right', i && 'active']}}" bindtap="{{j}}"> 积分使用 </view></view><view wx:if="{{k}}" class="title-zong"><view class="z"> 月总使用积分:{{l}}</view></view><view wx:if="{{m}}" class="title-zongs"><view class="z"> 月总获取积分:{{n}}</view></view><view class="shangding"></view><block wx:if="{{o}}"><view wx:for="{{p}}" wx:for-item="item" wx:key="d" class="box-flex"><view class="lefts"><text class="t">{{item.a}}</text><text class="d">{{item.b}}</text></view><view class="rightsa"> +{{item.c}}</view></view></block><block wx:if="{{q}}"><view wx:for="{{r}}" wx:for-item="item" wx:key="d" class="box-flex"><view class="lefts"><text class="t">{{item.a}}</text><text class="d">{{item.b}}</text></view><view class="rights"> -{{item.c}}</view></view></block></view></scroll-view></view><view wx:if="{{s}}" class="windowYear" bindtap="{{v}}"><scroll-view scroll-y="true" class="box"><view class="boxs"><view class="title"> 请选择日期 </view><view wx:for="{{t}}" wx:for-item="item" wx:key="b" class="box-flexs" bindtap="{{item.c}}">{{item.a}}</view></view></scroll-view></view><explain wx:if="{{w}}" bindclose="{{x}}" u-i="789dc7ce-0" bind:__l="__l"></explain>
<view class="myIntegral"><view class="top"><image class="left" src="https://www.jiubaotongxue.love/image/nav10.png" alt="" bindtap="{{a}}"/><text class="wen" style="font-size:36rpx">积分明细</text></view><view class="header"><view class="t" bindtap="{{b}}"> 积分说明 > </view><view class="c"> 我的总积分 </view><view class="b">{{c}}</view></view><view wx:if="{{d}}" class="title" bindtap="{{f}}">{{e}}<image class="r" src="https://www.jiubaotongxue.love/image/demo71.png" alt=""/></view><scroll-view class="auto-mingxi" scroll-y="true"><view class="box"><view class="title"><view class="{{['left', g && 'active']}}" bindtap="{{h}}"> 积分获取 </view><view class="{{['right', i && 'active']}}" bindtap="{{j}}"> 积分使用 </view></view><view wx:if="{{k}}" class="title-zong"><view class="z"> 月总使用积分:{{l}}</view></view><view wx:if="{{m}}" class="title-zongs"><view class="z"> 月总获取积分:{{n}}</view></view><view class="shangding"></view><block wx:if="{{o}}"><view wx:for="{{p}}" wx:for-item="item" wx:key="d" class="box-flex"><view class="lefts"><text class="t">{{item.a}}</text><text class="d">{{item.b}}</text></view><view class="rightsa"> +{{item.c}}</view></view></block><view wx:if="{{q}}" style="width:100%;height:500rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:60rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view><block wx:if="{{r}}"><view wx:for="{{s}}" wx:for-item="item" wx:key="d" class="box-flex"><view class="lefts"><text class="t">{{item.a}}</text><text class="d">{{item.b}}</text></view><view class="rights"> -{{item.c}}</view></view></block><view wx:if="{{t}}" style="width:100%;height:500rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:60rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view></view></scroll-view></view><view wx:if="{{v}}" class="windowYear" bindtap="{{x}}"><scroll-view scroll-y="true" class="box"><view class="boxs"><view class="title"> 请选择日期 </view><view wx:for="{{w}}" wx:for-item="item" wx:key="b" class="box-flexs" bindtap="{{item.c}}">{{item.a}}</view></view></scroll-view></view><explain wx:if="{{y}}" bindclose="{{z}}" u-i="789dc7ce-0" bind:__l="__l"></explain>

@ -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
})
} : {});

File diff suppressed because one or more lines are too long

@ -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)
} : {});
};
}
};

@ -1 +1 @@
<navigation-style wx:if="{{a}}" u-i="7c737da3-0" bind:__l="__l" u-p="{{a}}"></navigation-style><view class="secondaryCard"><view class="tops"></view><view class="secondBright-header"><view class="{{['header-left', c && 'headerActive']}}" bindtap="{{d}}"> 可用次卡 <view wx:if="{{b}}" class="act"></view></view><view class="{{['header-right', f && 'headerActive']}}" bindtap="{{g}}"> 失效次卡 <view wx:if="{{e}}" class="act"></view></view></view><scroll-view class="secondaryCard-auto" scroll-y="true"><block wx:if="{{h}}"><view wx:for="{{i}}" wx:for-item="item" wx:key="f" class="card"><text class="reds">剩余<text class="color-r">{{item.a}}</text>次</text><image class="card-l" src="https://www.jiubaotongxue.love/image/demo73.png" alt=""/><view class="card-c"><view class="t"><text class="w"><text class="blacks">{{item.b}}</text></text></view><view class="c"> 每次上限使用{{item.c}}分钟 </view><view class="d"> 有效期至 {{item.d}}</view></view><view wx:if="{{j}}" class="card-r" bindtap="{{item.e}}"> 使用 </view><view wx:if="{{k}}" class="card-r1"></view></view></block><block wx:if="{{l}}"><view wx:for="{{m}}" wx:for-item="item" wx:key="g" class="card"><text class="reds">剩余<text class="color-r">{{item.a}}</text>次</text><image class="card-l" src="https://www.jiubaotongxue.love/image/demo73.png" alt=""/><view class="card-c"><view class="t"><text class="w"><text class="blacks">{{item.b}}</text></text></view><view class="c"> 每次上限使用{{item.c}}分钟 </view><view class="d"> 已失效,有效期至 {{item.d}}</view></view><view wx:if="{{n}}" class="card-r"> 使用 </view><view wx:if="{{item.e}}" class="card-r1"></view><view wx:if="{{item.f}}" class="card-r3"></view></view></block><view wx:if="{{o}}" class="kong" style="width:100%;height:1000rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:360rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view><view wx:if="{{p}}" class="kong" style="width:100%;height:1000rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:360rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view></scroll-view></view>
<navigation-style wx:if="{{a}}" u-i="7c737da3-0" bind:__l="__l" u-p="{{a}}"></navigation-style><view class="secondaryCard"><view class="tops"></view><view class="secondBright-header"><view class="{{['header-left', c && 'headerActive']}}" bindtap="{{d}}"> 可用次卡 <view wx:if="{{b}}" class="act"></view></view><view class="{{['header-right', f && 'headerActive']}}" bindtap="{{g}}"> 失效次卡 <view wx:if="{{e}}" class="act"></view></view></view><scroll-view class="secondaryCard-auto" scroll-y="true"><block wx:if="{{h}}"><view wx:for="{{i}}" wx:for-item="item" wx:key="f" class="card"><text class="reds">剩余<text class="color-r">{{item.a}}</text>次</text><image class="card-l" src="https://www.jiubaotongxue.love/image/demo73.png" alt=""/><view class="card-c"><view class="t"><text class="w"><text class="blacks">{{item.b}}</text></text></view><view class="c"> 每次上限使用{{item.c}}分钟 </view><view class="d"> 有效期至 {{item.d}}</view></view><view wx:if="{{j}}" class="card-r" bindtap="{{item.e}}"> 使用 </view><view wx:if="{{k}}" class="card-r1"></view></view></block><block wx:if="{{l}}"><view wx:for="{{m}}" wx:for-item="item" wx:key="g" class="card"><text class="reds">剩余<text class="color-r">{{item.a}}</text>次</text><image class="card-l" src="https://www.jiubaotongxue.love/image/demo73.png" alt=""/><view class="card-c"><view class="t"><text class="w"><text class="blacks">{{item.b}}</text></text></view><view class="c"> 每次上限使用{{item.c}}分钟 </view><view class="d"> 已失效,有效期至 {{item.d}}</view></view><view wx:if="{{n}}" class="card-r"> 使用 </view><view wx:if="{{item.e}}" class="card-r1"></view><view wx:if="{{item.f}}" class="card-r3"></view></view></block><view wx:if="{{o}}" class="kong" style="width:100%;height:1000rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:360rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view><view wx:if="{{p}}" class="kong" style="width:100%;height:1000rpx;text-align:center"><image style="width:480rpx;height:400rpx;margin-top:360rpx;margin-left:50%;transform:translateX(-50%)" src="https://www.jiubaotongxue.love/image/demo111.png" alt=""/><view style="width:100%;height:50rpx;line-height:50rpx;text-align:center"> 暂无数据 </view></view></scroll-view></view><view wx:if="{{q}}" class="queding"><view class="content"><view class="titles"> 温馨提示 </view><view class="hear"> 确定开始洗车? </view><view class="queding-bottom"><view class="queding-bottom-left" bindtap="{{r}}"> 确定 </view><view class="queding-bottom-right" bindtap="{{s}}"> 取消 </view></view></view></view>

@ -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;
}

@ -143,7 +143,7 @@ const coupons = common_vendor.defineStore("coupons", () => {
});
common_vendor.index.showToast({
icon: "none",
title: `${qaq.data[0]}`
title: `${qaq.msg}`
});
}
});

@ -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;

@ -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;

@ -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;

@ -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,

Loading…
Cancel
Save