Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
mallapp
Commits
2632b279
Commit
2632b279
authored
Jun 04, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
a
parents
d812e117
30a9d9f7
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1611 additions
and
444 deletions
+1611
-444
index.vue
components/liudx-pickerAddress/index.vue
+222
-0
u-mask.vue
components/liudx-pickerAddress/u-mask.vue
+99
-0
u-popup.vue
components/liudx-pickerAddress/u-popup.vue
+347
-0
pages.json
pages.json
+141
-90
AddAddress.vue
pages/address/AddAddress.vue
+76
-54
address.vue
pages/address/address.vue
+20
-46
balance.vue
pages/balance/balance.vue
+69
-5
detail.vue
pages/balance/detail.vue
+116
-0
recharge.vue
pages/balance/recharge.vue
+6
-43
rules.vue
pages/balance/rules.vue
+63
-0
details.vue
pages/coupon/details/details.vue
+45
-62
index.vue
pages/coupon/index/index.vue
+68
-65
list.vue
pages/coupon/list/list.vue
+82
-62
favorite.vue
pages/favorite/favorite.vue
+1
-1
express.vue
pages/order/express.vue
+195
-0
order-detail.vue
pages/order/order-detail.vue
+60
-15
index.vue
pages/share/index/index.vue
+1
-1
logo.png
static/logo.png
+0
-0
No files found.
components/liudx-pickerAddress/index.vue
0 → 100755
View file @
2632b279
<
template
>
<u-popup
:maskCloseAble=
"maskCloseAble"
mode=
"bottom"
:popup=
"false"
v-model=
"value"
length=
"auto"
:safeAreaInsetBottom=
"safeAreaInsetBottom"
@
close=
"close"
z-index=
"999"
>
<view
class=
"u-picker-header"
@
touchmove
.
stop
.
prevent=
"stop"
catchtouchmove=
"stop"
>
<view
class=
"u-btn-picker u-btn-picker--tips"
hover-class=
"u-opacity"
:hover-stay-time=
"150"
@
tap=
"getResult('cancel')"
>
取消
</view>
<view
class=
"u-btn-picker u-btn-picker--primary"
hover-class=
"u-opacity"
:hover-stay-time=
"150"
@
touchmove
.
stop=
""
@
tap
.
stop=
"getResult('confirm')"
>
确定
</view>
</view>
<view
class=
"u-picker-body"
>
<picker-view
:value=
"pickVal"
@
change=
"bindChange"
class=
"u-picker-view"
>
<picker-view-column>
<view
class=
"u-column-item"
v-for=
"(item,index) in districtsObj.provinces"
:key=
"index"
>
<view
class=
"u-line-1"
>
{{
item
.
Name
}}
</view>
</view>
</picker-view-column>
<picker-view-column>
<view
class=
"u-column-item"
v-for=
"(item,index) in districtsObj.cities"
:key=
"index"
>
<view
class=
"u-line-1"
>
{{
item
.
Name
}}
</view>
</view>
</picker-view-column>
<picker-view-column>
<view
class=
"u-column-item"
v-for=
"(item,index) in districtsObj.areas"
:key=
"index"
>
<view
class=
"u-line-1"
>
{{
item
.
Name
}}
</view>
</view>
</picker-view-column>
</picker-view>
</view>
</u-popup>
</
template
>
<
script
>
import
uPopup
from
'./u-popup'
export
default
{
props
:
{
safeAreaInsetBottom
:
{
type
:
Boolean
,
default
:
false
},
// 是否允许通过点击遮罩关闭Picker
maskCloseAble
:
{
type
:
Boolean
,
default
:
true
},
// 通过双向绑定控制组件的弹出与收起
value
:
{
type
:
Boolean
,
default
:
false
},
},
data
()
{
return
{
pickVal
:[
0
,
0
,
0
],
districtsObj
:
{
provinces
:
[],
cities
:
[],
areas
:
[],
},
province
:
0
,
city
:
0
,
area
:
0
}
},
watch
:
{
// 如果地区发生变化,为了让picker联动起来,必须重置this.citys和this.areas
province
(
val
)
{
this
.
loadCities
(
this
.
districtsObj
.
provinces
[
this
.
province
].
ID
);
},
city
(
val
)
{
this
.
loadAreas
(
this
.
districtsObj
.
cities
[
this
.
city
].
ID
);
}
},
mounted
()
{
this
.
loadDistrict
()
},
methods
:
{
close
()
{
this
.
$emit
(
'input'
,
false
);
},
async
loadDistrict
()
{
this
.
loadProvinces
()
},
loadProvinces
()
{
// 加载省份
this
.
request2
(
{
url
:
'/api/Destination/GetChildList'
,
data
:
{
Id
:
2
}
},
res
=>
{
let
data
=
res
.
data
this
.
districtsObj
.
provinces
=
data
this
.
loadCities
(
data
[
0
].
ID
)
},
);
},
loadCities
(
Id
)
{
this
.
request2
(
{
url
:
'/api/Destination/GetChildList'
,
data
:
{
Id
:
Id
}
},
res
=>
{
let
data
=
res
.
data
this
.
districtsObj
.
cities
=
data
this
.
loadAreas
(
data
[
0
].
ID
)
},
);
},
loadAreas
(
Id
)
{
this
.
request2
(
{
url
:
'/api/Destination/GetChildList'
,
data
:
{
Id
:
Id
}
},
res
=>
{
let
data
=
res
.
data
this
.
districtsObj
.
areas
=
data
},
);
},
bindChange
(
event
)
{
this
.
pickVal
=
event
.
detail
.
value
;
let
i
=
0
;
this
.
province
=
this
.
pickVal
[
i
++
];
this
.
city
=
this
.
pickVal
[
i
++
];
this
.
area
=
this
.
pickVal
[
i
++
];
},
getResult
(
event
=
null
)
{
let
result
=
{
province
:
this
.
districtsObj
.
provinces
[
this
.
province
],
city
:
this
.
districtsObj
.
cities
[
this
.
city
],
area
:
this
.
districtsObj
.
areas
[
this
.
area
],
}
if
(
event
)
this
.
$emit
(
event
,
result
);
this
.
close
();
}
},
components
:{
uPopup
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.u-datetime-picker
{
position
:
relative
;
z-index
:
999
;
}
.u-picker-view
{
height
:
100%
;
box-sizing
:
border-box
;
}
.u-picker-header
{
width
:
100%
;
height
:
90rpx
;
padding
:
0
40rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
box-sizing
:
border-box
;
font-size
:
32rpx
;
background
:
#ddd
;
position
:
relative
;
}
.
u-picker-header
:
:
after
{
content
:
''
;
position
:
absolute
;
border-bottom
:
1rpx
solid
#eaeef1
;
-webkit-transform
:
scaleY
(
0
.5
);
transform
:
scaleY
(
0
.5
);
bottom
:
0
;
right
:
0
;
left
:
0
;
}
.u-picker-body
{
width
:
100%
;
height
:
500rpx
;
overflow
:
hidden
;
background-color
:
#fff
;
}
.u-column-item
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
32rpx
;
padding
:
0
8rpx
;
}
.u-text
{
font-size
:
24rpx
;
padding-left
:
8rpx
;
}
.u-btn-picker
{
padding
:
16rpx
;
box-sizing
:
border-box
;
text-align
:
center
;
text-decoration
:
none
;
}
.u-opacity
{
opacity
:
0
.5
;
}
.u-btn-picker--primary
{
}
.u-btn-picker--tips
{
}
</
style
>
components/liudx-pickerAddress/u-mask.vue
0 → 100755
View file @
2632b279
<
template
>
<view
class=
"u-mask"
:style=
"[maskStyle]"
:class=
"[show ? 'u-mask-show' : '']"
@
tap=
"click"
@
touchmove
.
stop
.
prevent
>
<slot
/>
</view>
</
template
>
<
script
>
/**
* mask 遮罩
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
* @tutorial https://www.uviewui.com/components/mask.html
* @property {Boolean} show 是否显示遮罩(默认false)
* @property {String Number} z-index z-index 层级(默认1070)
* @property {Object} custom-style 自定义样式对象,见上方说明
* @property {String Number} duration 动画时长,单位毫秒(默认300)
* @property {Boolean} zoom 是否使用scale对这招进行缩放(默认true)
* @property {Boolean} mask-click-able 遮罩是否可点击,为false时点击不会发送click事件(默认true)
* @event {Function} click mask-click-able为true时,点击遮罩发送此事件
* @example <u-mask :show="show" @click="show = false"></u-mask>
*/
export
default
{
name
:
"u-mask"
,
props
:
{
// 是否显示遮罩
show
:
{
type
:
Boolean
,
default
:
false
},
// 层级z-index
zIndex
:
{
type
:
[
Number
,
String
],
default
:
'1'
},
// 用户自定义样式
customStyle
:
{
type
:
Object
,
default
()
{
return
{}
}
},
// 遮罩的动画样式, 是否使用使用zoom进行scale进行缩放
zoom
:
{
type
:
Boolean
,
default
:
true
},
// 遮罩的过渡时间,单位为ms
duration
:
{
type
:
[
Number
,
String
],
default
:
300
},
// 是否可以通过点击遮罩进行关闭
maskClickAble
:
{
type
:
Boolean
,
default
:
true
}
},
computed
:
{
maskStyle
()
{
let
style
=
{};
style
.
backgroundColor
=
"rgba(0, 0, 0, 0.6)"
;
style
.
zIndex
=
this
.
zIndex
?
this
.
zIndex
:
this
.
$u
.
zIndex
.
mask
;
style
.
transition
=
`all
${
this
.
duration
/
1000
}
s ease-in-out`
;
// 缩放
if
(
this
.
zoom
==
true
)
style
.
transform
=
'scale(1.2, 1.2)'
;
// 判断用户传递的对象是否为空
if
(
Object
.
keys
(
this
.
customStyle
).
length
)
style
=
{
...
style
,
...
this
.
customStyle
};
// 合并自定义的样式
//Object.assign(style, customStyle);
return
style
;
}
},
methods
:
{
click
()
{
if
(
!
this
.
maskClickAble
)
return
;
this
.
$emit
(
'click'
);
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.u-mask
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
opacity
:
0
;
visibility
:
hidden
;
}
.u-mask-show
{
opacity
:
1
;
visibility
:
visible
;
transform
:
scale
(
1
);
}
</
style
>
components/liudx-pickerAddress/u-popup.vue
0 → 100755
View file @
2632b279
<
template
>
<view
v-if=
"visibleSync"
:style=
"[customStyle]"
:class=
"
{ 'u-drawer-visible': showDrawer }" class="u-drawer">
<u-mask
:maskClickAble=
"maskCloseAble"
:show=
"showDrawer && mask"
@
click=
"maskClick"
></u-mask>
<view
class=
"u-drawer-content"
@
tap=
"modeCenterClose(mode)"
:class=
"[
safeAreaInsetBottom ? 'safe-area-inset-bottom' : '',
'u-drawer-' + mode,
showDrawer ? 'u-drawer-content-visible' : '',
zoom && mode == 'center' ? 'u-animation-zoom' : ''
]"
@
touchmove
.
stop
.
prevent
@
tap
.
stop
.
prevent
:style=
"[style]"
>
<view
class=
"u-mode-center-box"
@
tap
.
stop
.
prevent
@
touchmove
.
stop
.
prevent
v-if=
"mode == 'center'"
:style=
"[centerStyle]"
>
<slot
/>
</view>
<block
v-else
>
<slot
/>
</block>
</view>
</view>
</
template
>
<
script
>
/**
* popup 弹窗
* @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
* @tutorial https://www.uviewui.com/components/popup.html
* @property {String} mode 弹出方向(默认left)
* @property {Boolean} mask 是否显示遮罩(默认true)
* @property {String Number} length mode=left | 见官网说明(默认auto)
* @property {Boolean} zoom 是否开启缩放动画,只在mode为center时有效(默认true)
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
* @property {Boolean} mask-close-able 点击遮罩是否可以关闭弹出层(默认true)
* @property {Object} custom-style 用户自定义样式
* @property {Number String} border-radius 弹窗圆角值(默认0)
* @property {Number String} z-index 弹出内容的z-index值(默认1075)
* @event {Function} open 弹出层打开
* @event {Function} close 弹出层收起
* @example <u-popup v-model="show"><view>出淤泥而不染,濯清涟而不妖</view></u-popup>
*/
import
uMask
from
'./u-mask'
export
default
{
name
:
'u-popup'
,
props
:
{
/**
* 显示状态
*/
show
:
{
type
:
Boolean
,
default
:
false
},
/**
* 弹出方向,left|right|top|bottom|center
*/
mode
:
{
type
:
String
,
default
:
'left'
},
/**
* 是否显示遮罩
*/
mask
:
{
type
:
Boolean
,
default
:
true
},
// 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者"auto"
// 或者百分比"50%",表示由内容撑开高度或者宽度
length
:
{
type
:
[
Number
,
String
],
default
:
'auto'
},
// 是否开启缩放动画,只在mode=center时有效
zoom
:
{
type
:
Boolean
,
default
:
true
},
// 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
safeAreaInsetBottom
:
{
type
:
Boolean
,
default
:
false
},
// 是否可以通过点击遮罩进行关闭
maskCloseAble
:
{
type
:
Boolean
,
default
:
true
},
// 用户自定义样式
customStyle
:
{
type
:
Object
,
default
()
{
return
{};
}
},
value
:
{
type
:
Boolean
,
default
:
false
},
// 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件
// 对v-model双向绑定多层调用造成报错不能修改props值的问题
popup
:
{
type
:
Boolean
,
default
:
true
},
// 显示显示弹窗的圆角,单位rpx
borderRadius
:
{
type
:
[
Number
,
String
],
default
:
0
},
zIndex
:
{
type
:
[
Number
,
String
],
default
:
'100'
}
},
data
()
{
return
{
visibleSync
:
false
,
showDrawer
:
false
,
timer
:
null
,
style1
:
{}
};
},
computed
:
{
// 根据mode的位置,设定其弹窗的宽度(mode = left|right),或者高度(mode = top|bottom)
style
()
{
let
style
=
{};
let
translate
=
'100%'
;
// 判断是否是否百分比或者auto值,是的话,直接使用该值,否则默认为rpx单位的数值
let
length
=
(
/%$/
.
test
(
this
.
length
)
||
this
.
length
==
'auto'
)
?
this
.
length
:
uni
.
upx2px
(
this
.
length
)
+
'px'
;
// 如果是左边或者上边弹出时,需要给translate设置为负值,用于隐藏
if
(
this
.
mode
==
'left'
||
this
.
mode
==
'top'
)
translate
=
length
==
'auto'
?
'-100%'
:
'-'
+
length
;
if
(
this
.
mode
==
'left'
||
this
.
mode
==
'right'
)
{
style
=
{
width
:
length
,
height
:
'100%'
,
transform
:
`translate3D(
${
translate
}
,0px,0px)`
};
}
else
if
(
this
.
mode
==
'top'
||
this
.
mode
==
'bottom'
)
{
style
=
{
width
:
'100%'
,
height
:
length
,
transform
:
`translate3D(0px,
${
translate
}
,0px)`
};
}
style
.
zIndex
=
this
.
zIndex
?
this
.
zIndex
:
this
.
$u
.
zIndex
.
popup
;
// 如果用户设置了borderRadius值,添加弹窗的圆角
if
(
this
.
borderRadius
)
{
switch
(
this
.
mode
)
{
case
'left'
:
style
.
borderRadius
=
`0
${
this
.
borderRadius
}
rpx
${
this
.
borderRadius
}
rpx 0`
;
break
;
case
'top'
:
style
.
borderRadius
=
`0 0
${
this
.
borderRadius
}
rpx
${
this
.
borderRadius
}
rpx`
;
break
;
case
'right'
:
style
.
borderRadius
=
`
${
this
.
borderRadius
}
rpx 0 0
${
this
.
borderRadius
}
rpx`
;
break
;
case
'bottom'
:
style
.
borderRadius
=
`
${
this
.
borderRadius
}
rpx
${
this
.
borderRadius
}
rpx 0 0`
;
break
;
default
:
;
}
// 不加可能圆角无效
style
.
overflow
=
'hidden'
;
}
return
style
;
},
// 中部弹窗的特有样式
centerStyle
()
{
let
style
=
{};
let
length
=
(
/%$/
.
test
(
this
.
length
)
||
this
.
length
==
'auto'
)
?
this
.
length
:
uni
.
upx2px
(
this
.
length
)
+
'px'
;
style
.
width
=
length
;
style
.
zIndex
=
this
.
zIndex
?
this
.
zIndex
:
this
.
$u
.
zIndex
.
popup
;
if
(
this
.
borderRadius
)
{
style
.
borderRadius
=
`
${
this
.
borderRadius
}
rpx`
;
// 不加可能圆角无效
style
.
overflow
=
'hidden'
;
}
return
style
;
}
},
watch
:
{
value
(
val
)
{
if
(
val
)
{
this
.
open
();
}
else
{
this
.
close
();
}
}
},
created
()
{
// 先让弹窗组件渲染,再改变遮罩和抽屉元素的样式,让其动画其起作用(必须要有延时,才会有效果)
this
.
visibleSync
=
this
.
value
;
setTimeout
(()
=>
{
this
.
showDrawer
=
this
.
value
;
},
30
);
},
methods
:
{
// 遮罩被点击
maskClick
()
{
this
.
close
();
},
close
()
{
this
.
change
(
'showDrawer'
,
'visibleSync'
,
false
);
},
// 中部弹出时,需要.u-drawer-content将居中内容,此元素会铺满屏幕,点击需要关闭弹窗
// 让其只在mode=center时起作用
modeCenterClose
(
mode
)
{
if
(
mode
!=
'center'
||
!
this
.
maskCloseAble
)
return
;
this
.
close
();
},
open
()
{
this
.
change
(
'visibleSync'
,
'showDrawer'
,
true
);
},
// 此处的原理是,关闭时先通过动画隐藏弹窗和遮罩,再移除整个组件
// 打开时,先渲染组件,延时一定时间再让遮罩和弹窗的动画起作用
change
(
param1
,
param2
,
status
)
{
// 如果this.popup为false,以为着为picker,actionsheet等组件调用了popup组件
if
(
this
.
popup
==
true
)
this
.
$emit
(
'input'
,
status
);
this
[
param1
]
=
status
;
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
);
}
this
.
timer
=
setTimeout
(
()
=>
{
this
[
param2
]
=
status
;
this
.
$emit
(
status
?
'open'
:
'close'
);
},
status
?
30
:
300
);
}
},
components
:{
uMask
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
.u-drawer
{
/* #ifndef APP-NVUE */
display
:
block
;
/* #endif */
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
overflow
:
hidden
;
z-index
:
999
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.4
);
}
.u-drawer-content
{
/* #ifndef APP-NVUE */
display
:
block
;
/* #endif */
position
:
absolute
;
z-index
:
1003
;
transition
:
all
0
.25s
linear
;
}
.u-drawer-left
{
top
:
0
;
bottom
:
0
;
left
:
0
;
background-color
:
#ffffff
;
}
.u-drawer-right
{
right
:
0
;
top
:
0
;
bottom
:
0
;
background-color
:
#ffffff
;
}
.u-drawer-top
{
top
:
0
;
left
:
0
;
right
:
0
;
background-color
:
#ffffff
;
}
.u-drawer-bottom
{
bottom
:
0
;
left
:
0
;
right
:
0
;
background-color
:
#ffffff
;
}
.u-drawer-center
{
/* #ifndef APP-NVUE */
display
:
flex
;
flex-direction
:
column
;
/* #endif */
bottom
:
0
;
left
:
0
;
right
:
0
;
top
:
0
;
justify-content
:
center
;
align-items
:
center
;
opacity
:
0
;
z-index
:
99999
;
}
.u-mode-center-box
{
min-width
:
100rpx
;
min-height
:
100rpx
;
/* #ifndef APP-NVUE */
display
:
block
;
/* #endif */
position
:
relative
;
background-color
:
#ffffff
;
}
.u-drawer-content-visible.u-drawer-center
{
transform
:
scale
(
1
);
opacity
:
1
;
}
.u-animation-zoom
{
transform
:
scale
(
1
.15
);
}
.u-drawer-content-visible
{
transform
:
translate3D
(
0px
,
0px
,
0px
)
!
important
;
}
.u-drawer-mask
{
/* #ifndef APP-NVUE */
display
:
block
;
/* #endif */
opacity
:
0
;
position
:
absolute
;
top
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.4
);
transition
:
opacity
0
.25s
;
}
.u-drawer-mask-visible
{
/* #ifndef APP-NVUE */
display
:
block
;
/* #endif */
opacity
:
1
;
}
</
style
>
pages.json
View file @
2632b279
...
...
@@ -3,13 +3,7 @@
"^u-(.*)"
:
"uview-ui/components/u-$1/u-$1.vue"
},
"pages"
:
[{
"path"
:
"pages/order-submit/pay-success"
},
{
"path"
:
"pages/order/after-sale/refunds-list"
},
{
"path"
:
"pages/user-center/user-center"
"path"
:
"pages/index/index"
},
{
"path"
:
"pages/pay/pay/pay"
...
...
@@ -17,50 +11,12 @@
{
"path"
:
"pages/cart/cart"
},
{
"path"
:
"pages/order/index/index"
},
{
"path"
:
"pages/order/order-detail"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/balance/balance"
},
{
"path"
:
"pages/index/index"
},
{
"path"
:
"pages/order/after-sale/refunds-detail"
},
{
"path"
:
"pages/order/after-sale/refunds"
},
{
"path"
:
"pages/order/after-sale/index"
},
{
"path"
:
"pages/order-submit/order-submit"
},
{
"path"
:
"pages/search/search"
},
{
"path"
:
"pages/cats/cats"
},
{
"path"
:
"pages/goods/goods"
},
{
"path"
:
"pages/goods/comment-list"
},
{
"path"
:
"pages/foot/index/index"
},
...
...
@@ -68,57 +24,152 @@
"path"
:
"pages/favorite/favorite"
},
{
"path"
:
"pages/address/address"
},
{
"path"
:
"pages/address/address_chosen"
"path"
:
"pages/card/index/index"
},
{
"path"
:
"pages/
address/AddAddress
"
"path"
:
"pages/
cash-detail/cash-detail
"
},
{
"path"
:
"pages/webbox/webbox"
},
{
"path"
:
"pages/goods/list"
},
{
"path"
:
"pages/order/index"
},
{
"path"
:
"pages/balance/recharge"
},
{
"path"
:
"pages/card/index/index"
},
{
"path"
:
"pages/coupon/list/list"
},
{
"path"
:
"pages/coupon/details/details"
},
{
"path"
:
"pages/coupon/index/index"
},
{
"path"
:
"pages/user-center/integral-detail/integral-detail"
}
,
{
"path"
:
"pages/share/index/index"
},
{
"path"
:
"pages/share/add/add"
},
{
"path"
:
"pages/share/cash/cash"
},
{
"path"
:
"pages/share-money/share-money"
},
{
"path"
:
"pages/cash-detail/cash-detail"
},
{
"path"
:
"pages/share/level/level"
},
{
"path"
:
"pages/share-qrcode/share-qrcode"
},{
"path"
:
"pages/share-order/share-order"
}
,{
"path"
:
"pages/share-team/share-team"
],
"subPackages"
:
[{
"root"
:
"pages/goods"
,
"pages"
:
[{
"path"
:
"goods"
,
"style"
:
{}
},
{
"path"
:
"comment-list"
},
{
"path"
:
"list"
}
]
},
{
"root"
:
"pages/balance"
,
"pages"
:
[{
"path"
:
"recharge"
},
{
"path"
:
"balance"
}
]
},
{
"root"
:
"pages/user-center"
,
"pages"
:
[{
"path"
:
"integral-detail/integral-detail"
},
{
"path"
:
"user-center"
}
]
},
{
"root"
:
"pages/share"
,
"pages"
:
[{
"path"
:
"index/index"
},
{
"path"
:
"add/add"
},
{
"path"
:
"cash/cash"
}
]
},
{
"root"
:
"pages/share-team"
,
"pages"
:
[{
"path"
:
"share-team"
}]
},
{
"root"
:
"pages/share-order"
,
"pages"
:
[{
"path"
:
"share-order"
}]
},
{
"root"
:
"pages/share-qrcode"
,
"pages"
:
[{
"path"
:
"share-qrcode"
}]
},
{
"root"
:
"pages/share-money"
,
"pages"
:
[{
"path"
:
"share-money"
}]
},
{
"root"
:
"pages/coupon"
,
"pages"
:
[{
"path"
:
"list/list"
},
{
"path"
:
"details/details"
},
{
"path"
:
"index/index"
}
]
},
{
"root"
:
"pages/order-submit"
,
"pages"
:
[{
"path"
:
"pay-success"
},
{
"path"
:
"order-submit"
}
]
},
{
"root"
:
"pages/address"
,
"pages"
:
[{
"path"
:
"address"
},
{
"path"
:
"address_chosen"
},
{
"path"
:
"AddAddress"
}
]
},
{
"root"
:
"pages/order"
,
"pages"
:
[{
"path"
:
"index/index"
},
{
"path"
:
"after-sale/refunds-list"
},
{
"path"
:
"order-detail"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"after-sale/refunds-detail"
},
{
"path"
:
"after-sale/refunds"
},
{
"path"
:
"after-sale/index"
},
{
"path"
:
"index"
},
{
"path"
:
"express"
}
]
}
],
"globalStyle"
:
{
...
...
pages/address/AddAddress.vue
View file @
2632b279
<
template
>
<view
class=
"AddaddressStyle"
:style=
"
{'height':contentHeight}">
<view
class=
"top"
>
<
!--
<
view
class=
"top"
>
<input
class=
"uni-input"
placeholder=
"自动获得焦点"
style=
"width: 70%;"
/>
<view
style=
"display: flex;align-items: center;justify-content: center;border: 1px solid #F4AAA6;width:160rpx ;height: 60rpx;"
>
<Text
style=
'color: #EA5A22;'
>
自动识别
</Text>
</view>
</view>
</view>
-->
<view
class=
"addcenter"
>
<view
class=
"addcenter_item2"
>
<Text>
收货人
</Text>
<input
class=
"uni-input inputM"
v-model=
"msg.
n
ame"
/>
<input
class=
"uni-input inputM"
v-model=
"msg.
N
ame"
/>
</view>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
class=
"addcenter_item2"
>
<Text>
联系电话
</Text>
<input
class=
"uni-input inputM"
v-model=
"msg.
m
obile"
/>
<input
class=
"uni-input inputM"
v-model=
"msg.
M
obile"
/>
</view>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<!-- TODO 动态获取地址数据 -->
<view
class=
"addcenter_item"
>
<Text>
所在地区
</Text>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
@
click=
"
Pickershwo=
true"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
@
click=
"
addressShow =
true"
>
<Text
:style=
"
{'color':address!=''? '#303133':'#9D9C9B'}">
{{
address
!=
''
?
address
:
'请选择'
}}
</Text>
<u-icon
name=
"arrow"
color=
"#B2B2B2"
size=
"30"
></u-icon>
<pickerAddress
v-model=
"addressShow"
@
confirm=
"addresspick"
/>
</view>
</view>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<!-- TODO 定位地址 -->
<view
class=
"addcenter_item"
>
<
!--
<
view
class=
"addcenter_item"
>
<Text>
定位地址
</Text>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<Text
style=
'#303133'
>
{{
msg
.
address
}}
</Text>
<u-icon
name=
"arrow"
color=
"#B2B2B2"
size=
"30"
></u-icon>
</view>
</view>
</view>
-->
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
class=
"addcenter_item2"
>
<Text>
详细地址
</Text>
<input
class=
"uni-input inputM"
v-model=
"msg.
detail
"
/>
<input
class=
"uni-input inputM"
v-model=
"msg.
Address
"
/>
</view>
</view>
<view
class=
"btn"
@
click=
"preserve"
:style=
"
{'background':mainColor}">
<Text>
保存地址
</Text>
</view>
<u-picker
v-model=
"Pickershwo"
mode=
"region"
@
confirm =
'confirm'
></u-picker>
<u-toast
ref=
"uToast"
/>
</view>
</
template
>
<
script
>
import
pickerAddress
from
'@/components/liudx-pickerAddress/index.vue'
export
default
{
components
:
{
pickerAddress
},
data
(){
return
{
pageTitle
:
'收货地址'
,
contentHeight
:
0
,
mainColor
:
''
,
msg
:{
location
:
''
,
latitude
:
''
,
longitude
:
''
,
id
:
0
,
name
:
''
,
mobile
:
''
,
address
:
''
,
province_id
:
'2'
,
city_id
:
'3'
,
district_id
:
'4'
,
detail
:
''
,
Id
:
0
,
Name
:
''
,
Mobile
:
''
,
Province
:
''
,
City
:
''
,
District
:
''
,
Address
:
''
,
},
address
:
''
,
Pickershwo
:
false
Pickershwo
:
false
,
addressShow
:
false
,
}
},
created
(){
...
...
@@ -81,39 +85,21 @@
});
},
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
if
(
option
.
u
!=
undefined
){
let
u
=
JSON
.
parse
(
decodeURIComponent
(
option
.
u
))
this
.
msg
=
u
;
this
.
address
=
u
.
province
+
','
+
u
.
city
+
','
+
u
.
district
;
if
(
option
.
AddressId
!=
undefined
){
this
.
getAddressInfo
(
option
.
AddressId
)
}
},
methods
:{
preserve
(){
let
pages
=
getCurrentPages
();
// 当前页面
let
beforePage
=
pages
[
pages
.
length
-
2
];
// 前一个页面
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
h
[
'content-type'
]
=
'application/x-www-form-urlencoded'
this
.
request
(
this
.
request2
(
{
url
:
""
,
method
:
"POST"
,
header
:
h
,
data
:
{
r
:
"api/user/address-save"
,
location
:
this
.
msg
.
location
,
latitude
:
this
.
msg
.
latitude
,
longitude
:
this
.
msg
.
longitude
,
id
:
this
.
msg
.
id
,
name
:
this
.
msg
.
name
,
mobile
:
this
.
msg
.
mobile
,
address
:
this
.
msg
.
address
,
province_id
:
this
.
msg
.
province_id
,
city_id
:
this
.
msg
.
city_id
,
district_id
:
this
.
msg
.
district_id
,
detail
:
this
.
msg
.
detail
,
}
url
:
'/api/AppletUser/SetUserShippingAddress'
,
data
:
this
.
msg
},
res
=>
{
...
...
@@ -133,13 +119,47 @@
);
},
confirm
(
e
){
console
.
log
(
e
)
this
.
address
=
e
.
province
.
label
+
','
+
e
.
city
.
label
+
','
+
e
.
area
.
label
;
this
.
msg
.
province_id
=
e
.
province
.
value
;
this
.
msg
.
city_id
=
e
.
city
.
value
;
this
.
msg
.
district_id
=
e
.
area
.
value
;
}
getAddressInfo
(
id
){
//获取详细地址接口
uni
.
showNavigationBarLoading
();
this
.
request2
(
{
url
:
'/api/AppletUser/GetUserShippingAddressInfo'
,
data
:
{
AddressId
:
id
}
},
res
=>
{
uni
.
hideNavigationBarLoading
();
this
.
msg
.
Id
=
res
.
data
.
Id
;
this
.
msg
.
Name
=
res
.
data
.
Name
;
this
.
msg
.
Mobile
=
res
.
data
.
Mobile
;
this
.
msg
.
Province
=
res
.
data
.
Province
;
this
.
msg
.
City
=
res
.
data
.
City
;
this
.
msg
.
District
=
res
.
data
.
District
;
this
.
msg
.
Address
=
res
.
data
.
Address
;
this
.
address
=
res
.
data
.
DistrictAddress
.
split
(
" "
).
join
(
","
);
},
);
},
addresspick
(
obj
)
{
console
.
log
(
obj
)
this
.
msg
.
Province
=
obj
.
province
.
ID
;
this
.
msg
.
City
=
obj
.
city
.
ID
;
if
(
obj
.
area
!=
undefined
){
this
.
msg
.
District
=
obj
.
area
.
ID
;
this
.
address
=
obj
.
province
.
Name
+
','
+
obj
.
city
.
Name
+
','
+
obj
.
area
.
Name
;
}
else
{
this
.
msg
.
District
=
''
;
this
.
address
=
obj
.
province
.
Name
+
','
+
obj
.
city
.
Name
}
},
}
}
</
script
>
...
...
@@ -157,7 +177,7 @@
background
:
#fff
;
}
.AddaddressStyle
.addcenter
{
margin-top
:
40
rpx
;
/* margin-top: 40rpx; */
background
:
#FFFFFF
;
}
.AddaddressStyle
.addcenter_item
{
...
...
@@ -179,6 +199,7 @@
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
.AddaddressStyle
.btn
{
...
...
@@ -196,5 +217,6 @@
.AddaddressStyle
.inputM
{
margin-left
:
20
rpx
;
width
:
70%
;
text-align
:
right
;
}
</
style
>
pages/address/address.vue
View file @
2632b279
...
...
@@ -8,17 +8,17 @@
>
<view
v-for=
"(item, index) in list"
:key=
"index"
class=
"addresbox"
>
<view
class=
"addresclo"
>
<Text
>
收件人:
{{
item
.
n
ame
}}
</Text>
<Text>
{{
item
.
m
obile
}}
</Text>
<Text
>
收件人:
{{
item
.
N
ame
}}
</Text>
<Text>
{{
item
.
M
obile
}}
</Text>
</view>
<Text
style=
'width: 100%;'
>
收货地址:
{{
item
.
a
ddress
}}
</Text>
<Text
style=
'width: 100%;'
>
收货地址:
{{
item
.
DistrictAddress
}}{{
item
.
A
ddress
}}
</Text>
<view
style=
"width: 100%;height: 2rpx;background: #f5f5f5;margin-top: 15rpx;"
></view>
<view
class=
"addresclo"
>
<u-checkbox-group
@
change=
"isdefault(item)"
>
<u-checkbox
v-model=
"item.
is_d
efault==1?true:false"
shape=
"circle"
:active-color=
"mainColor"
>
<u-checkbox
v-model=
"item.
IsD
efault==1?true:false"
shape=
"circle"
:active-color=
"mainColor"
>
<Text
:style=
"
{'color':item.
is_d
efault==1?mainColor:'#c8c9cc' }"
>
{{
item
.
is_d
efault
==
1
?
'已设为默认'
:
'设为默认'
}}
</Text>
:style=
"
{'color':item.
IsD
efault==1?mainColor:'#c8c9cc' }"
>
{{
item
.
IsD
efault
==
1
?
'已设为默认'
:
'设为默认'
}}
</Text>
</u-checkbox>
</u-checkbox-group>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
...
...
@@ -125,7 +125,7 @@ export default {
init
()
{
this
.
loading
=
false
;
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
this
.
request2
(
{
url
:
'/api/AppletUser/GetUserShippingAddressList'
,
...
...
@@ -133,49 +133,27 @@ export default {
},
res
=>
{
uni
.
hideNavigationBarLoading
();
console
.
log
(
"res"
,
res
);
if
(
res
.
resultCode
==
1
){
this
.
isloading
=
false
;
this
.
list
=
res
.
data
.
list
;
this
.
list
=
res
.
data
;
}
}
);
// this.request(
// {
// url: "",
// header: h,
// data: {
// r: "api/user/address"
// }
// },
// res => {
// uni.hideNavigationBarLoading();
// this.isloading = false;
// this.list = res.data.list;
// }
// );
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"userinfo"
);
this
.
showAuth
=
false
;
},
isdefault
(
item
)
{
//默认地址
//
设置
默认地址
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
h
[
'content-type'
]
=
'application/x-www-form-urlencoded'
this
.
request
(
this
.
request2
(
{
url
:
""
,
method
:
"POST"
,
header
:
h
,
data
:
{
r
:
"api/user/address-default"
,
id
:
item
.
id
,
is_default
:
item
.
is_default
==
1
?
0
:
1
}
url
:
'/api/AppletUser/SetUserShippingAddressDefault'
,
data
:
{
AddressId
:
item
.
Id
}
},
res
=>
{
...
...
@@ -186,25 +164,21 @@ export default {
},
btn_edit
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/address/AddAddress?
u="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
url
:
"/pages/address/AddAddress?
AddressId="
+
item
.
Id
});
},
btn_delete
(
item
)
{
this
.
deleteID
=
item
.
i
d
;
this
.
deleteID
=
item
.
I
d
;
this
.
showModal
=
true
;
},
confirm
()
{
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
h
[
'content-type'
]
=
'application/x-www-form-urlencoded'
this
.
request
(
this
.
request2
(
{
url
:
""
,
method
:
"POST"
,
header
:
h
,
url
:
"/api/AppletUser/DelUserShippingAddress"
,
data
:
{
r
:
"api/user/address-destroy"
,
id
:
this
.
deleteID
AddressId
:
this
.
deleteID
}
},
...
...
pages/balance/balance.vue
View file @
2632b279
...
...
@@ -7,7 +7,7 @@
<Text
style=
'color: #fff;;font-size: 28rpx;'
>
充值
</Text>
</view>
<!-- TODO 暂无余额说明 -->
<u-icon
name=
"question-o"
color=
"#fff"
class=
'explain'
size=
"36"
></u-icon>
<u-icon
name=
"question-o"
color=
"#fff"
class=
'explain'
size=
"36"
@
click=
"goUrl('/pages/balance/rules')"
></u-icon>
</view>
<view
class=
"timechoice"
>
<view
style=
"width: 50%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;"
>
...
...
@@ -16,11 +16,37 @@
<u-icon
name=
"arrow"
color=
"#909399"
size=
"36"
@
click=
'fun_date(1)'
></u-icon>
</view>
</view>
<view>
<!-- TODO logs列表 -->
<view
v-if=
"logsList.length > 0"
style=
"
height: calc(100vh - 265px);
width: calc(100vw);
overflow: hidden;
padding-top: 10px;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
v-for=
"(item, index) in logsList"
:key=
"index"
class=
'logsList'
@
click=
"godetail(item.id)"
>
<view
class=
"logsList_l"
>
<Text
class=
'l_name'
>
{{
item
.
desc
}}
</Text>
<Text
style=
'font-size: 13px;color: #666;'
>
{{
item
.
created_at
}}
</Text>
</view>
<view
class=
"logsList_r"
>
<Text
:style=
"
{color:item.type==1 ? mainColor:'#6ABE60'}">
{{
item
.
type
==
1
?
'+'
:
'-'
}}{{
item
.
money
}}
</Text>
</view>
</view>
</view>
</scroll-view>
</view>
<
auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth
>
<
!--
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
--
>
<view
class=
"loading"
v-if=
"load"
>
<u-loading
mode=
"flower"
size=
"48"
></u-loading>
<Text
style=
'color: #fff;margin-top: 10rpx;'
>
加载中...
</Text>
...
...
@@ -126,7 +152,7 @@
},
res
=>
{
this
.
load
=
false
this
.
logsList
=
res
.
data
.
list
uni
.
hideNavigationBarLoading
()
}
...
...
@@ -178,6 +204,11 @@
url
:
url
})
},
godetail
(
id
){
uni
.
navigateTo
({
url
:
'/pages/balance/detail?id='
+
id
})
}
}
}
</
script
>
...
...
@@ -233,4 +264,37 @@
margin-left
:
-100
rpx
;
z-index
:
999
;
}
.balanceStyle
.logsList
{
width
:
100%
;
height
:
75px
;
background
:
#fff
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
10px
;
border-top
:
1px
solid
#f5f5f5
;
}
.balanceStyle
.logsList_l
{
width
:
calc
(
100vw
-
20px
-
150px
);
height
:
55px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.balanceStyle
.logsList_r
{
width
:
150px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
flex-end
;
font-size
:
26px
;
}
.balanceStyle
.logsList_l
.l_name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
font-size
:
14px
;
}
</
style
>
pages/balance/detail.vue
0 → 100644
View file @
2632b279
<
template
>
<view
class=
"balancedetailStyle"
:style=
"
{'height':contentHeight}" >
<view
class=
"bd_box"
style=
"border-bottom: 1px solid #f5f5f5;"
>
<view
class=
'bd_box_l'
>
<Text>
交易金额
</Text>
</view>
<Text
class=
'bd_r'
:style=
"
{color:g.type==1 ? mainColor:'#6ABE60',}">
{{
g
.
type
==
1
?
'+'
:
'-'
}}{{
g
.
money
}}
</Text>
</view>
<view
class=
"bd_box"
>
<view
class=
'bd_box_l'
>
<Text>
交易时间
</Text>
</view>
<Text
>
{{
g
.
created_at
}}
</Text>
</view>
<view
class=
"bd_box"
style=
"align-items: flex-start;"
>
<view
class=
'bd_box_l'
>
<Text>
交易详情
</Text>
</view>
<view
style=
'width: calc(100vw - 20px - 80px);'
>
<Text
>
{{
g
.
desc
}}
</Text>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"余额详情"
,
contentHeight
:
0
,
mainColor
:
""
,
g
:{},
}
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
onLoad
(
option
){
this
.
getlogdetail
(
option
.
id
)
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
getlogdetail
(
id
){
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
()
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/balance/log-detail"
,
id
:
id
}
},
res
=>
{
uni
.
hideNavigationBarLoading
()
this
.
g
=
res
.
data
.
detail
;
}
);
},
}
}
</
script
>
<
style
>
.balancedetailStyle
{
background
:
#f3f4f6
;
width
:
100%
;
}
.balancedetailStyle
.bd_box
{
width
:
100%
;
background
:
#fff
;
padding
:
15px
10px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.bd_box
.bd_box_l
{
color
:
#999999
;
margin-right
:
10px
;
width
:
70px
;
display
:
inline-block
;
}
.bd_box
.bd_r
{
font-size
:
20px
;
}
</
style
>
pages/balance/recharge.vue
View file @
2632b279
...
...
@@ -30,29 +30,21 @@
</view>
</view>
<!--
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth>
-->
</view>
</
template
>
<
script
>
import
auth
from
"../../components/auth/index.vue"
;
export
default
{
data
()
{
return
{
pageTitle
:
"充值中心"
,
showAuth
:
false
,
contentHeight
:
0
,
mainColor
:
""
,
u
:{},
g
:{},
}
},
components
:{
auth
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
...
...
@@ -69,28 +61,18 @@
});
},
onLoad
(){
this
.
u
=
uni
.
getStorageSync
(
"userinfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
balancedata
()
this
.
getrecharge
()
//充值金额的列表
},
methods
:
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"userinfo"
);
this
.
showAuth
=
false
},
balancedata
(){
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
()
...
...
@@ -109,27 +91,8 @@
}
);
},
getlogs
(){
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
()
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/recharge/index"
,
date
:
this
.
date2
,
}
},
res
=>
{
uni
.
hideNavigationBarLoading
()
}
);
},
btn_recharge
(){
},
...
...
pages/balance/rules.vue
0 → 100644
View file @
2632b279
<
template
>
<view
class=
"balancerulesStyle"
:style=
"
{'height':contentHeight}" >
<view
class=
"rulesbox"
>
<Text>
暂无余额说明
</Text>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"余额说明"
,
contentHeight
:
0
,
mainColor
:
""
,
g
:{},
}
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
}
}
</
script
>
<
style
>
.balancerulesStyle
{
background
:
#fff
;
width
:
100%
;
}
.rulesbox
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
</
style
>
pages/coupon/details/details.vue
View file @
2632b279
...
...
@@ -2,26 +2,26 @@
<view
class=
"coupondetailsStyle"
:style=
"
{ height: contentHeight }">
<view
class=
"cd_box"
>
<Text
class=
'cd_name'
>
{{
g
.
n
ame
}}
{{
g
.
N
ame
}}
</Text>
<!--
<Text
class=
'sub_price'
>
¥
{{
g
.
sub_price
}}
</Text>
-->
<view
style=
"display: flex;align-items: flex-end;"
>
<Text
style=
'font-size: 32px;'
>
{{
g
.
type
==
1
?
Number
(
g
.
discount
):
Number
(
g
.
sub_price
)
}}
</Text>
<Text
style=
'font-size: 14px;'
>
{{
g
.
type
==
1
?
'折'
:
""
}}
</Text>
<Text
style=
'font-size: 32px;'
>
{{
g
.
DiscountsPrice
}}
</Text>
<Text
style=
'font-size: 14px;'
>
{{
g
.
CouponType
==
2
?
'折'
:
""
}}
</Text>
</view>
<Text
class=
'condition'
>
满
{{
Number
(
g
.
min_price
)
}}
可用
满
{{
g
.
MinConsumePrice
}}
可用
</Text>
<
Text
v-if=
'g.type==1'
>
优惠上限:¥
{{
Number
(
g
.
discount_limit
)
}}
</Text
>
<
!--
<Text
v-if=
'g.type==1'
>
优惠上限:¥
{{
Number
(
g
.
MaxDiscountsPrice
)
}}
</Text>
--
>
<view
v-if=
'type==2
'
class=
"receive"
:style=
"
{'background':mainColor}" @click="receive(g.i
d)">
<view
v-if=
'type==2
&& g.IsReceive==0'
class=
"receive"
:style=
"
{'background':mainColor}" @click="receive(g.CouponI
d)">
<Text>
立即领取
立即领取
</Text>
</view>
<view
v-if=
'type==1
'
class=
"gouse"
@
click=
"gouseUrl(g.page_url
)"
>
<view
v-if=
'type==1
|| g.IsReceive==1'
class=
"gouse"
@
click=
"gouseUrl(g
)"
>
<Text>
去使用
</Text>
...
...
@@ -29,17 +29,17 @@
<view
style=
"width: 100%;border-top: 1px dashed #f5f5f5;margin: 10px 0;"
></view>
<Text
class=
'c_name'
style=
'margin-top: 25px;'
>
有效期
</Text>
<Text
class=
'cd_content'
v-if=
'g.expire_type==1'
>
领取后
{{
g
.
expire_day
}}
天内有效
</Text>
<Text
class=
'cd_content'
v-if=
'g.expire_type==2'
>
{{
g
.
begin_time
}}
-
{{
g
.
end_time
}}
</Text>
<
!--
<
Text
class=
'cd_content'
v-if=
'g.expire_type==1'
>
领取后
{{
g
.
expire_day
}}
天内有效
</Text>
<Text
class=
'cd_content'
v-if=
'g.expire_type==2'
>
{{
g
.
begin_time
}}
-
{{
g
.
end_time
}}
</Text>
-->
<Text
class=
'cd_content'
>
{{
g
.
StartDate
}}
-
{{
g
.
EndDate
}}
</Text>
<Text
class=
'c_name'
style=
'margin-top: 1px;'
>
使用规则
</Text>
<Text
class=
'cd_content'
v-if=
'g.
appoint_type==1'
>
适用类别:
<Text
v-for=
"(item, index) in g.goods"
:key=
"index"
>
{{
item
.
nam
e
}}
</Text>
</Text>
<Text
class=
'cd_content'
v-if=
'g.
appoint_type==2'
>
适用商品:
<Text
v-for=
"(item, index) in g.goods"
:key=
"index"
>
{{
item
.
nam
e
}}
</Text>
</Text>
<Text
class=
'cd_content'
v-if=
'g.
appoint_t
ype==3'
>
适用范围:全场通用
</Text>
<Text
class=
'cd_content'
v-if=
'g.
appoint_t
ype==4'
>
适用方式:当面付
</Text>
<Text
class=
'cd_content'
v-if=
'g.
UseType==1'
>
适用类别:
<Text
v-for=
"(item, index) in g.ProductList"
:key=
"index"
>
{{
item
.
Relevanc
e
}}
</Text>
</Text>
<Text
class=
'cd_content'
v-if=
'g.
UseType==2'
>
适用商品:
<Text
v-for=
"(item, index) in g.ProductList"
:key=
"index"
>
{{
item
.
Relevanc
e
}}
</Text>
</Text>
<Text
class=
'cd_content'
v-if=
'g.
UseT
ype==3'
>
适用范围:全场通用
</Text>
<Text
class=
'cd_content'
v-if=
'g.
UseT
ype==4'
>
适用方式:当面付
</Text>
<Text
class=
'c_name'
style=
'margin-top: 1px;'
>
使用说明
</Text>
<Text
class=
'cd_content'
>
{{
g
.
rul
e
}}
</Text>
<Text
class=
'cd_content'
>
{{
g
.
Describ
e
}}
</Text>
</view>
...
...
@@ -84,33 +84,12 @@ export default {
},
onLoad
:
function
(
option
)
{
this
.
type
=
option
.
type
if
(
option
.
type
==
1
){
//查看自己优惠详情
this
.
getdetail
(
option
.
coupon_id
)
}
else
if
(
option
.
type
==
2
){
//查看领券中心的优惠券
this
.
init
(
option
.
coupon_id
);
}
let
item
=
JSON
.
parse
(
decodeURIComponent
(
option
.
item
))
this
.
g
=
item
},
methods
:
{
getdetail
(
coupon_id
)
{
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/coupon/user-coupon-detail"
,
user_coupon_id
:
coupon_id
},
},
(
res
)
=>
{
this
.
g
=
res
.
data
.
list
uni
.
hideNavigationBarLoading
();
}
);
},
init
(
coupon_id
)
{
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
...
...
@@ -130,32 +109,36 @@ export default {
);
},
receive
(
id
){
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/coupon/receive"
,
coupon_id
:
id
},
},
this
.
request2
(
{
url
:
'/api/AppletUser/GrantCoupon'
,
data
:
{
CouponId
:
id
}
},
(
res
)
=>
{
uni
.
hideNavigationBarLoading
(),
// this.isreceive = true
this
.
$refs
.
uToast
.
show
({
title
:
"领取成功"
});
uni
.
navigateTo
({
url
:
"/pages/coupon/index/index"
}
);
}
if
(
res
.
resultCode
==
1
){
uni
.
showToast
({
title
:
res
.
message
,
icon
:
"none"
});
this
.
g
.
IsReceive
=
1
;
}
}
);
},
gouseUrl
(
url
){
uni
.
redirectTo
({
url
:
url
});
gouseUrl
(
g
){
let
id
if
(
this
.
type
==
1
){
id
=
g
.
ID
}
else
if
(
this
.
type
==
2
){
id
=
g
.
CouponId
}
uni
.
redirectTo
({
url
:
'/pages/goods/list?coupon_id='
+
id
});
}
},
...
...
pages/coupon/index/index.vue
View file @
2632b279
...
...
@@ -3,7 +3,7 @@
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"
current
"
:current=
"
msg.UseState
"
@
change=
"change"
:active-color=
"mainColor"
></u-tabs>
...
...
@@ -15,7 +15,6 @@
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
padding-top: 10px;
padding-bottom: 50px;
"
>
...
...
@@ -27,18 +26,18 @@
:style=
"
{ height: '100%' }"
>
<view
class=
"couponList"
>
<view
class=
"item"
v-for=
"(x, i) in g"
:key=
"i"
@
click=
"godetails(x
.id
)"
>
<view
:class=
"
current
==0? 'ticket':'ticket2'"
>
<view
class=
"item"
v-for=
"(x, i) in g"
:key=
"i"
@
click=
"godetails(x)"
>
<view
:class=
"
msg.UseState
==0? 'ticket':'ticket2'"
>
<view
class=
"miane"
>
<view
class=
"money"
>
<!--
<text
style=
"font-size: 44px;"
>
{{
x
.
sub_price
.
toString
().
split
(
'.'
)[
0
]
}}
</text>
<text
v-if=
"x.coupon.type==1"
>
折
</text>
-->
<text
class=
"small"
v-if=
"x.
coupon.type==2
"
>
¥
</text>
<Text
style=
'font-size: 44px;'
>
{{
x
.
type
==
1
?
Number
(
x
.
discount
)
:
Number
(
x
.
sub_price
)
}}
</Text>
<Text
class=
"small"
>
{{
x
.
type
==
1
?
'折'
:
""
}}
</Text>
<text
class=
"small"
v-if=
"x.
CouponType==1
"
>
¥
</text>
<Text
style=
'font-size: 44px;'
>
{{
Number
(
x
.
DiscountsPrice
)
}}
</Text>
<Text
class=
"small"
>
{{
x
.
CouponType
==
2
?
'折'
:
""
}}
</Text>
</view>
<view
class=
"tiaojian"
>
满
{{
Number
(
x
.
coupon_min_p
rice
)
}}
元可用
</view>
<view
class=
"tiaojian"
>
满
{{
Number
(
x
.
MinConsumeP
rice
)
}}
元可用
</view>
</view>
<view
style=
'width: 10px;height: 10px;border-radius: 5px;background: #f3f4f6;position: absolute;right: -5px;top:-5px'
></view>
<view
style=
'width: 10px;height: 10px;border-radius: 5px;background: #f3f4f6;position: absolute;right: -5px;bottom:-5px'
></view>
...
...
@@ -47,25 +46,26 @@
</view>
<view
class=
"detail"
>
<view
class=
"coupond"
>
<view
class=
"name"
>
{{
x
.
coupon
.
n
ame
}}
</view>
<view
class=
"date"
>
{{
x
.
start_time
+
"-"
+
x
.
end_tim
e
}}
</view>
<Text
class=
"rule"
v-if=
'x.
coupon.appoint_type
==1'
>
限商品类别
</Text>
<Text
class=
"rule"
v-if=
'x.
coupon.appoint_type
==2'
>
限商品
</Text>
<Text
class=
"rule"
v-if=
'x.
coupon.appoint_type
==3'
>
全场通用
</Text>
<Text
class=
"rule"
v-if=
'x.
coupon.appoint_type
==4'
>
当面付
</Text>
<view
class=
"name"
>
{{
x
.
N
ame
}}
</view>
<view
class=
"date"
>
{{
x
.
StartDate
+
"-"
+
x
.
EndDat
e
}}
</view>
<Text
class=
"rule"
v-if=
'x.
UseTypeStr
==1'
>
限商品类别
</Text>
<Text
class=
"rule"
v-if=
'x.
UseTypeStr
==2'
>
限商品
</Text>
<Text
class=
"rule"
v-if=
'x.
UseTypeStr
==3'
>
全场通用
</Text>
<Text
class=
"rule"
v-if=
'x.
UseTypeStr
==4'
>
当面付
</Text>
</view>
</view>
</view>
</view>
<u-divider
contentPosition=
"center"
v-if=
"isover"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
>
没有更多优惠券了
</u-divider
>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
<view
style=
"width: 100%;height: 50px;background: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;left: 0;bottom: 0;"
@
click=
"goUrl"
>
...
...
@@ -91,7 +91,7 @@ export default {
data
()
{
return
{
pageTitle
:
"我的优惠券"
,
current
:
0
,
list
:
[
{
name
:
"未使用"
},
{
name
:
"已使用"
},
...
...
@@ -99,14 +99,21 @@ export default {
],
mainColor
:
""
,
contentHeight
:
0
,
page
:
1
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
UseState
:
0
},
page_count
:
1
,
g
:
[],
loading
:
false
,
showModal
:
false
,
item
:
""
,
index
:
0
,
isover
:
false
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多优惠券了"
,
},
};
},
created
()
{
...
...
@@ -128,59 +135,55 @@ export default {
title
:
this
.
pageTitle
,
});
},
onLoad
:
function
(
option
)
{
//option为object类型,会序列化上个页面传递的参数
// this.current = option.status;
onLoad
:
function
(
option
)
{
this
.
loading
=
true
;
this
.
init
();
},
methods
:
{
change
(
index
)
{
console
.
log
(
index
)
this
.
current
=
index
;
this
.
page
=
1
;
this
.
msg
.
UseState
=
index
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
loading
=
true
;
this
.
init
();
},
init
()
{
this
.
isover
=
false
;
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/coupon/user-coupon"
,
status
:
this
.
current
+
1
,
page
:
this
.
page
,
},
},
(
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
list
.
length
>
0
){
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
list
);
// TODO 这里没返一共多少页 注意下
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
}
}
);
this
.
request2
(
{
url
:
'/api/AppletUser/GetMemberCouponPageList'
,
data
:
this
.
msg
},
res
=>
{
uni
.
hideNavigationBarLoading
();
if
(
res
.
resultCode
==
1
){
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
lower
(
e
)
{
if
(
this
.
page
<
this
.
page_count
)
{
this
.
page
++
;
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
},
godetails
(
i
d
){
if
(
this
.
current
==
0
){
godetails
(
i
tem
){
if
(
this
.
msg
.
UseState
==
0
){
uni
.
navigateTo
({
url
:
"/pages/coupon/details/details?
coupon_id="
+
id
+
'&type=1'
url
:
"/pages/coupon/details/details?
item="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&type=1'
});
}
...
...
pages/coupon/list/list.vue
View file @
2632b279
...
...
@@ -19,34 +19,42 @@
:style=
"
{ height: '100%' }"
>
<view
class=
"couponlist"
>
<view
class=
"c_list_item"
v-for=
"(x, i) in g"
:key=
"i"
@
click=
"goUrl(x
.id
)"
>
<view
class=
"c_list_item"
v-for=
"(x, i) in g"
:key=
"i"
@
click=
"goUrl(x)"
>
<view
class=
"item_top"
>
<view
class=
"item_top_l"
>
<view
style=
"display: flex;align-items: flex-end;"
>
<Text
style=
'font-size: 32px;'
>
{{
x
.
type
==
1
?
Number
(
x
.
discount
):
Number
(
x
.
sub_p
rice
)
}}
</Text>
<Text
style=
'font-size: 14px;'
>
{{
x
.
type
==
1
?
'折'
:
""
}}
</Text>
<Text
style=
'font-size: 32px;'
>
{{
Number
(
x
.
DiscountsP
rice
)
}}
</Text>
<Text
style=
'font-size: 14px;'
>
{{
x
.
CouponType
==
2
?
'折'
:
""
}}
</Text>
</view>
<view
style=
"display: flex;flex-direction: column;margin-left: 10px;width: 210px;"
>
<Text
class=
'top_title'
>
{{
x
.
n
ame
}}
</Text>
<Text>
满
{{
Number
(
x
.
min_p
rice
)
}}
可用
</Text>
<Text
v-if=
'
x.type==1'
>
优惠上限:¥
{{
Number
(
x
.
discount_limit
)
}}
</Text>
<Text
class=
'top_title'
>
{{
x
.
N
ame
}}
</Text>
<Text>
满
{{
Number
(
x
.
MinConsumeP
rice
)
}}
可用
</Text>
<Text
v-if=
'
Number(x.MaxDiscountsPrice)>1'
>
优惠上限:¥
{{
Number
(
x
.
MaxDiscountsPrice
)
}}
</Text>
</view>
</view>
<view
class=
"receive"
@
click
.
stop=
"receive(x
.id
)"
>
<Text>
立即领取
</Text>
<view
class=
"receive"
@
click
.
stop=
"receive(x
,i
)"
>
<Text>
{{
x
.
IsReceive
==
1
?
'已领取'
:
'立即领取'
}}
</Text>
</view>
</view>
<view
class=
"item_b"
>
<Text
v-if=
'x.expire_type==1'
>
领券后
{{
x
.
expire_day
}}
天过期
</Text>
<Text
v-if=
'x.expire_type==2'
>
有效日期
{{
x
.
begin_time
}}
-
{{
x
.
end_time
}}
</Text>
<Text
class=
'top_title'
v-if=
'x.appoint_type==1'
>
适用类别:
<Text
v-for=
"(item, index) in x.goods"
:key=
"index"
>
{{
item
.
name
}}
</Text>
</Text>
<Text
class=
'top_title'
v-if=
'x.appoint_type==2'
>
适用商品:
<Text
v-for=
"(item, index) in x.goods"
:key=
"index"
>
{{
item
.
name
}}
</Text>
</Text>
<Text
class=
'top_title'
v-if=
'x.appoint_type==3'
>
适用范围:全场通用
</Text>
<Text
class=
'top_title'
v-if=
'x.appoint_type==4'
>
适用方式:当面付
</Text>
<Text
v-if=
'x.IndateType==1'
>
领券后
{{
x
.
IndateDay
}}
天过期
</Text>
<Text
v-if=
'x.IndateType==2'
>
有效日期
{{
x
.
StartDate
}}
-
{{
x
.
EndDate
}}
</Text>
<!--
<Text
class=
"top_title"
>
{{
x
.
UseTypeStr
}}
</Text>
-->
<Text
class=
'top_title'
v-if=
'x.UseType==1'
>
适用类别:
<Text
v-for=
"(item, index) in x.ProductList"
:key=
"index"
>
{{
item
.
Relevance
}}
</Text>
</Text>
<Text
class=
'top_title'
v-if=
'x.UseType==2'
>
适用商品:
<Text
v-for=
"(item, index) in x.ProductList"
:key=
"index"
>
{{
item
.
Relevance
}}
</Text>
</Text>
<Text
class=
'top_title'
v-if=
'x.UseType==3'
>
适用范围:全场通用
</Text>
<Text
class=
'top_title'
v-if=
'x.UseType==4'
>
适用方式:当面付
</Text>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
...
...
@@ -69,9 +77,17 @@ export default {
contentHeight
:
0
,
g
:
[],
loading
:
false
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
},
page_count
:
1
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多优惠券了"
,
},
};
},
created
()
{
...
...
@@ -102,56 +118,60 @@ export default {
methods
:
{
init
()
{
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/coupon/list"
,
},
},
(
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
list
.
length
>
0
){
this
.
g
=
res
.
data
.
list
;
}
uni
.
hideNavigationBarLoading
();
}
this
.
request2
(
{
url
:
'/api/AppletUser/GetAllCouponPageList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
loading
=
false
;
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
goUrl
(
i
d
){
goUrl
(
i
tem
){
uni
.
navigateTo
({
url
:
"/pages/coupon/details/details?
coupon_id="
+
id
+
'&type=2'
url
:
"/pages/coupon/details/details?
item="
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&type=2'
});
},
receive
(
id
){
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/coupon/receive"
,
coupon_id
:
id
},
},
(
res
)
=>
{
uni
.
hideNavigationBarLoading
(),
this
.
$refs
.
uToast
.
show
({
title
:
"领取成功"
});
// uni.navigateTo({
// url: "/pages/coupon/index/index"
// });
}
);
receive
(
x
,
i
){
if
(
x
.
IsReceive
==
0
){
this
.
request2
(
{
url
:
'/api/AppletUser/GrantCoupon'
,
data
:
{
CouponId
:
x
.
CouponId
}
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
){
uni
.
showToast
({
title
:
res
.
message
,
icon
:
"none"
});
this
.
g
[
i
].
IsReceive
=
1
;
}
}
);
}
else
{
uni
.
showToast
({
title
:
"已领取过优惠券"
,
icon
:
"none"
});
}
}
},
...
...
pages/favorite/favorite.vue
View file @
2632b279
...
...
@@ -55,7 +55,7 @@
</view>
</
template
>
<
!-- <auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> --
>
<
auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
></auth
>
</view>
</template>
...
...
pages/order/express.vue
0 → 100644
View file @
2632b279
<
template
>
<view
class=
"express"
>
<view
class=
"status-box"
>
<view
class=
"item"
>
<view
class=
"name"
>
快递公司:
</view>
<view
class=
"val"
>
{{
express
}}
</view>
</view>
<view
class=
"item"
>
<view
class=
"name"
>
运单号:
</view>
<view
class=
"val"
>
{{
express_no
}}
</view>
</view>
<view
class=
"item"
>
<view
class=
"name"
>
运送状态:
</view>
<view
class=
"val"
:style=
"
{ color: mainColor }">
{{
d
.
status_text
}}
</view>
</view>
</view>
<view
style=
"
margin-top: 40rpx;
background: #fff;
padding: 40rpx;
border-radius: 20rpx;
"
>
<u-time-line>
<u-time-line-item
nodeTop=
"2"
>
<template
v-slot:node
>
<view
class=
"u-node meudim"
:style=
"
{ background: mainColor, color: '#FFF' }"
>收
</view
>
</
template
>
<
template
v-slot:content
>
<view>
<view
class=
"u-order-desc"
style=
"
padding-bottom: 60rpx;
margin-top: 5rpx;
font-size: 26rpx;
"
>
收货地址:
{{
address
}}
</view
>
</view>
</
template
>
</u-time-line-item>
<u-time-line-item
nodeTop=
"2"
v-if=
"d.status == 3"
>
<
template
v-slot:node
>
<view
class=
"u-node"
:style=
"
{ background: mainColor }">
<u-icon
name=
"success"
color=
"#fff"
:size=
"32"
></u-icon>
</view>
</
template
>
<
template
v-slot:content
>
<view
style=
"padding-bottom: 30rpx;color:#000 !important;"
>
<view
class=
"u-order-title"
>
已签收
</view>
<view
class=
"u-order-desc"
>
{{
last
.
desc
}}
</view>
<view
class=
"u-order-time"
>
{{
last
.
datetime
}}
</view>
</view>
</
template
>
</u-time-line-item>
<u-time-line-item
v-for=
"(x, i) in d.list"
:key=
"i"
>
<!-- 此处没有自定义左边的内容,会默认显示一个点 -->
<
template
v-slot:content
>
<view
style=
"padding-bottom: 30rpx;"
:style=
"
{color:(i==0
&&
d.status!=3)?'#000 !important':'gray'}">
<view
class=
"u-order-desc"
>
{{
x
.
desc
}}
</view>
<view
class=
"u-order-time"
>
{{
x
.
datetime
}}
</view>
</view>
</
template
>
</u-time-line-item>
</u-time-line>
</view>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
mainColor
:
""
,
express
:
""
,
express_no
:
""
,
d
:
{},
loading
:
false
,
address
:
""
,
last
:
{},
};
},
onLoad
(
option
)
{
uni
.
setNavigationBarTitle
({
title
:
"物流信息"
,
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
express
=
option
.
express
||
"圆通速递"
;
this
.
express_no
=
option
.
no
||
"YT2042624009816"
;
this
.
address
=
option
.
address
||
"四川成都市高新西区万景峰二期"
;
this
.
init
();
},
methods
:
{
init
()
{
let
h
=
this
.
apiheader
();
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/order/express-detail"
,
express
:
this
.
express
,
express_no
:
this
.
express_no
,
customer_name
:
""
,
},
},
(
res
)
=>
{
this
.
loading
=
false
;
this
.
d
=
res
.
data
.
express
;
this
.
d
.
list
=
this
.
d
.
list
.
reverse
();
if
(
this
.
d
.
status
==
3
)
{
this
.
last
=
this
.
d
.
list
[
0
];
this
.
d
.
list
.
splice
(
0
,
1
);
}
}
);
},
},
};
</
script
>
<
style
>
.express
{
min-height
:
100vh
;
background
:
#f5f5f5
;
font-family
:
"aaa"
;
}
.express
.status-box
{
background
:
#fff
;
padding
:
60
rpx
40
rpx
;
padding-bottom
:
0
;
border-bottom-left-radius
:
20
rpx
;
border-bottom-right-radius
:
20
rpx
;
}
.express
.status-box
.item
{
display
:
flex
;
align-items
:
center
;
padding-bottom
:
40
rpx
;
}
.express
.status-box
.item
.name
{
font-size
:
24
rpx
;
color
:
#888
;
width
:
120
rpx
;
margin-right
:
40
rpx
;
}
.express
.status-box
.item
.val
{
font-family
:
"aaa"
;
font-size
:
28
rpx
;
color
:
#000
;
font-weight
:
600
;
width
:
1
rpx
;
flex
:
1
;
}
.u-node
{
width
:
44
rpx
;
height
:
44
rpx
;
border-radius
:
100
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background
:
#d0d0d0
;
}
.u-node.meudim
{
width
:
40
rpx
;
height
:
40
rpx
;
font-size
:
24
rpx
;
}
.u-order-title
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
32
rpx
;
margin-bottom
:
20
rpx
;
}
.u-order-desc
{
/* color: rgb(150, 150, 150); */
font-size
:
28
rpx
;
margin-bottom
:
10
rpx
;
}
.u-order-time
{
/* color: rgb(200, 200, 200); */
font-size
:
26
rpx
;
}
</
style
>
pages/order/order-detail.vue
View file @
2632b279
...
...
@@ -74,6 +74,34 @@
<view
class=
"good-price"
>
¥
{{
x
.
total_original_price
}}
</view>
</view>
</view>
<template
v-for=
"(e, ei) in orders.detailExpress"
>
<view
:key=
"ei"
class=
"order-info-item peisong"
>
<template
v-for=
"(ec, eci) in e.expressRelation"
>
<view
class=
"field"
:key=
"eci"
v-if=
"e.send_type == '2' && ec.order_detail_id == x.id"
>
<view
class=
"label"
>
配送方式
</view>
<view
class=
"content"
>
{{
e
.
express_content
}}
</view>
</view>
<view
class=
"field"
:key=
"eci"
@
click=
"goExpressHandler(e.express, e.express_no)"
v-if=
"e.send_type == '1' && ec.order_detail_id == x.id"
>
<view
class=
"label"
>
配送方式
</view>
<view
class=
"content"
>
{{
e
.
express
}}
{{
e
.
express_no
}}
</view
>
<view
style=
"margin-left: 10px;"
>
<u-icon
name=
"arrow"
size=
"32"
color=
"#000"
></u-icon>
</view>
</view>
</
template
>
</view>
</template>
<view
style=
"
margin-top: 20px;
...
...
@@ -119,14 +147,14 @@
<view
class=
"content"
>
{{ orders.pay_time }}
</view>
</view>
</view>
<
view
class=
"order-info-item
"
>
<
!-- <view class="order-info-item" v-if="orders.detailExpress[0].
">
<view class="field">
<view class="label">配送方式:</view>
<view class="content">{{
orders.detailExpress[0].express_content
}}</view>
</view>
</view>
</view>
-->
</view>
<view
class=
"block"
>
<view
class=
"order-info-item"
>
...
...
@@ -188,22 +216,20 @@
>
确认收货
</u-button
>
</view>
<view
class=
"item"
v-if=
"orders.status_text == '待付款'"
>
<u-button
shape=
"circle"
size=
"medium"
:custom-style=
"themCustomStyle"
<view
class=
"item"
v-if=
"orders.status_text == '待付款'"
>
<u-button
shape=
"circle"
size=
"medium"
:custom-style=
"themCustomStyle"
>
立即支付
</u-button
>
</view>
<view
class=
"item"
v-if=
"orders.status_text == '待收货'"
>
<u-button
shape=
"circle"
size=
"medium"
:custom-style=
"customStyle"
<!-- <view class="item" v-if="orders.status_text == '待收货'">
<u-button
shape="circle"
@click=""
size="medium"
:custom-style="customStyle"
>查看物流</u-button
>
</view>
</view>
-->
<view
class=
"item"
v-if=
"orders.status_text == '待收货'"
>
<u-button
shape=
"circle"
...
...
@@ -273,11 +299,11 @@
<
script
>
import
afterSale
from
"@/components/userorder/after-sale"
;
import
goodlist
from
"@/components/goods/list"
import
goodlist
from
"@/components/goods/list"
;
export
default
{
components
:
{
afterSale
,
goodlist
goodlist
,
},
data
()
{
return
{
...
...
@@ -324,6 +350,17 @@ export default {
shouhuoHandler
()
{
this
.
showReviceModal
=
true
;
},
goExpressHandler
(
express
,
no
)
{
uni
.
navigateTo
({
url
:
"/pages/order/express?express="
+
express
+
"&no="
+
no
+
"&address="
+
this
.
orders
.
address
,
});
},
submitReviceGoodHandler
()
{
let
that
=
this
;
let
h
=
this
.
apiheader
();
...
...
@@ -604,6 +641,14 @@ export default {
margin-bottom
:
15px
;
display
:
flex
;
}
.orderdetail
.order-info-item.peisong
{
border
:
none
;
background
:
#f1f1f1
;
border-radius
:
5px
;
padding
:
10px
;
margin
:
15px
0
5px
0
;
overflow
:
hidden
;
}
.orderdetail
.order-info-item
.field
:last-child
{
margin-bottom
:
0
;
}
...
...
pages/share/index/index.vue
View file @
2632b279
...
...
@@ -68,7 +68,7 @@
<Text><Text
:style=
"
{color:mainColor}">
{{
orderdata
.
order_money
}}
</Text>
元
</Text>
</view>
<view
class=
"menus_item"
@
click=
"goUrl(sharemenus.
team
.url)"
>
<view
class=
"menus_item"
@
click=
"goUrl(sharemenus.
cash
.url)"
>
<image
:src=
"sharemenus.cash.icon"
style=
"width: 30px;"
mode=
'widthFix'
></image>
<Text
class=
'item_text'
>
{{
sharemenus
.
cash
.
name
}}
</Text>
<Text><Text
:style=
"
{color:mainColor}">
{{
orderdata
.
total_cash
}}
</Text>
元
</Text>
...
...
static/logo.png
deleted
100644 → 0
View file @
d812e117
3.93 KB
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