Selaa lähdekoodia

Merge branch 'dev' into 'master'

Dev

See merge request quanshu/mp-ui-user!39
zhong chunping 3 vuotta sitten
vanhempi
commit
9fb338e7d0

+ 51 - 21
src/components/pay-popup/pay-popup.vue

@@ -1,6 +1,7 @@
 <template>
 	<view>
-		<u-popup :show="payShow" mode="bottom" round="17" @close="close" :closeable="true" overlayOpacity="0.5" @touchmove.prevent.stop>
+		<u-popup :show="payShow" mode="bottom" round="17" @close="close" :closeable="true" overlayOpacity="0.5"
+			@touchmove.prevent.stop>
 			<view class="choiceShow-wrap">
 				<!-- 盲票信息 -->
 				<view class="flex goods">
@@ -19,7 +20,8 @@
 						<view class="txt">优惠券</view>
 					</view>
 					<view class="coupon-right flex">
-						<view class="txt coupon-right-color" v-if="$numberFormat(payInfo.discountAmt) != 0">-¥{{ $numberFormat(payInfo.discountAmt)}}</view>
+						<view class="txt coupon-right-color" v-if="$numberFormat(payInfo.discountAmt) != 0">
+							-¥{{ $numberFormat(payInfo.discountAmt)}}</view>
 						<view class="txt" v-else-if="total != 0">{{ total }}张可用</view>
 						<view class="txt" v-else>暂无可用优惠券</view>
 						<image src="../../static/public/public_right_arrow.png" mode="scaleToFill"></image>
@@ -28,8 +30,8 @@
 				<view class="flex agreement">
 					<view class="checked">
 						<u-checkbox-group>
-							<u-checkbox :value="checked" :checked="checked" shape="circle"
-								activeColor="#F9822C" @change="changeChecked"></u-checkbox>
+							<u-checkbox :value="checked" :checked="checked" shape="circle" activeColor="#F9822C"
+								@change="changeChecked"></u-checkbox>
 						</u-checkbox-group>
 					</view>
 					<view class="txt" @click="toRule">同意《盲票购买协议》</text></view>
@@ -45,7 +47,7 @@
 				</view>
 			</view>
 		</u-popup>
-		
+
 		<auth :auth-show="authShow" @close="authShow = false" />
 	</view>
 </template>
@@ -75,18 +77,17 @@
 				total: 0,
 			};
 		},
-		created(){
+		created() {
 			this.getTotal()
 		},
 		methods: {
-			getTotal(){
+			getTotal() {
 				$http.post(`/api/v1/mp/user/ticket/order/coupon/listPage`, {}).then(
 					res => {
 						if (res.code == 0) {
 							this.total = res.total
 						}
-					}).catch(() => {
-				})
+					}).catch(() => {})
 			},
 			changeChecked(e) {
 				this.checked = e
@@ -111,7 +112,6 @@
 			success(id) {
 				this.$emit('success', id)
 			},
-
 			pay() {
 				let _this = this
 				let payIng = false
@@ -123,19 +123,47 @@
 					title: '支付中'
 				});
 				if (payIng) return
+				let suid = uni.getStorageSync('shareUid')
 				$http.post('/api/v1/mp/user/ticket/order/submit', {
-					suid: uni.getStorageSync('shareUid'),
+					suid: suid !== 'undefined' && suid !== undefined ? suid : null,
 					type: uni.getStorageSync('shareType')
 				}).then(res => {
 					uni.hideLoading();
 					payIng = true
 					if (res.code == 0) {
 						if (res.data.needPay == 1) {
-							$http.post('/api/v1/mp/user/ticket/order/pay', {
+							// #ifdef MP-ALIPAY
+							let data = {
+								orderId: res.data.orderId,
+								payType: 1
+							}
+							// #endif
+							// #ifndef MP-ALIPAY
+							let data = {
 								orderId: res.data.orderId,
 								payType: 2
-							}).then(ele => {
+							}
+							// #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)
+										},
+										fail() {
+											payIng = false
+											_this.close()
+										}
+									})
+									// #endif
+									// #ifndef MP-ALIPAY
 									uni.requestPayment({
 										timeStamp: ele.data.timeStamp,
 										nonceStr: ele.data.nonceStr,
@@ -155,6 +183,8 @@
 											_this.close()
 										}
 									})
+									// #endif
+									
 								} else if (ele.code == 1005) {
 									_this.authShow = true
 								} else {
@@ -196,7 +226,7 @@
 </script>
 
 <style lang="scss" scoped>
-	.coupon-right-color{
+	.coupon-right-color {
 		font-size: 32rpx;
 		line-height: 44rpx;
 		color: rgba(235, 112, 9, 100);
@@ -237,7 +267,7 @@
 					line-height: 36rpx;
 					font-weight: bold;
 				}
-				
+
 				&-stock {
 					font-size: 26rpx;
 					color: #FF4208;
@@ -257,22 +287,22 @@
 					height: 40rpx;
 					margin-right: 18rpx;
 				}
-				
+
 				.txt {
 					font-size: 30rpx;
 					font-weight: bold;
 				}
 			}
-			
+
 			&-right {
 				height: 40rpx;
-				
+
 				image {
 					width: 12rpx;
 					height: 22rpx;
 					margin-left: 14rpx;
 				}
-				
+
 				.txt {
 					line-height: 26rpx;
 					font-size: 26rpx;
@@ -301,7 +331,7 @@
 					font-size: 13px;
 					font-weight: 500;
 				}
-				
+
 				.price {
 					font-size: 30rpx;
 					font-weight: bold;
@@ -320,7 +350,7 @@
 					color: #fff;
 					text-align: center;
 				}
-				
+
 			}
 		}
 	}

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

@@ -59,7 +59,7 @@
 					</view>
 				</view>
 				<!-- <view class="goods-list-item"></view> -->
-				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 		</view>
 		<view class="flex empty" v-if="!list.length">

+ 1 - 1
src/packageGoods/order/index.vue

@@ -52,7 +52,7 @@
 						<view class="order-list-item-btn-item flex pay"v-if="item.status.value == 0"  @click="payOrder(item)"><text>去支付</text></view>
 					</view>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>3" :status="statusNomore" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>3" :status="statusNomore" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">

+ 3 - 3
src/packageGoods/order/logistics.vue

@@ -117,9 +117,6 @@
 					deliveryId: this.deliverListData[this.listIndex][0].deliveryId,
 				}
 				$http.post('/api/v1/mp/logistics/query', data).then(res => {
-					if (res.code == 500) {
-						uni.hideToast();
-					}
 					if (res.code == 0) {
 						this.logistics = res.data.map(item=>{
 							return {
@@ -128,6 +125,9 @@
 							}
 						})
 						console.log(this.logistics);
+					}else {
+						this.logistics = ''
+						uni.hideToast();
 					}
 				})
 			},

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

@@ -23,7 +23,7 @@
 					</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">

+ 94 - 75
src/packageOperate/activity/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view style="background-image: linear-gradient(#ff8e0c,#ffc555 80%,#ff8e0c); width: 100%; height: 100%;">
-		
+
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="免费抽奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
@@ -22,7 +22,7 @@
 			<view class="wrap-fakeNum">
 				<view class="fakeNum">{{info.fakeNum}}人已参与</view>
 			</view>
-			
+
 			<!-- 距离开奖时间 -->
 			<view v-if="info.status && JSON.parse(info.status).value == 3" class="wrap-date">
 				<view class="wrap-date-on">
@@ -38,7 +38,7 @@
 					</view>
 				</u-count-down>
 			</view>
