|
|
|
@ -15,7 +15,8 @@ import {
|
|
|
|
start,
|
|
|
|
start,
|
|
|
|
shop,
|
|
|
|
shop,
|
|
|
|
getTincheCoupons,
|
|
|
|
getTincheCoupons,
|
|
|
|
getExcellent
|
|
|
|
getExcellent,
|
|
|
|
|
|
|
|
getTimeOrder
|
|
|
|
} from '../api/api.js'
|
|
|
|
} from '../api/api.js'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
export const storindex = defineStore('storindex', () => {
|
|
|
|
export const storindex = defineStore('storindex', () => {
|
|
|
|
@ -73,15 +74,16 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p.value = 1
|
|
|
|
p.value = 1
|
|
|
|
|
|
|
|
|
|
|
|
const res = await getTimeStamps({
|
|
|
|
const res = await getTimeStamps()
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
// {
|
|
|
|
amount: datas.amount,
|
|
|
|
// phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
goodsId: datas.id,
|
|
|
|
// amount: datas.amount,
|
|
|
|
goodsType: 3, //洗车订单
|
|
|
|
// goodsId: datas.id,
|
|
|
|
networkId: datas.networkId,
|
|
|
|
// goodsType: 3, //洗车订单
|
|
|
|
payType: 1, //微信支付,
|
|
|
|
// networkId: datas.networkId,
|
|
|
|
deviceId: uni.getStorageSync('mid')
|
|
|
|
// payType: 1, //微信支付,
|
|
|
|
})
|
|
|
|
// deviceId: uni.getStorageSync('mid')
|
|
|
|
|
|
|
|
// }
|
|
|
|
orderid.value = res
|
|
|
|
orderid.value = res
|
|
|
|
if (res === "机器正在工作") {
|
|
|
|
if (res === "机器正在工作") {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
@ -143,6 +145,16 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
'msg',
|
|
|
|
'msg',
|
|
|
|
descriptions
|
|
|
|
descriptions
|
|
|
|
.value)
|
|
|
|
.value)
|
|
|
|
|
|
|
|
const orderRes = await getTimeOrder({
|
|
|
|
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
|
|
|
|
amount: datas.amount,
|
|
|
|
|
|
|
|
goodsId: datas.id,
|
|
|
|
|
|
|
|
goodsType: 3, //洗车订单
|
|
|
|
|
|
|
|
networkId: datas.networkId,
|
|
|
|
|
|
|
|
payType: 1, //微信支付,
|
|
|
|
|
|
|
|
deviceId: uni.getStorageSync('mid'),
|
|
|
|
|
|
|
|
orderId:orderid.value
|
|
|
|
|
|
|
|
})
|
|
|
|
uni.redirectTo({
|
|
|
|
uni.redirectTo({
|
|
|
|
url: '/pages/complete/complete'
|
|
|
|
url: '/pages/complete/complete'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -239,15 +251,25 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
const res = await getTimeStamps({
|
|
|
|
const res = await getTimeStamps()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
|
|
|
|
// amount: datas.amount,
|
|
|
|
|
|
|
|
// goodsId: datas.id,
|
|
|
|
|
|
|
|
// goodsType: 1, //充值套餐类型
|
|
|
|
|
|
|
|
// networkId: datas.networkId,
|
|
|
|
|
|
|
|
// payType: 1 //微信支付
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
orderid.value = res
|
|
|
|
|
|
|
|
const orderRes = await getTimeOrder({
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
amount: datas.amount,
|
|
|
|
amount: datas.amount,
|
|
|
|
goodsId: datas.id,
|
|
|
|
goodsId: datas.id,
|
|
|
|
goodsType: 1, //充值套餐类型
|
|
|
|
goodsType: 1, //充值套餐类型
|
|
|
|
networkId: datas.networkId,
|
|
|
|
networkId: datas.networkId,
|
|
|
|
payType: 1 //微信支付
|
|
|
|
payType: 1 ,//微信支付
|
|
|
|
|
|
|
|
orderId:orderid.value
|
|
|
|
})
|
|
|
|
})
|
|
|
|
orderid.value = res
|
|
|
|
|
|
|
|
const res1 = await getWxPlay({
|
|
|
|
const res1 = await getWxPlay({
|
|
|
|
appId: appid,
|
|
|
|
appId: appid,
|
|
|
|
phone: uni.getStorageSync('phoneNumber'),
|
|
|
|
phone: uni.getStorageSync('phoneNumber'),
|
|
|
|
@ -324,15 +346,25 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
const res = await getTimeStamps({
|
|
|
|
const res = await getTimeStamps()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
|
|
|
|
// amount: datas.amount,
|
|
|
|
|
|
|
|
// goodsId: datas.id,
|
|
|
|
|
|
|
|
// goodsType: 2, //次卡套餐
|
|
|
|
|
|
|
|
// networkId: datas.networkId,
|
|
|
|
|
|
|
|
// payType: 1 //微信支付
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
orderid.value = res
|
|
|
|
|
|
|
|
const orderRes = await getTimeOrder({
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
amount: datas.amount,
|
|
|
|
amount: datas.amount,
|
|
|
|
goodsId: datas.id,
|
|
|
|
goodsId: datas.id,
|
|
|
|
goodsType: 2, //次卡套餐
|
|
|
|
goodsType: 2, //次卡套餐
|
|
|
|
networkId: datas.networkId,
|
|
|
|
networkId: datas.networkId,
|
|
|
|
payType: 1 //微信支付
|
|
|
|
payType: 1 ,//微信支付
|
|
|
|
|
|
|
|
orderId:orderid.value
|
|
|
|
})
|
|
|
|
})
|
|
|
|
orderid.value = res
|
|
|
|
|
|
|
|
const res1 = await getWxPlay({
|
|
|
|
const res1 = await getWxPlay({
|
|
|
|
appId: appid,
|
|
|
|
appId: appid,
|
|
|
|
phone: uni.getStorageSync('phoneNumber'),
|
|
|
|
phone: uni.getStorageSync('phoneNumber'),
|
|
|
|
@ -389,15 +421,16 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p.value = 1
|
|
|
|
p.value = 1
|
|
|
|
|
|
|
|
|
|
|
|
const res = await getTimeStamps({
|
|
|
|
const res = await getTimeStamps()
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
// {
|
|
|
|
amount: datas.amount,
|
|
|
|
// phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
goodsId: datas.id,
|
|
|
|
// amount: datas.amount,
|
|
|
|
goodsType: 3, //洗车订单
|
|
|
|
// goodsId: datas.id,
|
|
|
|
networkId: datas.networkId,
|
|
|
|
// goodsType: 3, //洗车订单
|
|
|
|
payType: 2, //余额支付
|
|
|
|
// networkId: datas.networkId,
|
|
|
|
deviceId: uni.getStorageSync('mid')
|
|
|
|
// payType: 2, //余额支付
|
|
|
|
})
|
|
|
|
// deviceId: uni.getStorageSync('mid')
|
|
|
|
|
|
|
|
// }
|
|
|
|
orderid.value = res
|
|
|
|
orderid.value = res
|
|
|
|
if (res === "机器正在工作") {
|
|
|
|
if (res === "机器正在工作") {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
@ -428,9 +461,21 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
p.value = 0
|
|
|
|
p.value = 0
|
|
|
|
uni.setStorageSync('orderid', orderid.value)
|
|
|
|
uni.setStorageSync('orderid', orderid.value)
|
|
|
|
uni.setStorageSync('msg', descriptions.value)
|
|
|
|
uni.setStorageSync('msg', descriptions.value)
|
|
|
|
|
|
|
|
const orderRes = await getTimeOrder({
|
|
|
|
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
|
|
|
|
amount: datas.amount,
|
|
|
|
|
|
|
|
goodsId: datas.id,
|
|
|
|
|
|
|
|
goodsType: 3, //洗车订单
|
|
|
|
|
|
|
|
networkId: datas.networkId,
|
|
|
|
|
|
|
|
payType: 2, //余额支付
|
|
|
|
|
|
|
|
deviceId: uni.getStorageSync('mid'),
|
|
|
|
|
|
|
|
orderId:orderid.value
|
|
|
|
|
|
|
|
})
|
|
|
|
uni.redirectTo({
|
|
|
|
uni.redirectTo({
|
|
|
|
url: '/pages/complete/complete'
|
|
|
|
url: '/pages/complete/complete'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(orderRes.value)
|
|
|
|
const qaq = await getTincheCoupons({
|
|
|
|
const qaq = await getTincheCoupons({
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
oderId: orderid.value
|
|
|
|
oderId: orderid.value
|
|
|
|
@ -477,15 +522,16 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p.value = 1
|
|
|
|
p.value = 1
|
|
|
|
const res = await getTimeStamps({
|
|
|
|
const res = await getTimeStamps()
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
// {
|
|
|
|
amount: 0,
|
|
|
|
// phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
goodsId: datas.id,
|
|
|
|
// amount: 0,
|
|
|
|
goodsType: 3, //洗车订单
|
|
|
|
// goodsId: datas.id,
|
|
|
|
networkId: uni.getStorageSync('netWordId'),
|
|
|
|
// goodsType: 3, //洗车订单
|
|
|
|
payType: 3, //次卡支付
|
|
|
|
// networkId: uni.getStorageSync('netWordId'),
|
|
|
|
deviceId: uni.getStorageSync('mid')
|
|
|
|
// payType: 3, //次卡支付
|
|
|
|
})
|
|
|
|
// deviceId: uni.getStorageSync('mid')
|
|
|
|
|
|
|
|
// }
|
|
|
|
orderid.value = res
|
|
|
|
orderid.value = res
|
|
|
|
if (res === "机器正在工作") {
|
|
|
|
if (res === "机器正在工作") {
|
|
|
|
uni.showToast({
|
|
|
|
uni.showToast({
|
|
|
|
@ -514,6 +560,16 @@ export const storindex = defineStore('storindex', () => {
|
|
|
|
p.value = 0
|
|
|
|
p.value = 0
|
|
|
|
uni.setStorageSync('orderid', orderid.value)
|
|
|
|
uni.setStorageSync('orderid', orderid.value)
|
|
|
|
uni.setStorageSync('msg', '次卡')
|
|
|
|
uni.setStorageSync('msg', '次卡')
|
|
|
|
|
|
|
|
const orderRes = await getTimeOrder({
|
|
|
|
|
|
|
|
phoneNumber: uni.getStorageSync('phoneNumber'),
|
|
|
|
|
|
|
|
amount: 0,
|
|
|
|
|
|
|
|
goodsId: datas.id,
|
|
|
|
|
|
|
|
goodsType: 3, //洗车订单
|
|
|
|
|
|
|
|
networkId: uni.getStorageSync('netWordId'),
|
|
|
|
|
|
|
|
payType: 3, //次卡支付
|
|
|
|
|
|
|
|
deviceId: uni.getStorageSync('mid'),
|
|
|
|
|
|
|
|
orderId:orderid.value
|
|
|
|
|
|
|
|
})
|
|
|
|
uni.redirectTo({
|
|
|
|
uni.redirectTo({
|
|
|
|
url: '/pages/complete/complete'
|
|
|
|
url: '/pages/complete/complete'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|