浏览代码

Merge branch 'dev' into 'master'

Dev

See merge request quanshu/mp-ui-user!42
zhong chunping 3 年之前
父节点
当前提交
645c764ca2

+ 38 - 13
src/App.vue

@@ -1,21 +1,34 @@
 <script>
 	import $http from '@/utils/request.js'
+	import { urlParameter } from '@/utils/util.js'
 	export default {
 		globalData: {
 			userInfo: {},
 		},
-		onLaunch: function() {
+		onLaunch: function(options) {
 			uni.hideTabBar()
+			if (options.query && options.query.qrCode) {
+				const { qrCode } = options.query
+				let parameter = urlParameter(qrCode)
+				uni.setStorageSync('code', parameter.id)
+			}
 		},
-		onShow: function() {
+		onShow: function(options) {
+			uni.hideTabBar()
+			if (options.query && options.query.qrCode) {
+				const { qrCode } = options.query
+				let parameter = urlParameter(qrCode)
+				uni.setStorageSync('code', parameter.id)
+			}
 			this.updateManager()
+			this.anotherApplet()
 		},
 		methods: {
 			updateManager() {
 				const updateManager = uni.getUpdateManager();
-				if(updateManager){
+				if (updateManager) {
 					updateManager.onCheckForUpdate(res => {
-					// 请求完新版本信息的回调
+						// 请求完新版本信息的回调
 					})
 					updateManager.onUpdateReady(() => {
 						uni.showModal({
@@ -40,6 +53,18 @@
 					})
 				}
 			},
+			anotherApplet() {
+				$http.post('/api/v1/mp/user/isJump', {}).then(res => {
+					if(res.data) {
+						uni.setStorageSync('anotherApplet',true)
+						uni.switchTab({
+							url:'/pages/index/index'
+						})
+					}else {
+						uni.removeStorageSync('anotherApplet')
+					}
+				})
+			},
 		}
 	}
 </script>
@@ -72,35 +97,35 @@
 		align-items: center;
 		justify-content: center;
 	}
-	
-	.ells{
+
+	.ells {
 		overflow: hidden;
 		text-overflow: ellipsis;
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
 		-webkit-line-clamp: 2;
 	}
-	
-	.ells-one{
+
+	.ells-one {
 		overflow: hidden;
 		text-overflow: ellipsis;
 		display: -webkit-box;
 		-webkit-box-orient: vertical;
 		-webkit-line-clamp: 1;
 	}
-	
+
 	@font-face {
-	    font-family: 'YouSheBiaoTiHei';
-	    src: url('https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/YouSheBiaoTiHei.ttf');
+		font-family: 'YouSheBiaoTiHei';
+		src: url('https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/YouSheBiaoTiHei.ttf');
 	}
-	
+
 	// 只有在app.vue里面定义的keyframes才能在style里面使用
 	@keyframes moveLeft {
 		0% {
 			-webkit-transform: translate3d(0, 0, 0);
 			transform: translate3d(0, 0, 0);
 		}
-	
+
 		100% {
 			-webkit-transform: translate3d(-100%, 0, 0);
 			transform: translate3d(-100%, 0, 0);

+ 2 - 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,7 @@
 				});
 				$http.post('/api/v1/mp/user/marketing/help', {
 					inviteCode: this.inviteCode,
-					marketingId: this.marketingId
+					marketingId: this.marketingId,
 				}).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {

+ 108 - 104
src/components/auth/auth.vue

@@ -1,111 +1,115 @@
 <template>
-  <view>
-    <u-popup :show="authShow" mode="bottom">
-      <view class="auth-wrap">
-        <view class="tip">为了正常使用功能,请授权用户信息。</view>
-        <!-- #ifdef MP-ALIPAY -->
-        <button :loading="authIng" @click="getInfoAli()" type="default">授权</button>
-        <view style="height: 100rpx;"></view>
-        <!-- #endif -->
-        <!-- #ifndef MP-ALIPAY -->
-        <button :loading="authIng" @click="getInfo()" type="default">授权</button>
-        <!-- #endif -->
-      </view>
-    </u-popup>
-  </view>
+	<view>
+		<u-popup :show="authShow" mode="bottom">
+			<view class="auth-wrap">
+				<view class="tip">为了正常使用功能,请授权用户信息。</view>
+				<!-- #ifdef MP-ALIPAY -->
+				<button :loading="authIng" @click="getInfoAli()" type="default">授权</button>
+				<view style="height: 100rpx;"></view>
+				<!-- #endif -->
+				<!-- #ifndef MP-ALIPAY -->
+				<button :loading="authIng" @click="getInfo()" type="default">授权</button>
+				<!-- #endif -->
+			</view>
+		</u-popup>
+	</view>
 </template>
 
 <script>
-  import $http from '../../utils/request.js'
-  export default {
-    name: "auth",
-    props: {
-      authShow: {
-        type: Boolean,
-        default: true
-      },
-      authToken: {
-        type: String,
-        default: ''
-      },
-      authMobile: {
-        type: String,
-        default: ''
-      }
-    },
-    data() {
-      return {
-        authIng: false
-      };
-    },
-    methods: {
-      getInfo() {
-        let _this = this
-        if (this.authIng) {
-          return
-        }
-        _this.authIng = true
-        uni.getUserProfile({
-          desc: '用于填充用户默认信息',
-          success(info) {
-            uni.login({
-              success(res) {
-                $http.post('/api/v1/mp/user/wxauth', {
-                  ...{
-                    identity: 1,
-                    code: res.code
-                  },
-                  ...info.userInfo
-                }).then(res => {
-                  _this.authIng = false
-                  if (res.code === 0) {
-                    uni.$u.toast('授权成功');
-                    _this.authIng = false
-                    _this.$emit('close')
-                  }
-                }).catch(() => {
-                  _this.authIng = false
-                })
-              }
-            })
-          },
-          fail() {
-            _this.authIng = false
-          }
-        })
-      },
-      
-      
-      getInfoAli(){
-        let _this = this
-        if (this.authIng) {
-          return
-        }
-        _this.authIng = true
-        my.getAuthCode ({
-          scopes : ['auth_user'],
-          success: (res) => {
-            $http.post('/api/v1/mp/user/aliAuth', {code: res.authCode}).then(res => {
-              _this.authIng = false
-              if (res.code === 0) {
-                uni.$u.toast('授权成功');
-                _this.authIng = false
-                _this.$emit('close')
-              }
-            }).catch(() => {
-              _this.authIng = false
-            })
-          },
-		  fail: (res)=>{
-				uni.$u.toast('授权失败');
-				uni.removeStorageSync('token')
-				_this.authIng = false
-				_this.$emit('fail')
-		  }
-        })
-      }
-    }
-  }
+	import $http from '../../utils/request.js'
+	import appId from '@/config/appId.js'
+	export default {
+		name: "auth",
+		props: {
+			authShow: {
+				type: Boolean,
+				default: true
+			},
+			authToken: {
+				type: String,
+				default: ''
+			},
+			authMobile: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				authIng: false
+			};
+		},
+		methods: {
+			getInfo() {
+				let _this = this
+				if (this.authIng) {
+					return
+				}
+				_this.authIng = true
+				uni.getUserProfile({
+					desc: '用于填充用户默认信息',
+					success(info) {
+						uni.login({
+							success(res) {
+								$http.post('/api/v1/mp/user/wxauth', {
+									...{
+										identity: 1,
+										code: res.code
+									},
+									...info.userInfo,
+									appSource: appId
+								}).then(res => {
+									_this.authIng = false
+									if (res.code === 0) {
+										uni.$u.toast('授权成功');
+										_this.authIng = false
+										_this.$emit('close')
+									}
+								}).catch(() => {
+									_this.authIng = false
+								})
+							}
+						})
+					},
+					fail() {
+						_this.authIng = false
+					}
+				})
+			},
+
+
+			getInfoAli() {
+				let _this = this
+				if (this.authIng) {
+					return
+				}
+				_this.authIng = true
+				my.getAuthCode({
+					scopes: ['auth_user'],
+					success: (res) => {
+						$http.post('/api/v1/mp/user/aliAuth', {
+							code: res.authCode
+						}).then(res => {
+							_this.authIng = false
+							if (res.code === 0) {
+								uni.$u.toast('授权成功');
+								_this.authIng = false
+								_this.$emit('close')
+							}
+						}).catch(() => {
+							_this.authIng = false
+						})
+					},
+					fail: (res) => {
+						uni.$u.toast('授权失败');
+						uni.removeStorageSync('token')
+						_this.authIng = false
+						_this.$emit('fail')
+					}
+				})
+			}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>

+ 30 - 15
src/components/pay-popup/pay-popup.vue

@@ -34,7 +34,12 @@
 								@change="changeChecked"></u-checkbox>
 						</u-checkbox-group>
 					</view>
+					<!-- #ifndef MP-ALIPAY -->
 					<view class="txt" @click="toRule">同意《盲票购买协议》</text></view>
+					<!-- #endif -->
+					<!-- #ifdef MP-ALIPAY -->
+					<view class="txt">同意《盲票购买协议》</text></view>
+					<!-- #endif -->
 				</view>
 				<view class="flex btn">
 					<view class="flex btn-left">
@@ -54,6 +59,7 @@
 
 <script>
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
 		name: "pay-popup",
@@ -135,29 +141,36 @@
 							// #ifdef MP-ALIPAY
 							let data = {
 								orderId: res.data.orderId,
-								payType: 1
+								payType: 1,
+								appSource: appId 
 							}
 							// #endif
 							// #ifndef MP-ALIPAY
 							let data = {
 								orderId: res.data.orderId,
-								payType: 2
+								payType: 2,
+								appSource: appId
 							}
 							// #endif
 							$http.post('/api/v1/mp/user/ticket/order/pay', data).then(ele => {
 								if (ele.code == 0) {
 									// #ifdef MP-ALIPAY
-									uni.requestPayment({
-										orderInfo: ele.data.pay_info,
-										success() {
-											uni.showToast({
-												title: '支付成功',
-												icon: 'success',
-												duration: 2000
-											})
-											_this.success(res.data.orderId)
+									my.tradePay({
+										tradeNO: ele.data.pay_info,
+										success:(resu) => {
+											if(resu.resultCode == '9000'){
+												uni.showToast({
+													title: '支付成功',
+													icon: 'success',
+													duration: 2000
+												})
+												_this.success(res.data.orderId)//跳转抽奖详情页
+											}else {
+												payIng = false
+												_this.close()
+											}
 										},
-										fail() {
+										fail:(resu) => {
 											payIng = false
 											_this.close()
 										}
@@ -187,15 +200,17 @@
 									
 								} else if (ele.code == 1005) {
 									_this.authShow = true
+								} else if (ele.code == 1026) {
+									_this.authShow = true
 								} else {
 									payIng = false
 									_this.close()
-									uni.$u.toast('支付失败!');
+									uni.$u.toast('支付失败');
 								}
 							}).catch(() => {
 								payIng = false
 								_this.close()
-								uni.$u.toast('支付失败!');
+								uni.$u.toast('支付异常');
 							})
 						} else {
 							uni.showToast({
@@ -217,7 +232,7 @@
 				}).catch(() => {
 					uni.hideLoading();
 					payIng = false
-					uni.$u.toast('支付失败!');
+					uni.$u.toast('订单创建失败');
 				})
 			},
 

+ 7 - 0
src/config/appId.js

@@ -0,0 +1,7 @@
+const mp = 1
+
+const msdq = 2
+
+const zfb = 3
+
+export default msdq

+ 3 - 1
src/packageGoods/coupon/index.vue

@@ -54,6 +54,7 @@
 
 <script>
 	import env from '../../config/env.js'
+	import appId from '@/config/appId.js'
 	import $http from '@/utils/request.js'
 	export default {
 		data() {
@@ -148,7 +149,8 @@
 					autoCoupon: 0,
 					boxId: this.boxId,
 					ticketId: this.ticketId,
-					orderNum: 1
+					orderNum: 1,
+					appSource: appId
 				}
 				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
 					if (res.code == 0) {

+ 1 - 0
src/packageGoods/goods/list.vue

@@ -193,6 +193,7 @@
 			border-radius: 34px;
 			padding-left: 24rpx;
 			margin-bottom: 32rpx;
+			padding-right: 30rpx;
 		}
 		
 		// 选择

+ 45 - 5
src/packageGoods/order/detail.vue

@@ -110,6 +110,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
 		components: {
@@ -191,13 +192,49 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/deliver/order/pay', {
+				// #ifdef MP-ALIPAY
+				let data = {
 					orderId: _this.info.orderId,
-					payType: 2
-				}).then(ele => {
+					payType: 1,
+					appSource: appId 
+				}
+				// #endif
+				// #ifndef MP-ALIPAY
+				let data = {
+					orderId: _this.info.orderId,
+					payType: 2,
+					appSource: appId 
+				}
+				// #endif
+				$http.post('/api/v1/mp/user/deliver/order/pay', data).then(ele => {
 					payIng = true
 					uni.hideLoading();
 					if (ele.code == 0) {
+						// #ifdef MP-ALIPAY
+						my.tradePay({
+							tradeNO: ele.data.pay_info,
+							success(resu) {
+								if(resu.resultCode == '9000'){
+									uni.showToast({
+										title: '支付成功',
+										icon: 'success',
+										duration: 2000
+									})
+									setTimeout(() => {
+										uni.navigateBack({
+											delta: 1
+										})
+									}, 500)
+								}else {
+									payIng = false
+								}
+							},
+							fail() {
+								payIng = false
+							}
+						})
+						// #endif
+						// #ifndef MP-ALIPAY
 						uni.requestPayment({
 							timeStamp: ele.data.timeStamp,
 							nonceStr: ele.data.nonceStr,
@@ -220,15 +257,18 @@
 								payIng = false
 							}
 						})
+						// #endif
 					} else if (ele.code == 1005) {
 						_this.authShow = true
+					} else if (ele.code == 1026) {
+						_this.authShow = true
 					} else {
 						payIng = false
-						uni.$u.toast('支付失败!');
+						uni.$u.toast(res.msg);
 					}
 				}).catch(() => {
 					payIng = false
-					uni.$u.toast('支付失败!');
+					uni.$u.toast('支付失败');
 					uni.hideLoading();
 				})
 			},

+ 41 - 5
src/packageGoods/order/index.vue

@@ -70,6 +70,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
 		components: {
@@ -176,13 +177,45 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/deliver/order/pay', {
+				// #ifdef MP-ALIPAY
+				let data = {
 					orderId: item.orderId,
-					payType: 2
-				}).then(ele => {
+					payType: 1,
+					appSource: appId 
+				}
+				// #endif
+				// #ifndef MP-ALIPAY
+				let data = {
+					orderId: item.orderId,
+					payType: 2,
+					appSource: appId
+				}
+				// #endif
+				$http.post('/api/v1/mp/user/deliver/order/pay', data).then(ele => {
 					uni.hideLoading();
 					payIng = true
 					if (ele.code == 0) {
+						// #ifdef MP-ALIPAY
+						my.tradePay({
+							tradeNO: ele.data.pay_info,
+							success(resu) {
+								if(resu.resultCode == '9000'){
+									uni.showToast({
+										title: '支付成功',
+										icon: 'success',
+										duration: 2000
+									})
+									_this.pageList()
+								}else {
+									payIng = false
+								}
+							},
+							fail() {
+								payIng = false
+							}
+						})
+						// #endif
+						// #ifndef MP-ALIPAY
 						uni.requestPayment({
 							timeStamp: ele.data.timeStamp,
 							nonceStr: ele.data.nonceStr,
@@ -201,15 +234,18 @@
 								payIng = false
 							}
 						})
+						// #endif
 					} else if (ele.code == 1005) {
 						_this.authShow = true
+					} else if (ele.code == 1026) {
+						_this.authShow = true
 					} else {
 						payIng = false
-						uni.$u.toast('支付失败!');
+						uni.$u.toast(res.msg);
 					}
 				}).catch(() => {
 					payIng = false
-					uni.$u.toast('支付失败!');
+					uni.$u.toast('订单创建失败');
 					uni.hideLoading();
 				})
 			},

+ 27 - 30
src/packageGoods/order/logistics.vue

@@ -21,7 +21,7 @@
 								}" itemStyle="padding-left: 15px; padding-right: 15px; height: 44px;text-align: center;">
 			</u-tabs>
 		</view>
-		
+
 		<!-- 商品 -->
 		<view class="goods">
 			<view class="goods-title">商品信息</view>
@@ -36,7 +36,7 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 配送方式 -->
 		<view class="mode">
 			<view class="mode-item">
@@ -53,7 +53,7 @@
 				</view>
 			</view>
 		</view>
-		
+
 		<!-- 物流信息 -->
 		<view class="logistics" v-if="deliverListData[listIndex][0].companyName && logistics!==''">
 			<!-- #ifdef MP-ALIPAY -->
@@ -61,8 +61,7 @@
 			<!-- #endif -->
 			<!-- #ifndef MP-ALIPAY -->
 			<u-steps current="0" direction="column" dot activeColor="#F9822C">
-				<u-steps-item :desc="item.desc" :title="item.title"
-					v-for="(item,index) in logistics">
+				<u-steps-item :desc="item.desc" :title="item.title" v-for="(item,index) in logistics">
 				</u-steps-item>
 			</u-steps>
 			<!-- #endif -->
@@ -109,23 +108,21 @@
 		methods: {
 			changeTab(e) {
 				this.listIndex = e.index
-				if (this.deliverListData[this.listIndex][0].deliveryFlowId == "") {
-					return
-				}
+				if (this.deliverListData[this.listIndex][0].deliveryFlowId == "") return
+
 				let data = {
 					deliveryFlowId: this.deliverListData[this.listIndex][0].deliveryFlowId,
 					deliveryId: this.deliverListData[this.listIndex][0].deliveryId,
 				}
 				$http.post('/api/v1/mp/logistics/query', data).then(res => {
 					if (res.code == 0) {
-						this.logistics = res.data.map(item=>{
+						this.logistics = res.data.map(item => {
 							return {
 								title: item.status + '   ' + item.time,
 								desc: item.context
 							}
 						})
-						console.log(this.logistics);
-					}else {
+					} else {
 						this.logistics = ''
 						uni.hideToast();
 					}
@@ -151,9 +148,9 @@
 						item.items.forEach((ele) => {
 							let picUrlArr = ele.picUrl.split(",");
 							ele.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170';
-							this.ListData.push(item.items)
-							this.packList.push({ name: `包裹${ index + 1 }` })
 						});
+						this.ListData.push(item.items)
+						this.packList.push({ name: `包裹${ index + 1 }` })
 					});
 					this.deliverListData = this.ListData
 					this.list = res.data.items
@@ -162,7 +159,7 @@
 					uni.hideLoading();
 				})
 			},
-			
+
 			copyDeliveryFlowId(id) {
 				uni.setClipboardData({
 					data: id,
@@ -187,52 +184,52 @@
 		display: flex;
 		background-color: #fff;
 	}
-	
+
 	// 商品
 	.goods {
 		margin: 26rpx 34rpx 22rpx;
 		background-color: #fff;
 		padding: 20rpx 36rpx;
 		border-radius: 20rpx;
-		
+
 		&-title {
 			font-size: 30rpx;
 			line-height: 30rpx;
 			margin-bottom: 22rpx;
 		}
-		
+
 		// 商品列表
-		&-item{
+		&-item {
 			display: flex;
-			
+
 			image {
 				width: 220rpx;
 				height: 200rpx;
 				border-radius: 12rpx;
 				margin-right: 24rpx;
 			}
-			
+
 			.info {
 				display: flex;
 				flex-direction: column;
 				justify-content: space-between;
 				flex: 1;
 				padding: 8rpx 0;
-				
+
 				&-title {
 					font-weight: bold;
 					line-height: 40rpx;
 				}
-				
+
 				&-num {
 					justify-content: space-between;
-					
+
 					&-sku {
 						flex: 1;
 						color: #666666;
 						font-size: 26rpx;
 					}
-					
+
 					&-goods {
 						color: #666666;
 						font-size: 26rpx;
@@ -241,18 +238,18 @@
 			}
 		}
 	}
-	
+
 	// 配送方式
 	.mode {
 		margin: 0 34rpx 22rpx;
 		background-color: #fff;
 		padding: 20rpx 36rpx;
 		border-radius: 20rpx;
-		
+
 		&-item {
 			display: flex;
 			margin-bottom: 22rpx;
-			
+
 			.copy {
 				height: 100%;
 				margin-left: 8rpx;
@@ -262,19 +259,19 @@
 				line-height: 24rpx;
 				padding: 0 6rpx;
 				background-color: rgba(153, 153, 153, .1);
-				
+
 				text {
 					display: inline-block;
 					transform: scale(0.8);
 				}
 			}
 		}
-		
+
 		&-item:last-child {
 			margin-bottom: 0;
 		}
 	}
-	
+
 	// 物流信息
 	.logistics {
 		margin: 0 34rpx 22rpx;

+ 67 - 8
src/packageGoods/order/settlement.vue

@@ -71,7 +71,12 @@
 			
 			<view class="settlement-freight flex">
 				<text>留言</text>
+				<!-- #ifndef MP-ALIPAY -->
 				<u-input v-model="info.memo" placeholder="请输入留言" clearable  inputAlign="right" border="none" />
+				<!-- #endif -->
+				<!-- #ifdef MP-ALIPAY -->
+				<u-input v-model="info.memo" placeholder="请输入留言" inputAlign="right" border="none" />
+				<!-- #endif -->
 			</view>
 			<view class="settlement-freight flex">
 				<text>运费</text>
@@ -113,6 +118,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import AreaPicker from '../../components/area-picker/area-picker.vue'
 	import Auth from '../../components/auth/auth.vue'
 	export default {
@@ -186,11 +192,59 @@
 					uni.hideLoading();
 					if (res.code == 0) {
 						if (res.data.needPay == 1) {
-							$http.post('/api/v1/mp/user/deliver/order/pay', {
+							// #ifdef MP-ALIPAY
+							let data = {
 								orderId: res.data.orderId,
-								payType: 2
-							}).then(ele => {
+								payType: 1,
+								appSource: appId 
+							}
+							// #endif
+							// #ifndef MP-ALIPAY
+							let data = {
+								orderId: res.data.orderId,
+								payType: 2,
+								appSource: appId
+							}
+							// #endif
+							$http.post('/api/v1/mp/user/deliver/order/pay', data).then(ele => {
 								if (ele.code == 0) {
+									// #ifdef MP-ALIPAY
+									my.tradePay({
+										tradeNO: ele.data.pay_info,
+										success(resu) {
+											if(resu.resultCode == '9000'){
+												uni.showToast({
+													title: '支付成功',
+													icon: 'success',
+													duration: 2000
+												})
+												setTimeout(() => {
+													uni.redirectTo({
+														url: `/packageGoods/order/index`
+													})
+												}, 500)
+											}else {
+												payIng = false
+												setTimeout(() => {
+													uni.redirectTo({
+														url: `/packageGoods/order/index`
+													})
+												}, 500)
+											}
+											
+										},
+										fail() {
+											payIng = false
+											setTimeout(() => {
+												uni.redirectTo({
+													url: `/packageGoods/order/index`
+												})
+											}, 500)
+										}
+									})
+									// #endif
+									
+									// #ifndef MP-ALIPAY
 									uni.requestPayment({
 										timeStamp: ele.data.timeStamp,
 										nonceStr: ele.data.nonceStr,
@@ -218,11 +272,15 @@
 											}, 500)
 										}
 									})
+									// #endif
+									
 								} else if (ele.code == 1005) {
 									_this.authShow = true
+								} else if (ele.code == 1026) {
+									_this.authShow = true
 								} else {
 									payIng = false
-									uni.$u.toast('支付失败!');
+									uni.$u.toast('支付失败');
 									setTimeout(() => {
 										uni.redirectTo({
 											url: `/packageGoods/order/index`
@@ -231,7 +289,7 @@
 								}
 							}).catch(() => {
 								payIng = false
-								uni.$u.toast('支付失败!');
+								uni.$u.toast('支付异常');
 								setTimeout(() => {
 									uni.redirectTo({
 										url: `/packageGoods/order/index`
@@ -252,11 +310,11 @@
 						}
 					} else {
 						payIng = false
-						uni.$u.toast('提交失败!');
+						uni.$u.toast(res.msg);
 					}
 				}).catch(() => {
 					payIng = false
-					uni.$u.toast('提交失败!');
+					uni.$u.toast('订单创建失败');
 					uni.hideLoading();
 				})
 			},
@@ -266,11 +324,12 @@
 					title: '加载中'
 				});
 				let data = {
-					ids: this.ids
+					ids: this.ids,
 				}
 				if(this.payment != ""){
 					data = this.payment
 				}
+				data.appSource = appId
 				$http.post('/api/v1/mp/user/deliver/order/settle', data ).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {

+ 38 - 11
src/packageGoods/ticket/index.vue

@@ -1,7 +1,8 @@
 <template>
 	<view>
 		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表" leftIconSize="0"></u-navbar>
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表" leftIconSize="0">
+		</u-navbar>
 		<!-- #endif -->
 		<!-- #ifndef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表"></u-navbar>
@@ -18,16 +19,20 @@
 						<!-- #ifndef MP-ALIPAY -->
 						<view class="title ells-one">{{ item.title }}</view>
 						<!-- #endif -->
-						
+
 						<view class="price">¥{{ $numberFormat(item.salePrice) }}</view>
 					</view>
 				</navigator>
 				<view style="width: 100%;">
-					<u-loadmore :line="true" v-if="list.length>8" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+					<u-loadmore :line="true" v-if="list.length>8" :status="status" :loading-text="'努力加载中'"
+						:nomore-text="'已经到底了'" />
 				</view>
 			</view>
 			<view class="flex empty" v-if="!list.length">
-				<u-empty text="数据为空" mode="order" />
+				<view class="center">
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode="scaleToFill"></image>
+					<view class="center-font">还没有盲票</view>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -39,13 +44,17 @@
 	export default {
 		data() {
 			return {
-				status: 'nomore',//上拉刷新状态
+				status: 'nomore', //上拉刷新状态
 				pageNum: 1,
 				total: 0,
 				list: [],
+				ids: []
 			};
 		},
-		onLoad() {
+		onLoad(options) {
+			if (options.ids) {
+				this.ids = JSON.parse(options.ids)
+			}
 			this.getList()
 		},
 		methods: {
@@ -57,7 +66,8 @@
 					categoryId: '',
 					tagId: '',
 					type: 'online',
-					noToken: true
+					noToken: true,
+					boxIds: this.ids
 				}
 				$http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
 					res => {
@@ -77,12 +87,12 @@
 		},
 
 		onReachBottom() {
-			if(this.total < this.pageNum * 20) return ;
+			if (this.total < this.pageNum * 20) return;
 			this.status = 'loading';
 			// setTimeout(() => {
 			++this.pageNum
-			if(this.total < this.pageNum * 20) this.status = 'nomore';
-				else this.status = 'loading';
+			if (this.total < this.pageNum * 20) this.status = 'nomore';
+			else this.status = 'loading';
 			this.getList()
 			// }, 2000)
 		},
@@ -124,6 +134,7 @@
 					font-size: 36rpx;
 					font-weight: bold;
 				}
+
 				.titletwo {
 					width: 100%;
 					line-height: 40rpx;
@@ -148,7 +159,23 @@
 		}
 
 		.empty {
-			height: 60vh;
+			height: 50vh;
+			
+			.center {
+				text-align: center;
+			
+				&-img {
+					width: 228rpx;
+					height: 320rpx;
+				}
+			
+				&-font {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #999999;
+					margin-bottom: 250rpx;
+				}
+			}
 		}
 	}
 </style>

+ 35 - 20
src/packageOperate/activity/index.vue

@@ -238,6 +238,7 @@
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
 	import log from '@/common/log.js'
+	import appId from '@/config/appId.js'
 	import ActivityHelp from '@/components/activity-help/activity-help.vue'
 	import {
 		formatRichText
@@ -269,17 +270,6 @@
 			if (opthios.id) {
 				this.id = opthios.id
 			}
-			/**
-			 * 免费活动邀请助力分享跳转接收参数
-			 * inviteCodeTa: 邀请码
-			 * marketingId: 活动id
-			 * */
-			if (opthios.inviteCode && opthios.marketingId) {
-				this.inviteCodeTa = opthios.inviteCode
-				this.marketingId = opthios.marketingId
-				this.id = opthios.marketingId
-				this.activityShow = true
-			}
 			if (opthios.userId) {
 				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
 				if (opthios.userId === undefined || opthios.userId === 'undefined') {
@@ -295,8 +285,18 @@
 			if (opthios.type) {
 				uni.setStorageSync('shareType', opthios.type)
 			}
+			/**
+			 * 免费活动邀请助力分享跳转接收参数
+			 * inviteCodeTa: 邀请码
+			 * marketingId: 活动id
+			 * */
+			if (opthios.inviteCode && opthios.marketingId) {
+				this.inviteCodeTa = opthios.inviteCode
+				this.marketingId = opthios.marketingId
+				this.id = opthios.marketingId
+				this.activityShow = true
+			}
 			this.getDetail()
-
 		},
 		onShow() {
 			this.pagesNum = getCurrentPages().length
@@ -358,13 +358,25 @@
 			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: ['92xxL8XTRPLROyNUtmN04OT0kyq4iwSCH3sz-j6zbZs',
+							'FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0',
+							'3y_My-yRmqmGd3-f-vAwNaK4LQeehzXBSNDi_5wcnFI',
+						],
+						success(res) {}
+					})
+				}else if (appId == 2) {
+					//微信码上快购小程序
+					uni.requestSubscribeMessage({
+						tmplIds: ['b2mMyGHeNQ03D3CZl3iUkDxY0F94ytRAUWgoCKq2Nik',
+							'bEdEYrjbE6r0647j8o9bgWqSrIqcRJLmaiqqxYkg1-Y',
+						],
+						success(res) {}
+					})
+				}
+
 			},
 			//立即参与抽奖
 			exChangeCode() {
@@ -394,7 +406,9 @@
 			},
 
 			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
@@ -411,6 +425,7 @@
 		},
 		//分享朋友圈
 		onShareTimeline() {
+			console.log(this.userInfo.userId);
 			return {
 				title: '超值宝贝免费抽,参与活动仅需3秒',
 				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/free_draw_bkg.jpeg',

+ 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
 				})

文件差异内容过多而无法显示
+ 7 - 1
src/packageOther/about/conceal.vue


+ 6 - 1
src/packageOther/about/index.vue

@@ -10,7 +10,12 @@
 		<view class="about">
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
-				<view class="edition">v 2.1.8</view>
+				<!-- #ifndef MP-ALIPAY -->
+				<view class="edition">v 2.1.10</view>
+				<!-- #endif -->
+				<!-- #ifdef MP-ALIPAY -->
+				<view class="edition">v 2.1.25</view>
+				<!-- #endif -->
 			</view>
 			<view class="about-action">
 				<u-cell-group :border="false">

文件差异内容过多而无法显示
+ 7 - 1
src/packageOther/about/protect.vue


文件差异内容过多而无法显示
+ 7 - 1
src/packageOther/rule/index.vue


+ 9 - 0
src/packagePrize/choice/index.vue

@@ -284,10 +284,19 @@
 					if (res.code == 0) {
 						this.detailShow = true
 						// 处理富文本
+						// #ifndef MP-ALIPAY
 						const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
 							.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
 								".png?imageView2/2/w/750\"");
 						this.description = formatRichText(description);
+						// #endif
+						
+						// #ifdef MP-ALIPAY
+						res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+						res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+						res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
+						this.description = formatRichText(res.data.description);
+						// #endif
 					}
 				}).catch(() => {
 					uni.hideLoading();

+ 3 - 1
src/packagePrize/goods/detail.vue

@@ -46,6 +46,7 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
 	import { formatRichText } from '@/utils/util.js'
 	export default {
 		data() {
@@ -112,7 +113,8 @@
 					autoCoupon: 1,
 					boxId: this.info.boxId,
 					ticketId: this.info.ticketId,
-					orderNum: 1
+					orderNum: 1,
+					appSource: appId
 				}
 				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
 					if (res.code == 0) {

+ 19 - 15
src/packagePrize/prize/index.vue

@@ -43,10 +43,10 @@
 				</u-tabs>
 			</view>
 			<!-- 商品状态 -->
-			<view class="prize-state-type flex" v-if="state == 0">
+			<!-- <view class="prize-state-type flex" v-if="state == 0">
 				<view class="prize-state-type-item" :class="{ 'prize-state-type-item__action': index == typeIndex }"
 					v-for="(item, index) in typeList" :key="index" @click="typeState(index)">{{ item.name }}</view>
-			</view>
+			</view> -->
 		</view>
 		<!-- 实物商品 -->
 		<view class="prize-goods" v-if="state == 0">
@@ -75,11 +75,11 @@
 					<!-- 来源 -->
 					<view class="prize-goods-list-item__btn flex" v-if="item.status == 1">
 						<view class="type">来自:{{ item.inType && item.inType.desc }}</view>
-						<view class="btn" @click="toRecovery(item)" v-if="item.inType.value == '1' || item.inType.value == '2'">兑换盲豆</view>
+						<!-- <view class="btn" @click="toRecovery(item)" v-if="item.inType.value == '1' || item.inType.value == '2'">兑换盲豆</view> -->
 					</view>
 					<view class="prize-goods-list-item__btn flex" v-else>
 						<view class="type"></view>
-						<view class="btnTwo">已兑换</view>
+						<!-- <view class="btnTwo">已兑换</view> -->
 					</view>
 				</view>
 				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
@@ -189,11 +189,13 @@
 				}, {
 					name: ' 优惠券',
 				}],
-				typeList: [{
-					name: '待提货'
-				}, {
-					name: '已兑换'
-				}],
+				// typeList: [{
+				// 	name: '待提货'
+				// }, 
+				// {
+				// 	name: '已兑换'
+				// },
+				// ],
 				typeIndex: 0,
 				state: 0,
 				checkedAll: false,
@@ -531,7 +533,8 @@
 			},
 
 			toPrizeDetail(item) {
-				let data = JSON.parse(item.useArea)
+				let boxIds = JSON.stringify(item.boxIds)
+				let useArea = JSON.parse(item.useArea)
 				let type = JSON.parse(item.type)
 				// 1判断type,如果为门店直接跳转不需要判断useArec
 				if (type.value == 2) {
@@ -541,21 +544,21 @@
 					})
 				} else {
 					// 3为线上票使用
-					if (data.value == 3) {
+					if (useArea.value == 3 || useArea.value == 1) {
 						uni.navigateTo({
-							url: `/packageGoods/ticket/index`
+							url: `/packageGoods/ticket/index?ids=${ boxIds }`
 						})
 					}
 
 					//0为通用优惠券
-					if (data.value == 0) {
+					if (useArea.value == 0) {
 						uni.navigateTo({
 							url: `/packageGoods/ticket/index`
 						})
 					}
 
 					// 4为线下票使用
-					if (data.value == 4) {
+					if (useArea.value == 4 || useArea.value == 4) {
 						uni.navigateTo({
 							url: `/packagePrize/coupon/detail?id=${ item.id }`
 						})
@@ -616,7 +619,8 @@
 
 	// 实物商品
 	.prize-goods {
-		margin-top: 180rpx;
+		// margin-top: 180rpx;
+		margin-top: 70rpx;
 		padding: 34rpx 34rpx 200rpx;
 
 		&-list {

+ 137 - 121
src/packagePrize/rolling/index.vue

@@ -1,13 +1,15 @@
 <template>
 	<view>
 		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票开启" v-if="rollingShow"  leftIconSize="0"></u-navbar>
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票开启" v-if="rollingShow"
+			leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		
+
 		<!-- #ifndef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票开启" v-if="rollingShow"></u-navbar>
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票开启" v-if="rollingShow">
+		</u-navbar>
 		<!-- #endif -->
-		
+
 		<view class="rolling" v-if="rollingShow">
 			<!-- 奖品滚动 -->
 			<view class="rolling-prize">
@@ -16,9 +18,11 @@
 						<view class="rolling-prize-list-item__items flex">
 							<view class="content flex" v-for="(items, indexs) in item" :key="indexs">
 								<image :src="items.picUrl" mode="aspectFit"></image>
-								<view class="content-title ells-one" v-if="items.prizeType && items.prizeType.value != 'coin'">{{ items.title }}</view>
+								<view class="content-title ells-one"
+									v-if="items.prizeType && items.prizeType.value != 'coin'">{{ items.title }}</view>
 								<view class="content-title ells-one" v-else>盲豆</view>
-								<view class="content-price" v-if="items.prizeType && items.prizeType.value != 'coin'">¥{{ $numberFormat(items.value) }}</view>
+								<view class="content-price" v-if="items.prizeType && items.prizeType.value != 'coin'">
+									¥{{ $numberFormat(items.value) }}</view>
 								<view class="content-price" v-else>{{ items.value }}个</view>
 							</view>
 						</view>
@@ -29,16 +33,18 @@
 						<view class="rolling-prize-list-item__items flex">
 							<view class="content flex" v-for="(items, indexs) in item" :key="indexs">
 								<image :src="items.picUrl" mode="aspectFit"></image>
-								<view class="content-title ells-one" v-if="items.prizeType && items.prizeType.value != 'coin'">{{ items.title }}</view>
+								<view class="content-title ells-one"
+									v-if="items.prizeType && items.prizeType.value != 'coin'">{{ items.title }}</view>
 								<view class="content-title ells-one" v-else>盲豆</view>
-								<view class="content-price" v-if="items.prizeType && items.prizeType.value != 'coin'">¥{{ $numberFormat(items.value) }}</view>
+								<view class="content-price" v-if="items.prizeType && items.prizeType.value != 'coin'">
+									¥{{ $numberFormat(items.value) }}</view>
 								<view class="content-price" v-else>{{ items.value }}个</view>
 							</view>
 						</view>
 					</view>
 				</view>
 			</view>
-			
+
 			<!-- 按钮 -->
 			<view class="rolling-btn flex">
 				<view class="rolling-btn-content flex" :class="{ 'btn-stop': btnIng }" @click="stop" v-show="btnShow">
@@ -46,7 +52,7 @@
 					<view class="rolling-btn-content-title">停止滚动</view>
 				</view>
 			</view>
-			
+
 			<!-- 倒计时 -->
 			<view class="rolling-time flex">
 				<view class="num">{{ num }}</view>
@@ -59,7 +65,7 @@
 				<u-icon size="19" color="#fff" name="arrow-left"></u-icon>
 			</view>
 			<!-- #endif -->
-			
+
 			<view class="prize-title flex">
 				<image src="../../packagePrize/static/rolling_title.png" mode="scaleToFill"></image>
 			</view>
@@ -68,28 +74,36 @@
 					<view class="prize-box-popup__image flex">
 						<image :src="prizeInfo.picUrl" mode="aspectFit"></image>
 					</view>
-					<image class="prize-box-popup__rotate" src="../static/rolling_bg1.png" mode="scaleToFill" v-if="rotateShow" />
-					<image class="prize-box-popup__circular" src="../static/rolling_bg2.png" mode="scaleToFill" v-if="circularShow" />
+					<image class="prize-box-popup__rotate" src="../static/rolling_bg1.png" mode="scaleToFill"
+						v-if="rotateShow" />
+					<image class="prize-box-popup__circular" src="../static/rolling_bg2.png" mode="scaleToFill"
+						v-if="circularShow" />
 				</view>
 			</view>
 			<view class="prize-info flex">
 				<view class="prize-info-content">
-					<view class="prize-info-content-price" v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'"><text>¥</text>{{ $numberFormat(prizeInfo.value) }}</view>
+					<view class="prize-info-content-price"
+						v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">
+						<text>¥</text>{{ $numberFormat(prizeInfo.value) }}</view>
 					<view class="prize-info-content-price" v-else>{{ prizeInfo.value }}个</view>
 					<!-- #ifdef MP-ALIPAY -->
-					<view class="prize-info-content-titletwo" v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">{{ prizeInfo.title }}</view>
+					<view class="prize-info-content-titletwo"
+						v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">{{ prizeInfo.title }}</view>
 					<view class="prize-info-content-titletwo" v-else>盲豆</view>
 					<!-- #endif -->
 					<!-- #ifndef MP-ALIPAY -->
-					<view class="prize-info-content-title ells-one" v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">{{ prizeInfo.title }}</view>
+					<view class="prize-info-content-title ells-one"
+						v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">{{ prizeInfo.title }}</view>
 					<view class="prize-info-content-title" v-else>盲豆</view>
 					<!-- #endif -->
-					
+
 					<view class="prize-info-content-btn flex">
 						<view class="prize-info-content-btn-content flex" v-if="isTry == 0">
 							<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
-							<view class="prize-info-content-btn-content-txt" @click="toPrize(prizeInfo.prizeType)" v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">去查看我的奖品</view>
-							<view class="prize-info-content-btn-content-txt" @click="toPrize(prizeInfo.prizeType)" v-else>去商城兑换商品</view>
+							<view class="prize-info-content-btn-content-txt" @click="toPrize(prizeInfo.prizeType)"
+								v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">去查看我的奖品</view>
+							<view class="prize-info-content-btn-content-txt" @click="toPrize(prizeInfo.prizeType)"
+								v-else>去商城兑换商品</view>
 						</view>
 						<view class="prize-info-content-btn-content flex" v-else @click="back">
 							<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
@@ -122,7 +136,7 @@
 				rollingShow: true,
 				statusHeight: 30,
 				btnShow: false,
-				
+
 				boxId: null,
 				isTry: null,
 				orderId: '',
@@ -131,32 +145,29 @@
 				circularShow: true
 			}
 		},
-		
+
 		onLoad(options) {
-			if(options) {
+			if (options) {
 				this.boxId = options.boxId
 				this.isTry = Number(options.isTry)
 				this.orderId = options.orderId
 				this.ticketId = options.ticketId
+				this.getList()
 			}
 			// 创建动画实例
 			this.animation = uni.createAnimation()
-			
+
 			// #ifdef MP-WEIXIN
 			const res = uni.getMenuButtonBoundingClientRect()
 			this.statusHeight = res.top //胶囊距离顶部
 			// #endif
+			
 		},
-		
+
 		onUnload() {
 			// 移除动画
 			this.animationData = {}
 		},
-		
-		mounted() {
-			this.getList()
-		},
-		
 		methods: {
 			getList() {
 				let _this = this
@@ -166,47 +177,49 @@
 					orderId: _this.orderId,
 					ticketId: _this.ticketId
 				}
-				
+
 				let num = 0
 				let time = setInterval(() => {
-					num ++
+					num++
 					uni.showLoading({
 						title: '加载中'
 					});
 					$http.post('/api/v1/mp/user/ticket/autoCashPrize', data).then(res => {
-						if(res.code == 0) {
+						if (res.code == 0) {
 							clearInterval(time)
 							_this.list = res.data.ticketAwardsPrizeList
 							_this.list.forEach(item => {
 								item.forEach(ele => {
-									ele.picUrl = env.filePublic + ele.picUrl.split(',')[0] + '?imageView2/2/w/170'
+									ele.picUrl = env.filePublic + ele.picUrl.split(',')[
+										0] + '?imageView2/2/w/170'
 									ele.prizeType = JSON.parse(ele.prizeType)
 								})
 							})
-							_this.prizeInfo = { 
+							_this.prizeInfo = {
 								...res.data,
-								picUrl: env.filePublic + res.data.picUrl.split(',')[0] + '?imageView2/2/w/340',
+								picUrl: env.filePublic + res.data.picUrl.split(',')[0] +
+									'?imageView2/2/w/340',
 								prizeType: JSON.parse(res.data.prizeType)
 							}
-							setTimeout(()=> {
+							setTimeout(() => {
 								uni.hideLoading();
 								_this.btnShow = true
 								_this.running()
-							},500)
-						} else if (res.code == 401 ) {
+							}, 500)
+						} else if (res.code == 401) {
 							uni.hideLoading();
 							clearInterval(time)
 							uni.navigateBack({
 								delta: 2
 							})
-						}  else if(res.code == 500) {
+						} else if (res.code == 500) {
 							uni.hideLoading();
 							clearInterval(time)
 							uni.navigateBack({
 								delta: 1
 							})
 						}
-						
+
 						if (num == 10) {
 							uni.hideLoading();
 							clearInterval(time)
@@ -220,7 +233,7 @@
 					})
 				}, 1000)
 			},
-			
+
 			// 动画开始
 			running() {
 				// #ifdef H5 
@@ -248,9 +261,9 @@
 					this.stop()
 				}, 8000);
 				// #endif
-				
+
 				// #ifdef MP-ALIPAY
-				 my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(info => {
+				my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(info => {
 					this.data = info[0].width
 					// 调用 step() 来表示一组动画完成
 					this.animation.translateX(-this.data).step({
@@ -269,14 +282,14 @@
 							clearInterval(this.time)
 						}
 					}, 1000)
-				 })
+				})
 				// 不手动停止动画,自动停止
 				this.stopTime = setTimeout(() => {
 					this.num = 0
 					this.stop()
 				}, 8000);
 				// #endif
-			
+
 				// #ifdef MP-WEIXIN 
 				// 元素详细信息
 				uni.createSelectorQuery().in(this).select(".rolling-prize-list").boundingClientRect(info => {
@@ -299,7 +312,7 @@
 						}
 					}, 1000)
 				}).exec();
-				
+
 				// 不手动停止动画,自动停止
 				this.stopTime = setTimeout(() => {
 					this.num = 0
@@ -307,11 +320,10 @@
 				}, 8000);
 				// #endif
 			},
-			
+
 			// 停止动画
 			stop() {
-				if(this.btnIng) return
-				
+				if (this.btnIng) return
 				this.btnIng = true
 				// 获取屏幕距离,用于计算停止动画移动距离计算
 				// #ifndef MP-ALIPAY
@@ -323,7 +335,6 @@
 				});
 				// #endif
 				
-				
 				/**
 				 * 0秒:下标4
 				 * 1秒:下标6
@@ -335,10 +346,13 @@
 				 * 7秒:下标2
 				 * 8秒:下标2
 				 * */
-				
 				clearInterval(this.time)
 				clearTimeout(this.stopTime)
 				this.animationData = {}
+				// #ifdef MP-ALIPAY
+				this.list[3][1] = JSON.parse(JSON.stringify(this.prizeInfo))
+				// #endif
+				// #ifndef MP-ALIPAY
 				if (this.num2 == 0) {
 					this.list[3][1] = JSON.parse(JSON.stringify(this.prizeInfo))
 				} else if (this.num2 == 1) {
@@ -356,13 +370,15 @@
 				} else if (this.num2 == 7) {
 					this.list[1][1] = JSON.parse(JSON.stringify(this.prizeInfo))
 				} else if (this.num2 == 8) {
-					// #ifdef MP-WEIXIN || MP-ALIPAY
+					// #ifdef MP-WEIXIN 
 					this.list[1][1] = JSON.parse(JSON.stringify(this.prizeInfo))
 					// #endif
 					// #ifdef H5 
 					this.list[3][1] = JSON.parse(JSON.stringify(this.prizeInfo))
 					// #endif
 				}
+				// #endif
+
 				// #ifdef H5
 				/**
 				 * 根据动画时间移动到指定位置
@@ -375,47 +391,46 @@
 					timingFunction: 'ease'
 				})
 				this.animationData = this.animation.export()
-				
+
 				setTimeout(() => {
 					this.rollingShow = false
-				},4500)
+				}, 4500)
 				setTimeout(() => {
 					this.circularShow = false
-				},5100)
+				}, 5100)
 				setTimeout(() => {
 					this.rotateShow = false
-				},7500)
+				}, 7500)
 				// #endif
-				
+
 				// #ifdef MP-ALIPAY
-				
 				let _this = this
 				uni.getSystemInfo({
-					success: (res)=> {
+					success: (res) => {
 						let windowWidth = res.windowWidth;
-						my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(info => {
-							_this.data = info[0].width
-							_this.animation.translateX(-(_this.data  + windowWidth * 3)).step({
-								duration: 4000,
-								timingFunction: 'ease'
+						my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(
+							info => {
+								_this.data = info[0].width //动画移动距离
+								_this.animation.translateX(-(_this.data + windowWidth * 3)).step({
+									duration: 4000,
+									timingFunction: 'ease'
+								})
+								_this.animationData = _this.animation.export()
 							})
-							_this.animationData = _this.animation.export()
-						})
-						
+
 						setTimeout(() => {
 							_this.rollingShow = false
-						},4500)
+						}, 4500)
 						setTimeout(() => {
 							_this.circularShow = false
-						},5100)
+						}, 5100)
 						setTimeout(() => {
 							_this.rotateShow = false
-						},7500)
+						}, 7500)
 					}
 				});
-				
 				// #endif
-			
+
 				// #ifdef MP-WEIXIN 
 				uni.createSelectorQuery().in(this).select(".rolling-prize-list").boundingClientRect(info => {
 					this.data = info.width
@@ -425,25 +440,24 @@
 					})
 					this.animationData = this.animation.export()
 				}).exec();
-				
 				setTimeout(() => {
 					this.rollingShow = false
-				},4500)
+				}, 4500)
 				setTimeout(() => {
 					this.circularShow = false
-				},5100)
+				}, 5100)
 				setTimeout(() => {
 					this.rotateShow = false
-				},7500)
+				}, 7500)
 				// #endif
 			},
-			
+
 			back() {
 				uni.navigateBack({
 					delta: 1
 				})
 			},
-			
+
 			toPrize(data) {
 				if (data.value == 'goods') {
 					uni.redirectTo({
@@ -477,7 +491,7 @@
 		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/prize_bkg1.png) center center no-repeat;
 		background-size: 100vw calc(100vh - 44px);
 		overflow: hidden;
-		
+
 		// 奖品滚动
 		&-prize {
 			display: flex;
@@ -486,32 +500,33 @@
 			background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/prize_bkg2.png) center center no-repeat;
 			background-size: 100vw 28vh;
 			margin-bottom: 82rpx;
-			
+
 			&-list {
 				display: flex;
 				margin-top: 76rpx;
 				height: calc(100% - 76rpx);
-				
+
 				&-item {
 					width: 100vw;
 					height: 100%;
-					
+
 					&__items {
 						align-items: flex-start;
 						justify-content: space-evenly;
 						width: 100vw;
 						height: 100%;
+
 						.content {
 							flex-direction: column;
 							width: 30%;
 							height: 85%;
-							
+
 							image {
 								width: 100%;
 								height: 60%;
 								margin-bottom: 16rpx;
 							}
-							
+
 							&-title {
 								width: 100%;
 								line-height: 34rpx;
@@ -527,20 +542,20 @@
 								text-align: center;
 							}
 						}
-						
+
 						// .content:nth-child(2) {
 						// 	justify-content: flex-start;
 						// 	color: #333;
-							
+
 						// 	image {
 						// 		width: 100%;
 						// 		height: 60%;
 						// 	}
-							
+
 						// 	.content-title {
 						// 		font-weight: bold;
 						// 	}
-							
+
 						// 	.content-price {
 						// 		font-weight: bold;
 						// 	}
@@ -549,21 +564,21 @@
 				}
 			}
 		}
-		
+
 		// 按钮
 		&-btn {
 			height: 160rpx;
 			margin-bottom: 36rpx;
-			
+
 			&-content {
 				position: relative;
 				height: 100%;
-				
+
 				image {
 					width: 486rpx;
 					height: 100%;
 				}
-				
+
 				&-title {
 					position: absolute;
 					top: 30rpx;
@@ -575,23 +590,23 @@
 					opacity: 0.99;
 				}
 			}
-			
+
 			.btn-stop {
 				animation: scaleBtn 0.2s linear;
 			}
-			
+
 			// 放大缩小动画
 			@keyframes scaleBtn {
 				from {
 					transform: scale(0.9);
 				}
-				
+
 				to {
 					transform: scale(1);
 				}
 			}
 		}
-		
+
 		// 倒计时
 		&-time {
 			.num {
@@ -603,7 +618,7 @@
 			}
 		}
 	}
-	
+
 	// 奖品显示
 	.prize {
 		position: relative;
@@ -612,7 +627,7 @@
 		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/hit_bkg.png) center center no-repeat;
 		background-size: 100vw 100vh;
 		overflow: hidden;
-		
+
 		&-navLeft {
 			position: absolute;
 			left: 34rpx;
@@ -621,20 +636,20 @@
 			background-color: rgba(255, 255, 255, .36);
 			border-radius: 50%;
 		}
-		
+
 		&-title {
 			padding-top: 15vh;
 			margin-bottom: 120rpx;
-			
+
 			image {
 				width: 484rpx;
 				height: 108rpx;
 			}
 		}
-		
+
 		&-box {
 			margin-bottom: 34rpx;
-			
+
 			&-popup {
 				position: relative;
 				flex-direction: column;
@@ -642,19 +657,19 @@
 				height: 38vh;
 				background-color: #FFFFFF;
 				border-radius: 22rpx;
-				
+
 				&__image {
 					position: relative;
 					z-index: 10;
 					width: 65%;
 					height: 65%;
-					
+
 					image {
 						width: 100%;
 						height: 100%;
 					}
 				}
-				
+
 				&__rotate {
 					position: absolute;
 					width: 100%;
@@ -662,7 +677,7 @@
 					z-index: 5;
 					animation: rotateBg 3s linear;
 				}
-				
+
 				&__circular {
 					position: absolute;
 					width: 600rpx;
@@ -670,37 +685,37 @@
 					z-index: 5;
 					animation: scaleBg 0.7s linear;
 				}
-				
+
 				// 旋转动画
 				@keyframes rotateBg {
 					from {
 						transform: rotate(0);
 					}
-					
+
 					to {
 						transform: rotate(360deg);
 					}
 				}
-				
+
 				// 放大动画
 				@keyframes scaleBg {
 					from {
 						transform: scale(0.8);
 					}
-					
+
 					to {
 						transform: scale(1.8);
 					}
 				}
 			}
 		}
-		
+
 		&-info {
 			margin-bottom: 40rpx;
-			
+
 			&-content {
 				width: 70vw;
-				
+
 				&-price {
 					text-align: center;
 					font-size: 40rpx;
@@ -709,12 +724,12 @@
 					font-weight: bold;
 					color: #FFFFFF;
 					margin-bottom: 20rpx;
-					
+
 					text {
 						font-size: 28rpx;
 					}
 				}
-				
+
 				&-title {
 					height: 36rpx;
 					overflow: hidden;
@@ -724,6 +739,7 @@
 					color: #FFFFFF;
 					margin-bottom: 50rpx;
 				}
+
 				&-titletwo {
 					height: 36rpx;
 					text-align: center;
@@ -735,17 +751,17 @@
 					overflow: hidden;
 					text-overflow: ellipsis;
 				}
-				
+
 				&-btn {
 					&-content {
 						position: relative;
 						width: 70vw;
-						
+
 						image {
 							width: 70vw;
 							height: 112rpx;
 						}
-						
+
 						&-txt {
 							position: absolute;
 							top: 0;
@@ -759,7 +775,7 @@
 				}
 			}
 		}
-		
+
 		&-tip {
 			.txt {
 				width: 332rpx;
@@ -773,6 +789,6 @@
 				color: #FB930D;
 			}
 		}
-		
+
 	}
-</style>
+</style>

+ 0 - 1
src/packagePrize/ticket/index.vue

@@ -112,7 +112,6 @@
 			},
 
 			toChoice(item) {
-				console.log(item);
 				let type = item.type && JSON.parse(item.type).value
 				
 				if(type == 'offline') {

+ 7 - 5
src/pages.json

@@ -8,12 +8,15 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
+		{
+			"path": "pages/index/wxofficial"
+		},
 		{
 			"path": "pages/core/index",
 			"style": {
-				"titlePenetrate":"YES"
+				"titlePenetrate": "YES"
 			}
-			
+
 		},
 		{
 			"path": "pages/user/index",
@@ -42,8 +45,7 @@
 	],
 	"subPackages": [{
 			"root": "packageGoods",
-			"pages": [
-				{
+			"pages": [{
 					"path": "coupon/index"
 				},
 				{
@@ -79,7 +81,7 @@
 				{
 					"path": "recovery/detail"
 				}
-            ]
+			]
 		},
 		{
 			"root": "packagePrize",

+ 5 - 4
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
@@ -267,7 +268,7 @@
 							background: rgba(249, 130, 44, 0.08);
 							margin-top: 10rpx;
 							border: 2rpx solid #F9822C;
-							font-size: 26rpx;
+							font-size: 24rpx;
 							border-radius: 6rpx;
 							color: #F9822C;
 							padding: 0 15rpx;
@@ -281,7 +282,7 @@
 						.details-button {
 							width: 200rpx;
 							height: 72rpx;
-							line-height: 72rpx;
+							line-height: 70rpx;
 							background-color: #F9822C;
 							color: #fff;
 							margin-top: 30rpx;
@@ -292,7 +293,7 @@
 						.details-buttonTwo {
 							width: 200rpx;
 							height: 72rpx;
-							line-height: 72rpx;
+							line-height: 70rpx;
 							background-color: #BBBBBB;
 							color: #fff;
 							margin-top: 30rpx;

+ 3 - 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
@@ -561,6 +562,7 @@
 			padding-left: 30rpx;
 			background: #F4F5F6;
 			border-radius: 35rpx;
+			padding-right: 30rpx;
 			
 			&__btn {
 				z-index: 200;

+ 88 - 35
src/pages/index/index.vue

@@ -12,7 +12,8 @@
 								<view class="barrage-swiper-item-content flex">
 									<image :src="item.avatar" mode="scaleToFill" />
 									<view class="title ells-one">{{ item.nickName }}
-										{{ item.type == 1 ? '刮出了' : '兑换了' }} {{ item.prizeInfo }}</view>
+										{{ item.type == 1 ? '刮出了' : '兑换了' }} {{ item.prizeInfo }}
+									</view>
 								</view>
 							</view>
 						</swiper-item>
@@ -22,10 +23,12 @@
 
 				<!-- 查看规则 -->
 				<view class="rule">
+					<!-- #ifndef MP-ALIPAY -->
 					<view class="rule-content flex" @click="toRule">
 						<image src="../../static/index/index_tip.png" mode="scaleToFill"></image>
 						<text>查看规则</text>
 					</view>
+					<!-- #endif -->
 				</view>
 
 				<!-- 盲票轮播 -->
@@ -89,8 +92,8 @@
 					<swiper class="ticket-title-swiper flex" :duration="0" :current="ticketTitleIndex"
 						previous-margin="110px" next-margin="110px" :autoplay="false" :circular="true"
 						@change="changeTicketTitle">
-						<swiper-item v-for="(item, index) in ticketList" :key="index" @click="clickTicketTitle(index)">
-							<view class="ticket-title-swiper-item flex"
+						<swiper-item v-for="(item, index) in ticketList" :key="index">
+							<view class="ticket-title-swiper-item flex" @click="clickTicketTitle(index)"
 								:class="{ 'action': ticketTitleIndex == index }">
 								<text>{{ item.title }}</text>
 							</view>
@@ -133,6 +136,8 @@
 			</view>
 
 		</view>
+		<!-- 引导页面 -->
+		<u-modal :show="showMp" content='“盲票”已升级为“码上快购”' width='530rpx' confirmText='立即前往' @confirm='toAnotherApplet'></u-modal>
 		<!-- tabbar组件 -->
 		<custom-tab-bar :activeValue="'index'" />
 		<!-- 支付弹框组件 -->
@@ -143,6 +148,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 {
@@ -172,9 +178,13 @@
 				ticketInfo: {},
 				clickLoading: true,
 				userInfo: '',
+				showMp: false,
 			};
 		},
 		onLoad(opthios) {
+			this.showMp = uni.getStorageSync('anotherApplet') ? true : false
+			
+			uni.hideTabBar()
 			if (opthios.userId) {
 				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
 				if (opthios.userId === undefined || opthios.userId === 'undefined') {
@@ -256,6 +266,22 @@
 			this.getActivityList()
 		},
 		methods: {
+			toAnotherApplet() {
+				/**
+				 * envVersion 类型为字符串
+				 * envVersion: 'develop', //开发版
+				 * envVersion: 'trial', //体验版
+				 * envVersion: 'release',//正式版
+				 */
+				uni.navigateToMiniProgram({
+				    appId:'wxffb4598e70b9f871',// appid
+				    path:'/pages/index/index',// 首页路径
+				    envVersion:"release",
+				    success: res => {
+				      // 打开成功
+				    },
+				})
+			},
 			// 切换盲票
 			changeTicket({
 				detail
@@ -310,12 +336,24 @@
 			// 投诉建议
 			contactService() {
 				// #ifdef MP-WEIXIN
-				wx.openCustomerServiceChat({
-					extInfo: {
-						url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
-					},
-					corpId: 'ww02da63d80c66284b',
-				})
+				if (appId == 1) {
+					// wx.openCustomerServiceChat({
+					// 	extInfo: {
+					// 		url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
+					// 	},
+					// 	corpId: 'ww02da63d80c66284b',
+					// })
+					uni.navigateTo({
+						url: `/pages/index/wxofficial`
+					})
+				} else {
+					wx.openCustomerServiceChat({
+						extInfo: {
+							url: 'https://work.weixin.qq.com/kfid/kfcf9da505d4dc18c87'
+						},
+						corpId: 'ww8522e336cfe5045b',
+					})
+				}
 				// #endif
 			},
 
@@ -408,29 +446,37 @@
 			// 立即开刮
 			payment() {
 				this.payInfo = this.ticketList[this.ticketIndex]
-				let data = {
-					userCouponIds: [],
-					autoCoupon: 1,
-					boxId: this.payInfo.boxId,
-					orderNum: 1
-				}
-				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
-					if (res.code == 0) {
-						let info = {
-							...res.data,
-							...this.payInfo,
-							picUrl: this.payInfo.picUrl[0],
-							couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
-								.data.couponList[0].title,
-							couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
-								.couponList[0].id
-						}
-						this.payInfo = info
-						this.payShow = true
+				if (this.payInfo) {
+					let data = {
+						userCouponIds: [],
+						autoCoupon: 1,
+						boxId: this.payInfo.boxId,
+						orderNum: 1,
+						appSource: appId
 					}
-				}).catch(() => {
-					uni.$u.toast('开刮失败,请重试!');
-				})
+					$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
+						if (res.code == 0) {
+							let info = {
+								...res.data,
+								...this.payInfo,
+								picUrl: this.payInfo.picUrl[0],
+								couponTitle: res.data && res.data.couponList && res.data.couponList.length &&
+									res
+									.data.couponList[0].title,
+								couponId: res.data && res.data.couponList && res.data.couponList.length && res
+									.data
+									.couponList[0].id
+							}
+							this.payInfo = info
+							this.payShow = true
+						}
+					}).catch(() => {
+						uni.$u.toast('开刮失败,请重试!');
+					})
+				} else {
+					uni.$u.toast('盲票正在准备中');
+				}
+
 			},
 
 			// 关闭支付弹框
@@ -485,9 +531,14 @@
 					})
 					return
 				}
-				uni.navigateTo({
-					url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&isTry=1`
-				})
+				if (this.ticketInfo && this.ticketInfo.boxId) {
+					uni.navigateTo({
+						url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&isTry=1`
+					})
+				} else {
+					uni.$u.toast('盲票正在准备中');
+				}
+
 			},
 
 			// 线上立即刮票成功,跳转到刮奖过程
@@ -570,7 +621,9 @@
 			},
 
 			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

+ 22 - 0
src/pages/index/wxofficial.vue

@@ -0,0 +1,22 @@
+<template>
+	<view class="">
+		<web-view :src="viewUrl" bindmessage="getMessage"></web-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				viewUrl: 'https://mp.weixin.qq.com/s?__biz=MzkwODMzMjEyNw==&mid=2247483915&idx=1&sn=3da5b66a673cfe4ce7f7fd0975359f63&chksm=c0cadf3bf7bd562d8a1fedb14c638a538001052be7f497e7258176af8700050b0cf4b8163f11#rd'
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 179 - 177
src/pages/login/code.vue

@@ -1,179 +1,181 @@
 <template>
-  <view class="container">
-    <!-- #ifdef MP-ALIPAY -->
-    <u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" leftIconSize="0" />
-    <!-- #endif -->
-    <!-- #ifndef MP-ALIPAY -->
-    <u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
-    <!-- #endif -->
-    <view class="container">
-      <view class="login">
-        <view class="login-title">验证码登录</view>
-        <view class="login-input pat">
-          <u-input placeholder="请输入手机号" type="number" v-model="mobile" border="none" clearable @blur="changeNumber"/>
-        </view>
-        <view class="login-input">
-          <u-input placeholder="请输入短信验证码" type="number" v-model="code" clearable  @blur="changeCode">
-            <template slot="suffix">
-              <u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
-              <u-button @click="getCode" :text="tips" type="default" size="mini"></u-button>
-            </template>
-          </u-input>
-        </view>
-        <u-button @click="login" text="登录" shape="circle" :loading="loading"></u-button>
-      </view>
-    </view>
-    <auth :auth-show="authShow" @close="authClose" />
-  </view>
+	<view class="container">
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" leftIconSize="0" />
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY -->
+		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
+		<!-- #endif -->
+		<view class="container">
+			<view class="login">
+				<view class="login-title">验证码登录</view>
+				<view class="login-input pat">
+					<u-input placeholder="请输入手机号" type="number" v-model="mobile" border="none" clearable
+						@blur="changeNumber" />
+				</view>
+				<view class="login-input">
+					<u-input placeholder="请输入短信验证码" type="number" v-model="code" clearable @blur="changeCode">
+						<template slot="suffix">
+							<u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
+							<u-button @click="getCode" :text="tips" type="default" size="mini"></u-button>
+						</template>
+					</u-input>
+				</view>
+				<u-button @click="login" text="登录" shape="circle" :loading="loading"></u-button>
+			</view>
+		</view>
+		<auth :auth-show="authShow" @close="authClose" />
+	</view>
 </template>
 
 <script>
-  import $http from '@/utils/request.js'
-  import Auth from '../../components/auth/auth.vue'
-  export default {
-    components: {
-      Auth
-    },
-    data() {
-      return {
-        loading: false,
-        mobile: '',
-        codeId: '',
-        code: '',
-        tips: '',
-        authShow: false,
-      };
-    },
-    methods: {
-      codeChange(text) {
-        this.tips = text;
-      },
-      
-      getCode() {
-        const rule = /^[1][0-9][0-9]{9}$/
-        if (!this.mobile) {
-          uni.$u.toast('请输入手机号');
-          return
-        }
-        if (!rule.test(this.mobile)) {
-          uni.$u.toast('请输入正确的手机号');
-          return
-        }
-        if (this.$refs.uCode.canGetCode) {
-          
-          // 这里此提示会被this.start()方法中的提示覆盖
-          uni.$u.toast('验证码已发送');
-          // 通知验证码组件内部开始倒计时
-          this.$refs.uCode.start();
-          $http.post('/api/v1/mp/sms/sendSmsCode', {
-            mobile: this.mobile,
-            noToken: true
-          }).then(res => {
-            if (res.code === 0 && res.data) {
-              this.codeId = res.data
-            }
-          })
-        } else {
-          uni.$u.toast('倒计时结束后再发送');
-        }
-      },
-
-      changeNumber(e) {
-        this.mobile = e
-      },
-      changeCode(e) {
-        this.code = e
-      },
-      
-      login() {
-        let _this = this
-        if (!_this.mobile) {
-          uni.$u.toast('请输入手机号');
-          return
-        }
-        const rule = /^[1][0-9][0-9]{9}$/
-        if (!rule.test(_this.mobile)) {
-          uni.$u.toast('请输入正确的手机号');
-          return
-        }
-        if (!_this.code) {
-          uni.$u.toast('请输入验证码');
-          return
-        }
-        _this.loading = true
-        $http.post('/auth/mobile', {
-          mobile: _this.mobile,
-          messageId: _this.codeId,
-          code: _this.code,
-          identity: 1,
-          noToken: true
-        }).then(res => {
-          _this.loading = false
-          if (res.code === 0 && res.token) {
-            // #ifdef MP-WEIXIN || MP-ALIPAY
-            uni.setStorageSync('token', res.token)
-            _this.getBaseInfo()
-            // #endif
-            // #ifdef H5 
-            uni.$u.toast('登录成功');
-            uni.setStorageSync('token', res.token)
-            setTimeout(() => {
-              uni.navigateBack({
-                delta: 2
-              })
-            }, 500)
-            // #endif
-          }
-        }).catch(() => {
-          _this.loading = false
-        })
-      },
-      
-      getBaseInfo() {
-        $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-          uni.hideLoading();
-          if (res.code == 0) {
-            uni.setStorageSync('userInfo', res.data)
-            // #ifdef MP-ALIPAY
-            if (res.data.aliuserId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 2
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-            // #endif
-            // #ifndef MP-ALIPAY
-            if (res.data.openId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 2
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-            // #endif
-          }
-        }).catch(() => {
-          uni.hideLoading();
-        })
-      },
-      
-      authClose() {
-        this.authShow = false
-        setTimeout(() => {
-          uni.navigateBack({
-            delta: 2
-          })
-        }, 500)
-      },
-    }
-  }
+	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
+	import Auth from '../../components/auth/auth.vue'
+	export default {
+		components: {
+			Auth
+		},
+		data() {
+			return {
+				loading: false,
+				mobile: '',
+				codeId: '',
+				code: '',
+				tips: '',
+				authShow: false,
+			};
+		},
+		methods: {
+			codeChange(text) {
+				this.tips = text;
+			},
+
+			getCode() {
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!this.mobile) {
+					uni.$u.toast('请输入手机号');
+					return
+				}
+				if (!rule.test(this.mobile)) {
+					uni.$u.toast('请输入正确的手机号');
+					return
+				}
+				if (this.$refs.uCode.canGetCode) {
+
+					// 这里此提示会被this.start()方法中的提示覆盖
+					uni.$u.toast('验证码已发送');
+					// 通知验证码组件内部开始倒计时
+					this.$refs.uCode.start();
+					$http.post('/api/v1/mp/sms/sendSmsCode', {
+						mobile: this.mobile,
+						noToken: true
+					}).then(res => {
+						if (res.code === 0 && res.data) {
+							this.codeId = res.data
+						}
+					})
+				} else {
+					uni.$u.toast('倒计时结束后再发送');
+				}
+			},
+
+			changeNumber(e) {
+				this.mobile = e
+			},
+			changeCode(e) {
+				this.code = e
+			},
+
+			login() {
+				let _this = this
+				if (!_this.mobile) {
+					uni.$u.toast('请输入手机号');
+					return
+				}
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(_this.mobile)) {
+					uni.$u.toast('请输入正确的手机号');
+					return
+				}
+				if (!_this.code) {
+					uni.$u.toast('请输入验证码');
+					return
+				}
+				_this.loading = true
+				$http.post('/auth/mobile', {
+					mobile: _this.mobile,
+					messageId: _this.codeId,
+					code: _this.code,
+					identity: 1,
+					noToken: true
+				}).then(res => {
+					_this.loading = false
+					if (res.code === 0 && res.token) {
+						// #ifdef MP-WEIXIN || MP-ALIPAY
+						uni.setStorageSync('token', res.token)
+						_this.getBaseInfo()
+						// #endif
+						// #ifdef H5 
+						uni.$u.toast('登录成功');
+						uni.setStorageSync('token', res.token)
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 2
+							})
+						}, 500)
+						// #endif
+					}
+				}).catch(() => {
+					_this.loading = false
+				})
+			},
+
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						// #ifdef MP-ALIPAY
+						if (res.data.aliuserId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 2
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+						// #endif
+						// #ifndef MP-ALIPAY
+						if (res.data.openId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 2
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+						// #endif
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			authClose() {
+				this.authShow = false
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 2
+					})
+				}, 500)
+			},
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
@@ -182,7 +184,7 @@
 		width: 100%;
 		overflow: hidden;
 	}
-	
+
 	.login {
 		padding: 70rpx 70rpx 0;
 
@@ -210,8 +212,8 @@
 				border: none;
 			}
 		}
-		
-		.pat{
+
+		.pat {
 			padding: 10rpx 66rpx;
 		}
 
@@ -221,8 +223,8 @@
 			color: #fff;
 			border-radius: 32px;
 		}
-		
-		::v-deep .u-button--success{
+
+		::v-deep .u-button--success {
 			background-color: none;
 		}
 	}

+ 233 - 225
src/pages/login/index.vue

@@ -1,239 +1,247 @@
 <template>
-  <view class="container">
-    <!-- #ifdef MP-ALIPAY -->
-    <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" leftIconSize="0"></u-navbar>    
-    <!-- #endif -->
-    
-    <!-- #ifndef MP-ALIPAY -->
-    <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>    
-    <!-- #endif -->
+	<view class="container">
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" leftIconSize="0"></u-navbar>
+		<!-- #endif -->
 
-    <view class="flex login">
-      <view class="flex login-image">
-        <image src="../../static/public/logo.png" mode="scaleToFill"></image>
-        <view class="login-image-txt">盲票</view>
-      </view>
-      <!-- #ifdef MP-ALIPAY -->
-      <view class="login-btn">
-      <button open-type="getAuthorize" @getAuthorize="onGetAuthorize" @error="onAuthError" scope='phoneNumber'>支付宝登录</button>
-      </view>
-      <!-- #endif -->
-      <!-- #ifndef MP-ALIPAY -->
-      <view class="login-btn">
-        <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">微信登录</button>
-        <button @click="getPhoneNumber" v-else>微信登录</button>
-      </view>
-      <!-- #endif -->
-      <view class="flex login-code" @click="toCode">手机号登录/注册</view>
-    </view>
+		<!-- #ifndef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>
+		<!-- #endif -->
 
-    <view class="footer-fixed">
-      <view class="flex about">
-        <view class="checked">
-          <u-checkbox-group>
-            <u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#E96737"
-              @change="changeChecked"></u-checkbox>
-          </u-checkbox-group>
-        </view>
-        <view class="txt">登录代表您已同意</view>
-        <navigator hover-class="none" class="txt-about" url="/packageOther/about/protect">《用户使用协议》</navigator>
-        <navigator hover-class="none" class="txt-about" url="/packageOther/about/conceal">、《隐私保护声明》</navigator>
-      </view>
-    </view>
+		<view class="flex login">
+			<view class="flex login-image">
+				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
+				<view class="login-image-txt" v-if="appId == 2">码上快购</view>
+				<view class="login-image-txt" v-else>盲票</view>
+			</view>
+			<!-- #ifdef MP-ALIPAY -->
+			<view class="login-btn">
+				<button open-type="getAuthorize" @getAuthorize="onGetAuthorize" scope='phoneNumber'>支付宝登录</button>
+			</view>
+			<!-- #endif -->
+			<!-- #ifndef MP-ALIPAY -->
+			<view class="login-btn">
+				<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">微信登录</button>
+				<button @click="getPhoneNumber" v-else>微信登录</button>
+			</view>
+			<!-- #endif -->
+			<view class="flex login-code" @click="toCode">手机号登录/注册</view>
+		</view>
 
-    <auth :auth-show="authShow" :auth-token="token" @close="authClose" @fail="fail" />
-  </view>
+		<view class="footer-fixed">
+			<view class="flex about">
+				<view class="checked">
+					<u-checkbox-group>
+						<u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#E96737"
+							@change="changeChecked"></u-checkbox>
+					</u-checkbox-group>
+				</view>
+				<view class="txt">登录代表您已同意</view>
+				<navigator hover-class="none" class="txt-about" url="/packageOther/about/protect">《用户使用协议》</navigator>
+				<navigator hover-class="none" class="txt-about" url="/packageOther/about/conceal">、《隐私保护声明》</navigator>
+			</view>
+		</view>
+
+		<auth :auth-show="authShow" :auth-token="token" @close="authClose" @fail="fail" />
+	</view>
 </template>
 
 <script>
-  import $http from '@/utils/request.js'
-  import log from '@/common/log.js'
-  import Auth from '../../components/auth/auth.vue'
-  export default {
-    components: {
-      Auth
-    },
-    data() {
-      return {
-        authShow: false,
-        token: '',
-        checked: true,
-      };
-    },
-    methods: {
-      getPhoneNumber(e) {
-        let _this = this
-        if (!_this.checked) {
-          uni.$u.toast('请阅读并勾选底部协议');
-          return
-        }
-        if (e.detail.errMsg == 'getPhoneNumber:ok') {
-          uni.showLoading({
-            title: '登录中'
-          });
-          if (e.detail & e.detail.code) {
-            $http.post('/api/v1/mp/user/wxauth/mobile', {
-              ...e.detail,
-              identity: 1,
-              noToken: true
-            }).then(res => {
-              uni.hideLoading();
-              if (res.code == 0) {
-                uni.setStorageSync('token', res.token)
-                _this.getBaseInfo()
-              } else {
-                uni.getSystemInfo({
-                  success(res) {
-                    log.info(
-                      `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                    )
-                  }
-                })
-              }
-            }).catch(() => {
-              uni.hideLoading();
-              uni.getSystemInfo({
-                success(res) {
-                  log.info(
-                    `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                  )
-                }
-              })
-            })
-          } else {
-            uni.login({
-              success(res) {
-                $http.post('/api/v1/mp/user/wxauth/mobile', {
-                  ...e.detail,
-                  loginCode: res.code,
-                  identity: 1,
-                  noToken: true
-                }).then(res => {
-                  uni.hideLoading();
-                  if (res.code == 0) {
-                    uni.setStorageSync('token', res.token)
-                    _this.getBaseInfo()
-                  } else {
-                    uni.getSystemInfo({
-                      success(res) {
-                        log.info(
-                          `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                        )
-                      }
-                    })
-                  }
-                }).catch(() => {
-                  uni.hideLoading();
-                  uni.getSystemInfo({
-                    success(res) {
-                      log.info(
-                        `错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
-                      )
-                    }
-                  })
-                })
-              }
-            })
-          }
-        }
-      },
-		//拒绝授权
-		fail(){
-			this.authShow = false
+	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: {
+			Auth
+		},
+		data() {
+			return {
+				authShow: false,
+				token: '',
+				checked: true,
+				appId: 1,
+			};
+		},
+		created() {
+			this.appId = appId
 		},
-      // 关闭授权
-      authClose() {
-        this.authShow = false
-        setTimeout(() => {
-          uni.navigateBack({
-            delta: 1
-          })
-        }, 500)
-      },
+		methods: {
+			getPhoneNumber(e) {
+				let _this = this
+				if (!_this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				if (e.detail.errMsg == 'getPhoneNumber:ok') {
+					uni.showLoading({
+						title: '登录中'
+					});
+					if (e.detail & e.detail.code) {
+						$http.post('/api/v1/mp/user/wxauth/mobile', {
+							...e.detail,
+							identity: 1,
+							noToken: true,
+							appSource: appId,
+						}).then(res => {
+							uni.hideLoading();
+							if (res.code == 0) {
+								uni.setStorageSync('token', res.token)
+								_this.getBaseInfo()
+							} else {
+								uni.getSystemInfo({
+									success(res) {
+										log.info(
+											`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+										)
+									}
+								})
+							}
+						}).catch(() => {
+							uni.hideLoading();
+							uni.getSystemInfo({
+								success(res) {
+									log.info(
+										`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+									)
+								}
+							})
+						})
+					} else {
+						uni.login({
+							success(res) {
+								$http.post('/api/v1/mp/user/wxauth/mobile', {
+									...e.detail,
+									loginCode: res.code,
+									identity: 1,
+									noToken: true,
+									appSource: appId,
+								}).then(res => {
+									uni.hideLoading();
+									if (res.code == 0) {
+										uni.setStorageSync('token', res.token)
+										_this.getBaseInfo()
+									} else {
+										uni.getSystemInfo({
+											success(res) {
+												log.info(
+													`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+												)
+											}
+										})
+									}
+								}).catch(() => {
+									uni.hideLoading();
+									uni.getSystemInfo({
+										success(res) {
+											log.info(
+												`错误信息:===基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system }.===`
+											)
+										}
+									})
+								})
+							}
+						})
+					}
+				}
+			},
+			//拒绝授权
+			fail() {
+				this.authShow = false
+			},
+			// 关闭授权
+			authClose() {
+				this.authShow = false
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 1
+					})
+				}, 500)
+			},
 
-      changeChecked(e) {
-        this.checked = e
-      },
+			changeChecked(e) {
+				this.checked = e
+			},
 
-      toCode() {
-        if (!this.checked) {
-          uni.$u.toast('请阅读并勾选底部协议');
-          return
-        }
-        uni.navigateTo({
-          url: '/pages/login/code'
-        })
-      },
+			toCode() {
+				if (!this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				uni.navigateTo({
+					url: '/pages/login/code'
+				})
+			},
 
-      getBaseInfo() {
-        $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-          uni.hideLoading();
-          if (res.code == 0) {
-            uni.setStorageSync('userInfo', res.data)
-            if (res.data.openId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 1
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-          }
-        }).catch(() => {
-          uni.hideLoading();
-        })
-      },
-      getBaseInfoAli(){
-        $http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
-          uni.hideLoading();
-          if (res.code == 0) {
-            uni.setStorageSync('userInfo', res.data)
-            if (res.data.aliuserId) {
-              uni.$u.toast('登录成功');
-              setTimeout(() => {
-                uni.navigateBack({
-                  delta: 1
-                })
-              }, 500)
-            } else {
-              this.authShow = true
-            }
-          }
-        }).catch(() => {
-          uni.hideLoading();
-        })
-      },
-      onGetAuthorize(e){
-        let _this = this
-        if (!_this.checked) {
-          uni.$u.toast('请阅读并勾选底部协议');
-          return
-        }
-         my.getPhoneNumber({
-            success: (res) => {
-            uni.showLoading({
-              title: '登录中'
-            });
-            $http.post('/api/v1/mp/user/aliAuth/mobile', {
-              encryptedData: res.response,
-              identity: 1,
-              noToken: true
-            }).then(res=>{
-              if(res.code == 0){
-                uni.setStorageSync('token', res.token)
-                _this.getBaseInfoAli()
-              }else{
-                uni.hideLoading();
-				
-              }
-            })
-            },
-          })
-      },
-    }
-  }
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						if (res.data.openId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 1
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			getBaseInfoAli() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						if (res.data.aliuserId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 1
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			onGetAuthorize(e) {
+				let _this = this
+				if (!_this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				my.getPhoneNumber({
+					success: (res) => {
+						uni.showLoading({
+							title: '登录中'
+						});
+						$http.post('/api/v1/mp/user/aliAuth/mobile', {
+							encryptedData: res.response,
+							identity: 1,
+							noToken: true
+						}).then(res => {
+							if (res.code == 0) {
+								uni.setStorageSync('token', res.token)
+								_this.getBaseInfoAli()
+							} else {
+								uni.hideLoading();
+
+							}
+						})
+					},
+				})
+			},
+		}
+	}
 </script>
 
 <style lang="scss" scoped>

+ 15 - 3
src/pages/lucky/index.vue

@@ -86,6 +86,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'
 	import {
 		urlParameter
@@ -115,12 +116,21 @@
 			if (options.id) {
 				this.serialNo = options.id
 				this.getDetail()
-			}
+			}	
 			if (options.q) {
 				let obj = urlParameter(decodeURIComponent(options.q))
 				this.serialNo = obj.id
 				this.getDetail()
 			}
+			if(uni.getStorageSync('code')){
+				this.serialNo = uni.getStorageSync('code')
+			}
+		},
+		onShow() {
+			if(uni.getStorageSync('code')){
+				this.serialNo = uni.getStorageSync('code')
+				this.getDetail()
+			}
 		},
 
 		methods: {
@@ -252,7 +262,8 @@
 					ticketId: this.info.ticketId,
 					autoCoupon: 0,
 					userCouponIds: [],
-					orderNum: 1
+					orderNum: 1,
+					appSource: appId
 				}
 				uni.showLoading();
 				let suid = uni.getStorageSync('shareUid')
@@ -286,7 +297,8 @@
 					ticketId: this.info.ticketId,
 					autoCoupon: 1,
 					userCouponIds: [],
-					orderNum: 1
+					orderNum: 1,
+					appSource: appId
 				}
 				this.payLookFlag = false
 				uni.showLoading({

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

@@ -31,10 +31,12 @@
 		<view class="prize">
 			<!-- 查看规则 -->
 			<view class="prize-rule" @click="toRule">
+				<!-- #ifndef MP-ALIPAY -->
 				<view class="prize-rule-content flex">
 					<image src="../../static/index/index_tip.png" mode="scaleToFill"></image>
 					<text>查看规则</text>
 				</view>
+			<!-- #endif -->
 			</view>
 			
 			<!-- 奖品 -->
@@ -128,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: {
@@ -307,7 +310,8 @@
 					userCouponIds: [],
 					autoCoupon: 1,
 					boxId: this.info.boxId,
-					orderNum: 1
+					orderNum: 1,
+					appSource: appId
 				}
 				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
 					if (res.code == 0) {
@@ -385,7 +389,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

+ 20 - 7
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
@@ -219,12 +220,24 @@
 			// 联系客服
 			contactService() {
 				// #ifdef MP-WEIXIN
-				wx.openCustomerServiceChat({
-					extInfo: {
-						url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
-					},
-					corpId: 'ww02da63d80c66284b',
-				})
+				if(appId == 1) {
+					// wx.openCustomerServiceChat({
+					// 	extInfo: {
+					// 		url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
+					// 	},
+					// 	corpId: 'ww02da63d80c66284b',
+					// })
+					uni.navigateTo({
+						url: `/pages/index/wxofficial`
+					})
+				}else {
+					wx.openCustomerServiceChat({
+						extInfo: {
+							url: 'https://work.weixin.qq.com/kfid/kfcf9da505d4dc18c87'
+						},
+						corpId: 'ww8522e336cfe5045b',
+					})
+				}
 				// #endif
 			},
 		},

部分文件因为文件数量过多而无法显示