瀏覽代碼

完善用户端

hwb0 3 年之前
父節點
當前提交
b4e46341bb

+ 11 - 4
components/pay-popup/pay-popup.vue

@@ -22,7 +22,7 @@
 					</view>
 				</view>
 				<view class="flex agreement">
-					<view class="txt">同意<text>《盲票购买须知》</text></view>
+					<view class="txt" @click="toNotice">同意<text>《盲票购买须知》</text></view>
 					<view class="checked">
 						<u-checkbox-group>
 							<u-checkbox :value="checked" :checked="checked" shape="circle" activeColor="#E96737"
@@ -71,17 +71,24 @@
 			},
 
 			toCoupon() {
+				return
 				uni.navigateTo({
 					url: '/pages/coupon/index'
 				})
 			},
 
+			toNotice() {
+				uni.navigateTo({
+					url: '/pages/about/notice'
+				})
+			},
+
 			close() {
 				this.checked = false
 				this.$emit('close')
 			},
-			
-			success(id){
+
+			success(id) {
 				this.checked = false
 				this.$emit('success', id)
 			},
@@ -140,7 +147,7 @@
 							})
 							_this.close()
 						}
-					}else{
+					} else {
 						payIng = false
 						_this.close()
 						uni.$u.toast('支付失败!');

+ 14 - 14
components/vear-carousel/vear-carousel.vue

@@ -1,5 +1,5 @@
 <template>
-	<swiper class="image-container" previous-margin="100rpx" next-margin="100rpx" circular :autoplay="false" @change="swiperChange">
+	<swiper class="image-container" previous-margin="140rpx" next-margin="140rpx" circular :autoplay="false" @change="swiperChange">
 		<swiper-item :class="currentIndex == index ? 'swiper-item' : 'swiper-item-side'" v-for="(item, index) in imgList" :key="item[urlKey]">
 			<image @click="clickImg(item)" :class="currentIndex == index ? 'item-img' : 'item-img-side'" :src="item[urlKey]" lazy-load :style="dontFirstAnimation ? 'animation: none;' : ''" mode="aspectFill"></image>
 		</swiper-item>
@@ -42,32 +42,32 @@
 <style scoped>
 	.image-container {
 		width: 750rpx;
-		height: 480rpx;
+		height: 580rpx;
 	}
 
 	.item-img {
-		width: 500rpx;
-		height: 480rpx;
+		width: 360rpx;
+		height: 580rpx;
 		animation: to-big .3s;
 	}
 
 	.swiper-item {
-		width: 500rpx;
-		height: 300rpx;
+		width: 360rpx;
+		height: 580rpx;
 		display: flex;
 		justify-content: center;
 		align-items: center;
 	}
 	
 	.item-img-side {
-		width: 500rpx;
-		height: 400rpx;
+		width: 360rpx;
+		height: 550rpx;
 		animation: to-mini .3s;
 	}
 
 	.swiper-item-side {
-		width: 500rpx;
-		height: 400rpx;
+		width: 360rpx;
+		height: 550rpx;
 		display: flex;
 		justify-content: center;
 		align-items: center;
@@ -75,19 +75,19 @@
 	@keyframes to-mini
 	{
 		from {
-			height: 480rpx;
+			height: 580rpx;
 		}
 		to {
-			height: 400rpx;
+			height: 550rpx;
 		}
 	}
 	@keyframes to-big
 	{
 		from {
-			height: 400rpx;
+			height: 550rpx;
 		}
 		to {
-			height: 480rpx;
+			height: 580rpx;
 		}
 	}
 </style>

+ 0 - 1
config/dev.js

@@ -1,6 +1,5 @@
 export default {
   env: "dev",
-  logDebug: true,
   // #ifndef H5
   apiBase: "https://test-mp.quanshu123.com",
   // #endif

+ 1 - 0
config/env.js

@@ -1,3 +1,4 @@
 import dev from './dev.js'
+import prod from './prod.js'
 
 export default dev

+ 10 - 0
config/prod.js

@@ -0,0 +1,10 @@
+export default {
+  env: "prod",
+  // #ifndef H5
+  apiBase: "https://mp-api.51jiazhu.com",
+  // #endif
+  // #ifdef H5
+  apiBase: '/prod-api',
+  // #endif
+  filePublic: "https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/"
+}

+ 6 - 0
pages.json

@@ -45,6 +45,12 @@
 		"path": "pages/process/index"
 	}, {
 		"path": "pages/choice/index"
+	}, {
+		"path": "pages/about/conceal"
+	}, {
+		"path": "pages/about/protect"
+	}, {
+		"path": "pages/about/notice"
 	}],
 	"tabBar": {
 		"custom": true,

文件差異過大導致無法顯示
+ 11 - 0
pages/about/conceal.vue


+ 10 - 4
pages/about/index.vue

@@ -3,13 +3,14 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们"></u-navbar>
 		<view class="about">
 			<view class="flex about-logo">
-				<image src="../../static/logo.png" mode=""></image>
+				<!-- <image src="../../static/logo.png" mode=""></image> -->
+				<view class="image">MP</view>
 				<view class="edition">v 1.0.0</view>
 			</view>
 			<view class="about-action">
 				<u-cell-group :border="false">
-					<u-cell title="隐私保护声明" :isLink="true"></u-cell>
-					<u-cell title="用户使用协议" :isLink="true">
+					<u-cell title="隐私保护声明" :isLink="true" :url="'/pages/about/conceal'"></u-cell>
+					<u-cell title="用户使用协议" :isLink="true" :url="'/pages/about/protect'">
 					</u-cell>
 				</u-cell-group>
 			</view>
@@ -39,10 +40,15 @@
 		&-logo {
 			flex-direction: column;
 
-			image {
+			.image {
 				width: 164rpx;
 				height: 164rpx;
+				line-height: 164rpx;
+				color: #FFFFFF;
+				font-size: 40rpx;
 				border-radius: 10rpx;
+				background-color: $uni-bg-color;
+				text-align: center;
 				margin-top: 88rpx;
 			}
 			

文件差異過大導致無法顯示
+ 11 - 0
pages/about/notice.vue


文件差異過大導致無法顯示
+ 11 - 0
pages/about/protect.vue


+ 1 - 1
pages/bean/index.vue

@@ -47,7 +47,7 @@
 			height: 230rpx;
 			line-height: 230rpx;
 			border-radius: 10rpx;
-			background: url(https://file02.16sucai.com/d/file/2014/1103/1b73e5346d5579badbc83cb15586f0a8.jpg) center no-repeat;
+			background-image: linear-gradient(to right, #eea2a2 0%, #bbc1bf 19%, #57c6e1 42%, #b49fda 79%, #7ac5d8 100%);
 			font-size: 50rpx;
 			padding-left: 180rpx;
 			font-weight: bold;

+ 1 - 1
pages/choice/index.vue

@@ -106,7 +106,7 @@
 	.choice {
 		width: 100%;
 		min-height: calc(100vh - 50px);
-		background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
+		background-image: linear-gradient(to right, #ebbba7 0%, #cfc7f8 100%);
 		padding-bottom: 150rpx;
 
 		&-title {

+ 7 - 0
pages/core/index.vue

@@ -20,6 +20,9 @@
 				</navigator>
 				<view class="core-list-item"></view>
 			</view>
+			<view class="flex empty" v-if="!list.length">
+				<u-empty text="数据为空" mode="order" />
+			</view>
 		</view>
 		<custom-tab-bar :activeValue="'core'" />
 	</view>
@@ -143,5 +146,9 @@
 				padding: 0;
 			}
 		}
+		
+		.empty {
+			height: 60vh;
+		}
 	}
 </style>

+ 58 - 24
pages/goods/detail.vue

@@ -28,35 +28,30 @@
 			<view class="choiceShow-wrap">
 				<view class="flex goods">
 					<view class="flex image-wrap">
-						<image src="../../static/logo.png" mode="aspectFill"></image>
+						<image :src="picUrlArr[0]" mode="aspectFill"></image>
 					</view>
 					<view class="info">
-						<view class="info-title">Apple iPhone 13 (A2634) 128GB 星光色 支持移动联通电信5G 双卡双待手机</view>
+						<view class="info-title">{{ info.title }}</view>
 						<view class="info-coin">
 							<image src="../../static/logo.png" mode=""></image>
-							<view>x 6800</view>
+							<view>x {{ info.value }}</view>
 						</view>
-						<view class="info-stock">库存:234</view>
+						<view class="info-stock">库存:{{ info.quantity }}</view>
 					</view>
 				</view>
-				<view class="sku">
-					<view class="sku-title">颜色</view>
+				<view class="sku" v-for="(item, index) in skuList" :key="index">
+					<view class="sku-title">{{ item.name }}</view>
 					<view class="flex sku-list">
-						<view class="sku-list-item">红色</view>
-						<view class="sku-list-item">黑色</view>
-					</view>
-				</view>
-				<view class="sku">
-					<view class="sku-title">颜色</view>
-					<view class="flex sku-list">
-						<view class="sku-list-item">红色</view>
-						<view class="sku-list-item">黑色</view>
+						<view
+							:class="{'action': item.actionIndex == indexs, 'sku-list-item': item.actionIndex != indexs}"
+							v-for="(ele, indexs) in item.vals" :key="indexs" @click="getSku(ele, item, indexs)">
+							{{ ele }}</view>
 					</view>
 				</view>
 				<view class="flex quantity">
 					<view class="quantity-title">兑换数量</view>
 					<view class="quantity-title">
-						<u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
+						<u-number-box v-model="value" :min="1" :disabledInput="true" @change="valChange"></u-number-box>
 					</view>
 				</view>
 				<view class="flex btn">
@@ -64,7 +59,7 @@
 						<view class="title">应付:</view>
 						<view class="flex coin">
 							<image src="../../static/logo.png" mode=""></image>
-							<view>x 6800</view>
+							<view>x {{ info.value }}</view>
 						</view>
 					</view>
 					<view class="btn-right">
@@ -88,9 +83,8 @@
 				prizeList: [],
 				description: '',
 				choiceShow: false,
-
 				value: 1,
-
+				skuList: []
 			};
 		},
 		onLoad(opthios) {
@@ -109,6 +103,30 @@
 						})
 						// 处理富文本
 						this.description = this.formatRichText(res.data.description);
+
+						let specObj = {}
+						res.data.skuList.forEach(item => {
+							item.properties.split(';').forEach(p => {
+								const key = p.split(':')[0]
+								// console.log(specObj[key] instanceof Array)
+								if (!specObj[key]) {
+									specObj[key] = []
+									// console.log(specObj[key])
+								}
+								specObj[key].push(p.split(':')[1])
+							})
+						})
+						this.skuList = Object.keys(specObj).map(key => {
+							return {
+								name: key,
+								vals: [...new Set(specObj[key])],
+								actionVals: false,
+								actionIndex: 0
+							}
+						})
+
+						console.log(this.skuList);
+						// console.log(this.info);
 					}
 				})
 			},
