Procházet zdrojové kódy

项目日志:12.13奖品兑换功能实现

gubai před 3 roky
rodič
revize
a5a7418996

+ 29 - 5
pages/index/index.vue

xqd xqd xqd
@@ -107,14 +107,21 @@
 		<!-- 酒店推荐图片 -->
 		<view class="home-hotel-img">
 			<view class="home-hotel-img-content">
-				<view @click="produceDetail(item.id)" class="home-hotel-img-content-item" v-for="(item,index) in goodsList" :key="index"
+				<!-- <view @click="produceDetail(item.id)" class="home-hotel-img-content-item" v-for="(item,index) in goodsList" :key="index"
+					:style="{marginTop:item.marginTop || 0 }">
+					<image class="home-hotel-img-content-item-img"
+						:class="item.short?'home-hotel-img-content-item-img': 'home-hotel-img-content-item-img-long' "
+						:src="item.cover_img" mode=""></image>
+					<view class="text">
+						<text class="text-top">{{item.name}}</text>
+				</view> -->
+				<view  class="home-hotel-img-content-item" v-for="(item,index) in goodsList" :key="index"
 					:style="{marginTop:item.marginTop || 0 }">
 					<image class="home-hotel-img-content-item-img"
 						:class="item.short?'home-hotel-img-content-item-img': 'home-hotel-img-content-item-img-long' "
 						:src="item.cover_img" mode=""></image>
 					<view class="text">
 						<text class="text-top">{{item.name}}</text>
-						<!-- <text class="text-main">{{item.title}}</text> -->
 					</view>
 				</view>
 			</view>
@@ -210,7 +217,24 @@
 				//广告图展示图片:
 				advertisImg: '',
 				//广告图展示视频
