guhongwei 2 jaren geleden
bovenliggende
commit
73dba2a667

+ 23 - 1
pages/home/index.vue

@@ -50,7 +50,7 @@
 								</image>
 							</view>
 							<view class="title" v-if="item.act_time.is_use=='0'">
-								<text>{{item.title}}</text>
+								<text>{{item.act_time.title}}</text>
 							</view>
 							<view class="time" v-if="item.act_time.is_use=='0'">
 								<text>{{item.act_time.value}}</text>
@@ -75,6 +75,9 @@
 										</view>
 									</view>
 								</view>
+								<view class="acttags">
+									<text v-for="i in item.actTagsShow" :key="i">{{i.label}}</text>
+								</view>
 							</view>
 						</view>
 					</view>
@@ -194,6 +197,7 @@
 						icon: 'none'
 					})
 				} else {
+					console.log(data.to);
 					uni.navigateTo({
 						url: `/${data.to}`
 					})
@@ -484,6 +488,7 @@
 
 				.list {
 					// break-inside: avoid;
+					position: relative;
 					width: 41vw;
 					background-color: var(--fffColor);
 					padding: 2vw;
@@ -535,6 +540,23 @@
 						}
 
 					}
+
+					.acttags {
+						position: absolute;
+						top: 2vw;
+						width: 93%;
+
+						text {
+							display: inline-block;
+							background-color: #ff0000;
+							color: #fff;
+							border-radius: 1vw;
+							padding: 0.5vw;
+							font-size: 12px;
+
+							margin: 0 1vw 0 0;
+						}
+					}
 				}
 			}
 		}

+ 19 - 0
pagesHome/market/search.vue

@@ -52,6 +52,9 @@
 											<text class="iconfont icon-gouwuche"></text>
 										</view>
 									</view>
+									<view class="acttags">
+										<text v-for="i in item.actTagsShow" :key="i">{{i.label}}</text>
+									</view>
 								</view>
 							</view>
 						</view>
@@ -408,6 +411,22 @@
 								}
 							}
 						}
+						.acttags {
+							position: absolute;
+							top: 2vw;
+							width: 93%;
+						
+							text {
+								display: inline-block;
+								background-color: #ff0000;
+								color: #fff;
+								border-radius: 1vw;
+								padding: 0.5vw;
+								font-size: 12px;
+						
+								margin: 0 1vw 0 0;
+							}
+						}
 					}
 				}
 			}

+ 25 - 4
pagesHome/order/detail.vue

@@ -15,6 +15,9 @@
 							<view class="goodsColect">
 								<text @tap="toGoodscolect" :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
 							</view>
+							<view class="acttags" v-if="info.goods.act_tags&&info.goods.act_tags.length>0">
+								<text v-for="i in info.goods.act_tags" :key="i">{{i.label}}</text>
+							</view>
 						</view>
 						<view class="one_2">
 							<text class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].sell_money:0}}</text>
@@ -174,7 +177,7 @@
 				<swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
 					<swiper-item class="list" v-for="(item,index) in info.specs" :key="index">
 						<view class="list_1">
-							<image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url" mode="aspectFill"></image>
+							<image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url" mode="aspectFit"></image>
 						</view>
 						<view class="name">
 							<text>{{item.name}}</text>
@@ -252,12 +255,12 @@
 				dialog: {
 					show: false,
 					type: '1'
-				}
+				},
 			};
 		},
 		onLoad: async function(e) {
 			const that = this;
-			that.$set(that, `id`, e.id || '635e4b5b42e87c7a2880d0a8');
+			that.$set(that, `id`, e.id || '');
 			that.$set(that, `inviter`, e.inviter || '');
 			await that.searchConfig();
 			await that.search();
@@ -662,6 +665,7 @@
 					position: fixed;
 					top: 2vw;
 					right: 3vw;
+					z-index: 99;
 					background-color: #858585;
 					border-radius: 90px;
 
@@ -669,6 +673,24 @@
 						font-size: 30px;
 					}
 				}
