Bläddra i källkod

已领取会员不重复添加

1410417013 7 månader sedan
förälder
incheckning
e0c941ab9f
3 ändrade filer med 30 tillägg och 24 borttagningar
  1. 9 5
      my/vip/index.vue
  2. 1 1
      pages/index/search/index.vue
  3. 20 18
      pages/index/shop/index.vue

+ 9 - 5
my/vip/index.vue

@@ -50,7 +50,7 @@
 				</view>
 			</view>
 			<view style="width: 100%;height: 38rpx;"></view>
-			<view class="nuanxin" @click="natNuan()">暖心认证</view>
+			<view class="nuanxin" @click="natNuan()">领取会员</view>
 			<view style="margin-top: 38rpx;">
 				<image style="width: 100%;height: 179px;" @click="clickImg" src="https://mxys.chuanghai-tech.com/wmfile/20251124/3247849b2d2849229013d9c41d0b5d93.png"></image>
 			</view>
@@ -97,7 +97,7 @@
 				<view style="text-align: center;font-size: 18px;color: #001713;">推广码</view>
 				<view class="cu-form-group">
 					<view class="title">推广码</view>
-					<input placeholder="请输入推广码" style="border: 1rpx solid;padding-left: 10px;" name="input" v-model="tuiguangma" maxlength="11"></input>
+					<input placeholder="请输入推广码" style="border: 1rpx solid;padding-left: 10px;" name="input" v-model="tuiguangma"></input>
 				</view>
 				<view style="display: flex;margin-top: 20px;">
 					<view class="nuan_butt" style="margin-left: 70px;" @click="tuiguang()">确定</view>
@@ -108,10 +108,10 @@
 		<!-- 暖心认证弹框 -->
 		<u-popup v-model="popupShow" border-radius="20" mode="center">
 			<view class="nuan_kuang">
-				<view style="text-align: center;font-size: 18px;color: #001713;">暖心认证</view>
+				<view style="text-align: center;font-size: 18px;color: #001713;">领取会员</view>
 				<view class="cu-form-group">
 					<view class="title">学号</view>
-					<input placeholder="请输入学号" name="input" v-model="xuehao" maxlength="11"></input>
+					<input placeholder="请输入学号" name="input" v-model="xuehao"></input>
 				</view>
 				<view class="cu-form-group">
 					<view class="title">姓名</view>
@@ -261,7 +261,11 @@
 			},
 			//暖心认证
 			natNuan(){
-				this.popupShow=true
+				if(this.isVip==true){
+					this.$queue.showToast("已是会员,请勿重复操作");
+				}else{
+					this.popupShow=true
+				}
 			},
 			//提交认证
 			nuanQue() {

+ 1 - 1
pages/index/search/index.vue

@@ -484,7 +484,7 @@ export default {
 			let items = encodeURIComponent(JSON.stringify(shuzu))
 			// if (this.userId) {
 			uni.navigateTo({
-				url: '/pages/index/shop/index?shopId=' + url + '&huoListss=' + items + '&shopTypeId=' + e.shopTypeId
+				url: '/pages/index/shop/index?shopId=' + url + '&huoListss=' + items + '&shopTypeId=' + e.shopTypeId+'&lat='+this.lat+'&lng='+this.lng
 			})
 			// } else {
 			// 	uni.navigateTo({

+ 20 - 18
pages/index/shop/index.vue

@@ -735,7 +735,24 @@ export default {
 		}
 	},
 	onLoad(option) {
-		console.log(option) 
+		console.log(option, 'option',option.shopId)
+		this.shopId = option.shopId
+		if(option.lat==''||option.lat==undefined){
+			uni.getLocation({
+				type: 'gcj02', //返回可以用于uni.openLocation的经纬度
+				success: (res) => { 
+					console.log(res, '经纬度')
+					this.lat = res.latitude
+					this.lng = res.longitude
+					this.getData()
+				}
+			})
+		}else{
+			this.lat = option.lat
+			this.lng = option.lng
+			this.getData()
+		}
+		
 		this.shopTypeId = option.shopTypeId.split(',')
 		this.showShopTypeId = this.shopTypeId.includes('10')
 
@@ -753,26 +770,11 @@ export default {
 				title: '店铺详情'
 			})
 		}
-
-		this.shopId = option.shopId
-		this.lat = option.lat
-		this.lng = option.lng
-		this.getData()
-
+		
 		uni.showLoading({
 			title: '加载中',
 			mask: true // 是否显示透明蒙层,防止触摸穿透
 		})
-
-		uni.getLocation({
-			type: 'gcj02', //返回可以用于uni.openLocation的经纬度
-			success: (res) => { 
-				// console.log(res, '经纬度')
-				// this.lat = res.latitude
-				// this.lng = res.longitude
-				// this.getData()
-			}
-		})
 		this.orderId = uni.getStorageSync('orderId') ? uni.getStorageSync('orderId') : ''
 	},
 	onHide() {
@@ -966,7 +968,7 @@ export default {
 			}
 
 			this.$Request.get(urlreq, data).then((res) => {
-				console.log(res, '999')
+				console.log(res, '999',data)
 				if (res.code == 0 && res.data) {
 					this.dataList = res.data.list
 					this.shopDet = res.data.goodsShop