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