Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
decf9de4
Commit
decf9de4
authored
May 11, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
d4b00a44
b1267354
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
820 additions
and
199 deletions
+820
-199
App.vue
src/App.vue
+22
-23
cert.js
src/common/api/cert.js
+13
-0
index.js
src/common/api/index.js
+4
-1
settled.js
src/common/api/settled.js
+6
-0
http.interceptor.js
src/common/http.interceptor.js
+4
-1
pages.json
src/pages.json
+41
-53
index.vue
src/pages/index/index.vue
+4
-4
mine.vue
src/pages/index/mine.vue
+1
-1
addSite.vue
src/pages/mine/address/addSite.vue
+249
-65
index.vue
src/pages/mine/address/index.vue
+34
-46
detail.vue
src/pages/mine/cert/detail.vue
+65
-0
index.vue
src/pages/mine/cert/index.vue
+148
-0
index.vue
src/pages/mine/customer/index.vue
+77
-0
index.vue
src/pages/mine/wallet/index.vue
+151
-4
index.js
src/store/index.js
+1
-1
No files found.
src/App.vue
View file @
decf9de4
...
...
@@ -106,29 +106,28 @@ export default {
}
catch
(
a
)
{
}
},
async
getBaseInfo
(
vm
,
callBack
)
{
uni
.
showLoading
({
title
:
"加载中……"
,
});
const
res
=
await
vm
.
$u
.
api
.
getSettleBaseInfo
();
console
.
log
(
res
,
"res"
);
if
(
res
.
code
!==
200
)
{
uni
.
showToast
({
title
:
(
res
&&
res
.
message
)
||
"获取基本信息错误"
,
icon
:
"none"
,
});
return
false
;
}
this
.
globalData
.
settledInfo
=
res
.
data
;
if
(
!
res
.
data
)
{
return
;
}
if
(
typeof
callBack
==
"function"
)
{
callBack
(
vm
,
res
.
data
);
}
uni
.
hideLoading
();
return
res
.
data
;
async
getBaseInfo
(
vm
,
callBack
)
{
uni
.
showLoading
({
title
:
"加载中……"
,
});
const
res
=
await
vm
.
$u
.
api
.
getSettleBaseInfo
();
if
(
res
.
code
!==
200
)
{
uni
.
showToast
({
title
:
(
res
&&
res
.
message
)
||
"获取基本信息错误"
,
icon
:
"none"
,
});
return
false
;
}
vm
.
$u
.
vuex
(
'vuex_settled'
,
res
.
data
&&
res
.
data
.
record
||
null
);
if
(
!
res
.
data
)
{
return
;
}
if
(
typeof
callBack
==
"function"
)
{
callBack
(
vm
,
res
.
data
);
}
uni
.
hideLoading
();
return
res
.
data
;
},
/**
...
...
src/common/api/cert.js
0 → 100644
View file @
decf9de4
const
globalUrl
=
process
.
uniEnv
||
{}
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
let
certApiFun
=
function
(
vm
){
let
getCertList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/get-cert-list'
,
params
);
const
certApi
=
{
getCertList
}
return
certApi
}
module
.
exports
=
{
certApiFun
}
\ No newline at end of file
src/common/api/index.js
View file @
decf9de4
...
...
@@ -10,6 +10,7 @@ import {
import
{
learnApiFun
}
from
"@/common/api/learn.js"
;
import
{
orderApiFun
}
from
"@/common/api/order.js"
;
import
{
assessmentApiFun
}
from
"@/common/api/assessment.js"
import
{
certApiFun
}
from
"@/common/api/cert.js"
let
apiFun
=
function
(
vm
)
{
let
commonApi
=
commonApiFun
(
vm
);
let
settledApi
=
settledApiFun
(
vm
)
...
...
@@ -17,13 +18,15 @@ let apiFun = function(vm) {
let
learnApi
=
learnApiFun
(
vm
)
let
assessmentApi
=
assessmentApiFun
(
vm
)
let
orderApi
=
orderApiFun
(
vm
)
let
certApi
=
certApiFun
(
vm
)
let
apiUrl
=
{
...
commonApi
,
...
settledApi
,
...
cloudApi
,
...
learnApi
,
...
orderApi
,
...
assessmentApi
...
assessmentApi
,
...
certApi
}
return
apiUrl
}
...
...
src/common/api/settled.js
View file @
decf9de4
...
...
@@ -41,6 +41,11 @@ let settledApiFun = function(vm){
/* 获取消息内容列表 */
let
listByNotice
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/notice/home-list'
,
params
);
/**
* 我的-更新收货地址
*/
let
syncAddress
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/sync-address'
,
params
);
const
settledApi
=
{
getSettleBaseInfo
,
getSettleArea
,
...
...
@@ -56,6 +61,7 @@ let settledApiFun = function(vm){
listOrderingTutorials
,
saveCourseRate
,
listByNotice
,
syncAddress
,
}
return
settledApi
}
...
...
src/common/http.interceptor.js
View file @
decf9de4
...
...
@@ -93,7 +93,10 @@ const install = (Vue, vm) => {
message
:
msg
};
case
401
:
// token失效,跳转登录
// token失效,清空登录信息,同时跳转登录
vm
.
$u
.
vuex
(
'vuex_token'
,
''
);
vm
.
$u
.
vuex
(
'vuex_user'
,
null
);
vm
.
$u
.
vuex
(
'vuex_wx_uid'
,
''
);
toLoginPage
()
case
403
:
//没有权限访问
case
500
:
...
...
src/pages.json
View file @
decf9de4
...
...
@@ -34,7 +34,7 @@
"path"
:
"pages/index/mine"
,
"style"
:
{
"navigationBarTitleText"
:
"我的"
,
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
true
}
},
...
...
@@ -156,17 +156,40 @@
"navigationStyle"
:
"custom"
,
//
隐藏系统导航栏
"disableScroll"
:
true
}
},
{
"path"
:
"wallet/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的钱包"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
}
]
},
{
"path"
:
"wallet/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的钱包"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
//
隐藏系统导航栏
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"cert/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的证件"
,
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"cert/detail"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
//证件详情
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"customer/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"联系客服"
,
"enablePullDownRefresh"
:
false
}
}
]
},
{
"root"
:
"pages/order"
,
...
...
@@ -396,16 +419,6 @@
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
{
"name"
:
"自营平台"
,
//模式名称
"path"
:
"pages/index/index"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单列表"
,
//模式名称
"path"
:
"pages/index/order"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"拍照小工具"
,
//模式名称
"path"
:
"pages/photo/index"
,
//启动页面,必选
...
...
@@ -417,11 +430,6 @@
"path"
:
"pages/order/feedback"
,
"query"
:
""
},
{
"name"
:
"订单详情"
,
//模式名称
"path"
:
"pages/order/detail"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"在线考试"
,
//模式名称
"path"
:
"pages/learn/exam"
,
//启动页面,必选
...
...
@@ -439,36 +447,16 @@
"id"
:
11880091
}
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"资料信息"
,
//模式名称
"path"
:
"pages/settle/file"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"缴纳保证金"
,
//模式名称
"path"
:
"pages/settle/pay-ensure"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"签约页面"
,
//模式名称
"path"
:
"pages/settle/sign-contract"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单 - 拒单"
,
//模式名称
"path"
:
"pages/order/refuse"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单 - 过程反馈"
,
//模式名称
"path"
:
"pages/order/feedback"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"学习 - 首页"
,
//模式名称
"path"
:
"pages/index/learn"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
},
{
"name"
:
"我的 - 我的证件 - 列表"
,
//模式名称
"path"
:
"pages/mine/cert/index"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
}
}
\ No newline at end of file
src/pages/index/index.vue
View file @
decf9de4
...
...
@@ -106,10 +106,10 @@
};
},
watch
:
{
vuex_token
(
val
,
oldVal
)
{
// 监听token变化,如果更新则重新加载页面数据
val
&&
this
.
initSettleInfo
()
}
//
vuex_token(val, oldVal) {
//
// 监听token变化,如果更新则重新加载页面数据
//
val && this.initSettleInfo()
//
}
},
computed
:
{
buttonStyle
()
{
...
...
src/pages/index/mine.vue
View file @
decf9de4
...
...
@@ -123,7 +123,7 @@
return
process
.
uniEnv
.
qn_base_url
},
pages
()
{
return
[
'wallet'
,
''
,
'contract'
,
'
'
,
'address'
,
''
,
'
'
]
return
[
'wallet'
,
''
,
'contract'
,
'
cert'
,
'address'
,
''
,
'customer
'
]
},
headImageUrl
()
{
return
this
.
info
.
headImage
||
this
.
placeholderImage
...
...
src/pages/mine/address/addSite.vue
View file @
decf9de4
<
template
>
<view
class=
"wrap"
>
<w-navbar
:title=
"title"
></w-navbar>
<view
class=
"top"
>
<view
class=
"item"
>
<view
class=
"left"
>
收货人
</view>
<input
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写收货人
姓名"
/>
<view
class=
"left"
>
姓名
</view>
<input
disabled
v-model=
"name"
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写
姓名"
/>
</view>
<view
class=
"item"
>
<view
class=
"left"
>
手机号码
</view>
<input
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写收货人手机号"
/>
</view>
<view
class=
"item"
@
tap=
"showRegionPicker"
>
<view
class=
"left"
>
所在地区
</view>
<input
disabled
type=
"text"
placeholder-class=
"line"
placeholder=
"省市区县、乡镇等"
/>
</view>
<view
class=
"item address"
>
<view
class=
"left"
>
详细地址
</view>
<textarea
type=
"text"
placeholder-class=
"line"
placeholder=
"街道、楼牌等"
/>
<view
class=
"left"
>
电话
</view>
<input
disabled
v-model=
"mobile"
type=
"text"
placeholder-class=
"line"
placeholder=
"请填写电话"
/>
</view>
<u-field
v-model=
"address"
label=
"地址"
label-width=
"88"
type=
"textarea"
:border-bottom=
"false"
placeholder=
"请填写地址"
>
<view
slot=
"right"
class=
"right"
@
tap=
"autoLocation"
>
<u-icon
name=
"map"
color=
"#2272FF"
size=
"30"
></u-icon>
<text>
自动定位
</text>
</view>
</u-field>
<!--
<view
class=
"site-clipboard"
>
<textarea
placeholder-class=
"line"
value=
""
placeholder=
"粘贴文本,可自动识别姓名和地址等"
/>
<view
class=
"clipboard"
>
...
...
@@ -26,38 +31,161 @@
</view>
-->
</view>
<view
class=
"bottom"
>
<view
class=
"tag"
>
<view
class=
"left"
>
标签
</view>
<view
class=
"right"
>
<text
class=
"tags"
>
家
</text>
<text
class=
"tags"
>
公司
</text>
<text
class=
"tags"
>
学校
</text>
<view
class=
"tags plus"
><u-icon
size=
"22"
name=
"plus"
></u-icon></view>
</view>
</view>
<view
class=
"default"
>
<button
class=
"btn, bottom-btn"
@
click=
"show = true"
>
<text
class=
"button-text"
>
保存
</text>
</button>
<!--
<view
class=
"default"
>
<view
class=
"left"
>
<view
class=
"set"
>
设置默认地址
</view>
<view
class=
"tips"
>
提醒:每次下单会默认推荐该地址
</view>
</view>
<view
class=
"right"
><switch
color=
"red"
@
change=
"setDefault"
/></view>
</view>
</view>
-->
</view>
<u-picker
mode=
"region"
ref=
"uPicker"
v-model=
"show"
/>
<u-popup
border-radius=
"12"
width=
"690"
height=
"520"
v-model=
"show"
mode=
"center"
>
<view
class=
"save-pop"
>
<view
class=
"header"
>
确认保存信息
</view>
<view
class=
"content"
>
<view
class=
"tips"
>
您填写的信息尚未保存,是否保存
</view>
</view>
</view>
<view
class=
"pop-bottom"
>
<button
class=
"plain"
@
click=
"show = false"
shape=
"circle"
:plain=
"true"
>
不保存
</button>
<button
class=
"solid"
shape=
"circle"
@
click=
"$u.throttle(submitForm, 500)"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
保存
</button>
</view>
</u-popup>
</view>
</
template
>
<
script
>
let
r
=
require
(
"libs/bmap-wx.min.js"
);
let
h
=
new
r
.
BMapWX
({
// ak: "rpVq5d3yxaRCoKzVwmFMo0o4iC524CAG",
ak
:
"lF1HoyXdiv4uZx6TrGQEZs48F5y8kEHI"
});
export
default
{
data
()
{
return
{
show
:
false
title
:
'新增地址'
,
show
:
false
,
type
:
'充电桩安装'
,
name
:
''
,
mobile
:
''
,
address
:
''
,
location
:
''
,
};
},
async
onLoad
(
e
)
{
if
(
e
&&
e
.
title
)
{
this
.
title
=
decodeURIComponent
(
e
.
title
)
}
if
(
this
.
vuex_token
&&
this
.
vuex_settled
)
{
const
settled
=
this
.
vuex_settled
this
.
name
=
settled
.
id_card_name
||
settled
.
nickname
||
settled
.
name
||
'--'
this
.
mobile
=
settled
.
mobile
this
.
address
=
settled
.
address
this
.
type
=
settled
.
type
}
else
{
this
.
$u
.
route
({
type
:
'redirect'
,
url
:
"pages/mine/address/index"
,
params
:
{
sync
:
true
}
})
}
await
this
.
setDefault
()
},
methods
:
{
setDefault
()
{},
showRegionPicker
()
{
this
.
show
=
true
;
async
setDefault
()
{
this
.
initLocation
()
},
/**
* 初始化位置
*/
initLocation
()
{
const
self
=
this
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
self
.
baiduLocation
(
res
.
longitude
,
res
.
latitude
)
}
});
},
/**
* 百度定位
* @param {Object} long
* @param {Object} lat
*/
baiduLocation
(
long
,
lat
)
{
let
self
=
this
,
t
=
function
()
{
let
t
=
{
success
:
function
(
res
)
{
let
e
=
res
.
wxMarkerData
[
0
];
let
i
=
e
.
address
;
self
.
location
=
i
},
fail
:
function
(
error
)
{
// n.error(a), console.log(a);
}
};
if
(
lat
&&
long
)
{
let
e
=
lat
+
","
+
long
// let e = "113.88308" + ',' + "22.55329"
// let e = "22.55329" + ',' + "113.88308"
t
.
location
=
e
;
}
h
.
regeocoding
(
t
);
};
t
()
},
/**
* 自动定位
*/
autoLocation
()
{
let
that
=
this
uni
.
chooseLocation
({
success
:
function
(
res
)
{
that
.
address
=
res
.
address
+
res
.
name
},
fail
:
function
(
res
)
{
// uni.showToast({
// title: '定位失败'
// })
}
});
},
async
submitForm
()
{
let
self
=
this
let
params
=
{
type
:
self
.
type
,
address
:
self
.
address
}
let
res
=
await
self
.
$u
.
api
.
syncAddress
(
params
)
if
(
res
&&
res
.
code
==
200
)
{
self
.
$u
.
route
({
type
:
'redirect'
,
url
:
"pages/mine/address/index"
,
params
:
{
sync
:
true
}
})
}
}
}
};
...
...
@@ -69,25 +197,49 @@ export default {
font-size
:
28rpx
;
}
.wrap
{
background-color
:
#f2f2f2
;
background-color
:
#FFFFFF
;
width
:
750rpx
;
height
:
100vh
;
.top
{
background-color
:
#ffffff
;
border-top
:
solid
2rpx
$u-border-color
;
padding
:
22rpx
;
padding
:
10rpx
30rpx
0
30rpx
;
.item
{
display
:
flex
;
font-size
:
32rpx
;
line-height
:
100rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
88rpx
;
align-items
:
center
;
border-bottom
:
solid
2rpx
$u-border-color
;
.left
{
width
:
180rpx
;
width
:
88rpx
;
color
:
#999999
;
}
input
{
text-align
:
left
;
}
}
/
deep
/
.u-field
{
padding
:
24rpx
0
;
border-bottom
:
solid
2rpx
$u-border-color
;
.u-label-text
{
font-weight
:
400
;
color
:
#999999
;
}
textarea
{
line-height
:
40rpx
;
}
.u-button-wrap
{
align-self
:
flex-start
;
margin-left
:
42rpx
;
}
.right
{
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#2272FF
;
line-height
:
40rpx
;
}
}
.address
{
padding
:
20rpx
0
;
textarea
{
...
...
@@ -124,38 +276,10 @@ export default {
}
}
.bottom
{
margin-top
:
20rpx
;
padding
:
40rpx
;
padding-right
:
0
;
margin-top
:
160rpx
;
padding
:
0
40rpx
;
background-color
:
#ffffff
;
font-size
:
28rpx
;
.tag
{
display
:
flex
;
.left
{
width
:
160rpx
;
}
.right
{
display
:
flex
;
flex-wrap
:
wrap
;
.tags
{
width
:
140rpx
;
padding
:
16rpx
8rpx
;
border
:
solid
2rpx
$u-border-color
;
text-align
:
center
;
border-radius
:
50rpx
;
margin
:
0
10rpx
20rpx
;
display
:
flex
;
font-size
:
28rpx
;
align-items
:
center
;
justify-content
:
center
;
color
:
$u-content-color
;
line-height
:
1
;
}
.plus
{
//padding: 10rpx 0;
}
}
}
.default
{
margin-top
:
50rpx
;
display
:
flex
;
...
...
@@ -169,5 +293,65 @@ export default {
}
}
}
.save-pop
{
padding
:
0
30rpx
;
.header
{
text-align
:
center
;
font-size
:
40rpx
;
font-weight
:
bold
;
color
:
#333333
;
border-bottom
:
solid
2rpx
#F4F5F7
;
line-height
:
40rpx
;
padding
:
60rpx
0
40rpx
0
;
}
.content
{
margin-top
:
80rpx
;
margin-bottom
:
116rpx
;
.tips
{
text-align
:
center
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
28rpx
;
}
}
}
/
deep
/
.pop-bottom
{
padding
:
0
16rpx
;
margin-top
:
0
;
display
:
flex
;
justify-content
:
space-between
;
button
{
width
:
300rpx
;
height
:
104rpx
;
border-radius
:
52rpx
;
padding
:
0
;
}
.plain
{
border
:
2px
solid
#2272FF
;
color
:
#2272FF
;
}
.solid
{
color
:
#FFFFFF
;
background-color
:
#2272FF
;
}
}
}
.btn
{
padding
:
30rpx
;
border-radius
:
52rpx
;
line-height
:
44rpx
;
font-size
:
32rpx
;
text-align
:
center
;
background-color
:
#2272ff
;
color
:
#fff
;
&
:
:
after
{
content
:
''
;
height
:
0
;
border
:
none
;
}
}
</
style
>
src/pages/mine/address/index.vue
View file @
decf9de4
<
template
>
<view
class=
"address-wrap"
>
<w-navbar
title=
"收货地址"
></w-navbar>
<view
class=
"item"
v-for=
"(res, sindex) in siteList"
:key=
"res.id"
>
<view
class=
"item"
>
<view
class=
"top"
>
<view
class=
"name"
>
{{
res
.
name
}}
</view>
<view
class=
"phone"
>
{{
res
.
phon
e
}}
</view>
<view
class=
"name"
>
{{
settledInfo
.
id_card_name
||
settledInfo
.
nickname
||
settledInfo
.
name
||
'--'
}}
</view>
<view
class=
"phone"
>
{{
settledInfo
.
mobil
e
}}
</view>
</view>
<view
class=
"bottom"
>
<view
class=
"address"
>
广东省深圳市宝安区宝城67区留芳路6号庭威产业园3栋10C
</view>
<u-icon
:name=
"editPen"
:size=
"32"
color=
"#999999"
></u-icon>
<view
class=
"address"
>
{{
settledInfo
.
address
}}
</view>
<u-icon
:name=
"editPen"
:size=
"32"
color=
"#999999"
@
tap=
"toAddSite('修改地址')"
></u-icon>
</view>
<view
class=
"default"
v-show=
"true"
>
<u-icon
name=
"checkmark-circle"
color=
"#2272FF"
size=
"32"
></u-icon>
<text
class=
"txt"
>
默认地址
</text>
</view>
</view>
<
view
class=
"addSite"
@
tap=
"toAddSite
"
>
<
!--
<view
class=
"addSite"
@
tap=
"toAddSite('新增地址')
"
>
<view
class=
"add"
>
<u-icon
name=
"plus"
color=
"#ffffff"
class=
"icon"
:size=
"30"
></u-icon>
新建收货地址
</view>
</view>
</view>
-->
</view>
</
template
>
<
script
>
const
app
=
getApp
();
export
default
{
data
()
{
return
{
background
:
{
backgroundColor
:
'none'
},
settledInfo
:
null
,
siteList
:
[]
};
},
onLoad
()
{
this
.
getData
();
onLoad
(
e
)
{
if
(
e
&&
e
.
sync
)
{
this
.
getData
();
}
else
{
if
(
this
.
vuex_token
&&
this
.
vuex_settled
)
{
this
.
settledInfo
=
this
.
vuex_settled
}
else
{
this
.
getData
();
}
}
},
computed
:
{
editPen
()
{
...
...
@@ -43,45 +53,23 @@ export default {
},
methods
:
{
getData
()
{
this
.
siteList
=
[
{
id
:
1
,
name
:
'游X'
,
phone
:
'183****5523'
,
tag
:
[
{
tagText
:
'默认'
},
{
tagText
:
'家'
}
],
site
:
'广东省深圳市宝安区宝城67区留芳路6号庭威产业园3栋10C'
},
{
id
:
2
,
name
:
'李XX'
,
phone
:
'183****5555'
,
tag
:
[
{
tagText
:
'公司'
}
],
site
:
'广东省深圳市宝安区 翻身路xx号'
},
{
id
:
3
,
name
:
'王YY'
,
phone
:
'153****5555'
,
tag
:
[],
site
:
'广东省深圳市宝安区 平安路13号'
let
self
=
this
const
callBack
=
(
vm
,
result
)
=>
{
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if
(
result
&&
result
.
record
)
{
self
.
settledInfo
=
result
.
record
}
];
};
app
.
getBaseInfo
(
self
,
callBack
);
},
toAddSite
(){
uni
.
navigateTo
({
url
:
'/pages/mine/address/addSite'
});
toAddSite
(
title
){
this
.
$u
.
route
({
type
:
'redirect'
,
url
:
'pages/mine/address/addSite'
,
params
:
{
title
:
title
}
})
}
}
};
...
...
src/pages/mine/cert/detail.vue
0 → 100644
View file @
decf9de4
<
template
>
<view
class=
"cert-page"
>
<u-navbar
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000"
:border-bottom=
"false"
title=
"我的证件"
title-bold=
"true"
></u-navbar>
<view
class=
"content-cody"
>
<view
class=
"title"
>
{{
info
.
type
}}
</view>
<view
class=
"content"
v-for=
"item in info.url"
><image
:src=
"item"
mode=
""
></image></view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
info
:
{
type
:
""
,
url
:
null
}
}
},
onLoad
()
{
var
that
=
this
;
const
eventChannel
=
this
.
getOpenerEventChannel
()
eventChannel
.
on
(
'acceptDataFromCert'
,
function
(
data
)
{
try
{
let
urlArr
=
data
.
url
.
split
(
','
);
that
.
info
.
type
=
data
.
type
;
that
.
info
.
url
=
urlArr
;
console
.
log
(
urlArr
);
}
catch
(
e
){}
console
.
log
(
that
.
info
);
})
},
}
</
script
>
<
style
>
.cert-page
{
font-size
:
28
rpx
;
margin
:
30
rpx
;
}
.content-cody
{
padding-left
:
30
rpx
;
padding-right
:
30
rpx
;
background-color
:
#F4F5F7
;
border-radius
:
12
rpx
;
}
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
}
.content
{
padding-top
:
30
rpx
;
}
</
style
>
src/pages/mine/cert/index.vue
0 → 100644
View file @
decf9de4
<
template
>
<view
class=
"cert-page"
>
<u-navbar
class=
"navbarHeigth"
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000"
:border-bottom=
"false"
title=
"我的证件"
title-bold=
"true"
></u-navbar>
<view
class=
"content-cody"
>
<u-cell-group
:border=
"false"
>
<u-cell-item
v-for=
"item in list"
:title=
"item.name"
:value=
"item.isUploadName"
:arrow=
"true"
:value-style=
"
{'color': item.color}" @click="toDetail(item.keyName)" :title-style="{'padding-left':'20rpx'}">
<u-icon
slot=
"icon"
size=
"32"
name=
"checkmark-circle"
:color=
"item.iconColor"
></u-icon>
</u-cell-item>
</u-cell-group>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
list
:
{
id_card
:
{
name
:
"身份证"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"id_card"
,
color
:
"#999999"
},
electrician_certificate
:
{
name
:
"电工证"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"electrician_certificate"
,
color
:
"#999999"
},
driver_license
:
{
name
:
"驾驶证"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"driver_license"
,
color
:
"#999999"
},
driving_license
:
{
name
:
"行驶证"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"driving_license"
,
color
:
"#999999"
},
vehicle
:
{
name
:
"车辆照"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"vehicle"
,
color
:
"#999999"
},
high_sky_license
:
{
name
:
"高空证"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"high_sky_license"
,
color
:
"#999999"
},
refrigeration_license
:
{
name
:
"制冷证"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"refrigeration_license"
,
color
:
"#999999"
},
business_license
:
{
name
:
"营业执照"
,
isUpload
:
false
,
isUploadName
:
""
,
keyName
:
"business_license"
,
color
:
"#999999"
},
}
}
},
onLoad
()
{
let
that
=
this
;
this
.
$u
.
api
.
getCertList
()
.
then
((
res
)
=>
{
if
(
res
.
code
!=
200
){
return
}
for
(
let
key
in
this
.
list
){
let
getData
=
res
.
data
[
key
];
this
.
list
[
key
].
isUpload
=
getData
.
status
;
this
.
list
[
key
].
isUploadName
=
getData
.
status
==
1
?
'已上传'
:
'未上传'
;
this
.
list
[
key
].
color
=
getData
.
status
==
1
?
"#999999"
:
"#2272FF"
;
this
.
list
[
key
].
iconColor
=
getData
.
status
==
1
?
"#2272FF"
:
"#999999"
;
this
.
list
[
key
].
data
=
getData
;
}
console
.
log
(
this
.
list
);
console
.
log
(
res
);
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
});
},
methods
:
{
isUpload
(
typeBool
)
{
return
typeBool
?
'已上传'
:
'未上传'
},
toDetail
(
key
)
{
let
data
=
this
.
list
[
key
].
data
;
if
(
data
.
status
!=
1
){
return
;
}
wx
.
navigateTo
({
url
:
'/pages/mine/cert/detail'
,
success
:
function
(
res
)
{
res
.
eventChannel
.
emit
(
'acceptDataFromCert'
,
data
)
}
});
}
}
}
</
script
>
<
style
>
.cert-page
{
font-size
:
28
rpx
;
margin
:
30
rpx
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
}
.content-cody
{
padding
:
30
rpx
;
background-color
:
#ffffff
;
border-radius
:
12
rpx
;
height
:
82vh
;
}
.rightBlue
{
color
:
#007AFF
;
}
</
style
>
src/pages/mine/customer/index.vue
0 → 100644
View file @
decf9de4
<
template
>
<view
class=
"cus-wrap"
>
<w-navbar
title=
"联系客服"
></w-navbar>
<view
class=
"content"
>
<u-image
class=
"qrcode"
:src=
"cusQrcode"
width=
"400"
mode=
"widthFix"
@
longtap=
"download"
>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
<text
class=
"desc"
>
长按二维码保存图片添加官方客服微信
</text>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
};
},
computed
:
{
cusQrcode
()
{
return
process
.
uniEnv
.
qn_base_url
+
'erweima-bg.png'
},
},
methods
:
{
download
()
{
let
that
=
this
;
uni
.
downloadFile
({
//获得二维码的临时地址
url
:
that
.
erweimaImage
,
success
:(
res
)
=>
{
if
(
res
.
statusCode
==
200
){
uni
.
saveImageToPhotosAlbum
({
filePath
:
res
.
tempFilePath
,
//传入临时地址
success
()
{
that
.
$u
.
toast
(
'保存成功!'
);
},
fail
()
{
that
.
$u
.
toast
(
'保存失败!'
);
}
})
}
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
.cus-wrap
{
background-color
:
#F4F5F7
;
padding
:
30rpx
;
.content
{
width
:
690rpx
;
height
:
800rpx
;
background
:
#FFFFFF
;
border-radius
:
12rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.qrcode
{
margin-top
:
160rpx
;
}
.desc
{
margin-top
:
40rpx
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
24rpx
;
}
}
}
</
style
>
src/pages/mine/wallet/index.vue
View file @
decf9de4
<
template
>
<view>
<view
class=
"wallet-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#F4F5F7"
title=
"我的钱包"
titleColor=
"#333333"
:border-bottom=
"false"
></u-navbar>
<image
class=
"header-image"
mode=
"widthFix"
:src=
"qianbaobeijing"
></image>
<view
class=
"survey-view"
>
<view
class=
"survey-top-view"
>
<view
class=
"survey-top-left"
>
<view>
账户总资产(元)
</view>
<view>
{{
info
.
totalPayAmount
}}
</view>
</view>
<view
class=
"survey-top-right"
>
<u-button>
提现
</u-button>
</view>
</view>
<view
class=
"survey-bottom-view"
>
<view
v-for=
"(value, key) in items"
:key=
"key"
>
<view>
{{
value
}}
</view>
<view>
{{
info
[
key
]
}}
</view>
</view>
</view>
</view>
<view
class=
"content-view"
>
<view
v-for=
"(item, index) in lists"
:class=
"['content-list',
{'first': index==0}]" :key="index">
<view
class=
"content-list-left"
>
<image
class=
"content-list-image"
:src=
"item.icon"
></image>
<view
class=
"content-list-text"
>
<view
class=
"content-list-text-title"
>
{{
item
.
title
}}
</view>
<view>
{{
item
.
content
}}
</view>
</view>
</view>
<view
class=
"content-list-right"
>
<text
class=
"content-list-right-text"
>
点击查看
</text>
<u-icon
name=
"arrow-right"
></u-icon>
</view>
</view>
</view>
<view
class=
"list-view"
>
</view>
</view>
</
template
>
...
...
@@ -8,15 +44,126 @@
export
default
{
data
()
{
return
{
info
:
{
canApplyAmount
:
0
,
// 可提现金额
saveApplyCount
:
0
,
// 已申请提现的支付单数
canApplyCount
:
0
,
// 可申请提现的支付单数
saveAndApplyAmount
:
0
,
// 已申请提现金额
totalPayAmount
:
0
,
// 总共收入
/* 还没对字段名 */
dairuzhang
:
0
,
// 预计待入账
}
}
},
computed
:
{
lists
()
{
return
[{
title
:
'结算账单'
,
content
:
'展示您已提现的账单信息'
,
icon
:
this
.
imageUrl
+
'jiesuan.png'
},{
title
:
'收入流水'
,
content
:
'当前展示最近5条,点击查看全部'
,
icon
:
this
.
imageUrl
+
'liushui.png'
}]
},
items
()
{
return
{
canApplyAmount
:
'可提现(元)'
,
dairuzhang
:
'预计待入账(元)'
}
},
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
qianbaobeijing
()
{
return
this
.
imageUrl
+
'qianbaobeijing.png'
},
},
methods
:
{
}
}
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.wallet-view
{
position
:
relative
;
height
:
100vh
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
.header-image
{
position
:
absolute
;
width
:
100%
;
margin-left
:
4rpx
;
margin-top
:
10rpx
;
}
.survey-view
{
position
:
relative
;
height
:
400rpx
;
margin
:
30rpx
30rpx
10rpx
30rpx
;
color
:
#FFFFFF
;
padding
:
30rpx
;
.survey-top-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-end
;
.survey-top-left
{
}
.survey-top-right
{
}
}
.survey-bottom-view
{
display
:
flex
;
justify-content
:
space-between
;
}
}
.content-view
{
position
:
relative
;
padding
:
0
30rpx
;
.content-list
{
height
:
140rpx
;
border-radius
:
12rpx
;
display
:
flex
;
justify-content
:
space-between
;
padding
:
30rpx
;
background-color
:
#FFFFFF
;
&
.first
{
margin-bottom
:
20rpx
;
}
.content-list-left
{
display
:
flex
;
.content-list-image
{
width
:
56rpx
;
height
:
56rpx
;
margin-top
:
2rpx
;
}
.content-list-text
{
font-size
:
24rpx
;
color
:
#666666
;
margin-left
:
20rpx
;
.content-list-text-title
{
font-size
:
32rpx
;
color
:
#333333
;
}
}
}
.content-list-right
{
color
:
#2272FF
;
font-size
:
26rpx
;
.content-list-right-text
{
margin-right
:
4rpx
;
}
}
}
}
.list-view
{
position
:
relative
;
}
}
</
style
>
src/store/index.js
View file @
decf9de4
...
...
@@ -35,7 +35,7 @@ const store = new Vuex.Store({
vuex_version
:
'1.0.1'
,
vuex_config
:
{},
// 入驻信息
vuex_settled
:
{}
,
vuex_settled
:
null
,
vuex_wx_uid
:
lifeData
.
vuex_wx_uid
||
0
,
},
mutations
:
{
...
...
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