Blame view

src/pages/user/user.vue 8.01 KB
0db291810   BigBoss   “-mcomfirmOder页面
1
  <template>
fb85b244c   BigBoss   user页面
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  	<view class="wrap">
  		<view class="content">
  			<view class="userInfo">
  				<view class="info">
  					<image src="../../static/img/detail/d10.png" mode="aspectFill"></image>
  					<view class="infoText">
  						<text class="userName">{{userName}}</text>
  						<text class="nickName">用户名:骆驼不死的祥子</text>
  					</view>
  				</view>
  				<view class="service">
  					<image src="../../static/serviceLogo.png" mode="aspectFill"></image>
  				</view>
  			</view>
  			<view class="myOrder">
  				<view class="orderHeader">
  					<text>全部订单</text>
72a08fa45   BigBoss   icon
19
  					<view class="btn" @click="toMyOrder">
fb85b244c   BigBoss   user页面
20
21
22
23
24
  						全部
  						<image src="../../static/right.png" mode="aspectFill"></image>
  					</view>
  				</view>
  				<view class="orderBody">
ab4209caf   喻鹏   update
25
26
  					<view class="item waitPay" @click="toMyOrderPaying">
  						<image src="../../static/waitDeliver.png" mode="aspectFill"></image>
fb85b244c   BigBoss   user页面
27
28
  						<text>待付款</text>
  					</view>
ab4209caf   喻鹏   update
29
  					<view class="item waitDeliver" @click="toPredelivery" >
db5b5fe00   喻鹏   "修改样式细节"
30
  						<image src="../../static/waitPay.png" mode="aspectFill"></image>
fb85b244c   BigBoss   user页面
31
32
  						<text>待发货</text>
  					</view>
ab4209caf   喻鹏   update
33
  					<view class="item waitReceive" @click="torefunProgress">
fb85b244c   BigBoss   user页面
34
35
36
  						<image src="../../static/waitReceive.png" mode="aspectFill"></image>
  						<text>待收货</text>
  					</view>
ab4209caf   喻鹏   update
37
  					<view class="item service" @click="torefundment">
fb85b244c   BigBoss   user页面
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  						<image src="../../static/service.png" mode="aspectFill"></image>
  						<text>退换/售后</text>
  					</view>
  				</view>
  			</view>
  			<view class="recommend">
  				<view class="title">
  					<view class="line"></view>
  					<view class="text">精选推荐</view>
  					<view class="line"></view>
  				</view>
  				<!-- 商品列表 -->
  				<view class="goods-list">
  					<view class="product-list">
  						<view class="product" v-for="(goods) in goodsList" :key="goods.goods_id" @tap="toGoods(goods.goods_id)">
  							<Card :goods = "goods"></Card>
  						</view>
  					</view>
  					<view class="loading-text">{{loadingText}}</view>
  				</view>
  			</view>
0db291810   BigBoss   “-mcomfirmOder页面
59
  		</view>
fb85b244c   BigBoss   user页面
60
  		
0db291810   BigBoss   “-mcomfirmOder页面
61
62
63
64
  	</view>
  </template>
  
  <script>
db5b5fe00   喻鹏   "修改样式细节"
65
66
  	import Card from "@/components/CommodityCard/CommodityCard.vue";
  	import store from '@/store';