-				goodsList: [],
+				goodsList: [
+					{
+						cover_img:'https://t9.9026.com/imgs/11.png',
+						name:'2023新春福兔系列礼盒 倾心甄选 待你拥有'
+					},
+					{
+						cover_img:'https://t9.9026.com/imgs/22.png',
+						name:'2023新春福兔系列礼盒 倾心甄选 待你拥有'
+					},
+					{
+						cover_img:'https://t9.9026.com/imgs/33.png',
+						name:'2023新春福兔系列礼盒 倾心甄选 待你拥有'
+					},
+					{
+						cover_img:'https://t9.9026.com/imgs/44.png',
+						name:'2023新春福兔系列礼盒 倾心甄选 待你拥有'
+					},
+				],
 				status: 'noMore',
 				contentText: {
 					contentdown: '查看更多',
@@ -268,8 +292,8 @@
 			this.admin = this.$store.getters.userInfo
 		},
 		onLoad() {
-			// this.shortLong()
-			this.getGoodsList()
+
+			// this.getGoodsList()
 			this.getAllSet()
 		},
 		methods: {

+ 17 - 129
pages/my/myorders/orders.vue

xqd xqd xqd
@@ -23,33 +23,35 @@
 				</view>
 			</view>
 		</view>
-		<!-- 全部 -->
-		<view v-if="isActive === 0">
-			<view class="card" v-for="item in orderList">
+		<view>
+			<view class="card" v-for="(item,index) in orderList" :key="index">
 				<view class="toptitle">
-					<view>订单号:62aae0eb9c6fd622</view>
-					<view>未核销</view>
+					<view>订单号:{{item.order_no}}</view>
+					<view v-if="item.status == 1">待兑换</view>
+					<view v-if="item.status == 2">待发货</view>
+					<view v-if="item.status == 3">待收货</view>
+					<view v-if="item.status == 4">已完成</view>
 				</view>
 				<view class="shopCard">
-					<image src="http://t9.9026.com/imgs/Kudosbg.png"></image>
+					<image :src="item.img_urls"></image>
 					<view style="margin-left: 24rpx;">
-						<text class="name">端午佳节五香肉粽子,仅限前</text>
-						<text class="tag">礼盒装 2000积分</text>
+						<text class="name">{{item.product_name}}</text>
+						<!-- <text class="tag">礼盒装 2000积分</text> -->
 					</view>
 				</view>
 				<view class="points">
-					<text class="totalName" style="margin-right: 50rpx;">共一项</text>
-					<text class="totalName">共计:</text>
-					<text class="totalContent">2000积分</text>
+					<text class="totalName" style="margin-right: 50rpx;">共{{item.product_num}}件</text>
+					<text class="totalName" v-if="item.integral != 0">共计:</text>
+					<text class="totalContent" v-if="item.integral !=0">2000积分</text>
 				</view>
 				<view class="btn">
-					<view class="btnitem" @click="openVFcode">
+					<view class="btnitem" @click="openVFcode" v-if="false">
 						<text>核销码</text>
 					</view>
-					<view class="btnitem" v-if="false">
+					<view class="btnitem" v-if="item.status == 1">
 						<text>取消</text>
 					</view>
-					<view class="btnitem" v-if="false">
+					<view class="btnitem" v-if="item.status == 1">
 						<text>兑换</text>
 					</view>
 					<view class="btnitem" v-if="false">
@@ -58,119 +60,6 @@
 				</view>
 			</view>
 		</view>
-		<!-- 待兑换 -->
-		<view v-if="isActive == 1">
-			<view class="card" v-for="item in orderList">
-				<view class="toptitle">
-					<view>订单号:62aae0eb9c6fd622</view>
-					<view>未核销</view>
-				</view>
-				<view class="shopCard">
-					<image src="http://t9.9026.com/imgs/Kudosbg.png"></image>
-					<view style="margin-left: 24rpx;">
-						<text class="name">端午佳节五香肉粽子,仅限前</text>
-						<text class="tag">礼盒装 2000积分</text>
-					</view>
-				</view>
-				<view class="points">
-					<text class="totalName" style="margin-right: 50rpx;">共一项</text>
-					<text class="totalName">共计:</text>
-					<text class="totalContent">2000积分</text>
-				</view>
-				<view class="btn">
-
-					<view class="btnitem">
-						<text>取消</text>
-					</view>
-					<view class="btnitem" @click="goIntegralExchange">
-						<text>兑换</text>
-					</view>
-
-				</view>
-			</view>
-		</view>
-		<!-- 待发货 -->
-		<view v-if="isActive ==2">
-			<view class="card" v-for="item in orderList">
-				<view class="toptitle">
-					<view>订单号:62aae0eb9c6fd622</view>
-					<view>未核销</view>
-				</view>
-				<view class="shopCard">
-					<image src="http://t9.9026.com/imgs/Kudosbg.png"></image>
-					<view style="margin-left: 24rpx;">
-						<text class="name">端午佳节五香肉粽子,仅限前</text>
-						<text class="tag">礼盒装 2000积分</text>
-					</view>
-				</view>
-				<view class="points">
-					<text class="totalName" style="margin-right: 50rpx;">共一项</text>
-					<text class="totalName">共计:</text>
-					<text class="totalContent">2000积分</text>
-				</view>
-				<view class="btn">
-
-					<view class="btnitem" v-if="false">
-						<text>取消</text>
-					</view>
-					<view class="btnitem" v-if="false" >
-						<text>兑换</text>
-					</view>
-
-				</view>
-			</view>
-		</view>
-		<!-- 待收货 -->
-		<view v-if="isActive == 3">
-			<view class="card" v-for="item in orderList" @click="goOrderDetail">
-				<view class="toptitle">
-					<view>订单号:62aae0eb9c6fd622</view>
-					<view>未核销</view>
-				</view>
-				<view class="shopCard">
-					<image src="http://t9.9026.com/imgs/Kudosbg.png"></image>
-					<view style="margin-left: 24rpx;">
-						<text class="name">端午佳节五香肉粽子,仅限前</text>
-						<text class="tag">礼盒装 2000积分</text>
-					</view>
-				</view>
-				<view class="points">
-					<text class="totalName" style="margin-right: 50rpx;">共一项</text>
-					<text class="totalName">共计:</text>
-					<text class="totalContent">2000积分</text>
-				</view>
-				<view class="btn">
-					<view class="btnitem">
-						<text>确认收货</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 已完成 -->
-		<view v-if="isActive == 4">
-			<view class="card" v-for="item in orderList">
-				<view class="toptitle">
-					<view>订单号:62aae0eb9c6fd622</view>
-					<view>未核销</view>
-				</view>
-				<view class="shopCard">
-					<image src="http://t9.9026.com/imgs/Kudosbg.png"></image>
-					<view style="margin-left: 24rpx;">
-						<text class="name">端午佳节五香肉粽子,仅限前</text>
-						<text class="tag">礼盒装 2000积分</text>
-					</view>
-				</view>
-				<view class="points">
-					<text class="totalName" style="margin-right: 50rpx;">共一项</text>
-					<text class="totalName">共计:</text>
-					<text class="totalContent">2000积分</text>
-				</view>
-				<view class="btn">
-
-				</view>
-			</view>
-		</view>
-		
 		<!-- 已经到底啦 -->
 		<view class="home-bottom">
 			<uni-load-more :status="status" color="#CCCCCC" :content-text="contentText"/>
@@ -227,11 +116,10 @@
 			// 获取订单列表
 			getMyOrder(type){
 				this.$api.orders.getOrderList({
-					page:1,
+					page:0,
 					status:type||'',
 					keyword:this.search
 				}).then(res=>{
-					console.log(res,type,"订单列表")
 					if(res.code==0){
 						this.orderList=res.data.data
 					}

+ 256 - 94
pages/my/prize/exchangePrize.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -3,7 +3,7 @@
 		<!-- 表单 -->
 		<view class="form">
 			<uni-forms :modelValue="formData">
-				<uni-forms-item name="type" v-if="istype">
+				<uni-forms-item name="type" v-if="isPhy == 1">
 					<view class="selectType" @click="openSelect">
 						<view class="uni-input" @click="openSelect">
 							<text v-if="formData.type==''||formData.type==null"
@@ -16,13 +16,14 @@
 					</view>
 				</uni-forms-item>
 				<uni-forms-item name="name" v-if="formData.type!=''||isVerification==true">
-					<uni-easyinput type="text" v-model="Data.receiver" placeholder="填写联系人" />
+					<uni-easyinput type="text" v-model="Data.receiver" placeholder="联系人" />
 				</uni-forms-item>
 				<uni-forms-item name="phone" v-if="formData.type!=''||isVerification==true">
-					<uni-easyinput type="number" v-model="Data.phone" placeholder="填写联系电话" maxlength=11 />
+					<uni-easyinput type="number" v-model="Data.phone" placeholderStyle='color:#333,font-size:32rpx'
+						placeholder="联系电话" maxlength=11 />
 				</uni-forms-item>
 				<uni-forms-item name="region" v-if="formData.type=='快递配送'">
-					
+
 					<pickerAddress @change="change">
 						<!-- <uni-easyinput type="text" v-model="formData.region" placeholder="所在地区" /> -->
 						<view class="selectType">
@@ -38,7 +39,8 @@
 					</pickerAddress>
 				</uni-forms-item>
 				<uni-forms-item name="region" v-if="formData.type=='快递配送'">
-					<textarea placeholder-style="#999" class="text-area" type="text" placeholder="详细地址"  v-model="Data.address" />
+					<textarea placeholder-style="#999" class="text-area" type="text" placeholder="详细地址"
+						v-model="Data.address" />
 				</uni-forms-item>
 				<uni-forms-item name="region" v-if="formData.type=='到店自提'||isVerification==true">
 					<view class="selectType" @click="openShop">
@@ -46,9 +48,10 @@
 							<text v-if="formData.shop==''||formData.shop==null"
 								style="color: #999999 ; font-size: 30rpx; ">请选择门店</text>
 							<text style="font-size: 30rpx;" v-if="formData.shop!=''">{{formData.shop}}</text>
+							<text class="distance" v-if="formData.shop!=''">{{formData.distanceToMe}}km</text>
 						</view>
 						<image src="/static/icon/right.png"
-							style="width: 14rpx;height: 24rpx;position: absolute;top:31rpx;right: 30rpx;">
+							style="width: 14rpx;height: 24rpx;position: absolute;top:22rpx;right: 30rpx;">
 						</image>
 					</view>
 				</uni-forms-item>
@@ -79,8 +82,8 @@
 				<text>确认兑换</text>
 			</view>
 		</view>
-		
-		
+
+
 		<!-- 配送方式-->
 		<uni-popup ref="Recipient" type="bottom" mask-background-color=" rgba(0,0,0,0.7);">
 			<view class="pop">
@@ -96,7 +99,7 @@
 				</view>
 				<view class="chooselag">
 					<view @click="companyed(item.name,index)" class="language" v-for="(item,index) in typeSelect "
-					:key="index"	:sgActive='activeIndex==index'>
+						:key="index" :sgActive='activeIndex==index'>
 						<text>{{item.name}}</text>
 					</view>
 				</view>
@@ -116,8 +119,8 @@
 							style="font-size: 32rpx; color: #FF6200;line-height: 34rpx">确定</text></view>
 				</view>
 				<view class="chooselag">
-					<view @click="companyedShop(item.name,index)" class="language" v-for="(item,index) in regionSelect"
-				:key="index"		:sgActive='activeIndex==index'>
+					<view @click="companyedShop(item.name,item.id,item.distanceToMe)" class="language"
+						v-for="(item,index) in hotelList" :key="index" :sgActive='activeIndex2==index'>
 						<text>{{item.name}}</text>
 					</view>
 				</view>
@@ -135,8 +138,15 @@
 		},
 		data() {
 			return {
-				coverImg:'',
-				prizeDetail:'',
+				//经纬度
+				latitude: '',
+				longitude: '',
+				//实物奖品和线下奖品区分
+				isPhy: '',
+				activeIndex: '',
+				activeIndex2: '',
+				coverImg: '',
+				prizeDetail: '',
 				//产品
 				id: '',
 				// 是否核销
@@ -145,6 +155,8 @@
 				formData: {
 					type: '',
 					region: '',
+					shop: '',
+					distanceToMe: ''
 				},
 				// 配送方式
 				typeSelect: [{
@@ -152,39 +164,24 @@
 				}, {
 					name: '到店自提',
 				}],
-				// 是否显示配送方式
-				istype: true,
 				// 选择门店
-				regionSelect: [{
-					name: '第一门店',
-				}, {
-					name: '第二门店',
-				}, {
-					name: '第三门店',
-				}, {
-					name: '第四门店',
-				}, {
-					name: '第五门店',
-				}, {
-					name: '第六门店',
-				}, {
-					name: '第七门店',
-				}],
+				hotelList: [],
 				// 表单数据
-				Data:{
-					order_id:'',//订单id
+				Data: {
+
+					order_id: '', //订单id
 					// 快递类型(1.快递发货 2.到店自提也是线下核销)
-					express_type:'',
+					express_type: '',
 					// 收货人
-					receiver:"",
+					receiver: "",
 					// 联系电话
-					phone:'',
+					phone: '',
 					// 地址ID,最小行政单位地区ID,express_type=1时必传
-					area_id:2000,
+					area_id: '',
 					// 详细地址,express_type=1时必传
-					address:'',
-					// 门店ID,express_type=2时必传
-					hotel_id:'',
+					address: '',
+					//门店ID,express_type=2时必传
+					hotel_id: 0,
 				},
 			}
 		},
@@ -192,33 +189,178 @@
 		onLoad(o) {
 			if (o.id) {
 				this.id = o.id
+				this.isPhy = o.isPhy
 				console.log(this.id);
-				//实物奖品
-				this.getPrizeList(0)
+				if (this.isPhy == 1) {
+					//实物奖品
+					this.getPrizeList(0)
+				} else {
+					//虚拟奖品
+					this.getPrizeList(1)
+				}
 			}
 		},
 
 		methods: {
-			
+			space(lat1, lng1, lat2, lng2) {
+				var radLat1 = lat1 * Math.PI / 180.0;
+				var radLat2 = lat2 * Math.PI / 180.0;
+				var a = radLat1 - radLat2;
+				var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
+				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+					Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
+			 s = s * 6378.137;
+				s = Math.round(s * 10000) / 10000;
+				return s // 单位千米
+			},
+			//门店列表
+			getHotel() {
+				this.$api.hotel.getHotelList({
+					page: 1,
+					type: 2,
+					latitude: this.latitude,
+					longitude: this.longitude
+				}).then(res => {
+					this.hotelList = res.data.data
+					this.hotelList.map(item => {
+						item.distanceToMe = this.space(this.latitude, this.longitude, item.latitude, item
+							.longitude).toFixed(1);
+						return item;
+					})
+					console.log(this.hotelList, '-------->this.hotelList');
+				})
+			},
+			//获取定位
+			goLocation() {
+				let _this = this
+				uni.getLocation({
+					type: "gcj02", //返回可以用于wx.openLocation的经纬度
+					success: function(res) {
+						_this.latitude = res.latitude
+						_this.longitude = res.longitude
+					},
+					fail: function(res) {
+						console.log(res)
+					}
+				})
+			},
+
 			//订单兑换
-			goExDetail(){
-				if(this.formData.type =='' ){
+			goExDetail() {
+				if (this.formData.type == '' && this.isPhy == 1) {
 					uni.showToast({
-						icon:'none',
-						title:'请选择配送方式'
+						icon: 'none',
+						title: '请选择配送方式'
 					})
 					return
 				}
-				this.$api.product.orderExchange({
-					...this.Data
-				}).then(res=>{
-					console.log(res.data,'------>res.data');
-				})
+				if (this.Data.receiver == '') {
+					uni.showToast({
+						icon: 'none',
+						title: '请填写联系人'
+					})
+					return
+				}
+				if (this.Data.phone == '') {
+					uni.showToast({
+						icon: 'none',
+						title: '请填写联系电话'
+					})
+					return
+				}
+				if (this.formData.region == '' && this.Data.express_type == 1) {
+					uni.showToast({
+						icon: 'none',
+						title: '请填写所在地区'
+					})
+					return
+				}
+				if (this.Data.address == '' && this.Data.express_type == 1) {
+					uni.showToast({
+						icon: 'none',
+						title: '请填写详细地址'
+					})
+					return
+				}
+				if (this.Data.hotel_id == '' && this.Data.express_type == 2) {
+					uni.showToast({
+						icon: 'none',
+						title: '请选择门店'
+					})
+					return
+				}
+				if(this.isPhy == 1){
+					if(this.Data.express_type == 1){
+						this.$api.product.orderExchange({
+							...this.Data
+						}).then(res => {
+							if (res.code == 0) {
+								uni.navigateTo({
+									url: '/pages/my/prize/exchangeDetail'
+								})
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg
+								})
+							}
+						})
+					}else{
+						let obj ={}
+						obj.express_type = this.Data.express_type
+						obj.order_id = this.Data.order_id
+						obj.receiver = this.Data.receiver
+						obj.phone = this.Data.phone
+						obj.hotel_id = this.Data.hotel_id
+						this.$api.product.orderExchange({
+							...obj
+						}).then(res => {
+							if (res.code == 0) {
+								uni.navigateTo({
+									url: '/pages/my/prize/exchangeDetail'
+								})
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg
+								})
+							}
+						})
+					}
+				}else{
+					let obj ={}
+					obj.express_type = this.Data.express_type
+					obj.order_id = this.Data.order_id
+					obj.receiver = this.Data.receiver
+					obj.phone = this.Data.phone
+					obj.hotel_id = this.Data.hotel_id
+					this.$api.product.orderExchange({
+						...obj
+					}).then(res => {
+						if (res.code == 0) {
+							uni.navigateTo({
+								url: '/pages/my/prize/exchangeDetail'
+							})
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg
+							})
+						}
+					})
+				}
 			},
-			
-			
-			change(ret){
-				this.formData.region = ret.data.join('-')
+
+			//打开门店弹框
+			openShop() {
+				this.$refs.shopSelected.open('bottom')
+			},
+			companyedShop(i, id, distance) {
+				this.typestatus2 = i
+				// this.activeIndex = id
+				this.distanceToMe1 = distance
+				console.log(i, this.activeIndex)
+				this.Data.hotel_id = id
 			},
 			//确定按钮
 			sureShopBtn() {
@@ -229,10 +371,19 @@
 					})
 				} else {
 					this.formData.shop = this.typestatus2
+					this.formData.distanceToMe = this.distanceToMe1
 					this.$refs.shopSelected.close()
 				}
 			},
 			//取消按钮
