Browse Source

商城添加SKU

zhuxiuping 2 years ago
parent
commit
7cf5c5c05b

+ 3 - 2
manifest.json

@@ -62,8 +62,9 @@
 			"scope.userLocation": {
 				"desc": "获取用户位置已展示距离民宿的距离"
 			}
-		},
-		"requiredPrivateInfos": ["getLocation"]
+		},
+		"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ,"chooseAddress" ]
+		// "requiredPrivateInfos": ["getLocation"]
 	},
 	"mp-alipay": {
 		"usingComponents": true

+ 1 - 1
packageShang/common/request.js

@@ -1,5 +1,5 @@
 // 全局请求封装
-const base_url = 'https://www.jinganrenjiams.com/cloud-mall'
+const base_url = 'https://www.jinganrenjiams.com/cloud-mall-tmp'
 // 需要修改token,和根据实际修改请求头
 export default (params) => {
     let url = params.url;

+ 251 - 86
packageShang/pages/goods/goods.vue

@@ -255,46 +255,67 @@
 					<img
 						class="header_img"
 						mode="aspectFill"
-						src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-7e00db99-ad65-4b9f-a74b-61bccb92b124/96f1dd40-2075-4f6f-988c-14c2753d9fb2.jpg"
+						:src="cartImg"
 					/>
 					<view class="header_info">
 						<view class="info_price">
-							<text>8600</text>
+							<text>{{cartPrice}}</text>
 						</view>
-						<view class="info_tags">
+						<!-- <view class="info_tags">
 							<view class="tag">包邮</view>
 							<view class="tag">8600积分</view>
-						</view>
+						</view> -->
 					</view>
+				</view>
+				
+				<!-- <view class="con dflex dflex-wrap-w">
+					<view
+						class="margin-right-sm margin-bottom-sm dflex bg-drak border-radius-lg padding-tb-16 padding-lr"
+						:class="{ active: item.selected }"
+						v-for="(item, index) in skuDatas"
+									:key="index"
+						@click="selectSKU(item)"
+					>
+						<text class="fs-xs">{{ item.name }}</text>
+					</view>
+				</view> -->
+
+				<!-- 颜色区域 -->
+				<view v-for="(item, index) in skuAttrDatas"
+										:key="index">
+					<view class="pop_title">{{item.attrName}}({{item.attrValues.length}})</view>
+					<view class="pop_tags">
+						<view :class="item2.type == true?'active_sku_color':'active_sku'" @click="selectSKU(index,index2)" v-for="(item2, index2) in item.attrValues"
+										:key="index2">{{item2.attrValue}}</view>
+					</view>
 				</view>
-
-				<!-- 颜色区域 -->
-				<view class="pop_title">颜色(3)</view>
-				<view class="pop_tags">
-					<view class="tag">白沙银</view>
-					<view class="tag">白沙银</view>
-					<view class="tag">白沙银</view>
-				</view>
+				
 
 				<!-- 容量区域 -->
-				<view class="pop_title">容量(3)</view>
+				<!-- <view class="pop_title">容量(3)</view>
 				<view class="pop_tags">
 					<view class="tag">256G+512G</view>
 					<view class="tag">256G</view>
 					<view class="tag">256G</view>
-				</view>
+				</view> -->
 
 				<!-- 购买数量区域 -->
 				<view class="pop_title">
 					购买数量
-					<text>库存10件</text>
+					<text>库存{{cartSale}}件</text>
 				</view>
 
 				<view class="pop_num">
 					<uni-number-box @change="changeValue" />
+				</view>
+				<view class="flex1 btn-container dflex-b border-radius-big" style="margin-top: 50px;">
+					<view class="tac padding-tb-sm flex1 bg-warn" v-if="goods.stockNum > goods.saleCnt && goods.state == 1" @click="tocartSKU(goods,)">加入购物车</view>
+					<view class="tac padding-tb-sm flex1 bg-base-gou" v-if="goods.stockNum > goods.saleCnt && goods.state == 1" @click="tobuySku(goods)">立即购买</view>
+					<view class="tac padding-tb-sm flex1 bg-disabled" v-if="goods.stockNum == goods.saleCnt && goods.state == 1">已售磐</view>
+					<view class="tac padding-tb-sm flex1 bg-disabled" v-if="goods.state == 0">已下架</view>
 				</view>
-			</view>
+			</view>`	
 		</uv-popup>
 	</view>
 </template>
@@ -334,7 +355,12 @@ export default {
 			swiperDatas: [],
 			// SKU
 			sku: {},
-			skuDatas: [],
+			skuDatas: [],
+			cartNum:'1',//商品加购数量
+			cartImg:'',//加购图片
+			cartPrice:'',//加购价格
+			cartSale:'',//加购库存
+			skuId:'',//选中sku
 			// 分享
 			shareShow: false,
 			// 海报
@@ -357,7 +383,8 @@ export default {
 			// 收藏
 			favorite: false, //是否收藏
 
-			scrollTop: 0
+			scrollTop: 0,
+			skuAttrDatas:[],//商品属性数组
 		}
 	},
 	watch: {
@@ -458,7 +485,55 @@ export default {
 						})
 					})
 
-					_self.tagDatas = __tagDatas
+					_self.tagDatas = __tagDatas
+					
+					//商品属性数组
+					_self.skuAttrDatas = _self.goods.skuGroups;
+					_self.skuAttrDatas.forEach((el,index)=>{
+						el.attrValues.forEach((item,ins)=>{
+							_self.skuAttrDatas[index].attrValues[0].type = true
+						})
+					})
+						console.log(_self.skuAttrDatas,'po')
+					// 商品SKU
+					_self.skuDatas = _self.goods.skus;
+					// for(var i=0;i<_self.skuDatas.length;i++){
+					// 	_self.skuDatas[i].spec=_self.skuDatas[i].saleAttrs[0].attrValue
+					// 	_self.skuDatas[i].spec2=_self.skuDatas[i].saleAttrs[1].attrValue
+					// }
+					console.log(_self.skuDatas,'sku')
+					_self.cartPrice=_self.skuDatas[0].price
+					_self.cartImg=_self.skuDatas[0].skuImg
+					_self.cartSale=_self.skuDatas[0].stockNum
+					_self.skuId=_self.skuDatas[0].skuId
+								// let __goods_skus = _self.goods.skus;
+								// if (__goods_skus.length > 0) {
+								// 	let __skuDatas = [];
+								// 	__goods_skus.forEach((sku, index) => {
+								// 		// 	{ id: 1, name: '45寸(大规格)', price: 788, market_price: 999, num: 0, selected: !0 },
+								// 		__skuDatas.push({
+								// 			id: sku.skuId,
+								// 			sku: sku.saleAttrs,
+								// 			name: sku.skuName,
+								// 			price: sku.price,
+								// 			market_price: sku.marketPrice || _self.goods.marketPrice,
+								// 			num: sku.stockNum,
+								// 			selected: index == 0,
+								// 			img:sku.skuImg,
+								// 			sale:sku.stockNum
+								// 		});
+								// 	});
+								// 	_self.skuDatas = __skuDatas;
+								// 	_self.cartImg=_self.skuDatas[0].img
+								// 	_self.cartPrice=_self.skuDatas[0].price
+								// 	_self.cartSale=_self.skuDatas[0].sale
+								// 	_self.skuId=_self.skuDatas[0].id
+								// }
+					
+					// 			// SKU
+					// 			if (this.skuDatas.length > 0) {
+					// 				this.sku = this.skuDatas[0];
+					// 			}
 				}
 			})
 
@@ -648,17 +723,80 @@ export default {
 			}
 		},
 
-		// 商品SKU
-		selectSKU(res) {
-			this.skuDatas.forEach((item) => {
-				if (res.sku == item.sku) {
-					this.$set(item, 'selected', true)
-				} else {
-					this.$set(item, 'selected', false)
-				}
-			})
+		// 选择商品SKU
+		selectSKU(i,is) {
+			this.skuAttrDatas[i].attrValues.forEach((item,ins)=>{
+				this.$set(this.skuAttrDatas[i].attrValues[ins],'type',false)
+			})
+			this.$set(this.skuAttrDatas[i].attrValues[is],'type',true)
+			let list = []
+			this.skuAttrDatas.forEach((item,ins)=>{
+				item.attrValues.forEach((el,index)=>{
+					if(el.type == true){
+						list.push({attrValue:el.attrValue})
+					}
+				})
+			})
+			// let list2=[]
+			// this.skuDatas.forEach((item,ins)=>{
+			// 	item.attrValues.forEach((el,index)=>{
+			// 		if(el.type == true){
+			// 			list2.push({attrValue:el.attrValue})
+			// 		}
+			// 	})
+			// })
+			// list2.forEach((el,index)=>{
+			// 	console.log(JSON.stringify(list),'p')
+			// 	console.log(JSON.stringify(el),'p2')
+			// 	console.log(JSON.stringify(list) == JSON.stringify(el))
+			// 	if(JSON.stringify(list) == JSON.stringify(el)){
+			// 		this.cartPrice=el.price
+			// 		this.cartImg=el.skuImg
+			// 		this.cartSale=el.stockNum
+			// 		this.skuId=el.skuId
+			// 	}
+			// })
+			
+			var list2=[]
+			this.skuDatas.forEach((item,index2)=>{
+				list2=[]
+				item.saleAttrs.forEach((el,index)=>{
+					list2.push({attrValue:el.attrValue})
+				})
+				console.log(JSON.stringify(list),'p')
+				console.log(JSON.stringify(list2),'p2')
+				console.log(JSON.stringify(list) == JSON.stringify(list2))
+				if(JSON.stringify(list) == JSON.stringify(list2)){
+					this.cartPrice=item.price
+					this.cartImg=item.skuImg
+					this.cartSale=item.stockNum
+					this.skuId=item.skuId
+				}
+			})
+			// this.skuDatas.forEach((el,index)=>{
+			// 	console.log(JSON.stringify(list),'p')
+			// 	console.log(JSON.stringify(el.saleAttrs),'p2')
+			// 	if(JSON.stringify(list) == JSON.stringify(el.saleAttrs)){
+			// 		this.cartPrice=el.price
+			// 		this.cartImg=el.skuImg
+			// 		this.cartSale=el.stockNum
+			// 		this.skuId=el.skuId
+			// 	}
+			// })
+			console.log(this.skuId,'0')
+			// this.cartImg=res.img
+			// this.cartPrice=res.price
+			// this.cartSale=res.sale
+			// this.skuId=res.id
+			// this.skuDatas.forEach((item) => {
+			// 	if (res.sku == item.sku) {
+			// 		this.$set(item, 'selected', true)
+			// 	} else {
+			// 		this.$set(item, 'selected', false)
+			// 	}
+			// })
 
-			this.sku = res
+			// this.sku = res
 		},
 
 		// 评论
@@ -693,65 +831,64 @@ export default {
 			})
 		},
 		// 加入购物车
-		tocart(params) {
-			// var _self=this
-			// var data='?num=1&'+'goodId='+params.id
-			// cartadd(data).then((res) => {
-			// 	if(res.success){
-			// 		_self.$api.msg('加购成功');
-			// 		return;
-			// 	}
-			// 	_self.$api.msg(res.msg);
-			// })
-			// this.$func.usemall
-			// 	.call('goods/addcart', {
-			// 		goods_id: params._id,
-			// 		goods_num: 1,
-			// 		goods_sku: this.sku.id
-			// 	})
-			// 	.then(res => {
-			// 		if (res.code === 200) {
-			// 			this.$api.msg(res.datas.msg);
-			// 			return;
-			// 		}
-			// 		this.$api.msg(res.msg);
-			// 	});
-
-			this.$refs.addPopup.open('bottom')
+		tocart(params) {
+			var _self=this
+			console.log(params)
+			if(params.enableSku==1){
+				_self.$refs.addPopup.open('bottom')
+			}else{
+				var data='?num=1&'+'goodId='+params.id
+				cartadd(data).then((res) => {
+					if(res.success){
+						_self.$api.msg('加购成功');
+						return;
+					}
+					_self.$api.msg(res.msg);
+				})
+			}
+		},
+		//yousku加购
+		tocartSKU(params){
+			var _self=this
+			var data='?num='+_self.cartNum+'&'+'goodId='+params.id+'&skuId='+this.skuId
+			cartadd(data).then((res) => {
+				if(res.success){
+					_self.$api.msg('加购成功');
+					return;
+				}
+				_self.$api.msg(res.msg);
+			})
 		},
 		// 立即购买
 		tobuy(item) {
 			let _this = this
-			// if (!this.loginCheck()) return;
-
-			uni.navigateTo({
-				url: `/packageShang/pages/order/create?goods_id=${this.id}&sku_id=${this.sku.id || ''}&type=1`
-			})
+			// if (!this.loginCheck()) return;
+			if(item.enableSku==1){
+				_this.$refs.addPopup.open('bottom')
+			}else{
+				uni.navigateTo({
+					url: `/packageShang/pages/order/create?goods_id=${_this.id}&type=1&num=1`
+				})
+			}
+		},
+		//yousku购买
+		tobuySku(item){
+			uni.navigateTo({
+				url: `/packageShang/pages/order/create?goods_id=${this.id}&skuId=${this.skuId}&type=1&num=${this.cartNum}`
+			})
 		},
 		// 点击弹窗关闭图标回调
 		handleClosePop() {
 			this.$refs.addPopup.close()
 		},
 		changeValue(value) {
-			console.log('返回数值:', value)
+			console.log('返回数值:', value)
+			if(value>this.cartSale){
+				this.cartNum=this.cartSale
+			}else{
+				this.cartNum=value
+			}
 		}
-		// 检测是否已登录
-		// loginCheck() {
-		// 	if (!this.islogin) {
-		// 		let _this = this;
-		// 		uni.showModal({
-		// 			title: '授权登录',
-		// 			success: function(res) {
-		// 				if (res.confirm) {
-		// 					_this.$api.tologin();
-		// 				}
-		// 			}
-		// 		});
-		// 		return false;
-		// 	}
-
-		// 	return true;
-		// }
 	}
 }
 </script>
@@ -824,7 +961,7 @@ contact-button {
 }
 
 /* 03. 规格区 */
-.sku-area .active {
+.tag .active {
 	background: $base-color;
 	color: #fff !important;
 }
@@ -1030,15 +1167,43 @@ contact-button {
 	}
 
 	.pop_tags {
-		display: flex;
-
-		.tag {
-			padding: 20rpx 30rpx;
-			margin-right: 20rpx;
-			font-size: 30rpx;
-			border-radius: 40rpx;
-			background-color: #f6f6f6;
+		display: flex;
+		.active_sku{
+			
+			padding: 20rpx 30rpx;
+			margin-right: 20rpx;
+			font-size: 30rpx;
+			border-radius: 40rpx;
+			background-color: #f6f6f6;
+			
+			// border: 1rpx solid #999;
+			// padding: 3rpx 10rpx 3rpx 10rpx;
+			// font-size: 24rpx;
+			// margin-right: 10rpx;
+			// border-radius: 5rpx;
+		}
+		.active_sku_color{
+			padding: 20rpx 30rpx;
+			margin-right: 20rpx;
+			font-size: 30rpx;
+			border-radius: 40rpx;
+			background-color: #ffbc49;
+			
+			// border: 1rpx solid #990002;
+			// padding: 3rpx 10rpx 3rpx 10rpx;
+			// font-size: 24rpx;
+			// margin-right: 10rpx;
+			// border-radius: 5rpx;
+			// color: #990002;
 		}
+
+		// .tag {
+		// 	padding: 20rpx 30rpx;
+		// 	margin-right: 20rpx;
+		// 	font-size: 30rpx;
+		// 	border-radius: 40rpx;
+		// 	background-color: #f6f6f6;
+		// }
 	}
 
 	.pop_num {

+ 15 - 10
packageShang/pages/order/create.vue

@@ -37,7 +37,7 @@
 					<text class="title clamp-2">{{ item.goodsName || '' }} </text>
 					<view class="ft-dark fs-xs padding-top-xs">
 						<text v-if="cart_ids && cart_ids.length > 0" class="margin-right">× {{item.goodsCount}}</text>
-						<!-- {{ (item.goods_sku && item.goods_sku.spec) || '&nbsp;&nbsp;' }} -->
+						{{ (item.goodsAttr) || '&nbsp;&nbsp;' }}
 					</view>
 					<view class="pos-r dflex-b padding-top">
 						<view class="price flex1">{{ item.goodsActualPrice || '' }}</view>
@@ -124,7 +124,8 @@
 <script>
 	import {
 		confirmorder,
-		submitorder
+		submitorder,
+		addresslist
 	} from '../../utils/api_user.js'
 	import useNumberBox from '../../../packageShang/components/use-number-box/use-number-box.vue'
 	// 收获人地址
@@ -186,19 +187,20 @@
 
 			// 商品 ids
 			this.goods_id = options.goods_id || '';
+			this.goods_num=options.num
 			// 商品 sku
-			this.goods_sku_id = options.sku_id || '';
+			this.goods_sku_id = options.skuId || '';
 
 			// 购物车 ids
 			if (options.cart_ids) {
 			this.cart_ids = options.cart_ids.split(',');
-}
+			}
 			// 加载商品数据
 			this.loadData();
 
-			// uni.$on('__event_choice_address', data => {
-			// 	this.addrData = data;
-			// });
+			uni.$on('__event_choice_address', data => {
+				this.addrData = data;
+			});
 		},
 		onShow() {
 			// if (this.addrData && this.addrData.id) return;
@@ -218,12 +220,14 @@
 				if(_self.type==1){
 					var goodsId=_self.goods_id
 				}else{
-					var goodsId=''
+					var goodsId=''//_self.cart_ids.toString()
 				}
 				// 确认订单
 				var data={
 					"type": _self.type,
-					"goodId": goodsId
+					"goodId": goodsId,
+					"skuId":_self.goods_sku_id,
+					"num":_self.goods_num
 				}
 				confirmorder(data).then((res) => {
 					if(res.success){
@@ -326,7 +330,8 @@
 					"orderDetails": [
 						{
 							"goodsId": goodsId,
-							"goodsCount": goodNum
+							"goodsCount": goodNum,
+							"skuId":_this.goods_sku_id
 						}
 					]
 				};

+ 13 - 11
packageShang/pages/tabbar/cart.vue

@@ -37,7 +37,7 @@
 							<!-- 商品名称 -->
 							<view class="clamp-2 title" @click="togoods(item)">{{item.goodsName}}
 							</view>
-							<view class="ft-dark fs-xs padding-top-xs">{{ item.goods_sku.spec || '&nbsp;&nbsp;' }}</view>
+							<view class="ft-dark fs-xs padding-top-xs">{{ item.goodAttr || '&nbsp;&nbsp;' }}</view>
 							<view class="padding-tb-sm">
 								<text class="price">{{ item.goodsActualPrice }}</text>
 								<text class="m-price"
@@ -54,7 +54,7 @@
 
 						<!-- 删除 -->
 						<view class="del-btn iconfont iconlajitong-01 pos-a border-radius-c dflex-c ft-dark fs-xl"
-							@tap.stop="deleteCart(item.goodsId)"></view>
+							@tap.stop="deleteCart(item.key)"></view>
 					</view>
 				</block>
 			</view>
@@ -71,7 +71,7 @@
 				<view class="total-box flex1 tar padding-right-lg">
 					<text class="price">{{total || 0}}</text>
 				</view>
-				<button type="primary" class="payment no-border border-radius-lg fs" @click="createOrder">去结算</button>
+				<button type="primary" class="payment no-border border-radius-lg fs" @click="createOrder()">去结算</button>
 			</view>
 		</view>
 
@@ -222,7 +222,6 @@
 				_self.goodsHotDatas=[]
 				var data='?hot=1'
 				goodslistlimit(data).then((res) => {
-					console.log('轮播',res)
 					if (res.success) {
 						var total=res.data.totalCount
 						data='?hot=1&pageSize='+total
@@ -274,7 +273,8 @@
 					var header={
 						"Mall-Token": uni.getStorageSync('tokenId')
 					}
-					var params=_self.cartDatas[index].goodsId
+					console.log(_self.cartDatas[index].key,'check')
+					var params=_self.cartDatas[index].key
 					var data=check
 					cartcheck(params,data,header).then((res) => {
 						if (res.success) {
@@ -283,12 +283,12 @@
 					})
 				} else {
 					const check = !_self.allChecked
-					var goodIds=[]
-					var ids=''
+					var keys=[]
+					var k2=''
 					_self.cartDatas.forEach(item => {
 						item.check = check;
 						_self.allChecked = check;
-						goodIds.push(item.goodsId)
+						keys.push(item.key)
 					})
 					_self.allChecked = check;
 					if(_self.allChecked){
@@ -296,9 +296,9 @@
 					}else{
 						var check2=0
 					}
-					ids=goodIds.toString()
+					k2=keys.toString()
 					//购物车批量选中或取消
-					var params='?check='+check2+'&goodIds='+ids
+					var params='?check='+check2+'&keys='+k2
 					var header={
 						"Mall-Token": uni.getStorageSync('tokenId')
 					}
@@ -426,10 +426,12 @@
 			// 创建订单
 			createOrder() {
 				let cart_ids = [];
+				let skuId=[]
 				this.cartDatas.forEach(item => {
 					// 选中有库存购物车
 					if (item.check && item.limitNum > 0 && item.limitNum > item.goodsCount) {
 						cart_ids.push(item.goodsId)
+						skuId.push(item.skuId)
 					}
 				})
 				if (cart_ids.length <= 0) {
@@ -437,7 +439,7 @@
 					return;
 				}
 				uni.navigateTo({
-					url: `/packageShang/pages/order/create?cart_ids=${cart_ids.join(',')}&type=2`
+					url: `/packageShang/pages/order/create?cart_ids=${cart_ids.join(',')}&type=2&skuId=${skuId.join(',')}`
 				})
 			},
 		},

+ 1 - 1
packageShang/pages/user/address/address.vue

@@ -105,7 +105,7 @@
 						// #ifdef MP-ALIPAY
 						addr.county = res.result.area;
 						// #endif
-						addr.address =address
+						addr.address =res.detailInfo
 
 						// addr.address = `${addr.province}-${addr.city}-${addr.county}`;
 						// addr.addr_source = _this.$env.platform;

+ 2 - 2
packageShang/pages/user/order/order-detail.vue

@@ -104,7 +104,7 @@
 						<text class="clamp-2">{{ item.goodsName }}</text>
 						<view class="ft-dark fs-xs padding-top-xs">
 							<text class="margin-right">× {{item.goodsCount}}</text>
-							<!-- {{ item.goods_sku_name || '&nbsp;&nbsp;' }} -->
+							{{ item.goodsAttr || '&nbsp;&nbsp;' }}
 						</view>
 						<view class="margin-top-sm">
 							<text class="price">{{ item.goodsActualPrice }}</text>
@@ -232,7 +232,7 @@
 				<view class="dflex" v-if="order_data.state == '4'">
 					<button class="action-btn main-btn" @click="evaluate">我要评价</button>
 				</view>
-				<view v-if="order_data.state == '5' || order_data.state == '6'"><button @click="delorder" class="action-btn main-btn">删除订单</button></view>
+				<view v-if="order_data.state == '6'"><button @click="delorder" class="action-btn main-btn">删除订单</button></view>
 			</view>
 		</view>
 	</view>

+ 2 - 1
packageShang/pages/user/order/order-evaluate.vue

@@ -11,7 +11,7 @@
 						<text class="clamp-2">{{ item.goodsName }}</text>
 						<view class="ft-dark fs-xs padding-top-xs">
 							<text class="margin-right">× {{ item.goodsCount }}</text>
-							{{ item.goods_sku_name || '&nbsp;&nbsp;' }}
+							{{ item.goodsAttr || '&nbsp;&nbsp;' }}
 						</view>
 						<view class="margin-top-sm">
 							<text class="price">{{ order_data.orderActualPrice }}</text>
@@ -164,6 +164,7 @@
 								"reviewImgs": imgshu,
 								"state": _this.postData.review_anonymity,//0隐藏 1显示
 								"createTime": _this.now_date,
+								"skuId": _this.order_detail[0].skuId,
 							}
 							comment(data).then((res) => {
 								if(res.success){

+ 1 - 1
packageShang/pages/user/order/order-express.vue

@@ -78,7 +78,7 @@
 				orderexpress(data).then((res) => {
 					if(res.success){
 						_self.expressData = res.data;
-						return
+						//return
 					}
 					_self.detail=JSON.parse(_self.expressData.detail)
 					_self.$api.msg(res.message);

+ 4 - 4
packageShang/pages/user/order/order.vue

@@ -25,10 +25,10 @@
 							v-for="(goodsItem, goodsIndex) in item.orderDetails" :key="goodsIndex">
 							<image :src="goodsItem.goodsMasterImg" mode="aspectFill"></image>
 							<view class="right flex1">
-								<text class="clamp-2">{{ goodsItem.goodsName }} {{ goodsItem.goods_name_pw }}</text>
+								<text class="clamp-2">{{ goodsItem.goodsName }}</text>
 								<view class="ft-dark fs-xs padding-top-xs">
 									<text class="margin-right">× {{goodsItem.goodsCount}}</text>
-									<!-- {{ goodsItem.goods_sku_name || '&nbsp;&nbsp;' }} -->
+									{{ goodsItem.goodsAttr || '&nbsp;&nbsp;' }}
 								</view>
 								<view class="margin-top-sm">
 									<text class="price ft-main fs-sm">{{ goodsItem.goodsActualPrice }}</text>
@@ -90,7 +90,7 @@
 								<button class="action-btn border-radius-big bg-main main-btn"
 									@click="toevaluate(item)">我要评价</button>
 							</view>
-							<view class="dflex" v-if="['6', '5'].includes(item.state)">
+							<view class="dflex" v-if="['6'].includes(item.state)">
 								<button class="action-btn border-radius-big bg-main main-btn"
 									@click="delOrder(item)">删除订单</button>
 							</view>
@@ -203,7 +203,7 @@
 										<button class="action-btn border-radius-big bg-main main-btn"
 											@click="toevaluate(item)">我要评价</button>
 									</view>
-									<view class="dflex" v-if="['6', '5'].includes(item.state)">
+									<view class="dflex" v-if="['6'].includes(item.state)">
 										<button class="action-btn border-radius-big bg-main main-btn"
 											@click="delOrder(item)">删除订单</button>
 									</view>

+ 1 - 1
static/comon.js

@@ -1,5 +1,5 @@
 var url = 'https://www.daweilinli.com/smartcommunity-api/';//https://vote.chuanghai-tech.com/smartcommunity-api/
-var url2 = 'https://www.daweilinli.com/cloud-mall';
+var url2 = 'https://www.jinganrenjiams.com/cloud-mall-tmp';
 // var url = 'http://192.168.31.143:9999/';
 var nameList = ['赣', '京','辽','吉','黑', '冀', '晋','津','蒙','苏','浙','皖','闽','鲁','沪','豫','湘','鄂','粤','琼','桂','川','滇','贵','渝','藏','陕','甘','青','宁','新','港','澳','台']
 export default{

+ 1 - 1
util/api.js

@@ -2,7 +2,7 @@
 const BASE_URL = "https://www.jinganrenjiams.com/hotelReservation"
 
 // 商城接口前缀
-const BASE_URL_SHOP = "https://www.jinganrenjiams.com/cloud-mall"
+const BASE_URL_SHOP = "https://www.jinganrenjiams.com/cloud-mall-tmp"
 
 export const myRequest = (options) => {
 	uni.showLoading({