正在显示
9 个修改的文件
包含
324 行增加
和
29 行删除
@@ -4,10 +4,14 @@ | @@ -4,10 +4,14 @@ | ||
4 | export default { | 4 | export default { |
5 | onLaunch: function(e) { | 5 | onLaunch: function(e) { |
6 | const openId = uni.getStorageSync('openId') | 6 | const openId = uni.getStorageSync('openId') |
7 | + console.log(openId); | ||
7 | if(!openId && !e.query.code){ | 8 | if(!openId && !e.query.code){ |
8 | - getApp().authorization() | 9 | + console.log(!openId , !e.query.code); |
10 | + console.log(1) | ||
11 | + // getApp().authorization() | ||
9 | }else if(e.query.code) { | 12 | }else if(e.query.code) { |
10 | - getApp().getOpenid(e.query.code) | 13 | + // getApp().getOpenid(e.query.code) |
14 | + console.log(2) | ||
11 | } | 15 | } |
12 | console.log(e.query.code); | 16 | console.log(e.query.code); |
13 | console.log('App Launch') | 17 | console.log('App Launch') |
@@ -17,4 +17,7 @@ export const order_confirm = (data) => request({url: 'order/order_confirm',metho | @@ -17,4 +17,7 @@ export const order_confirm = (data) => request({url: 'order/order_confirm',metho | ||
17 | export const order_send = (order_id) => request({url: 'order/order_send',method: 'post',data: {order_id}}) | 17 | export const order_send = (order_id) => request({url: 'order/order_send',method: 'post',data: {order_id}}) |
18 | 18 | ||
19 | // 卖家上传证明 | 19 | // 卖家上传证明 |
20 | -export const order_license = (data) => request({url: 'order/order_license',method: 'post',data: data}) | ||
20 | +export const order_license = (data) => request({url: 'order/order_license',method: 'post',data: data}) | ||
21 | + | ||
22 | +// 订单详情 | ||
23 | +export const order_detail = (order_id) => request({url: 'order/order_detail',method: 'post',data: {order_id}}) |
@@ -198,6 +198,15 @@ | @@ -198,6 +198,15 @@ | ||
198 | } | 198 | } |
199 | 199 | ||
200 | } | 200 | } |
201 | + ,{ | ||
202 | + "path" : "pages/mine/order_detail", | ||
203 | + "style" : | ||
204 | + { | ||
205 | + "navigationBarTitleText": "进度详情", | ||
206 | + "enablePullDownRefresh": false | ||
207 | + } | ||
208 | + | ||
209 | + } | ||
201 | ], | 210 | ], |
202 | "globalStyle": { | 211 | "globalStyle": { |
203 | "navigationBarTextStyle": "black", | 212 | "navigationBarTextStyle": "black", |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <u-tabs :list="list2" lineColor="#FED000" :scrollable="false" @click="onclick"></u-tabs> | 5 | <u-tabs :list="list2" lineColor="#FED000" :scrollable="false" @click="onclick"></u-tabs> |
6 | </u-sticky> | 6 | </u-sticky> |
7 | <view class="group"> | 7 | <view class="group"> |
8 | - <view class="item" v-for="(item,idx) in showlist" :key="idx"> | 8 | + <view class="item" v-for="(item,idx) in showlist" :key="idx" @click.stop="ondetail(item.id)"> |
9 | <view class="top flexA"> | 9 | <view class="top flexA"> |
10 | <view class="left flexA"> | 10 | <view class="left flexA"> |
11 | <image src="/static/order.png" mode=""></image> | 11 | <image src="/static/order.png" mode=""></image> |
@@ -34,14 +34,19 @@ | @@ -34,14 +34,19 @@ | ||
34 | </view> | 34 | </view> |
35 | <view class="right"> | 35 | <view class="right"> |
36 | <text style="font-size: 20rpx;">¥</text>{{item.orderinfo.price}} | 36 | <text style="font-size: 20rpx;">¥</text>{{item.orderinfo.price}} |
37 | + <view class="staright"> | ||
38 | + <text v-if="item.status==5">审核中</text> | ||
39 | + <text v-if="item.status==7">已退回</text> | ||
40 | + </view> | ||
37 | </view> | 41 | </view> |
38 | </view> | 42 | </view> |
39 | <view class="line"></view> | 43 | <view class="line"></view> |
40 | <view class="botBtn flexA"> | 44 | <view class="botBtn flexA"> |
41 | - <view v-if="item.license_preview" class="flexC yellow" @click="openshow(item.license_preview)">交易证明 | 45 | + <view v-if="item.license_preview" class="flexC yellow" |
46 | + @click.stop="openshow(item.id,idx,item.license_preview,item.status)">交易证明 | ||
42 | </view> | 47 | </view> |
43 | - <view v-if="reChest(item.status)" class="flexC" @click="order_confirm(item.id,idx,1)">已收货</view> | ||
44 | - <view v-if="reChest(item.status)" class="flexC" @click="order_confirm(item.id,idx,2)" >未收货</view> | 48 | + <view v-if="reChest(item.status)" class="flexC" @click.stop="order_confirm(item.id,idx,1)">已收货</view> |
49 | + <view v-if="reChest(item.status)" class="flexC" @click.stop="order_confirm(item.id,idx,2)">未收货</view> | ||
45 | </view> | 50 | </view> |
46 | </view> | 51 | </view> |
47 | </view> | 52 | </view> |
@@ -52,8 +57,10 @@ | @@ -52,8 +57,10 @@ | ||
52 | </view> | 57 | </view> |
53 | <image class="popImage" :src="showimg" mode=""></image> | 58 | <image class="popImage" :src="showimg" mode=""></image> |
54 | <view class="popBtn flexA"> | 59 | <view class="popBtn flexA"> |
55 | - <view class="btn flexC" @click="show=false">未接收</view> | ||
56 | - <view class="btn flexC" @click="show=false">已接收</view> | 60 | + <view class="btn flexC" v-if="reChest(showstatus)" @click="order_confirm(showid,showindex,2)">未收货 |
61 | + </view> | ||
62 | + <view class="btn flexC" v-if="reChest(showstatus)" @click="order_confirm(showid,showindex,1)">已收货 | ||
63 | + </view> | ||
57 | </view> | 64 | </view> |
58 | </view> | 65 | </view> |
59 | </u-popup> | 66 | </u-popup> |
@@ -77,22 +84,31 @@ | @@ -77,22 +84,31 @@ | ||
77 | }, { | 84 | }, { |
78 | name: '已完成' | 85 | name: '已完成' |
79 | }], | 86 | }], |
80 | - show: true, | 87 | + show: false, |
81 | typeindex: 0, | 88 | typeindex: 0, |
82 | currentpage: 1, | 89 | currentpage: 1, |
83 | num: 10, | 90 | num: 10, |
84 | showlist: [], | 91 | showlist: [], |
85 | //交易证明 | 92 | //交易证明 |
93 | + showid: "", | ||
94 | + showindex: "", | ||
95 | + showstatus: "", | ||
86 | showimg: "", | 96 | showimg: "", |
87 | } | 97 | } |
88 | }, | 98 | }, |
89 | onLoad() { | 99 | onLoad() { |
90 | this.buyerOrderList() | 100 | this.buyerOrderList() |
91 | - | ||
92 | }, | 101 | }, |
93 | methods: { | 102 | methods: { |
103 | + // 跳转详情 | ||
104 | + ondetail(id) { | ||
105 | + console.log(id) | ||
106 | + uni.navigateTo({ | ||
107 | + url: "/pages/mine/order_detail?id=" + id | ||
108 | + }) | ||
109 | + }, | ||
94 | //确认收货 | 110 | //确认收货 |
95 | - async order_confirm(id,idx,type) { | 111 | + async order_confirm(id, idx, type) { |
96 | let obj = { | 112 | let obj = { |
97 | order_id: id, | 113 | order_id: id, |
98 | type: type, | 114 | type: type, |
@@ -100,16 +116,16 @@ | @@ -100,16 +116,16 @@ | ||
100 | try { | 116 | try { |
101 | const res = await order_confirm(obj) | 117 | const res = await order_confirm(obj) |
102 | console.log('order_confirm', res) | 118 | console.log('order_confirm', res) |
103 | - if(this.typeindex=2){ | ||
104 | - this.showlist.splice(idx,1) | ||
105 | - }else{ | ||
106 | - if(type==2){ | ||
107 | - this.showlist[idx].status=5 | ||
108 | - }else{ | ||
109 | - this.showlist[idx].status=6 | 119 | + this.show = false |
120 | + if (this.typeindex = 2) { | ||
121 | + this.showlist.splice(idx, 1) | ||
122 | + } else { | ||
123 | + if (type == 2) { | ||
124 | + this.showlist[idx].status = 5 | ||
125 | + } else { | ||
126 | + this.showlist[idx].status = 6 | ||
110 | } | 127 | } |
111 | } | 128 | } |
112 | - | ||
113 | // 保存数据 | 129 | // 保存数据 |
114 | } catch (err) { | 130 | } catch (err) { |
115 | uni.showToast({ | 131 | uni.showToast({ |
@@ -120,9 +136,12 @@ | @@ -120,9 +136,12 @@ | ||
120 | } | 136 | } |
121 | }, | 137 | }, |
122 | // 查看交易证明 | 138 | // 查看交易证明 |
123 | - openshow(img) { | 139 | + openshow(id, index, img, status) { |
124 | this.showimg = img | 140 | this.showimg = img |
125 | this.show = true | 141 | this.show = true |
142 | + this.showid = id | ||
143 | + this.showstatus = status | ||
144 | + this.showindex = index | ||
126 | }, | 145 | }, |
127 | //复制 | 146 | //复制 |
128 | copy(it) { | 147 | copy(it) { |
@@ -170,7 +189,7 @@ | @@ -170,7 +189,7 @@ | ||
170 | if (s == 3) return true; | 189 | if (s == 3) return true; |
171 | }, | 190 | }, |
172 | reNest(s) { | 191 | reNest(s) { |
173 | - | 192 | + |
174 | }, | 193 | }, |
175 | }, | 194 | }, |
176 | } | 195 | } |
@@ -222,6 +241,9 @@ | @@ -222,6 +241,9 @@ | ||
222 | .right { | 241 | .right { |
223 | color: rgba(0, 0, 0, 0.6); | 242 | color: rgba(0, 0, 0, 0.6); |
224 | font-size: 26rpx; | 243 | font-size: 26rpx; |
244 | + | ||
245 | + | ||
246 | + | ||
225 | } | 247 | } |
226 | } | 248 | } |
227 | 249 | ||
@@ -256,6 +278,13 @@ | @@ -256,6 +278,13 @@ | ||
256 | .right { | 278 | .right { |
257 | font-size: 30rpx; | 279 | font-size: 30rpx; |
258 | font-weight: 700; | 280 | font-weight: 700; |
281 | + .staright { | ||
282 | + margin-top: 12rpx; | ||
283 | + color: rgba(0, 0, 0, 0.3); | ||
284 | + font-size: 26rpx; | ||
285 | + font-weight: 400; | ||
286 | + font-family: "PingFang SC"; | ||
287 | + } | ||
259 | } | 288 | } |
260 | 289 | ||
261 | } | 290 | } |
@@ -293,7 +322,6 @@ | @@ -293,7 +322,6 @@ | ||
293 | padding: 48rpx 32rpx 24rpx; | 322 | padding: 48rpx 32rpx 24rpx; |
294 | box-sizing: border-box; | 323 | box-sizing: border-box; |
295 | width: 622rpx; | 324 | width: 622rpx; |
296 | - height: 962rpx; | ||
297 | background: #fff; | 325 | background: #fff; |
298 | border-radius: 15rpx; | 326 | border-radius: 15rpx; |
299 | 327 |
pages/mine/order_detail.vue
0 → 100644
1 | +<template> | ||
2 | + <view class="orderDetail"> | ||
3 | + <view class="dettop"> | ||
4 | + <view class="top flexA"> | ||
5 | + <text>{{detail.orderinfo.seller_name}}</text> | ||
6 | + <image src="/static/2.png" mode=""></image> | ||
7 | + <text>{{detail.buyer_name}}</text> | ||
8 | + </view> | ||
9 | + <view class="topbox"> | ||
10 | + <view class="boxtop flexD"> | ||
11 | + <view class="order"> | ||
12 | + 订单号:{{detail.order_no}} | ||
13 | + </view> | ||
14 | + <view class="ordstats"> | ||
15 | + <text v-if="detail.status==1">待支付</text> | ||
16 | + <text v-if="detail.status==2">待接收</text> | ||
17 | + <text v-if="detail.status==3">待买家确认</text> | ||
18 | + <text v-if="detail.status==4">已收货</text> | ||
19 | + <text v-if="detail.status==5">平台裁决</text> | ||
20 | + <text v-if="detail.status==6">已完成</text> | ||
21 | + <text v-if="detail.status==7">交易失败</text> | ||
22 | + </view> | ||
23 | + </view> | ||
24 | + <view class="item flexA"> | ||
25 | + <view class="left"> | ||
26 | + <image :src="detail.orderinfo.images_preview" mode=""></image> | ||
27 | + </view> | ||
28 | + <view class="right"> | ||
29 | + <view class="">{{detail.orderinfo.product_name}}</view> | ||
30 | + <view class="money"><text>¥</text> {{detail.orderinfo.price}}</view> | ||
31 | + </view> | ||
32 | + </view> | ||
33 | + </view> | ||
34 | + | ||
35 | + </view> | ||
36 | + <view class="express"> | ||
37 | + <view class="bar" v-for="(item,index) in expresslist" :key="index"> | ||
38 | + <view class="time"> | ||
39 | + <view>{{item.date}}</view> | ||
40 | + <view>{{item.time}}</view> | ||
41 | + </view> | ||
42 | + <view class="centers flexcolum"> | ||
43 | + <image v-if="detail.status==6" src="/static/3.png" mode=""></image> | ||
44 | + <image v-else src="/static/4.png" mode=""></image> | ||
45 | + <view class="tip"> | ||
46 | + </view> | ||
47 | + </view> | ||
48 | + <view class="contant"> | ||
49 | + {{item.name}} | ||
50 | + </view> | ||
51 | + </view> | ||
52 | + | ||
53 | + </view> | ||
54 | + </view> | ||
55 | +</template> | ||
56 | + | ||
57 | +<script> | ||
58 | + import { | ||
59 | + order_detail | ||
60 | + } from '@/api/order.js' | ||
61 | + export default { | ||
62 | + data() { | ||
63 | + return { | ||
64 | + id: '', | ||
65 | + expresslist: [], | ||
66 | + detail: { | ||
67 | + buyer_name: "", | ||
68 | + order_no: "", | ||
69 | + status: "", | ||
70 | + orderinfo: { | ||
71 | + seller_name: "", | ||
72 | + product_name: "", | ||
73 | + price: "", | ||
74 | + images_preview: "", | ||
75 | + } | ||
76 | + }, | ||
77 | + }; | ||
78 | + }, | ||
79 | + onLoad(options) { | ||
80 | + this.id = options.id | ||
81 | + this.order_detail() | ||
82 | + }, | ||
83 | + methods: { | ||
84 | + //订单详情 | ||
85 | + async order_detail() { | ||
86 | + try { | ||
87 | + const res = await order_detail(this.id) | ||
88 | + console.log('order_detail', res) | ||
89 | + this.detail = res.detail | ||
90 | + this.expresslist = res.detail.time_data | ||
91 | + // 保存数据 | ||
92 | + } catch (err) { | ||
93 | + uni.showToast({ | ||
94 | + title: err, | ||
95 | + icon: 'none' | ||
96 | + }) | ||
97 | + console.log('order_detail', err) | ||
98 | + } | ||
99 | + }, | ||
100 | + } | ||
101 | + } | ||
102 | +</script> | ||
103 | + | ||
104 | +<style lang="scss"> | ||
105 | + page { | ||
106 | + background: #f6f6f6; | ||
107 | + } | ||
108 | + | ||
109 | + .orderDetail { | ||
110 | + .dettop { | ||
111 | + height: 294rpx; | ||
112 | + opacity: 1; | ||
113 | + padding: 40rpx 32rpx; | ||
114 | + background: linear-gradient(180deg, rgba(254, 208, 0, 1) 0%, rgba(254, 208, 0, 0) 92%); | ||
115 | + | ||
116 | + .top { | ||
117 | + color: rgba(0, 0, 0, 1); | ||
118 | + font-size: 26rpx; | ||
119 | + font-weight: 400; | ||
120 | + font-family: "PingFang SC"; | ||
121 | + text-align: left; | ||
122 | + | ||
123 | + image { | ||
124 | + margin: 0 12rpx; | ||
125 | + width: 80rpx; | ||
126 | + height: 9rpx; | ||
127 | + } | ||
128 | + | ||
129 | + } | ||
130 | + | ||
131 | + .topbox { | ||
132 | + margin-top: 24rpx; | ||
133 | + border-radius: 24rpx; | ||
134 | + padding: 28rpx 32rpx; | ||
135 | + background: #ffffff; | ||
136 | + | ||
137 | + .boxtop { | ||
138 | + .order { | ||
139 | + color: rgba(0, 0, 0, 0.6); | ||
140 | + font-size: 24rpx; | ||
141 | + font-weight: 400; | ||
142 | + font-family: "PingFang SC"; | ||
143 | + } | ||
144 | + | ||
145 | + .ordstats { | ||
146 | + color: rgba(254, 208, 0, 1); | ||
147 | + font-size: 28rpx; | ||
148 | + font-weight: 500; | ||
149 | + font-family: "PingFang SC"; | ||
150 | + text-align: left; | ||
151 | + line-height: 40rpx; | ||
152 | + } | ||
153 | + } | ||
154 | + | ||
155 | + .item { | ||
156 | + margin-top: 20rpx; | ||
157 | + | ||
158 | + .left { | ||
159 | + image { | ||
160 | + margin-right: 16rpx; | ||
161 | + width: 120rpx; | ||
162 | + height: 120rpx; | ||
163 | + border-radius: 16rpx; | ||
164 | + } | ||
165 | + } | ||
166 | + | ||
167 | + .right { | ||
168 | + color: rgba(0, 0, 0, 0.9); | ||
169 | + font-size: 28rpx; | ||
170 | + font-weight: 400; | ||
171 | + font-family: "PingFang SC"; | ||
172 | + text-align: center; | ||
173 | + | ||
174 | + .money { | ||
175 | + margin-top: 32rpx; | ||
176 | + color: rgba(248, 83, 23, 1); | ||
177 | + font-size: 32rpx; | ||
178 | + font-weight: 700; | ||
179 | + font-family: "Montserrat"; | ||
180 | + | ||
181 | + text { | ||
182 | + font-size: 28rpx; | ||
183 | + } | ||
184 | + } | ||
185 | + } | ||
186 | + } | ||
187 | + | ||
188 | + } | ||
189 | + } | ||
190 | + | ||
191 | + .express { | ||
192 | + padding: 66rpx 30rpx; | ||
193 | + background-color: #ffffff; | ||
194 | + box-sizing: border-box; | ||
195 | + width: 686rpx; | ||
196 | + // height: 628rpx; | ||
197 | + border-radius: 24rpx; | ||
198 | + margin: 0 auto; | ||
199 | + | ||
200 | + .bar { | ||
201 | + display: flex; | ||
202 | + | ||
203 | + | ||
204 | + | ||
205 | + .time { | ||
206 | + color: rgba(135, 144, 153, 1); | ||
207 | + font-size: 22rpx; | ||
208 | + font-weight: 400; | ||
209 | + font-family: "PingFang SC"; | ||
210 | + } | ||
211 | + | ||
212 | + .centers { | ||
213 | + image { | ||
214 | + width: 48rpx; | ||
215 | + height: 48rpx; | ||
216 | + } | ||
217 | + | ||
218 | + .tip { | ||
219 | + height: 80rpx; | ||
220 | + width: 4rpx; | ||
221 | + background-color: #f6f6f6; | ||
222 | + } | ||
223 | + } | ||
224 | + | ||
225 | + .contant { | ||
226 | + margin-left: 8rpx; | ||
227 | + color: rgba(135, 144, 153, 1); | ||
228 | + font-size: 28rpx; | ||
229 | + font-weight: 400; | ||
230 | + font-family: "PingFang SC"; | ||
231 | + } | ||
232 | + | ||
233 | + &:last-child { | ||
234 | + .centers { | ||
235 | + .tip { | ||
236 | + height: 0; | ||
237 | + width: 0; | ||
238 | + background-color: #f6f6f6; | ||
239 | + } | ||
240 | + } | ||
241 | + } | ||
242 | + } | ||
243 | + } | ||
244 | + } | ||
245 | +</style> |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <u-tabs :list="list2" lineColor="#FED000" :scrollable="false" @click="onclick"></u-tabs> | 4 | <u-tabs :list="list2" lineColor="#FED000" :scrollable="false" @click="onclick"></u-tabs> |
5 | </u-sticky> | 5 | </u-sticky> |
6 | <view class="group"> | 6 | <view class="group"> |
7 | - <view class="item" v-for="(item,idx) in list" :key="idx"> | 7 | + <view class="item" v-for="(item,idx) in list" :key="idx" @click.stop="ondetail(item.id)"> |
8 | <view class="top flexA"> | 8 | <view class="top flexA"> |
9 | <view class="left flexA"> | 9 | <view class="left flexA"> |
10 | <image src="/static/order.png" mode=""></image> | 10 | <image src="/static/order.png" mode=""></image> |
@@ -40,11 +40,11 @@ | @@ -40,11 +40,11 @@ | ||
40 | </view> | 40 | </view> |
41 | <view class="line"></view> | 41 | <view class="line"></view> |
42 | <view class="botBtn flexA"> | 42 | <view class="botBtn flexA"> |
43 | - <view v-if="reseller(item.status)" class="flexC" @click="openshowBuyer(item)">买家信息</view> | ||
44 | - <view v-if="!item.license_preview" class="flexC" @click="openimag(item.id,idx)">上传转赠证明</view> | ||
45 | - <view v-if="reseller(item.status)" class="flexC" @click="order_send(item.id,idx)">发货</view> | ||
46 | - <view v-if="item.license_preview" class="flexC yellow" @click="openshow(item.license_preview)">查看交易证明</view> | ||
47 | - <view v-if="item.license_preview" class="flexC yellow" @click="openimag(item.id,idx)">重新上传证明</view> | 43 | + <view v-if="reseller(item.status)" class="flexC" @click.stop="openshowBuyer(item)">买家信息</view> |
44 | + <view v-if="!item.license_preview" class="flexC" @click.stop="openimag(item.id,idx)">上传转赠证明</view> | ||
45 | + <view v-if="reseller(item.status)" class="flexC" @click.stop="order_send(item.id,idx)">发货</view> | ||
46 | + <view v-if="item.license_preview" class="flexC yellow" @click.stop="openshow(item.license_preview)">查看交易证明</view> | ||
47 | + <view v-if="item.license_preview" class="flexC yellow" @click.stop="openimag(item.id,idx)">重新上传证明</view> | ||
48 | </view> | 48 | </view> |
49 | </view> | 49 | </view> |
50 | </view> | 50 | </view> |
@@ -149,6 +149,12 @@ | @@ -149,6 +149,12 @@ | ||
149 | 149 | ||
150 | }, | 150 | }, |
151 | methods: { | 151 | methods: { |
152 | + // 跳转详情 | ||
153 | + ondetail(id){ | ||
154 | + uni.navigateTo({ | ||
155 | + url:"/pages/mine/order_detail?id="+id | ||
156 | + }) | ||
157 | + }, | ||
152 | // 状态筛选 | 158 | // 状态筛选 |
153 | reseller(s) { | 159 | reseller(s) { |
154 | if (s == 2) return true; | 160 | if (s == 2) return true; |
static/2.png
0 → 100644
393 字节
static/3.png
0 → 100644
567 字节
static/4.png
0 → 100644
1.0 KB
-
请 注册 或 登录 后发表评论