-			
+
 			<!-- 距离开始时间 -->
 			<view v-if="info.status && JSON.parse(info.status).value == 2" class="wrap-date">
 				<view class="wrap-date-on">
@@ -54,14 +54,16 @@
 					</view>
 				</u-count-down>
 			</view>
-			
+
 			<!-- 一等奖 -->
 			<view v-for="(item,index) in awardsList" :key="index">
 				<view class="wrap-fixed" v-for="(itemTwo,index) in item.prizeList" :key="index"
 					v-if="item.name == '一等奖'">
 					<view class="wrap-fixed-effectstwo">
 						<view class="effectsthree">
-							<navigator :url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"  hover-class="none">
+							<navigator
+								:url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
+								hover-class="none">
 								<view class="effectsthree-width">
 									<image src="../static/activity/effectsthree.png"></image>
 									<view class="effectsthree-width-name">
@@ -88,48 +90,50 @@
 					</view>
 				</view>
 			</view>
-			
+
 			<!-- 非一等奖 -->
 			<view v-for="(item,index) in awardsList" :key="index">
-					<view v-if="item.name != '一等奖'">
-						<view class="wrap-award">
-							<view class="effectsthree">
-								<view class="effectsthree-width">
-									<image src="../static/activity/effectsthree.png" mode="scaleToFill"></image>
-									<view class="effectsthree-width-name">
-										{{item.name}}
-									</view>
+				<view v-if="item.name != '一等奖'">
+					<view class="wrap-award">
+						<view class="effectsthree">
+							<view class="effectsthree-width">
+								<image src="../static/activity/effectsthree.png" mode="scaleToFill"></image>
+								<view class="effectsthree-width-name">
+									{{item.name}}
 								</view>
-								<view class="effectsthree-position">{{item.quantity}}个名额 </view>
-								<view style="padding-top: 120rpx;"></view>
-								<view class="effectsthree-positionTwo" v-for="(itemTwo,index) in item.prizeList" 
-									:key="index">
-									<navigator :url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`" hover-class="none">
-										<view class="flex" >
-											<view >
-												<image :src="itemTwo.picUrl" mode="aspectFit" class="imatwo"></image>
-											</view>
-											<view>
-												<view class="textone ells-one"
-													v-if="itemTwo.prizeType && JSON.parse(itemTwo.prizeType).value == 'coin'">
-													{{itemTwo.title}}x{{itemTwo.value}}
-												</view>
-												<view class="textone ells-one" v-else> {{itemTwo.title}}</view>
-												<view class="texttwo ells-one"
-													v-if="itemTwo.prizeType && JSON.parse(itemTwo.prizeType).value != 'coin'">
-													¥{{$numberFormat(itemTwo.value)}} </view>
+							</view>
+							<view class="effectsthree-position">{{item.quantity}}个名额 </view>
+							<view style="padding-top: 120rpx;"></view>
+							<view class="effectsthree-positionTwo" v-for="(itemTwo,index) in item.prizeList"
+								:key="index">
+								<navigator
+									:url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
+									hover-class="none">
+									<view class="flex">
+										<view>
+											<image :src="itemTwo.picUrl" mode="aspectFit" class="imatwo"></image>
+										</view>
+										<view>
+											<view class="textone ells-one"
+												v-if="itemTwo.prizeType && JSON.parse(itemTwo.prizeType).value == 'coin'">
+												{{itemTwo.title}}x{{itemTwo.value}}
 											</view>
+											<view class="textone ells-one" v-else> {{itemTwo.title}}</view>
+											<view class="texttwo ells-one"
+												v-if="itemTwo.prizeType && JSON.parse(itemTwo.prizeType).value != 'coin'">
+												¥{{$numberFormat(itemTwo.value)}} </view>
 										</view>
-									</navigator>
-								</view>
+									</view>
+								</navigator>
 							</view>
-							<view v-if="item.prizeList.length > 1 " class="wrap-award-explain">以上奖品随机获得一件</view>
 						</view>
+						<view v-if="item.prizeList.length > 1 " class="wrap-award-explain">以上奖品随机获得一件</view>
 					</view>
 				</view>
+			</view>
 
 			<!-- 我的抽奖码 -->
-			
+
 			<!-- 抽奖码 -->
 			<view class="wrap-description">
 				<view class="wrap-description-code"> 我的抽奖码</view>
@@ -144,7 +148,10 @@
 					</view>
 					<text class="codesix">还没有抽奖码</text>
 				</view>
-				<view class="wrap-description-codesix" v-if="info.codeList && info.codeList.length > 0">再获取1个抽奖码可超过当前<view class="view">{{ (info.codeList.length + 4)*5 > 80 ? 80 : (info.codeList.length + 4)*5}}%</view>的人</view>
+				<view class="wrap-description-codesix" v-if="info.codeList && info.codeList.length > 0">再获取1个抽奖码可超过当前
+					<view class="view">{{ (info.codeList.length + 4)*5 > 80 ? 80 : (info.codeList.length + 4)*5}}%
+					</view>的人
+				</view>
 				<view class="wrap-description-codesixtwo">每邀请一位好友助力成功,即可获得1个抽奖码</view>
 				<view class="wrap-description-codesixtwo">抽奖码越多中奖概率越大</view>
 			</view>
@@ -159,7 +166,7 @@
 				</view>
 			</view>
 			<!-- #endif -->
-			
+
 			<!-- 图文介绍 -->
 			<view v-if="description" class="wrap-descriptiontwo">
 				<view style="padding: 36rpx 24rpx 36rpx;">图文介绍</view>
@@ -167,15 +174,17 @@
 			</view>
 
 		</view>
-		
+
 		<!-- #ifdef MP-WEIXIN -->
 		<view class="footer-fixed">
 			<view class="flex btn">
 				<button v-if="info.codeType == 2 && info.codeList.length < 1" type="default" @click="exChange"
 					open-type="share">分享给好友,参与抽奖</button>
-				<button v-if="info.codeType == 1 && info.codeList.length < 1" type="default" @click="exChangeCode">立即参与抽奖</button>
-				<button v-if="info.codeType == 1 && info.codeList.length >= 1 || info.codeType == 2 && info.codeList.length >= 1" type="default" @click="exChange"
-					open-type="share">分享给好友,提升中奖概率</button>
+				<button v-if="info.codeType == 1 && info.codeList.length < 1" type="default"
+					@click="exChangeCode">立即参与抽奖</button>
+				<button
+					v-if="info.codeType == 1 && info.codeList.length >= 1 || info.codeType == 2 && info.codeList.length >= 1"
+					type="default" @click="exChange" open-type="share">分享给好友,提升中奖概率</button>
 				<!--<u-count-down v-else :time="activityTimeTwo" format="DD:HH:mm:ss" autoStart millisecond
 					@change="onChange">
 					<button class="buttoncol" type="default">
@@ -188,13 +197,14 @@
 		<!-- #ifdef H5 || MP-ALIPAY -->
 		<view class="footer-fixed">
 			<view class="flex btn">
-				<button type="default" v-if="info.codeType == 1 && info.codeList.length < 1" @click="exChangeCode">立即参与抽奖</button>
+				<button type="default" v-if="info.codeType == 1 && info.codeList.length < 1"
+					@click="exChangeCode">立即参与抽奖</button>
 				<button type="default" class="buttoncol" v-else>请在微信“盲票”小程序分享助力</button>
 			</view>
 		</view>
 		<!-- #endif -->
-		
-	<!-- <u-popup :show="popupShow" mode="bottom" @close="close" closeable>
+
+		<!-- <u-popup :show="popupShow" mode="bottom" @close="close" closeable>
 			<view class="popupcode">获取抽奖码</view>
 			<view class="popupcodetwo">
 				<view class="popupcodetwo-view">邀请好友助力,获取抽奖码</view>
@@ -206,12 +216,14 @@
 		</u-popup> -->
 
 		<!-- <u-popup v-if="info.status && JSON.parse(info.status).value == 4"   mode="bottom" @close="close" closeable> -->
-		
+
 		<!-- 助力邀请弹框组件 -->
-		<activity-help :activity-show="activityShow" :inviteCode="inviteCodeTa" :marketingId="marketingId" @close="close" @exChange='exChange' @success="toActivity" v-if="activityShow && info.status && JSON.parse(info.status).value == 3" />
+		<activity-help :activity-show="activityShow" :inviteCode="inviteCodeTa" :marketingId="marketingId"
+			@close="close" @exChange='exChange' @success="toActivity"
+			v-if="activityShow && info.status && JSON.parse(info.status).value == 3" />
 		<!-- 活动结束弹框 -->
-		<u-popup v-if="info.status && JSON.parse(info.status).value == 4 || info.isOn == -1" show="true" mode="center" @close="close"
-			round="11">
+		<u-popup v-if="info.status && JSON.parse(info.status).value == 4 || info.isOn == -1" show="true" mode="center"
+			@close="close" round="11">
 			<view style="text-align: center;width: 600rpx; height: 500rpx;">
 				<view style="color: #666;margin-top: 110rpx;font-size: 40rpx;">来晚了,活动已结束</view>
 				<view style="color: #666;margin-top: 50rpx;font-size: 36rpx;">点击前往查看新的免费抽奖活动</view>
@@ -225,8 +237,11 @@
 <script>
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
+	import log from '@/common/log.js'
 	import ActivityHelp from '@/components/activity-help/activity-help.vue'
-	import { formatRichText } from '@/utils/util.js'
+	import {
+		formatRichText
+	} from '@/utils/util.js'
 	export default {
 		components: {
 			ActivityHelp
@@ -243,15 +258,15 @@
 				activityTime: 0,
 				activityTimeTwo: 0,
 				pagesNum: "",
-				activityShow: false,//助力邀请弹框
+				activityShow: false, //助力邀请弹框
 				inviteCodeTa: '', //邀请码
-				marketingId: '',//活动id
-				userInfo: '',//uid
-				
+				marketingId: '', //活动id
+				userInfo: '', //uid
+
 			}
 		},
 		onLoad(opthios) {
-			if(opthios.id){
+			if (opthios.id) {
 				this.id = opthios.id
 			}
 			/**
@@ -265,16 +280,23 @@
 				this.id = opthios.marketingId
 				this.activityShow = true
 			}
-			
 			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId)
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/packageOperate/activity/index.vue.`
+							)
+						}
+					})
+				}
 			}
 			if (opthios.type) {
 				uni.setStorageSync('shareType', opthios.type)
 			}
