Browse Source

fix venue order

dev
刘嘉炜 1 week ago
parent
commit
ee6a9b8d99
  1. 11369
      package-lock.json
  2. 2
      src/subpackage/groupon/pages/confirm_order/venue.vue
  3. 12
      src/subpackage/groupon/pages/exchange_success.vue
  4. 7
      src/subpackage/order/pages/detail.vue

11369
package-lock.json
File diff suppressed because it is too large
View File

2
src/subpackage/groupon/pages/confirm_order/venue.vue

@ -156,7 +156,7 @@ function createServerOrder(){
.then(oRes=>{
console.warn('orderPayMini', oRes);
if(oRes?.code === 0){
routeTo(`/subpackage/groupon/pages/exchange_success?brand_id=${_sVal?.brand_id ?? ''}&verify_token=${verify_token.value ?? ''}`);
routeTo(`/subpackage/groupon/pages/exchange_success?brand_id=${_sVal?.brand_id ?? ''}&order_no=${cRes?.order_no ?? ''}`);
}
})
})

12
src/subpackage/groupon/pages/exchange_success.vue

@ -7,6 +7,15 @@ import { routeTo, showModal } from "@/utils/polish";
import { previewBase64Image } from "@/utils";
const orderInfo = ref({});
onLoad(oprions => {
if(oprions?.order_no){
orderGet({ data: { order_no: oprions?.order_no, brand_id: oprions?.brand_id ?? '' } })
.then(oRes=>{
orderInfo.value = oRes?.data ?? {};
})
return
}
//
getOrderNoFn({ verify_token: oprions?.verify_token ?? '' })
.then(orderNo =>{
orderGet({ data: { order_no: orderNo, brand_id: oprions?.brand_id ?? '' } })
@ -18,7 +27,7 @@ onLoad(oprions => {
// ef5bc53a8711d876adbfac7710a03f3f
function getOrderNoFn({ verify_token, times = 1, max = 5, interval = 300 }){
function getOrderNoFn({ verify_token, times = 1, max = 100, interval = 300 }){
if(times > max){
console.warn('轮询了' + (times - 1) + '次');
showModal({ content: '查询超时!' });
@ -103,6 +112,7 @@ function toOrderDetail(){
</view>
<view class="es-share" v-if="false">分享给朋友 &#xe6cc;</view>
</view>
<view v-else>加载中...</view>
</template>
<style lang="scss" scoped>

7
src/subpackage/order/pages/detail.vue

@ -13,17 +13,19 @@ import { showLoad, hideLoad, showNone } from "@/utils/polish";
import { previewBase64Image } from "@/utils";
const orderInfo = ref({});
const cancelModalRef = ref(null);
const APPID = tt.getEnvInfoSync()?.microapp?.appId ?? '';
// order_type 0 1/2
onLoad(options => {
getOrderInfo({
brand_id: options?.brand_id ?? '',
order_no: options?.order_no ?? '',
appid: APPID
});
});
function getOrderInfo({ brand_id, order_no }){
function getOrderInfo({ brand_id, order_no, appid }){
orderGet({
data: { brand_id, order_no, }
data: { brand_id, order_no, appid }
})
.then(res=>{
orderInfo.value = res?.data ?? {};
@ -299,6 +301,7 @@ function imError(e){
<!-- <view class="of-refund">申请退款</view> -->
</view>
</view>
<cancel-modal ref="cancelModalRef"></cancel-modal>
</template>

Loading…
Cancel
Save