Procházet zdrojové kódy

appId,码上兑券 在接口添加参数

DELL před 3 roky
rodič
revize
ac2452ef1d

+ 3 - 1
src/components/auth/auth.vue

@@ -17,6 +17,7 @@
 
 <script>
 	import $http from '../../utils/request.js'
+	import appId from '@/config/appId.js'
 	export default {
 		name: "auth",
 		props: {
@@ -55,7 +56,8 @@
 										identity: 1,
 										code: res.code
 									},
-									...info.userInfo
+									...info.userInfo,
+									appSource: appId
 								}).then(res => {
 									_this.authIng = false
 									if (res.code === 0) {

+ 5 - 0
src/config/appId.js

@@ -0,0 +1,5 @@
+const mp = 1
+
+const msdq = 2
+
+export default msdq

+ 1 - 1
src/config/env.js

@@ -2,7 +2,7 @@ import dev from './dev.js'
 import prod from './prod.js'
 
 // #ifndef H5
-export default dev
+export default prod
 // #endif
 
 // #ifdef H5

+ 4 - 2
src/packageOperate/share/index.vue

@@ -33,6 +33,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import ShareCode from "../../components/share-code/share-code.vue"
 	export default {
 		components: {
@@ -101,7 +102,7 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data
@@ -116,7 +117,8 @@
 			getUrl() {
 				$http.post('/api/v1/mp/user/share/code/generate', {
 					boxId: this.boxId,
-					type: "1"
+					type: "1",
+					appSource: appId,
 				}).then(res => {
 					this.codeUrl = this.posterData.codeImg.url = env.filePublic + res.data
 				})

+ 2 - 1
src/pages/activity/index.vue

@@ -67,6 +67,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	export default {
 		data() {
 			return {
@@ -167,7 +168,7 @@
 				})
 			},
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data

+ 2 - 1
src/pages/core/index.vue

@@ -157,6 +157,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
 	export default {
 		components: {
@@ -491,7 +492,7 @@
 				})
 			},
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data

+ 2 - 1
src/pages/index/index.vue

@@ -145,6 +145,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
 	import PayPopup from '../../components/pay-popup/pay-popup.vue'
 	export default {
@@ -582,7 +583,7 @@
 			},
 
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data

+ 2 - 1
src/pages/login/code.vue

@@ -30,6 +30,7 @@
 
 <script>
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
 		components: {
@@ -131,7 +132,7 @@
 			},
 
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						uni.setStorageSync('userInfo', res.data)

+ 7 - 4
src/pages/login/index.vue

@@ -48,6 +48,7 @@
 <script>
 	import $http from '@/utils/request.js'
 	import log from '@/common/log.js'
+	import appId from '@/config/appId.js'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
 		components: {
@@ -75,7 +76,8 @@
 						$http.post('/api/v1/mp/user/wxauth/mobile', {
 							...e.detail,
 							identity: 1,
-							noToken: true
+							noToken: true,
+							appSource: appId,
 						}).then(res => {
 							uni.hideLoading();
 							if (res.code == 0) {
@@ -107,7 +109,8 @@
 									...e.detail,
 									loginCode: res.code,
 									identity: 1,
-									noToken: true
+									noToken: true,
+									appSource: appId,
 								}).then(res => {
 									uni.hideLoading();
 									if (res.code == 0) {
@@ -166,7 +169,7 @@
 			},
 
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						uni.setStorageSync('userInfo', res.data)
@@ -186,7 +189,7 @@
 				})
 			},
 			getBaseInfoAli() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						uni.setStorageSync('userInfo', res.data)

+ 2 - 1
src/pages/ticketBox/detail.vue

@@ -130,6 +130,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import PayPopup from '../../components/pay-popup/pay-popup.vue'
 	export default {
 		components: {
@@ -387,7 +388,7 @@
 			},
 			
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data

+ 2 - 1
src/pages/user/index.vue

@@ -99,6 +99,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
@@ -145,7 +146,7 @@
 			},
 
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
 					if (res.code == 0) {
 						this.userInfo = res.data
 						this.avatar = env.filePublic + res.data.avatar