-			
 			this.getDetail()
-			
+
 		},
 		onShow() {
 			this.pagesNum = getCurrentPages().length
@@ -309,14 +331,14 @@
 								".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
-						
+
 						let timestamp = parseInt(new Date().getTime())
 						this.activityTime = this.info.endTime - timestamp
 						this.activityTimeTwo = this.info.startTime - timestamp
@@ -341,18 +363,17 @@
 						'FGcPOV1j9ApESr3VUlWjFr6E1vF4X_h0LLN82T2CLL0',
 						'92xxL8XTRPLROyNUtmN04OT0kyq4iwSCH3sz-j6zbZs'
 					],
-					success(res) {
-					}
+					success(res) {}
 				})
 			},
 			//立即参与抽奖
-			exChangeCode(){
-				$http.post(`/api/v1/mp/user/marketing/generateCode/${this.id}`, {}).then( res => {
-					if(res.code == 0){
+			exChangeCode() {
+				$http.post(`/api/v1/mp/user/marketing/generateCode/${this.id}`, {}).then(res => {
+					if (res.code == 0) {
 						this.getDetail()
-						setTimeout(()=>{
+						setTimeout(() => {
 							uni.$u.toast('参与成功,您已获得1个抽奖码');
-						},500)
+						}, 500)
 					}
 				})
 				this.exChange()
@@ -384,7 +405,7 @@
 		onShareAppMessage(res) {
 			return {
 				title: '超值宝贝免费抽,参与活动仅需3秒',
-				path: `/packageOperate/activity/index?marketingId=${ this.info.id }&inviteCode=${ this.inviteCode }&userId=${ this.userInfo.userId }&type=1`,
+				path: `/packageOperate/activity/index?marketingId=${ this.info.id }&inviteCode=${ this.inviteCode }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`,
 				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/free_draw_bkg.jpeg',
 			}
 		},
@@ -393,12 +414,6 @@
 			return {
 				title: '超值宝贝免费抽,参与活动仅需3秒',
 				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/free_draw_bkg.jpeg',
-				// query: { 
-				// 	marketingId:this.info.id,
-				// 	inviteCode: this.inviteCode,
-				// 	userId: this.userInfo.userId,
-				// 	type: 1,
-				// 	}
 				query: `marketingId=${ this.info.id }&inviteCode=${ this.inviteCode }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
 			}
 		}
@@ -725,6 +740,7 @@
 
 			&-codethree {
 				text-align: center;
+
 				.codethree {
 					margin-left: 80rpx;
 
@@ -751,12 +767,14 @@
 				font-weight: bold;
 				color: #666666;
 				margin-bottom: 20rpx;
+
 				.view {
 					font-size: 28rpx;
 					color: #F9822C;
 					display: inline-block;
 				}
 			}
+
 			&-codesixtwo {
 				margin: 0 auto;
 				width: 600rpx;
@@ -781,6 +799,7 @@
 			background-color: #fff;
 			margin: 30rpx 30rpx 0 30rpx;
 			text-align: center;
+
 			&-view {
 				padding: 0 20rpx;
 

+ 15 - 2
src/packageOperate/activity/record.vue

@@ -54,6 +54,7 @@
 					</view>
 				</view>
 			</view>
+			<u-loadmore :line="true" v-if="list.length>19" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
 		</view>
 
 		<!-- 中奖 -->
@@ -105,12 +106,14 @@
 	export default {
 		data() {
 			return {
+				status: 'nomore',//上拉刷新状态
 				list: [],
 				marketingId: '',
 				closeShow: false,
 				activityShow: false,
 				listData: {},
 				pagesNum: "",
+				total: 0,
 			}
 		},
 		onLoad(opthios) {
@@ -134,6 +137,7 @@
 
 			pageList() {
 				this.pageNum = 1
+				this.total = 0
 				this.list = []
 				this.getList()
 			},
@@ -142,7 +146,7 @@
 					title: '加载中'
 				});
 				this.loading = true
-				$http.post(`/api/v1/mp/user/marketing/hit/prize/list`, {
+				$http.post(`/api/v1/mp/user/marketing/hit/prize/list?pageNum=${this.pageNum}&pageSize=20`, {
 					marketingId: this.marketingId,
 				}).then(res => {
 					uni.hideLoading();
@@ -153,6 +157,7 @@
 							item.prizePicUrl = env.filePublic + prizePicUrlArr[0] + '?imageView2/2/w/170'
 							item.avatar = env.filePublic + item.avatar + '?imageView2/2/w/170'
 						})
+						this.total = res.total
 						this.list = this.list.concat(res.rows)
 					}
 				}).catch(() => {
@@ -205,7 +210,15 @@
 						}
 					})
 			}
-		}
+		},
+		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>
 

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

@@ -10,7 +10,7 @@
 		<view class="about">
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
-				<view class="edition">v 2.1.5</view>
+				<view class="edition">v 2.1.8</view>
 			</view>
 			<view class="about-action">
 				<u-cell-group :border="false">

+ 1 - 1
src/packagePrize/bean/index.vue

@@ -28,7 +28,7 @@
 					</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length>7" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length>7" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			<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_6.png" mode="scaleToFill"></image>

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

@@ -74,8 +74,8 @@
 					<view class="choice-info-content-btn flex">
 						<view class="choice-info-content-btn-content flex"  @click="toPrize(actionInfo.prizeType)">
 							<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
-							<view class="choice-info-content-btn-content-txt" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">哇,去瞅瞅我的宝贝</view>
-							<view class="choice-info-content-btn-content-txt" v-else>哇,去商城兑换商品</view>
+							<view class="choice-info-content-btn-content-txt" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
+							<view class="choice-info-content-btn-content-txt" v-else>去商城兑换商品</view>
 						</view>
 					</view>
 				</view>

+ 1 - 1
src/packagePrize/coupon/use.vue

@@ -42,7 +42,7 @@
 					<image class="image-use" src="../static/coupon_use1.png" mode="scaleToFill" v-if="item.status.value == 1"></image>
 					<image class="image-use" src="../static/coupon_use2.png" mode="scaleToFill" v-else></image>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>6" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<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">

+ 2 - 2
src/packagePrize/prize/index.vue

@@ -82,7 +82,7 @@
 						<view class="btnTwo">已兑换</view>
 					</view>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<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">
@@ -114,7 +114,7 @@
 						<view class="btn-title" v-else>查看详情</view>
 					</view>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<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">

+ 17 - 5
src/packagePrize/rolling/index.vue

@@ -88,8 +88,8 @@
 					<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>
@@ -123,7 +123,7 @@
 				statusHeight: 30,
 				btnShow: false,
 				
-				boxId: '',
+				boxId: null,
 				isTry: null,
 				orderId: '',
 				ticketId: '',
@@ -193,18 +193,30 @@
 								_this.btnShow = true
 								_this.running()
 							},500)
-						} else if (res.code == 401 || res.code == 500) {
+						} else if (res.code == 401 ) {
 							uni.hideLoading();
 							clearInterval(time)
 							uni.navigateBack({
 								delta: 2
 							})
-						} 
+						}  else if(res.code == 500) {
+							uni.hideLoading();
+							clearInterval(time)
+							uni.navigateBack({
+								delta: 1
+							})
+						}
 						
 						if (num == 10) {
 							uni.hideLoading();
 							clearInterval(time)
 						}
+					}).catch(() => {
+						uni.hideLoading();
+						clearInterval(time)
+						uni.navigateBack({
+							delta: 1
+						})
 					})
 				}, 1000)
 			},

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

@@ -45,7 +45,7 @@
 					</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 		</view>
 		<view class="flex empty" v-if="!list.length">
 			<view class="center">

+ 29 - 7
src/pages/activity/index.vue

@@ -43,9 +43,7 @@
 						</view>
 					</view>
 				</view>
-
 			</view>
-
 			<view class="flex empty" v-if="!list.length && !loading && triggerStatus == 0">
 				<view class="center">
 					<image class="center-img"
@@ -61,6 +59,7 @@
 				</view>
 			</view>
 		</view>
+		<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
 		<custom-tab-bar :activeValue="'activity'" />
 	</view>
 </template>
@@ -71,6 +70,7 @@
 	export default {
 		data() {
 			return {
+				status: 'nomore',//上拉刷新状态
 				list: [],
 				statusArr: [{
 					name: '参与抽奖'
@@ -85,6 +85,8 @@
 				}],
 				triggerStatus: 0,
 				userInfo: '',
+				pageNum: 1,
+				total: 0,
 			}
 		},
 		onLoad(opthios) {
@@ -92,7 +94,16 @@
 				this.triggerStatus = opthios.triggerStatus
 			}
 			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId)
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined'?opthios.userId:null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/activity/index.vue.`
+							)
+						}
+					})
+				}
 			}
 			if (opthios.type) {
 				uni.setStorageSync('shareType', opthios.type)
@@ -126,6 +137,8 @@
 				this.pageList()
 			},
 			pageList() {
+				this.pageNum = 1
+				this.total = 0
 				this.list = []
 				this.getList()
 			},
