hmp 4 rokov pred
rodič
commit
a4d416f3ec

+ 10 - 2
assets/http/api.js

@@ -56,7 +56,14 @@ const help={
  */
 const pointgoods={
 	list:p => http.get('sing_goods/pointgoods/list', {params:p}),
-} 
+}
+
+/**
+ * 道具
+ */
+const order={
+	create:p => http.post('/app/help/goods/createPropsOrder', p),
+}
 
 
 export const api={
@@ -69,5 +76,6 @@ export const api={
 	points,
 	help,
 	CMCC,
-	pointgoods
+	pointgoods,
+	order
 }

+ 2 - 1
assets/http/config.js

@@ -4,7 +4,8 @@ let config = {}
 //是否需要获取手机号
 config.isAuthPhone=true
 
-
+//普通二维码跳作品详情链接
+config.PRODUCT_PATH='https://ldt.guosen-fumao.cn/wapp/product',
 
 config.themeRed = {
 	skin: '--bgColor:#e72226;--color:#fff;--shopBg:#f24050;--shopRule:#FF797F',

+ 16 - 15
pages/activity/activityDetail.vue

@@ -2,7 +2,7 @@
 	<view :style="vuex_skin">
 		<u-navbar :custom-back="customBack" :is-back="true" title="作品详情"></u-navbar>
 		<view class="" v-show="!loading">
-			<video class="works-video" :src="activity.videoUrl"></video>
+			<video class="works-video" ::autoplay="true" :src="activity.videoUrl"></video>
 			<view style="padding: 20rpx 30rpx 50rpx 30rpx;background: white;">
 				<view class="title" style="border-bottom: 1rpx solid #EEEEEE ;">
 					<span class="bg-red work-no"> {{activity.productNo}}号</span>
@@ -84,7 +84,7 @@
 		},
 		onReady() {
 			//处理海报参数
-			this.handelPosetrParams()
+			this.handelShareParams()
 		},
 		computed: {
 			content() {
@@ -113,19 +113,30 @@
 					fontSize: '32rpx',
 					width: '500rpx',
 					margin: '25rpx auto'
-				}
+				},
+				
 			}
 		},
 		methods: {
-			async handelPosetrParams() {
+			async handelShareParams() {
 				this.posetrParams = {
 					avatar: 'https://music.nanyue6688.com/obsfile/9867edfa4d34464bb1f5f938da5c2730-avatar.png',
 					title: '我是普法帮帮代言人',
 					subTitle: `邀请您为${this.activity.productNo}号作品投票!`
 				}
+				let userId=this.vuex_userId || '000000' //游客
+				let sharePath='/pages/activity/activityDetail?id='+this.activity.id+'&userId='+userId
+				let encodePath=encodeURIComponent(sharePath)
+				this.$u.mpShare = {
+					title: '我是普法帮帮代言人,'+this.posetrParams.subTitle, 
+					path: '/pages/index/home?path='+encodePath, 
+					imageUrl: '' 
+				}
+				
+				let qrText=this.$config.PRODUCT_PATH +'?path=' +encodePath
 				this.qrCodeImg = (await this.$refs.uqrcode.make({
 					size: 150,
-					text: '黄明潘'
+					text: qrText
 				})).tempFilePath
 			},
 			handelAuthResult(options) {
@@ -191,16 +202,6 @@
 				this.$refs.sharePopup.show()
 			}
 		},
-		//分享
-		onShareTimeline(res) {
-			if (res.from === 'button') { // 来自页面内分享按钮
-				console.log(res.target)
-			}
-			return {
-				title: '自定义分享标题',
-				path: '/pages/test/test?id=123'
-			}
-		}
 	}
 </script>
 

+ 1 - 1
pages/index/home.vue

@@ -121,7 +121,7 @@
 				const { path } = options;
 				await this.initParams();
 				if (this.$isNotEmpty(path)) {
-					this.$jump(path)
+					this.$jump(decodeURIComponent(path))
 				}
 			},
 			/**