Explorar o código

投票页中奖功能修正,顶部重复title问题等

yfso %!s(int64=2) %!d(string=hai) anos
pai
achega
f342539956

+ 3 - 2
components/hch-position/hch-position.vue

xqd
@@ -120,9 +120,10 @@
 			//生成图片
 			generateImg(imgUrl){
 				if(this.painter.wait != 0) return new Promise();
-				this.painter.show = false;
+				// this.painter.show = false;
+				// this.painter.base.views[1].src = "https://zhengda.oss-cn-chengdu.aliyuncs.com/golf/images/15.png";
 				this.painter.base.views[1].src = imgUrl;
-				this.painter.show = true;
+				// this.painter.show = true;
 				this.painter.wait = 1;
 				
 				return new Promise(resolve=>{

+ 1 - 1
manifest.json

xqd
@@ -1,6 +1,6 @@
 {
     "name" : "hotel_uni",
-    "appid" : "__UNI__89DEB06",
+    "appid" : "__UNI__9140D70",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",

+ 6 - 6
pages.json

xqd xqd xqd xqd xqd xqd
@@ -5,7 +5,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "首页",
+				// "navigationBarTitleText": "首页",
 				"enablePullDownRefresh": true,
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
@@ -21,7 +21,7 @@
 		{
 			"path": "pages/index/active-detail/index",
 			"style": {
-				"navigationBarTitleText": "IHG最受欢迎酒店",
+				// "navigationBarTitleText": "IHG最受欢迎酒店",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
@@ -70,7 +70,7 @@
 		{
 			"path": "pages/map/map",
 			"style": {
-				"navigationBarTitleText": "IHG地图",
+				// "navigationBarTitleText": "IHG地图",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
@@ -79,7 +79,7 @@
 		{
 			"path": "pages/map/hotel-book/index",
 			"style": {
-				"navigationBarTitleText": "IHG | 洲际酒店集团中国西区",
+				// "navigationBarTitleText": "IHG | 洲际酒店集团中国西区",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
@@ -88,7 +88,7 @@
 		{
 			"path": "pages/msg/msg",
 			"style": {
-				"navigationBarTitleText": "消息",
+				// "navigationBarTitleText": "消息",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
@@ -98,7 +98,7 @@
 
 			"path": "pages/my/my",
 			"style": {
-				"navigationBarTitleText": "我的",
+				// "navigationBarTitleText": "我的",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}

+ 8 - 2
pages/index/active-detail/index.vue

xqd
@@ -287,8 +287,14 @@
 		},
 		methods: {
 			//返回上一级
-			back() {
-				uni.navigateBack()
+			back() {  
+				uni.navigateBack({ 
+					fail:()=>{
+						uni.redirectTo({
+							url: "/pages/index/index"
+						})
+					}
+				})
 			},
 
 			showtime(time) {

+ 8 - 8
pages/index/index.vue

xqd
@@ -207,24 +207,24 @@
 				advertisImg: '',
 				//广告图展示视频
 				goodsList: [{
-						img: 'http://t9.9026.com/imgs/goodsimg01.png',
-						text: '中秋佳节五仁月饼,惊喜特供,限时抢购',
+						img: 'https://t9.9026.com/imgs/20221212/11.png',
+						text: '2023新春福兔系列礼盒 倾心甄选 待你拥有 ',
 						title: '环球洲际',
 						short: '',
 					},
 					{
-						img: 'http://t9.9026.com/imgs/goodsimg02.png',
-						text: '中秋佳节五仁月饼,惊喜特供,限时抢购',
+						img: 'https://t9.9026.com/imgs/20221212/22.png',
+						text: '2023新春福兔系列礼盒 倾心甄选 待你拥有 ',
 						title: '环球洲际'
 					},
 					{
-						img: 'http://t9.9026.com/imgs/goodsimg02.png',
-						text: '中秋佳节五仁月饼,惊喜特供,限时抢购',
+						img: 'https://t9.9026.com/imgs/20221212/33.png',
+						text: '2023新春福兔系列礼盒 倾心甄选 待你拥有 ',
 						title: '环球洲际'
 					},
 					{
-						img: 'http://t9.9026.com/imgs/goodsimg01.png',
-						text: '中秋佳节五仁月饼,惊喜特供,限时抢购',
+						img: 'https://t9.9026.com/imgs/20221212/44.png',
+						text: '2023新春福兔系列礼盒 倾心甄选 待你拥有 ',
 						title: '环球洲际',
 					},
 

+ 2 - 5
pages/index/vote-detail/index.vue

xqd xqd xqd
@@ -380,7 +380,7 @@
 					})
 				} else if (this.jump_type == 4) {
 					let obj = this.jump_config
-					uni.switchTab({
+					uni.redirectTo({
 						url: `${obj}`,
 						success: function(e) { //跳转成功后刷新页面
 							var page = getCurrentPages().pop();
@@ -495,9 +495,6 @@
 						
 						/**
 						 * 中奖用例
-						 * 数据由接口文档提供
-						 *
-						 * 
 						res = {
 							data: {
 								"is_prize": 1,
@@ -524,7 +521,7 @@
 					   
 						this.is_prize = res.data.is_prize
 						if (this.is_prize == 1) {
-							this.prizeProduct = res.data.product.name
+							this.prizeProduct = res.data?.product?.name
 						}
 						this.openVote()
 						this.getDetail(this.activity_project_id)

+ 65 - 40
pages/map/map.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -49,9 +49,9 @@
 			<!-- 选择地区 -->
 			<view class="search-detail" v-if="!isSelectArea">
 				<view class="search-detail-area">
-					<view class="areaTitle" v-for="(item,index) in areaList" :key="index" @click="checked(index)">
-						<view :class="{'active-area':isActive === index}">
-							{{item.title}}
+					<view class="areaTitle" v-for="(item,index) in search.content.area" :key="item.id" @click="checked(item.id,'area')">
+						<view :class="{'active-area':search.area === item.id}">
+							{{item.name}}
 						</view>
 					</view>
 				</view>
@@ -67,9 +67,9 @@
 			<!-- 选择品牌-->
 			<view class="search-detail" v-if="!isSelectBrand">
 				<view class="search-detail-area">
-					<view class="areaTitle" v-for="(item,index) in brandList" :key="index" @click="checked(index)">
-						<view :class="{'active-area':isActive === index}">
-							{{item.title}}
+					<view class="areaTitle" v-for="(item,index) in search.content.brand" :key="item.id" @click="checked(item.id,'brand')">
+						<view :class="{'active-area':search.brand === item.id}">
+							{{item.name}}
 						</view>
 					</view>
 				</view>
@@ -93,8 +93,13 @@
 							mode=""></image>
 					</view>
 					<view class="partner-main" v-if="isPartner">
-						<uni-data-checkbox multiple v-model="value" :localdata="partner" @change="change">
-						</uni-data-checkbox>
+						<uni-data-checkbox multiple 
+							v-model="value" 
+							:localdata="search.content.coop" 
+							emptyText="无"
+							:map="{text: 'name',value: 'name'}"
+							@change="change"
+						/>
 					</view>
 
 					<view class="partner-top" style="border-top: none;" @click="selectJoin">
@@ -105,8 +110,13 @@
 							mode=""></image>
 					</view>
 					<view class="partner-main" v-if="isJoin">
-						<uni-data-checkbox multiple v-model="value" :localdata="partner" @change="change">
-						</uni-data-checkbox>
+						<uni-data-checkbox multiple
+							v-model="value" 
+							:localdata="search.content.league" 
+							emptyText="无"
+							:map="{text: 'name',value: 'name'}"
+							@change="change"
+						/>
 					</view>
 
 					<view class="search-detail-btn">
@@ -233,6 +243,7 @@
 			return {
 				scrolls:{scrollX: 0},
 				hotelList:[],
+				hotelListBase:[],
 				//门店在地图上的标记 以下字段必填
 				markers: [],
 				//经纬度
@@ -290,27 +301,20 @@
 					title: 'JavaScript'
 				}],
 				//地区
-				areaList: [{
-					title: '重庆'
-				}, {
-					title: '成都'
-				}, {
-					title: '绵阳'
-				}, {
-					title: '广汉'
-				}, {
-					title: '内江'
-				}, {
-					title: '宜宾'
-				}, {
-					title: '大理'
-				}, {
-					title: '自贡'
-				}, {
-					title: '贵州'
-				}, {
-					title: '泸州'
-				}],
+				search:{
+					area: "",
+					brand: "",
+					coop: [],
+					league: [],
+					isActiveIds:[3,26],
+					content: {
+						area: [],
+						brand: [],
+						coop: [],
+						league: [],
+					}
+				},
+				areaList: [],
 				//激活指定table菜单
 				isActive: 0,
 				//展开搜索
@@ -330,13 +334,19 @@
 		onLoad() {
 			//获取经纬度
 			this.updated()
-			
-			this.$api.hotel.getHotelCategory().then(res=>{
-				console.log(res)
-			})
+			this.getHotelCategory()
 		},
 
 		methods: {
+			//获取筛选数据
+			getHotelCategory(){
+				this.$api.hotel.getHotelCategory().then(res=>{
+					if(res.code !== 0) return;
+					this.search.content.area = res.data[0]?.sub;
+					this.search.content.brand = res.data[1]?.sub;
+					this.search.content.coop = res.data[2]?.sub;
+				})
+			},
 			goLocation(){
 				let _this = this
 				uni.getLocation({
@@ -345,8 +355,8 @@
 						_this.latitude = res.latitude
 						_this.longitude = res.longitude
 						_this.$refs.map.goLocation(res.latitude,res.longitude)
-						//获取酒店列表
-						_this.getList()
+						// //获取酒店列表
+						// _this.getList()
 					},
 					fail: function(res) {
 						console.log(res)
@@ -411,6 +421,13 @@
 				this.$api.hotel.getHotelList({
 					page: 1
 				}).then(res => {
+					// this.hotelListBase = res.data.data
+					// this.hotelList = []
+					// this.hotelListBase.forEach(item=>{
+					// 	if(this.search.isActiveIds.find(item.category_id)){
+					// 		this.hotelList.push(item)
+					// 	}
+					// })
 					this.hotelList = res.data.data
 					this.markers = this.hotelList.map(item=>{
 						const distance =this.calcDistanceFromHotel({x0:this.latitude, y0:this.longitude}, {x1:item.latitude,y1:item.longitude}).toFixed(1);
@@ -476,21 +493,29 @@
 				console.log('e:', e);
 			},
 			//菜单index切换
-			checked(index) {
-				this.isActive = index
+			checked(id,categoreName) {
+				const tempSet = new Set(this.search.isActiveIds);
+				tempSet.add(id);
+				this.search[categoreName] = id;
+				this.search.isActiveIds = Object.assign(Array.from(tempSet));
 			},
 			//展开地区选择
 			openArea() {
-				console.log(111);
 				this.isSelectArea = !this.isSelectArea
+				this.isSelectBrand = true
+				this.isSelectSift = true
 			},
 			//展开品牌选择
 			openBrand() {
 				this.isSelectBrand = !this.isSelectBrand
+				this.isSelectArea = true
+				this.isSelectSift = true
 			},
 			//展开筛选选择
 			openSift() {
 				this.isSelectSift = !this.isSelectSift
+				this.isSelectBrand = true
+				this.isSelectArea = true
 			},
 			//下面酒店位移
 			moveToMarkId(markId){

+ 2 - 2
setting.js

xqd
@@ -3,8 +3,8 @@
  */
 const IS_DEV = process.env.NODE_ENV === 'development'
 // const URL = 'https://zhangsiye.9026.com'
-const URL = 'https://t9.9026.com'
-// const URL = 'https://ihg.9026.com'
+// const URL = 'https://t9.9026.com'
+const URL = 'https://ihg.9026.com'
 
 module.exports = {
   // 版本