Explorar o código

Merge branch 'master' of http://git.cc-lotus.info/pointToNetwork/point-app

lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
d296c3af6f
Modificáronse 54 ficheiros con 1426 adicións e 1198 borrados
  1. 0 9
      App.vue
  2. 93 1
      config.js
  3. 6 0
      pages.json
  4. 44 47
      pages/home/index.vue
  5. 19 31
      pages/index/index.vue
  6. 5 18
      pages/login/index.vue
  7. 23 23
      pages/market/index.vue
  8. 24 81
      pages/my/index.vue
  9. 18 27
      pages/store/index.vue
  10. 31 34
      pages/week/index.vue
  11. 8 10
      pagesHome/exchange/index.vue
  12. 64 64
      pagesHome/group/index.vue
  13. 45 45
      pagesHome/group/share.vue
  14. 11 34
      pagesHome/market/search.vue
  15. 18 16
      pagesHome/market/type.vue
  16. 55 55
      pagesHome/order/appraise.vue
  17. 3 2
      pagesHome/order/detail.vue
  18. 47 47
      pagesHome/order/order.vue
  19. 41 57
      pagesHome/shop/index.vue
  20. 7 9
      pagesIntegral/home/index.vue
  21. 3 2
      pagesIntegral/order/detail.vue
  22. 42 44
      pagesIntegral/order/index.vue
  23. 26 31
      pagesIntegral/record/index.vue
  24. 5 6
      pagesMy/address/add.vue
  25. 210 14
      pagesMy/assets/index.vue
  26. 146 0
      pagesMy/assets/info.vue
  27. 72 78
      pagesMy/collection/market.vue
  28. 60 65
      pagesMy/collection/shop.vue
  29. 7 11
      pagesMy/discount/index.vue
  30. 31 35
      pagesMy/dough/index.vue
  31. 30 33
      pagesMy/integral/index.vue
  32. 51 55
      pagesMy/order/after.vue
  33. 38 38
      pagesMy/order/appraise.vue
  34. 13 13
      pagesMy/order/detail.vue
  35. 26 45
      pagesMy/order/index.vue
  36. 26 25
      pagesMy/order/noService.vue
  37. 49 51
      pagesMy/order/service.vue
  38. 1 1
      pagesRest/activity/info.vue
  39. 13 17
      pagesRest/activity/list.vue
  40. 15 9
      pagesRest/recom/index.vue
  41. BIN=BIN
      static/market.png
  42. BIN=BIN
      static/market_1.png
  43. BIN=BIN
      static/my.png
  44. BIN=BIN
      static/my_1.png
  45. BIN=BIN
      static/no.png
  46. BIN=BIN
      static/shouye.png
  47. BIN=BIN
      static/shouye_1.png
  48. BIN=BIN
      static/store.png
  49. BIN=BIN
      static/store_1.png
  50. BIN=BIN
      static/type.png
  51. BIN=BIN
      static/type_1.png
  52. BIN=BIN
      static/week.png
  53. BIN=BIN
      static/week_1.png
  54. 0 15
      uni.scss

+ 0 - 9
App.vue

@@ -1,14 +1,5 @@
 <script>
 	export default {
-		// onLaunch: function() {
-		// 	console.log('App Launch')
-		// },
-		// onShow: function() {
-		// 	console.log('App Show')
-		// },
-		// onHide: function() {
-		// 	console.log('App Hide')
-		// }
 	}
 </script>
 

+ 93 - 1
config.js

@@ -13,9 +13,101 @@ export default {
 	// serverUrl: 'http://192.168.223.1:12211',
 	wx_projectkey: wx_projectkey,
 	wx_miniProgram: wx_min.miniProgram,
-	system: system,
 	wx_dev: 'dev',
+	system: system,
 	share: {},
+	my_menu: [ //
+		{
+			title: '我的优惠劵',
+			route: 'pagesMy/discount/index'
+		},
+		{
+			title: '我的尊荣',
+			route: 'pagesMy/integral/index'
+		},
+		{
+			title: '我的资产',
+			route: 'pagesMy/assets/index'
+		},
+		{
+			title: '我的拼团',
+			route: 'pagesMy/dough/index'
+		},
+		{
+			title: '我的收货地址',
+			route: 'pagesMy/address/index'
+		},
+		{
+			title: '账号管理',
+			route: 'pagesMy/account/index'
+		},
+		{
+			title: '客服电话',
+			route: ''
+		},
+	],
+	my_orderList: [ //
+		{
+			icon: 'icon-daifukuan',
+			title: '待付款',
+			status: '0',
+			type: 'order',
+			route: "pagesMy/order/index",
+		},
+		{
+			icon: 'icon-daishouhuo',
+			title: '待发货',
+			status: '1',
+			type: 'order',
+			route: "pagesMy/order/index",
+		},
+		{
+			icon: 'icon-daipinglun',
+			title: '待收货',
+			status: '2',
+			type: 'order',
+			route: "pagesMy/order/index",
+		},
+		{
+			icon: 'icon-daipinglun',
+			title: '已收货',
+			status: '3',
+			type: 'order',
+			route: "pagesMy/order/index",
+		},
+		{
+			icon: 'icon-shouhoufuwuicon',
+			title: '售后',
+			type: 'after',
+			route: "pagesMy/order/after",
+		},
+	],
+	condList: [ //筛选
+		{
+			name: '默认',
+		},
+		{
+			name: '销量',
+			shang: 'icon-shangjiantou',
+			shangActive: 'icon-shangjiantou-copy',
+			xia: 'icon-xiajiantou',
+			xiaActive: 'icon-xiajiantou-copy'
+		},
+		{
+			name: '价格',
+			shang: 'icon-shangjiantou',
+			shangActive: 'icon-shangjiantou-copy',
+			xia: 'icon-xiajiantou',
+			xiaActive: 'icon-xiajiantou-copy'
+		},
+		{
+			name: '浏览量',
+			shang: 'icon-shangjiantou',
+			shangActive: 'icon-shangjiantou-copy',
+			xia: 'icon-xiajiantou',
+			xiaActive: 'icon-xiajiantou-copy'
+		}
+	],
 	china: [
 		//全国地址
 		{

+ 6 - 0
pages.json

@@ -141,6 +141,12 @@
 						"enablePullDownRefresh": true
 					}
 				},
+				{
+					"path": "assets/info",
+					"style": {
+						"navigationBarTitleText": "资产详情"
+					}
+				},
 				{
 					"path": "dough/index",
 					"style": {

+ 44 - 47
pages/home/index.vue

@@ -1,18 +1,14 @@
 <template>
 	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
-		<scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-top="scrollTop" @scroll="scroll"
-			@scrolltolower="toPage">
+		<scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-top="scrollTop" @scroll="scroll" @scrolltolower="toPage">
 			<view class="list-scroll-view">
 				<view class="main">
 					<view class="zero one">
-						<input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')"
-							placeholder-class="placss">
+						<input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')" placeholder-class="placss">
 					</view>
 					<view class="zero two">
-						<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
-							indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
-							<swiper-item class="list" v-for="(item,index) in bannerList" :key="index"
-								@tap="toBanner(item)">
+						<swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
+							<swiper-item class="list" v-for="(item,index) in bannerList" :key="index" @tap="toBanner(item)">
 								<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
 								</image>
 							</swiper-item>
@@ -27,8 +23,7 @@
 						</view>
 					</view>
 					<view class="zero four" v-if="recomList&&recomList.length>0">
-						<view class="recomList" v-for="(item,index) in recomList" :key="index"
-							v-if="item.list&&item.list.length>0">
+						<view class="recomList" v-for="(item,index) in recomList" :key="index" v-if="item.list&&item.list.length>0">
 							<view class="list" v-for="(tag,indexs) in item.list" :key="indexs" @tap="toBuy(tag)">
 								<view class="list_1">
 									<view class="txt">
@@ -51,8 +46,7 @@
 					<view class="zero act">
 						<view class="list" v-for="(item,index) in platformactList" :key="index" @tap="toAct(item)">
 							<view class="img">
-								<image class="image" :src="item.cover&&item.cover.length>0?item.cover[0].url:''"
-									mode="">
+								<image class="image" :src="item.cover&&item.cover.length>0?item.cover[0].url:''" mode="">
 								</image>
 							</view>
 							<view class="title" v-if="item.act_time.is_use=='0'">
@@ -87,7 +81,7 @@
 				</view>
 			</view>
 		</scroll-view>
-		<view class="backTop" v-if="old.scrollTop>500">
+		<view class="backTop" v-if="old_scrollTop>500">
 			<text @tap="goTop" class="iconfont icon-fanhuidingbu"></text>
 		</view>
 	</mobile-frame>
@@ -116,15 +110,18 @@
 				page: 0,
 				// 返回顶部
 				scrollTop: 0,
-				old: {
-					scrollTop: 0
-				},
+				old_scrollTop: 0
 			};
 		},
 		onLoad: function() {
 			const that = this;
 			that.search();
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			async search() {
@@ -205,7 +202,6 @@
 			// 推荐好物更多
 			toMore(e) {
 				const that = this;
-
 				uni.navigateTo({
 					url: `/pagesRest/recom/index?act_tags=${e.value}`
 				})
@@ -225,17 +221,6 @@
 					url: `/pagesHome/order/detail?id=${id}`
 				})
 			},
-			toPath(e) {
-				if (e && e.route && e.type == '0') {
-					uni.redirectTo({
-						url: `/${e.route}`
-					})
-				} else {
-					uni.navigateTo({
-						url: `/${e.route}`
-					})
-				}
-			},
 			// 分页
 			toPage(e) {
 				const that = this;
@@ -256,28 +241,40 @@
 			},
 			// 计算高度
 			scroll: function(e) {
-				this.old.scrollTop = e.detail.scrollTop
+				const that = this;
+				that.old_scrollTop = e.detail.scrollTop
 			},
 			// 返回顶部
 			goTop: function(e) {
-				this.scrollTop = this.old.scrollTop
-				this.$nextTick(function() {
-					this.scrollTop = 0
+				const that = this;
+				that.scrollTop = that.old_scrollTop;
+				that.$nextTick(function() {
+					that.scrollTop = 0
 				});
-			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `bannerList`, [])
-			that.$set(that, `btnList`, [])
-			that.$set(that, `recomList`, [])
-			that.$set(that, `platformactList`, [])
-			that.$set(that, `marketList`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
+			},
+			clearPage() {
+				const that = this;
+				that.$set(that, `bannerList`, [])
+				that.$set(that, `btnList`, [])
+				that.$set(that, `recomList`, [])
+				that.$set(that, `platformactList`, [])
+				that.$set(that, `marketList`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
+			// 菜单跳转
+			toPath(e) {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
+					uni.navigateTo({
+						url
+					})
+				}
+			},
 		}
 	}
 </script>

+ 19 - 31
pages/index/index.vue

@@ -10,17 +10,14 @@
 
 <script>
 	export default {
-		components: {},
 		data() {
 			return {
 				logoUrl: '',
 			};
 		},
-		onLoad: function() {},
-		onShow: async function() {
+		onLoad: async function() {
 			const that = this;
 			await that.searchConfig();
-			await that.search();
 		},
 		methods: {
 			// 查询基本设置
@@ -29,37 +26,28 @@
 				let res = await that.$api(`/config`, 'GET', {});
 				if (res.errcode == '0') {
 					let config = res.data;
-					that.$set(that, `logoUrl`, config.config.logo[0].url)
+					that.$set(that, `logoUrl`, config.config.logo[0].url);
 					uni.setStorage({
 						key: 'config',
 						data: config,
-						success: function() {}
-					});
-					// 赋值默认值
-					that.$config.share = {
-						title: config.title,
-						path: '/pages/index/index',
-						imageUrl: config.config.share[0].url
-					}
-				}
-			},
-			async search() {
-				const that = this;
-				// 查询当前所在平台
-				uni.getSystemInfo({
-					success: async function(res) {
-						uni.setStorage({
-							key: 'system',
-							data: res,
-							success: function() {
-								uni.redirectTo({
-									url: `/pages/home/index`
-								})
+						success: function(res) {
+							// 赋值默认值
+							that.$config.share = {
+								title: config.title,
+								path: '/pages/index/index',
+								imageUrl: config.config.share[0].url
 							}
-						});
-					}
-				});
-			},
+							let url = `/pages/home/index`;
+							uni.redirectTo({
+								url
+							})
+						},
+						fail: function(err) {
+							console.log(err);
+						}
+					})
+				}
+			}
 		}
 	}
 </script>

