Преглед изворни кода

Merge branch 'master' into zzx

zouzexu пре 1 дан
родитељ
комит
dc6ea08090

+ 5 - 5
src/config/index.ts

@@ -14,16 +14,16 @@ const mapEnvVersion = {
   develop: 'http://47.109.84.152:8081', // 测试代理
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
   // develop: 'https://25740642.r3.cpolar.top',
-  // develop: 'https://smqjh.api.zswlgz.com',
+  develop: 'https://smqjh.api.zswlgz.com',
   /**
    * 体验版
    */
   // trial: "http://192.168.1.166:8080/jeecg-boot",
   // trial: 'http://192.168.0.157:8080',
-  trial: 'http://47.109.84.152:8081',
+  // trial: 'http://47.109.84.152:8081',
   // trial: 'http://192.168.0.11:8081', // 王
   // trial: 'http://192.168.1.166:8080,
-  // trial: 'https://smqjh.api.zswlgz.com',
+  trial: 'https://smqjh.api.zswlgz.com',
   /**
    * 正式版
    */
@@ -51,8 +51,8 @@ function handleEnvVersion() {
     // development: 'http://192.168.0.11:8081',
     // development: 'http://192.168.1.21:8080',
     // development: 'https://smqjh.api.zswlgz.com',
-    // production: 'https://smqjh.api.zswlgz.com',
-    production: 'http://47.109.84.152:8081',
+    production: 'https://smqjh.api.zswlgz.com',
+    // production: 'http://47.109.84.152:8081',
   }
   console.log(mode, '==================mode===================')
   return h5Server[mode as 'development' | 'production']

+ 3 - 0
src/store/address.ts

@@ -67,6 +67,9 @@ export const useAddressStore = defineStore('address', {
           console.log('位置获取成功', res)
           this.Location.latitude = res.latitude
           this.Location.longitude = res.longitude
+          // this.Location.latitude = 26.5919
+          // this.Location.longitude = 106.621
+
           // #ifndef MP-WEIXIN
           uni.hideLoading()
           // #endif

+ 2 - 2
src/store/user.ts

@@ -599,8 +599,8 @@ export const useUserStore = defineStore('user', {
         .join('&')
       const path = 'subPack-common/threePay/index'
       // const env = 'develop'
-      const env = 'trial'
-      // const env = 'release'
+      // const env = 'trial'
+      const env = 'release'
       window.location.href = `weixin://dl/business/?appid=wx43b5b906cc30ed0b&path=${path}&query=${encodeURIComponent(queryString)}&env_version=${env}`
       uni.hideLoading()
       // #endif

+ 2 - 2
src/subPack-common/integral/index.vue

@@ -90,7 +90,7 @@ getNavList()
       </view>
       <StatusTip v-if="!pointList.length" tip="暂无内容" />
     </scroll-view>
-    <Zpopup v-model="showPointsPopup" :showfooter="false" bg="#fff">
+    <!-- <Zpopup v-model="showPointsPopup" :showfooter="false" bg="#fff">
       <view class="px-32rpx pb-40rpx pt-40rpx">
         <view class="mb-32rpx text-center text-32rpx font-bold">
           积分有限期
@@ -129,7 +129,7 @@ getNavList()
           <view>3.如若交易在使用的积分有效期之外发生退款,该部分积分也为过期。</view>
         </view>
       </view>
-    </Zpopup>
+    </Zpopup> -->
   </view>
 </template>
 

+ 4 - 1
src/subPack-common/threePay/index.vue

@@ -133,9 +133,12 @@ onHide(() => {
 })
 
 // 页面卸载时清理,下次进入重新开始
-onUnload(() => {
+onUnload(async () => {
   stopCountdown()
   endTimestamp = null
+  await useUserStore().$reset()
+  useSmqjhCartStore().$reset()
+  useAddressStore().$reset()
 })
 </script>
 

+ 21 - 27
src/subPack-film/submit-order/index.vue

@@ -87,15 +87,6 @@ function next() {
   showProtocol.value = false
 }
 
-async function handleH5PayResult(orderNumber: string) {
-  const isPaySuccess = await useUserStore().pollOrderPaySuccess(orderNumber)
-  if (isPaySuccess) {
-    await useUserStore().paySuccess('film-order', 'subPack-film/index/index')
-    return
-  }
-  useGlobalToast().show({ msg: '暂未查询到支付成功,请稍后在订单列表查看' })
-}
-
 async function pay() {
   loading.value = true
   try {
@@ -118,15 +109,16 @@ async function pay() {
     const payMent = await useUserStore().getPayMent(orderNumber)
     if (payMent.payType !== 'point') {
       try {
-        // #ifdef MP-WEIXIN
-        const res = await useUserStore().handleCommonPayMent(orderNumber)
-        await useUserStore().getWxCommonPayment(res)
-        await useUserStore().paySuccess('film-order', 'subPack-film/index/index')
-        // #endif
-        // #ifdef H5
-        useUserStore().handleCommonWechatPay(orderNumber)
-        await handleH5PayResult(orderNumber)
-        // #endif
+        // // #ifdef MP-WEIXIN
+        // const res = await useUserStore().handleCommonPayMent(orderNumber)
+        // await useUserStore().getWxCommonPayment(res)
+        // await useUserStore().paySuccess('film-order', 'subPack-film/index/index')
+        // // #endif
+        // // #ifdef H5
+        // useUserStore().handleCommonWechatPay(orderNumber)
+        // await handleH5PayResult(orderNumber)
+        // // #endif
+        useGlobalToast().show('暂不支持微信支付')
       }
       catch {
         await useUserStore().payError('film-order', 'subPack-film/index/index')
@@ -144,7 +136,14 @@ async function pay() {
     loading.value = false
   }
 }
-
+// async function handleH5PayResult(orderNumber: string) {
+//   const isPaySuccess = await useUserStore().pollOrderPaySuccess(orderNumber)
+//   if (isPaySuccess) {
+//     await useUserStore().paySuccess('film-order', 'subPack-film/index/index')
+//     return
+//   }
+//   useGlobalToast().show({ msg: '暂未查询到支付成功,请稍后在订单列表查看' })
+// }
 function call() {
   uni.makePhoneCall({
     phoneNumber: info.value.phone,
@@ -163,14 +162,9 @@ async function getPoints() {
 getPoints()
 
 function usePoints() {
-  return Math.round(totalPrice.value * 100) >= info.value.points ? info.value.points : Math.round(totalPrice.value * 100)
+  return (totalPrice.value * 100) >= info.value.points ? info.value.points : ((totalPrice.value * 10000) / 100)
 }
 
-const actualPayPrice = computed(() => {
-  const result = (Math.round(totalPrice.value * 100) - usePoints()) / 100
-  return Math.max(0, Number(result.toFixed(2)))
-})
-
 onLoad((options) => {
   query.value = JSON.parse(options?.query)
   info.value = uni.getStorageSync('film-info')
@@ -284,7 +278,7 @@ onLoad((options) => {
           总计
         </view>
         <view class="total">
-          ¥{{ actualPayPrice }}
+          ¥{{ (totalPrice * 100 - usePoints()) / 100 }}
         </view>
       </view>
     </view>
@@ -323,7 +317,7 @@ onLoad((options) => {
     <view class="footer-box">
       <view class="price-box">
         <view class="total">
-          ¥{{ actualPayPrice }}
+          ¥{{ (totalPrice * 100 - usePoints()) / 100 }}
         </view>
         <view class="reduce">
           共减¥{{ usePoints() / 100 }}

+ 8 - 8
src/subPack-smqjh/components/film-orderList/film-orderList.vue

@@ -12,14 +12,14 @@ const _emit = defineEmits<{
 async function handlePay(orderNumber: string) {
   const payMent = await useUserStore().getPayMent(orderNumber)
   if (payMent?.payType !== 'point' && payMent) {
-    // #ifdef MP-WEIXIN
-    const res = await useUserStore().handleCommonPayMent(orderNumber)
-    await useUserStore().getWxCommonPayment(res)
-    _emit('refresh')
-    // #endif
-    // #ifdef H5
-    useUserStore().handleCommonWechatPay(orderNumber)
-    // #endif
+    // // #ifdef MP-WEIXIN
+    // const res = await useUserStore().handleCommonPayMent(orderNumber)
+    // await useUserStore().getWxCommonPayment(res)
+    // _emit('refresh')
+    // // #endif
+    // // #ifdef H5
+    // useUserStore().handleCommonWechatPay(orderNumber)
+    // // #endif
   }
   else {
     await useUserStore().handleCommonPayMent(orderNumber)

+ 0 - 1
src/subPack-smqjh/components/xsb-orderList/xsb-orderList.vue

@@ -25,7 +25,6 @@ async function handlePay(orderNumber: string) {
   if (payMent?.payType !== 'point' && payMent) {
     // #ifdef MP-WEIXIN
     const res = await useUserStore().handleCommonPayMent(orderNumber)
-
     await useUserStore().getWxCommonPayment(res)
     _emit('refresh')
     // #endif