@@ -134,7 +147,7 @@
 					title: '加载中'
 				});
 				this.loading = true
-				$http.post(`/api/v1/mp/user/marketing/list?pageNum=1&pageSize=30`, {
+				$http.post(`/api/v1/mp/user/marketing/list?pageNum=${this.pageNum}&pageSize=5`, {
 					triggerStatus: this.triggerStatus,
 				}).then(res => {
 					uni.hideLoading();
@@ -178,7 +191,15 @@
 				// 		type: 1, }
 				query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
 			}
-		}
+		},
+		onReachBottom() {
+			if(this.total < this.pageNum * 5) return ;
+			this.status = 'loading';
+			++this.pageNum
+			if(this.total < this.pageNum * 5) this.status = 'nomore';
+				else this.status = 'loading';
+			this.getList()
+		},
 	}
 </script>
 
@@ -200,7 +221,7 @@
 	}
 
 	.list {
-		padding: 120rpx 20rpx 100rpx;
+		padding: 120rpx 20rpx 0;
 
 		&-view {
 			text-align: center;
@@ -232,6 +253,7 @@
 						float: left;
 
 						.time {
+							font-size: 30rpx;
 							color: #333333;
 						}
 
@@ -241,7 +263,7 @@
 						}
 
 						.timetwo {
-							width: 430rpx;
+							width: 420rpx;
 							background: rgba(249, 130, 44, 0.08);
 							margin-top: 10rpx;
 							border: 2rpx solid #F9822C;

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

@@ -147,7 +147,7 @@
 					<view class="center-font">还没有商品</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 		</view>
 		
 		<custom-tab-bar :activeValue="'core'" />
@@ -231,7 +231,17 @@
 		},
 		onLoad(opthios) {
 			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId)
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined'?opthios.userId:null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/core/index.vue.`
+							)
+						}
+					})
+				}
+				
 			}
 			if (opthios.type) {
 				uni.setStorageSync('shareType', opthios.type)

+ 186 - 141
src/pages/index/index.vue

@@ -11,14 +11,15 @@
 							<view class="barrage-swiper-item flex">
 								<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>
+									<view class="title ells-one">{{ item.nickName }}
+										{{ item.type == 1 ? '刮出了' : '兑换了' }} {{ item.prizeInfo }}</view>
 								</view>
 							</view>
 						</swiper-item>
 					</swiper>
 					<view class="barrage-none"></view>
 				</view>
-				
+
 				<!-- 查看规则 -->
 				<view class="rule">
 					<view class="rule-content flex" @click="toRule">
@@ -26,14 +27,16 @@
 						<text>查看规则</text>
 					</view>
 				</view>
-				
+
 				<!-- 盲票轮播 -->
 				<view class="ticket">
-					<swiper class="ticket-swiper" :current="ticketIndex" :autoplay="false" :circular="true" :duration="200" @change="changeTicket">
+					<swiper class="ticket-swiper" :current="ticketIndex" :autoplay="false" :circular="true"
+						:duration="200" @change="changeTicket">
 						<swiper-item v-for="(item, index) in ticketList" :key="index">
 							<view class="ticket-swiper-item flex" @click="toTicketBox(item)">
 								<image class="ticket-swiper-item-box" :src="item.picUrl[2]" mode="scaleToFill"></image>
-								<image class="ticket-swiper-item-prize" :src="item.picUrl[1]" mode="scaleToFill"></image>
+								<image class="ticket-swiper-item-prize" :src="item.picUrl[1]" mode="scaleToFill">
+								</image>
 							</view>
 						</swiper-item>
 					</swiper>
@@ -43,20 +46,22 @@
 					<view class="ticket-right" @click="ticketLeft()">
 						<image src="../../static/index/index_tip_left.png" mode="scaleToFill"></image>
 					</view>
-					
+
 				</view>
-				
+
 				<!-- 投诉建议 -->
 				<view class="proposal flex">
 					<view class="proposal-time flex" v-if="activityTime && activityTime > 0" @click="toActivity">
 						<image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
 						<view class="time">
-							<u-count-down :time="activityTime" format="HH:mm:ss:SSS" autoStart millisecond></u-count-down>
+							<u-count-down :time="activityTime" format="HH:mm:ss:SSS" autoStart millisecond>
+							</u-count-down>
 						</view>
 					</view>
 					<view v-else></view>
 					<view class="proposal-progress">
-						<u-line-progress :percentage="percentage" height="3" :showText="false" inactiveColor="rgba(255, 255, 255, .36)" activeColor="#fff" />
+						<u-line-progress :percentage="percentage" height="3" :showText="false"
+							inactiveColor="rgba(255, 255, 255, .36)" activeColor="#fff" />
 					</view>
 					<!-- #ifdef MP-WEIXIN -->
 					<view class="proposal-tip" @click="contactService">
@@ -66,29 +71,33 @@
 					<!-- #endif -->
 
 				</view>
-				
+
 				<!-- 中奖概率 -->
 				<view class="chance flex">
 					<view class="chance-title">中奖概率:</view>
 					<view class="chance-hitRate flex">
-						<view class="chance-hitRate-content flex" v-for="(item, index) in ticketInfo.ticketAwardsLabelList" :key="index">
+						<view class="chance-hitRate-content flex"
+							v-for="(item, index) in ticketInfo.ticketAwardsLabelList" :key="index">
 							<image :src="item.picUrl" mode="scaleToFill"></image>
 							<text>{{ item.hitRate }}%</text>
 						</view>
 					</view>
 				</view>
-				
+
 				<!-- 盲票名称轮播 -->
 				<view class="ticket-title" flex>
-					<swiper class="ticket-title-swiper flex" :duration="0" :current="ticketTitleIndex" previous-margin="110px" next-margin="110px" :autoplay="false" :circular="true" @change="changeTicketTitle">
+					<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" :class="{ 'action': ticketTitleIndex == index }">
+							<view class="ticket-title-swiper-item flex"
+								:class="{ 'action': ticketTitleIndex == index }">
 								<text>{{ item.title }}</text>
 							</view>
 						</swiper-item>
 					</swiper>
 				</view>
-				
+
 				<!-- 刮开盲票 -->
 				<view class="ticket-btn flex">
 					<view class="ticket-btn-left flex" @click="toRollingGame">
@@ -98,7 +107,8 @@
 					<view class="ticket-btn-center flex" @click="payment">
 						<view class="image-wrap flex">
 							<image class="btn" src="../../static/index/index_btn.png" mode="scaleToFill"></image>
-							<image class="shadow" src="../../static/index/index_btn_shadow.png" mode="scaleToFill"></image>
+							<image class="shadow" src="../../static/index/index_btn_shadow.png" mode="scaleToFill">
+							</image>
 						</view>
 						<view class="ticket-btn-center-wrap flex">
 							<view class="ticket-btn-center-wrap__title">刮开<br />盲票</view>
@@ -109,7 +119,7 @@
 						<view class="ticket-btn-right__title">更多盲票</view>
 					</view>
 				</view>
-				
+
 				<!-- 盲票价格 -->
 				<view class="ticket-price flex">
 					<view class="ticket-price-amt flex">
@@ -121,7 +131,7 @@
 					</view>
 				</view>
 			</view>
-			
+
 		</view>
 		<!-- tabbar组件 -->
 		<custom-tab-bar :activeValue="'index'" />
@@ -154,9 +164,9 @@
 				statusHeight: 20,
 				ticketIndex: 0, // 盲票选中下标
 				ticketTitleIndex: 0, // 盲票标题选中下边
-				list: [1,2,3,4,5],
+				list: [1, 2, 3, 4, 5],
 				percentage: 0,
-				checkStatus: true, 
+				checkStatus: true,
 				filterActivityList: [],
 				activityTime: null,
 				ticketInfo: {},
@@ -166,7 +176,16 @@
 		},
 		onLoad(opthios) {
 			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId)
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/index/index.vue.`
+							)
+						}
+					})
+				}
 			}
 			if (opthios.type) {
 				uni.setStorageSync('shareType', opthios.type)
@@ -180,23 +199,40 @@
 				let sceneStr = decodeURIComponent(opthios.scene)
 				this.sceneArr = sceneStr.split('&')
 				uni.setStorageSync('shareUid', this.sceneArr[0])
+				if (this.sceneArr[0] === undefined || this.sceneArr[0] === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/index/index.vue,来源:票赢天下小程序分享盲票,`
+							)
+						}
+					})
+				}
 				uni.setStorageSync('shareType', this.sceneArr[1])
 			}
