yuxingxing hace 2 años
padre
commit
6702c99162

+ 3 - 3
package.json

@@ -1,12 +1,12 @@
 {
-  "id": "CRMEB-moren",
-  "displayName": "CRMEB客户管理电商商城系统前端模板uni-app版",
+  "id": "zhonghong-moren",
+  "displayName": "zhonghong客户管理电商商城系统前端模板uni-app版",
   "version": "v4.4.5",
   "description": "系统包含商城首页、分类页、购物车、个人中心、产品详情、订单、客服、拼团、砍价、秒杀、分销、优惠券、签到、积分等完整的商城系统前端模板。欢迎大家下载体验",
   "keywords": [
     "商城",
     "模板",
-    "CRMEB",
+    "zhonghong",
     "小程序",
     "公众号"
   ],

+ 1 - 0
pages.json

@@ -11,6 +11,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
+				"enablePullDownRefresh": true,
 				"navigationBarTitleText": "",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white",

+ 7 - 3
pages/index/diy/components/goodListMall.vue

@@ -253,7 +253,8 @@ export default {
 			couponShow: true,//优惠券标签是否显示
 			titleConfig: 2, //标题位置
 			fontColor: "rgba(253,80,47,1)",
-			labelColor: "rgba(29,176,252,1)"
+			labelColor: "rgba(29,176,252,1)",
+			typeId: ''
 		};
 	},
 	created() {
@@ -261,6 +262,7 @@ export default {
 	},
 	methods: {
 		clickNav(e) {
+			this.typeId = e.id
 			this.getGoodsPage(e.id)
 		},
 		getCategoryTwo(Id) {
@@ -273,16 +275,18 @@ export default {
 				}
 			})
 		},
-
 		getGoodsPage(typeId) {
+			uni.showLoading({ title: '商品加载中' });
 			getGoodsInfo({
 				zoneType: 3,
-				goodsCategoryId: typeId,
+				goodsCategoryId: this.typeId,
 				current: 1,
 				size: 100
 			}).then(res => {
 				this.tempArr = []
 				this.tempArr = res.data
+				uni.hideLoading();
+				uni.stopPullDownRefresh()
 			})
 		},
 		// 首发新品切换

+ 17 - 3
pages/index/diy/index_mall.vue

@@ -108,11 +108,11 @@
 			<view class="tab-content" v-show="current >= 1">
 				<!-- 轮播 -->
 				<view class="swiper-group">
-					<u-swiper :list="swiperTabList" indicator indicatorMode="line" circular></u-swiper>
+					<u-swiper :list="swiperTabList.length == 0?swiperList:swiperTabList" indicator indicatorMode="line" circular></u-swiper>
 				</view>
 				<!-- 商品列表 -->
 				<goodListMall @changeTab="changeTab" :iSshowH="true" @detail="goDetail" :currentId="currentId"
-					:isSortType="isSortType"></goodListMall>
+					:isSortType="isSortType" ref="goodTablist"></goodListMall>
 			</view>
 		</view>
 	</view>
@@ -706,6 +706,18 @@ export default {
 		}
 	},
 	methods: {
+		pullResh(){
+			if(this.current == 0){
+				uni.showLoading({ title: '刷新中' });
+				this.getNoticeList()
+				this.getAdsList()
+				this.getBroGoodsInfo()
+				this.getAdsTabList()
+				this.getGoodsInfo()
+			}else{
+				this.$refs.goodTablist.getGoodsPage()
+			}
+		},
 		getGoodsInfo() {
 			getGoodsInfo({
 				current: 1,
@@ -713,6 +725,8 @@ export default {
 				isRecom: 1
 			}).then(res => {
 				this.tempArr = res.data
+				uni.stopPullDownRefresh()
+				uni.hideLoading();
 			})
 		},
 		getBroGoodsInfo() {
@@ -777,8 +791,8 @@ export default {
 			getAdsList({
 				type: 7
 			}).then(res => {
+				this.swiperTabList = []
 				if (res.data.length > 0) {
-					this.swiperTabList = []
 					res.data.forEach(element => {
 						this.swiperTabList.push(element.imageUrl)
 					});

+ 5 - 1
pages/index/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<diyC ref="diy" v-if="isDiy"></diyC>
+	<diyC ref="diy" v-if="isDiy" @pullResh="pullResh"></diyC>
 </template>
 
 <script>
@@ -23,6 +23,10 @@
 		onHide() {
 			// this.isDiy = -1
 		},
+		onPullDownRefresh() {
+			this.$refs.diy.pullResh();
+			// uni.stopPullDownRefresh()
+		},
 		methods: {
 			// 微信分享;
 			setOpenShare: function() {