+
+				.acttags {
+					position: absolute;
+					top: 1vw;
+					left: 1vw;
+					width: 97%;
+
+					text {
+						display: inline-block;
+						background-color: #ff0000;
+						color: #fff;
+						border-radius: 1vw;
+						padding: 0.5vw;
+						font-size: 12px;
+
+						margin: 0 1vw 0 0;
+					}
+				}
 			}
 
 			.one_2 {
@@ -1081,7 +1103,6 @@
 
 		.list {
 			.list_1 {
-				background-color: #fff;
 				padding: 2vw;
 				margin: 0 0 5vw 0;
 

+ 99 - 39
pagesHome/shop/index.vue

@@ -10,20 +10,24 @@
 						</view>
 						<view class="one_1_2">
 							<view class="pubu">
-								<view class="list" v-for="(item,index) in shoplist" :key="index">
+								<view class="list" v-for="(item,index) in shoplist" :key="index" @tap="toBuy(item)">
 									<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
 									<view class="name textOver">
 										{{item.name}}
 									</view>
 									<view class="other">
 										<view class="money">
-											<text>¥</text>
-											<text>{{item.sell_money}}</text>
-										</view>
-										<view class="btn">
-											<button type="default" size="mini" @click="toBuy(item)">购买</button>
+											<view class="money_1">
+												<text>¥</text><text>{{item.sell_money||0}}</text>
+											</view>
+											<view class="money_2">
+												<text>¥</text><text>{{item.flow_money||0}}</text>
+											</view>
 										</view>
 									</view>
+									<view class="acttags">
+										<text v-for="i in item.actTagsShow" :key="i">{{i.label}}</text>
+									</view>
 								</view>
 							</view>
 						</view>
@@ -55,7 +59,7 @@
 								</view>
 								<view class="second_2">
 									<view class="pubu">
-										<view class="list" v-for="(item,index) in list" :key="index">
+										<view class="list" v-for="(item,index) in list" :key="index" @tap="toBuy(item)">
 											<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
 											</image>
 											<view class="sale" v-if="item.is_sale==true">
@@ -66,13 +70,17 @@
 											</view>
 											<view class="other">
 												<view class="money">
-													<text>¥</text>
-													<text>{{item.sell_money}}</text>
-												</view>
-												<view class="btn">
-													<button type="default" size="mini" @click="toBuy(item)">购买</button>
+													<view class="money_1">
+														<text>¥</text><text>{{item.sell_money||0}}</text>
+													</view>
+													<view class="money_2">
+														<text>¥</text><text>{{item.flow_money||0}}</text>
+													</view>
 												</view>
 											</view>
+											<view class="acttags">
+												<text v-for="i in item.actTagsShow" :key="i">{{i.label}}</text>
+											</view>
 										</view>
 									</view>
 								</view>
@@ -482,6 +490,7 @@
 
 						.list {
 							// break-inside: avoid;
+							position: relative;
 							width: 43vw;
 							background: #fff;
 							padding: 2vw;
@@ -505,21 +514,51 @@
 								justify-content: space-between;
 
 								.money {
-									color: var(--ff0Color);
+									display: flex;
 
-									text:nth-child(1) {
-										font-size: var(--font12Size);
+									.money_1 {
+										color: var(--fFB1Color);
+										font-size: 12px;
+
+										text:last-child {
+											font-size: 16px;
+											padding: 0 0 0 1vw;
+										}
 									}
-								}
 
-								.btn {
-									button {
-										border-radius: 25px;
-										color: var(--fffColor);
-										background-color: var(--ff0Color);
-										font-size: var(--font12Size);
+									.money_2 {
+										font-size: 12px;
+										margin: 0 0 0 2vw;
+										color: var(--f99Color);
+
+										text {
+											text-decoration: line-through;
+										}
+
+										text:last-child {
+											font-size: 16px;
+											padding: 0 0 0 1vw;
+										}
 									}
 								}
+
+							}
+
+							.acttags {
+								position: absolute;
+								top: 2vw;
+								width: 93%;
+
+								text {
+									display: inline-block;
+									background-color: #ff0000;
+									color: #fff;
+									border-radius: 1vw;
+									padding: 0.5vw;
+									font-size: 12px;
+
+									margin: 0 1vw 0 0;
+								}
 							}
 						}
 					}
@@ -710,30 +749,51 @@
 									justify-content: space-between;
 
 									.money {
-										font-size: var(--font14Size);
-										color: var(--ff0Color);
+										display: flex;
 
-										text:nth-child(1) {
-											font-size: var(--font12Size);
+										.money_1 {
+											color: var(--fFB1Color);
+											font-size: 12px;
+
+											text:last-child {
+												font-size: 16px;
+												padding: 0 0 0 1vw;
+											}
 										}
-									}
 
-									.other_1 {
-										flex-grow: 1;
-										margin: 0 0 0 2vw;
-										font-size: var(--font12Size);
-										color: var(--f85Color);
-									}
+										.money_2 {
+											font-size: 12px;
+											margin: 0 0 0 2vw;
+											color: var(--f99Color);
 
-									.btn {
-										button {
-											border-radius: 25px;
-											color: var(--fffColor);
-											background-color: var(--ff0Color);
-											font-size: var(--font12Size);
+											text {
+												text-decoration: line-through;
+											}
 
+											text:last-child {
+												font-size: 16px;
+												padding: 0 0 0 1vw;
+											}
 										}
 									}
+
+								}
+
+								.acttags {
+									position: absolute;
+									top: 2vw;
+									width: 93%;
+
+									text {
+										display: inline-block;
+										background-color: #ff0000;
+										color: #fff;
+										border-radius: 1vw;
+										padding: 0.5vw;
+										font-size: 12px;
+
+										margin: 0 1vw 0 0;
+									}
 								}
 							}
 						}

+ 79 - 37
pagesMy/account/upBasic.vue

@@ -4,17 +4,20 @@
 			<view class="one">
 				<uni-forms ref="form" :modelValue="form" :rules="rules" label-width="auto">
 					<uni-forms-item label="头像" name="icon">
-						<upload :list="icon" name="icon" :count="1" @uplSuc="uplSuc" @uplDel="uplDel"></upload>
+						<view class="icon">
+							<view class="icon_1" v-if="form.icon&&form.icon.length>0">
+								<image class="image" v-for="i in form.icon" :key="i" :src="i.url" mode=""></image>
+								<uni-icons class="del" type="close" size="30" color="#ff0000" @click="iconDel()"></uni-icons>
+							</view>
+							<view class="icon_2" v-else>
+								<button open-type="chooseAvatar" @chooseavatar="chooseavatar">上传头像</button>
+							</view>
+						</view>
 					</uni-forms-item>
 					<uni-forms-item label="用户名" name="name">
-						<uni-easyinput type="text" v-model="form.name" placeholder="请输入用户名" />
+						<input class="input" type="nickname" :value="form.name" placeholder="请输入用户名" @input="nameInput">
+						<!-- <uni-easyinput type="nick" v-model="form.name" placeholder="请输入用户名" /> -->
 					</uni-forms-item>
-		<!-- 			<uni-forms-item label="手机号" name="phone">
-						<uni-easyinput type="text" v-model="form.phone" placeholder="请输入手机号" disabled />
-					</uni-forms-item>
-					<uni-forms-item label="电子邮箱" name="email">
-						<uni-easyinput type="text" v-model="form.email" placeholder="请输入电子邮箱" disabled />
-					</uni-forms-item> -->
 					<uni-forms-item label="性别" name="gender">
 						<picker @change="genderChange" name="gender" :value="form.gender" :range="genderList" range-key="label">
 							<view class="uni-input">{{form.zhGender||'请选择性别'}}</view>
@@ -46,7 +49,9 @@
 				frameStyle: {
 					useBar: false
 				},
-				form: {},
+				form: {
+					icon: []
+				},
 				rules: {
 					name: {
 						rules: [{
@@ -61,30 +66,17 @@
 						}]
 					},
 				},
-				genderList: [
-					// {
-					// 	label: '保密',
-					// 	value: '0'
-					// },
-					// {
-					// 	label: '男',
-					// 	value: '1'
-					// },
-					// {
-					// 	label: '女',
-					// 	value: '2'
-					// },
-				],
-				icon: []
+				genderList: [],
+
 			};
 		},
