瀏覽代碼

码上快购订阅消息、活动助力与开奖接口传appId

DELL 3 年之前
父節點
當前提交
348e00edd7
共有 2 個文件被更改,包括 26 次插入11 次删除
  1. 3 1
      src/components/activity-help/activity-help.vue
  2. 23 10
      src/packageOperate/activity/index.vue

+ 3 - 1
src/components/activity-help/activity-help.vue

@@ -43,6 +43,7 @@
 
 <script>
 	import env from '../../config/env.js'
+	import appId from '@/config/appId.js'
 	import $http from '@/utils/request.js'
 	export default {
 		name: "activity-help",
@@ -94,7 +95,8 @@
 				});
 				$http.post('/api/v1/mp/user/marketing/help', {
 					inviteCode: this.inviteCode,
-					marketingId: this.marketingId
+					marketingId: this.marketingId,
+					appSource: appId
 				}).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {

+ 23 - 10
src/packageOperate/activity/index.vue

@@ -272,7 +272,7 @@
 			}
 			if (opthios.userId) {
 				console.log(opthios);
-				console.log('opthios',opthios.userId);
+				console.log('opthios', opthios.userId);
 				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
 				if (opthios.userId === undefined || opthios.userId === 'undefined') {
 					uni.getSystemInfo({
@@ -360,17 +360,28 @@
 			exChange() {
 				//弹出层打开
 				// this.popupShow = true
-				uni.requestSubscribeMessage({
-					tmplIds: ['3y_My-yRmqmGd3-f-vAwNaK4LQeehzXBSNDi_5wcnFI',
-						'FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0',
-						'92xxL8XTRPLROyNUtmN04OT0kyq4iwSCH3sz-j6zbZs'
-					],
-					success(res) {}
-				})
+				if (appId == 1) {
+					//微信盲票小程序
+					uni.requestSubscribeMessage({
+						tmplIds: ['9nEWOqAiu9VujgFyQT0jeGI2xTNHm9cbJB8d7cY_dVg',
+							'aRcsZ69DlAdXKml7ciXMFIX2BJFyXpiytI2sQyk4Dmw',
+						],
+						success(res) {}
+					})
+				}else if (appId == 2) {
+					//微信码上快购小程序
+					uni.requestSubscribeMessage({
+						tmplIds: ['b2mMyGHeNQ03D3CZl3iUkDxY0F94ytRAUWgoCKq2Nik',
+							'bEdEYrjbE6r0647j8o9bgWqSrIqcRJLmaiqqxYkg1-Y',
+						],
+						success(res) {}
+					})
+				}
+
 			},
 			//立即参与抽奖
 			exChangeCode() {
-				$http.post(`/api/v1/mp/user/marketing/generateCode/${this.id}`, {}).then(res => {
+				$http.post(`/api/v1/mp/user/marketing/generateCode/${this.id}`, { appSource: appId }).then(res => {
 					if (res.code == 0) {
 						this.getDetail()
 						setTimeout(() => {
@@ -396,7 +407,9 @@
 			},
 
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', {
+					appSource: appId
+				}).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data