guhongwei 2 лет назад
Родитель
Сommit
15e6edf462
4 измененных файлов с 36 добавлено и 150 удалено
  1. 2 2
      pages/home/index.vue
  2. 12 11
      pages/my/index.vue
  3. 13 2
      pagesHome/market/type.vue
  4. 9 135
      pagesMy/order/index.vue

+ 2 - 2
pages/home/index.vue

@@ -170,12 +170,12 @@
 				let res;
 				// 轮播图
 				res = await that.$api(`/banner`, 'GET', {
-					is_use: '0'
+					status: '0'
 				});
 				if (res.errcode == '0') that.$set(that, `bannerList`, res.data);
 				// 首页模块管理
 				res = await that.$api(`/indexModule`, 'GET', {
-					is_use: '0'
+					status: '0'
 				});
 				if (res.errcode == '0') {
 					let data = res.data.sort(function(a, b) {

+ 12 - 11
pages/my/index.vue

@@ -28,10 +28,10 @@
 			<view class="two">
 				<view class="two_1">
 					<view class="title">我的订单</view>
-					<view class="title">
-						<text @click="toOrder({route:'pagesMy/order/index',type:'order',status:'0'})">全部订单</text>
+					<!-- 	<view class="title">
+						<text @click="toOrder({route:'pagesMy/order/index',type:'order',status:'-0'})">全部订单</text>
 						<text class="iconfont icon-jiantouyou"></text>
-					</view>
+					</view> -->
 				</view>
 				<view class="two_2">
 					<view class="orderList" v-for="(item, index) in orderList" :key="index" @click="toOrder(item)">
@@ -69,29 +69,29 @@
 				orderList: [ //订单列表
 					{
 						icon: 'icon-daifukuan',
-						title: '待付款',
-						status: '1',
+						title: '全部订单',
+						status: '-0',
 						type: 'order',
 						route: "pagesMy/order/index",
 					},
 					{
-						icon: 'icon-daifahuo',
+						icon: 'icon-daifukuan',
 						title: '待发货',
-						status: '2',
+						status: '0',
 						type: 'order',
 						route: "pagesMy/order/index",
 					},
 					{
 						icon: 'icon-daishouhuo',
-						title: '待收货/消费',
-						status: '3',
+						title: '邮寄中',
+						status: '1',
 						type: 'order',
 						route: "pagesMy/order/index",
 					},
 					{
 						icon: 'icon-daipinglun',
-						title: '待评论',
-						status: '4',
+						title: '已收货',
+						status: '2',
 						type: 'order',
 						route: "pagesMy/order/index",
 					},
@@ -280,6 +280,7 @@
 				padding: 4vw;
 				background-color: var(--mainColor);
 				margin: 0 0 0.1vw 0;
+				border-bottom: 1px solid var(--f1Color);
 
 				.title {
 					font-size: var(--font16Szie);

+ 13 - 2
pagesHome/market/type.vue

@@ -9,7 +9,7 @@
 					<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)">
-								<text>{{item.name}}</text>
+								<text>{{item.label}}</text>
 							</view>
 						</view>
 					</scroll-view>
@@ -124,8 +124,19 @@
 
 			};
 		},
-		onShow: function() {},
+		onShow: function() {
+			const that = this;
+			that.searchOther()
+		},
 		methods: {
+			async searchOther() {
+				const that = this;
+				let res;
+				res = await that.$api(`/goodsTags`, 'GET', {
+					status: '0'
+				})
+				if (res.errcode == '0') that.$set(that, `typeList`, res.data);
+			},
 			toChange(index, e) {
 				const that = this;
 				that.$set(that, `active`, index)

+ 9 - 135
pagesMy/order/index.vue

@@ -49,64 +49,8 @@
 							</view>
 						</scroll-view>
 					</view>
-					<!-- 		<view v-show="tabs.active=='0'">全部</view>
-					<view v-show="tabs.active=='1'">待付款</view>
-					<view v-show="tabs.active=='2'">待发货</view>
-					<view v-show="tabs.active=='3'">待收货/消费</view>
-					<view v-show="tabs.active=='4'">待评价</view> -->
 				</tabs>
 			</view>
-			<!-- 	<view class="one">
-				<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索商品">
-			</view>
-			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-					<view class="list-scroll-view">
-						<view class="two_1">
-						
-						</view>
-						<view class="two_2">
-							<view class="list" v-for="(item,index) in list" :key="index">
-								<view class="list_1">
-									<view class="name">
-										<text @click="toDel(item)" class="iconfont icon-shangdian"></text>
-										<text>{{item.shop}}</text>
-									</view>
-									<view class="status">{{item.status=='0'?'待付款':'已付款'}}</view>
-								</view>
-								<view class="list_2">
-									<image class="image" :src="item.url" mode=""></image>
-									<view class="other">
-										<view class="name">{{item.name}}</view>
-										<view class="other_1">
-											口味: {{item.num||'暂无'}}
-										</view>
-									</view>
-									<view class="money">
-										<text>¥</text>
-										<text>{{item.money}}</text>
-										<view class="num">
-											×{{item.num}}
-										</view>
-									</view>
-								</view>
-								<view class="list_3">
-									<text>共{{item.num}}件商品</text>
-									<view class="money">
-										<text>总价¥</text>
-										<text>{{item.money}}</text>
-									</view>
-								</view>
-								<view class="list_4">
-									<button type="default" size="mini" plain="true"
-										@click="toCancel(item)">取消订单</button>
-									<button type="warn" size="mini" plain="true" @click="toPay(item)">付款</button>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view> -->
 		</view>
 	</mobile-frame>
 </template>
@@ -120,30 +64,26 @@
 		data() {
 			return {
 				user: {},
-				status: '0',
+				status: '',
 				searchInfo: {},
 				tabs: {
-					active: '0',
+					active: '-0',
 					menu: [ //菜单列表
 						{
-							title: '全部',
-							active: '0'
-						},
-						{
-							title: '待付款',
-							active: '1'
+							title: '全部订单',
+							active: '-0'
 						},
 						{
 							title: '待发货',
-							active: '2'
+							active: '0'
 						},
 						{
-							title: '待收货/消费',
-							active: '3'
+							title: '邮寄中',
+							active: '1'
 						},
 						{
-							title: '待评价',
-							active: '4'
+							title: '已收货',
+							active: '2'
 						}
 					]
 				},
@@ -161,71 +101,6 @@
 						buy_num: 1,
 						market_num: 1,
 						money: 58
-					}, {
-						shop: '官方自营店',
-						status: '1',
-						url: [{
-							name: "20220928155634.jpg",
-							uri: "/files/point/20220928155634.jpg",
-							url: "https://broadcast.waityou24.cn/files/point/20220928155634.jpg"
-						}],
-						name: '饮用水',
-						price: 58,
-						buy_num: 1,
-						market_num: 1,
-						money: 58
-					}, {
-						shop: '官方自营店',
-						status: '1',
-						url: [{
-							name: "20220928155634.jpg",
-							uri: "/files/point/20220928155634.jpg",
-							url: "https://broadcast.waityou24.cn/files/point/20220928155634.jpg"
-						}],
-						name: '饮用水',
-						price: 58,
-						buy_num: 1,
-						market_num: 1,
-						money: 58
-					}, {
-						shop: '官方自营店',
-						status: '1',
-						url: [{
-							name: "20220928155634.jpg",
-							uri: "/files/point/20220928155634.jpg",
-							url: "https://broadcast.waityou24.cn/files/point/20220928155634.jpg"
-						}],
-						name: '饮用水饮用水饮用水饮用水饮用水饮用水饮用水饮用水饮用水饮用水饮用水',
-						price: 58,
-						buy_num: 1,
-						market_num: 1,
-						money: 58
-					}, {
-						shop: '官方自营店',
-						status: '1',
-						url: [{
-							name: "20220928155634.jpg",
-							uri: "/files/point/20220928155634.jpg",
-							url: "https://broadcast.waityou24.cn/files/point/20220928155634.jpg"
-						}],
-						name: '饮用水',
-						price: 58,
-						buy_num: 1,
-						market_num: 1,
-						money: 58
-					}, {
-						shop: '官方自营店',
-						status: '1',
-						url: [{
-							name: "20220928155634.jpg",
-							uri: "/files/point/20220928155634.jpg",
-							url: "https://broadcast.waityou24.cn/files/point/20220928155634.jpg"
-						}],
-						name: '饮用水',
-						price: 58,
-						buy_num: 1,
-						market_num: 1,
-						money: 58
 					}
 				]
 
@@ -233,7 +108,6 @@
 		},
 		onLoad: function(e) {
 			const that = this;
-
 			that.$set(that, `status`, e.status);
 			// 监听用户是否登录
 			that.watchLogin();