-		onLoad:async function(e) {
+		onLoad: async function(e) {
 			const that = this;
 			await that.searchOther();
 			that.watchLogin();
 		},
 		methods: {
-			async searchOther(){
+			async searchOther() {
 				const that = this;
 				let res;
 				res = await that.$api(`/dictData`, 'GET', {
@@ -107,8 +99,6 @@
 									.gender)
 								if (gender) arr.data.zhGender = gender.label;
 								that.$set(that, `form`, arr.data)
-								
-								that.$set(that, `icon`, arr.data.icon)
 							} else {
 								uni.showToast({
 									title: arr.errmsg,
@@ -126,17 +116,35 @@
 					url: `/${e.route}`
 				})
 			},
-			// 图片上传
-			uplSuc(e) {
+			// 删除头像
+			iconDel() {
 				const that = this;
-				that.$set(that, `${e.name}`, [...that[e.name], e.data]);
+				that.$set(that.form, `icon`, [])
+			},
+			// 头像上传
+			async chooseavatar(e) {
+				const that = this;
+				let avatarUrl = e.detail.avatarUrl;
+				let serverUrl = that.$config.serverUrl;
+				const res = await that.$apifile(`/point/upload`, 'file', avatarUrl, 'file');
+				if (res.errcode == '0') {
+					let obj = {
+						name: res.name,
+						uri: res.uri,
+						url: serverUrl + res.uri
+					}
+					that.$set(that.form, `icon`, [obj])
+				} else {
+					uni.showToast({
+						title: res.errmsg,
+						icon: 'none'
+					})
+				}
 			},
-			// 图片删除
-			uplDel(e) {
+			// 选择,输入昵称
+			nameInput(e) {
 				const that = this;
-				let data = that[e.name];
-				let arr = data.filter((i, index) => index != e.data.index);
-				that.$set(that, `${e.name}`, arr)
+				that.$set(that.form, `name`, e.detail.value);
 			},
 			// 选择性别
 			genderChange(e) {
@@ -162,7 +170,6 @@
 			onSubmit(ref) {
 				const that = this;
 				that.$refs[ref].validate().then(async params => {
-					params.icon = that.icon
 					const arr = await that.$api(`/user/${that.form.id}`, 'POST', params);
 					if (arr.errcode == '0') {
 						uni.showToast({
@@ -197,6 +204,12 @@
 				border-radius: 1vw;
 			}
 
+			.input {
+				border: #f1f1ff 1px solid;
+				padding: 1.5vw 1vw;
+				border-radius: 5px;
+			}
+
 			.btn {
 				text-align: center;
 
@@ -211,6 +224,35 @@
 					font-size: var(--font14Size);
 				}
 			}
+
+			.icon {
+				display: flex;
+
+				.icon_1 {
+					position: relative;
+
+					.image {
+						width: 30vw;
+						height: 30vw;
+					}
+
+					.del {
+						position: absolute;
+						top: 0;
+						left: 22vw;
+					}
+				}
+
+				.icon_2 {
+					text-align: left;
+
+					button {
+						width: 30vw;
+						padding: 0vw 1vw;
+						font-size: 14px;
+					}
+				}
+			}
 		}
 	}
 

+ 22 - 1
pagesRest/activity/info.vue

@@ -12,7 +12,7 @@
 								<image class="image" :src="item.file&&item.file.length?item.file[0].url:''" mode="">
 								</image>
 							</view>
-							<view class="name">
+							<view class="name textOver">
 								<text>{{item.goods_name}}</text>
 							</view>
 							<view class="money">
@@ -23,6 +23,9 @@
 									<text>¥</text><text>{{item.flow_money||0}}</text>
 								</view>
 							</view>
+							<view class="acttags">
+								<text v-for="i in item.act_tags" :key="i">{{i.label}}</text>
+							</view>
 						</view>
 					</view>
 					<view class="is_bottom" v-if="is_bottom">
@@ -197,6 +200,7 @@
 			padding: 2vw;
 
 			.list {
+				position: relative;
 				padding: 2vw;
 				background-color: var(--f1Color);
 				margin: 0 2vw 2vw 0;
@@ -247,6 +251,23 @@
 						}
 					}
 				}
+
+				.acttags {
+					position: absolute;
+					top: 2vw;
+					width: 93%;
+
+					text {
+						display: inline-block;
+						background-color: #ff0000;
+						color: #fff;
+						border-radius: 1vw;
+						padding: 0.5vw;
+						font-size: 12px;
+
+						margin: 0 1vw 0 0;
+					}
+				}
 			}
 
 			.list:nth-child(2n) {

+ 69 - 3
pagesRest/recom/index.vue

@@ -10,12 +10,24 @@
 						<view class="one_2">
 							<view class="list" v-for="(item,index) in list" :key="index" @tap="toBuy(item)">
 								<view class="list_1">
-									<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
-										mode=""></image>
+									<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
 								</view>
 								<view class="name textOver">
 									{{item.name}}
 								</view>
+								<view class="other">
+									<view class="money">
+										<view class="money_1">
+											<text>¥</text><text>{{item.sell_money||0}}</text>
+										</view>
+										<view class="money_2">
+											<text>¥</text><text>{{item.flow_money||0}}</text>
+										</view>
+									</view>
+								</view>
+								<view class="acttags">
+									<text v-for="i in item.actTagsShow" :key="i">{{i.label}}</text>
+								</view>
 							</view>
 						</view>
 						<view class="is_bottom" v-if="is_bottom">
@@ -87,7 +99,7 @@
 				};
 				if (that.type == '1') info.tags = that.tags;
 				else if (that.type == '2') info.act_tags = that.act_tags;
-				let res = await that.$api(`/goods`, 'GET', {
+				let res = await that.$api(`/viewGoods/indexGoodsList`, 'GET', {
 					...info,
 					status: '1'
 				});
@@ -200,6 +212,7 @@
 				padding: 0 2vw;
 
 				.list {
+					position: relative;
 					width: 43vw;
 					margin: 0 0 2vw 0;
 					box-shadow: 0 0 5px #f1f1f1;
@@ -220,6 +233,59 @@
 					.name {
 						font-size: 16px;
 					}
+
+					.other {
+						display: flex;
+						flex-direction: row;
+						justify-content: space-between;
+
+						.money {
+							display: flex;
+
+							.money_1 {
+								color: var(--fFB1Color);
+								font-size: 12px;
+
+								text:last-child {
+									font-size: 16px;
+									padding: 0 0 0 1vw;
+								}
+							}
+
+							.money_2 {
+								font-size: 12px;
+								margin: 0 0 0 2vw;
+								color: var(--f99Color);
+
+								text {
+									text-decoration: line-through;
+								}
+
+								text:last-child {
+									font-size: 16px;
+									padding: 0 0 0 1vw;
+								}
+							}
+						}
+
+					}
+
+					.acttags {
+						position: absolute;
+						top: 2vw;
+						width: 93%;
+
+						text {
+							display: inline-block;
+							background-color: #ff0000;
+							color: #fff;
+							border-radius: 1vw;
+							padding: 0.5vw;
+							font-size: 12px;
+
+							margin: 0 1vw 0 0;
+						}
+					}
 				}
 			}
 		}