+			cancelShopBtn() {
+				this.$refs.shopSelected.close()
+			},
+			change(ret) {
+				this.formData.region = ret.data.join('-')
+				this.Data.area_id = ret.code[2]
+			},
+			//取消按钮
 			cancelBtn() {
 				this.$refs.Recipient.close()
 			},
@@ -241,10 +392,14 @@
 				this.typestatus1 = i
 				this.activeIndex = index
 				console.log(i, this.activeIndex)
-				if(index==0){
-					this.Data.express_type=1
-				}else if(index==1){
-					this.Data.express_type=2
+				if (index == 0) {
+					this.Data.express_type = 1
+				} else if (index == 1) {
+					this.Data.express_type = 2
+					this.goLocation()
+					setTimeout(() => {
+						this.getHotel()
+					}, 1000)
 				}
 			},
 			//确定按钮
@@ -263,44 +418,28 @@
 			openSelect() {
 				this.$refs.Recipient.open('bottom')
 			},
-			
+
 			// 获取奖品列表
 			getPrizeList(type) {
 				this.$api.lottery.getDrawRecord({
 					is_virtual: type,
 					page: 0
 				}).then(res => {
-					//实物奖品
-					if (type == 0) {
-						this.prizeDetail = res.data.data.filter(item=>{
-							return item.id == this.id
-						})
-						this.coverImg = this.prizeDetail[0].img_urls
-						console.log(this.coverImg,'------->this.coverImg');
-					} else {
-						this.VirtualPrizes = res.data.data
+					if (this.isPhy == 2) {
+						this.isVerification = true
+						this.Data.express_type = 2
+						this.goLocation()
+						setTimeout(() => {
+							this.getHotel()
+						}, 1000)
 					}
+					this.prizeDetail = res.data.data.filter(item => {
+						return item.id == this.id
+					})
+					this.coverImg = this.prizeDetail[0].img_urls
+					this.Data.order_id = this.prizeDetail[0].order_id
 				})
 			},
-
-			// 选择快递方式
-			bindTypeChange: function(e) {
-				if (e.detail.value == 0) {
-					this.formData.type = '快递配送'
-				} else {
-					this.formData.type = '到店自提'
-				}
-			},
-			// // 跳转兑换详情
-			// goExDetail() {
-			// 	uni.navigateTo({
-			// 		url: '/pages/my/prize/exchangeDetail'
-			// 	})
-			// },
-			// 选择门店
-			bindregionChange: function(e) {
-				this.formData.region = this.regionSelect[e.detail.value]
-			},
 		}
 	}
 </script>
