lsx hace 2 años
padre
commit
7c7dcf9bda

+ 6 - 0
src/components/auth/auth.vue

@@ -68,6 +68,12 @@
 								}).catch(() => {
 									_this.authIng = false
 								})
+							},
+							fail: (res) => {
+								uni.$u.toast('授权失败');
+								uni.removeStorageSync('token')
+								_this.authIng = false
+								_this.$emit('fail')
 							}
 						})
 					},

+ 4 - 1
src/packageGoods/ticket/index.vue

@@ -87,7 +87,10 @@
 					noToken: true,
 					boxIds: this.ids,
 					salePriceSort: 1,
-				}
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
 				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
 					res => {
 						if (res.code == 0) {

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

@@ -22,7 +22,7 @@
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
 				<!-- #ifndef MP-ALIPAY -->
-				<view class="edition">v 1.1.6</view>
+				<view class="edition">v 1.1.7</view>
 				<!-- #endif -->
 				<!-- #ifdef MP-ALIPAY -->
 				<view class="edition">v 2.2.6</view>

+ 7 - 2
src/packagePrize/choice/index.vue

@@ -34,7 +34,7 @@
 						<u-icon name="checkmark" color="#fff" size="14"></u-icon>
 					</view>
 					<view class="info flex" @click="selectPrize(index)">
-						<image :src="item.picUrl" mode="aspectFill"></image>
+						<image :src="item.picUrl" mode="aspectFit"></image>
 						<view class="info-content flex">
 							<!-- #ifdef MP-ALIPAY -->
 							<view class="info-content__titletwo ells"
@@ -52,7 +52,7 @@
 							<view class="info-content__price" v-else>{{ item.value }}个</view>
 						</view>
 					</view>
-					<view class="detail" @click="toPrizeGoods(item)">查看</view>
+					<view class="detail" @click="toPrizeGoods(item)" v-if="item.prizeType && item.prizeType.value != 'red_pkg'">查看</view>
 				</view>
 			</view>
 			<!-- 按钮 -->
@@ -373,6 +373,11 @@
 					uni.switchTab({
 						url: '/pages/core/index'
 					})
+				}
+				if (data.value == 'red_pkg') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index?coupon=2'
+					})
 				}
 			},
 

+ 203 - 27
src/packagePrize/prize/index.vue

@@ -32,12 +32,12 @@
 					:current='currentIndex' lineColor="#F9822C " :activeStyle="{
 										color: '#333 ',
 										transform: 'scale(1.1)',
-										width: '120px'
+										width: '100px'
 									}" :inactiveStyle="{
 										color: '#999',
 										transform: 'scale(1)',
-										width: '120px'
-									}" itemStyle="padding-left: 20px; padding-right: 15px; height: 44px; text-align: center;">
+										width: '100px'
+									}" itemStyle="height: 44px; text-align: center;">
 				</u-tabs>
 			</view>
 			<!-- 商品状态 -->
@@ -92,7 +92,7 @@
 			</view>
 		</view>
 		<!-- 优惠券 -->
-		<view class="prize-coupon" v-else>
+		<view class="prize-coupon" v-if="state == 1">
 			<view class="prize-coupon-list">
 				<view @click="toPrizeDetail(item)" class="prize-coupon-list-item" v-for="(item, index) in list" :key="index">
 					<view class="content flex">
@@ -125,6 +125,32 @@
 				</view>
 			</view>
 		</view>
+		<!-- 红包 -->
+		<view class="prize-red" v-if="state == 2">
+			<view class="prize-red-list">
+				<view class="prize-red-list-item" v-for="(item, index) in list" :key="index">
+					<view class="content flex">
+						<view class="content-left flex">
+							<image src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/redPkg2.png" mode="scaleToFill"></image>
+						</view>
+						<view class="content-right flex">
+							<view class="title ells-one">{{ item.title }}</view>
+							<view class="desc">{{ item.value / 100 }}<text>元</text></view>
+						</view>
+						<view class="content-btn">
+							<view class="btn" @click="toDrawShow(item)">立即领取</view>
+						</view>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+			</view>
+			<view class="flex empty" v-if="!list.length && !loading">
+				<view class="center">
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode="scaleToFill"></image>
+					<view class="center-font">还没有红包</view>
+				</view>
+			</view>
+		</view>
 		<view class="prize-action">
 			<!-- 实物商品提货 -->
 			<view class="flex prize-action-goods" v-if="state == 0 && statusIndex == 1">