-			
 			/**
-			* 外部app跳转接受的参数
-			* shareUid: 用户ID
-			* shareType: 分享类型
-			* */
-			if(opthios.uid) {
-				uni.setStorageSync('shareUid', opthios.uid)
+			 * 外部app跳转接受的参数
+			 * shareUid: 用户ID
+			 * shareType: 分享类型
+			 * */
+			if (opthios.uid) {
+				uni.setStorageSync('shareUid', opthios.uid != 'undefined' ? opthios.uid : null)
+				if (opthios.uid === undefined || opthios.uid === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/index/index.vue,来源:外部app,`
+							)
+						}
+					})
+				}
 				uni.setStorageSync('shareType', opthios.t)
 			}
 			// #ifdef MP-WEIXIN
 			const res = uni.getMenuButtonBoundingClientRect()
 			this.statusHeight = res.top //胶囊距离顶部
 			// #endif
-			
+
 			// #ifdef MP-ALIPAY
 			uni.getSystemInfo({
 				success: (res) => {
@@ -204,11 +240,11 @@
 				}
 			})
 			// #endif
-			
+
 			let num = Math.round(100 / this.list.length)
 			this.percentage = num
-			
-			
+
+
 			this.getList()
 		},
 		onShow() {
@@ -221,33 +257,37 @@
 		},
 		methods: {
 			// 切换盲票
-			changeTicket({ detail }) {
-				if(this.clickLoading) {
+			changeTicket({
+				detail
+			}) {
+				if (this.clickLoading) {
 					this.clickLoading = false
 					this.ticketIndex = detail.current
 					this.ticketTitleIndex = detail.current
 					this.getTicketDetail(this.ticketList[detail.current].boxId)
 					this.setNum(detail.current)
-					setTimeout(()=> {
+					setTimeout(() => {
 						this.clickLoading = true
 					}, 200)
 				}
 			},
-			
+
 			// 切换盲票名称
-			changeTicketTitle({ detail }) {
-				if(this.clickLoading) {
+			changeTicketTitle({
+				detail
+			}) {
+				if (this.clickLoading) {
 					this.clickLoading = false
 					this.ticketIndex = detail.current
 					this.ticketTitleIndex = detail.current
 					this.getTicketDetail(this.ticketList[detail.current].boxId)
 					this.setNum(detail.current)
-					setTimeout(()=> {
+					setTimeout(() => {
 						this.clickLoading = true
 					}, 200)
 				}
 			},
-			
+
 			// 点击名称
 			clickTicketTitle(index) {
 				this.ticketIndex = index
@@ -255,7 +295,7 @@
 				this.getTicketDetail(this.ticketList[index].boxId)
 				this.setNum(index)
 			},
-			
+
 			setNum(index) {
 				let num = Math.round(100 / this.list.length)
 				if (index == 0) {
@@ -266,7 +306,7 @@
 					this.percentage = uni.$u.range(0, 100, num * (index + 1))
 				}
 			},
-			
+
 			// 投诉建议
 			contactService() {
 				// #ifdef MP-WEIXIN
@@ -278,18 +318,18 @@
 				})
 				// #endif
 			},
-			
+
 			// 活动
 			getActivityList() {
 				$http.post(`/api/v1/mp/user/marketing/recent`, {}).then(res => {
-					if(res && res.data) {
+					if (res && res.data) {
 						let data = res && res.data
 						let timestamp = parseInt(new Date().getTime())
 						this.activityTime = data.endTime - timestamp
 					}
 				})
 			},
-			
+
 			// 获取盲票列表
 			getList() {
 				uni.showLoading({
@@ -305,7 +345,8 @@
 					res => {
 						uni.hideLoading();
 						if (res.code == 0) {
-							res.rows.forEach(item => item.picUrl = item.picUrl.split(',').map(item => env.filePublic + item + '?imageView2/2/w/750'))
+							res.rows.forEach(item => item.picUrl = item.picUrl.split(',').map(item => env.filePublic +
+								item + '?imageView2/2/w/750'))
 							this.ticketList = res.rows
 							this.getTicketDetail(this.ticketList[0].boxId)
 						}
@@ -348,10 +389,13 @@
 				}).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
-						this.ticketInfo = { 
+						this.ticketInfo = {
 							...res.data,
 							ticketAwardsLabelList: res.data.ticketAwardsLabelList.map(item => {
-								return { ...item, picUrl: env.filePublic + item.picUrl }
+								return {
+									...item,
+									picUrl: env.filePublic + item.picUrl
+								}
 							})
 						}
 						this.payInfo = this.ticketList[this.ticketIndex]
@@ -433,7 +477,7 @@
 				this.ticketTitleIndex = this.ticketIndex
 				this.getTicketDetail(this.ticketList[this.ticketTitleIndex].boxId)
 			},
-			
+
 			toRollingGame() {
 				if (!uni.getStorageSync('token')) {
 					uni.navigateTo({
@@ -491,7 +535,7 @@
 					})
 				}
 			},
-			
+
 			toActivity() {
 				uni.switchTab({
 					url: '/pages/activity/index'
@@ -524,7 +568,7 @@
 					url: '/packageOther/rule/index'
 				})
 			},
-			
+
 			getBaseInfo() {
 				$http.post('/api/v1/mp/user/getLoginUserinfo', {}).then(res => {
 					uni.hideLoading();
@@ -571,7 +615,7 @@
 		height: calc(100vh - 50px);
 		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/front_bk.png) center center no-repeat;
 		background-size: 100vw calc(100vh - 50px);
-		
+
 		.index {
 			position: absolute;
 			width: 100%;
@@ -583,17 +627,17 @@
 		position: relative;
 		width: 518rpx;
 		height: 70rpx;
-		
+
 		border-radius: 42rpx;
 		margin-bottom: 16rpx;
 		margin-left: 34rpx;
-		
+
 		&-bg {
 			position: absolute;
 			width: 518rpx;
 			height: 70rpx;
 		}
-		
+
 		&-swiper {
 			position: absolute;
 			z-index: 10;
@@ -601,17 +645,17 @@
 			height: 100%;
 			border-radius: 42rpx;
 			overflow: hidden;
-			
+
 			&-item {
 				width: 100%;
 				height: 100%;
-				
+
 				&-content {
 					display: flex;
 					align-items: center;
 					width: 510rpx;
 					height: 70rpx;
-					
+
 					image {
 						width: 58rpx;
 						height: 58rpx;
@@ -620,7 +664,7 @@
 						border: 1px solid #fff;
 						margin-left: 8rpx;
 					}
-					
+
 					.title {
 						flex: 1;
 						font-size: 26rpx;
@@ -630,7 +674,7 @@
 				}
 			}
 		}
-		
+
 		&-none {
 			position: absolute;
 			width: 518rpx;
@@ -638,7 +682,7 @@
 			z-index: 20;
 		}
 	}
-	
+
 	// 查看规则
 	.rule {
 		display: flex;
@@ -647,14 +691,14 @@
 		height: 34rpx;
 		padding-right: 34rpx;
 		margin-bottom: 24rpx;
-		
+
 		&-content {
 			image {
 				width: 34rpx;
 				height: 34rpx;
 				margin-right: 14rpx;
 			}
-			
+
 			text {
 				font-size: 40rpx;
 				font-family: 'YouSheBiaoTiHei';
@@ -663,26 +707,26 @@
 			}
 		}
 	}
-	
+
 	// 盲票
 	.ticket {
 		height: 36vh;
 		position: relative;
-		
+
 		&-swiper {
 			height: 100%;
-			
+
 			&-item {
 				position: relative;
 				height: 100%;
-				
+
 				&-box {
 					position: absolute;
 					bottom: 0;
 					width: 75vw;
 					height: 75%;
 				}
-				
+
 				&-prize {
 					position: absolute;
 					top: 0;
@@ -692,7 +736,7 @@
 				}
 			}
 		}
-	
+
 		&-left {
 			width: 100rpx;
 			height: 100rpx;
@@ -701,14 +745,15 @@
 			left: 0;
 			display: table-cell;
 			vertical-align: middle;
-			
+
 			image {
-				 display: block;
-				 margin: 25rpx auto;
-				 width: 45rpx;
-				 height: 40rpx;
+				display: block;
+				margin: 25rpx auto;
+				width: 45rpx;
+				height: 40rpx;
 			}
 		}
+
 		&-right {
 			width: 100rpx;
 			height: 100rpx;
@@ -717,7 +762,7 @@
 			right: 0;
 			display: table-cell;
 			vertical-align: middle;
-			
+
 			image {
 				display: block;
 				margin: 25rpx auto;
@@ -727,30 +772,30 @@
 			}
 		}
 	}
-	
+
 	// 投诉建议
 	.proposal {
 		position: relative;
 		height: 66rpx;
 		margin-bottom: 30rpx;
-		
+
 		&-time {
 			position: absolute;
 			left: 30rpx;
 			bottom: 0;
 			flex-direction: column;
 			align-items: flex-start;
-			
+
 			image {
 				width: 140rpx;
 				height: 78rpx;
 				margin-bottom: 12rpx;
 				animation: scaleTime 3s linear infinite;
 			}
-			
+
 			.time {
 				animation: moveTime 0.5s linear infinite;
-				
+
 				::v-deep .u-count-down__text {
 					line-height: 30rpx;
 					font-size: 30rpx;
@@ -760,13 +805,13 @@
 				}
 			}
 		}
-		
+
 		&-progress {
 			position: absolute;
 			bottom: 0;
 			width: 140rpx;
 		}
-		
+
 		&-tip {
 			display: flex;
 			align-items: center;
@@ -775,7 +820,7 @@
 			bottom: 0;
 			width: 212rpx;
 			height: 66rpx;
-			
+
 			image {
 				position: absolute;
 				right: 0;
@@ -783,7 +828,7 @@
 				width: 212rpx;
 				height: 66rpx;
 			}
-			
+
 			text {
 				position: absolute;
 				right: 16rpx;
@@ -794,7 +839,7 @@
 			}
 		}
 	}
-	
+
 	// 中奖概率
 	.chance {
 		justify-content: flex-start;
@@ -805,17 +850,17 @@
 		color: #FFFFFF;
 		font-family: YouSheBiaoTiHei;
 		font-size: 14px;
-		
+
 		&-title {
 			margin-left: 8rpx;
 		}
-		
+
 		&-hitRate {
 			flex: 1;
 			justify-content: space-evenly;
-			
+
 			&-content {
-				
+
 				image {
 					width: 56rpx;
 					height: 50rpx;
@@ -823,16 +868,16 @@
 			}
 		}
 	}
-	
+
 	// 盲票名称轮播
 	.ticket-title {
 		height: 66rpx;
 		padding: 0 34rpx;
-		
+
 		&-swiper {
 			width: calc(100vw - 34px);
 			height: 100%;
-			
+
 			&-item {
 				height: 100%;
 				background: rgba(255, 255, 255, .16);
@@ -840,29 +885,29 @@
 				color: #fff;
 				font-size: 34rpx;
 			}
-			
+
 			.action {
 				background: #FFAE00;
 				box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
 			}
 		}
 	}
-	
+
 	// 刮开盲票
 	.ticket-btn {
 		justify-content: space-between;
 		height: 20vh;
 		padding: 0 30rpx;
-		
+
 		&-left {
 			flex-direction: column;
-			
+
 			image {
 				width: 142rpx;
 				height: 142rpx;
 				margin-bottom: 16rpx;
 			}
-			
+
 			&__title {
 				line-height: 30rpx;
 				font-size: 30rpx;
@@ -871,12 +916,12 @@
 				color: #FFFFFF;
 			}
 		}
-		
+
 		&-center {
 			position: relative;
 			flex-direction: column;
 			height: 100%;
-			
+
 			.image-wrap {
 				position: absolute;
 				width: 310rpx;
@@ -884,12 +929,12 @@
 				border-radius: 50%;
 				overflow: hidden;
 				box-shadow: 2px 2px 10px rgba(255, 189, 24, .8), -2px -2px 10px rgba(255, 189, 24, .8), 2px -2px 10px rgba(255, 189, 24, .8), -2px 2px 10px rgba(255, 189, 24, .8);
-				
+
 				.btn {
 					width: 310rpx;
 					height: 100%;
 				}
-				
+
 				.shadow {
 					position: absolute;
 					width: 310rpx;
@@ -898,12 +943,12 @@
 					animation: shadowMove 1.5s linear infinite;
 				}
 			}
-		
+
 			&-wrap {
 				width: 300rpx;
 				position: absolute;
 				animation: scaleBtn 1.5s linear infinite;
-				
+
 				&__title {
 					width: 300rpx;
 					text-align: center;
@@ -916,16 +961,16 @@
 				}
 			}
 		}
-		
+
 		&-right {
 			flex-direction: column;
-			
+
 			image {
 				width: 142rpx;
 				height: 142rpx;
 				margin-bottom: 16rpx;
 			}
-			
+
 			&__title {
 				line-height: 30rpx;
 				font-size: 30rpx;
@@ -935,11 +980,11 @@
 			}
 		}
 	}
-	
+
 	// 盲票价格
 	.ticket-price {
 		height: 44rpx;
-		
+
 		&-checkbox {
 			width: 44rpx;
 			height: 44rpx;
@@ -947,13 +992,13 @@
 			border-radius: 50%;
 			overflow: hidden;
 			margin-right: 20rpx;
-			
+
 			image {
 				width: 44rpx;
 				height: 44rpx;
 			}
 		}
-		
+
 		&-amt {
 			height: 44rpx;
 			font-family: YouSheBiaoTiHei;
@@ -961,22 +1006,22 @@
 			align-items: flex-end;
 			color: #FFFFFF;
 			margin-right: 20rpx;
-			
+
 			.num {
 				font-size: 56rpx;
 				line-height: 40rpx;
 			}
-			
+
 			.txt {
 				line-height: 36rpx;
 				font-size: 40rpx;
 			}
 		}
-		
+
 		&-discount {
 			height: 44rpx;
 			align-items: flex-end;
-			
+
 			.num {
 				line-height: 26rpx;
 				font-size: 26rpx;
@@ -986,128 +1031,128 @@
 			}
 		}
 	}
-	
+
 	// 奖品移动动画
 	@keyframes movePrize {
 		0% {
 			transform: translate(0, 10px)
 		}
-	
+
 		25% {
 			transform: translate(0, 5px)
 		}
-	
+
 		50% {
 			transform: translate(0, 0px)
 		}
-	
+
 		75% {
 			transform: translate(0, 5px)
 		}
-	
+
 		100% {
 			transform: translate(0, 10px)
 		}
 	}
-	
+
 	// 倒计时移动动画
 	@keyframes moveTime {
 		0% {
 			transform: translate(2px, 0)
 		}
-	
+
 		25% {
 			transform: translate(0, 0)
 		}
-	
+
 		50% {
 			transform: translate(1px, 0)
 		}
-	
+
 		75% {
 			transform: translate(0, 0)
 		}
-	
+
 		100% {
 			transform: translate(2px, 0)
 		}
 	}
-	
+
 	// 放大缩小动画
 	@keyframes scaleTime {
 		0% {
 			transform: scale(1.05)
 		}
-	
+
 		25% {
 			transform: scale(1.02)
 		}
-	
+
 		50% {
 			transform: scale(0.9)
 		}
-	
+
 		75% {
 			transform: scale(1.02)
 		}
-	
+
 		100% {
 			transform: scale(1.05)
 		}
 	}
-	
+
 	// 刮开刮票呼吸动画
 	@keyframes scaleBtn {
 		0% {
 			transform: scale(1.04)
 		}
-	
+
 		25% {
 			transform: scale(1.02)
 		}
-	
+
 		50% {
 			transform: scale(1)
 		}
-	
+
 		75% {
 			transform: scale(1.02)
 		}
-	
+
 		100% {
 			transform: scale(1.04)
 		}
 	}
-	
+
 	// 刮开刮票阴影动画
 	@keyframes shadowBtn {
 		0% {
 			text-shadow: 2px -2px 3px #fff;
 		}
-	
+
 		25% {
 			text-shadow: none;
 		}
-	
+
 		50% {
 			text-shadow: none;
 		}
-		
+
 		75% {
 			text-shadow: none;
 		}
-	
+
 		100% {
 			text-shadow: 2px -2px 3px #fff;
 		}
 	}
-	
+
 	// 刮开盲票光影移动动画
 	@keyframes shadowMove {
 		0% {
 			left: -100%;
 		}
-	
+
 		100% {
 			left: 110%;
 		}

+ 19 - 12
src/pages/lucky/index.vue

@@ -9,7 +9,8 @@
 					</view>
 					<view class="luck-info-content flex">
 						<view class="luck-info-content-num">
-							<image src="../../static/lucky/lucky_gkmp.png" mode="scaleToFill" v-if="info.salePrice == 0"></image>
+							<image src="../../static/lucky/lucky_gkmp.png" mode="scaleToFill"
+								v-if="info.salePrice == 0"></image>
 							<image src="../../static/lucky/zi.png" mode="scaleToFill" v-else></image>
 						</view>
 						<view class="luck-info-content-img">
@@ -18,11 +19,14 @@
 								<view class="luck-info-content-img-word__content">
 									<text>{{ info.awardsName }}</text>
 								</view>
-								<image class="imgtwo" src="../../static/lucky/lucky_xiaoguo.png" mode="scaleToFill" v-if="infoimg">
+								<image class="imgtwo" src="../../static/lucky/lucky_xiaoguo.png" mode="scaleToFill"
+									v-if="infoimg">
 								</image>
-								<image class="img" src="../../static/lucky/lucky_guajiangqu.png" mode="scaleToFill" v-if="info.status == 1">
-								<image class="imgone" src="../../static/lucky/lucky_yidong.png" v-else-if="info.status == 2"></image>
-							</view> 
+								<image class="img" src="../../static/lucky/lucky_guajiangqu.png" mode="scaleToFill"
+									v-if="info.status == 1">
+									<image class="imgone" src="../../static/lucky/lucky_yidong.png"
+										v-else-if="info.status == 2"></image>
+							</view>
 						</view>
 						<view class="luck-info-content-ticket">
 							<image src="../../static/lucky/lucky_piaohao.png" mode="scaleToFill"></image>
@@ -32,12 +36,14 @@
 								</view>
 							</view>
 						</view>
-						<view class="luck-info-content-btn" style="width: 500rpx;" @click="pay" v-if="info.status == 1 && info.salePrice != 0">
+						<view class="luck-info-content-btn" style="width: 500rpx;" @click="pay"
+							v-if="info.status == 1 && info.salePrice != 0">
 							支付{{ info.salePrice / 100 }}元,立即刮奖</view>
 						<view class="luck-info-content-btn" style="width: 500rpx;" @click="payDetail"
 							v-else-if="info.status == 1 && info.salePrice == 0">收下盲票,立即刮奖</view>
 						<!-- <view class=" code" v-else>开奖啦!</view> -->
-						<view class="luck-info-content-btn" style="width: 500rpx;" @click="toChoice" v-if="Choice">领取奖品</view>
+						<view class="luck-info-content-btn" style="width: 500rpx;" @click="toChoice" v-if="Choice">领取奖品
+						</view>
 					</view>
 					<view class="luck-info-close flex">
 						<navigator open-type="exit" target="miniProgram" hover-class="none"
@@ -58,7 +64,7 @@
 				<view class="btn" @click="toUser">确认</view>
 			</view>
 		</u-popup>
-		
+
 		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
 			@touchmove.prevent.stop>
 			<view class="null-prize">
@@ -214,7 +220,7 @@
 											setTimeout(() => {
 												this.ChoiceData = res.data.ticketId
 												this.Choice = true
-												
+
 											}, 500)
 										}, 500)
 									}
@@ -230,9 +236,9 @@
 					uni.hideLoading();
 				})
 			},
-			
+
 			//跳转奖品页
-			toChoice(){
+			toChoice() {
 				uni.redirectTo({
 					url: `/packagePrize/choice/index?id=${ this.ChoiceData }&type=offLine`
 				})
@@ -249,12 +255,13 @@
 					orderNum: 1
 				}
 				uni.showLoading();
+				let suid = uni.getStorageSync('shareUid')
 				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						if (res.data.payAmt == 0) {
 							$http.post('/api/v1/mp/user/ticket/order/submit', {
-								suid: uni.getStorageSync('shareUid'),
+								suid: suid !== 'undefined' && suid !== undefined ? suid : null,
 								type: uni.getStorageSync('shareType')
 							}).then(res => {
 								uni.hideLoading();

+ 65 - 13
src/pages/ticketBox/detail.vue

@@ -83,7 +83,7 @@
 		
 		<!-- 盲票奖品数量、概率 -->
 		<view class="prize-total">
-			<view class="prize-total-num">共{{ prizeList.length }}款</view>
+			<view class="prize-total-num">共{{ total }}款</view>
 			<!-- 中奖概率 -->
 			<view class="prize-total-chance flex">
 				<view class="prize-total-chance-content flex" v-for="(item, index) in info.ticketAwardsLabelList">
@@ -108,6 +108,7 @@
 					<image :src="item.awardsLabelPicUrl" />
 				</view>
 			</view>
+			<u-loadmore :line="true" v-if="prizeList.length>10" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
 		</view>
 		
 		<view class="footer-fixed" v-if="btnFixed">
@@ -137,6 +138,9 @@
 				boxId: '',
 				picUrlArr: [],
 				info: {},
+				status: 'nomore',//上拉刷新状态
+				pageNum: 1,
+				total: 0,
 				prizeList: [],
 
 				payShow: false,
@@ -154,20 +158,38 @@
 		},
 
 		onLoad(opthios) {
+			//票赢天下跳转
 			if (opthios.scene) {
 				let sceneStr = decodeURIComponent(opthios.scene)
 				this.sceneArr = sceneStr.split('&')
 				this.boxId = this.sceneArr[0]
 				uni.setStorageSync('shareUid', this.sceneArr[1])
+				if (this.sceneArr[1] === undefined || this.sceneArr[1] === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue,来源:票赢天下小程序分享盲票,`
+							)
+						}
+					})
+				}
 				uni.setStorageSync('shareType', this.sceneArr[2])
 			}
