Browse Source

feat 微信上传按钮添加配置控制

yezhihao 3 months ago
parent
commit
22a27928db
1 changed files with 15 additions and 2 deletions
  1. 15 2
      pages/my/attachment.vue

+ 15 - 2
pages/my/attachment.vue

@@ -33,7 +33,7 @@
 			</scroll-view>
 		</view>
 		<!-- #ifdef APP-PLUS -->
-		<view class="white-btn" @click="handleWeChatUpload">微信上传</view>
+		<view class="white-btn" v-if="showWXUploadBtn" @click="handleWeChatUpload">微信上传</view>
 		<!-- #endif -->
 		<view class="buttons flex align-center">
 			<view class="button pain" @click="showTipPopup = true">Ai一键解析简历</view>
@@ -151,7 +151,8 @@ export default {
 				},
 			],
 			loading: false,
-			showTipPopup: false
+			showTipPopup: false,
+			showWXUploadBtn: false
 		};
 	},
 	computed: {
@@ -169,6 +170,7 @@ export default {
 
 		this.getUserInfo()
 		// this.avatar = uni.getStorageSync('avatar')
+		this.getWXUploadConfigData()
 	},
 	methods: {
 		// 返回上一页
@@ -563,6 +565,17 @@ export default {
 				this.showModal('解析失败,请稍后重试')
 				this.stopLoadStatus()
 			})
+		},
+		
+		// 获取微信上传配置数据
+		getWXUploadConfigData() {
+			this.$Request.getT('/app/dict/list', {
+				type: '小程序入口'
+			}).then(res => {
+				if (res.code == 0 && res.data?.length > 0) {
+					this.showWXUploadBtn = res.data[0].code == '开'
+				}
+			})
 		}
 	},
 	// userphone(){