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
eb8b2664
Commit
eb8b2664
authored
Apr 22, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
a37be7be
97161d77
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
369 additions
and
289 deletions
+369
-289
.env.js
.env.js
+1
-1
App.vue
src/App.vue
+239
-212
settled.js
src/common/api/settled.js
+1
-1
http.interceptor.js
src/common/http.interceptor.js
+1
-1
index.vue
src/components/settle/index.vue
+2
-2
index.vue
src/pages/exam/index.vue
+6
-6
index.vue
src/pages/index/index.vue
+62
-43
index.vue
src/pages/login/index.vue
+14
-4
base.vue
src/pages/settle/base.vue
+4
-2
file.vue
src/pages/settle/file.vue
+1
-2
pay-ensure.vue
src/pages/settle/pay-ensure.vue
+4
-3
prompt.vue
src/pages/settle/prompt.vue
+25
-4
sign-contract.vue
src/pages/settle/sign-contract.vue
+1
-2
qiniuUploader.js
src/plugins/uploader/request/upload/qiniuUploader.js
+1
-1
$u.mixin.js
src/store/$u.mixin.js
+1
-1
login.js
src/utils/login.js
+6
-4
No files found.
.env.js
View file @
eb8b2664
;
;
(
function
()
{
(
function
()
{
let
NODE_ENV
=
'
dev
'
;
// dev:开发环境 | test:测试环境
let
NODE_ENV
=
'
test
'
;
// dev:开发环境 | test:测试环境
let
ENV_VAR
=
null
;
let
ENV_VAR
=
null
;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
src/App.vue
View file @
eb8b2664
<
script
>
<
script
>
import
'./../.env.js'
import
"./../.env.js"
;
import
{
import
{
AnalysysAgent
}
from
"@/utils/analysys_paas.js"
;
AnalysysAgent
import
util
from
"@/utils/util.js"
;
}
from
'@/utils/analysys_paas.js'
export
default
{
import
util
from
'@/utils/util.js'
globalData
:
{
export
default
{
globalData
:{
// 开发环境
// 开发环境
uniEnv
:
process
.
uniEnv
,
uniEnv
:
process
.
uniEnv
,
// 登录凭证
// 登录凭证
token
:
''
,
token
:
""
,
// 微信小程序平台编号,空--家维广场,1--自营平台
wxAppNo
:
1
,
//授权提示 图标
//授权提示 图标
icon_auth_notice
:
'https://qn-static.banshouhui.com/auth_notice.png'
,
icon_auth_notice
:
"https://qn-static.banshouhui.com/auth_notice.png"
,
//授权提示新 图标
//授权提示新 图标
icon_auth_notice_new
:
'https://qn-static.banshouhui.com/auth_notice_new.png'
,
icon_auth_notice_new
:
"https://qn-static.banshouhui.com/auth_notice_new.png"
,
// 服务规范教程视频
// 服务规范教程视频
service_standard
:
{
service_standard
:
{
"course1"
:
{
course1
:
{
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
title
:
"第一节 师傅考核规则"
,
title
:
"第一节 师傅考核规则"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
},
},
"course2"
:
{
course2
:
{
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
title
:
"第二节 安装材料及工具"
,
title
:
"第二节 安装材料及工具"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
},
},
"course3"
:
{
course3
:
{
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
title
:
"第三节 安装施工规范"
,
title
:
"第三节 安装施工规范"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
},
},
"course4"
:
{
course4
:
{
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
url
:
"https://qn-static.banshouhui.com/self-support/videoen.mp4"
,
title
:
"第四节 录单上传要求"
,
title
:
"第四节 录单上传要求"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
desc
:
"接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。"
,
},
},
},
},
// 授权用户信息
// 授权用户信息
authUserInfo
:
''
,
authUserInfo
:
""
,
// 用户入驻信息
// 用户入驻信息
settledInfo
:
{},
settledInfo
:
{},
},
},
onLaunch
:
function
()
{
onLaunch
:
function
()
{
// 应用初始化(全局只触发一次)
// 应用初始化(全局只触发一次)
let
that
=
this
that
.
globalData
.
token
=
util
.
getToken
()
AnalysysAgent
.
registerSuperProperty
(
"platform"
,
"self-support"
);
AnalysysAgent
.
registerSuperProperty
(
"platform"
,
"self-support"
);
// 应用启动,或从后台进入前台显示
this
.
autoLogin
()
// 版本更新
this
.
updateApp
();
},
},
onShow
:
function
()
{
onShow
:
function
()
{
// 应用启动,或从后台进入前台显示
// 应用启动,或从后台进入前台显示
// this.autoLogin()
this
.
autoLogin
();
},
},
onHide
:
function
()
{
onHide
:
function
()
{
// 应用从前台进入后台
// 应用从前台进入后台
},
},
methods
:
{
methods
:
{
async
getBaseInfo
(
vm
,
callBack
)
{
async
getBaseInfo
(
vm
,
callBack
)
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中……'
title
:
"加载中……"
,
})
});
const
res
=
await
vm
.
$u
.
api
.
getSettleBaseInfo
()
const
res
=
await
vm
.
$u
.
api
.
getSettleBaseInfo
();
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
"res"
);
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
&&
res
.
message
||
'获取基本信息错误'
,
title
:
(
res
&&
res
.
message
)
||
"获取基本信息错误"
,
icon
:
'none'
icon
:
"none"
,
});
});
return
false
;
return
false
;
}
}
this
.
globalData
.
settledInfo
=
res
.
data
this
.
globalData
.
settledInfo
=
res
.
data
;
if
(
!
res
.
data
)
{
if
(
!
res
.
data
)
{
return
return
;
}
}
if
(
typeof
callBack
==
'function'
)
{
if
(
typeof
callBack
==
"function"
)
{
callBack
(
vm
,
res
.
data
)
callBack
(
vm
,
res
.
data
);
}
}
uni
.
hideLoading
()
uni
.
hideLoading
();
return
res
.
data
return
res
.
data
;
},
},
/**
/**
* 用户自动登录
* 用户自动登录
*/
*/
autoLogin
()
{
autoLogin
()
{
let
that
=
this
let
that
=
this
;
uni
.
login
({
uni
.
login
({
async
success
(
res
)
{
async
success
(
res
)
{
if
(
res
.
code
)
{
if
(
res
.
code
)
{
let
params
=
{
let
params
=
{
code
:
res
.
code
,
code
:
res
.
code
,
wxAppNo
:
1
,
// 自营平台小程序
wxAppNo
:
that
.
globalData
.
wxAppNo
,
// 自营平台小程序
}
};
let
result
=
await
that
.
$u
.
api
.
loginWechatAuth
(
params
)
let
result
=
await
that
.
$u
.
api
.
loginWechatAuth
(
params
);
if
(
result
)
{
if
(
result
)
{
if
(
result
.
code
==
200
&&
result
.
data
)
{
if
(
result
.
code
==
200
&&
result
.
data
)
{
that
.
setUserData
(
result
.
data
)
that
.
setUserData
(
result
.
data
);
that
.
getBaseInfo
(
that
)
}
}
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'请求失败'
,
title
:
"请求失败"
,
content
:
result
.
message
,
content
:
result
.
message
,
showCancel
:
false
showCancel
:
false
,
});
});
}
}
uni
.
hideLoading
()
uni
.
hideLoading
();
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'登录失败'
,
title
:
"登录失败"
,
content
:
'未获取到code'
,
content
:
"未获取到code"
,
});
});
}
}
},
},
fail
()
{
fail
()
{},
}
});
});
},
},
setUserData
(
userInfo
)
{
setUserData
(
userInfo
)
{
if
(
userInfo
&&
userInfo
.
token
)
{
if
(
userInfo
&&
userInfo
.
token
)
{
// 如果已经登录则直接获取相关信息
// 如果已经登录则直接获取相关信息
util
.
setOpenid
(
userInfo
.
wxopenid
)
util
.
setOpenid
(
userInfo
.
wxopenid
);
util
.
setToken
(
userInfo
.
token
)
this
.
$u
.
vuex
(
'vuex_token'
,
userInfo
.
token
);
uni
.
setStorageSync
(
'user-info'
,
userInfo
);
uni
.
setStorageSync
(
"user-info"
,
userInfo
);
}
else
{
}
else
{
util
.
setToken
(
''
)
this
.
$u
.
vuex
(
'vuex_token'
,
''
);
}
}
},
},
/* 版本更新 */
updateApp
()
{
// 版本更新
const
updateManager
=
uni
.
getUpdateManager
();
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
// 请求完新版本信息的回调
console
.
log
(
res
.
hasUpdate
);
});
updateManager
.
onUpdateReady
(
function
(
res
)
{
uni
.
showModal
({
title
:
"更新提示"
,
content
:
"新版本已经准备好,是否重启应用?"
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager
.
applyUpdate
();
}
},
});
});
updateManager
.
onUpdateFailed
(
function
(
res
)
{
// 新的版本下载失败
});
},
/* ------------------------- 数据埋点begin ------------------------------ */
/* ------------------------- 数据埋点begin ------------------------------ */
track
(
event
,
properties
)
{
track
(
event
,
properties
)
{
if
(
AnalysysAgent
)
{
if
(
AnalysysAgent
)
{
...
@@ -149,39 +176,39 @@
...
@@ -149,39 +176,39 @@
// 设备身份表示
// 设备身份表示
if
(
AnalysysAgent
)
{
if
(
AnalysysAgent
)
{
let
setProfile
=
{
let
setProfile
=
{
'openid'
:
openid
,
openid
:
openid
,
'unionid'
:
unionid
,
unionid
:
unionid
,
}
};
setProfile
=
Object
.
assign
(
setProfile
,
userInfo
)
setProfile
=
Object
.
assign
(
setProfile
,
userInfo
);
AnalysysAgent
.
profileSet
(
setProfile
);
AnalysysAgent
.
profileSet
(
setProfile
);
}
}
},
},
setUserId
(
userId
)
{
setUserId
(
userId
)
{
// 用户id设置
// 用户id设置
if
(
AnalysysAgent
)
{
if
(
AnalysysAgent
)
{
AnalysysAgent
.
alias
(
userId
+
''
)
AnalysysAgent
.
alias
(
userId
+
""
);
}
}
},
},
setUser
(
user
)
{
setUser
(
user
)
{
// 用户附加属性
// 用户附加属性
if
(
AnalysysAgent
)
{
if
(
AnalysysAgent
)
{
let
userInfo
=
{
let
userInfo
=
{
'mobile'
:
user
.
mobile
,
mobile
:
user
.
mobile
,
'userfrom_id'
:
user
.
uid
,
userfrom_id
:
user
.
uid
,
'userfrom'
:
'家维广场'
,
userfrom
:
"家维广场"
,
'avatar'
:
user
.
avatar
,
avatar
:
user
.
avatar
,
'nickname'
:
user
.
nickname
,
nickname
:
user
.
nickname
,
'username'
:
user
.
username
,
username
:
user
.
username
,
'wxhuid'
:
user
.
wxhuid
,
wxhuid
:
user
.
wxhuid
,
'id'
:
user
.
id
,
id
:
user
.
id
,
'money'
:
user
.
money
,
money
:
user
.
money
,
'score'
:
user
.
score
score
:
user
.
score
,
};
};
Object
.
keys
(
userInfo
).
map
(
key
=>
{
Object
.
keys
(
userInfo
).
map
((
key
)
=>
{
if
(
key
&&
userInfo
[
key
])
{
if
(
key
&&
userInfo
[
key
])
{
AnalysysAgent
.
profileAppend
(
key
,
userInfo
[
key
])
AnalysysAgent
.
profileAppend
(
key
,
userInfo
[
key
]);
}
}
})
});
}
}
},
},
share
(
toShareProperties
,
trackProperties
)
{
share
(
toShareProperties
,
trackProperties
)
{
...
@@ -195,26 +222,26 @@
...
@@ -195,26 +222,26 @@
}
}
},
},
initShare
(
option
)
{
initShare
(
option
)
{
console
.
log
(
option
,
'option-initShare'
)
console
.
log
(
option
,
"option-initShare"
);
option
=
option
||
{}
option
=
option
||
{};
if
(
AnalysysAgent
&&
option
.
user_id
)
{
if
(
AnalysysAgent
&&
option
.
user_id
)
{
let
shareUserInfo
=
{
let
shareUserInfo
=
{
'share_from_id'
:
option
.
user_id
||
''
,
share_from_id
:
option
.
user_id
||
""
,
'share_from_nickname'
:
option
.
user_name
||
''
,
share_from_nickname
:
option
.
user_name
||
""
,
}
};
AnalysysAgent
.
registerSuperProperties
(
shareUserInfo
);
AnalysysAgent
.
registerSuperProperties
(
shareUserInfo
);
}
}
},
},
/* ------------------------- 数据埋点end ------------------------------ */
/* ------------------------- 数据埋点end ------------------------------ */
}
},
}
};
</
script
>
</
script
>
<
style
>
<
style
>
/*每个页面公共css */
/*每个页面公共css */
</
style
>
</
style
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import
"uview-ui/index.scss"
;
@import
"uview-ui/index.scss"
;
@import
'@/common/index.scss'
;
@import
"@/common/index.scss"
;
</
style
>
</
style
>
\ No newline at end of file
src/common/api/settled.js
View file @
eb8b2664
...
@@ -19,7 +19,7 @@ let settledApiFun = function(vm){
...
@@ -19,7 +19,7 @@ let settledApiFun = function(vm){
let
submitSettleFileInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/submit-info'
,
params
);
let
submitSettleFileInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/submit-info'
,
params
);
/* 缴纳保证金 */
/* 缴纳保证金 */
let
paySettleDeposit
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v
1
/settled/pay-deposit'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
paySettleDeposit
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v
2
/settled/pay-deposit'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
getSettleDepositResult
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/check-oid'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
getSettleDepositResult
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/check-oid'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
...
...
src/common/http.interceptor.js
View file @
eb8b2664
...
@@ -35,7 +35,7 @@ const install = (Vue, vm) => {
...
@@ -35,7 +35,7 @@ const install = (Vue, vm) => {
// 请求拦截,配置Token等参数
// 请求拦截,配置Token等参数
Vue
.
prototype
.
$u
.
http
.
interceptor
.
request
=
(
config
)
=>
{
Vue
.
prototype
.
$u
.
http
.
interceptor
.
request
=
(
config
)
=>
{
const
reg
=
/
\?\w
+/
;
const
reg
=
/
\?\w
+/
;
let
token
=
util
.
getToken
()
let
token
=
vm
.
vuex_token
// if(!token && noLoginUrl.indexOf(config.url)<0){
// if(!token && noLoginUrl.indexOf(config.url)<0){
// toLoginPage()
// toLoginPage()
// return false
// return false
...
...
src/components/settle/index.vue
View file @
eb8b2664
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
},
},
computed
:
{
computed
:
{
url
()
{
url
()
{
return
process
.
uniEnv
.
qn_base_url
+
'top
back
'
+
this
.
index
+
'.png'
return
process
.
uniEnv
.
qn_base_url
+
'top
l
'
+
this
.
index
+
'.png'
}
}
}
}
}
}
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
border-radius
:
12rpx
;
border-radius
:
12rpx
;
overflow
:
auto
;
overflow
:
auto
;
position
:
fixed
;
position
:
fixed
;
top
:
3
2
0rpx
;
top
:
3
7
0rpx
;
bottom
:
0rpx
;
bottom
:
0rpx
;
left
:
30rpx
;
left
:
30rpx
;
right
:
30rpx
;
right
:
30rpx
;
...
...
src/pages/exam/index.vue
View file @
eb8b2664
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
<!-- <template v-if="isStart==true && currentItem"> -->
<!-- <template v-if="isStart==true && currentItem"> -->
<view
class=
"bottom-padding"
v-if=
"currentItem"
>
<view
class=
"bottom-padding"
v-if=
"currentItem"
>
<view
class=
"title-view"
>
<view
class=
"title-view"
>
<view
:class=
"['title-text', {'radio': currentItem.question
.answerType == 1
}]"
>
<view
:class=
"['title-text', {'radio': currentItem.question
? currentItem.question.answerType == 1 : true
}]"
>
<text>
{{ titleText[Math.max(0, currentItem.question
.answerType - 1
)] }}
</text>
<text>
{{ titleText[Math.max(0, currentItem.question
? currentItem.question.answerType - 1 : 0
)] }}
</text>
</view>
</view>
<view
class=
"title-right-view"
>
<view
class=
"title-right-view"
>
<image
class=
"timeIcon"
:src=
"time1Image"
mode=
""
></image>
<image
class=
"timeIcon"
:src=
"time1Image"
mode=
""
></image>
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
url
:
systemApiUrl
+
url
:
systemApiUrl
+
'/wxh-worker-rest/rest/exam'
+
'/wxh-worker-rest/rest/exam'
+
'/serviceRule/userExamInfo/'
+
'/serviceRule/userExamInfo/'
+
getApp
().
globalData
.
token
+
that
.
vuex_
token
+
'?examId='
+
this
.
examId
,
'?examId='
+
this
.
examId
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
url
:
systemApiUrl
+
url
:
systemApiUrl
+
'/wxh-worker-rest/rest/exam'
+
'/wxh-worker-rest/rest/exam'
+
'/serviceRule/'
+
'/serviceRule/'
+
getApp
().
globalData
.
token
+
that
.
vuex_
token
+
'?examId='
+
this
.
examId
,
'?examId='
+
this
.
examId
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
url
:
systemApiUrl
+
url
:
systemApiUrl
+
'/wxh-worker-rest/rest/exam'
+
'/wxh-worker-rest/rest/exam'
+
'/serviceRule/next/'
+
'/serviceRule/next/'
+
getApp
().
globalData
.
token
+
that
.
vuex_
token
+
'?userExamId='
+
this
.
userExamId
+
'?userExamId='
+
this
.
userExamId
+
'&questionId='
+
questionId
+
'&questionId='
+
questionId
+
'&userAnswerIds='
+
this
.
userAnswerIds
,
'&userAnswerIds='
+
this
.
userAnswerIds
,
...
@@ -468,7 +468,7 @@
...
@@ -468,7 +468,7 @@
let
that
=
this
let
that
=
this
uni
.
request
({
uni
.
request
({
url
:
ucenterApiUrl
+
'/v1/settled/update-settled-exam-score'
+
url
:
ucenterApiUrl
+
'/v1/settled/update-settled-exam-score'
+
'?access-token='
+
getApp
().
globalData
.
token
,
'?access-token='
+
that
.
vuex_
token
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
score
:
this
.
examScore
||
0
,
score
:
this
.
examScore
||
0
,
...
...
src/pages/index/index.vue
View file @
eb8b2664
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
>
>
<text
class=
"title-view"
>
充电桩自营平台
</text>
<text
class=
"title-view"
>
充电桩自营平台
</text>
</u-navbar>
</u-navbar>
<u-swiper
<!--
<u-swiper
:height=
"240"
:height=
"240"
:list=
"list"
:list=
"list"
:indicator-pos=
"indicatorPos"
:indicator-pos=
"indicatorPos"
...
@@ -22,7 +22,9 @@
...
@@ -22,7 +22,9 @@
:interval=
"3000"
:interval=
"3000"
@
click=
"clickSwiper"
@
click=
"clickSwiper"
>
>
</u-swiper>
</u-swiper>
-->
<image
class=
"banner-image"
:src=
"bannerImage"
></image>
<view
class=
"msg-view"
>
<view
class=
"msg-view"
>
<view
class=
"msg-title"
>
最新消息
</view>
<view
class=
"msg-title"
>
最新消息
</view>
<view
class=
"msg-list-view"
>
<view
class=
"msg-list-view"
>
...
@@ -33,14 +35,14 @@
...
@@ -33,14 +35,14 @@
>
>
<view
class=
"msg-content-view"
>
<view
class=
"msg-content-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
<image
class=
"msg-icon"
></image>
<image
class=
"msg-icon"
:src=
"msgStyleImage[item.content_type]"
></image>
<text>
{{
item
.
body
}}
</text>
<text>
{{
item
.
title
}}
</text>
</view>
</view>
<image
class=
"right-icon"
></image>
<image
class=
"right-icon"
:src=
"shouyeyouImage"
></image>
</view>
</view>
<view
<view
class=
"line-view"
class=
"line-view"
v-if=
"
messageList.length > index + 1
"
v-if=
"
index != 2
"
></view>
></view>
</view>
</view>
</view>
</view>
...
@@ -109,20 +111,20 @@ export default {
...
@@ -109,20 +111,20 @@ export default {
return
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered
:
false
,
triggered
:
false
,
list
:
[
//
list: [
{
//
{
image
:
"https://cdn.uviewui.com/uview/swiper/1.jpg"
,
//
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
},
//
},
{
//
{
image
:
"https://cdn.uviewui.com/uview/swiper/2.jpg"
,
//
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
},
//
},
{
//
{
image
:
"https://cdn.uviewui.com/uview/swiper/3.jpg"
,
//
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
},
//
},
],
//
],
title
:
false
,
title
:
false
,
mode
:
"round"
,
//
mode: "round",
indicatorPos
:
"bottomCenter"
,
//
indicatorPos: "bottomCenter",
title
:
"Hello"
,
title
:
"Hello"
,
loaded
:
false
,
loaded
:
false
,
needSettled
:
true
,
needSettled
:
true
,
...
@@ -132,14 +134,19 @@ export default {
...
@@ -132,14 +134,19 @@ export default {
currentLoadStatus
:
"loading"
,
currentLoadStatus
:
"loading"
,
orderList
:
[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}],
orderList
:
[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}],
search
:
{
search
:
{
token
:
app
.
globalData
.
token
||
""
,
token
:
""
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
10
,
pageSize
:
10
,
},
},
bottomLoading
:
false
,
bottomLoading
:
false
,
};
};
},
},
watch
:
{},
watch
:
{
vuex_token
(
val
){
// 监听token变化,如果更新则重新加载页面数据
val
&&
this
.
initSettleInfo
()
}
},
computed
:
{
computed
:
{
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
...
@@ -149,13 +156,19 @@ export default {
...
@@ -149,13 +156,19 @@ export default {
"font-weight"
:
"bold"
,
"font-weight"
:
"bold"
,
};
};
},
},
msgStyle
()
{
msgStyle
Image
()
{
return
{
return
{
1
:
""
,
// 置顶
'1'
:
process
.
uniEnv
.
qn_base_url
+
"zhiding.png"
,
// 置顶
2
:
""
,
// 通知
'2'
:
process
.
uniEnv
.
qn_base_url
+
"tongzhi.png"
,
// 通知
3
:
""
,
// 消息
'3'
:
process
.
uniEnv
.
qn_base_url
+
"xiaoxi.png"
,
// 消息
};
}
},
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'banner.png'
},
},
shouyeyouImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'shouyeyou.png'
}
},
},
onLoad
()
{
onLoad
()
{
this
.
_freshing
=
false
;
this
.
_freshing
=
false
;
...
@@ -163,8 +176,7 @@ export default {
...
@@ -163,8 +176,7 @@ export default {
},
},
onShow
()
{
onShow
()
{
// 每次进入页面都刷新入驻状态
// 每次进入页面都刷新入驻状态
if
(
app
.
globalData
.
token
)
{
if
(
this
.
vuex_token
)
{
// 初始化入驻信息
this
.
initSettleInfo
();
this
.
initSettleInfo
();
}
else
{
}
else
{
// 初始化订单数据
// 初始化订单数据
...
@@ -180,7 +192,7 @@ export default {
...
@@ -180,7 +192,7 @@ export default {
if
(
result
&&
result
.
record
)
{
if
(
result
&&
result
.
record
)
{
vm
.
loaded
=
true
;
vm
.
loaded
=
true
;
vm
.
needSettled
=
result
.
needSettled
;
vm
.
needSettled
=
result
.
needSettled
;
vm
.
status
=
Number
(
result
.
record
.
status
);
vm
.
status
=
Number
(
result
.
record
.
status
||
'0'
);
// vm.status = 8
// vm.status = 8
}
}
};
};
...
@@ -207,7 +219,7 @@ export default {
...
@@ -207,7 +219,7 @@ export default {
loadOrderList
()
{
loadOrderList
()
{
let
self
=
this
;
let
self
=
this
;
// 加载订单列表
// 加载订单列表
self
.
search
.
token
=
app
.
globalData
.
token
;
self
.
search
.
token
=
self
.
vuex_
token
;
self
.
$u
.
api
.
listByRecommendOrder
(
self
.
search
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listByRecommendOrder
(
self
.
search
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
...
@@ -259,12 +271,12 @@ export default {
...
@@ -259,12 +271,12 @@ export default {
});
});
},
1000
);
},
1000
);
},
},
clickSwiper
(
index
)
{},
//
clickSwiper(index) {},
handleScroll
()
{
handleScroll
()
{
console
.
log
(
"-----scroll-------"
);
console
.
log
(
"-----scroll-------"
);
},
},
immediatelyIn
()
{
immediatelyIn
()
{
if
(
util
.
getToken
())
{
if
(
this
.
vuex_token
)
{
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
var
pageIndex
=
1
;
var
pageIndex
=
1
;
switch
(
this
.
status
)
{
switch
(
this
.
status
)
{
...
@@ -324,19 +336,25 @@ export default {
...
@@ -324,19 +336,25 @@ export default {
font-size
:
40rpx
;
font-size
:
40rpx
;
}
}
.banner-image
{
width
:
730rpx
;
height
:
280rpx
;
margin-left
:
-14rpx
;
}
.msg-view
{
.msg-view
{
.msg-title
{
.msg-title
{
color
:
#333333
;
color
:
#333333
;
font-size
:
32rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
padding
:
50
rpx
0rpx
30rpx
0rpx
;
padding
:
1
rpx
0rpx
30rpx
0rpx
;
}
}
.msg-list-view
{
.msg-list-view
{
border-radius
:
12rpx
;
border-radius
:
12rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
padding
:
6
rpx
30rpx
;
padding
:
12
rpx
30rpx
;
height
:
2
68
rpx
;
height
:
2
52
rpx
;
}
}
.msg-content
{
.msg-content
{
...
@@ -357,12 +375,13 @@ export default {
...
@@ -357,12 +375,13 @@ export default {
.msg-icon
{
.msg-icon
{
width
:
80rpx
;
width
:
80rpx
;
height
:
36rpx
;
height
:
36rpx
;
margin-right
:
20rpx
;
}
}
}
}
.right-icon
{
.right-icon
{
width
:
14rpx
;
width
:
14rpx
;
height
:
24px
;
height
:
24
r
px
;
}
}
}
}
...
...
src/pages/login/index.vue
View file @
eb8b2664
...
@@ -83,14 +83,14 @@ export default {
...
@@ -83,14 +83,14 @@ export default {
let
params
=
{
let
params
=
{
nickname
:
app
.
globalData
.
authUserInfo
.
nickName
,
nickname
:
app
.
globalData
.
authUserInfo
.
nickName
,
avatar
:
app
.
globalData
.
authUserInfo
.
avatarUrl
,
avatar
:
app
.
globalData
.
authUserInfo
.
avatarUrl
,
wxAppNo
:
1
,
}
}
login
.
appLogin
().
then
(
res
=>
{
login
.
appLogin
().
then
(
res
=>
{
params
.
code
=
res
.
code
params
.
code
=
res
.
code
return
login
.
authorization
(
params
);
return
login
.
authorization
(
params
);
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
res
&&
util
.
getToken
())
{
if
(
res
)
{
that
.
setUserData
(
res
.
data
)
that
.
goBackPage
()
that
.
goBackPage
()
}
else
{
}
else
{
this
.
setLoginStatus
()
this
.
setLoginStatus
()
...
@@ -118,14 +118,14 @@ export default {
...
@@ -118,14 +118,14 @@ export default {
avatar
:
app
.
globalData
.
authUserInfo
.
avatarUrl
,
avatar
:
app
.
globalData
.
authUserInfo
.
avatarUrl
,
encryptedData
:
e
.
detail
.
encryptedData
,
encryptedData
:
e
.
detail
.
encryptedData
,
iv
:
e
.
detail
.
iv
,
iv
:
e
.
detail
.
iv
,
wxAppNo
:
1
,
}
}
login
.
appLogin
().
then
(
res
=>
{
login
.
appLogin
().
then
(
res
=>
{
params
.
code
=
res
.
code
params
.
code
=
res
.
code
return
login
.
signup
(
params
);
return
login
.
signup
(
params
);
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
&&
util
.
getToken
())
{
if
(
res
)
{
that
.
setUserData
(
res
.
data
)
that
.
goBackPage
()
that
.
goBackPage
()
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -169,6 +169,16 @@ export default {
...
@@ -169,6 +169,16 @@ export default {
}
}
},
},
setUserData
(
userInfo
)
{
if
(
userInfo
&&
userInfo
.
token
)
{
// 如果已经登录则直接获取相关信息
util
.
setOpenid
(
userInfo
.
wxopenid
);
this
.
$u
.
vuex
(
'vuex_token'
,
userInfo
.
token
);
uni
.
setStorageSync
(
"user-info"
,
userInfo
);
}
else
{
this
.
$u
.
vuex
(
'vuex_token'
,
''
);
}
},
setLoginStatus
(
authed
=
true
)
{
setLoginStatus
(
authed
=
true
)
{
if
(
authed
)
{
if
(
authed
)
{
...
...
src/pages/settle/base.vue
View file @
eb8b2664
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<text
class=
"label"
>
电工工龄(年)
</text>
<text
class=
"label"
>
电工工龄(年)
</text>
</view>
</view>
<p
:class=
"['u-flex-1 u-text-right area',
{before: !baseInfo.working_age}]">
<p
:class=
"['u-flex-1 u-text-right area',
{before: !baseInfo.working_age}]">
{{
baseInfo
.
working_age
?
workingAgeTxt
:
'去选择'
}}
{{
baseInfo
.
working_age
!==
''
?
workingAgeTxt
:
'去选择'
}}
</p>
</p>
<u-icon
name=
"arrow-right"
color=
"#2272FF"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#2272FF"
size=
"28"
></u-icon>
</view>
</view>
...
@@ -686,6 +686,8 @@
...
@@ -686,6 +686,8 @@
.address-textarea
{
.address-textarea
{
font-size
:
26rpx
;
font-size
:
26rpx
;
width
:
100%
;
height
:
100%
;
}
}
.tip-text
{
.tip-text
{
...
...
src/pages/settle/file.vue
View file @
eb8b2664
...
@@ -30,8 +30,7 @@
...
@@ -30,8 +30,7 @@
<text
class=
"card-item-text"
>
{{
fileInfo
[
cardkey
]
}}
</text>
<text
class=
"card-item-text"
>
{{
fileInfo
[
cardkey
]
}}
</text>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"card-item-error"
v-if=
"fileInfo[cardkey]
<view
class=
"card-item-error"
v-if=
"((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)"
>
{{
frontErrorMsg
}}
</view>
&& ((cardkey == 'id_card_name' || cardkey == 'id_card_number') && frontErrorMsg)"
>
{{
frontErrorMsg
}}
</view>
<view
class=
"card-item-error"
v-if=
"(cardkey == 'id_card_date' && backErrorMsg)"
>
{{
backErrorMsg
}}
</view>
<view
class=
"card-item-error"
v-if=
"(cardkey == 'id_card_date' && backErrorMsg)"
>
{{
backErrorMsg
}}
</view>
</view>
</view>
</view>
</view>
...
...
src/pages/settle/pay-ensure.vue
View file @
eb8b2664
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
...
this
.
payResult
...
this
.
payResult
}
}
const
res
=
await
this
.
$u
.
api
.
getSettleDepositResult
(
params
);
const
res
=
await
this
.
$u
.
api
.
getSettleDepositResult
(
params
);
if
(
res
.
status
!==
true
)
{
if
(
res
.
data
!==
true
)
{
this
.
saving
=
false
this
.
saving
=
false
return
return
}
}
...
@@ -157,7 +157,8 @@
...
@@ -157,7 +157,8 @@
// appid:'wxd1d6eede324b0465'
// appid:'wxd1d6eede324b0465'
}
}
const
response
=
await
this
.
$u
.
api
.
paySettleDeposit
(
params
)
const
response
=
await
this
.
$u
.
api
.
paySettleDeposit
(
params
)
if
(
response
.
status
!==
true
)
{
console
.
log
(
response
)
if
(
response
.
code
!==
200
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
response
.
message
,
title
:
response
.
message
,
icon
:
'none'
icon
:
'none'
...
...
src/pages/settle/prompt.vue
View file @
eb8b2664
...
@@ -132,6 +132,27 @@
...
@@ -132,6 +132,27 @@
let
settledInfo
=
await
app
.
getBaseInfo
(
this
,
callBack
)
let
settledInfo
=
await
app
.
getBaseInfo
(
this
,
callBack
)
this
.
settledInfo
=
settledInfo
this
.
settledInfo
=
settledInfo
this
.
status
=
settledInfo
.
record
.
status
this
.
status
=
settledInfo
.
record
.
status
switch
(
this
.
status
)
{
case
1
:
case
2
:
case
3
:
case
4
:
this
.
pageIndex
=
2
;
break
;
case
8
:
this
.
pageIndex
=
3
;
break
;
case
5
:
case
6
:
this
.
pageIndex
=
4
;
break
;
case
7
:
this
.
pageIndex
=
5
;
break
;
default
:
this
.
pageIndex
=
1
;
break
;
}
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
initInfo
(
settledInfo
.
record
)
this
.
initInfo
(
settledInfo
.
record
)
},
},
...
...
src/pages/settle/sign-contract.vue
View file @
eb8b2664
...
@@ -80,7 +80,6 @@
...
@@ -80,7 +80,6 @@
},
},
data
()
{
data
()
{
return
{
return
{
token
:
app
.
globalData
.
token
,
baseInfo
:
{
baseInfo
:
{
name
:
""
,
name
:
""
,
id_card_no
:
"43072219800123456"
,
id_card_no
:
"43072219800123456"
,
...
@@ -378,7 +377,7 @@
...
@@ -378,7 +377,7 @@
// }, 2000)
// }, 2000)
},
},
async
goSign
()
{
async
goSign
()
{
const
token
=
app
.
globalData
.
token
;
const
token
=
this
.
vuex_
token
;
const
settledInfo
=
this
.
settledInfo
const
settledInfo
=
this
.
settledInfo
const
baseInfo
=
this
.
baseInfo
const
baseInfo
=
this
.
baseInfo
const
params
=
{
const
params
=
{
...
...
src/plugins/uploader/request/upload/qiniuUploader.js
View file @
eb8b2664
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
try
{
try
{
var
dataObject
=
JSON
.
parse
(
dataString
);
var
dataObject
=
JSON
.
parse
(
dataString
);
//do something
//do something
var
imageUrl
=
config
.
qiniuImageURLPrefix
+
'/'
+
dataObject
.
key
;
var
imageUrl
=
config
.
qiniuImageURLPrefix
+
'/'
+
(
dataObject
.
key
||
dataObject
.
src
)
;
dataObject
.
imageURL
=
imageUrl
;
dataObject
.
imageURL
=
imageUrl
;
if
(
success
)
{
if
(
success
)
{
success
(
dataObject
);
success
(
dataObject
);
...
...
src/store/$u.mixin.js
View file @
eb8b2664
...
@@ -21,6 +21,6 @@ export default {
...
@@ -21,6 +21,6 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
...
mapState
(
[
'ddd'
]
)
...
mapState
(
$uStoreKey
)
}
}
}
}
src/utils/login.js
View file @
eb8b2664
...
@@ -29,11 +29,12 @@ function appLogin() {
...
@@ -29,11 +29,12 @@ function appLogin() {
// 小程序授权
// 小程序授权
function
authorization
(
data
)
{
function
authorization
(
data
)
{
return
new
Promise
(
async
function
(
resolve
,
reject
)
{
return
new
Promise
(
async
function
(
resolve
,
reject
)
{
data
.
wxAppNo
=
app
.
globalData
.
wxAppNo
const
res
=
await
app
.
$vm
.
$u
.
api
.
loginWechatAuth
(
data
)
const
res
=
await
app
.
$vm
.
$u
.
api
.
loginWechatAuth
(
data
)
if
(
res
)
{
if
(
res
)
{
if
(
res
.
code
==
200
&&
res
.
data
)
{
if
(
res
.
code
==
200
&&
res
.
data
)
{
app
.
setUserData
(
res
.
data
)
//
app.setUserData(res.data)
app
.
getBaseInfo
(
app
.
$vm
)
//
app.getBaseInfo(app.$vm)
resolve
(
res
);
resolve
(
res
);
}
else
{
}
else
{
reject
(
res
);
reject
(
res
);
...
@@ -50,11 +51,12 @@ function authorization(data) {
...
@@ -50,11 +51,12 @@ function authorization(data) {
// 小程序注册
// 小程序注册
function
signup
(
data
)
{
function
signup
(
data
)
{
return
new
Promise
(
async
function
(
resolve
,
reject
)
{
return
new
Promise
(
async
function
(
resolve
,
reject
)
{
data
.
wxAppNo
=
app
.
globalData
.
wxAppNo
const
res
=
await
app
.
$vm
.
$u
.
api
.
loginWechatAuth
(
data
)
const
res
=
await
app
.
$vm
.
$u
.
api
.
loginWechatAuth
(
data
)
if
(
res
)
{
if
(
res
)
{
if
(
res
.
code
==
200
&&
res
.
data
)
{
if
(
res
.
code
==
200
&&
res
.
data
)
{
app
.
setUserData
(
res
.
data
)
//
app.setUserData(res.data)
app
.
getBaseInfo
(
app
.
$vm
)
//
app.getBaseInfo(app.$vm)
resolve
(
res
);
resolve
(
res
);
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
...
...
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