-
+			
 			if (opthios.boxId) {
 				this.boxId = opthios.boxId
 			}
-
 			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId)
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId:null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue.`
+							)
+						}
+					})
+				}
 			}
 			if (opthios.type) {
 				uni.setStorageSync('shareType', opthios.type)
@@ -179,7 +201,16 @@
 			* shareType: 分享类型
 			* */
 			if(opthios.uid) {
-				uni.setStorageSync('shareUid', opthios.uid)
+				uni.setStorageSync('shareUid', opthios.uid != 'undefined' ? opthios.uid:null)
+				if (opthios.uid === undefined || opthios.uid === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue,来源:外部app,`
+							)
+						}
+					})
+				}
 				uni.setStorageSync('shareType', opthios.t)
 			}
 		},
@@ -203,7 +234,7 @@
 				this.getBaseInfo()
 			}
 			this.pagesNum = getCurrentPages().length
-			if (this.boxId) {
+			if (this.boxId && this.boxId != undefined) {
 				this.getDetail()
 			}
 			
@@ -219,7 +250,7 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/mall/ticket/detail', {
+				$http.post('/api/v1/mp/user/mall/ticket/detail/new', {
 					boxId: this.boxId,
 					noToken: true
 				}).then(res => {
@@ -232,16 +263,27 @@
 								return { ...item, picUrl: env.filePublic + item.picUrl }
 							})
 						}
