Bladeren bron

refactor(pc): 优化留言组件并移除未使用的联系我逻辑

- 移除了 content-card 组件中的未使用代码和联系我逻辑
- 更新了 content-dialog 组件,添加了新的 setClass 属性
- 调整了 configInfo 中的属性名称,使用 userPhone 替代 phone

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 3 dagen geleden
bovenliggende
commit
e62e61b8bc

+ 3 - 16
plugins/leave-source/src/lib/pc/components/content-card.vue

@@ -8,7 +8,6 @@
 </template>
 
 <script>
-import { useContactMeLogic } from '../../../utils/hooks'
 import ContractCard from './contract-card.vue'
 import ContractCardQrcode from './contract-card-qrcode.vue'
 import LeaveCommon from './footer'
@@ -53,21 +52,6 @@ export default {
       type: String,
       default: ''
     }
-    // source: {
-    //   type: String,
-    //   default: ''
-    // },
-    // sourceDesc: {
-    //   type: String,
-    //   default: ''
-    // },
-    // popupTitle: {
-    //   type: String,
-    //   default: '联系专属客服,申请免费体验'
-    // }
-  },
-  mounted() {
-    useContactMeLogic({ props: this.$props })
   },
   methods: {
     contactMeEvent(phone) {
@@ -153,5 +137,8 @@ export default {
       }
     }
   }
+  &.newUserSale {
+
+  }
 }
 </style>

+ 6 - 2
plugins/leave-source/src/lib/pc/content-dialog.vue

@@ -30,6 +30,10 @@ const props = defineProps({
   type: {
     type: String,
     default: '1'
+  },
+  setClass: {
+    type: String,
+    default: ''
   }
 })
 
@@ -62,8 +66,7 @@ function contactMeEvent(phone) {
   if (!phonePass) {
     return showToast('联系电话格式不正确')
   }
-  // configInfo.phone = phone
-  changePhoneDialog.phoneNumber = phone
+  configInfo.userPhone = phone
   contactMe()
 }
 
@@ -96,6 +99,7 @@ export default {
       :wxer="configInfo.wxer"
       :phone="configInfo.phone"
       :user-phone="configInfo?.userPhone || ''"
+      :set-class="config.props.setClass"
       @contactMeEvent="contactMeEvent"
       @close="updateVisible(false)"
     />