@@ -124,7 +142,15 @@
 			valChange(e) {
 				console.log(e);
 			},
-			
+
+			getSku(e, item, indexs) {
+				this.$set(item, 'txt', `${item.name}:${e}`)
+				this.$set(item, 'actionIndex', indexs)
+				console.log(e);
+				console.log(item);
+				console.log(indexs);
+			},
+
 			/**
 			 * 处理富文本里的图片宽度自适应
 			 * 1.去掉img标签里的style、width、height属性
@@ -206,9 +232,9 @@
 			font-weight: bold;
 			background-color: #FFFFFF;
 		}
-		
+
 		&-description {
-			image{
+			image {
 				width: 100%;
 			}
 		}
@@ -240,6 +266,7 @@
 				flex-direction: column;
 				justify-content: space-between;
 				padding-left: 26rpx;
+				height: 220rpx;
 
 				&-title {
 					font-size: 32rpx;
@@ -285,9 +312,16 @@
 					margin-left: 36rpx;
 				}
 
-				&-item:first-child {
-					margin-left: 0;
+				.action {
+					line-height: 44rpx;
+					padding: 0 20rpx;
+					margin-left: 36rpx;
+					border: 1px solid $uni-bg-color;
 				}
+
+				// &-item:first-child {
+				// 	margin-left: 0;
+				// }
 			}
 		}
 

+ 10 - 4
pages/index/index.vue

@@ -11,7 +11,7 @@
 						</view>
 						<view class="box-top-action-item-txt">扫一扫</view>
 					</view>
-					<view class="box-top-action-item">
+					<view class="box-top-action-item" @click="toPrize">
 						<view class="flex box-top-action-item-cir">
 							<u-icon name="gift" color="#fff" size="45"></u-icon>
 						</view>
@@ -149,6 +149,12 @@
 					url: '/pages/ticketBox/index'
 				})
 			},
+
+			toPrize() {
+				uni.navigateTo({
+					url: '/pages/prize/index'
+				})
+			},
 		}
 	}
 </script>
@@ -168,7 +174,7 @@
 	.box {
 		width: 100%;
 		height: calc(100vh - 50px);
-		background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
+		background-image: linear-gradient(to right, #ebbba7 0%, #cfc7f8 100%);
 
 		&-top {
 			display: flex;
@@ -206,8 +212,8 @@
 		}
 
 		&-ticket {
-			margin: 200rpx 0 0;
-			height: 480rpx;
+			margin: 100rpx 0 0;
+			height: 580rpx;
 		}
 
 		&-ticket-tip {

+ 2 - 2
pages/login/index.vue

@@ -5,8 +5,8 @@
 			<view class="flex login-image">
 				<view class="image"></view>
 			</view>
-			<view class="login-txt">呱呱刮</view>
-			<view class="login-txt">呱呱刮将为您提供</view>
+			<view class="login-txt">盲票</view>
+			<view class="login-txt">盲票将为您提供</view>
 			<view class="login-title">商品兑换、盲票购买等服务 请先完成授权登录</view>
 			<view class="login-btn">
 				<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信授权登录</button>

+ 1 - 1
pages/lucky/index.vue

@@ -143,7 +143,7 @@
 	.lucky {
 		width: 100%;
 		height: calc(100vh - 50px);
-		background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
+		background-image: linear-gradient(to right, #ebbba7 0%, #cfc7f8 100%);
 
 		&-number {
 			padding-top: 400rpx;

+ 3 - 1
pages/order/detail.vue

@@ -152,7 +152,9 @@
 				let _this = this
 				let payIng = false
 				if (payIng) return
-				uni.showLoading();
+				uni.showLoading({
+					title: '加载中'
+				});
 				$http.post('/api/v1/mp/user/deliver/order/pay', {
 					orderId: _this.info.orderId,
 					payType: 2

+ 3 - 1
pages/order/index.vue

@@ -152,7 +152,9 @@
 				let _this = this
 				let payIng = false
 				if (payIng) return
-				uni.showLoading();
+				uni.showLoading({
+					title: '加载中'
+				});
 				$http.post('/api/v1/mp/user/deliver/order/pay', {
 					orderId: item.orderId,
 					payType: 2

+ 3 - 1
pages/order/settlement.vue

@@ -129,7 +129,9 @@
 				let _this = this
 				let payIng = false
 				if (payIng) return
-				uni.showLoading();
+				uni.showLoading({
+					title: '加载中'
+				});
 				$http.post('/api/v1/mp/user/deliver/order/submit', {}).then(res => {
 					payIng = true
 					uni.hideLoading();

+ 8 - 6
pages/ticketBox/detail.vue

@@ -22,8 +22,9 @@
 			<view class="detail-goods">
 				<view class="detail-goods-title">可获得奖品</view>
 				<view class="detail-goods-list">
-					<navigator :url="`/pages/prizeGoods/detail?id=${ item.prizeId }`" class="detail-goods-list-item"
-						hover-class="navigator-hover" v-for="(item, index) in prizeList" :key="index">
+					<!-- <navigator :url="`/pages/prizeGoods/detail?id=${ item.prizeId }`" class="detail-goods-list-item"
+						hover-class="navigator-hover" v-for="(item, index) in prizeList" :key="index"> -->
+					<view class="detail-goods-list-item" v-for="(item, index) in prizeList" :key="index">
 						<view class="detail-goods-list-item__value">
 							<view class="flex image-wrap">
 								<image :src="item.picUrl" mode="scaleToFill"></image>
@@ -35,7 +36,8 @@
 							</view>
 							<view class="name">{{ item.name }}</view>
 						</view>
-					</navigator>
+					</view>
+					<!-- </navigator> -->
 				</view>
 			</view>
 		</view>
@@ -88,7 +90,8 @@
 						})
 						let prizeList = res.data.prizeList
 						prizeList.forEach(item => {
-							item.picUrl = env.filePublic + item.picUrl
+							let picUrlArr = item.picUrl.split(',')
+							item.picUrl = env.filePublic + picUrlArr[0]
 						})
 
 						this.prizeList = prizeList
@@ -101,7 +104,7 @@
 			close() {
 				this.payShow = false
 			},
-			
+
 			toProcess(id) {
 				this.payShow = false
 				uni.navigateTo({
@@ -228,7 +231,6 @@
 			}
 
 			&-list {
-
 				&-item {
 					position: relative;
 					background-color: #FFFFFF;

部分文件因文件數量過多而無法顯示