-						let prizeList = res.data.prizeList
+						this.pageNum = 1
+						this.total = 0
+						this.prizeList = []
+						this.getPrizeList()
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			getPrizeList() {
+				$http.post(`/api/v1/mp/user/ticket/prize/list/${this.boxId}?pageNum=${this.pageNum}&pageSize=10`,{}).then(res => {
+					if (res.code == 0) {
+						let prizeList = res.rows
 						prizeList.forEach(item => {
 							item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/375'
 							item.awardsLabelPicUrl = env.filePublic + item.awardsLabelPicUrl
 						})
-						this.prizeList = prizeList
+						this.total = res.total
+						this.prizeList = this.prizeList.concat(prizeList)
 						this.prizeInfo = this.prizeList[this.prizeIndex]
 					}
-				}).catch(() => {
-					uni.hideLoading();
 				})
 			},
 
@@ -368,7 +410,17 @@
 				query: `boxId=${ this.info.boxId }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
 						
 			}
-		}
+		},
+		onReachBottom() {
+			if(this.total < this.pageNum * 10) return ;
+			this.status = 'loading';
+			// setTimeout(() => {
+			++this.pageNum
+			if(this.total < this.pageNum * 10) this.status = 'nomore';
+				else this.status = 'loading';
+			this.getPrizeList()
+			// }, 2000)
+		},
 	}
 </script>
 
@@ -630,7 +682,7 @@
 	
 	// 盲票奖品列表
 	.prize-list {
-		padding: 0 34rpx;
+		padding: 0 34rpx 70rpx;
 		
 		&-item {
 			position: relative;