+ 5 - 18
pages/login/index.vue

@@ -172,24 +172,11 @@
 			// 查询平台信息
 			searchSystem() {
 				const that = this;
-				uni.getStorage({
-					key: 'system',
-					success: function(res) {
-						that.$set(that, `system`, res.data);
-						that.searchOpenid();
-					},
-					fail: function(err) {
-						let system = that.$config.system;
-						uni.setStorage({
-							key: 'system',
-							data: system,
-							success: function() {
-								that.$set(that, `system`, system);
-								that.searchOpenid();
-							}
-						});
-					}
-				})
+				let system = that.$config.system;
+				if (system) {
+					that.$set(that, `system`, system);
+					that.searchOpenid();
+				}
 			},
 			// 查询openid
 			searchOpenid() {

+ 23 - 23
pages/market/index.vue

@@ -104,12 +104,6 @@
 			that.watchLogin();
 		},
 		methods: {
-			// 公共跳转
-			toCommon(route, e) {
-				uni.navigateTo({
-					url: `${route}?id=${e && e.goods_id}`
-				})
-			},
 			// 监听登录
 			watchLogin() {
 				const that = this;
@@ -135,17 +129,17 @@
 					that.$set(that, `list`, res.data)
 				}
 			},
-			// 转换金额
-			showMoney(money) {
-				const that = this;
-				let moneys = `${money}`.split(".");
-				if (moneys.length == 1) {
-					money = money + ".00";
-				} else if (moneys.length == 2) {
-					money = money + "0";
-				}
-				return money;
-			},
+			// // 转换金额
+			// showMoney(money) {
+			// 	const that = this;
+			// 	let moneys = `${money}`.split(".");
+			// 	if (moneys.length == 1) {
+			// 		money = money + ".00";
+			// 	} else if (moneys.length == 2) {
+			// 		money = money + "0";
+			// 	}
+			// 	return money;
+			// },
 			// 编辑
 			edit(num) {
 				const that = this;
@@ -378,14 +372,20 @@
 			hasCheck() {
 				return this.list.some(e => e.goods.some(eg => eg.check))
 			},
+			// 公共跳转
+			toCommon(route, e) {
+				uni.navigateTo({
+					url: `${route}?id=${e && e.goods_id}`
+				})
+			},
 			toPath(e) {
-				if (e && e.route && e.type == '0') {
-					uni.redirectTo({
-						url: `/${e.route}`
-					})
-				} else {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
 					uni.navigateTo({
-						url: `/${e.route}`
+						url
 					})
 				}
 			}

+ 24 - 81
pages/my/index.vue

@@ -45,8 +45,7 @@
 					<view class="title">{{item.title}}</view>
 					<view class="title">
 						<text v-if="user.id&&item.title=='我的尊荣'">{{integral||0}}分</text>
-						<text v-if="item.title=='客服电话'"
-							@tap="makePhone(serviceContactInfo.phone)">{{serviceContactInfo.phone||''}}</text>
+						<text v-if="item.title=='客服电话'" @tap="makePhone(serviceContactInfo.phone)">{{serviceContactInfo.phone||''}}</text>
 						<text class="iconfont icon-jiantouyou"></text>
 					</view>
 				</view>
@@ -66,73 +65,10 @@
 				user: {},
 				// 客服信息
 				serviceContactInfo: {},
-				// 图标菜单
-				orderList: [ //订单列表
-					{
-						icon: 'icon-daifukuan',
-						title: '待付款',
-						status: '0',
-						type: 'order',
-						route: "pagesMy/order/index",
-					},
-					{
-						icon: 'icon-daishouhuo',
-						title: '待发货',
-						status: '1',
-						type: 'order',
-						route: "pagesMy/order/index",
-					},
-					{
-						icon: 'icon-daipinglun',
-						title: '待收货',
-						status: '2',
-						type: 'order',
-						route: "pagesMy/order/index",
-					},
-					{
-						icon: 'icon-daipinglun',
-						title: '已收货',
-						status: '3',
-						type: 'order',
-						route: "pagesMy/order/index",
-					},
-					{
-						icon: 'icon-shouhoufuwuicon',
-						title: '售后',
-						type: 'after',
-						route: "pagesMy/order/after",
-					},
-				],
+				// 订单图标菜单
+				orderList: [],
 				// 菜单
-				menuList: [{
-						title: '我的优惠劵',
-						route: 'pagesMy/discount/index'
-					},
-					{
-						title: '我的尊荣',
-						route: 'pagesMy/integral/index'
-					},
-					// {
-					// 	title: '我的资产',
-					// 	route: 'pagesMy/assets/index'
-					// },
-					{
-						title: '我的拼团',
-						route: 'pagesMy/dough/index'
-					},
-					{
-						title: '我的收货地址',
-						route: 'pagesMy/address/index'
-					},
-					{
-						title: '账号管理',
-						route: 'pagesMy/account/index'
-					},
-					{
-						title: '客服电话',
-						route: ''
-					},
-				],
+				menuList: [],
 				// 收藏商品
 				market_num: '',
 				// 收藏店铺
@@ -183,24 +119,19 @@
 			// 查询其他信息
 			async searchOther() {
 				const that = this;
+				let config = that.$config;
+				if (config) {
+					// 订单图标菜单
+					that.$set(that, `orderList`, config.my_orderList);
+					// 菜单
+					that.$set(that, `menuList`, config.my_menu);
+				}
 				let res;
 				res = await that.$api(`/serviceContact`, 'GET');
 				if (res.errcode == '0' && res.total > 0) {
 					that.$set(that, `serviceContactInfo`, res.data[0])
 				}
 			},
-			// 底部菜单跳转
-			toPath(e) {
-				if (e && e.route && e.type == '0') {
-					uni.redirectTo({
-						url: `/${e.route}`
-					})
-				} else {
-					uni.navigateTo({
-						url: `/${e.route}`
-					})
-				}
-			},
 			// 公共跳转
 			toCommon(e) {
 				uni.getStorage({
@@ -247,7 +178,19 @@
 				uni.makePhoneCall({
 					phoneNumber: e
 				});
-			}
+			},
+			// 底部菜单跳转
+			toPath(e) {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
+					uni.navigateTo({
+						url
+					})
+				}
+			},
 		}
 	}
 </script>

+ 18 - 27
pages/store/index.vue

@@ -7,8 +7,7 @@
 						<view class="list" v-for="(item,index) in list" :key="index" @tap="toShop(item)">
 							<view class="list_1">
 								<view class="l">
-									<image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''"
-										mode=""></image>
+									<image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode=""></image>
 								</view>
 								<view class="c">
 									<view class="name">
@@ -20,14 +19,12 @@
 									</view>
 								</view>
 								<view class="r" @tap.stop="toFolllow(item)">
-									<text class="iconfont icon-yduishoucangshixin-copy"
-										v-if="item.is_follow==true"></text>
+									<text class="iconfont icon-yduishoucangshixin-copy" v-if="item.is_follow==true"></text>
 									<text class="iconfont icon-yduishoucangkongxin-copy" v-else></text>
 								</view>
 							</view>
 							<view class="list_2">
-								<view class="market" v-for="(tag,indexs) in item.market" :key="indexs"
-									@tap.stop="toBuy(tag)">
+								<view class="market" v-for="(tag,indexs) in item.market" :key="indexs" @tap.stop="toBuy(tag)">
 									<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode="">
 									</image>
 									<view class="money">
@@ -64,7 +61,12 @@
 			await that.watchLogin();
 			// 查询列表
 			await that.search();
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 监听用户是否登录
@@ -114,9 +116,7 @@
 					that.$set(that, `skip`, skip)
 					that.search();
 					uni.hideLoading();
-				} else uni.showToast({
-					title: '没有更多数据了'
-				});
+				} else {}
 			},
 			// 商铺
 			toShop(e) {
@@ -161,31 +161,22 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			},
 			toPath(e) {
-				const that = this;
-				if (e && e.route && e.type == '0') {
-					uni.redirectTo({
-						url: `/${e.route}`
-					})
-				} else {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
 					uni.navigateTo({
-						url: `/${e.route}`
+						url
 					})
 				}
 			}
 		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
-		}
+
 	}
 </script>
 

+ 31 - 34
pages/week/index.vue

@@ -2,15 +2,13 @@
 	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
 		<view class="main">
 			<view class="one">
-				<input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')"
-					placeholder-class="placss">
+				<input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')" placeholder-class="placss">
 			</view>
 			<view class="two">
 				<view class="two_1">
 					<scroll-view scroll-y="true" class="scroll-view">
 						<view class="list-scroll-view">
-							<view class="list" :class="[active==index?'listActive':'']" v-for="(item,index) in typeList"
-								:key="index" @tap="toChange(index,item)">
+							<view class="list" :class="[active==index?'listActive':'']" v-for="(item,index) in typeList" :key="index" @tap="toChange(index,item)">
 								<text>{{item.label}}</text>
 							</view>
 						</view>
@@ -21,13 +19,10 @@
 						<view class="list-scroll-view">
 							<view class="two_2_1">
 								<scroll-view scroll-x="true" class="typeScrollview">