@@ -142,6 +168,11 @@
 				<view class="title">优惠券使用记录</view>
 				<u-icon name="arrow-right" size="15" color="#999"></u-icon>
 			</view>
+			<!-- 红包提现记录 -->
+			<view class="flex prize-action-coupon" @click="toRedpkg" v-if="state == 2">
+				<view class="title">红包领取记录</view>
+				<u-icon name="arrow-right" size="15" color="#999"></u-icon>
+			</view>
 		</view>
 		
 		<!-- 兑换成功 -->
@@ -160,6 +191,19 @@
 			</view>
 		</u-popup>
 		
+		<!-- 红包领取 -->
+		<u-popup :show="drawShow" mode="center">
+			<view class="tip-show">
+				<view class="tip-show-title" style="text-align: center;">
+					<view>确认领取该微信红包吗?</view>
+				</view>
+				<view class="flex tip-show-btn">
+					<view class="close" @click="drawShow = false">取消</view>
+					<view class="prize" @click="drawSubmit">确认</view>
+				</view>
+			</view>
+		</u-popup>
+		
 		<!-- 商品选择sku -->
 		<sku-popup 
 			:popup-show="skuPopupShow" 
@@ -186,10 +230,13 @@
 			return {
 				status: 'nomore',//上拉刷新状态
 				loading: false,
+				drawLoading: false,
 				stateArr: [{
 					name: ' 商品',
 				}, {
 					name: ' 优惠券',
+				}, {
+					name: ' 红包',
 				}],
 				// typeList: [{
 				// 	name: '待提货'
@@ -205,7 +252,8 @@
 				pageNum: 1,
 				total: 0,
 				list: [],
-
+				drawShow: false,//红包弹框
+				drawId: '',//要提现的红包id
 				currentIndex: 0,
 				
 				statusIndex: 1,
@@ -214,7 +262,7 @@
 				skuPopupShow: false,//选择框
 				skuList: [],
 				skuListInit: [],
-				tipShow: false,
+				tipShow: false, //选择多sku
 				tipData: {},
 				payInfo: {},
 				// infoItem: {},
@@ -231,6 +279,9 @@
 				if (opthios.coupon == 1) {
 					this.currentIndex = 1
 					this.state = 1
+				} else if(opthios.coupon == 2) {
+					this.currentIndex = 2
+					this.state = 2
 				} else {
 					this.currentIndex = 0
 					this.state = 0
@@ -240,10 +291,8 @@
 		methods: {
 			getList() {
 				let _this = this
-				let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : '/api/v1/mp/user/mine/coupon/list'
-				let data = _this.state == 0 ? { } : {
-					status: 1
-				}
+				let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : _this.state == 1 ?'/api/v1/mp/user/mine/coupon/list': '/api/v1/mp/user/mine/red/pkg/list'//商品、优惠券、红包
+				let data = _this.state == 0 ? { } : _this.state == 1 ? { status: 1 }: { status: 0 }
 				this.loading = true
 				this.checkedAll = false
 				$http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, data).then(res => {
@@ -327,6 +376,8 @@
 					this.statusIndex = 1
 				} else if (e.index == 1) {
 					this.state = 1
+				} else if (e.index == 2) {
+					this.state = 2
 				}
 				this.pageList()
 				this.checkedAll = false
@@ -335,6 +386,8 @@
 			close() {
 				this.skuPopupShow = false
 				this.tipShow = false
+				this.drawId = ''
+				this.drawShow = false
 			},
 			skuSuccess(data) {
 				this.tipData = data
@@ -428,6 +481,12 @@
 					url: '/packagePrize/coupon/use'
 				})
 			},
+			// 查看红包提现记录
+			toRedpkg() {
+				uni.navigateTo({
+					url: '/packagePrize/prize/redpkg'
+				})
+			},
 
 			// 立即提货
 			toSettlement() {
@@ -506,23 +565,33 @@
 					$http.post(`/api/v1/mp/user/mine/coupon/list?pageNum=1&pageSize=20`, {
 						status: 1
 					}).then(data => {
-						if (res.code == 0) {
-							this.stateArr = [{
-									name: ' 商品 (' + res.total + ') '
-								},
-								{
-									name: ' 优惠券 (' + data.total + ') '
-								},
-							]
-						} else {
-							this.stateArr = [{
-									name: ' 商品 (0)'
-								},
-								{
-									name: ' 优惠券 (0)'
-								},
-							]
-						}
+						$http.post(`/api/v1/mp/user/mine/red/pkg/list?pageNum=1&pageSize=20`, {
+							status: 0
+						}).then(item => {
+							if (res.code == 0) {
+								this.stateArr = [{
+										name: ' 商品 (' + res.total + ') '
+									},
+									{
+										name: ' 优惠券 (' + data.total + ') '
+									},
+									{
+										name: ' 红包 (' + item.total + ') '
+									},
+								]
+							} else {
+								this.stateArr = [{
+										name: ' 商品 (0)'
+									},
+									{
+										name: ' 优惠券 (0)'
+									},
+									{
+										name: ' 红包 (0)'
+									},
+								]
+							}
+						})
 					})
 				});
 			},
