Parcourir la source

Merge branch 'master' of https://git.nanodreamtech.com/Boss/yizhizan-h5

yezhihao il y a 3 mois
Parent
commit
644ebc955f
1 fichiers modifiés avec 23 ajouts et 0 suppressions
  1. 23 0
      pages/my/attachment.vue

+ 23 - 0
pages/my/attachment.vue

@@ -33,6 +33,7 @@
 			</scroll-view>
 		</view>
 		<view class="buttons flex align-center">
+			<view class="white-btn" @click="handleWeChatUpload">微信上传</view>
 			<view class="button pain" @click="showTipPopup = true">Ai一键解析简历</view>
 			<view class="button primary">
 				简历上传
@@ -288,6 +289,28 @@ export default {
 				},
 			});
 		},
+		handleWeChatUpload() {
+			plus.share.getServices(res => {
+			let weixinService = null;
+			for (let i in res) {
+				if (res[i].id === 'weixin') {
+				weixinService = res[i];
+				break;
+				}
+			}
+			console.log('weixinService :>> ', weixinService);
+			const userId =  uni.getStorageSync('userId')
+			if (weixinService) {
+				weixinService.launchMiniProgram({
+				id: 'gh_854ab5288c2d', 
+				path: `/pages/index/index?userId=${userId}`,
+				type: 2 // 小程序版本类型:0-正式版;1-测试版;2-体验版
+				});
+			} else {
+				console.log('未安装微信或获取微信服务失败');
+			}
+			});
+		},
 		deleteAttachment(id) {
 			var that = this;
 			uni.showModal({