-									<view class="list" v-for="(item,index) in list" :key="index"
-										@tap="twoChange(item,index)">
-										<image class="image"
-											:src="item.file&&item.file.length>0?item.file[0].url:logoUrl" mode="">
+									<view class="list" v-for="(item,index) in list" :key="index" @tap="twoChange(item,index)">
+										<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:logoUrl" mode="">
 										</image>
-										<view class="label textOver"><text
-												:style="{color:twoActive==index?'#ff0000':'#000000'}">{{item.label}}</text>
+										<view class="label textOver"><text :style="{color:twoActive==index?'#ff0000':'#000000'}">{{item.label}}</text>
 										</view>
 									</view>
 								</scroll-view>
@@ -35,8 +30,7 @@
 							<view class=" two_2_2">
 								<view class="list" v-for="(tag,index) in marketList" :key="index" @tap="toBuy(tag)">
 									<view class="img">
-										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
-											mode=""></image>
+										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode=""></image>
 									</view>
 									<view class="info">
 										<view class="name textOver">
@@ -94,6 +88,12 @@
 			that.searchConfig();
 			that.search();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPages();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -122,7 +122,6 @@
 				if (res.errcode == '0') {
 					that.$set(that, `typeList`, res.data);
 					if (res.total > 0) {
-
 						that.searchRight(res.data[0]);
 						// 查询产品
 						that.$set(that, `tags`, res.data[0].code)
@@ -216,6 +215,17 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			},
+			// 清空总信息
+			clearPages() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `marketList`, [])
+				that.$set(that, `typeList`, [])
+				that.$set(that, `active`, '0')
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
 			// 搜索商品
 			toCommon(e) {
 				const that = this;
@@ -232,31 +242,18 @@
 			},
 			// 菜单跳转
 			toPath(e) {
-				const that = this;
-				that.clearPage();
-				if (e && e.route && e.type == '0') {
-					uni.redirectTo({
-						url: `/${e.route}`
-					})
-				} else {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
 					uni.navigateTo({
-						url: `/${e.route}`
+						url
 					})
 				}
-			}
+			},
 		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `marketList`, [])
-			that.$set(that, `typeList`, [])
-			that.$set(that, `active`, '0')
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
-		}
+
 	}
 </script>
 

+ 8 - 10
pagesHome/exchange/index.vue

@@ -41,12 +41,18 @@
 			// 监听用户是否登录
 			that.watchLogin();
 			// 下拉刷新
-			
+
 		},
 		onShow: function() {
 			const that = this;
 			that.searchConfig();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -161,15 +167,7 @@
 				that.$set(that, `page`, 0)
 			}
 		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
-		}
+
 	}
 </script>
 

+ 64 - 64
pagesHome/group/index.vue

@@ -91,7 +91,7 @@
 </template>
 
 <script>
-	import moment from 'moment'
+	import moment from 'moment';
 	export default {
 		data() {
 			return {
@@ -125,69 +125,6 @@
 			await that.search();
 		},
 		methods: {
-			// 开团
-			async toGroup() {
-				const that = this;
-				that.$refs.popup.open();
-			},
-			// 参团
-			async onJoin(e) {
-				const that = this;
-				that.$set(that, `join`, e)
-				that.$refs.popup1.open();
-			},
-			// 计数器
-			toCount(e) {
-				const that = this;
-				that.num = e;
-			},
-			// 确认开团 立即参团
-			async onSubmit(e) {
-				const that = this;
-				let user = that.user;
-				if (user._id) {
-					let data = {
-						customer: user._id,
-						shop: that.shopInfo._id,
-						goods: that.goodsInfo._id,
-						goodsSpec: that.specsInfo._id,
-						num: that.num,
-						type: '1'
-					}
-					if (e._id) {
-						data.group = e._id
-					}
-					let arr = await that.$api(`/util/checkCanBuy`, 'POST', data)
-					if (arr.errcode == '0') {
-						if (arr.data.result == true) {
-							that.clearPage();
-							if (e._id) {
-								uni.navigateTo({
-									url: `/pagesHome/order/order?key=${arr.data.key}&group_id=${e._id}`
-								})
-							} else {
-								uni.navigateTo({
-									url: `/pagesHome/order/order?key=${arr.data.key}`
-								})
-							}
-						} else {
-							uni.showToast({
-								title: arr.data.msg,
-								icon: 'none'
-							})
-						}
-					} else {
-						uni.showToast({
-							title: arr.errmsg,
-							icon: 'none'
-						})
-					}
-				} else {
-					uni.navigateTo({
-						url: `/pages/login/index`
-					})
-				}
-			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -260,6 +197,69 @@
 					uni.hideLoading();
 				} else {}
 			},
+			// 开团
+			async toGroup() {
+				const that = this;
+				that.$refs.popup.open();
+			},
+			// 参团
+			async onJoin(e) {
+				const that = this;
+				that.$set(that, `join`, e)
+				that.$refs.popup1.open();
+			},
+			// 计数器
+			toCount(e) {
+				const that = this;
+				that.num = e;
+			},
+			// 确认开团 立即参团
+			async onSubmit(e) {
+				const that = this;
+				let user = that.user;
+				if (user._id) {
+					let data = {
+						customer: user._id,
+						shop: that.shopInfo._id,
+						goods: that.goodsInfo._id,
+						goodsSpec: that.specsInfo._id,
+						num: that.num,
+						type: '1'
+					}
+					if (e._id) {
+						data.group = e._id
+					}
+					let arr = await that.$api(`/util/checkCanBuy`, 'POST', data)
+					if (arr.errcode == '0') {
+						if (arr.data.result == true) {
+							that.clearPage();
+							if (e._id) {
+								uni.navigateTo({
+									url: `/pagesHome/order/order?key=${arr.data.key}&group_id=${e._id}`
+								})
+							} else {
+								uni.navigateTo({
+									url: `/pagesHome/order/order?key=${arr.data.key}`
+								})
+							}
+						} else {
+							uni.showToast({
+								title: arr.data.msg,
+								icon: 'none'
+							})
+						}
+					} else {
+						uni.showToast({
+							title: arr.errmsg,
+							icon: 'none'
+						})
+					}
+				} else {
+					uni.navigateTo({
+						url: `/pages/login/index`
+					})
+				}
+			},
 			// 清空列表
 			clearPage() {
 				const that = this;

+ 45 - 45
pagesHome/group/share.vue

@@ -71,8 +71,8 @@
 	export default {
 		data() {
 			return {
-				id: '',
 				user: {},
+				id: '',
 				info: {},
 				num: 1,
 			};
@@ -84,10 +84,48 @@
 			that.search();
 		},
 		methods: {
-			// 计数器
-			toCount(e) {
+			watchLogin() {
 				const that = this;
-				that.num = e;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						if (user) that.$set(that, `user`, user)
+					}
+				})
+			},
+			async search() {
+				const that = this;
+				if (that.id) {
+					let res = await that.$api(`/group/${that.id}`, `GET`);
+					if (res.errcode == '0') {
+						if (res.data.status != '-1') {
+							res.data.persons = res.data.persons.filter(i => i.status == '0')
+						}
+						that.$set(that, `info`, res.data);
+						uni.getStorage({
+							key: 'config',
+							success: function(config) {
+								// 赋值默认值
+								that.$config.share = {
+									title: res.data.goods.name,
+									path: '/pagesHome/group/share?id=${that.id}',
+									imageUrl: config.config.share[0].url
+								}
+							}
+						});
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						})
+					}
+				}
+			},
+			// 参团
+			toOpen() {
+				const that = this;
+				that.$refs.popup.open();
 			},
 			// 确认开团 立即参团
 			async onSubmit() {
@@ -133,48 +171,10 @@
 					})
 				}
 			},
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						let user = that.$jwt(res.data);
-						if (user) that.$set(that, `user`, user)
-					}
-				})
-			},
-			async search() {
-				const that = this;
-				if (that.id) {
-					let res = await that.$api(`/group/${that.id}`, `GET`);
-					if (res.errcode == '0') {
-						if (res.data.status != '-1') {
-							res.data.persons = res.data.persons.filter(i => i.status == '0')
-						}
-						that.$set(that, `info`, res.data);
-						uni.getStorage({
-							key: 'config',
-							success: function(config) {
-								// 赋值默认值
-								that.$config.share = {
-									title: res.data.goods.name,
-									path: '/pagesHome/group/share?id=${that.id}',
-									imageUrl: config.config.share[0].url
-								}
-							}
-						});
-					} else {
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none'
-						})
-					}
-				}
-			},
-			// 参团
-			toOpen() {
+			// 计数器
+			toCount(e) {
 				const that = this;
-				that.$refs.popup.open();
+				that.num = e;
 			}
 		}
 	}

+ 11 - 34
pagesHome/market/search.vue

@@ -84,30 +84,6 @@
 				shang: '',
 				xia: '',
 				condList: [ // 筛选
-					{
-						name: '默认',
-					},
-					{
-						name: '销量',
-						shang: 'icon-shangjiantou',
-						shangActive: 'icon-shangjiantou-copy',
-						xia: 'icon-xiajiantou',
-						xiaActive: 'icon-xiajiantou-copy'
-					},
-					{
-						name: '价格',
-						shang: 'icon-shangjiantou',
-						shangActive: 'icon-shangjiantou-copy',
-						xia: 'icon-xiajiantou',
-						xiaActive: 'icon-xiajiantou-copy'
-					},
-					{
-						name: '浏览量',
-						shang: 'icon-shangjiantou',
-						shangActive: 'icon-shangjiantou-copy',
-						xia: 'icon-xiajiantou',
-						xiaActive: 'icon-xiajiantou-copy'
-					}
 				],
 				// 筛选
 				screenList: [],
