zs vor 2 Jahren
Ursprung
Commit
6fa9c4c274
3 geänderte Dateien mit 16 neuen und 14 gelöschten Zeilen
  1. 3 1
      pages/home/index.vue
  2. 3 3
      pagesMy/collection/market.vue
  3. 10 10
      pagesMy/collection/shop.vue

+ 3 - 1
pages/home/index.vue

@@ -152,6 +152,8 @@
 			},
 			// 购买
 			toBuy(e) {
+				const that = this;
+				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e.id||e._id}`
 				})
@@ -203,7 +205,7 @@
 				const that = this;
 				that.$set(that, `marketList`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
 		}

+ 3 - 3
pagesMy/collection/market.vue

@@ -43,7 +43,7 @@
 								</view>
 								<view class="money">
 									<text>¥</text>
-									<text>{{item.sell_money}}</text>
+									<text>{{item.sell_money.$numberDecimal}}</text>
 								</view>
 								<view class="other">
 									<view class="other_1">
@@ -65,7 +65,7 @@
 									</view>
 									<view class="money">
 										<text>¥</text>
-										<text>{{item.sell_money}}</text>
+										<text>{{item.sell_money.$numberDecimal}}</text>
 									</view>
 									<view class="other">
 										<view class="other_1">
@@ -208,7 +208,7 @@
 				}
 				if (index == 1) {
 					that.$set(that, `searchInfo`, {})
-					that.$set(that.searchInfo, `createdAt`, value);
+					that.$set(that.searchInfo, `time`, value);
 				} else if (index == 2) {
 					that.$set(that, `searchInfo`, {})
 					that.$set(that.searchInfo, `sell_money`, value);

+ 10 - 10
pagesMy/collection/shop.vue

@@ -37,12 +37,12 @@
 						<view class="two_2" v-if="type=='list'">
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
 								<image class="image"
-									:src="item.shop.file&&item.shop.file.length>0?item.shop.file[0].url:''" mode="">
+									:src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
 								</image>
 								<view class="other">
-									<view class="name">{{item.shop.name}}</view>
+									<view class="name">{{item.name}}</view>
 									<view class="other_1">
-										店铺地址 <text>{{item.shop.address}}</text>
+										店铺地址 <text>{{item.address}}</text>
 									</view>
 									<view class="other_1">
 										关注时间 <text>{{item.time}}</text>
@@ -56,13 +56,13 @@
 						<view class="two_3" v-else>
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
 								<image class="image"
-									:src="item.shop.file&&item.shop.file.length>0?item.shop.file[0].url:''" mode="">
+									:src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
 								</image>
 								<view class="name">
-									{{item.shop.name||'暂无'}}
+									{{item.name||'暂无'}}
 								</view>
 								<view class="address">
-									<text>{{item.shop.address}}</text>
+									<text>{{item.address}}</text>
 								</view>
 								<view class="other">
 									<view class="other_1">
@@ -191,7 +191,7 @@
 					limit: that.limit,
 					customer: user._id
 				}
-				const res = await that.$api(`/storeShop`, 'GET', {
+				const res = await that.$api(`/storeShop/userView`, 'GET', {
 					...info,
 					...that.searchInfo
 				})
@@ -226,17 +226,17 @@
 				const that = this;
 				that.clearPage();
 				uni.navigateTo({
-					url: `/pagesHome/shop/index?id=${e.shop._id}`
+					url: `/pagesHome/shop/index?id=${e._id}`
 				})
 			},
 			// 删除
 			async toDel(e) {
 				const that = this;
 				let user = that.user;
-				if (user && user._id && e && e.shop._id) {
+				if (user && user._id && e && e._id) {
 					let res = await that.$api(`/storeShop`, `POST`, {
 						customer: user._id,
-						shop: e.shop._id
+						shop: e._id
 					});
 					if (res.errcode == '0') {
 						uni.showToast({