0db291810   BigBoss   “-mcomfirmOder页面
67
  	export default {
fb85b244c   BigBoss   user页面
68
69
70
  		components: {
  			'Card':Card
  			},
0db291810   BigBoss   “-mcomfirmOder页面
71
72
  		data() {
  			return {
fb85b244c   BigBoss   user页面
73
74
75
  				
  				//商品数据
  				goodsList:[
ab4209caf   喻鹏   update
76
  					{ goods_id: 0, img: "/static/img/goods/p1.jpg", name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
fb85b244c   BigBoss   user页面
77
78
79
80
81
82
83
84
85
86
87
88
  					{ goods_id: 1, img: '/static/img/goods/p2.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 2, img: '/static/img/goods/p3.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 3, img: '/static/img/goods/p4.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 4, img: '/static/img/goods/p5.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 5, img: '/static/img/goods/p6.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 6, img: '/static/img/goods/p7.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 7, img: '/static/img/goods/p8.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 8, img: '/static/img/goods/p9.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' },
  					{ goods_id: 9, img: '/static/img/goods/p10.jpg', name: '商品名称',originCost:'¥198',price: '¥168', slogan:'1235人浏览' }
  				],
  				headerphoto:'',
  				userName:'Adam'
0db291810   BigBoss   “-mcomfirmOder页面
89
90
  			}
  		},
db5b5fe00   喻鹏   "修改样式细节"
91
92
93
94
95
96
97
98
99
100
  		onLoad: function() {
  			store.dispatch('userRecommand/getRecommandList', {
  				uid: 2,
  			});
  		},
  		computed: {
  			userRecommandList() {
  				console.log('recommandList', this.$store.state.userRecommand.recommandList);
  				return this.$store.state.userRecommand.recommandList;
  			}
0db291810   BigBoss   “-mcomfirmOder页面
101
102
  		},
  		methods: {
72a08fa45   BigBoss   icon
103
104
105
106
107
108
109
  			toMyOrder(){
  				uni.navigateTo({
  					url: '../myOrder/myOrder',
  					success: res => {},
  					fail: () => {},
  					complete: () => {}
  				});
066667dc4   BigBoss   add refundProgress
110
111
112
  			},
  			toPredelivery(){
  				uni.navigateTo({
ab4209caf   喻鹏   update
113
  					url: '../predelivery/predelivery',
066667dc4   BigBoss   add refundProgress
114
115
116
117
118
119
120
  					success: res => {},
  					fail: () => {},
  					complete: () => {}
  				});
  			},
  			toMyOrderPaying(){
  				uni.navigateTo({
ab4209caf   喻鹏   update
121
  					url: '../myorderPaying/myorderPaying',
066667dc4   BigBoss   add refundProgress
122
123
124
125
  					success: res => {},
  					fail: () => {},
  					complete: () => {}
  				});
ab4209caf   喻鹏   update
126
127
128
129
130
131
132
133
134
135
  			},
  			torefundment(){
  				uni.navigateTo({
  					url:'../refundment/refundment',
  				})
  			},
  			torefunProgress(){
  				uni.navigateTo({
  					url:'../refundProgress/refundProgress'
  				})
72a08fa45   BigBoss   icon
136
  			}
0db291810   BigBoss   “-mcomfirmOder页面
137
138
139
140
  		}
  	}
  </script>
  
fb85b244c   BigBoss   user页面
141
142
143
144
145
146
  <style lang="scss">
  	.warp{
  		font-size: 24rpx;
  		background-color: #f2f2f2;
  		height: 100vh;
  	}
0db291810   BigBoss   “-mcomfirmOder页面
147
148
149
150
151
  	.content {
  		display: flex;
  		flex-direction: column;
  		align-items: center;
  		justify-content: center;
fb85b244c   BigBoss   user页面
152
  		background-color: #F2F2F2;
0db291810   BigBoss   “-mcomfirmOder页面
153
  	}
fb85b244c   BigBoss   user页面
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
  	.userInfo{
  		background-image: linear-gradient(270deg, #FFA481 0%, #FF6B4A 66%);
  		width: 100%;
  		height: 240rpx;
  		color: #FFFFFF;
  		padding: 60rpx 82rpx 80rpx 44rpx;
  		box-sizing: border-box;
  		display: flex;
  		flex-direction: row;
  		justify-content: space-between;
  		align-items: flex-start;
  		.info{
  			display: flex;
  			flex-direction: row;
  			justify-content: space-between;
  			align-items: center;
  			image{
  				border-radius: 50rpx;
  				height: 100rpx ;
  				width: 100rpx;
  				margin-right: 40rpx;
  			}
  			.infoText{
  				display: flex;
  				flex-direction: column;
  				justify-content: space-between;
  				align-items: flex-scetart;
  				.userName{
  					font-size: 18px;
  					color: #FFFFFF;
  					margin-bottom: 8rpx;
  				}
  				.nickName{
  					font-size: 12px;
  					color: #FFFFFF;
  				}
  			}
  		}
  		.service{
  			image{
  				height: 36rpx;
  				width: 36rpx;
  			}
  		}
0db291810   BigBoss   “-mcomfirmOder页面
198
  	}
fb85b244c   BigBoss   user页面
199
200
201
202
203
204
205
  	.myOrder{
  		width: 100%;
  		height: 296rpx;
  		margin-top: 20rpx;
  		margin-bottom: 20rpx;
  		padding: 0 40rpx;
  		box-sizing: border-box;
9ff2df1bf   范牧   文件名称规范
206
207
208
  		background: #FFFFFF;
  		box-shadow: 0 0 4px 0 rgba(133,107,107,0.10);
  		border-radius: 6px;
fb85b244c   BigBoss   user页面
209
  		border-radius: 6px;
0db291810   BigBoss   “-mcomfirmOder页面
210
  		display: flex;
fb85b244c   BigBoss   user页面
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
  		flex-direction: column;
  		justify-content: space-around;
  		align-items: center;
  		.orderHeader{
  			width: 100%;
  			height: 100rpx;
  			display: flex;
  			flex-direction: row;
  			justify-content: space-between;
  			align-items: center;
  			border-bottom: 1px solid #E9E9E9;;
  			font-weight: bold;
  			font-size: 18px;
  			color: #333333;
  			.btn{
  				font-size: 12px;
  				color: #999999;
  				image{
  					margin-left: 20rpx;
  					height: 16rpx;
  					width: 8rpx;
  				}
  			}
  		}
  		.orderBody{
  			width: 100%;
  			display: flex;
  			flex-direction: row;
  			justify-content: space-between;
  			align-items: center;
  			.item{
  				display: flex;
  				flex-direction: column;
  				align-items: center;
  				image{
  					width: 46rpx;
  					height: 46rpx;
  				}
  				text{
  					margin-top: 24rpx;
9ff2df1bf   范牧   文件名称规范
251
  					font-size: 12px;
fb85b244c   BigBoss   user页面
252
253
254
255
  					color: #333333;
  				}
  			}
  		}
0db291810   BigBoss   “-mcomfirmOder页面
256
  	}
fb85b244c   BigBoss   user页面
257
258
259
260
261
  	.recommend{
  		background: #FFFFFF;
  		box-shadow: 0 0 4px 0 rgba(133,107,107,0.10);
  		border-radius: 6px;
  		border-radius: 6px;
ab4209caf   喻鹏   update
262
  		width: 100%;
fb85b244c   BigBoss   user页面
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
  		.title{
  			display: flex;
  			flex-direction: row;
  			align-items: center;
  			justify-content: space-between;
  			padding: 20rpx 40rpx;
  			.line{
  				width: 264rpx;
  				height: 1rpx;
  				border-bottom: 1px solid #EAEAEA;
  			}
  			.text{
  				font-family: PingFangSC-Medium;
  				font-size: 14px;
  				color: #333333;
  				letter-spacing: -0.26px;
  				text-align: justify;
  				line-height: 24px;
  			}
  		}
  		.goods-list{
  			.loading-text{
  				width: 100%;
  				display: flex;
  				justify-content: center;
  				align-items: center;
  				height: 30px;
  				color: #979797;
  				font-size: 12px;
  			}
  			.product-list{
  				width: 92%;
  				padding: 0 4% 3vw 4%; 
  				display: flex;
  				justify-content: space-between;
  				flex-wrap: wrap;
  				.product{
  					width: 48%;
  					margin: 0 0 20rpx 0;
9ff2df1bf   范牧   文件名称规范
302
  					background: #FFFFFF;
fb85b244c   BigBoss   user页面
303
304
305
306
  					border: 1px solid #F2F2F2;
  				}
  			}
  		}
0db291810   BigBoss   “-mcomfirmOder页面
307
  	}
fb85b244c   BigBoss   user页面
308
  
9ff2df1bf   范牧   文件名称规范
309
  </style>