diff --git a/App.vue b/App.vue
index fdda864..cfab5e6 100644
--- a/App.vue
+++ b/App.vue
@@ -36,8 +36,8 @@
const store = useNavbarStore();
await store.initNavbarHeight();
getApp().globalData.websocket=null;
- const cartsStore=useCartsStore()
- cartsStore.isloading=false;
+ // const cartsStore=useCartsStore()
+ // cartsStore.isloading=false;
});
onShow(async () => {
try {
diff --git a/common/api/market/package.js b/common/api/market/package.js
index b0a352f..df9d185 100644
--- a/common/api/market/package.js
+++ b/common/api/market/package.js
@@ -1,54 +1,125 @@
// 引入 request 文件
import request from '@/common/api/request.js'
-import {prveUrl} from './config.js'
+import {
+ prveUrl
+} from './config.js'
+
+const orderPrveUrl = '/order'
+
+let platformType = '';
+let payType = '';
+// #ifdef MP-WEIXIN
+platformType = 'wechat'
+payType = 'wechatPay'
+// #endif
+// #ifdef MP-ALIPAY
+platformType = 'alipay'
+payType = 'aliPay'
+// #endif
export const getPackage = (data) => {
- return request({
- url: prveUrl + '/user/package',
- method: 'get',
- data: data
- })
+ return request({
+ url: prveUrl + '/user/package',
+ method: 'get',
+ data: data
+ })
}
-export const getPackageDetail = (id) => {
- return request({
- url: prveUrl + '/user/package/detail/'+id,
- method: 'get',
- })
+export const getPackageDetail = (data) => {
+ return request({
+ url: prveUrl + '/user/package/detail/' + data.id,
+ method: 'get',
+ data
+ })
}
+export const helpPage = (data) => {
+ return request({
+ url: prveUrl + '/user/package/help/page',
+ method: 'get',
+ data: data
+ })
+}
+
+
+
export const order = (data) => {
- return request({
- url: prveUrl + '/user/package/order',
- method: 'post',
- data: data
- })
+ return request({
+ url: prveUrl + '/user/package/order',
+ method: 'get',
+ data: data
+ })
}
+export const createOrder = (data) => {
+ return request({
+ url: prveUrl + '/user/package/order',
+ method: 'post',
+ data: data
+ })
+}
+
+
+
export const cancel = (data) => {
- return request({
- url: prveUrl + '/user/package/cancel',
- method: 'get',
- data: data
- })
+ return request({
+ url: prveUrl + '/user/package/cancel',
+ method: 'get',
+ data: data
+ })
}
export const help = (data) => {
- return request({
- url: prveUrl + '/user/package/help',
- method: 'get',
- data: data
- })
+ return request({
+ url: prveUrl + '/user/package/help',
+ method: 'get',
+ data: data
+ })
}
export const orderDetail = (data) => {
- return request({
- url: prveUrl + '/user/package/order/detail',
- method: 'get',
- data: data
- })
+ return request({
+ url: prveUrl + '/user/package/order/detail',
+ method: 'get',
+ data: data
+ })
}
+
+export const ppOrderPay = (data) => {
+
+ // #ifdef MP-WEIXIN
+ const openId = uni.cache.get('userInfo').wechatOpenId;
+ // #endif
+ // #ifdef MP-ALIPAY
+ const openId = uni.cache.get('userInfo').alipayOpenId;
+ // #endif
+ return request({
+ url: orderPrveUrl + '/user/ppOrder/pay',
+ method: 'post',
+ data: {
+ platformType,
+ payType,
+ openId,
+ ...data
+ }
+ })
+
+}
+export const applyRefund = (data) => {
+ return request({
+ url: orderPrveUrl + '/user/ppOrder/applyRefund',
+ method: 'post',
+ data: data
+ })
+}
+export const cancelRefund = (data) => {
+ return request({
+ url: orderPrveUrl + '/user/ppOrder/cancelRefund',
+ method: 'post',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/components/look-qrcode/look-qrcode.vue b/components/look-qrcode/look-qrcode.vue
index fbe4b46..61dda9d 100644
--- a/components/look-qrcode/look-qrcode.vue
+++ b/components/look-qrcode/look-qrcode.vue
@@ -7,7 +7,7 @@
{{ qrcode }}
-
+
diff --git a/groupBuying/detail/index.vue b/groupBuying/detail/index.vue
index 89ca670..d6b8355 100644
--- a/groupBuying/detail/index.vue
+++ b/groupBuying/detail/index.vue
@@ -354,6 +354,7 @@
function getDetail() {
Api.recordDetail(query).then(res => {
+ console.log('getDetail',res)
const wareJson = JSON.parse(res.wareJson)
wareJson.wareImgs = wareJson.wareImgs.split(',').filter(v => v)
res.wareJson = wareJson;
diff --git a/groupBuying/goodsDetail/goodsDetail.vue b/groupBuying/goodsDetail/goodsDetail.vue
index 257c167..2203cca 100644
--- a/groupBuying/goodsDetail/goodsDetail.vue
+++ b/groupBuying/goodsDetail/goodsDetail.vue
@@ -14,7 +14,7 @@
¥{{item.originalPrice}}
- 限购{{item.limitBuyNum}}份
+ 限购{{item.limitBuyNum}}份
已团:{{item.groupedNum||0}}
diff --git a/groupBuying/index/index.vue b/groupBuying/index/index.vue
index b4f7d86..b748001 100644
--- a/groupBuying/index/index.vue
+++ b/groupBuying/index/index.vue
@@ -106,7 +106,7 @@
成团时间:
- {{item.groupEndTime}}
+ {{item.groupEndTime}}
剩余成团时间:
@@ -413,13 +413,18 @@
})
})
onShow(getData)
- onLoad(() => {
+ onLoad((opt) => {
+ const shopId=opt.shopId||uni.cache.get('shopId')
+ query.shopId=shopId
+ uni.cache.set('shopId',query.shopId)
+ console.log('opt',opt);
APIusershopInfodetail({
- shopId: uni.cache.get('shopId')
+ shopId: shopId
}).then(res => {
console.log(res);
shopInfo.value = res.shopInfo
uni.cache.set('shopInfo', res.shopInfo)
+ uni.cache.set('shopId', res.shopInfo.id)
})
})
diff --git a/groupBuying/success/index.vue b/groupBuying/success/index.vue
index a53358f..fe6a867 100644
--- a/groupBuying/success/index.vue
+++ b/groupBuying/success/index.vue
@@ -270,6 +270,110 @@
+
+
+
+
+
+
+
+
+
+ 剩余成团时间:
+
+ {{returnNum(0)}}
+ :
+ {{returnNum(1)}}
+ :
+ {{returnNum(2)}}
+
+
+
+
+
+
+
+
+ {{item.groupPeopleNum}}人团
+
+
+
+
+
+
+ {{item.wareJson
+ .wareName}}
+
+
+ ¥
+ {{item.wareGroupPrice}}
+
+
+ ¥
+ {{item.wareOriginalPrice}}
+
+
+
+
+ 数量:{{item.num}}
+
+
+
+
+
+
+
+
+ 可核销门店:
+ {{item.shopName}}
+
+
+ 门店地址:
+ {{item.shopAddress}}
+
+
+
+
+
+
+
+
+ 订单信息
+
+
+ {{showOrder?'收起':'展开'}}
+
+
+
+
+
+
+
+
+ 商品总额
+ ¥{{item.payAmount}}
+
+
+ 实付金额
+ ¥{{item.payAmount}}
+
+
+ 订单号
+ {{item.orderNo}}
+
+
+ 支付时间
+ {{item.payTime}}
+
+
+
+
+
+
+
+
+
@@ -330,7 +434,7 @@
if (!res) {
uni.showModal({
title: '提示',
- content :'当前商品已下架或者不存在',
+ content: '当前商品已下架或者不存在',
showCancel: false,
success(res) {
uni.redirectTo({
diff --git a/pages.json b/pages.json
index c2a84dd..3189a1a 100644
--- a/pages.json
+++ b/pages.json
@@ -427,9 +427,20 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "confirm-order/confirm-order",
+ "style": {
+ "navigationBarTitleText": "确认订单"
+ }
+ },
+ {
+ "path": "members/members",
+ "style": {
+ "navigationBarTitleText": "查看全部"
+ }
}
-
]
}
],
diff --git a/scoreShop/index/index.vue b/scoreShop/index/index.vue
index 9d94857..268e5c9 100644
--- a/scoreShop/index/index.vue
+++ b/scoreShop/index/index.vue
@@ -87,8 +87,12 @@
// }
function toDetail() {
+ if(!pointsUser.value||!pointsUser.value.id){
+ return
+ }
+
uni.navigateTo({
- url: '/pages/user/member/billDetails?type=2&shopId=' + query.shopId + '&id=' + (pointsUser.value.id ||
+ url: '/pages/user/member/billDetails?type=2&shopId=' + query.shopId + '&id=' + (pointsUser.value?pointsUser.value.id :
'')
})
}
diff --git a/static/icon/copy.png b/static/icon/copy.png
new file mode 100644
index 0000000..4c09474
Binary files /dev/null and b/static/icon/copy.png differ
diff --git a/stores/user.js b/stores/user.js
index 13ba86a..f271a91 100644
--- a/stores/user.js
+++ b/stores/user.js
@@ -49,7 +49,7 @@ export const Storelogin = defineStore("login", {
rawData: infoRes.rawData,
source: "wechat",
});
- console.log('res',res);
+ console.log('APIuserlogin',res);
if (res) {
this.token = res.token;
this.miniAppOpenId = res.userInfo
@@ -96,8 +96,9 @@ export const Storelogin = defineStore("login", {
},
});
// #endif
-
+ // #ifdef H5
resolve(true)
+ // #endif
});
},
},
diff --git a/userPackage/components/status.vue b/userPackage/components/status.vue
index fb84b5d..f8e5a43 100644
--- a/userPackage/components/status.vue
+++ b/userPackage/components/status.vue
@@ -1,44 +1,67 @@
- {{status}}
+
+ {{ statusName }}
\ No newline at end of file
diff --git a/userPackage/confirm-order/confirm-order.vue b/userPackage/confirm-order/confirm-order.vue
new file mode 100644
index 0000000..5ba5823
--- /dev/null
+++ b/userPackage/confirm-order/confirm-order.vue
@@ -0,0 +1,356 @@
+
+
+
+
+
+
+ 阶梯优惠
+
+
+
+ {{item.packageName}}
+ {{item.description}}
+
+
+
+
+
+ ¥
+ {{item.price}}
+
+
+ ¥{{item.originPrice}}
+
+
+
+
+
+
+
+
+
+ 可核销门店:
+ {{item.shopName}}
+
+
+ 门店地址:
+ {{item.shopAddress}}
+
+
+
+
+
+
+ 支付方式
+ 微信支付
+
+
+
+
+
+
+
+
+
+
+
+ 分享说明
+
+ {{showDesc?'收起':'展开'}}
+
+
+
+
+
+
+
+
+
+
+ {{step.peopleNum}}
+ ¥{{step.price}}
+
+
+
+
+
+ 分享期限(小时):{{item.expireHours}}
+
+
+ 规定期限内的助力才会被计入
+
+
+ 如何才是分享成功?被分享人只需要点击《助力》,提示助力成功后即可
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 实付:
+ ¥{{totalPayPrice}}
+
+ 去支付
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/userPackage/goodsDetail/goodsDetail.vue b/userPackage/goodsDetail/goodsDetail.vue
index fa39e67..4248ee6 100644
--- a/userPackage/goodsDetail/goodsDetail.vue
+++ b/userPackage/goodsDetail/goodsDetail.vue
@@ -101,7 +101,7 @@
-
+
分享说明
@@ -126,13 +126,15 @@
- 分享期限(小时):4
+ 分享期限(小时):{{item.expireHours}}
规定期限内的助力才会被计入
- 如何才是分享成功?
被分享人只需要点击《助力》,提示助力成功后即可
+ 如何才是分享成功?被分享人只需要点击《助力》,提示助力成功后即可
+
+
@@ -158,10 +160,10 @@
- 1、可用时间段:04:00 - 16:07
+ 1、可用时间段:{{canuseTime}}
-
- 2、其他使用说明:这里是其他使用说明
+
+ 2、其他使用说明:{{item.otherDesc}}
@@ -179,18 +181,21 @@
商品详情
-
+
-
+
+
{{returnBtmText}}
-
- 立即助力
+
+ 发起助力
@@ -356,8 +361,9 @@
}
async function createOrder(){
- Api.order({
- packageId:item.id
+ Api.createOrder({
+ packageId:item.id,
+ shopId: item.shopId,
}).then(res=>{
if(res){
uni.navigateTo({
@@ -376,10 +382,9 @@
uni.setStorageSync('group_buying_order', {
...item,
number: number.value,
- groupOrderNo: popupData.item ? popupData.item.groupOrderNo : '',
})
uni.navigateTo({
- url: '/groupBuying/confirm-order/confirm-order'
+ url: '/userPackage/confirm-order/confirm-order'
})
return
await dingyue();
@@ -459,7 +464,6 @@
const query = reactive({
shopId: '',
id: '',
- groupOrderNo: ''
})
@@ -481,7 +485,7 @@
}
function getDetail() {
- Api.getPackageDetail(query.id).then(res => {
+ Api.getPackageDetail(query).then(res => {
Object.assign(item, res)
console.log(item)
coverImgs.value = res.images
@@ -552,15 +556,18 @@
uni.showShareMenu()
// #endif
onShareAppMessage(() => {
-
const query = `id=${item.id}&shopId=${item.shopId}`
return wxShare({
title: item.wareName,
imageUrl: coverImgs.value[0],
- path: '/groupBuying/goodsDetail/goodsDetail' + '?' + query,
+ path: '/userPackage/goodsDetail/goodsDetail' + '?' + query,
query,
})
})
+
+ const canuseTime=computed(()=>{
+ return item.useWeeks.join('、')+' '+item.useTimes
+ })
\ No newline at end of file
diff --git a/userPackage/order/detail.vue b/userPackage/order/detail.vue
index 7cfba96..0eded0c 100644
--- a/userPackage/order/detail.vue
+++ b/userPackage/order/detail.vue
@@ -1,14 +1,14 @@
-
+
+ @leftClick="back('/userPackage/index/index')" title-color="#fff">
-
- 剩余成团时间:
+
+ 剩余助力时间:
{{returnNum(0)}}
:
@@ -17,52 +17,92 @@
{{returnNum(2)}}
-
-
-
-
-
-
- {{item.groupPeopleNum}}人团
-
-
-
-
-
-
-
-
+
+
+
+
+ 阶梯优惠
+
+
+
+ {{item.packageInfo
+.packageName}}
+
+ {{item.packageInfo.description}}
-
-
- {{item.wareJson
-.wareName}}
-
-
- ¥
- {{item.wareGroupPrice}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 当前到手
-
- ¥
- {{item.wareOriginalPrice}}
+
+ ¥
+ {{nowPrice}}
+
+ ¥{{item.packageInfo.originPrice}}
+
+
+
+
+
+ ¥
+ {{item.finalPrice}}
+
+
+ ¥{{item.packageInfo.originPrice}}
+
+
+
+
+ ¥
+ {{item.packageInfo.price}}
+
+
+ ¥{{item.packageInfo.originPrice}}
+
+
+
+
+
+
+
+ ¥
+ {{item.finalPrice}}
-
-
- 数量:{{item.num}}
-
+
+ ¥{{item.packageInfo.originPrice}}
+
+
+
+
+
+ 已申请退款,需等待商家审核
+ 当前订单已失效
+ 当前订单已失效
+
- 已申请退款,需等待商家审核
-
+
{{item.verifyCode}}
-
+
@@ -79,39 +119,127 @@
-
-
-
-
-
-
-
- 团长
-
+
+
+ 已成功分享{{item.shareNum||0}}人
+
+
+ 查看全部
+
+
+
+
+
+ 已成功分享{{item.shareNum||0}}人
+
+
+ 查看全部
+
+
+
+
+
+
+
+
+
+
+ 已分享{{item.shareNum||0}}人
+
+ 分享{{maxNum}}人,
+ {{minPrice}}元
+ 即可购买
+
+
+
+
+ 分享说明
+
+ {{showDesc?'收起':'展开'}}
+
+
- {{user.userName}}
-
-
-
-
-
-
-
+
+
+
+
+ {{step.peopleNum}}
+ ¥{{step.price}}
- 等待参团
+
+
+
+ 分享期限(小时):{{item.packageInfo.expireHours}}
+
+
+ 规定期限内的助力才会被计入
+
+
+ 如何才是分享成功?被分享人只需要点击《助力》,提示助力成功后即可
+
+
+
+
+
+
+
+
+ 分享说明
+
+ {{showDesc?'收起':'展开'}}
+
+
+
+
+
-
-
- 立即参与拼团
-
+
+
+
+
+
+ {{step.peopleNum}}
+ ¥{{step.price}}
+
+
+
+
+
+ 分享期限(小时):{{item.packageInfo.expireHours}}
+
+
+ 规定期限内的助力才会被计入
+
+
+ 如何才是分享成功?被分享人只需要点击《助力》,提示助力成功后即可
+
+
+
+
+
+
-
+
+
+
订单信息
@@ -124,13 +252,10 @@
-
- 商品总额
- ¥{{item.payAmount}}
-
-
+
+
实付金额
- ¥{{item.payAmount}}
+ ¥{{item.finalPrice}}
订单号
@@ -140,11 +265,7 @@
支付时间
{{item.payTime}}
-
- 成团时间
- {{item.groupEndTime}}
-
+
核销时间
{{item.verifyTime}}
@@ -154,45 +275,68 @@
+
+
-
-
- 申请退款
-
+
+
+
+
+ 取消活动
+
+ 立即购买
+
+
+
+
+
+
+ 取消活动
+ 立即购买
+
+
+
+ 申请退款
+
+
+
+
+
-
- 申请退款
-
-
- 取消退款
+
+
+
+
+
+ 已经助力过了
+
-
-