Преглед на файлове

首页详情字段修改

LXT-NJ\Admin преди 1 година
родител
ревизия
741874d23a
променени са 2 файла, в които са добавени 8 реда и са изтрити 9 реда
  1. 5 5
      pages/shopdetail/index.vue
  2. 3 4
      pages/shouyedetail/index.vue

+ 5 - 5
pages/shopdetail/index.vue

@@ -103,7 +103,7 @@
 				// 商品的id
 				ids: '',
 				// 分类id
-				cartId: '',
+				classId: '',
 				page: 1,
 				showList: ['名称', '款式', '商品编号', '尺寸', '货号'],
 				xianshi: true,
@@ -126,7 +126,7 @@
 		onLoad(ops) {
 			console.log(ops);
 			this.ids = ops.cartId;
-			this.cartId = ops.classId;
+			this.classId = ops.classId;
 		},
 		created() {
 			this.sys = uni.getSystemInfoSync();
@@ -140,6 +140,7 @@
 		methods: {
 			// 详情数据
 			getDetail() {
+				console.log(this.ids,'ids');
 				let that = this;
 				myRequest({
 					url: "/api/ShopGoods/getShopGoodsDetail",
@@ -170,7 +171,7 @@
 					method: 'get',
 					data: {
 						goods_id: that.ids,
-						category_id: that.cartId,
+						category_id: that.classId,
 						page: that.page
 					}
 				}).then(res => {
@@ -240,9 +241,8 @@
 
 			// 喜欢的详情
 			goDetail(data) {
-				console.log(data);
 				uni.navigateTo({
-					url: "/pages/shopdetail/index?id=" + data.id + '&classId=' + data.category_id,
+					url: "/pages/shopdetail/index?cartId=" + data.id + '&classId=' + data.category_id,
 				})
 			},
 

+ 3 - 4
pages/shouyedetail/index.vue

@@ -4,7 +4,7 @@
 		<tm-menubars title="详情" :shadow="0" :showback="true"></tm-menubars>
 		<image class="touimg" :src="moren" mode="widthFix"></image>
 		<view class="qiehuancla">
-			<view :class="index==0?'border':'border1'" class="da" v-for="(item,index) in datall.images" @click="qiehuan(index,item)">
+			<view :class="index==0?'border':'border1'" class="da" v-for="(item,index) in datall.atlas_thumb" @click="qiehuan(index,item)">
 				<image class="xiaoimg" :src="item"></image>
 				<image v-if="index==chooseindex" class="sanjiao" src="/static/img/93.png" mode="widthFix"></image>
 			</view>
@@ -89,7 +89,7 @@ export default {
 				if (res.data.code == 200) {
 					console.log(res.data.data.details,'shuju1');
 					that.datall=res.data.data.data;
-					that.moren=that.datall.images[0]
+					that.moren=that.datall.atlas_thumb[0]
 					res.data.data.details.forEach(item => {
 						that.test.push({
 							img: item.shopGoods.image,
@@ -99,8 +99,7 @@ export default {
 							id: item.shopGoods.id,
 							price:item.shopGoods.sale_price,
 							category_id:item.shopGoods.category_id,
-							sale_num:item.shopGoods.sale_num,
-							
+							sale_num:item.shopGoods.sale_num,		
 						})
 					})
 				} else {