Selaa lähdekoodia

修复实名认证头部问题

skyblued 3 vuotta sitten
vanhempi
commit
c163e9179d

+ 10 - 1
src/views/cart/cart-confirm-agin/index.tsx

@@ -1,4 +1,4 @@
-import { computed, ref, defineComponent, onMounted, reactive } from 'vue'
+import { computed, ref, defineComponent, onMounted, reactive,watch } from 'vue'
 import { Card, Cell, CellGroup, Popup, SubmitBar, Toast } from 'vant'
 import { addressType, cartConfirm, formateAttr } from '../cart'
 import styles from '../index.module.less'
@@ -39,6 +39,15 @@ export default defineComponent({
       orderNo: cartConfirm.orderInfo?.orderSn || '',
       actualPrice: cartConfirm.orderInfo?.payAmount || 0
     })
+    //修复实名认证头部问题
+    watch(authPopup, (value, oldValue) => {
+      if (authPopup.value) {
+        // 设置是否显示导航栏 0 显示 1 不显示
+        postMessage({ api: 'setBarStatus', content: { status: 0 } })
+      } else {
+        postMessage({ api: 'setBarStatus', content: { status: 1 } })
+      }
+    })
     // 提交
     const onSubmit = () => {
       if (!agreeStatus.value) {

+ 12 - 1
src/views/cart/cart-confirm/index.tsx

@@ -4,7 +4,8 @@ import {
   defineComponent,
   onMounted,
   reactive,
-  onUnmounted
+  onUnmounted,
+  watch
 } from 'vue'
 import { Card, Cell, CellGroup, Popup, SubmitBar, Toast } from 'vant'
 import { addressType, cartConfirm, formateAttr } from '../cart'
@@ -21,6 +22,7 @@ import ColResult from '@/components/col-result'
 import { moneyFormat } from '@/helpers/utils'
 import {
   listenerMessage,
+  postMessage,
   removeListenerMessage
 } from '@/helpers/native-message'
 export default defineComponent({
@@ -77,6 +79,15 @@ export default defineComponent({
       orderNo: '',
       actualPrice: 0
     })
+    //修复实名认证头部问题
+    watch(authPopup, (value, oldValue) => {
+      if (authPopup.value) {
+        // 设置是否显示导航栏 0 显示 1 不显示
+        postMessage({ api: 'setBarStatus', content: { status: 0 } })
+      } else {
+        postMessage({ api: 'setBarStatus', content: { status: 1 } })
+      }
+    })
     // 提交
     const onSubmit = () => {
       if (!address.value?.id) {