Browse Source

完善月度政策接口

wangxiaoying 4 năm trước cách đây
mục cha
commit
f9619e0ee8

+ 6 - 7
pages/home/monthly-policy/monthly-policy.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<!-- 月度政策 -->
-		
+		<view class="aa" ref="monthlyPolicy" v-html="contentDetail"></view>
 	</view>
 </template>
 
@@ -13,7 +13,7 @@
 	export default {
 		data() {
 			return {
-				
+				contentDetail: null
 			}
 		},
 		onLoad() {
@@ -29,19 +29,18 @@
 					url: '/homepage/getArticleOne',
 					method: 'post',
 					data: {
-						"displayType": "0" //门店1
+						"displayType": "1" //门店1
 					}
 				}).then(res => {
 					if(res.data.code==0){
-						console.log(res)
+						_this.contentDetail = res.data.data.contentDetail;
 					}else{
-						console.log(res)
 						uni.showToast({
 							title: res.data.msg,
 							icon: "none",
 							duration: _this.$store.state.showToastDuration
 						});
-					}
+					};
 				}).catch(err => {
 					uni.showToast({
 						title:  _this.$store.state.showServerErrorMsg,
@@ -52,7 +51,7 @@
 					setTimeout(() => {
 						uni.hideLoading();
 						this.loading = false;
-					}, 1000)
+					}, 1000);
 				})
 			}
 		}

+ 6 - 0
pages/me/agent-stock/agent-stock.vue

@@ -83,6 +83,7 @@
 				this.loadStatus = 'loading';
 				// 模拟数据加载
 				setTimeout(() => {
+					this.currentPage += 1;
 					this.handleGetData();
 					this.loadStatus = 'loadmore';
 				}, 1000)
@@ -93,6 +94,7 @@
 					this.currenBrand = "";
 					this.currentPattern = "";
 					this.currentSpec = "";
+					this.currentPage = 1;
 					this.handleGetData();
 				} else if (this.currentTab == 1) {
 					this.showBrand = true
@@ -161,6 +163,7 @@
 						icon: "none",
 						duration: _this.$store.state.showToastDuration
 					});
+					this.currentPage -= 1;
 				}).finally(() => {
 					setTimeout(() => {
 						uni.hideLoading();
@@ -171,15 +174,18 @@
 			// 筛选品牌
 			confirmBrand: function(v) {
 				this.currenBrand = v[0].label;
+				this.currentPage = 1;
 				this.handleGetData();
 			},
 			// 筛选花纹
 			confirmPattern: function(v) {
 				this.currentPattern = v[0].label;
+				this.currentPage = 1;
 				this.handleGetData();
 			},
 			searchSpec: function() {
 				if(this.currentSpec){
+					this.currentPage = 1;
 					this.handleGetData();
 				}
 				console.log(this.currentSpec)