@@ -125,7 +101,12 @@
 			that.searchConfig();
 			await that.searchOther();
 			await that.search();
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -154,6 +135,11 @@
 			},
 			async searchOther() {
 				const that = this;
+				let config = that.$config;
+				if (config) {
+					// 筛选条件
+					that.$set(that, `condList`, config.condList)
+				}
 				if (that.pid) {
 					let info = {};
 					info.pid = that.pid;
@@ -268,15 +254,6 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 18 - 16
pagesHome/market/type.vue

@@ -82,8 +82,12 @@
 			const that = this;
 			that.searchConfig();
 			that.search();
-			// 下拉刷新
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPages();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -206,6 +210,17 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			},
+			// 清空总列表
+			clearPages() {
+				const that = this;
+				that.$set(that, `typeList`, [])
+				that.$set(that, `marketList`, [])
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				that.$set(that, `active`, 0)
+			},
 			// 搜索商品
 			toCommon(e) {
 				const that = this;
@@ -219,21 +234,8 @@
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e.id||e._id}`
 				})
-			},
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `typeList`, [])
-			that.$set(that, `marketList`, [])
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			that.$set(that, `active`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
+			}
 		}
-
 	}
 </script>
 

+ 55 - 55
pagesHome/order/appraise.vue

@@ -103,61 +103,6 @@
 			that.watchLogin()
 		},
 		methods: {
-			async confirm(e) {
-				const that = this;
-				if (e) {
-					let reply = that.reply
-					let obj = {
-						content: e,
-						time: moment().format('YYYY-MM-DD HH:mm:ss')
-					}
-					reply.reply.push(obj)
-					const arr = await that.$api(`/goodsRate/${that.reply._id}`, 'POST', reply)
-					if (arr.errcode == '0') {
-						uni.showToast({
-							title: `回复成功`,
-							icon: 'success',
-						});
-						that.$set(that, `reply`, {});
-					} else {
-						uni.showToast({
-							title: arr.errmsg,
-							icon: 'none',
-						})
-					}
-				} else {
-					that.$set(that, `reply`, {});
-				}
-
-			},
-			// 回复
-			toReply(e, index) {
-				const that = this;
-				that.$set(that, `reply`, e);
-				that.$set(that.reply, `index`, index);
-			},
-			// 放大
-			toLarge(e, index) {
-				let url = e.reply[0].file.map(item => item.url)
-				uni.previewImage({
-					current: index,
-					urls: url
-				})
-			},
-			// 选择
-			toSelect(e) {
-				const that = this;
-				that.$set(that, `code`, e.code);
-				if (e.code == '0') {
-					that.search()
-				} else if (e.code == '1') {
-					that.$set(that, `list`, that.one);
-				} else if (e.code == '2') {
-					that.$set(that, `list`, that.two);
-				} else {
-					that.$set(that, `list`, that.thr);
-				}
-			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -215,6 +160,61 @@
 					});
 				}
 			},
+			async confirm(e) {
+				const that = this;
+				if (e) {
+					let reply = that.reply
+					let obj = {
+						content: e,
+						time: moment().format('YYYY-MM-DD HH:mm:ss')
+					}
+					reply.reply.push(obj)
+					const arr = await that.$api(`/goodsRate/${that.reply._id}`, 'POST', reply)
+					if (arr.errcode == '0') {
+						uni.showToast({
+							title: `回复成功`,
+							icon: 'success',
+						});
+						that.$set(that, `reply`, {});
+					} else {
+						uni.showToast({
+							title: arr.errmsg,
+							icon: 'none',
+						})
+					}
+				} else {
+					that.$set(that, `reply`, {});
+				}
+
+			},
+			// 回复
+			toReply(e, index) {
+				const that = this;
+				that.$set(that, `reply`, e);
+				that.$set(that.reply, `index`, index);
+			},
+			// 放大
+			toLarge(e, index) {
+				let url = e.reply[0].file.map(item => item.url)
+				uni.previewImage({
+					current: index,
+					urls: url
+				})
+			},
+			// 选择
+			toSelect(e) {
+				const that = this;
+				that.$set(that, `code`, e.code);
+				if (e.code == '0') {
+					that.search()
+				} else if (e.code == '1') {
+					that.$set(that, `list`, that.one);
+				} else if (e.code == '2') {
+					that.$set(that, `list`, that.two);
+				} else {
+					that.$set(that, `list`, that.thr);
+				}
+			},
 		}
 	}
 </script>

+ 3 - 2
pagesHome/order/detail.vue

@@ -312,8 +312,9 @@
 			},
 			//主菜单跳转
 			toPath(e) {
-				if (e && e.route) uni.reLaunch({
-					url: `/${e.route}`
+				let url = `/${e.route}`;
+				uni.reLaunch({
+					url
 				})
 			},
 			// 菜单展开

+ 47 - 47
pagesHome/order/order.vue

@@ -28,8 +28,7 @@
 								</view>
 								<view class="list_2" v-for="(tag,index) in item.goods" :key="index">
 									<view class="l">
-										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
-											mode=""></image>
+										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode=""></image>
 									</view>
 									<view class="c">
 										<view class="name">
@@ -151,6 +150,51 @@
 			that.watchLogin()
 		},
 		methods: {
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						that.$set(that, `user`, user);
+						that.search()
+					},
+					fail: function(err) {
+						uni.reLaunch({
+							url: `/pages/login/index`
+						})
+					}
+				})
+			},
+			// 查询列表
+			async search() {
+				const that = this;
+				let user = that.user;
+				const res = await that.$api(`/address`, 'GET', {
+					customer: user._id
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `addressList`, res.data.reverse());
+				}
+				const arr = await that.$api(`/order/toMakeOrder`, 'POST', {
+					key: that.key
+				})
+				if (arr.errcode == '0') {
+					// 分享人id
+					that.$set(that, `inviter`, arr.data.inviter);
+					// 地址
+					that.$set(that, `address`, arr.data.address);
+					// 订单
+					that.$set(that, `orderList`, arr.data.goodsData);
+					// 总价
+					that.$set(that, `total_detail`, arr.data.orderTotal);
+					that.$set(that, `type`, arr.data.type);
+					this.computedTotal();
+					// 优惠劵
+					that.$set(that, `couponList`, arr.data.couponList);
+				}
+			},
 			// 使用优惠劵
 			toDiscount(e) {
 				const that = this;
@@ -280,51 +324,7 @@
 					})
 				}
 			},
-			// 监听用户是否登录
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						let user = that.$jwt(res.data);
-						that.$set(that, `user`, user);
-						that.search()
-					},
-					fail: function(err) {
-						uni.reLaunch({
-							url: `/pages/login/index`
-						})
-					}
-				})
-			},
-			// 查询列表
-			async search() {
-				const that = this;
-				let user = that.user;
-				const res = await that.$api(`/address`, 'GET', {
-					customer: user._id
-				})
-				if (res.errcode == '0') {
-					that.$set(that, `addressList`, res.data.reverse());
-				}
-				const arr = await that.$api(`/order/toMakeOrder`, 'POST', {
-					key: that.key
-				})
-				if (arr.errcode == '0') {
-					// 分享人id
-					that.$set(that, `inviter`, arr.data.inviter);
-					// 地址
-					that.$set(that, `address`, arr.data.address);
-					// 订单
-					that.$set(that, `orderList`, arr.data.goodsData);
-					// 总价
-					that.$set(that, `total_detail`, arr.data.orderTotal);
-					that.$set(that, `type`, arr.data.type);
-					this.computedTotal();
-					// 优惠劵
-					that.$set(that, `couponList`, arr.data.couponList);
-				}
-			},
+
 			async computedTotal() {
 				const total_detail = this.total_detail;
 				let total = this.$plus(total_detail.freight_total, total_detail.goods_total)

+ 41 - 57
pagesHome/shop/index.vue

@@ -169,35 +169,11 @@
 				total: 0,
 				page: 0,
 				skip: 0,
-				limit: 5,
+				limit: 6,
 				condActive: 0,
 				shang: '',
 				xia: '',
 				condList: [ // 筛选
-					{
-						name: '默认',
-					},
-					{
-						name: '销量',
-						shang: 'icon-shangjiantou',
-						shangActive: 'icon-shangjiantou-copy',
-						xia: 'icon-xiajiantou',
-						xiaActive: 'icon-xiajiantou-copy'
-					},
-					{
-						name: '价格',
-						shang: 'icon-shangjiantou',
-						shangActive: 'icon-shangjiantou-copy',
-						xia: 'icon-xiajiantou',
-						xiaActive: 'icon-xiajiantou-copy'
-					},
-					{
-						name: '浏览量',
-						shang: 'icon-shangjiantou',
-						shangActive: 'icon-shangjiantou-copy',
-						xia: 'icon-xiajiantou',
-						xiaActive: 'icon-xiajiantou-copy'
-					}
 				],
 				// 数据是否触底
 				is_bottom: false,
@@ -208,16 +184,20 @@
 		},
 		onLoad: async function(e) {
 			const that = this;
-			let id = '6333d71d32c5f69745f9bd32';
+			let id = '';
 			if (e && e.id) id = e.id;
 			else id = decodeURIComponent(e.q).split('id=')[1];
 			that.$set(that, `id`, id);
 			that.searchConfig();
+			await that.searchOther();
 			await that.watchLogin();
 			await that.search();
-			await that.searchOther();
-			// 下拉刷新
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPages();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -233,6 +213,27 @@
 					}
 				})
 			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let config = that.$config;
+				if (config) {
+					// 筛选条件
+					that.$set(that, `condList`, config.condList)
+				}
+				let user = that.user;
+				let shop = that.info;
+				if (user && user._id && shop && shop._id) {
+					// 商铺是否收藏
+					let arr = await that.$api(`/storeShop/check`, `GET`, {
+						customer: user._id,
+						shop: shop._id
+					});
+					if (arr.errcode == '0') {
+						that.$set(that, `collection`, arr.data)
+					}
+				}
+			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -389,22 +390,6 @@
 				that.clearPage();
 				that.searchAll();
 			},
-			// 查询其他信息
-			async searchOther() {
-				const that = this;
-				let user = that.user;
-				let shop = that.info;
-				if (user && user._id && shop && shop._id) {
-					// 商铺是否收藏
-					let arr = await that.$api(`/storeShop/check`, `GET`, {
-						customer: user._id,
-						shop: shop._id
-					});
-					if (arr.errcode == '0') {
-						that.$set(that, `collection`, arr.data)
-					}
-				}
-			},
 			// 收藏
 			async toCollect() {
 				const that = this;
@@ -444,20 +429,19 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
+			// 清空总列表
+			clearPages() {
+				const that = this;
+				that.$set(that, `info`, {})
+				that.$set(that, `shoplist`, [])
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `info`, {})
-			that.$set(that, `shoplist`, [])
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 7 - 9
pagesIntegral/home/index.vue

@@ -56,6 +56,12 @@
 			that.searchConfig();
 			await that.search();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -136,16 +142,8 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
+
 	}
 </script>
 

+ 3 - 2
pagesIntegral/order/detail.vue

@@ -224,8 +224,9 @@
 			},
 			//主菜单跳转
 			toPath(e) {
-				if (e && e.route) uni.reLaunch({
-					url: `/${e.route}`
+				let url = `/${e.route}`;
+				uni.reLaunch({
+					url
 				})
 			},
 		}

+ 42 - 44
pagesIntegral/order/index.vue

@@ -28,9 +28,7 @@
 								</view>
 								<view class="list_2">
 									<view class="l">
-										<image class="image"
-											:src="orderInfo.file&&orderInfo.file.length>0?orderInfo.file[0].url:''"
-											mode=""></image>
+										<image class="image" :src="orderInfo.file&&orderInfo.file.length>0?orderInfo.file[0].url:''" mode=""></image>
 									</view>
 									<view class="c">
 										<view class="name">
@@ -97,8 +95,7 @@
 							<view class="two_1">
 								<checkbox-group @change="toCheckbox">
 									<label>
-										<checkbox :value="item._id" :checked="item.checked"
-											style="transform:scale(0.7)" />
+										<checkbox :value="item._id" :checked="item.checked" style="transform:scale(0.7)" />
 										选择地址
 									</label>
 								</checkbox-group>
@@ -142,6 +139,44 @@
 			that.watchLogin()
 		},
 		methods: {
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						that.$set(that, `user`, user);
+						that.search()
+					},
+					fail: function(err) {
+						uni.reLaunch({
+							url: `/pages/login/index`
+						})
+					}
+				})
+			},
+			// 查询列表
+			async search() {
+				const that = this;
+				let user = that.user;
+				const res = await that.$api(`/address`, 'GET', {
+					customer: user._id
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `addressList`, res.data.reverse());
+				}
+				const arr = await that.$api(`/zrOrder/toMakeOrder`, 'POST', {
+					key: that.key
+				}, `integral`)
+				if (arr.errcode == '0') {
+					that.$set(that, `address`, arr.data.address);
+					that.$set(that, `orderInfo`, arr.data.goods);
+					that.$set(that, `costTotal`, arr.data.costTotal);
+					that.$set(that, `shopInfo`, arr.data.shop);
+					that.$set(that, `buy_num`, arr.data.buy_num);
+				}
+			},
 			// 选择收货地址
 			toChoose() {
 				const that = this;
@@ -236,44 +271,6 @@
 						icon: 'none'
 					})
 				}
-			},
-			// 监听用户是否登录
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						let user = that.$jwt(res.data);
-						that.$set(that, `user`, user);
-						that.search()
-					},
-					fail: function(err) {
-						uni.reLaunch({
-							url: `/pages/login/index`
-						})
-					}
-				})
-			},
-			// 查询列表
-			async search() {
-				const that = this;
-				let user = that.user;
-				const res = await that.$api(`/address`, 'GET', {
-					customer: user._id
-				})
-				if (res.errcode == '0') {
-					that.$set(that, `addressList`, res.data.reverse());
-				}
-				const arr = await that.$api(`/zrOrder/toMakeOrder`, 'POST', {
-					key: that.key
-				}, `integral`)
-				if (arr.errcode == '0') {
-					that.$set(that, `address`, arr.data.address);
-					that.$set(that, `orderInfo`, arr.data.goods);
-					that.$set(that, `costTotal`, arr.data.costTotal);
-					that.$set(that, `shopInfo`, arr.data.shop);
-					that.$set(that, `buy_num`, arr.data.buy_num);
-				}
 			}
 		}
 	}
@@ -369,7 +366,8 @@
 						.r {
 							width: 15vw;
 							text-align: right;
-							.price{
+
+							.price {
 								color: var(--ff0Color);
 							}
 						}

+ 26 - 31
pagesIntegral/record/index.vue

@@ -17,9 +17,7 @@
 							<view class="list_2">
 								<view class="market">
 									<view class="url">
-										<image class="image"
-											:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
-											mode=""></image>
+										<image class="image" :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''" mode=""></image>
 									</view>
 									<view class="name">
 										{{item.goods.name}}
@@ -44,8 +42,7 @@
 								</view>
 							</view>
 							<view class="btn">
-								<button v-if="item.status=='2'||item.status=='3'" type="default" size="mini"
-									@click="toLogi(item)">查看物流</button>
+								<button v-if="item.status=='2'||item.status=='3'" type="default" size="mini" @click="toLogi(item)">查看物流</button>
 							</view>
 						</view>
 						<view class="is_bottom" v-if="is_bottom">
@@ -88,6 +85,12 @@
 			const that = this;
 			that.clearPage();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -113,23 +116,6 @@
 					}
 				})
 			},
-			// 输入框
-			toInput(e) {
-				const that = this;
-				if (e.detail.value == '') {
-					that.$set(that, `searchInfo`, {})
-				} else {
-					that.$set(that.searchInfo, `goods`, e.detail.value);
-				}
-				that.clearPage();
-				that.search();
-			},
-			// 查看物流
-			toLogi(e) {
-				uni.navigateTo({
-					url: `/pagesMy/logistics/index?id=${e._id}&type=${'integral'}`
-				})
-			},
 			// 查询列表
 			async search() {
 				const that = this;
@@ -191,6 +177,24 @@
 				let num = Math.sign(up - e.detail.scrollTop);
 				if (num == 1) that.$set(that, `is_bottom`, false);
 			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (e.detail.value == '') {
+					that.$set(that, `searchInfo`, {})
+				} else {
+					that.$set(that.searchInfo, `goods`, e.detail.value);
+				}
+				that.clearPage();
+				that.search();
+			},
+			// 查看物流
+			toLogi(e) {
+				uni.navigateTo({
+					url: `/pagesMy/logistics/index?id=${e._id}&type=${'integral'}`
+				})
+			},
+
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -199,15 +203,6 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 5 - 6
pagesMy/address/add.vue

@@ -113,12 +113,11 @@
 		},
 		onShow: function() {
 			const that = this;
-			uni.getStorage({
-				key: 'system',
-				success: function(res) {
-					that.$set(that, `paltForm`, res.data.uniPlatform)
-				}
-			})
+			let config = that.$config;
+			if (config) {
+				// 账号平台
+				that.$set(that, `paltForm`, config.system.uniPlatform)
+			}
 		},
 		methods: {
 			// 监听用户是否登录

+ 210 - 14
pagesMy/assets/index.vue

@@ -10,12 +10,25 @@
 				</view>
 			</view>
 			<view class="two">
-				<view class="two_1" v-if="list&&list.length>0">
-					数据列表
-				</view>
-				<view class="two_2" v-else>
-					已加载完全部
-				</view>
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+					<view class="list-scroll-view">
+						<view class="list" v-for="(item, index) in list" :key="index">
+							<view class="other" @tap="toDetail(item)">
+								<view class="other_1">
+									<view class="source">{{item.zhSource}}</view>
+									<view class="time">{{item.time}}</view>
+								</view>
+								<view class="other_2">
+									<view class="money">+{{item.money}}</view>
+									<text class="iconfont icon-jiantouyou"></text>
+								</view>
+							</view>
+						</view>
+						<view class="is_bottom" v-if="is_bottom">
+							<text>{{config.bottom_title}}</text>
+						</view>
+					</view>
+				</scroll-view>
 			</view>
 		</view>
 	</mobile-frame>
@@ -25,15 +38,138 @@
 	export default {
 		data() {
 			return {
+				// 系统设置
+				config: {},
+				user: {},
 				money: 0,
-				list: []
+				list: [],
+				total: 0,
+				skip: 0,
+				limit: 6,
+				page: 0,
+				// 来源
+				sourceList: [],
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0,
 			};
 		},
-		onLoad: function(e) {
-			
+		onShow: async function(e) {
+			const that = this;
+			that.searchConfig();
+			await that.searchOther();
+			await that.watchLogin();
+		},
+		onHide: function() {
+			const that = this;
+			that.clearPage();
 		},
 		methods: {
+			// 查询基本设置
+			searchConfig() {
+				const that = this;
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						if (res.data) that.$set(that, `config`, res.data)
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				})
+			},
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						that.$set(that, `user`, user)
+						that.search()
+					}
+				})
+			},
+			// 查询列表
+			async search() {
+				const that = this;
+				let user = that.user;
+				if (user._id) {
+					let info = {
+						skip: that.skip,
+						limit: that.limit,
+						inviter: user._id,
+					}
+					let res = await that.$api(`/cashBack`, 'GET', {
+						...info,
+					})
+					if (res.errcode == '0') {
+						let list = [...that.list, ...res.data];
+						for (let val of list) {
+							let source = that.sourceList.find(i => i.value == val.source)
+							if (source) val.zhSource = source.label;
+						}
+						that.$set(that, `list`, list);
+						that.$set(that, `total`, res.total)
+					}
+					let arr = await that.$api(`/cashBack/computedTotal`, 'GET', {
+						customer: user._id
+					})
+					if (arr.errcode == '0') that.$set(that, `money`, arr.data);
+				}
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "cashBack_source"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `sourceList`, res.data)
+				}
+			},
 
+			// 分页
+			toPage(e) {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.search();
+					uni.hideLoading();
+				} else that.$set(that, `is_bottom`, true)
+			},
+			toScroll(e) {
+				const that = this;
+				let up = that.scrollTop;
+				that.$set(that, `scrollTop`, e.detail.scrollTop);
+				let num = Math.sign(up - e.detail.scrollTop);
+				if (num == 1) that.$set(that, `is_bottom`, false);
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
+			// 明细
+			toDetail(item) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/assets/info?id=${item._id}`
+				})
+			},
 		},
 		onPullDownRefresh: async function() {
 			const that = this;
@@ -78,13 +214,73 @@
 		}
 
 		.two {
-			.two_2 {
-				text-align: center;
-				color: #858585;
-				font-size: 14px;
-				margin: 5vw 0;
+			position: relative;
+			flex-grow: 1;
+			padding: 2vw 0 0 0;
+
+			.list {
+				width: 92vw;
+				border-bottom: 0.5vw solid var(--f1Color);
+				margin: 2vw 2vw 0 2vw;
+				padding: 2vw;
+				border-radius: 5px;
+
+				.other {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.other_1 {
+						width: 60vw;
+						font-size: var(--font16Size);
+						margin: 0 0 1vw 0;
+
+						.time {
+							margin: 1vw 0 0 0;
+							color: var(--f85Color);
+							font-size: var(--font12Size);
+						}
+					}
+
+					.other_2 {
+						display: flex;
+						align-items: center;
+						.money {
+							font-size: var(--font18Size);
+							font-weight: bold;
+							margin: 0 1vw;
+						}
+
+						.iconfont {
+							font-size: 16px;
+						}
+					}
+				}
 			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		text-align: center;
 
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
 		}
 	}
 </style>

+ 146 - 0
pagesMy/assets/info.vue

@@ -0,0 +1,146 @@
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="info">
+				<view class="one">
+					<view class="left">返现金额</view>
+					<view class="right">+{{info.money}}</view>
+				</view>
+				<view class="two">
+					<view class="left">状态</view>
+					<view class="right">{{info.zhStatus}}</view>
+				</view>
+				<view class="two">
+					<view class="left">返现时间</view>
+					<view class="right">{{info.time}}</view>
+				</view>
+				<view class="two">
+					<view class="left">推荐人</view>
+					<view class="right">{{info.inviter_name}}</view>
+				</view>
+				<view class="two">
+					<view class="left">来源</view>
+					<view class="right">{{info.zhSource}}</view>
+				</view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				user: {},
+				info: {},
+				// 状态
+				statusList: [],
+				// 来源
+				sourceList: [],
+			};
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e.id || '');
+			await that.searchOther();
+			await that.watchLogin();
+		},
+		methods: {
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "cashBack_status"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `statusList`, res.data)
+				}
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "cashBack_source"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `sourceList`, res.data)
+				}
+			},
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: async function(res) {
+						let user = that.$jwt(res.data);
+						if (user) {
+							that.$set(that, `user`, user);
+							if (that.id) {
+								let arr = await that.$api(`/cashBack/${that.id}`, 'GET')
+								if (arr.errcode == '0') {
+									let status = that.statusList.find(i => i.value == arr.data.status)
+									if (status) arr.data.zhStatus = status.label;
+									let source = that.sourceList.find(i => i.value == arr.data.source)
+									if (source) arr.data.zhSource = source.label;
+									// 查询推荐人信息
+									let res = await that.$api(`/user/${arr.data.inviter}`, 'GET');
+									if (res.errcode == '0') arr.data.inviter_name = res.data.name
+									that.$set(that, `info`, arr.data)
+								}
+							}
+						}
+					},
+					fail: function(err) {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.info {
+			padding: 2vw;
+
+			.one {
+				display: flex;
+				justify-content: space-between;
+				padding: 10vw 2vw;
+				border-bottom: 0.5vw solid var(--f1Color);
+
+				.left {
+					color: #696969;
+					font-size: var(--font14Size);
+				}
+
+				.right {
+					font-size: var(--font16Size);
+					font-weight: bold;
+				}
+			}
+
+			.two {
+				display: flex;
+				justify-content: space-between;
+				padding: 2vw;
+
+				.left {
+					color: #696969;
+					font-size: var(--font14Size);
+				}
+
+				.right {
+					color: #A9A9A9;
+					font-size: var(--font14Size);
+				}
+			}
+		}
+	}
+</style>

