Lsx 1 жил өмнө
parent
commit
6cd2c970ae

BIN
src/packageOperate/static/storeicon.png


+ 306 - 217
src/packageOperate/store/index.vue

@@ -1,236 +1,325 @@
-<template>
-	<view>
-		<!-- #ifdef MP-ALIPAY -->
-		<!-- <u-navbar :title="siteName" :border="true" :placeholder="true" bgColor="#fff" leftIconSize="0" /> -->
-			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :title="siteName">
-				<view class="nav-left flex" slot="left" @click="$toIndex()">
-					<u-icon name="home" size="20" color="#333"></u-icon>
-					<view class="nav-left__code">首页</view>
-				</view>
-			</u-navbar>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<!-- <u-navbar :title="siteName" :border="true" :placeholder="true" leftIconSize="0" bgColor="#fff" /> -->
-		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :title="siteName">
-			<view class="nav-left flex" slot="left" @click="$toIndex()">
-				<u-icon name="home" size="20" color="#333"></u-icon>
-				<view class="nav-left__code">首页</view>
-			</view>
-		</u-navbar>
-		<!-- #endif -->
-		
-		<view class="list">
-			<view class="list-item" v-for="(item, index) in list" :key="index">
-				<image :src="item.picUrl" mode="aspectFit" @click="toTicketBox(item)"></image>
-				<view class="list-item-content flex" @click="toTicketBox(item)">
-					<view class="top">{{ item.title }}</view>
-					<view class="bottom flex">
-						<view class="bottom-price">价格:<view style="font-size: 12px; display: inline-block;">¥</view>{{ $numberFormat(item.salePrice) }}<view class="view1" v-if="item.originPrice"><text style="font-size: 10px; display: inline-block;">¥</text>{{ $numberFormat(item.originPrice) }}</view></view>
-					</view>
-				</view>
-			</view>
-			<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">
-				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/lucky_empty_list.png" mode="scaleToFill"></image>
-				<view class="center-font">暂无盲票</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	export default {
-		data() {
-			return {
-				status: 'nomore',//上拉刷新状态
-				pageNum: 1,
-				total: 0,
-				list: [],
-				pagesNum: '',
-				
-				sceneArr: [],
-				channelId: '',
-				userId: '',
+<template>
+	<view class="wrap">
+		<!-- #ifdef MP-ALIPAY -->
+		<!-- <u-navbar :title="siteName" :border="true" :placeholder="true" bgColor="#fff" leftIconSize="0" /> -->
+		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :title="siteName">
+			<view class="nav-left flex" slot="left" @click="$toIndex()">
+				<u-icon name="home" size="20" color="#333"></u-icon>
+				<view class="nav-left__code">首页</view>
+			</view>
+		</u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY -->
+		<!-- <u-navbar :title="siteName" :border="true" :placeholder="true" leftIconSize="0" bgColor="#fff" /> -->
+		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :title="siteName">
+			<view class="nav-left flex" slot="left" @click="$toIndex()">
+				<u-icon name="home" size="20" color="#333"></u-icon>
+				<view class="nav-left__code">首页</view>
+			</view>
+		</u-navbar>
+		<!-- #endif -->
+
+		<view class="info" v-if="qrCode">
+			<view class="info-bacg">
+				<view class="info-bacg-img">
+					<u-image :src="qrCode" mode="aspectFit" width="356rpx" height="356rpx" showMenuByLongpress></u-image>
+				</view>
+				<view class="info-bacg-txt">
+					长按扫码关注商家最新福利
+				</view>
+			</view>
+		</view>
+
+		<view class="list">
+			<view class="list-title flex" v-if="list.length > 0">
+				<view class="list-title-left">
+					商家活动
+				</view>
+				<view class="list-title-right">
+					<image src="../static/storeicon.png" mode=""></image>
+				</view>
+			</view>
+			<view class="list-item" v-for="(item, index) in list" :key="index">
+				<image :src="item.picUrl" mode="aspectFit" @click="toTicketBox(item)"></image>
+				<view class="list-item-content flex" @click="toTicketBox(item)">
+					<view class="top">{{ item.title }}</view>
+					<view class="bottom flex">
+						<view class="bottom-price">价格:<view style="font-size: 12px; display: inline-block;">¥</view>
+							{{ $numberFormat(item.salePrice) }}
+							<view class="view1" v-if="item.originPrice"><text
+									style="font-size: 10px; display: inline-block;">¥</text>{{ $numberFormat(item.originPrice) }}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<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">
+				<image class="center-img"
+					src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/lucky_empty_list.png"
+					mode="scaleToFill"></image>
+				<view class="center-font">暂无盲票</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				status: 'nomore', //上拉刷新状态
+				pageNum: 1,
+				total: 0,
+				list: [],
+				pagesNum: '',
+
+				sceneArr: [],
+				channelId: '',
+				userId: '',
 				siteName: '门店',
-			}
-		},
-
-		onLoad(options) {
-			// 测试用
-			if(options.channelId){
-				this.channelId = options.channelId
-			}
-			
-			/**
-			 * 票赢天下小程序分享门店二维码跳转接收的参数
-			 * channelId: 门店ID
-			 * userId: 分享类型
-			 * siteName: 门店名称
-			 * */
-			if (options.scene) {
-				let sceneStr = decodeURIComponent(options.scene)
-				this.sceneArr = sceneStr.split('&')
-				this.channelId = this.sceneArr[0]
-				this.userId = this.sceneArr[1]
-			}
-		},
-		onShow() {
-			// 获取页面数据
-			this.pageList()
+				qrCode: '',
+			}
+		},
+
+		onLoad(options) {
+			// 测试用
+			if (options.channelId) {
+				this.channelId = options.channelId
+			}
+
+			/**
+			 * 票赢天下小程序分享门店二维码跳转接收的参数
+			 * channelId: 门店ID
+			 * userId: 分享类型
+			 * siteName: 门店名称
+			 * */
+			if (options.scene) {
+				let sceneStr = decodeURIComponent(options.scene)
+				this.sceneArr = sceneStr.split('&')
+				this.channelId = this.sceneArr[0]
+				this.userId = this.sceneArr[1]
+			}
+		},
+		onShow() {
+			// 获取页面数据
+			this.pageList()
 			this.getSiteName()
-		},
-		methods: {
-			//获取门店名称
-			getSiteName() {
-				$http.post(`/api/v1/mp/channel/saleSite/info/${this.channelId}`,{}).then(res => {
-					if (res.code == 0) {
-						this.siteName = res.data ? res.data : ('门店' + this.channelId)
-					}
-				}).catch(() => {
-				})
+			this.getQrCode()
+		},
+		methods: {
+			//获取门店名称
+			getSiteName() {
+				$http.post(`/api/v1/mp/channel/saleSite/info/${this.channelId}`, {}).then(res => {
+					if (res.code == 0) {
+						this.siteName = res.data ? res.data : ('门店' + this.channelId)
+					}
+				}).catch(() => {})
 			},
 			
-			// 获取页面数据
-			pageList() {
-				this.pageNum = 1
-				this.list = []
-				this.getList()
-			},
-			getList() {
-				$http.post(`/api/v1/mp/user/ticket/list/underChannel?pageNum=${this.pageNum}&pageSize=20`,{
+			//获取门店二维码
+			getQrCode() {
+				$http.post('/api/v1/mp/user/query/qrCode', {
 					channelId: this.channelId
 				}).then(res => {
+					if (res.code == 0) {
+						this.qrCode = res.data ? env.filePublic + res.data.split(',')[0] + '?imageView2/2/w/170':''
+					}
+				}).catch(() => {})
+			},
+
+			// 获取页面数据
+			pageList() {
+				this.pageNum = 1
+				this.list = []
+				this.getList()
+			},
+			getList() {
+				$http.post(`/api/v1/mp/user/ticket/list/underChannel?pageNum=${this.pageNum}&pageSize=20`, {
+					channelId: this.channelId
+				}).then(res => {
 					if (res.code == 0) {
-						res.rows.forEach(item => {
-							item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/170'
-						})
+						res.rows.forEach(item => {
+							item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/170'
+						})
 						this.total = res.total
 						this.list = this.list.concat(res.rows)
 					}
-				}).catch(() => {
-				})
-			},
-			
-			// 点击盲票,跳转盲票详情
-			toTicketBox(item) {
-				uni.navigateTo({
-					url: `/pages/ticketBox/detail?boxId=${ item.boxId }&share=1&siteId=${ this.channelId }`
-				})
-			},
-		},
-		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>
+				}).catch(() => {})
+			},
+
+			// 点击盲票,跳转盲票详情
+			toTicketBox(item) {
+				uni.navigateTo({
+					url: `/pages/ticketBox/detail?boxId=${ item.boxId }&share=1&siteId=${ this.channelId }`
+				})
+			},
+		},
+		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>
-	.nav-left {
-		&__code {
-			margin-left: 10rpx;
-		}
-	}
-	// 状态
-	.state {
-		display: flex;
-		position: fixed;
+	.wrap {
 		background-color: #FFFFFF;
-		width: 100%;
-		z-index: 10;
-		box-shadow: 0 5rpx 5rpx #ececec;
 	}
-	// 列表
-	.list {
-		padding: 20rpx 0 100rpx;
-		margin: 0 20rpx 0;
+	
+	.nav-left {
+		&__code {
+			margin-left: 10rpx;
+		}
+	}
+
+	// 状态
+	.state {
+		display: flex;
+		position: fixed;
+		background-color: #FFFFFF;
+		width: 100%;
+		z-index: 10;
+		box-shadow: 0 5rpx 5rpx #ececec;
+	}
+
+	//二维码信息
+	.info {
+		background: linear-gradient(180deg, #E8D9FA 0%, #FAF4FE 100%);
+		padding: 58rpx 0 36rpx 0;
+
+		&-bacg {
+			margin: 0 48rpx 0;
+			background-color: #fff;
+			border-radius: 34rpx;
+			padding-top: 28rpx;
+			
+			&-img {
+				margin: 0 auto;
+				width: 356rpx;
+				height: 356rpx;
+			}
+
+			&-txt {
+				padding: 11rpx 0 22rpx;
+				width: 100%;
+				text-align: center;
+			}
+		}
+	}
+
+	// 列表
+	.list {
+		padding: 0rpx 0 100rpx;
+		margin: 0 30rpx 0;
 		
-		&-item {
-			display: flex;
-			background: #FFFFFF;
-			padding: 30rpx 20rpx;
-			border-radius: 1px;
-			box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.12);
-			margin-bottom: 28rpx;
-			
-			image {
-				width: 140rpx;
-				height: 189rpx;
-				border-radius: 22rpx;
-				margin-right: 60rpx;
+		&-title{
+			justify-content: flex-start;
+			margin: 30rpx 0;
+			&-left {
+				font-size: 34rpx;
+				font-weight: bold;
+				color: #333;
 			}
-			
-			&-content {
-				width: 70%;
-				// flex: 1;
-				flex-direction: column;
-				justify-content: space-between;
-				padding: 26rpx 0;
+			&-right {
+				width: 88rpx;
+				height: 22rpx;
+				margin-left: 8rpx;
 				
-				
-				.top {
+				image {
 					width: 100%;
-					display: inline-block;
-					font-size: 30rpx;
-					line-height: 30rpx;
-					font-weight: bold;
-					margin-bottom: 46rpx;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					white-space: nowrap;
-					
-				}
-				
-				.bottom {
-					width: 100%;
-					justify-content: space-between;
-					
-					&-price {
-						height: 30rpx;
-						overflow: hidden;
-						font-size: 30rpx;
-						line-height: 30rpx;
-						
-						.view1 {
-							color: #999;
-							display: inline-block;
-							text-decoration: line-through;
-							margin-left: 10rpx;
-							font-size: 24rpx;
-							text {
-								text-decoration: line-through;
-							}
-						}
-					}
+					height: 100%;
+					vertical-align: top;
 				}
 			}
-		}
-	}
-	
-	.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>
+		}
+
+		&-item {
+			display: flex;
+			background: #FFFFFF;
+			padding: 30rpx 20rpx;
+			border-radius: 14rpx;
+			box-shadow: 0px -2px 2px 0px rgba(0,0,0,0.03), 0px 3px 10px 2px rgba(18,18,18,0.05);
+			margin-bottom: 28rpx;
+
+			image {
+				width: 140rpx;
+				height: 189rpx;
+				border-radius: 22rpx;
+				margin-right: 60rpx;
+			}
+
+			&-content {
+				width: 70%;
+				// flex: 1;
+				flex-direction: column;
+				justify-content: space-between;
+				padding: 26rpx 0;
+
+
+				.top {
+					width: 100%;
+					display: inline-block;
+					font-size: 30rpx;
+					line-height: 30rpx;
+					font-weight: bold;
+					margin-bottom: 46rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+
+				}
+
+				.bottom {
+					width: 100%;
+					justify-content: space-between;
+
+					&-price {
+						height: 30rpx;
+						overflow: hidden;
+						font-size: 30rpx;
+						line-height: 30rpx;
+
+						.view1 {
+							color: #999;
+							display: inline-block;
+							text-decoration: line-through;
+							margin-left: 10rpx;
+							font-size: 24rpx;
+
+							text {
+								text-decoration: line-through;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.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>

+ 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.2.2</view>
+				<view class="edition">v 1.2.3</view>
 				<!-- #endif -->
 				<!-- #ifdef MP-ALIPAY -->
 				<view class="edition">v 2.2.6</view>