浏览代码

mp首页引导、线上包裹问题修改、

DELL 3 年之前
父节点
当前提交
40f08774ce

+ 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;

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

@@ -325,11 +325,11 @@
 				});
 				let data = {
 					ids: this.ids,
-					appSource: appId
 				}
 				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) {

+ 0 - 3
src/packageOperate/activity/index.vue

@@ -271,8 +271,6 @@
 				this.id = opthios.id
 			}
 			if (opthios.userId) {
-				console.log(opthios);
-				console.log('opthios', opthios.userId);
 				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
 				if (opthios.userId === undefined || opthios.userId === 'undefined') {
 					uni.getSystemInfo({
@@ -419,7 +417,6 @@
 			},
 		},
 		onShareAppMessage(res) {
-			console.log(this.userInfo.userId);
 			return {
 				title: '超值宝贝免费抽,参与活动仅需3秒',
 				path: `/packageOperate/activity/index?marketingId=${ this.info.id }&inviteCode=${ this.inviteCode }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`,

+ 45 - 12
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>
@@ -135,6 +136,15 @@
 			</view>
 
 		</view>
+		<!-- 引导页面 -->
+		<u-popup :show='showMp'  mode='center' round='7'>
+			<view style="width: 500rpx; display: inline-block;">
+				<view style="display: inline-block; margin: 20rpx 10rpx 10rpx 20rpx;font-size: 34rpx;font-weight: bold;">提示:</view>
+				<view class="" style=" margin: 10rpx 10rpx 40rpx 20rpx;font-size: 34rpx;">
+					&emsp;&emsp;“盲票”已升级为“码上快购”点击“ <view @click='toAnotherApplet' style="display: inline-block;color: #FFAE00;">立即前往</view> ” ,跳转至 “码上快购”小程序
+				</view>
+			</view>
+		</u-popup>
 		<!-- tabbar组件 -->
 		<custom-tab-bar :activeValue="'index'" />
 		<!-- 支付弹框组件 -->
@@ -175,9 +185,12 @@
 				ticketInfo: {},
 				clickLoading: true,
 				userInfo: '',
+				showMp: false,
 			};
 		},
 		onLoad(opthios) {
+			if(appId == 1) return this.showMp = true
+			
 			uni.hideTabBar()
 			if (opthios.userId) {
 				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
@@ -260,6 +273,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
@@ -314,7 +343,7 @@
 			// 投诉建议
 			contactService() {
 				// #ifdef MP-WEIXIN
-				if(appId == 1) {
+				if (appId == 1) {
 					// wx.openCustomerServiceChat({
 					// 	extInfo: {
 					// 		url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
@@ -324,7 +353,7 @@
 					uni.navigateTo({
 						url: `/pages/index/wxofficial`
 					})
-				}else {
+				} else {
 					wx.openCustomerServiceChat({
 						extInfo: {
 							url: 'https://work.weixin.qq.com/kfid/kfcf9da505d4dc18c87'
@@ -424,7 +453,7 @@
 			// 立即开刮
 			payment() {
 				this.payInfo = this.ticketList[this.ticketIndex]
-				if(this.payInfo) {
+				if (this.payInfo) {
 					let data = {
 						userCouponIds: [],
 						autoCoupon: 1,
@@ -438,9 +467,11 @@
 								...res.data,
 								...this.payInfo,
 								picUrl: this.payInfo.picUrl[0],
-								couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
+								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
+								couponId: res.data && res.data.couponList && res.data.couponList.length && res
+									.data
 									.couponList[0].id
 							}
 							this.payInfo = info
@@ -449,10 +480,10 @@
 					}).catch(() => {
 						uni.$u.toast('开刮失败,请重试!');
 					})
-				}else {
+				} else {
 					uni.$u.toast('盲票正在准备中');
 				}
-				
+
 			},
 
 			// 关闭支付弹框
@@ -507,14 +538,14 @@
 					})
 					return
 				}
-				if(this.ticketInfo && this.ticketInfo.boxId){
+				if (this.ticketInfo && this.ticketInfo.boxId) {
 					uni.navigateTo({
 						url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&isTry=1`
 					})
-				}else{
+				} else {
 					uni.$u.toast('盲票正在准备中');
 				}
-				
+
 			},
 
 			// 线上立即刮票成功,跳转到刮奖过程
@@ -597,7 +628,9 @@
 			},
 
 			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', {
+					appSource: appId
+				}).then(res => {
 					uni.hideLoading();
 					if (res.code == 0) {
 						this.userInfo = res.data