Ver código fonte

校验专区客群背景图

csk 1 mês atrás
pai
commit
b3c5a69965

+ 9 - 4
工作空间/产研/权益/汇丰全行/产品原型/pc-demo/src/views/PageZoneConfig.vue

@@ -37,7 +37,7 @@
 
         <!-- 客群背景图 -->
         <div class="identity-row">
-          <div class="identity-field-label">客群背景图</div>
+          <div class="identity-field-label">客群背景图 <span class="required-star">*</span></div>
           <div class="bg-upload-area">
             <div class="bg-upload-box" @click="triggerIdentityUpload(m.key)">
               <img v-if="configData.identityModule[m.key].bgImage" :src="configData.identityModule[m.key].bgImage" class="preview-img" />
@@ -493,11 +493,16 @@ export default {
         .trim()
       return !text
     },
-    validateIdentityBalancePopup() {
+    validateIdentityModule() {
       const list = this.identityMscList || []
       for (const item of list) {
         const data = this.configData.identityModule?.[item.key]
-        if (!data || item.key === 'privateBank' || !data.showAvgBalance) continue
+        if (!data) continue
+        if (!data.bgImage) {
+          ElMessage.error(`${item.label} 的客群背景图未上传!`)
+          return false
+        }
+        if (item.key === 'privateBank' || !data.showAvgBalance) continue
         if (!(data.avgBalancePopupTitle || '').trim()) {
           ElMessage.error(`${item.label} 的账户余额弹窗提示-弹窗顶部名称未填写!`)
           return false
@@ -594,7 +599,7 @@ export default {
       this.markModified()
     },
     async handleSave(type) {
-      if (!this.validateIdentityBalancePopup()) return
+      if (!this.validateIdentityModule()) return
       this.normalizeCarouselItems(this.configData.adCarousel || [])
       const invalidCarouselIndex = (this.configData.adCarousel || []).findIndex(item => !this.validateJumpConfig(item))
       if (invalidCarouselIndex > -1) {