+ 72 - 78
pagesMy/collection/market.vue

@@ -8,27 +8,23 @@
 				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
 					<view class="list-scroll-view">
 						<view class="two_1">
-							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
-								:key="index" @tap="toCond(index,item)">
+							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
 								<view class="name" v-if="index!=4">
 									{{item.name}}
 								</view>
 								<view v-if="index==4" class="icon4">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 								</view>
 								<view v-else class="icon">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 									<view class="icon_1">
-										<text :class="['iconfont', item.xiaActive]"
-											v-if="condActive==index&&xia=='-1'"></text>
+										<text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
 										<text :class="['iconfont', item.xia]" v-else></text>
 									</view>
 								</view>
@@ -145,6 +141,12 @@
 			that.searchConfig();
 			that.watchLogin();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -159,6 +161,67 @@
 					}
 				})
 			},
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						that.$set(that, `user`, user);
+						that.search()
+					},
+					fail: function(err) {
+						uni.reLaunch({
+							url: `/pages/login/index`
+						})
+					}
+				})
+			},
+			// 查询列表
+			async search() {
+				const that = this;
+				let user = that.user;
+				let info = {
+					skip: that.skip,
+					limit: that.limit
+				}
+				const res = await that.$api(`/storeGoods/userView`, 'GET', {
+					...info,
+					...that.searchInfo
+				})
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					that.$set(that, `list`, list);
+					that.$set(that, `total`, res.total)
+				}
+			},
+			// 分页
+			toPage() {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.search();
+					uni.hideLoading();
+
+				} else that.$set(that, `is_bottom`, true)
+			},
+			toScroll(e) {
+				const that = this;
+				let up = that.scrollTop;
+				that.$set(that, `scrollTop`, e.detail.scrollTop);
+				let num = Math.sign(up - e.detail.scrollTop);
+				if (num == 1) that.$set(that, `is_bottom`, false);
+			},
 			// 输入框
 			toInput(e) {
 				const that = this;
@@ -249,67 +312,6 @@
 				that.clearPage();
 				that.search();
 			},
