Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
734a8506
Commit
734a8506
authored
Dec 28, 2021
by
June_Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复消息中心name为空的null;feat:订单物流
parent
4d34000d
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
388 additions
and
183 deletions
+388
-183
apis/logistics.js
apis/logistics.js
+11
-0
apis/news.js
apis/news.js
+3
-3
lib/modal/index.js
lib/modal/index.js
+3
-2
main.js
main.js
+1
-3
pages.json
pages.json
+7
-0
pages/order/components/order-btn.vue
pages/order/components/order-btn.vue
+186
-168
pages/order/order-detail.vue
pages/order/order-detail.vue
+19
-3
static/images/common/icon-geli.png
static/images/common/icon-geli.png
+0
-0
subPages/logisticsInfo/index.vue
subPages/logisticsInfo/index.vue
+154
-0
subPages/news/detail.vue
subPages/news/detail.vue
+2
-2
subPages/news/index.vue
subPages/news/index.vue
+2
-2
No files found.
apis/logistics.js
0 → 100644
View file @
734a8506
import
{
request
}
from
"
@/lib/service
"
export
function
orderLogistics
(
orderid
)
{
return
request
({
url
:
'
zsxcx/getOrderDeliveryByOrderIdZS.htm
'
,
method
:
'
post
'
,
data
:
{
order_id
:
orderid
}
})
}
\ No newline at end of file
apis/news.js
View file @
734a8506
...
...
@@ -2,13 +2,13 @@ import { request } from "@/lib/service"
/**
* @desc 消息列表
*/
export
function
newsList
({
page
Num
=
1
,
pageSize
=
10
})
{
export
function
newsList
({
page
=
1
,
pagenum
=
10
})
{
return
request
({
url
:
'
zsxcx/getInformationUserZS.htm
'
,
method
:
'
post
'
,
data
:
{
page
Num
,
page
Size
page
,
page
num
},
needMask
:
true
})
...
...
lib/modal/index.js
View file @
734a8506
...
...
@@ -6,10 +6,11 @@ export default function Modal(options) {
icon
:
"
none
"
})
}
uni
.
showModal
({
console
.
log
(
options
)
return
uni
.
showModal
({
title
:
options
.
title
||
'
提示
'
,
content
:
options
.
content
,
showCancel
:
options
.
showCancel
||
true
,
showCancel
:
options
.
showCancel
===
false
?
options
.
showCancel
:
true
,
cancelText
:
options
.
cancelText
||
'
取消
'
,
cancelColor
:
options
.
cancelColor
||
'
#000000
'
,
confirmText
:
options
.
confirmText
||
'
确定
'
,
...
...
main.js
View file @
734a8506
import
Vue
from
'
vue
'
import
App
from
'
./App
'
import
store
from
'
./store
'
import
store
from
'
./store
'
import
"
@/utils/vue_extend.js
"
// 常用方法
// 全局组件
...
...
@@ -13,7 +12,6 @@ Vue.component('uni-popup', uniPopup)
Vue
.
component
(
'
c-nav_bar
'
,
cNav_bar
)
Vue
.
prototype
.
$store
=
store
Vue
.
config
.
productionTip
=
false
App
.
mpType
=
'
app
'
...
...
pages.json
View file @
734a8506
...
...
@@ -198,6 +198,13 @@
"style"
:
{
"navigationBarTitleText"
:
"消息详情"
}
},
{
"path"
:
"logisticsInfo/index"
,
"style"
:
{
"navigationBarTitleText"
:
"物流详情"
,
"enablePullDownRefresh"
:
true
}
}
]
},
...
...
pages/order/components/order-btn.vue
View file @
734a8506
This diff is collapsed.
Click to expand it.
pages/order/order-detail.vue
View file @
734a8506
...
...
@@ -51,7 +51,10 @@
</view>
<view
class=
"mt-2 box"
v-if=
"order_detail.order.shipping_type === '1'"
>
<view
class=
"item font-32 mb-3"
>
配送信息
</view>
<view
class=
"item font-32 mb-3 flex j-between a-center"
>
<span>
配送信息
</span>
<span
v-if=
"order_detail.order.deliverycount"
class=
"font-28 font-bold"
style=
"color: #FF661A"
@
click.stop=
"handleLogistics"
>
查看物流
</span>
</view>
<view
class=
"mt-3"
>
配送方式:商家配送
<text
class=
"primary ml-1"
@
click=
"makePhoneCall()"
>
联系商家
</text></view>
<view
class=
"item mt-3 w-100 flex j-start a-start"
>
<view
class=
"hd"
>
配送地址:
</view>
...
...
@@ -163,7 +166,12 @@
:style=
"{bottom: isIphoneX + 'px'}"
v-if=
"!['0', '2', '5'].includes(order_detail.order.order_status)"
>
<order-btn
:item=
"order_detail.order"
:otherData=
"order_detail"
@
changeData=
'changeData'
></order-btn>
<order-btn
:item=
"order_detail.order"
:otherData=
"order_detail"
:showLogistics=
"false"
@
changeData=
'changeData'
/>
</view>
</view>
...
...
@@ -297,7 +305,15 @@ export default {
current
:
link
,
// 当前显示图片的http链接
urls
:
[
link
]
// 需要预览的图片http链接列表
})
}
},
handleLogistics
()
{
const
orderid
=
this
.
order_detail
.
order
.
order_id
if
(
!
orderid
)
return
uni
.
navigateTo
({
url
:
'
/subPages/logisticsInfo/index?order_id=
'
+
orderid
})
},
}
}
</
script
>
...
...
static/images/common/icon-geli.png
0 → 100644
View file @
734a8506
1.94 KB
subPages/logisticsInfo/index.vue
0 → 100644
View file @
734a8506
<
template
>
<view
class=
"wrapper"
@
click=
"onClick"
>
<view
class=
"logistics-item font-28"
v-for=
"(logistic, logisticidx) in list"
:key=
"logistic.id"
>
<view
class=
"flex j-start a-center"
>
<span>
物流公司:
{{
logistic
.
express_name
}}
</span>
<image
v-if=
"'1' === logistic.is_coldchain"
class=
"icon ml-1"
src=
"/static/images/common/icon-geli.png"
mode=
"widthFix"
/>
</view>
<view
class=
"flex j-between a-center mt-2"
>
<span>
运单号码:
{{
logistic
.
express_no
}}
</span>
<span
style=
"color: #FF661A;"
data-type=
"copy"
:data-waybillsn=
"logistic.express_no"
>
复制
</span>
</view>
<view
class=
"mt-2"
>
发货时间:
{{
logistic
.
add_time
|
parseTime
}}
</view>
<!--
<scroll-view
v-if=
"logistic.goodsimglist && logistic.goodsimglist.length > 4"
scroll-x
class=
"mt-2 flex j-start a-center"
style=
"white-space: nowrap;"
>
<image
class=
"imgs"
v-for=
"(img, idx) in logistic.goodsimglist"
:src=
"baseUrl + '/' + img.goods_thumb"
:key=
"idx"
mode=
"aspectFit"
/>
</scroll-view>
-->
<view
class=
"mt-2 img-box"
>
<image
class=
"imgs"
v-for=
"(img, idx) in logistic.goodsimglist"
:src=
"baseUrl + '/' + img.goods_thumb"
:key=
"idx"
:data-logisticidx=
"logisticidx"
:data-imgidx=
"idx"
data-type=
"previewImg"
mode=
"aspectFit"
/>
</view>
</view>
</view>
</
template
>
<
script
>
import
Modal
from
'
@/lib/modal/index.js
'
;
import
{
orderLogistics
}
from
'
@/apis/logistics.js
'
;
export
default
{
data
()
{
return
{
list
:
[]
}
},
onLoad
(
ops
)
{
const
{
order_id
}
=
ops
if
(
!
order_id
)
return
Modal
({
content
:
'
订单id缺失
'
,
showCancel
:
false
,
cb
:
()
=>
{
uni
.
navigateBack
()
}
})
this
.
order_id
=
order_id
this
.
getLogistics
()
},
onPullDownRefresh
()
{
uni
.
showLoading
({
title
:
'
刷新中...
'
,
mask
:
true
})
this
.
getLogistics
()
let
timer
=
setTimeout
(()
=>
{
uni
.
stopPullDownRefresh
()
uni
.
hideLoading
()
clearTimeout
(
timer
);
timer
=
null
;
},
500
)
},
methods
:
{
getLogistics
()
{
orderLogistics
(
this
.
order_id
)
.
then
(({
status
,
data
})
=>
{
if
(
status
)
{
this
.
list
=
data
}
})
},
onClick
(
e
)
{
const
{
type
,
waybillsn
,
logisticidx
,
imgidx
}
=
e
.
target
.
dataset
;
switch
(
type
)
{
case
'
copy
'
:
waybillsn
&&
uni
.
setClipboardData
({
data
:
waybillsn
,
success
:
this
.
$toast
({
title
:
"
复制成功
"
})
})
break
;
case
'
previewImg
'
:
(
'
undefined
'
!==
logisticidx
)
&&
uni
.
previewImage
({
current
:
imgidx
,
urls
:
this
.
list
[
logisticidx
].
goodsimglist
.
map
(
i
=>
this
.
baseUrl
+
'
/
'
+
i
.
goods_thumb
)
})
break
;
default
:
this
.
$toast
({
title
:
'
可复制运单号前往对应物流公司官网查询物流跟踪
'
})
break
;
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
.logistics-item
{
@include
borderBox
(
30rpx
,
20rpx
);
width
:
680rpx
;
margin
:
20rpx
auto
0
;
border-radius
:
12rpx
;
background-color
:
#fff
;
.icon
{
display
:
inline-block
;
width
:
34rpx
;
height
:
34rpx
;
}
.img-box
{
white-space
:
nowrap
;
overflow-x
:
auto
;
.imgs
{
display
:
inline-block
;
width
:
155rpx
;
height
:
155rpx
;
margin-right
:
10rpx
;
border-radius
:
12rpx
;
overflow
:
hidden
;
&
:last-child
{
margin-right
:
0
;
}
}
}
}
}
</
style
>
subPages/news/detail.vue
View file @
734a8506
...
...
@@ -7,8 +7,8 @@
<!-- introduct info -->
<view
class=
"descColor font-24 mb-2 flex j-between a-center"
>
<view>
<span
class=
"mr-2"
>
{{
detail
.
name
}}
</span>
<span>
{{
detail
.
type
}}
</span>
<span
class=
"mr-2"
>
{{
detail
.
name
||
''
}}
</span>
<span>
{{
detail
.
type
||
''
}}
</span>
</view>
<view
class=
""
>
{{
detail
.
send_time
|
parseTime
}}
</view>
</view>
...
...
subPages/news/index.vue
View file @
734a8506
...
...
@@ -24,7 +24,7 @@
:src=
"news.icon ? baseUrl + '/' + news.icon : '/static/images/common/default-avatar.png'"
mode=
"aspectFit"
></image>
<text
class=
"shop-name"
>
{{
news
.
name
}}
</text>
<text
class=
"shop-name"
>
{{
news
.
name
||
''
}}
</text>
</view>
<view
class=
"time font-24 descColor"
>
{{
news
.
send_time
|
parseTime
}}
</view>
</view>
...
...
@@ -73,7 +73,7 @@ export default {
async
getList
()
{
const
{
status
,
data
}
=
await
this
.
loadMore
.
getList
({},
newsList
)
if
(
status
)
{
this
.
list
=
data
this
.
list
=
[...
this
.
list
,
...
data
]
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment