1
0

15 Коммиты c7d4341f17 ... 73dd309a46

Автор SHA1 Сообщение Дата
  zouzexu 73dd309a46 chore(config): 注释掉 develop 环境下的链接地址 2 недель назад
  zouzexu dc6ea08090 Merge branch 'master' into zzx 2 недель назад
  zhangtao d9ac9ecdb4 fix(config): 调整环境配置和修复多余空行 2 недель назад
  zhangtao f8bbea2272 Merge branch 'zzx' into ch-h5 2 недель назад
  zhangtao 48da993c47 style(integral): 注释积分弹窗组件相关代码 2 недель назад
  zhangtao 259b19b921 Merge branch 'master' into ch-h5 2 недель назад
  zouzexu 44ece728bd fix(config): 注释掉 develop 环境的代理地址 2 недель назад
  zouzexu 613c762f2f Merge branch 'zzx' 2 недель назад
  zouzexu 248a318ced chore(config): 注释掉王的开发服务器地址 2 недель назад
  zhangtao b871ad659d chore(config): 清理配置文件中无用的空白行和注释 2 недель назад
  zouzexu 73fdd7fa4d Merge branch 'zzx' 3 недель назад
  zhangtao 662aa32826 Merge branch 'master' of http://git.zonelife.cn:3000/zhangtao/city-gather 3 недель назад
  zhangtao 90cda9f9af fix(config): 修复配置注释和位置获取逻辑 3 недель назад
  zhangtao f26b3c0b27 fix(payment): 禁用微信支付功能并显示提示 3 недель назад
  zhangtao 899337f53b fix(payment): 优化支付流程及状态管理 3 недель назад

+ 4 - 4
src/config/index.ts

@@ -20,10 +20,10 @@ const mapEnvVersion = {
    */
   // 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