Jelajahi Sumber

Merge branch '2025北京诚祥App' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025北京诚祥App

tanxue 1 hari lalu
induk
melakukan
4e7222009d
2 mengubah file dengan 66 tambahan dan 49 penghapusan
  1. 1 1
      config.js
  2. 65 48
      pages/admin/my/index.vue

+ 1 - 1
config.js

@@ -15,7 +15,7 @@ export default   {
     name: "",
 	
     // 应用版本
-    version: "1.0.5",
+    version: "1.0",
     // 应用logo
     logo: "/static/logo.png",
     // 官方网站

+ 65 - 48
pages/admin/my/index.vue

@@ -78,6 +78,15 @@
 	import {
 		useIsCanBack
 	} from "@/store/isCanBack.js"
+	// #ifndef APP-HARMONY
+	import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
+	const uniShare = new UniShare();
+	// #endif
+	// #ifdef APP-HARMONY
+	import {
+		uniShare
+	} from "@/uni_modules/uni-share"
+	// #endif
 	let myInfoData = reactive({
 		jzName: '',
 		userImg: '',
@@ -107,11 +116,11 @@
 					url: '/pages/admin/my/myInfo?from=my'
 				})
 				break;
-			/* case 'jzxx':
-				uni.navigateTo({
-					url: '/pages/admin/my/jzInfo'
-				})
-				break; */
+				/* case 'jzxx':
+					uni.navigateTo({
+						url: '/pages/admin/my/jzInfo'
+					})
+					break; */
 		}
 	}
 
@@ -147,52 +156,60 @@
 			return;
 		}
 		uni.share({
-			provider: "weixin",
-			scene: "WXSceneSession",
-			type: 1,
-			summary: "我正在使用HBuilderX开发uni-app,赶紧跟我一起来体验!",
-			success: function(res) {
-				console.log("success:" + JSON.stringify(res));
-			},
-			fail: function(err) {
-				console.log("fail:" + JSON.stringify(err));
-			}
+		    provider: 'weixin',
+		    scene: "WXSceneSession",
+		    type: 5,
+		    imageUrl: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/share-logo@3.png',
+		    title: '欢迎体验uniapp12312',
+		    miniProgram: {
+		        id: 'gh_fa5889151e7d',
+		        path: 'pages/index/index',
+		        type: 1,
+		        webUrl: 'http://uniapp.dcloud.io'
+		    },
+		    success: ret => {
+		        console.log(JSON.stringify(ret));
+		    }
 		});
-		// uni.share({
-		// 	provider: "weixin",
-		// 	scene: "WXSceneSession", // 分享给好友
-		// 	type: 5, // 5表示小程序卡片
-		// 	summary: "专业的家政服务平台,为您提供优质服务",
-		// 	href: "https://www.baidu.com",
-		// 	title: "家政学小程序",
-		// 	imageUrl: "/static/share-thumb.jpg",
-		// 	miniProgram: {
-		// 		id: "wx3a4f7c01eb080d14", 
-		// 		path: "/pages/index/index",
-		// 		type: 0,
-		// 		webUrl: "https://www.baidu.com"
+		// // #ifdef APP-HARMONY
+		// uniShare(['https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png'])
+		// // #endif
+		// // #ifndef APP-HARMONY
+		// uniShare.show({
+		// 	content: { //公共的分享参数配置  类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
+		// 		type: 5,
+		// 		href: 'https://uniapp.dcloud.io/',
+		// 		title: '标题',
+		// 		summary: '描述阿斯顿发啥发啥发',
+		// 		imageUrl: 'https://img-cdn-aliyun.dcloud.net.cn/stream/icon/__UNI__HelloUniApp.png',
+		// 		miniProgram: {
+		// 			id: 'gh_abcdefg',
+		// 			path: 'pages/index/index',
+		// 			type: 0,
+		// 			webUrl: 'http://uniapp.dcloud.io'
+		// 		},
 		// 	},
-		// 	success: (res) => {
-		// 		console.log("分享成功:", res);
-		// 		uni.showToast({
-		// 			title: '分享成功',
-		// 			icon: 'success'
-		// 		});
-		// 	},
-		// 	fail: (err) => {
-		// 		console.log("分享失败:", err);
-		// 		let errorMsg = '分享失败';
-		// 		if (err.errMsg && err.errMsg.includes('未安装')) {
-		// 			errorMsg = '未安装微信';
+		// 	menus: [{
+		// 		"img": "/static/app-plus/sharemenu/wechatfriend.png",
+		// 		"text": "微信好友",
+		// 		"share": { //当前项的分享参数配置。可覆盖公共的配置如下:分享到微信小程序,配置了type=5
+		// 			"provider": "weixin",
+		// 			"scene": "WXSceneSession"
 		// 		}
-		// 		uni.showToast({
-		// 			title: errorMsg,
-		// 			icon: 'none'
-		// 		});
-		// 	}
-		// });
-
-
+		// 	}, {
+		// 		"img": "/static/app-plus/sharemenu/wechatmoments.png",
+		// 		"text": "微信朋友圈",
+		// 		"share": {
+		// 			"provider": "weixin",
+		// 			"scene": "WXSceneTimeline"
+		// 		}
+		// 	}],
+		// 	cancelText: "取消分享",
+		// }, e => { //callback
+		// 	console.log(uniShare.isShow);
+		// 	console.log(e);
+		// })
+		// // #endif
 	}
 
 	function passwordBtn(data) {