htc 4 日 前
コミット
124da5fc9a

+ 2 - 2
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "创衡正念企业教练",
+    "name" : "创衡汇教练AI智能体",
     "appid" : "__UNI__A0C8B31",
     "description" : "智慧生活",
     "versionName" : "1.0.3",
@@ -102,7 +102,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxe6afb089695f90e7",
+        "appid" : "wxb0ecfcf0c3e50402",
         "setting" : {
             "urlCheck" : false,
             "es6" : false,

+ 21 - 0
node_modules/.package-lock.json

@@ -4,10 +4,31 @@
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
+    "node_modules/eventemitter3": {
+      "version": "4.0.7",
+      "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
+      "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
+    },
     "node_modules/text-encoding-shim": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/text-encoding-shim/-/text-encoding-shim-1.0.5.tgz",
       "integrity": "sha512-H7yYW+jRn4yhu60ygZ2f/eMhXPITRt4QSUTKzLm+eCaDsdX8avmgWpmtmHAzesjBVUTAypz9odu5RKUjX5HNYA=="
+    },
+    "node_modules/widget-ui": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/widget-ui/-/widget-ui-1.0.2.tgz",
+      "integrity": "sha512-gDXosr5mflJdMA1weU1A47aTsTFfMJhfA4EKgO5XFebY3eVklf80KD4GODfrjo8J2WQ+9YjL1Rd9UUmKIzhShw==",
+      "dependencies": {
+        "eventemitter3": "^4.0.0"
+      }
+    },
+    "node_modules/wxml-to-canvas": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/wxml-to-canvas/-/wxml-to-canvas-1.1.1.tgz",
+      "integrity": "sha512-3mDjHzujY/UgdCOXij/MnmwJYerVjwkyQHMBFBE8zh89DK7h7UTzoydWFqEBjIC0rfZM+AXl5kDh9hUcsNpSmg==",
+      "dependencies": {
+        "widget-ui": "^1.0.2"
+      }
     }
   }
 }

+ 44 - 1
package-lock.json

@@ -6,20 +6,63 @@
   "packages": {
     "": {
       "dependencies": {
-        "text-encoding-shim": "^1.0.5"
+        "text-encoding-shim": "^1.0.5",
+        "wxml-to-canvas": "^1.1.1"
       }
     },
+    "node_modules/eventemitter3": {
+      "version": "4.0.7",
+      "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
+      "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
+    },
     "node_modules/text-encoding-shim": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/text-encoding-shim/-/text-encoding-shim-1.0.5.tgz",
       "integrity": "sha512-H7yYW+jRn4yhu60ygZ2f/eMhXPITRt4QSUTKzLm+eCaDsdX8avmgWpmtmHAzesjBVUTAypz9odu5RKUjX5HNYA=="
+    },
+    "node_modules/widget-ui": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/widget-ui/-/widget-ui-1.0.2.tgz",
+      "integrity": "sha512-gDXosr5mflJdMA1weU1A47aTsTFfMJhfA4EKgO5XFebY3eVklf80KD4GODfrjo8J2WQ+9YjL1Rd9UUmKIzhShw==",
+      "dependencies": {
+        "eventemitter3": "^4.0.0"
+      }
+    },
+    "node_modules/wxml-to-canvas": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/wxml-to-canvas/-/wxml-to-canvas-1.1.1.tgz",
+      "integrity": "sha512-3mDjHzujY/UgdCOXij/MnmwJYerVjwkyQHMBFBE8zh89DK7h7UTzoydWFqEBjIC0rfZM+AXl5kDh9hUcsNpSmg==",
+      "dependencies": {
+        "widget-ui": "^1.0.2"
+      }
     }
   },
   "dependencies": {
+    "eventemitter3": {
+      "version": "4.0.7",
+      "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
+      "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
+    },
     "text-encoding-shim": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/text-encoding-shim/-/text-encoding-shim-1.0.5.tgz",
       "integrity": "sha512-H7yYW+jRn4yhu60ygZ2f/eMhXPITRt4QSUTKzLm+eCaDsdX8avmgWpmtmHAzesjBVUTAypz9odu5RKUjX5HNYA=="
+    },
+    "widget-ui": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/widget-ui/-/widget-ui-1.0.2.tgz",
+      "integrity": "sha512-gDXosr5mflJdMA1weU1A47aTsTFfMJhfA4EKgO5XFebY3eVklf80KD4GODfrjo8J2WQ+9YjL1Rd9UUmKIzhShw==",
+      "requires": {
+        "eventemitter3": "^4.0.0"
+      }
+    },
+    "wxml-to-canvas": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/wxml-to-canvas/-/wxml-to-canvas-1.1.1.tgz",
+      "integrity": "sha512-3mDjHzujY/UgdCOXij/MnmwJYerVjwkyQHMBFBE8zh89DK7h7UTzoydWFqEBjIC0rfZM+AXl5kDh9hUcsNpSmg==",
+      "requires": {
+        "widget-ui": "^1.0.2"
+      }
     }
   }
 }