@@ -320,6 +459,12 @@
 		background: $bgColor;
 	}
 
+	.distance {
+		position: absolute;
+		right: 60rpx;
+		top: 15rpx;
+	}
+
 	::v-deep .uni-forms-item {
 		margin-bottom: 24rpx;
 	}
@@ -441,13 +586,14 @@
 			}
 		}
 	}
+
 	.pop {
 		width: 100%;
 		height: 616rpx;
 		background: #FFFFFF;
 		border-radius: 16rpx 16rpx 0 0;
 		overflow: scroll;
-	
+
 		.popuptitle {
 			position: fixed;
 			top: 0;
@@ -459,7 +605,7 @@
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
-	
+
 			image {
 				display: inline-block;
 				width: 33rpx;
@@ -467,9 +613,9 @@
 				border-radius: 1rpx;
 			}
 		}
-	
+
 		.chooselag {
-	
+
 			flex-direction: column;
 			justify-content: center;
 			align-items: center;
@@ -477,7 +623,7 @@
 			padding: 0 30rpx;
 			overflow-y: scroll;
 			margin-top: 122rpx;
-	
+
 			.language {
 				width: 100%;
 				font-size: 32rpx;
@@ -489,7 +635,7 @@
 				justify-content: center;
 				padding-top: 40rpx;
 				padding-bottom: 40rpx;
-	
+
 				&[sgActive] {
 					color: #405E49 !important;
 					font-weight: bold !important;
@@ -497,6 +643,7 @@
 			}
 		}
 	}
+
 	.text-area {
 		width: 100%;
 		height: 130rpx;
@@ -507,4 +654,19 @@
 		color: #000;
 		line-height: 30rpx;
 	}
+
+	::v-deep .uni-icons {
+		color: #c0c4cc !important;
+		font-size: 24px !important;
+	}
+
+	::v-deep .uni-easyinput__content-input {
+		color: #333333;
+		font-size: 30rpx;
+	}
+
+	::v-deep .uni-easyinput__placeholder-class {
+		color: #999 !important;
+		font-size: 30rpx !important;
+	}
 </style>

+ 8 - 5
pages/my/prize/prize.vue

xqd xqd xqd
@@ -34,12 +34,15 @@
 				<view class="ListItem" v-for="(item,index) in VirtualPrizes" :key="index">
 					<view class="title"><text>{{item.name}}</text></view>
 					<view class='data'><text>{{item.created_at}}</text></view>
-					<view class="alreadyBtn" v-if="false">
+					<view class="alreadyBtn" v-if="item.status == 2">
 						<text>已兑换</text>
 					</view>
-					<view class="instantBtn" @click="goExchangeVir(item.id)">
+					<view class="instantBtn" v-if="item.status == 1" @click="goExchangePhy(item.id)">
 						<text>立即兑换</text>
 					</view>
+					<view class="instantBtn" v-if="item.status == 3" >
+						<text>已过期</text>
+					</view>
 				</view>
 			</view>
 			
@@ -66,7 +69,7 @@
 		data() {
 			return {
 				// 分段器标题
-				items: ['实物奖品', '虚拟奖品', '中奖记录'],
+				items: ['实物奖品', '线下奖品', '中奖记录'],
 				isActive: 0,
 				// 列表高度
 				ListHeight: 800,
@@ -126,13 +129,13 @@
 			// 实物立即兑换
 			goExchangePhy(id) {
 				uni.navigateTo({
-					url: '/pages/my/prize/exchangePrize?id='+id
+					url: `/pages/my/prize/exchangePrize?id=${id}&isPhy=1`
 				})
 			},
 			// 虚拟立即兑换
 			goExchangeVir(id) {
 				uni.navigateTo({
-					url: '/pages/my/prize/exchangePrize?id='+id
+					url: `/pages/my/prize/exchangePrize?id=${id}&isPhy=2`
 				})
 			},
 		},