@@ -532,6 +601,31 @@
 					url: `/packagePrize/goods/detail?id=${ item.goodsId }`
 				})
 			},
+			
+			toDrawShow(item) {
+				this.drawShow = true
+				this.drawId = item.id
+			},
+			drawSubmit() {
+				if(this.drawLoading) return
+				this.drawLoading = true
+				uni.showLoading({
+					title: '提现中'
+				});
+				$http.post('/api/v1/mp/user/mine/red/pkg/draw', { id: this.drawId }).then(res => {
+					uni.hideLoading();
+					this.drawLoading = false
+					if (res.code == 0) {
+						this.pageList()
+						this.couponNum()
+						this.close()
+					} 
+					uni.$u.toast(res.msg);
+				}).catch(() => {
+					uni.hideLoading();
+					this.drawLoading = false
+				});
+			},
 
 			toPrizeDetail(item) {
 				let boxIds = JSON.stringify(item.boxIds)
@@ -796,6 +890,88 @@
 			}
 		}
 	}
+	
+	// 红包
+	.prize-red {
+		margin-top: 85rpx;
+		padding: 20rpx 20rpx 150rpx;
+	
+		&-list {
+			&-item {
+				// padding-top: 30rpx;
+				margin-bottom: 30rpx;
+				background-color: #fff;
+				
+				.content {
+					width: 100%;
+					height: 178rpx;
+					justify-content: flex-start;
+					
+					&-left {
+						width: 186rpx;
+						height: 100%;
+						background-color: #FFD6BE;
+						margin-right: 36rpx;
+						
+						image {
+							width: 148rpx;
+							height: 128rpx;
+						}
+					}
+					
+					&-right {
+						flex: 1;
+						align-items: flex-start;
+						flex-direction: column;
+						justify-content: space-between;
+						height: 100%;
+						padding: 24rpx 0;
+						
+						.title {
+							font-size: 30rpx;
+							line-height: 30rpx;
+							height: 30rpx;
+							overflow: hidden;
+							font-weight: 400;
+							color: #333333;
+						}
+						
+						.desc {
+							font-size: 32rpx;
+							line-height: 32rpx;
+							color: #FA352A;
+							font-weight: 500;
+							
+							text {
+								font-size: 22rpx
+							}
+						}
+					}
+					&-btn {
+							padding: 20rpx 0 22rpx;
+							margin: 0 30rpx 0;
+							
+							.btn {
+								padding: 0 36rpx;
+								display: inline-block;
+								height: 68rpx;
+								background: linear-gradient(270deg, #FF9056 0%, #FF5137 100%);
+								border-radius: 2px;
+								font-size: 30rpx;
+								line-height: 68rpx;
+								font-weight: 500;
+								color: #FFFFFF;
+							}
+					}
+				}
+			}
+	
+			&-item:last-child {
+				margin-bottom: 0;
+			}
+		}
+	}
+	
 
 	.prize-action {
 		position: fixed;

+ 214 - 0
src/packagePrize/prize/redpkg.vue

@@ -0,0 +1,214 @@
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="红包领取记录" leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="红包领取记录"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<view v-if="pagesNum > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="红包领取记录" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="红包领取记录">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
+		<!-- 已使用 -->
+		<view class="prize-red">
+			<view class="prize-red-list">
+				<view class="prize-red-list-item" v-for="(item, index) in list" :key="index">
+					<view class="content flex">
+						<view class="content-left flex">
+							<image src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/redPkg2.png" mode="scaleToFill"></image>
+						</view>
+						<view class="content-right flex">
+							<view class="title ells-one">{{ item.title }}</view>
+							<view class="desc">{{ item.value / 100 }}<text>元</text></view>
+							<view class="desc2">领取时间:{{ $parseTime(item.drawTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</text></view>
+						</view>
+						<view class="content-btn">
+							<view class="btn">已领取</view>
+						</view>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>6" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+			</view>
+		</view>
+		<view class="flex empty" v-if="!list.length">
+			<view class="center">
+				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode="scaleToFill"></image>
+				<view class="center-font">暂无红包</view>
+			</view>
+			<!-- <u-empty text="数据为空" mode="order" /> -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				status: 'nomore',//上拉刷新状态
+				state: 1,
+				pageNum: 1,
+				total: 0,
+				list: [],
+				pagesNum: '',
+			};
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.pageList()
+		},
+		methods: {
+			getList() {
+				let _this = this
+				let url = '/api/v1/mp/user/mine/red/pkg/list'
+				this.loading = true
+				$http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, {
+					status: this.state
+				}).then(res => {
+					this.loading = false
+					if (res.code == 0) {
+						_this.total = res.total
+						_this.list = _this.list.concat(res.rows)
+					}
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			pageList() {
+				this.pageNum = 1
+				this.list = []
+				this.getList()
+			},
+		},
+
+		onReachBottom() {
+			if(this.total < this.pageNum * 20) return ;
+			this.status = 'loading';
+			++this.pageNum
+			if(this.total < this.pageNum * 20) this.status = 'nomore';
+				else this.status = 'loading';
+			this.getList()
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+
+	.prize-red {
+		padding: 20rpx 20rpx 150rpx;
+	
+		&-list {
+			&-item {
+				// padding-top: 30rpx;
+				margin-bottom: 30rpx;
+				background-color: #fff;
+				
+				.content {
+					width: 100%;
+					height: 178rpx;
+					justify-content: flex-start;
+					
+					&-left {
+						width: 186rpx;
+						height: 100%;
+						background-color: #FFD6BE;
+						margin-right: 36rpx;
+						
+						image {
+							width: 148rpx;
+							height: 128rpx;
+						}
+					}
+					
+					&-right {
+						flex: 1;
+						align-items: flex-start;
+						flex-direction: column;
+						justify-content: space-between;
+						height: 100%;
+						padding: 24rpx 0;
+						
+						.title {
+							font-size: 30rpx;
+							line-height: 30rpx;
+							height: 30rpx;
+							overflow: hidden;
+							font-weight: 400;
+							color: #333333;
+						}
+						
+						.desc {
+							font-size: 32rpx;
+							line-height: 32rpx;
+							color: #666;
+							font-weight: 500;
+							
+							text {
+								font-size: 22rpx
+							}
+						}
+						.desc2 {
+							font-size: 26rpx;
+							line-height: 26rpx;
+							color: #999;
+							font-weight: 500;
+						}
+					}
+					&-btn {
+							padding: 20rpx 0 22rpx;
+							margin: 0 30rpx 0;
+							right: 30rpx;
+							position: absolute;
+							
+							.btn {
+								border: 1px solid #999;
+								display: inline-block;
+								transform: rotate(-20deg);
+								border-radius: 2px;
+								font-size: 34rpx;
+								line-height: 36rpx;
+								font-weight: 400;
+								color: #999;
+							}
+					}
+				}
+			}
+	
+			&-item:last-child {
+				margin-bottom: 0;
+			}
+		}
+	}
+	
+
+	.empty {
+		height: 60vh;
+		
+		.center {
+			text-align: center;
+		
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+		
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
+	}
+</style>

+ 6 - 2
src/packagePrize/ticket/index.vue

@@ -49,10 +49,14 @@
 					</view>
 					<view class="bottom" v-else>
 						<!-- #ifdef MP-ALIPAY -->
-						<view class="bottom-pricetwo"><view>奖品:</view><text>{{ item.prizeInfo || '-' }}</text></view>
+						<view class="bottom-pricetwo">
+							<view>奖品:</view>
+							<text v-if="item.prizeType == 'red_pkg' ">{{ item.prizeInfo + $numberFormat(item.value) + '元' }}</text>
+							<text v-else>{{ item.prizeInfo || '-' }}</text>
+						</view>
 						<!-- #endif -->
 						<!-- #ifndef MP-ALIPAY -->
-						<view class="bottom-price ells-one">奖品:<text>{{ item.prizeInfo || '-' }}</text></view>
+						<view class="bottom-price ells-one">奖品:<text v-if="item.prizeType == 'red_pkg' ">{{ item.prizeInfo + $numberFormat(item.value) + '元' }}</text><text v-else>{{ item.prizeInfo || '-' }}</text></view>
 						<!-- #endif -->
 					</view>
 				</view>

+ 3 - 0
src/pages.json

@@ -114,6 +114,9 @@
 				{
 					"path": "prize/index"
 				},
+				{
+					"path": "prize/redpkg"
+				},
 				{
 					"path": "ticket/index"
 				},

+ 9 - 3
src/pages/index/index.vue

@@ -328,7 +328,7 @@
 
 			toLucky() {
 				uni.navigateTo({
-					url: `/pages/lucky/index?id=9a4b315da3ef4db5ea378c05f8b0b626f87d793d66714d29dcc7f4ccf9441317`
+					url: `/pages/lucky/index?id=ffe7fab722472a6fd5692a38287366aa0a0a812329c145e1280edaf54b1840c7`
 				})
 			},
 			toStore() {
@@ -392,7 +392,10 @@
 				let data = {
 					type: 'online',
 					noToken: true
-				}
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
 				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
 					res => {
 						uni.hideLoading();
@@ -502,7 +505,10 @@
 				let data = {
 					type: 'online',
 					noToken: true
-				}
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
 				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
 					res => {
 						const boxIdStr = this.ticketList.map(item => item.boxId).join()

+ 33 - 21
src/pages/lucky/index.vue

@@ -66,14 +66,14 @@
 				<view class="title">该盲票已兑奖</view>
 				<view class="btn" @click="toUser">确认</view>
 			</view>
-		</u-popup>
-		
-		<u-popup :show="showStop" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
-			@touchmove.prevent.stop>
-			<view class="null-prize">
-				<view class="title">该盲票已停售</view>
-				<view class="btn" @click="toUser">确认</view>
-			</view>
+		</u-popup>
+		
+		<u-popup :show="showStop" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
+			@touchmove.prevent.stop>
+			<view class="null-prize">
+				<view class="title">该盲票已停售</view>
+				<view class="btn" @click="toUser">确认</view>
+			</view>
 		</u-popup>
 
 		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
@@ -113,7 +113,7 @@
 				payInfo: {},
 				payShow: false,
 				payLookFlag: true,
-				showNull: false,
+				showNull: false,
 				showStop: false,
 				luckyShow: false,
 				status: 2,
@@ -152,10 +152,14 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
+				let data = {
 					serialNo: this.serialNo,
 					noToken: true
-				}).then(res => {
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
+				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', data).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						if (res.data.status == 1) {
@@ -183,9 +187,9 @@
 									}
 								})
 							}
-						} else if(res.data.status == 5){
-							this.showStop = true
-							this.luckyShow = false
+						} else if(res.data.status == 5){
+							this.showStop = true
+							this.luckyShow = false
 						} else {
 							this.showNull = true
 							this.luckyShow = false
@@ -193,9 +197,9 @@
 					} else if (res.code == 1023) {
 						this.showAction = true
 						this.luckyShow = false
-					} else if (res.code == 1027){
-						this.showStop = true
-						this.luckyShow = false
+					} else if (res.code == 1027){
+						this.showStop = true
+						this.luckyShow = false
 					}  else {
 						uni.$u.toast('该盲票不存在!');
 						setTimeout(() => {
@@ -215,10 +219,14 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
+				let data = {
 					serialNo: _this.serialNo,
 					noToken: true
-				}).then(res => {
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
+				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', data).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						if (res.data.status == 2) {
@@ -237,10 +245,14 @@
 								uni.showLoading({
 									title: '加载中'
 								});
-								$http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
+								let data = {
 									serialNo: _this.serialNo,
 									noToken: true
-								}).then(ele => {
+								}
+								// #ifdef MP-WEIXIN
+								data.appSource = 1
+								// #endif
+								$http.post('/api/v1/mp/user/ticket/queryLuckyNum', data ).then(ele => {
 									if (ele.data.status == 2) {
 										uni.hideLoading();
 										clearInterval(time)