+ 2 - 1
package.json

@@ -1,5 +1,6 @@
 {
   "dependencies": {
-    "text-encoding-shim": "^1.0.5"
+    "text-encoding-shim": "^1.0.5",
+    "wxml-to-canvas": "^1.1.1"
   }
 }

+ 5 - 3
pages/home.vue

@@ -155,9 +155,11 @@
 						referrerId:uni.getStorageSync('shareUserId')||'',
 						teamQuestionnaireId:uni.getStorageSync('shareTQId')||'',
 					}).then(({data:res})=>{
-						if(res.code===0) return this.questionnaireKindShow = true;
-						this.teamKindMsg = res.msg||'';
-						this.teamKindShow = true;
+						if(res.code===0&&res.data==1) this.questionnaireKindShow = true;
+						else if(res.code!==0){
+							this.teamKindMsg = res.msg||'';
+							this.teamKindShow = true;
+						}
 					})
 				}
 			}

+ 1 - 1
pagesHome/components/createList.vue

@@ -222,7 +222,7 @@ export default {
 				let shareUserId = JSON.parse(uni.getStorageSync('userInfo')).id;
 				let res = await this.$api.post('/wx/genInviteLink',{
 					'path': '',
-					'query': `shareTQId=${this.dto.teamQuestionnaireId}&shareUserId=${shareUserId}`,
+					'query': `shareTQId=${this.dto.teamQuestionnaireId}&shareUserId=${shareUserId}&shareType=Questionnaire`,
 					'env_version': 'trial'//默认"release",正式版"release",体验版"trial",开发版"develop"
 				});
 				if(res.data.code!==0) return this.$showToast(res.data.msg)

+ 17 - 4
pagesPublish/publishResult.vue

@@ -53,7 +53,7 @@
 		    const sharerId = JSON.parse(uni.getStorageSync('userInfo')).id;
 			return {
 				title: this.title,
-				query: `shareUserId=${sharerId}&shareTQId=${this.teamQuestionnaireId}&from=timeline`,
+				query: `shareUserId=${sharerId}&shareTQId=${this.teamQuestionnaireId}&from=timeline&shareType=Questionnaire`,
 		      // imageUrl: this.$imgBase+''
 			};
 		},
@@ -62,7 +62,6 @@
 		    return {
 		      title: this.title,
 		      path: `/pages/home?shareTQId=${this.teamQuestionnaireId}&shareUserId=${sharerId}`,
-		      // imageUrl: this.$imgBase+''
 		    };
 		},
 		onLoad(options){
@@ -71,8 +70,22 @@
 		},
 		methods:{
 			async copyLink(){
-				let res = await this.$api.get('/wx/getStableAccessToken');
-				console.log(res);
+				let shareUserId = JSON.parse(uni.getStorageSync('userInfo')).id;
+				let res = await this.$api.post('/wx/genInviteLink',{
+					'path': '',
+					'query': `shareTQId=${this.teamQuestionnaireId}&shareUserId=${shareUserId}&shareType=Questionnaire`,
+					'env_version': 'trial'//默认"release",正式版"release",体验版"trial",开发版"develop"
+				});
+				if(res.data.code!==0) return this.$showToast(res.data.msg)
+				uni.setClipboardData({
+					data:res.data.data.openlink,
+					success: () => {
+						this.$showToast('复制成功')
+					},
+					fail: () => {
+						this.$showToast('复制失败')
+					}
+				})
 			}
 		}
 	}