-			// 监听用户是否登录
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						let user = that.$jwt(res.data);
-						that.$set(that, `user`, user);
-						that.search()
-					},
-					fail: function(err) {
-						uni.reLaunch({
-							url: `/pages/login/index`
-						})
-					}
-				})
-			},
-			// 查询列表
-			async search() {
-				const that = this;
-				let user = that.user;
-				let info = {
-					skip: that.skip,
-					limit: that.limit
-				}
-				const res = await that.$api(`/storeGoods/userView`, 'GET', {
-					...info,
-					...that.searchInfo
-				})
-				if (res.errcode == '0') {
-					let list = [...that.list, ...res.data];
-					that.$set(that, `list`, list);
-					that.$set(that, `total`, res.total)
-				}
-			},
-			// 分页
-			toPage() {
-				const that = this;
-				let list = that.list;
-				let limit = that.limit;
-				if (that.total > list.length) {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					})
-					let page = that.page + 1;
-					that.$set(that, `page`, page)
-					let skip = page * limit;
-					that.$set(that, `skip`, skip)
-					that.search();
-					uni.hideLoading();
-
-				} else that.$set(that, `is_bottom`, true)
-			},
-			toScroll(e) {
-				const that = this;
-				let up = that.scrollTop;
-				that.$set(that, `scrollTop`, e.detail.scrollTop);
-				let num = Math.sign(up - e.detail.scrollTop);
-				if (num == 1) that.$set(that, `is_bottom`, false);
-			},
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -319,15 +321,7 @@
 				that.$set(that, `page`, 0)
 			}
 		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
-		}
+
 	}
 </script>
 

+ 60 - 65
pagesMy/collection/shop.vue

@@ -8,27 +8,23 @@
 				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
 					<view class="list-scroll-view">
 						<view class="two_1">
-							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
-								:key="index" @tap="toCond(index,item)">
+							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
 								<view class="name" v-if="index!=2">
 									{{item.name}}
 								</view>
 								<view v-if="index==2" class="icon4">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 								</view>
 								<view v-else class="icon">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 									<view class="icon_1">
-										<text :class="['iconfont', item.xiaActive]"
-											v-if="condActive==index&&xia=='-1'"></text>
+										<text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
 										<text :class="['iconfont', item.xia]" v-else></text>
 									</view>
 								</view>
@@ -93,7 +89,7 @@
 				list: [],
 				total: 0,
 				skip: 0,
-				limit: 5,
+				limit: 6,
 				page: 0,
 				condActive: 0,
 				shang: '',
@@ -125,6 +121,12 @@
 			that.searchConfig();
 			that.watchLogin();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -139,52 +141,6 @@
 					}
 				})
 			},
-			// 输入框
-			toInput(e) {
-				const that = this;
-				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
-				that.clearPage();
-				that.search();
-			},
-			// 筛选
-			toCond(index, e) {
-				const that = this;
-				let condActive = that.condActive;
-				that.$set(that, `condActive`, index);
-				if (condActive != index && that.xia == '') {
-					that.$set(that, `shang`, '0');
-					that.$set(that, `xia`, '-1');
-				} else if (condActive == index && that.xia == '-1') {
-					that.$set(that, `shang`, '1');
-					that.$set(that, `xia`, '0');
-				} else if (condActive == index && that.shang == '1') {
-					that.$set(that, `shang`, '0');
-					that.$set(that, `xia`, '-1');
-				} else if (condActive = index && that.shang == '1') {
-					that.$set(that, `shang`, '0');
-					that.$set(that, `xia`, '-1');
-				}
-				let value;
-				if (index != 0) {
-					value = that.shang == '0' ? that.xia : that.shang;
-				} else {
-					that.$set(that, `searchInfo`, {})
-				}
-				if (index == 1) {
-					that.$set(that, `searchInfo`, {})
-					that.$set(that.searchInfo, `time`, value);
-				} else if (index == 2) {
-					if (e.shang == 'icon-shitugonggeListBox') {
-						that.$set(e, `shang`, 'icon-liebiaoxingshi');
-						that.$set(that, `type`, 'list');
-					} else {
-						that.$set(e, `shang`, 'icon-shitugonggeListBox');
-						that.$set(that, `type`, 'gongge');
-					}
-				}
-				that.clearPage();
-				that.search();
-			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -247,6 +203,53 @@
 				let num = Math.sign(up - e.detail.scrollTop);
 				if (num == 1) that.$set(that, `is_bottom`, false);
 			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
+				that.clearPage();
+				that.search();
+			},
+			// 筛选
+			toCond(index, e) {
+				const that = this;
+				let condActive = that.condActive;
+				that.$set(that, `condActive`, index);
+				if (condActive != index && that.xia == '') {
+					that.$set(that, `shang`, '0');
+					that.$set(that, `xia`, '-1');
+				} else if (condActive == index && that.xia == '-1') {
+					that.$set(that, `shang`, '1');
+					that.$set(that, `xia`, '0');
+				} else if (condActive == index && that.shang == '1') {
+					that.$set(that, `shang`, '0');
+					that.$set(that, `xia`, '-1');
+				} else if (condActive = index && that.shang == '1') {
+					that.$set(that, `shang`, '0');
+					that.$set(that, `xia`, '-1');
+				}
+				let value;
+				if (index != 0) {
+					value = that.shang == '0' ? that.xia : that.shang;
+				} else {
+					that.$set(that, `searchInfo`, {})
+				}
+				if (index == 1) {
+					that.$set(that, `searchInfo`, {})
+					that.$set(that.searchInfo, `time`, value);
+				} else if (index == 2) {
+					if (e.shang == 'icon-shitugonggeListBox') {
+						that.$set(e, `shang`, 'icon-liebiaoxingshi');
+						that.$set(that, `type`, 'list');
+					} else {
+						that.$set(e, `shang`, 'icon-shitugonggeListBox');
+						that.$set(that, `type`, 'gongge');
+					}
+				}
+				that.clearPage();
+				that.search();
+			},
+
 			// 详细信息
 			toView(e) {
 				const that = this;
@@ -284,19 +287,11 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
+
 	}
 </script>
 

+ 7 - 11
pagesMy/discount/index.vue

@@ -44,7 +44,12 @@
 			that.searchConfig();
 			// 监听用户是否登录
 			that.watchLogin();
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -131,18 +136,9 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 31 - 35
pagesMy/dough/index.vue

@@ -11,8 +11,7 @@
 							<view class="list-scroll-view">
 								<view class="list" v-for="(item, index) in list" :key="index" @click="toShare(item)">
 									<view class="image">
-										<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)"
-											:key="indexs" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
+										<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)" :key="indexs" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
 										</image>
 									</view>
 									<view class="list_1">
