Browse Source

项目日志:12.29 合并

gubai 2 years ago
parent
commit
d29f6c06bd
4 changed files with 19 additions and 17 deletions
  1. 14 5
      pages/goods/goods-detail/index.vue
  2. 1 1
      pages/index/index.vue
  3. 2 9
      pages/my/integral/integralOrder.vue
  4. 2 2
      setting.js

+ 14 - 5
pages/goods/goods-detail/index.vue

xqd xqd xqd xqd xqd
@@ -29,7 +29,7 @@
 					<text>{{productDetail.price}}</text>
 				</view>
 				<view class="price-top" v-if="produceType == 2">
-					<text>{{productDetail.price}}</text>
+					<text>{{productDetail.integral}}</text>
 					<text>积分</text>
 				</view>
 				<text class="price-text">{{productDetail.name}}</text>
@@ -115,7 +115,7 @@
 							<text>{{productDetail.price}}</text>
 						</view>
 						<view class="pop-price-left-money" v-if="produceType == 2">
-							<text>{{productDetail.price}}</text>
+							<text>{{productDetail.integral}}</text>
 							<text>积分</text>
 						</view>
 					</view>
@@ -288,7 +288,15 @@
 			},
 			selectedHotelId: function() {
 				return this.$store.state.tab.selectedHotelId;
-			}
+			},
+			showProductAttr: function() {
+				if (this.flavorIsActive.length <= 0) return false;
+				let text = '';
+				for (const k in this.flavorIsActive) {
+					text += `${this.flavorIsActive[k]}-`
+				}
+				return text.substr(0, text.length - 1);
+			},
 		},
 		methods: {
 			//显示所选规格
@@ -484,8 +492,9 @@
 				for(let k in this.productDetail.product_attr){
 					if(this.productDetail.product_attr[k].attr == attr){
 						const price = this.productDetail.product_attr[k].price;
+						const integral = this.productDetail.product_attr[k].integral;
 						this.productDetail.price = price;
-						this.productDetail.integral = price;
+						this.productDetail.integral = integral;
 						break;
 					}
 				}
@@ -521,7 +530,7 @@
 				const selectedIds = resArr.join(':');
 				console.log(this.productDetail.integral);
 				uni.navigateTo({
-					url: `/pages/my/integral/integralOrder?product_id=${this.productDetail.id}&attr=${selectedIds}&integral=${this.productDetail.integral}&attrName=${this.showAttr}`
+					url: `/pages/my/integral/integralOrder?product_id=${this.productDetail.id}&attr=${selectedIds}&integral=${this.productDetail.integral}&attrName=${this.showProductAttr}`
 				})
 				this.Recipientclose()
 			},

+ 1 - 1
pages/index/index.vue

xqd
@@ -1,6 +1,6 @@
 <template>
 	<view class="home">
-		<MyNav title="洲际酒店集团中国西区" bgColor="" :backIcon="true"></MyNav>
+		<MyNav title="洲际酒店集团中国西区" bgColor="" :backIcon="false"></MyNav>
 		<!-- swiper -->
 		<view class="home-swiper">
 			<uni-swiper-dot :info="infoList" :current="current1" :mode="mode" :dots-styles="dotsStyles">

+ 2 - 9
pages/my/integral/integralOrder.vue

xqd xqd
@@ -70,7 +70,7 @@
 				</image>
 				<view style="margin-left: 24rpx;">
 					<text class="name">{{productDetail.name}}</text>
-					<text class="tag" v-if="attrArry[0]"> {{integral}}积分</text>
+					<text class="tag" >{{attrName}}   {{integral}}积分</text>
 				</view>
 			</view>
 			<view class="shopNumber">
@@ -192,14 +192,7 @@
 			this.Data.product_id = op.product_id
 			this.Data.attr = op.attr
 			this.integral = op.integral
-			this.attrName= op.attrName
-			// this.attrArry= this.attrName.split("-").map(item=>{
-			// 	return {
-			// 		attr_group_name: item
-			// 	}
-			// })
-			console.log(this.attrName,'--->this.attrName');
-			
+			this.attrName= op.attrName		
 			await this.getProductDetail(op.product_id)
 			await this.init()
 		},

+ 2 - 2
setting.js

xqd
@@ -3,8 +3,8 @@
  */
 const IS_DEV = process.env.NODE_ENV === 'development1'
 
-// 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 = {