@@ -99,32 +98,14 @@
 		onShow: function() {
 			const that = this;
 			that.watchLogin();
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
-			// 输入框
-			toInput(e) {
-				const that = this;
-				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
-				that.clearPage();
-				that.search();
-			},
-			// 选择选项卡
-			tabsChange(e) {
-				const that = this;
-				that.$set(that.tabs, `active`, e.active)
-				that.$set(that, `status`, e.active);
-				that.clearPage();
-				that.search()
-			},
-			// 分享
-			toShare(e) {
-				const that = this;
-				that.clearPage();
-				uni.navigateTo({
-					url: `/pagesHome/group/share?id=${e._id}`
-				})
-			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -201,6 +182,30 @@
 					uni.hideLoading();
 				} else {}
 			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
+				that.clearPage();
+				that.search();
+			},
+			// 选择选项卡
+			tabsChange(e) {
+				const that = this;
+				that.$set(that.tabs, `active`, e.active)
+				that.$set(that, `status`, e.active);
+				that.clearPage();
+				that.search()
+			},
+			// 分享
+			toShare(e) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesHome/group/share?id=${e._id}`
+				})
+			},
+
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -209,15 +214,6 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 30 - 33
pagesMy/integral/index.vue

@@ -63,13 +63,14 @@
 			const that = this;
 			that.clearPage();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
-			// 兑换记录
-			toRecord() {
-				uni.navigateTo({
-					url: `/pagesIntegral/record/index`
-				})
-			},
+
 			// 查询基本设置
 			searchConfig() {
 				const that = this;
@@ -124,24 +125,6 @@
 					if (arr.errcode == '0') that.$set(that, `integral`, arr.data);
 				}
 			},
-			// 查询其他信息
-			async searchOther() {
-				const that = this;
-				let res;
-				res = await that.$api(`/dictData`, 'GET', {
-					code: "point_status"
-				});
-				if (res.errcode == '0') {
-					that.$set(that, `statusList`, res.data)
-				}
-				res = await that.$api(`/dictData`, 'GET', {
-					code: "point_source"
-				});
-				if (res.errcode == '0') {
-					that.$set(that, `sourceList`, res.data)
-				}
-			},
-
 			// 分页
 			toPage(e) {
 				const that = this;
@@ -167,6 +150,29 @@
 				let num = Math.sign(up - e.detail.scrollTop);
 				if (num == 1) that.$set(that, `is_bottom`, false);
 			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "point_status"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `statusList`, res.data)
+				}
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "point_source"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `sourceList`, res.data)
+				}
+			},
+			// 兑换记录
+			toRecord() {
+				uni.navigateTo({
+					url: `/pagesIntegral/record/index`
+				})
+			},
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -175,15 +181,6 @@
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 51 - 55
pagesMy/order/after.vue

@@ -20,8 +20,7 @@
 										</view>
 									</view>
 									<view class="list_2">
-										<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''"
-											mode="">
+										<image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
 										</image>
 										<view class="other">
 											<view class="name">
@@ -45,8 +44,7 @@
 										</view>
 									</view>
 									<view class="btn">
-										<button v-if="item.status=='0'||item.status=='1'" type="default" size="mini"
-											@tap.stop="toCancel(item)">取消售后</button>
+										<button v-if="item.status=='0'||item.status=='1'" type="default" size="mini" @tap.stop="toCancel(item)">取消售后</button>
 									</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
@@ -76,7 +74,7 @@
 				typeList: [],
 				total: 0,
 				skip: 0,
-				limit: 5,
+				limit: 6,
 				page: 0,
 				tabs: {
 					active: '0',
@@ -121,6 +119,12 @@
 			await that.watchLogin();
 
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -135,46 +139,6 @@
 					}
 				})
 			},
-			// 选择选项卡
-			tabsChange(e) {
-				const that = this;
-				that.$set(that.tabs, `active`, e.active)
-				that.$set(that, `status`, e.active);
-				that.clearPage();
-				that.search()
-			},
-			// 订单详细
-			toInfo(item) {
-				uni.navigateTo({
-					url: `/pagesMy/order/info?id=${item.order_detail._id}&status=${item.order_detail.status}`
-				})
-			},
-			// 取消售后
-			toCancel(e) {
-				const that = this;
-				uni.showModal({
-					title: '提示',
-					content: '确定删除售后申请吗?',
-					success: async function(res) {
-						if (res.confirm) {
-							const arr = await that.$api(`/afterSale/${e._id}`, 'DELETE');
-							if (arr.errcode == '0') {
-								uni.showToast({
-									title: '删除售后成功',
-									icon: 'none'
-								})
-								that.clearPage();
-								that.search();
-							} else {
-								uni.showToast({
-									title: arr.errmsg,
-									icon: 'none'
-								})
-							}
-						}
-					}
-				});
-			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -252,23 +216,55 @@
 				let num = Math.sign(up - e.detail.scrollTop);
 				if (num == 1) that.$set(that, `is_bottom`, false);
 			},
+			// 选择选项卡
+			tabsChange(e) {
+				const that = this;
+				that.$set(that.tabs, `active`, e.active)
+				that.$set(that, `status`, e.active);
+				that.clearPage();
+				that.search()
+			},
+			// 订单详细
+			toInfo(item) {
+				uni.navigateTo({
+					url: `/pagesMy/order/info?id=${item.order_detail._id}&status=${item.order_detail.status}`
+				})
+			},
+			// 取消售后
+			toCancel(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定删除售后申请吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							const arr = await that.$api(`/afterSale/${e._id}`, 'DELETE');
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '删除售后成功',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+
 			// 清空列表
 			clearPage() {
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
 	}
 </script>

+ 38 - 38
pagesMy/order/appraise.vue

@@ -68,6 +68,43 @@
 			that.watchLogin();
 		},
 		methods: {
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						if (user) that.$set(that, `user`, user);
+						that.search();
+					},
+					fail: function(err) {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				});
+			},
+			// 查询列表
+			async search() {
+				const that = this;
+				let user = that.user;
+				let res;
+				if (that.id) {
+					res = await that.$api(`/orderDetail/${that.id}`);
+					if (res.errcode == '0') {
+						that.$set(that, `info`, res.data.order);
+						uni.hideLoading();
+					}
+				}
+				if (that.rate_id) {
+					res = await that.$api(`/goodsRate/${that.rate_id}`);
+					if (res.errcode == '0') {
+						that.$set(that, `form`, res.data);
+						that.$set(that, `readonly`, true)
+					}
+				}
+			},
 			// 图片上传
 			uplSuc(e) {
 				const that = this;
@@ -136,44 +173,7 @@
 						}
 					}
 				})
-			},
-			// 监听用户是否登录
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						let user = that.$jwt(res.data);
-						if (user) that.$set(that, `user`, user);
-						that.search();
-					},
-					fail: function(err) {
-						uni.navigateTo({
-							url: `/pages/login/index`
-						})
-					}
-				});
-			},
-			// 查询列表
-			async search() {
-				const that = this;
-				let user = that.user;
-				let res;
-				if (that.id) {
-					res = await that.$api(`/orderDetail/${that.id}`);
-					if (res.errcode == '0') {
-						that.$set(that, `info`, res.data.order);
-						uni.hideLoading();
-					}
-				}
-				if (that.rate_id) {
-					res = await that.$api(`/goodsRate/${that.rate_id}`);
-					if (res.errcode == '0') {
-						that.$set(that, `form`, res.data);
-						that.$set(that, `readonly`, true)
-					}
-				}
-			},
+			}
 		}
 	}
 </script>

+ 13 - 13
pagesMy/order/detail.vue

@@ -37,6 +37,18 @@
 			that.watchLogin();
 		},
 		methods: {
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: async (res) => {},
+					fail: (err) => {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				})
+			},
 			// 提交保存
 			async onSubmit(ref) {
 				const that = this;
@@ -61,19 +73,7 @@
 						})
 					}
 				})
-			},
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: async (res) => {},
-					fail: (err) => {
-						uni.navigateTo({
-							url: `/pages/login/index`
-						})
-					}
-				})
-			},
+			}
 		}
 	}
 </script>

+ 26 - 45
pagesMy/order/index.vue

@@ -12,8 +12,7 @@
 								<view class="list_1" v-if="tabs.active=='-0'">
 									全部订单
 								</view>
-								<view class="list_2" v-for="(item,index) in list" :key="index"
-									v-else-if="tabs.active=='0'" @tap="toInfo(item)">
+								<view class="list_2" v-for="(item,index) in list" :key="index" v-else-if="tabs.active=='0'" @tap="toInfo(item)">
 									<view class="status">
 										{{item.status=='0'?'待付款':item.status=='1'?'已支付':item.status=='-1'?'取消订单':item.status=='2'?'发货中':item.status=='-2'?'已退款':item.status=='3'?'已收货':item.status=='-3'?'申请售后':item.status=='-4'?'正在售后中':item.status=='-5'?'售后已结束':'未识别'}}
 									</view>
@@ -27,9 +26,7 @@
 										<view class="goods_2">
 											<view class="market" v-for="(tags,indexss) in tag.goods" :key="indexss">
 												<view class="url">
-													<image class="image"
-														:src="tags.goods.file&&tags.goods.file.length>0?tags.goods.file[0].url:''"
-														mode=""></image>
+													<image class="image" :src="tags.goods.file&&tags.goods.file.length>0?tags.goods.file[0].url:''" mode=""></image>
 												</view>
 												<view class="goodsname">
 													{{tags.goods.name}}
@@ -56,22 +53,15 @@
 										<text>总价¥{{item.total_detail.goods_total}}</text>
 									</view>
 									<view class="btn">
-										<button v-if="item.status=='0'" type="default" size="mini"
-											@tap.stop="toCancel(item)">取消订单</button>
-										<button class="toPay" v-if="item.status=='0'" type="default" size="mini"
-											@tap.stop="toPay(item)">付款</button>
-										<button v-if="item.status=='2'" type="default" size="mini"
-											@tap.stop="toConfirm(item)">确认收货</button>
-										<button v-if="item.status!='0'" type="default" size="mini"
-											@tap.stop="toAfter(item)">申请售后</button>
-										<button v-if="item.status=='3'&&!item.rate" type="default" size="mini"
-											@tap.stop="toAppraise(item)">立即评价</button>
-										<button v-if="item.status=='3'&&item.rate" type="default" size="mini"
-											@tap.stop="toAppraise(item)">追加评价</button>
+										<button v-if="item.status=='0'" type="default" size="mini" @tap.stop="toCancel(item)">取消订单</button>
+										<button class="toPay" v-if="item.status=='0'" type="default" size="mini" @tap.stop="toPay(item)">付款</button>
+										<button v-if="item.status=='2'" type="default" size="mini" @tap.stop="toConfirm(item)">确认收货</button>
+										<button v-if="item.status!='0'" type="default" size="mini" @tap.stop="toAfter(item)">申请售后</button>
+										<button v-if="item.status=='3'&&!item.rate" type="default" size="mini" @tap.stop="toAppraise(item)">立即评价</button>
+										<button v-if="item.status=='3'&&item.rate" type="default" size="mini" @tap.stop="toAppraise(item)">追加评价</button>
 									</view>
 								</view>
-								<view class="list_2 list_3" v-for="(item,index) in list" :key="index"
-									@tap="toInfo(item)" v-else>
+								<view class="list_2 list_3" v-for="(item,index) in list" :key="index" @tap="toInfo(item)" v-else>
 									<view class="list_3_1">
 										<view class="goods_1">
 											<view class="shopname">
@@ -114,20 +104,13 @@
 										<text>总价¥{{item.real_pay}}</text>
 									</view>
 									<view class="btn">
-										<button v-if="item.status=='2'||item.status=='3'" type="default" size="mini"
-											@tap.stop="toLogi(item)">查看物流</button>
-										<button v-if="item.status=='0'" type="default" size="mini"
-											@tap.stop="toCancel(item)">取消订单</button>
-										<button class="toPay" v-if="item.status=='0'" type="default" size="mini"
-											@tap.stop="toPay(item)">付款</button>
-										<button v-if="item.status=='2'" type="default" size="mini"
-											@tap.stop="toConfirm(item)">确认收货</button>
-										<button v-if="item.status!='0'" type="default" size="mini"
-											@tap.stop="toAfter(item)">申请售后</button>
-										<button v-if="item.status=='3'&&!item.rate" type="default" size="mini"
-											@tap.stop="toAppraise(item)">立即评价</button>
-										<button v-if="item.status=='3'&&item.rate" type="default" size="mini"
-											@tap.stop="toAppraise(item)">追加评价</button>
+										<button v-if="item.status=='2'||item.status=='3'" type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
+										<button v-if="item.status=='0'" type="default" size="mini" @tap.stop="toCancel(item)">取消订单</button>
+										<button class="toPay" v-if="item.status=='0'" type="default" size="mini" @tap.stop="toPay(item)">付款</button>
+										<button v-if="item.status=='2'" type="default" size="mini" @tap.stop="toConfirm(item)">确认收货</button>
+										<button v-if="item.status!='0'" type="default" size="mini" @tap.stop="toAfter(item)">申请售后</button>
+										<button v-if="item.status=='3'&&!item.rate" type="default" size="mini" @tap.stop="toAppraise(item)">立即评价</button>
+										<button v-if="item.status=='3'&&item.rate" type="default" size="mini" @tap.stop="toAppraise(item)">追加评价</button>
 									</view>
 								</view>
 								<view class="is_bottom" v-if="is_bottom">
@@ -187,7 +170,7 @@
 				list: [],
 				total: 0,
 				skip: 0,
-				limit: 5,
+				limit: 6,
 				page: 0,
 				// 数据是否触底
 				is_bottom: false,
@@ -200,7 +183,13 @@
 			that.searchConfig();
 			// 监听用户是否登录
 			that.watchLogin();
-			
+
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -465,19 +454,11 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
 		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
-		}
+
 	}
 </script>
 

+ 26 - 25
pagesMy/order/noService.vue

@@ -8,8 +8,7 @@
 					</view>
 					<view class="list_2">
 						<view class="l">
-							<image class="image"
-								:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''" mode="">
+							<image class="image" :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''" mode="">
 							</image>
 						</view>
 						<view class="c">
@@ -76,28 +75,6 @@
 			that.watchLogin();
 		},
 		methods: {
-			// 提交保存
-			async onSubmit(ref) {
-				const that = this;
-				that.$refs[ref].validate().then(async params => {
-					params.order_detail = that.id
-					const arr = await that.$api(`/afterSale/orderCancel`, 'POST', params);
-					if (arr.errcode == '0') {
-						uni.showToast({
-							title: `申请售后成功`,
-							icon: 'success',
-						});
-						uni.navigateBack({
-							detail: 1
-						})
-					} else {
-						uni.showToast({
-							title: arr.errmsg,
-							icon: 'none',
-						})
-					}
-				})
-			},
 			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
@@ -123,6 +100,29 @@
 					}
 				})
 			},
+			// 提交保存
+			async onSubmit(ref) {
+				const that = this;
+				that.$refs[ref].validate().then(async params => {
+					params.order_detail = that.id
+					const arr = await that.$api(`/afterSale/orderCancel`, 'POST', params);
+					if (arr.errcode == '0') {
+						uni.showToast({
+							title: `申请售后成功`,
+							icon: 'success',
+						});
+						uni.navigateBack({
+							detail: 1
+						})
+					} else {
+						uni.showToast({
+							title: arr.errmsg,
+							icon: 'none',
+						})
+					}
+				})
+			}
+
 		}
 	}
 </script>
@@ -163,7 +163,8 @@
 					.c {
 						width: 50vw;
 						padding: 0 2vw;
-						.specs{
+
+						.specs {
 							color: var(--f85Color);
 							font-size: var(--font12Size);
 						}

+ 49 - 51
pagesMy/order/service.vue

@@ -8,8 +8,7 @@
 					</view>
 					<view class="list_2">
 						<view class="l">
-							<image class="image"
-								:src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''" mode="">
+							<image class="image" :src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''" mode="">
 							</image>
 						</view>
 						<view class="c">
@@ -42,8 +41,7 @@
 			<view class="two">
 				<uni-forms ref="form" :rules="rules" :model="form" label-width="auto">
 					<uni-forms-item label="退款商品" name="goods_id">
-						<picker class="picker" mode="selector" :range="goodsList" @change="goodsChange"
-							range-key="name">
+						<picker class="picker" mode="selector" :range="goodsList" @change="goodsChange" range-key="name">
 							<view>{{form.goods_name||'请选择退款商品'}}</view>
 						</picker>
 					</uni-forms-item>
@@ -59,8 +57,7 @@
 						</view>
 					</uni-forms-item>
 					<uni-forms-item label="申请理由" name="reason">
-						<picker class="picker" mode="selector" :range="reasonList" @change="reasonChange"
-							range-key="label">
+						<picker class="picker" mode="selector" :range="reasonList" @change="reasonChange" range-key="label">
 							<view>{{form.reason_name||'请选择申请理由'}}</view>
 						</picker>
 					</uni-forms-item>
@@ -89,7 +86,7 @@
 			return {
 				id: '',
 				// 订单类型
-				type:'',
+				type: '',
 				user: {},
 				// 商品详情
 				info: {},
@@ -134,6 +131,48 @@
 			await that.watchLogin();
 		},
 		methods: {
+			// 监听用户是否登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: async function(res) {
+						let user = that.$jwt(res.data);
+						if (user) {
+							that.$set(that, `user`, user);
+							if (that.id) {
+								let arr = await that.$api(`/orderDetail/${that.id}`, 'GET')
+								if (arr.errcode == '0') {
+									that.$set(that, `goodsList`, arr.data.goods)
+									that.$set(that, `type`, arr.data.type)
+								}
+							}
+						}
+					},
+					fail: function(err) {
+						uni.reLaunch({
+							url: '/pages/login/index'
+						})
+					}
+				})
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_type"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `typeList`, res.data)
+				}
+				res = await that.$api(`/dictData`, 'GET', {
+					code: "afterSale_reason"
+				});
+				if (res.errcode == '0') {
+					that.$set(that, `reasonList`, res.data)
+				}
+			},
 			// 退款金额
 			toMoney(value) {
 				const that = this;
@@ -252,49 +291,7 @@
 						}
 					}
 				})
-			},
-			// 查询其他信息
-			async searchOther() {
-				const that = this;
-				let res;
-				res = await that.$api(`/dictData`, 'GET', {
-					code: "afterSale_type"
-				});
-				if (res.errcode == '0') {
-					that.$set(that, `typeList`, res.data)
-				}
-				res = await that.$api(`/dictData`, 'GET', {
-					code: "afterSale_reason"
-				});
-				if (res.errcode == '0') {
-					that.$set(that, `reasonList`, res.data)
-				}
-			},
-			// 监听用户是否登录
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: async function(res) {
-						let user = that.$jwt(res.data);
-						if (user) {
-							that.$set(that, `user`, user);
-							if (that.id) {
-								let arr = await that.$api(`/orderDetail/${that.id}`, 'GET')
-								if (arr.errcode == '0') {
-									that.$set(that, `goodsList`, arr.data.goods)
-									that.$set(that, `type`, arr.data.type)
-								}
-							}
-						}
-					},
-					fail: function(err) {
-						uni.reLaunch({
-							url: '/pages/login/index'
-						})
-					}
-				})
-			},
+			}
 		}
 	}
 </script>
@@ -335,7 +332,8 @@
 					.c {
 						width: 50vw;
 						padding: 0 2vw;
-						.specs{
+
+						.specs {
 							color: var(--f85Color);
 							font-size: var(--font12Size);
 						}

+ 1 - 1
pagesRest/activity/info.vue

@@ -56,7 +56,7 @@
 		},
 		onLoad: async function(e) {
 			const that = this;
-			that.$set(that, `id`, e.id || '634fa595e4ed552882f05a6f');
+			that.$set(that, `id`, e.id || '');
 			that.searchConfig();
 			await that.searchAct();
 			await that.configShare();

+ 13 - 17
pagesRest/activity/list.vue

@@ -50,8 +50,12 @@
 			const that = this;
 			that.searchConfig();
 			that.search();
-			// 下拉刷新
-			
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			// 查询基本设置
@@ -116,6 +120,12 @@
 				that.clearPage();
 				that.search();
 			},
+			toInfo(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/pagesRest/activity/info?id=${e._id}`
+				})
+			},
 			// 清空列表
 			clearPage() {
 				const that = this;
@@ -123,23 +133,9 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
-			},
-			toInfo(e) {
-				const that = this;
-				uni.navigateTo({
-					url: `/pagesRest/activity/info?id=${e._id}`
-				})
 			}
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
 		}
+
 	}
 </script>
 

+ 15 - 9
pagesRest/recom/index.vue

@@ -61,6 +61,12 @@
 			that.searchOther();
 			that.search();
 		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage()
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -153,16 +159,16 @@
 					url: `/pagesHome/order/detail?id=${e._id}`
 				})
 			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			}
 		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.$set(that, `list`, [])
-			that.$set(that, `skip`, 0)
-			that.$set(that, `limit`, 6)
-			that.$set(that, `page`, 0)
-			await that.search();
-			uni.stopPullDownRefresh();
-		}
+
 	}
 </script>
 

BIN=BIN
static/market.png


BIN=BIN
static/market_1.png


BIN=BIN
static/my.png


BIN=BIN
static/my_1.png


BIN=BIN
static/no.png


BIN=BIN
static/shouye.png


BIN=BIN
static/shouye_1.png


BIN=BIN
static/store.png


BIN=BIN
static/store_1.png


BIN=BIN
static/type.png


BIN=BIN
static/type_1.png


BIN=BIN
static/week.png


BIN=BIN
static/week_1.png


+ 0 - 15
uni.scss

@@ -1,18 +1,3 @@
-/**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
-
-/**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
-
-/* 颜色变量 */
 
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;