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
397835be
Commit
397835be
authored
May 13, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
6cd7a07d
8982de7c
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1278 additions
and
1142 deletions
+1278
-1142
README.md
README.md
+23
-0
App.vue
src/App.vue
+0
-1
common.js
src/common/api/common.js
+0
-4
contract.js
src/common/api/contract.js
+0
-18
index.js
src/common/api/index.js
+0
-3
order.js
src/common/api/order.js
+42
-23
settled.js
src/common/api/settled.js
+4
-13
util.js
src/common/util.js
+1
-2
XhInput.vue
src/components/createCom/XhInput.vue
+37
-23
XhLabel.vue
src/components/createCom/XhLabel.vue
+7
-2
XhServiceMore.vue
src/components/createCom/XhServiceMore.vue
+34
-9
pages.json
src/pages.json
+19
-42
learn.vue
src/pages/index/learn.vue
+0
-1
mine.vue
src/pages/index/mine.vue
+28
-48
answer.vue
src/pages/learn/answer.vue
+840
-813
index.vue
src/pages/login/index.vue
+68
-28
index.vue
src/pages/mine/contract/index.vue
+22
-44
out.vue
src/pages/mine/contract/out.vue
+25
-0
index.vue
src/pages/mine/wallet/index.vue
+38
-10
withdraw.vue
src/pages/mine/wallet/withdraw.vue
+2
-1
complete.vue
src/pages/order/complete.vue
+25
-1
detail.vue
src/pages/order/detail.vue
+36
-36
feedback.vue
src/pages/order/feedback.vue
+17
-12
file.vue
src/pages/settle/file.vue
+2
-2
pay-ensure.vue
src/pages/settle/pay-ensure.vue
+4
-3
sign-contract.vue
src/pages/settle/sign-contract.vue
+4
-3
No files found.
README.md
View file @
397835be
...
@@ -36,6 +36,28 @@ npm run build:mp-weixin // 运行生产环境
...
@@ -36,6 +36,28 @@ npm run build:mp-weixin // 运行生产环境
查看
[
配置参考
](
https://cli.vuejs.org/config/
)
查看
[
配置参考
](
https://cli.vuejs.org/config/
)
#### pages配置说明
##### 启动页配置,只作用于开发环境
current--当前启动页
list--可选启动页列表
name--启动页标题
path--启动页路径
query--启动页参数,页面onLoad中获取
```
json
{
"condition"
:
{
"current"
:
0
,
"list"
:
[
{
"name"
:
"拍照小工具"
,
"path"
:
"pages/photo/index"
,
"query"
:
{}
}
]
}
}
```
### Easycom [组件模式](https://uniapp.dcloud.io/collocation/pages?id=easycom)
### Easycom [组件模式](https://uniapp.dcloud.io/collocation/pages?id=easycom)
...
@@ -86,3 +108,4 @@ npm run build:mp-weixin // 运行生产环境
...
@@ -86,3 +108,4 @@ npm run build:mp-weixin // 运行生产环境
PS: 当前项目使用了:方式一,具体情况可以参考state目录下代码
PS: 当前项目使用了:方式一,具体情况可以参考state目录下代码
vm.vuex_token
vm.vuex_token
src/App.vue
View file @
397835be
...
@@ -5,7 +5,6 @@ import util from "@/utils/util.js";
...
@@ -5,7 +5,6 @@ import util from "@/utils/util.js";
import
login
from
"@/utils/login.js"
;
import
login
from
"@/utils/login.js"
;
export
default
{
export
default
{
globalData
:
{
globalData
:
{
jumpLoginStatus
:
true
,
// 开发环境
// 开发环境
uniEnv
:
process
.
uniEnv
,
uniEnv
:
process
.
uniEnv
,
// 微信小程序平台编号,空--家维广场,1--自营平台
// 微信小程序平台编号,空--家维广场,1--自营平台
...
...
src/common/api/common.js
View file @
397835be
let
commonApiFun
=
function
(
vm
){
let
commonApiFun
=
function
(
vm
){
let
loginWxByUser
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-support-rest/rest/ssoinfo/v3/getUsersByCode'
,
params
);
let
loginWxByPhone
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/v3/findByMobile'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
loginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
loginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
});
// 水印-查询用户自定义设置
// 水印-查询用户自定义设置
let
getUserWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark'
,
params
);
let
getUserWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark'
,
params
);
...
@@ -10,8 +8,6 @@ let commonApiFun = function(vm){
...
@@ -10,8 +8,6 @@ let commonApiFun = function(vm){
let
saveImage
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/89/saveImage'
,
params
);
let
saveImage
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'http://apidoc.banshouhui.com:3000/mock/89/saveImage'
,
params
);
const
commonApi
=
{
const
commonApi
=
{
loginWxByUser
,
loginWxByPhone
,
loginWechatAuth
,
loginWechatAuth
,
getUserWatermark
,
getUserWatermark
,
saveUserWatermark
,
saveUserWatermark
,
...
...
src/common/api/contract.js
deleted
100644 → 0
View file @
6cd7a07d
const
globalUrl
=
process
.
uniEnv
||
{}
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
const
collegeApiUrl
=
globalUrl
.
ucenterUrl
.
xueUrl
const
testApiUrl
=
globalUrl
.
systemUrl
.
apiUrl
let
contractApiFun
=
function
(
vm
){
//我的合同//
Mycontract
=
async
(
params
)
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled-contract/info'
+
'?Authorization='
+
vm
.
vuex_token
+
params
)
const
contract
=
{
Mycontract
}
return
contract
}
module
.
exports
=
{
contractApiFun
}
src/common/api/index.js
View file @
397835be
...
@@ -11,7 +11,6 @@ import {learnApiFun} from "@/common/api/learn.js";
...
@@ -11,7 +11,6 @@ import {learnApiFun} from "@/common/api/learn.js";
import
{
orderApiFun
}
from
"@/common/api/order.js"
;
import
{
orderApiFun
}
from
"@/common/api/order.js"
;
import
{
assessmentApiFun
}
from
"@/common/api/assessment.js"
import
{
assessmentApiFun
}
from
"@/common/api/assessment.js"
import
{
certApiFun
}
from
"@/common/api/cert.js"
import
{
certApiFun
}
from
"@/common/api/cert.js"
import
{
contractApiFun
}
from
"@/common/api/contract.js"
let
apiFun
=
function
(
vm
)
{
let
apiFun
=
function
(
vm
)
{
let
commonApi
=
commonApiFun
(
vm
);
let
commonApi
=
commonApiFun
(
vm
);
let
settledApi
=
settledApiFun
(
vm
)
let
settledApi
=
settledApiFun
(
vm
)
...
@@ -20,7 +19,6 @@ let apiFun = function(vm) {
...
@@ -20,7 +19,6 @@ let apiFun = function(vm) {
let
assessmentApi
=
assessmentApiFun
(
vm
)
let
assessmentApi
=
assessmentApiFun
(
vm
)
let
orderApi
=
orderApiFun
(
vm
)
let
orderApi
=
orderApiFun
(
vm
)
let
certApi
=
certApiFun
(
vm
)
let
certApi
=
certApiFun
(
vm
)
let
contractApi
=
contractApiFun
(
vm
)
let
apiUrl
=
{
let
apiUrl
=
{
...
commonApi
,
...
commonApi
,
...
settledApi
,
...
settledApi
,
...
@@ -29,7 +27,6 @@ let apiFun = function(vm) {
...
@@ -29,7 +27,6 @@ let apiFun = function(vm) {
...
orderApi
,
...
orderApi
,
...
assessmentApi
,
...
assessmentApi
,
...
certApi
,
...
certApi
,
...
contractApi
}
}
return
apiUrl
return
apiUrl
}
}
...
...
src/common/api/order.js
View file @
397835be
import
util
from
'@/utils/util.js'
import
util
from
'@/utils/util.js'
// 接口公共前缀
const
jsonType
=
{
'content-type'
:
'application/json'
}
const
prefix
=
'/wxh-worker-rest/rest/'
const
formType
=
{
'content-type'
:
'application/x-www-form-urlencoded'
}
let
orderApiFun
=
function
(
vm
){
let
orderApiFun
=
function
(
vm
){
// 接口公共前缀
const
prefix
=
'/wxh-worker-rest/rest/'
let
prefix2
=
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
let
order
=
'/wxh-worker-rest/rest/order/'
let
settle
=
'/wxh-worker-rest/rest/settle/'
+
vm
.
vuex_token
let
token
=
vm
.
vuex_token
let
listByRecommendOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/recommend/order'
,
params
);
let
listByRecommendOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/recommend/order'
,
params
);
/**
/**
* 工单数量查询接口
* 工单数量查询接口
*/
*/
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
/**
/**
* 工单列表接口
* 工单列表接口
...
@@ -17,7 +25,7 @@ let orderApiFun = function(vm){
...
@@ -17,7 +25,7 @@ let orderApiFun = function(vm){
/**
/**
* 获取师傅的预约日历
* 获取师傅的预约日历
*/
*/
let
workerCalendar
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/calendar'
,
params
);
let
workerCalendar
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/wokerOrder/appointment/calendar'
,
params
);
/**
/**
* 师傅预约
* 师傅预约
...
@@ -29,7 +37,7 @@ let orderApiFun = function(vm){
...
@@ -29,7 +37,7 @@ let orderApiFun = function(vm){
/**
/**
* 师傅签到接口
* 师傅签到接口
*/
*/
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
}
);
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,
formType
);
/**
/**
* 订单详情查询
* 订单详情查询
*/
*/
...
@@ -42,7 +50,7 @@ let orderApiFun = function(vm){
...
@@ -42,7 +50,7 @@ let orderApiFun = function(vm){
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
`/`
+
orderId
,
params
)
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
`/`
+
orderId
,
params
)
/* 师傅拒单 */
/* 师傅拒单 */
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
`/order/
${
orderId
}
/workerReject/V2`
,
params
)
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
2
+
`/order/
${
orderId
}
/workerReject/V2`
,
params
)
/**
/**
...
@@ -53,41 +61,41 @@ let orderApiFun = function(vm){
...
@@ -53,41 +61,41 @@ let orderApiFun = function(vm){
/**
/**
* 接单
* 接单
*/
*/
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
}
);
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/order/'
+
orderId
+
'/accept'
,
params
,
formType
);
/**
/**
* 抢单
* 抢单
*/
*/
let
orderGan
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/revision/applets/'
+
vm
.
vuex_token
+
'/order/acceptAppletsOrder'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
}
);
let
orderGan
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/revision/applets/'
+
vm
.
vuex_token
+
'/order/acceptAppletsOrder'
,
params
,
formType
);
/**
/**
* 获取拍照标准
* 获取拍照标准
*/
*/
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/standard'
,
params
);
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/photo/standard'
,
params
);
/**
/**
* 获取拍照标准单独项目
* 获取拍照标准单独项目
*/
*/
let
orderStandardItem
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/standard/only'
,
params
);
let
orderStandardItem
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/photo/standard/only'
,
params
);
/**
/**
* 保存图片信息
* 保存图片信息
*/
*/
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
/**
/**
* 获取师傅水印 or 默认水印
* 获取师傅水印 or 默认水印
*/
*/
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/photo/watermark'
,
params
);
/**
/**
* 保存师傅水印
* 保存师傅水印
*/
*/
let
saveWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
let
saveWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/photo/watermark'
,
params
);
/**
/**
* 获取师傅开放可选时间段
* 获取师傅开放可选时间段
*/
*/
let
openTimerange
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/timerange'
,
params
);
let
openTimerange
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/wokerOrder/appointment/timerange'
,
params
);
/**
/**
* 联系时间接口
* 联系时间接口
...
@@ -108,7 +116,7 @@ let orderApiFun = function(vm){
...
@@ -108,7 +116,7 @@ let orderApiFun = function(vm){
/**
/**
* 获取订单的完工项目(配置+数据)
* 获取订单的完工项目(配置+数据)
*/
*/
let
getCompleteConfigAndData
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/info'
);
let
getCompleteConfigAndData
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/order/'
+
orderId
+
'/maintain/info'
);
/**
/**
* 查询措施
* 查询措施
...
@@ -123,16 +131,16 @@ let orderApiFun = function(vm){
...
@@ -123,16 +131,16 @@ let orderApiFun = function(vm){
/**
/**
* 保存售后记录
* 保存售后记录
*/
*/
let
saveCompleteData
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveMaintainInfoV2'
,
params
);
let
saveCompleteData
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/order/'
+
orderId
+
'/maintain/saveMaintainInfoV2'
,
params
);
/**
/**
* 保内工单完工
* 保内工单完工
*/
*/
let
inOrderFinish
=
async
(
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/finishedAndConfirm'
,{},
{
'content-type'
:
'application/x-www-form-urlencoded'
}
);
let
inOrderFinish
=
async
(
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/order/'
+
orderId
+
'/finishedAndConfirm'
,{},
formType
);
/**
/**
* 保外工单完工
* 保外工单完工
*/
*/
let
outOrderFinish
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/v1/finishedAndConfirmOutGuaranteePeriod'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
}
);
let
outOrderFinish
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
2
+
'/order/'
+
orderId
+
'/v1/finishedAndConfirmOutGuaranteePeriod'
,
params
,
formType
);
/**
/**
...
@@ -143,13 +151,20 @@ let orderApiFun = function(vm){
...
@@ -143,13 +151,20 @@ let orderApiFun = function(vm){
/**
/**
* 我的库存明细(物料)
* 我的库存明细(物料)
*/
*/
let
listBystock
=
async
()
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/myinfo/stock'
,
{},
{
'content-type'
:
'application/json'
});
let
listBystock
=
async
()
=>
await
vm
.
$u
.
get
(
prefix2
+
'/myinfo/stock'
,
{},
jsonType
);
/**
/**
* 我的出入库流水
* 我的出入库流水
*/
*/
let
listAccessHistory
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/myinfo/access/history'
,
params
,
{
'content-type'
:
'application/json'
}
);
let
listAccessHistory
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
2
+
'/myinfo/access/history'
,
params
,
jsonType
);
// 获取我的钱包-资产信息
let
getAssets
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
settle
+
'/v2/total'
,
params
);
// 获取我的钱包-结算明细
let
listStatement
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
settle
+
'/v2/statement'
,
params
);
// 获取我的钱包-支付单一览
let
payableRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
settle
+
'/payable/v2/queryPayableRecord'
,
params
);
// 获取我的钱包-师傅提现
let
workerApplyPay
=
async
(
params
=
{},
payableRecordId
)
=>
await
vm
.
$u
.
post
(
`/wxh-worker-rest/rest/
${
token
}
/applypay/
${
payableRecordId
}
/workerApplyPay`
,
params
);
const
orderApi
=
{
const
orderApi
=
{
listByRecommendOrder
,
listByRecommendOrder
,
...
@@ -182,7 +197,11 @@ let orderApiFun = function(vm){
...
@@ -182,7 +197,11 @@ let orderApiFun = function(vm){
outOrderFinish
,
outOrderFinish
,
addressToCoordinate
,
addressToCoordinate
,
listBystock
,
listBystock
,
listAccessHistory
listAccessHistory
,
getAssets
,
listStatement
,
payableRecord
,
workerApplyPay
,
}
}
return
orderApi
return
orderApi
}
}
...
...
src/common/api/settled.js
View file @
397835be
...
@@ -8,43 +8,33 @@ let settledApiFun = function(vm){
...
@@ -8,43 +8,33 @@ let settledApiFun = function(vm){
let
getSettleArea
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/area'
,
params
);
let
getSettleArea
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/area'
,
params
);
/* 提交用户基本信息 */
/* 提交用户基本信息 */
let
submitSettleBaseInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/save-info'
,
params
);
let
submitSettleBaseInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/save-info'
,
params
);
/* 校验身份证正面 */
/* 校验身份证正面 */
let
checkSettleIDCardFront
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/card-front'
,
params
);
let
checkSettleIDCardFront
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/card-front'
,
params
);
/* 校验身份证反面 */
/* 校验身份证反面 */
let
checkSettleIDCardBack
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/card-back'
,
params
);
let
checkSettleIDCardBack
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/card-back'
,
params
);
/* 提交用户资料 */
/* 提交用户资料 */
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
+
'/v2/settled/pay-deposit'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
paySettleDeposit
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v2/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'
});
/* 校验银行卡 */
/* 校验银行卡 */
// let checkSettleBank = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyBankCard', params);
// let checkSettleBank = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyBankCard', params);
/* 校验支付宝 */
/* 校验支付宝 */
// let checkSettleAlipay = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyAlipayAccount', params);
// let checkSettleAlipay = async (params = {}) => await vm.$u.get('/wxh-site-rest/rest/register/verifyAlipayAccount', params);
/* 提交认证资料 */
/* 提交认证资料 */
let
checkSettleSignInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/check-sign-info'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
checkSettleSignInfo
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/check-sign-info'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
/* 获取接单教程列表 */
/* 获取接单教程列表 */
let
listOrderingTutorials
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/get-course-rate'
,
params
);
let
listOrderingTutorials
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled/get-course-rate'
,
params
);
/* 更新接单教程状态 */
/* 更新接单教程状态 */
let
saveCourseRate
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/save-course-rate'
,
params
);
let
saveCourseRate
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/save-course-rate'
,
params
);
/* 获取消息内容列表 */
/* 获取消息内容列表 */
let
listByNotice
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/notice/home-list'
,
params
);
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
);
let
syncAddress
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/sync-address'
,
params
);
//我的合同//
let
Mycontract
=
async
(
params
)
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/settled-contract/info'
+
'?Authorization='
+
vm
.
vuex_token
+
params
)
const
settledApi
=
{
const
settledApi
=
{
getSettleBaseInfo
,
getSettleBaseInfo
,
...
@@ -62,6 +52,7 @@ let settledApiFun = function(vm){
...
@@ -62,6 +52,7 @@ let settledApiFun = function(vm){
saveCourseRate
,
saveCourseRate
,
listByNotice
,
listByNotice
,
syncAddress
,
syncAddress
,
Mycontract
,
}
}
return
settledApi
return
settledApi
}
}
...
...
src/common/util.js
View file @
397835be
function
strlen
(
value
)
{
function
strlen
(
value
)
{
//中文、中文标点、全角字符按1长度,英文、英文符号、数字按0.5长度计算
//中文、中文标点、全角字符按1长度,英文、英文符号、数字按0.5长度计算
let
cnReg
=
/
([\u
4e00-
\u
9fa5
]
|
[\u
3000-
\u
303F
]
|
[\u
FF00-
\u
FF60
])
/g
;
let
cnReg
=
/
([\u
4e00-
\u
9fa5
]
|
[\u
3000-
\u
303F
]
|
[\u
FF00-
\u
FF60
])
/g
;
...
@@ -184,5 +183,5 @@ export {
...
@@ -184,5 +183,5 @@ export {
setDb
,
setDb
,
getDb
,
getDb
,
getDateTime
,
getDateTime
,
randStr
randStr
,
}
}
src/components/createCom/XhInput.vue
View file @
397835be
...
@@ -17,6 +17,16 @@
...
@@ -17,6 +17,16 @@
type
:
String
,
type
:
String
,
default
:
'请输入'
default
:
'请输入'
},
},
item
:
{
type
:
Object
,
default
()
{
return
{}
}
},
type
:
{
type
:
String
,
default
:
'text'
}
// width: { // 例如:454rpx
// width: { // 例如:454rpx
// type: String,
// type: String,
// default: '100%'
// default: '100%'
...
@@ -24,32 +34,36 @@
...
@@ -24,32 +34,36 @@
},
},
data
()
{
data
()
{
return
{
return
{
maxlength
:
140
,
inputType
:
'text'
,
// type: 'text'
}
}
},
},
computed
:
{
computed
:
{
type
()
{
//
type() {
if
(
this
.
item
)
{
//
if (this.item) {
let
ty
=
this
.
item
.
fieldsType
.
toLocaleLowerCase
()
//
let ty = this.item.fieldsType.toLocaleLowerCase()
switch
(
ty
)
{
//
switch (ty) {
case
'text'
:
//
case 'text':
return
'textarea'
//
return 'textarea'
case
'password'
:
//
case 'password':
return
this
.
item
.
fieldsType
//
return this.item.fieldsType
case
'decimal'
:
//
case 'decimal':
case
'number'
:
//
case 'number':
case
'double'
:
//
case 'double':
case
'integer'
:
//
case 'integer':
this
.
maxlength
=
9
//
this.maxlength = 9
return
'digit'
//
return 'digit'
case
'textarea'
:
//
case 'textarea':
default
:
//
default:
return
'text'
//
return 'text'
}
//
}
}
else
{
//
} else {
return
'text'
//
return 'text'
}
//
}
// },
maxlength
()
{
return
this
.
type
==
'digit'
?
9
:
140
},
},
fieldsWidth
()
{
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
...
@@ -71,7 +85,7 @@
...
@@ -71,7 +85,7 @@
return
this
.
textarea
return
this
.
textarea
},
},
textarea
()
{
textarea
()
{
return
this
.
t
ype
==
'textarea'
return
this
.
inputT
ype
==
'textarea'
},
},
backgroundColor
()
{
backgroundColor
()
{
return
this
.
textarea
?
'transparent'
:
'#F4F5F7'
return
this
.
textarea
?
'transparent'
:
'#F4F5F7'
...
...
src/components/createCom/XhLabel.vue
View file @
397835be
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view>
<view>
<view
class=
"list u-flex u-row-between"
>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-m-r-20
title-text
"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
>
{{
valueTxt
}}
</view>
<view
class=
"u-flex-1 location-name"
>
{{
valueTxt
}}
</view>
</view>
</view>
</view>
</view>
...
@@ -55,13 +55,18 @@
...
@@ -55,13 +55,18 @@
line-height
:
40
rpx
;
line-height
:
40
rpx
;
color
:
#fa3534
;
color
:
#fa3534
;
}
}
.title-text
{
font-size
:
26
rpx
;
color
:
#333333
;
}
.item-image
{
.item-image
{
width
:
24
rpx
;
width
:
24
rpx
;
height
:
24
rpx
;
height
:
24
rpx
;
margin-right
:
10
rpx
;
margin-right
:
10
rpx
;
}
}
.location-name
{
.location-name
{
color
:
#2272FF
;
color
:
#333333
;
font-size
:
26
rpx
;
text-align
:
right
;
text-align
:
right
;
}
}
.location
{
.location
{
...
...
src/components/createCom/XhServiceMore.vue
View file @
397835be
<!-- ******************* 输入框 ******************* -->
<!-- ******************* 输入框 ******************* -->
<
template
>
<
template
>
<view>
<view>
<view
class=
"list u-flex u-row-between"
>
<view
class=
"list u-flex item-row-between"
>
<view
class=
"item-title"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
@
click=
"toMaterialPage"
>
</view>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
请选择
<view
class=
"location-name"
@
click=
"toMaterialPage"
>
<text
class=
"arrow-text"
>
{{
arrowText
}}
</text>
<u-icon
name=
"arrow-right"
color=
"#2979ff"
size=
"30"
></u-icon>
</view>
</view>
</view>
</view>
<!--
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
-->
<!--
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
-->
...
@@ -36,6 +39,9 @@
...
@@ -36,6 +39,9 @@
computed
:
{
computed
:
{
mixingImage
()
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
arrowText
()
{
return
false
?
'已选择'
:
'请选择'
}
}
},
},
watch
:
{},
watch
:
{},
...
@@ -57,7 +63,7 @@
...
@@ -57,7 +63,7 @@
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.required
{
.required
{
padding-right
:
10rpx
;
padding-right
:
10rpx
;
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -69,10 +75,29 @@
...
@@ -69,10 +75,29 @@
height
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
margin-right
:
10rpx
;
}
}
.item-row-between
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.item-title
{
display
:
flex
;
font-size
:
26rpx
;
color
:
#333333
;
align-items
:
center
;
}
.location-name
{
.location-name
{
color
:
#2272FF
;
color
:
#2272FF
;
text-align
:
right
;
text-align
:
right
;
font-size
:
26rpx
;
display
:
flex
;
align-items
:
center
;
.arrow-text
{
margin-right
:
6rpx
;
}
}
}
}
.location
{
.location
{
background
:
#F4F5F7
;
background
:
#F4F5F7
;
padding
:
10rpx
20rpx
;
padding
:
10rpx
20rpx
;
...
...
src/pages.json
View file @
397835be
...
@@ -41,7 +41,9 @@
...
@@ -41,7 +41,9 @@
{
{
"path"
:
"pages/login/index"
,
"path"
:
"pages/login/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"授权登录"
"navigationBarTitleText"
:
"授权登录"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
true
}
}
}
}
],
],
...
@@ -219,6 +221,13 @@
...
@@ -219,6 +221,13 @@
}
}
},
},
{
{
"path"
:
"contract/out"
,
"style"
:{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"customer/index"
,
"path"
:
"customer/index"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
...
@@ -277,20 +286,19 @@
...
@@ -277,20 +286,19 @@
}
}
},
},
{
{
//
订单详情页
"path"
:
"detail"
,
"path"
:
"detail"
,
"style"
:
"style"
:
{
{
"navigationStyle"
:
"custom"
//
隐藏系统导航栏
"navigationBarTitleText"
:
"订单详情"
,
"navigationStyle"
:
"custom"
}
}
},
},
{
{
//
订单搜索页
"path"
:
"search"
,
"path"
:
"search"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
"
订单搜索
"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
}
...
@@ -324,9 +332,6 @@
...
@@ -324,9 +332,6 @@
"navigationBarTitleText"
:
"水印设置"
,
"navigationBarTitleText"
:
"水印设置"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"backgroundColor"
:
"#F4F5F7"
"backgroundColor"
:
"#F4F5F7"
//
"navigationBarBackgroundColor"
:
"#333333"
,
//
"navigationBarTextStyle"
:
"#FFFFFF"
,
//
"disableScroll"
:
true
}
}
},
},
{
{
...
@@ -472,46 +477,18 @@
...
@@ -472,46 +477,18 @@
}
}
]
]
},
},
"condition"
:
{
//模式配置,仅开发期间生效
"condition"
:
{
"current"
:
0
,
//当前激活的模式(list
的索引项)
"current"
:
0
,
"list"
:
[
"list"
:
[
{
{
"name"
:
"拍照小工具"
,
//模式名称
"name"
:
"拍照小工具"
,
"path"
:
"pages/photo/index"
,
//启动页面,必选
"path"
:
"pages/photo/index"
,
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
"query"
:
{}
},
},
{
{
//
gaomingbo
"name"
:
"工单-过程反馈"
,
"name"
:
"工单-过程反馈"
,
"path"
:
"pages/order/feedback"
,
"path"
:
"pages/order/feedback"
,
"query"
:
""
"query"
:
""
},
{
"name"
:
"在线考试"
,
//模式名称
"path"
:
"pages/learn/exam"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"入驻考试"
,
//模式名称
"path"
:
"pages/exam/index"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"完工配置"
,
//模式名称
"path"
:
"pages/order/complete"
,
//启动页面,必选
"query"
:
{
"id"
:
11880091
}
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"学习 - 首页"
,
//模式名称
"path"
:
"pages/index/learn"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"我的 - 我的证件 - 列表"
,
//模式名称
"path"
:
"pages/mine/cert/index"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
}
]
]
}
}
...
...
src/pages/index/learn.vue
View file @
397835be
...
@@ -667,7 +667,6 @@
...
@@ -667,7 +667,6 @@
url
:
"/pages/learn/answer?examId="
+
examInfo
.
id
,
url
:
"/pages/learn/answer?examId="
+
examInfo
.
id
,
});
});
}
else
if
(
examInfo
.
examStatus
==
1
)
{
}
else
if
(
examInfo
.
examStatus
==
1
)
{
// debugger;return;
// examInfo.status = '通过';
// examInfo.status = '通过';
if
(
examInfo
.
status
==
'通过'
)
{
if
(
examInfo
.
status
==
'通过'
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
...
...
src/pages/index/mine.vue
View file @
397835be
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
</u-navbar>
</u-navbar>
<view
class=
"mine-content"
>
<view
class=
"mine-content"
>
<view
class=
"header-view"
>
<view
class=
"header-view"
>
<view
:class=
"['head-image',
{'has-image':
info.headImage
}]">
<view
:class=
"['head-image',
{'has-image':
avatar
}]">
<u-avatar
:src=
"headImageUrl"
:size=
"headSize"
mode=
"circle"
></u-avatar>
<u-avatar
:src=
"headImageUrl"
:size=
"headSize"
mode=
"circle"
></u-avatar>
</view>
</view>
<view
class=
"header-content"
>
<view
class=
"header-content"
>
<view
class=
"name-view"
@
click=
"handleClickName"
>
{{
name
}}
</view>
<view
class=
"name-view"
@
click=
"handleClickName"
>
{{
name
||
"点击登录"
}}
</view>
<view
:class=
"['tel-view',
{'active':
info.tel
}]" @click="handleClickTel">
<view
:class=
"['tel-view',
{'active':
mobile
}]" @click="handleClickTel">
<text>
{{
telTip
}}
</text>
<text>
{{
telTip
}}
</text>
<u-icon
class=
"tel-arrow-icon"
name=
"arrow-up-fill"
></u-icon>
<u-icon
class=
"tel-arrow-icon"
name=
"arrow-up-fill"
></u-icon>
</view>
</view>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<u-cell-group
:border=
"false"
>
<u-cell-group
:border=
"false"
>
<view
v-for=
"(item, index) in items"
:key=
"index"
>
<view
v-for=
"(item, index) in items"
:key=
"index"
>
<u-cell-item
:value=
"item.value"
:border-bottom=
"false"
@
click=
"handleClick(index)"
>
<u-cell-item
:value=
"item.value"
:border-bottom=
"false"
@
click=
"handleClick(index)"
>
<image
slot=
"icon"
:src=
"
imageUrl
+ item.icon"
:style=
"item.imageStyle"
></image>
<image
slot=
"icon"
:src=
"
qnPath
+ item.icon"
:style=
"item.imageStyle"
></image>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
<view
slot=
"value"
class=
"item-value"
>
{{
value
}}
</view>
<view
slot=
"value"
class=
"item-value"
>
{{
value
}}
</view>
</u-cell-item>
</u-cell-item>
...
@@ -30,13 +30,7 @@
...
@@ -30,13 +30,7 @@
</view>
</view>
</u-cell-group>
</u-cell-group>
</view>
</view>
<!--
<view
class=
"u-m-t-20"
@
click=
"take"
>
<u-cell-group>
<u-cell-item
icon=
"setting"
title=
"相机组件测试"
></u-cell-item>
</u-cell-group>
</view>
-->
</view>
</view>
<!--
<take-photo
v-if=
"takeStatus"
:currentItem=
"testData"
@
close=
"closeTake"
></take-photo>
-->
</view>
</view>
</
template
>
</
template
>
...
@@ -48,26 +42,21 @@
...
@@ -48,26 +42,21 @@
},
},
data
()
{
data
()
{
return
{
return
{
qnPath
:
process
.
uniEnv
.
qn_base_url
,
serviceTel
:
'0755-81773817'
,
serviceTel
:
'0755-81773817'
,
info
:
{},
// pic: 'https://uviewui.com/common/logo.png',
// show: true,
// takeStatus: false,
// testData: {
// _id: '1', // 规格ID
// system_id: '2', // 系统ID
// brand_id: '3', // 品牌ID
// classify_id: '4', // 分类ID
// images: [ // 拍照要求示意图
// 'https://qn-static.banshouhui.com/live_mark.png',
// 'https://qn-static.banshouhui.com/live_mark.png',
// 'https://qn-static.banshouhui.com/live_mark.png'
// ],
// main_point: [] // 要点
// }
}
}
},
},
computed
:
{
computed
:
{
avatar
()
{
return
this
.
vuex_settled
&&
this
.
vuex_settled
.
avatar
||
''
},
name
()
{
return
this
.
vuex_settled
&&
this
.
vuex_settled
.
id_card_name
||
this
.
vuex_settled
.
nickname
||
this
.
vuex_settled
.
name
||
''
},
mobile
()
{
return
this
.
vuex_settled
&&
this
.
vuex_settled
.
mobile
||
''
},
items
()
{
items
()
{
return
[{
return
[{
title
:
'我的钱包'
,
title
:
'我的钱包'
,
...
@@ -113,29 +102,23 @@
...
@@ -113,29 +102,23 @@
}
}
]
]
},
},
name
()
{
return
this
.
info
.
name
||
'点击登录'
},
telTip
()
{
telTip
()
{
return
this
.
info
.
tel
?
'已绑定手机号'
:
'绑定手机号'
return
this
.
mobile
&&
'已绑定手机'
||
'绑定手机号'
},
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
},
},
pages
()
{
pages
()
{
return
[
'wallet'
,
'deposit'
,
'contract'
,
'cert'
,
'address'
,
'warehouse'
,
'customer'
]
return
[
'wallet'
,
'deposit'
,
'contract'
,
'cert'
,
'address'
,
'warehouse'
,
'customer'
]
},
},
headImageUrl
()
{
headImageUrl
()
{
return
this
.
info
.
headImage
||
this
.
placeholderImage
return
this
.
avatar
||
this
.
placeholderImage
},
},
wodebeijingImage
()
{
wodebeijingImage
()
{
return
this
.
imageUrl
+
'wodebeijing.png'
return
this
.
qnPath
+
'wodebeijing.png'
},
},
placeholderImage
()
{
placeholderImage
()
{
return
this
.
imageUrl
+
'touxiang.png'
return
this
.
qnPath
+
'touxiang.png'
},
},
headSize
()
{
headSize
()
{
return
this
.
info
.
headImage
?
136
:
144
return
this
.
avatar
?
136
:
144
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -143,25 +126,22 @@
...
@@ -143,25 +126,22 @@
},
},
methods
:
{
methods
:
{
handleClick
(
index
)
{
handleClick
(
index
)
{
console
.
log
(
'clicked:'
,
index
)
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/mine/'
+
this
.
pages
[
index
]
+
'/index'
url
:
'pages/mine/'
+
this
.
pages
[
index
]
+
'/index'
})
})
},
},
handleClickName
()
{
handleClickName
()
{
console
.
log
(
'click name'
)
if
(
this
.
vuex_token
&&
this
.
vuex_settled
)
{
return
false
}
this
.
$u
.
route
({
url
:
"pages/login/index"
})
},
},
handleClickTel
()
{
handleClickTel
()
{
console
.
log
(
'click tel'
)
if
(
this
.
vuex_token
&&
this
.
vuex_settled
&&
this
.
mobile
)
{
return
false
}
this
.
$u
.
route
({
url
:
"pages/login/index"
})
},
},
// take() {
// uni.hideTabBar()
// this.takeStatus = true
// },
// closeTake(img) {
// console.log(img)
// this.takeStatus = false
// }
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/learn/answer.vue
View file @
397835be
...
@@ -17,13 +17,11 @@
...
@@ -17,13 +17,11 @@
<view
:class=
"['itemView',item.isSelect ? 'active':'']"
v-for=
"(item,ikey) in currentItem.answerList"
:key=
"ikey"
@
click=
"itemClick(item,ikey)"
>
<view
:class=
"['itemView',item.isSelect ? 'active':'']"
v-for=
"(item,ikey) in currentItem.answerList"
:key=
"ikey"
@
click=
"itemClick(item,ikey)"
>
<view
:class=
"item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' "
>
<view
:class=
"item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' "
>
<text
<text
:class=
"item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText gray-color' "
>
:class=
"item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText gray-color' "
>
{{
alphaArr
[
ikey
]
}}
{{
alphaArr
[
ikey
]
}}
</text>
</text>
</view>
</view>
<view
<view
:class=
"item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' "
>
{{
contentFilter
(
item
.
content
)
}}
</view>
:class=
"item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' "
>
{{
contentFilter
(
item
.
content
)
}}
</view>
</view>
</view>
</view>
</view>
...
@@ -35,8 +33,7 @@
...
@@ -35,8 +33,7 @@
<text
class=
"numberText"
>
{{
progress
}}
</text>
<text
class=
"numberText"
>
{{
progress
}}
</text>
</view>
</view>
<view
class=
"bottomRightView"
>
<view
class=
"bottomRightView"
>
<view
:class=
"isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' "
<view
:class=
"isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' "
@
click=
"handleClick()"
>
@
click=
"handleClick()"
>
<text
class=
"bottomTitle"
>
{{
bottomTitle
}}
</text>
<text
class=
"bottomTitle"
>
{{
bottomTitle
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -57,20 +54,20 @@
...
@@ -57,20 +54,20 @@
</template>
</template>
<
script
>
<
script
>
import
Examine
from
'@/components/settle/examine.vue'
import
Examine
from
"@/components/settle/examine.vue"
;
import
utils
from
'@/utils/util.js'
import
utils
from
"@/utils/util.js"
;
const
globalUrl
=
process
.
uniEnv
||
{}
const
globalUrl
=
process
.
uniEnv
||
{};
const
systemApiUrl
=
globalUrl
.
systemUrl
.
apiUrl
const
systemApiUrl
=
globalUrl
.
systemUrl
.
apiUrl
;
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
const
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
;
export
default
{
export
default
{
components
:
{
components
:
{
Examine
Examine
,
},
},
data
()
{
data
()
{
return
{
return
{
examId
:
null
,
examId
:
null
,
userExamId
:
null
,
userExamId
:
null
,
userAnswerIds
:
''
,
userAnswerIds
:
""
,
isStart
:
true
,
isStart
:
true
,
currentNumber
:
1
,
currentNumber
:
1
,
currentItem
:
null
,
currentItem
:
null
,
...
@@ -82,31 +79,31 @@
...
@@ -82,31 +79,31 @@
},
},
endTime
:
0
,
endTime
:
0
,
currentTime
:
100
,
currentTime
:
100
,
everyTime
:
9
0
,
everyTime
:
2
0
,
progress
:
''
,
progress
:
""
,
bottomTitle
:
'下一题'
,
bottomTitle
:
"下一题"
,
isStop
:
false
,
isStop
:
false
,
clock_url
:
'https://qn-static.banshouhui.com/clock_exam.png'
,
clock_url
:
"https://qn-static.banshouhui.com/clock_exam.png"
,
examScore
:
0
,
examScore
:
0
,
alphaArr
:
[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
],
alphaArr
:
[
"A"
,
"B"
,
"C"
,
"D"
,
"E"
],
timer
:
null
,
timer
:
null
,
isComplete
:
false
,
// 是否已经考试完成判定
isComplete
:
false
,
// 是否已经考试完成判定
examInfo
:
null
,
examInfo
:
null
,
}
};
},
},
computed
:
{
computed
:
{
titleText
()
{
titleText
()
{
return
[
'单选'
,
'多选'
,
'问答'
]
return
[
"单选"
,
"多选"
,
"问答"
];
},
},
time1Image
()
{
time1Image
()
{
return
process
.
uniEnv
.
qn_base_url
+
'time1.png'
return
process
.
uniEnv
.
qn_base_url
+
"time1.png"
;
},
},
chenggongImage
()
{
chenggongImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'chenggong.png'
return
process
.
uniEnv
.
qn_base_url
+
"chenggong.png"
;
},
},
timuImage
()
{
timuImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'timu-new.png'
return
process
.
uniEnv
.
qn_base_url
+
"timu-new.png"
;
}
},
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
examId
=
e
.
examId
;
this
.
examId
=
e
.
examId
;
...
@@ -116,13 +113,22 @@
...
@@ -116,13 +113,22 @@
methods
:
{
methods
:
{
formatTimeToMini
(
timestamp
)
{
formatTimeToMini
(
timestamp
)
{
let
result
=
timestamp
;
let
result
=
timestamp
;
let
h
=
Math
.
floor
(
result
/
3600
)
<
10
?
'0'
+
Math
.
floor
(
result
/
3600
)
:
Math
.
floor
(
result
/
3600
);
let
h
=
let
m
=
Math
.
floor
((
result
/
60
%
60
))
<
10
?
'0'
+
Math
.
floor
((
result
/
60
%
60
))
:
Math
.
floor
((
result
/
60
%
60
));
Math
.
floor
(
result
/
3600
)
<
10
let
s
=
Math
.
floor
((
result
%
60
))
<
10
?
'0'
+
Math
.
floor
((
result
%
60
))
:
Math
.
floor
((
result
%
60
));
?
"0"
+
Math
.
floor
(
result
/
3600
)
:
Math
.
floor
(
result
/
3600
);
let
res
=
''
;
let
m
=
if
(
h
!==
'00'
)
res
+=
`
${
h
}
:`
;
Math
.
floor
((
result
/
60
)
%
60
)
<
10
if
(
m
!==
'00'
)
res
+=
`
${
m
}
:`
;
?
"0"
+
Math
.
floor
((
result
/
60
)
%
60
)
:
Math
.
floor
((
result
/
60
)
%
60
);
let
s
=
Math
.
floor
(
result
%
60
)
<
10
?
"0"
+
Math
.
floor
(
result
%
60
)
:
Math
.
floor
(
result
%
60
);
let
res
=
""
;
if
(
h
!==
"00"
)
res
+=
`
${
h
}
:`
;
if
(
m
!==
"00"
)
res
+=
`
${
m
}
:`
;
res
+=
`
${
s
}
`
;
res
+=
`
${
s
}
`
;
return
res
;
return
res
;
},
},
...
@@ -130,263 +136,286 @@
...
@@ -130,263 +136,286 @@
//判断是否通过,通过去成功页,失败去失败页
//判断是否通过,通过去成功页,失败去失败页
let
examInfo
=
this
.
examInfo
;
let
examInfo
=
this
.
examInfo
;
let
examId
=
this
.
examId
;
let
examId
=
this
.
examId
;
let
status
=
examInfo
.
examLevelResult
==
'通过'
;
let
status
=
examInfo
.
examLevelResult
==
"通过"
;
if
(
status
)
{
if
(
status
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/learn/exam-pass?userExamId="
+
this
.
userExamId
+
"&examId="
+
examId
,
url
:
"/pages/learn/exam-pass?userExamId="
+
this
.
userExamId
+
"&examId="
+
examId
,
});
});
}
else
{
}
else
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/learn/result?userExamId="
+
this
.
userExamId
+
"&examId="
+
examId
,
url
:
"/pages/learn/result?userExamId="
+
this
.
userExamId
+
"&examId="
+
examId
,
});
});
}
}
},
},
contentFilter
(
txt
)
{
contentFilter
(
txt
)
{
if
(
!
txt
)
{
if
(
!
txt
)
{
return
txt
return
txt
;
}
}
let
reg
=
/
\w
+
\.?
/
;
let
reg
=
/
\w
+
\.?
/
;
const
result
=
txt
.
replace
(
reg
,
''
)
const
result
=
txt
.
replace
(
reg
,
""
);
return
result
return
result
;
},
},
//开始考试 点击
//开始考试 点击
startClick
:
function
()
{
startClick
:
function
()
{
this
.
isStart
=
true
this
.
isStart
=
true
;
//this.getData()
//this.getData()
//this.applyExam()
//this.applyExam()
this
.
getUserExamInfo
()
this
.
getUserExamInfo
();
},
},
//获取考试信息
//获取考试信息
getUserExamInfo
:
function
()
{
getUserExamInfo
:
function
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'请稍候'
title
:
"请稍候"
,
})
});
let
that
=
this
let
that
=
this
;
uni
.
request
({
uni
.
request
({
url
:
systemApiUrl
+
url
:
'/wxh-worker-rest/rest/exam'
+
systemApiUrl
+
'/serviceRule/userExamInfo/'
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/userExamInfo/"
+
that
.
vuex_token
+
that
.
vuex_token
+
'?examId='
+
this
.
examId
,
"?examId="
+
method
:
'POST'
,
this
.
examId
,
method
:
"POST"
,
data
:
{
data
:
{
//examId:this.examId,
//examId:this.examId,
},
},
header
:
{
header
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
if
(
!
res
.
data
)
{
if
(
!
res
.
data
)
{
return
return
;
}
}
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
"/pages/login/wxlogin"
,
})
});
return
return
;
}
}
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
that
.
applyExam
()
that
.
applyExam
();
return
return
;
}
}
if
(
res
.
data
.
data
.
examStatus
==
1
)
{
if
(
res
.
data
.
data
.
examStatus
==
1
)
{
console
.
log
(
'111111111111111111111111111'
)
console
.
log
(
"111111111111111111111111111"
);
that
.
isComplete
=
true
that
.
isComplete
=
true
;
that
.
examScore
=
res
.
data
.
data
.
examScore
that
.
examScore
=
res
.
data
.
data
.
examScore
;
return
return
;
}
}
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
that
.
userExamId
=
res
.
data
.
data
.
id
that
.
userExamId
=
res
.
data
.
data
.
id
;
that
.
getNext
()
that
.
getNext
();
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
res
.
data
.
message
title
:
res
.
data
.
message
,
})
});
}
}
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
'获取考试信息失败'
title
:
"获取考试信息失败"
,
})
});
}
},
})
});
},
},
//申请考试
//申请考试
applyExam
:
function
()
{
applyExam
:
function
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'请稍候'
title
:
"请稍候"
,
})
});
let
that
=
this
let
that
=
this
;
uni
.
request
({
uni
.
request
({
url
:
systemApiUrl
+
url
:
'/wxh-worker-rest/rest/exam'
+
systemApiUrl
+
'/serviceRule/'
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/"
+
that
.
vuex_token
+
that
.
vuex_token
+
'?examId='
+
this
.
examId
,
"?examId="
+
method
:
'POST'
,
this
.
examId
,
method
:
"POST"
,
data
:
{
data
:
{
//examId:this.examId,
//examId:this.examId,
},
},
header
:
{
header
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
if
(
res
.
statusCode
==
401
)
{
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
"/pages/login/wxlogin"
,
})
});
return
return
;
}
}
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
userExamId
)
{
if
(
res
.
data
.
data
.
userExamId
)
{
that
.
userExamId
=
res
.
data
.
data
.
userExamId
that
.
userExamId
=
res
.
data
.
data
.
userExamId
;
//申请完考试设置倒计时总时间
//申请完考试设置倒计时总时间
let
time
=
parseInt
(
this
.
timeDefine
[
'time-id-'
+
this
.
examId
]);
let
time
=
parseInt
(
this
.
timeDefine
[
"time-id-"
+
this
.
examId
]
);
this
.
endTime
=
time
;
this
.
endTime
=
time
;
// let timestamp = new Date().getTime();
// let timestamp = new Date().getTime();
// this.endTime = timestamp + time * 1000;
// this.endTime = timestamp + time * 1000;
this
.
currentTime
=
parseInt
(
time
*
1000
);
//this.formatTimeToMini(timestamp);//endTime-currentTime再格式化时间显示
this
.
currentTime
=
parseInt
(
time
*
1000
);
//this.formatTimeToMini(timestamp);//endTime-currentTime再格式化时间显示
that
.
getNext
()
that
.
getNext
();
console
.
log
(
this
.
endTime
,
this
.
currentTime
,
"总时间"
);
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
res
.
data
.
message
title
:
res
.
data
.
message
,
})
});
}
}
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
'申请考试 失败'
title
:
"申请考试 失败"
,
})
});
}
},
})
});
},
},
//获取下一题
//获取下一题
getNext
:
function
()
{
getNext
:
function
()
{
var
questionId
=
''
var
questionId
=
""
;
if
(
this
.
currentItem
&&
if
(
this
.
currentItem
&&
this
.
currentItem
.
question
&&
this
.
currentItem
.
question
&&
this
.
currentItem
.
question
.
id
)
{
this
.
currentItem
.
question
.
id
questionId
=
this
.
currentItem
.
question
.
id
)
{
questionId
=
this
.
currentItem
.
question
.
id
;
}
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'请稍候'
title
:
"请稍候"
,
})
});
let
that
=
this
let
that
=
this
;
uni
.
request
({
uni
.
request
({
url
:
systemApiUrl
+
url
:
'/wxh-worker-rest/rest/exam'
+
systemApiUrl
+
'/serviceRule/next/'
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
that
.
vuex_token
+
that
.
vuex_token
+
'?userExamId='
+
this
.
userExamId
+
"?userExamId="
+
'&questionId='
+
questionId
+
this
.
userExamId
+
'&userAnswerIds='
+
(
this
.
userAnswerIds
||
'9999'
),
// 9999超时自动下一题
"&questionId="
+
method
:
'POST'
,
questionId
+
"&userAnswerIds="
+
(
this
.
userAnswerIds
||
"9999"
),
// 9999超时自动下一题
method
:
"POST"
,
data
:
{
data
:
{
// userExamId:this.userExamId,
// userExamId:this.userExamId,
// questionId:this.currentItem.question.id,
// questionId:this.currentItem.question.id,
// userAnswerIds:this.userAnswerIds,
// userAnswerIds:this.userAnswerIds,
},
},
header
:
{
header
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
if
(
res
.
statusCode
==
401
)
{
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
"/pages/login/wxlogin"
,
})
});
return
return
;
}
}
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
that
.
currentItem
=
res
.
data
.
data
that
.
currentItem
=
res
.
data
.
data
;
that
.
progress
=
res
.
data
.
data
.
progress
that
.
progress
=
res
.
data
.
data
.
progress
;
if
(
res
.
data
.
data
.
answerList
)
{
if
(
res
.
data
.
data
.
answerList
)
{
that
.
handleData
()
that
.
handleData
();
// that.currentTime = 100
// that.currentTime = 100
this
.
everyTime
=
90
;
//每道题90s
this
.
everyTime
=
90
;
//每道题90s
that
.
isSelect
=
false
that
.
isSelect
=
false
;
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
that
.
startCounting
()
that
.
startCounting
();
}
else
{
}
else
{
that
.
isSelect
=
true
that
.
isSelect
=
true
;
that
.
getUserExamInfo
()
that
.
getUserExamInfo
();
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
this
.
isComplete
=
true
this
.
isComplete
=
true
;
//用来考完试判断跳转
//用来考完试判断跳转
this
.
examInfo
=
that
.
currentItem
;
this
.
examInfo
=
that
.
currentItem
;
// that.bottomTitle = '完成考试,现在签约'
// that.bottomTitle = '完成考试,现在签约'
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
res
.
data
.
message
title
:
res
.
data
.
message
,
})
});
}
}
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
'获取下一题 失败'
title
:
"获取下一题 失败"
,
})
});
}
},
})
});
},
},
handleData
:
function
()
{
handleData
:
function
()
{
this
.
currentItem
.
answerList
.
forEach
((
item
,
index
)
=>
{
this
.
currentItem
.
answerList
.
forEach
((
item
,
index
)
=>
{
item
.
isSelect
=
false
item
.
isSelect
=
false
;
this
.
$set
(
this
.
currentItem
.
answerList
,
index
,
item
)
this
.
$set
(
this
.
currentItem
.
answerList
,
index
,
item
);
})
});
},
},
startCounting
:
function
()
{
startCounting
:
function
()
{
if
(
this
.
isStop
)
{
if
(
this
.
isStop
)
{
return
return
;
}
}
this
.
endTime
=
this
.
endTime
-
1
;
this
.
endTime
=
this
.
endTime
-
1
;
this
.
currentTime
=
this
.
formatTimeToMini
(
this
.
endTime
)
this
.
currentTime
=
this
.
formatTimeToMini
(
this
.
endTime
);
this
.
everyTime
=
this
.
everyTime
-
1
;
this
.
everyTime
=
this
.
everyTime
-
1
;
if
(
this
.
everyTime
>
0
)
{
if
(
this
.
everyTime
>
0
)
{
this
.
timer
=
setTimeout
(
this
.
startCounting
,
1000
);
this
.
timer
=
setTimeout
(
this
.
startCounting
,
1000
);
}
else
{
}
else
{
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
this
.
everyTime
=
90
this
.
everyTime
=
90
;
this
.
nextClick
()
this
.
nextClick
();
}
}
},
},
itemClick
:
function
(
currentItem
,
ikey
)
{
itemClick
:
function
(
currentItem
,
ikey
)
{
this
.
isSelect
=
true
this
.
isSelect
=
true
;
// console.log('选点点击--处理前--this.currentItem:')
// console.log('选点点击--处理前--this.currentItem:')
// console.log(this.currentItem)
// console.log(this.currentItem)
...
@@ -398,33 +427,38 @@
...
@@ -398,33 +427,38 @@
//answerType 题目类型,1单选,2多选,3简答,
//answerType 题目类型,1单选,2多选,3简答,
for
(
let
i
=
0
;
i
<
this
.
currentItem
.
answerList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
currentItem
.
answerList
.
length
;
i
++
)
{
var
item
=
this
.
currentItem
.
answerList
[
i
]
var
item
=
this
.
currentItem
.
answerList
[
i
];
if
(
this
.
currentItem
.
question
.
answerType
==
2
)
{
//多选
if
(
this
.
currentItem
.
question
.
answerType
==
2
)
{
//多选
if
(
ikey
==
i
)
{
if
(
ikey
==
i
)
{
item
.
isSelect
=
!
item
.
isSelect
item
.
isSelect
=
!
item
.
isSelect
;
}
}
}
else
{
//单选/简答
}
else
{
//单选/简答
if
(
ikey
==
i
)
{
if
(
ikey
==
i
)
{
item
.
isSelect
=
!
item
.
isSelect
item
.
isSelect
=
!
item
.
isSelect
;
}
else
{
}
else
{
item
.
isSelect
=
false
item
.
isSelect
=
false
;
}
}
}
}
this
.
$set
(
this
.
currentItem
.
answerList
[
i
],
isSelect
,
item
.
isSelect
)
this
.
$set
(
this
.
currentItem
.
answerList
[
i
],
isSelect
,
item
.
isSelect
);
}
}
var
isSelect
=
false
var
isSelect
=
false
;
this
.
currentItem
.
answerList
.
forEach
(
item
=>
{
this
.
currentItem
.
answerList
.
forEach
((
item
)
=>
{
if
(
item
.
isSelect
)
{
if
(
item
.
isSelect
)
{
isSelect
=
true
isSelect
=
true
;
}
}
})
});
//有选答案
//有选答案
this
.
isSelect
=
isSelect
this
.
isSelect
=
isSelect
;
// console.log('选点点击--处理后--this.currentItem.answerList:')
// console.log('选点点击--处理后--this.currentItem.answerList:')
// console.log(this.currentItem.answerList)
// console.log(this.currentItem.answerList)
...
@@ -433,70 +467,71 @@
...
@@ -433,70 +467,71 @@
handleClick
()
{
handleClick
()
{
// 判断有没有选
// 判断有没有选
if
(
!
this
.
isSelect
)
{
if
(
!
this
.
isSelect
)
{
return
return
;
}
}
this
.
nextClick
()
this
.
nextClick
();
},
},
//下一题
//下一题
nextClick
:
function
()
{
nextClick
:
function
()
{
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
);
this
.
currentNumber
=
this
.
currentNumber
+
1
this
.
currentNumber
=
this
.
currentNumber
+
1
;
//this.getData()
//this.getData()
this
.
handleAnswer
()
this
.
handleAnswer
();
//this.getNext()
//this.getNext()
},
},
//上传考试结果
//上传考试结果
postResult
:
function
()
{
postResult
:
function
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'请稍候'
title
:
"请稍候"
,
})
});
let
that
=
this
let
that
=
this
;
uni
.
request
({
uni
.
request
({
url
:
ucenterApiUrl
+
'/v1/settled/update-settled-exam-score'
+
url
:
'?access-token='
+
that
.
vuex_token
,
ucenterApiUrl
+
method
:
'POST'
,
"/v1/settled/update-settled-exam-score"
+
"?access-token="
+
that
.
vuex_token
,
method
:
"POST"
,
data
:
{
data
:
{
score
:
this
.
examScore
||
0
,
score
:
this
.
examScore
||
0
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
if
(
res
.
statusCode
==
401
)
{
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
"/pages/login/wxlogin"
,
})
});
return
return
;
}
}
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
// uni.navigateTo({
// uni.navigateTo({
// url: '/pages/settle/prompt'
// url: '/pages/settle/prompt'
// })
// })
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
"上传考试结果失败"
title
:
"上传考试结果失败"
,
})
});
}
}
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
"none"
,
title
:
'上传考试结果失败'
title
:
"上传考试结果失败"
,
})
});
}
},
})
});
},
},
//所选答案
//所选答案
handleAnswer
:
function
()
{
handleAnswer
:
function
()
{
/*
/*
userAnswerIds
userAnswerIds
本题回答。
本题回答。
...
@@ -506,47 +541,40 @@
...
@@ -506,47 +541,40 @@
*/
*/
//每次清空
//每次清空
this
.
userAnswerIds
=
''
this
.
userAnswerIds
=
""
;
this
.
currentItem
.
answerList
.
forEach
(
item
=>
{
this
.
currentItem
.
answerList
.
forEach
((
item
)
=>
{
if
(
item
.
isSelect
)
{
if
(
item
.
isSelect
)
{
//this.userAnswerIds = item.id + ',' + this.userAnswerIds
//this.userAnswerIds = item.id + ',' + this.userAnswerIds
//answerType 题目类型,1单选,2多选,3简答,
//answerType 题目类型,1单选,2多选,3简答,
if
(
this
.
currentItem
.
question
.
answerType
==
2
)
{
//多选
if
(
this
.
currentItem
.
question
.
answerType
==
2
)
{
//多选
///*
///*
if
(
this
.
userAnswerIds
.
length
==
0
)
{
if
(
this
.
userAnswerIds
.
length
==
0
)
{
this
.
userAnswerIds
=
item
.
id
this
.
userAnswerIds
=
item
.
id
;
}
else
{
// if(this.userAnswerIds.length == 1)
}
else
{
this
.
userAnswerIds
=
item
.
id
+
','
+
this
.
userAnswerIds
// if(this.userAnswerIds.length == 1)
this
.
userAnswerIds
=
item
.
id
+
","
+
this
.
userAnswerIds
;
}
}
//*/
//*/
}
else
{
//单选
}
else
{
//单选
this
.
userAnswerIds
=
item
.
id
;
this
.
userAnswerIds
=
item
.
id
}
}
}
}
});
this
.
getNext
();
})
this
.
getNext
()
},
},
}
},
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.backView
{
.backView
{
background-color
:
#F4F5F
7
;
background-color
:
#f4f5f
7
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
...
@@ -554,55 +582,55 @@
...
@@ -554,55 +582,55 @@
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
overflow-y
:
auto
;
overflow-y
:
auto
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.noticeView
{
.noticeView
{
margin-top
:
100rpx
;
margin-top
:
100rpx
;
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
}
}
.noticeText
{
.noticeText
{
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#555555
;
color
:
#555555
;
padding-left
:
40rpx
;
padding-left
:
40rpx
;
padding-right
:
40rpx
;
padding-right
:
40rpx
;
}
}
.numberView
{
.numberView
{
margin-top
:
40rpx
;
margin-top
:
40rpx
;
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
}
.numberText
{
.numberText
{
color
:
#333333
;
color
:
#333333
;
font-size
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.topicView
{
.topicView
{
margin-top
:
40rpx
;
margin-top
:
40rpx
;
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
40rpx
;
margin-bottom
:
40rpx
;
}
}
.topicText
{
.topicText
{
color
:
#333333
;
color
:
#333333
;
font-size
:
32rpx
;
font-size
:
32rpx
;
line-height
:
48rpx
;
line-height
:
48rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.itemView
{
.itemView
{
margin-top
:
30rpx
;
margin-top
:
30rpx
;
background-color
:
#F4F5F
7
;
background-color
:
#f4f5f
7
;
width
:
100%
;
width
:
100%
;
padding
:
40rpx
30rpx
;
padding
:
40rpx
30rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -611,12 +639,12 @@
...
@@ -611,12 +639,12 @@
border
:
2rpx
solid
transparent
;
border
:
2rpx
solid
transparent
;
font-size
:
28rpx
;
font-size
:
28rpx
;
&
.active
{
&
.active
{
background-color
:
#FFFFFF
;
background-color
:
#ffffff
;
border
:
2rpx
solid
#2272FF
;
border
:
2rpx
solid
#2272ff
;
}
}
}
}
.itemIndexView
{
.itemIndexView
{
width
:
40rpx
;
width
:
40rpx
;
height
:
40rpx
;
height
:
40rpx
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
...
@@ -624,18 +652,18 @@
...
@@ -624,18 +652,18 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
flex-shrink
:
0
flex-shrink
:
0
;
}
}
.grayBorder
{
.grayBorder
{
border
:
2rpx
solid
#999999
;
border
:
2rpx
solid
#999999
;
}
}
.gray-color
{
.gray-color
{
color
:
#999999
;
color
:
#999999
;
}
}
.itemIndexText
{
.itemIndexText
{
border-radius
:
8rpx
;
border-radius
:
8rpx
;
width
:
36rpx
;
width
:
36rpx
;
height
:
36rpx
;
height
:
36rpx
;
...
@@ -643,15 +671,15 @@
...
@@ -643,15 +671,15 @@
line-height
:
36rpx
;
line-height
:
36rpx
;
text-align
:
center
;
text-align
:
center
;
font-size
:
28rpx
;
font-size
:
28rpx
;
}
}
.itemText
{
.itemText
{
margin-left
:
20rpx
;
margin-left
:
20rpx
;
font-size
:
28rpx
;
font-size
:
28rpx
;
}
}
.bottomView
{
.bottomView
{
background-color
:
#FFFFFF
;
background-color
:
#ffffff
;
width
:
100%
;
width
:
100%
;
height
:
140rpx
;
height
:
140rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -659,40 +687,40 @@
...
@@ -659,40 +687,40 @@
justify-content
:
center
;
justify-content
:
center
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
}
}
.bottomBtn
{
.bottomBtn
{
background-color
:
#007AFF
;
background-color
:
#007aff
;
width
:
60%
;
width
:
60%
;
height
:
80rpx
;
height
:
80rpx
;
border-radius
:
40rpx
;
border-radius
:
40rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.bottomTitle
{
.bottomTitle
{
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#FFFFFF
;
color
:
#ffffff
;
}
}
.title-view
{
.title-view
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
.title-text
{
.title-text
{
border-radius
:
8rpx
;
border-radius
:
8rpx
;
background-color
:
#FF930D
;
background-color
:
#ff930d
;
font-size
:
20rpx
;
font-size
:
20rpx
;
color
:
#FFFFFF
;
color
:
#ffffff
;
width
:
72rpx
;
width
:
72rpx
;
height
:
40rpx
;
height
:
40rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
&
.radio
{
&
.radio
{
background-color
:
#2272FF
;
background-color
:
#2272ff
;
}
}
}
}
...
@@ -717,52 +745,52 @@
...
@@ -717,52 +745,52 @@
text-align
:
right
;
text-align
:
right
;
}
}
}
}
}
}
.bottomRightView
{
.bottomRightView
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
margin-right
:
30rpx
;
margin-right
:
30rpx
;
}
}
.nextBtn
{
.nextBtn
{
width
:
300rpx
;
width
:
300rpx
;
height
:
104rpx
;
height
:
104rpx
;
border-radius
:
52rpx
;
border-radius
:
52rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.defaultColor
{
.defaultColor
{
color
:
#333333
;
color
:
#333333
;
}
}
.defaultBackColor
{
.defaultBackColor
{
background-color
:
#D1D4D
4
;
background-color
:
#d1d4d
4
;
}
}
.selectedColor
{
.selectedColor
{
color
:
#2272FF
;
color
:
#2272ff
;
}
}
.whiteColor
{
.whiteColor
{
color
:
#FFFFFF
;
color
:
#ffffff
;
}
}
.selectBackColor
{
.selectBackColor
{
background-color
:
#2272FF
;
background-color
:
#2272ff
;
}
}
.bottom-padding
{
.bottom-padding
{
// margin-bottom: 188rpx;
// margin-bottom: 188rpx;
background-color
:
#FFFFFF
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
40rpx
30rpx
40rpx
30rpx
;
padding
:
40rpx
30rpx
40rpx
30rpx
;
}
}
.answerBottomView
{
.answerBottomView
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
@@ -781,10 +809,9 @@
...
@@ -781,10 +809,9 @@
margin-left
:
30rpx
;
margin-left
:
30rpx
;
}
}
}
}
}
}
.mask
{
.mask
{
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
...
@@ -794,9 +821,9 @@
...
@@ -794,9 +821,9 @@
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
.box
{
.box
{
width
:
660rpx
;
width
:
660rpx
;
height
:
696rpx
;
height
:
696rpx
;
padding
:
0
70rpx
;
padding
:
0
70rpx
;
...
@@ -816,7 +843,7 @@
...
@@ -816,7 +843,7 @@
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
40rpx
;
font-size
:
40rpx
;
line-height
:
66rpx
;
line-height
:
66rpx
;
color
:
#2272FF
;
color
:
#2272ff
;
text-align
:
center
;
text-align
:
center
;
}
}
...
@@ -827,5 +854,5 @@
...
@@ -827,5 +854,5 @@
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
</
style
>
</
style
>
src/pages/login/index.vue
View file @
397835be
<
template
>
<
template
>
<view
class=
""
>
<view
class=
""
>
<view
class=
"backView"
>
<view
class=
"backView"
>
<view
class=
"noticeView"
>
<view
class=
"login-block"
v-if=
"needAuth"
>
<image
class=
"noticeImage"
:src=
"icon_auth_notice_new"
mode=
""
></image>
<u-image
class=
"u-flex u-row-center logo"
:src=
"logo"
width=
"200"
height=
"200"
>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
<u-image
class=
"u-flex u-row-center logo2"
:src=
"logo2"
width=
"214"
height=
"60"
>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
</view>
</view>
<view
class=
"noticeTitleView"
>
<view
class=
"bind-block"
v-else
>
<text
class=
"noticeTitle"
v-if=
"needAuth"
>
{{
authNoticeTitle
}}
</text>
<u-image
class=
"u-flex u-row-between logo"
:src=
"logo"
width=
"148"
height=
"148"
>
<text
class=
"noticeTitle"
v-else
>
{{
suginNoticeTitle
}}
</text>
<u-loading
slot=
"loading"
></u-loading>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
加载失败
</view>
</u-image>
<view
class=
"bind-phone"
>
{{
bindPhone
}}
</view>
<view
class=
"bind-tips"
>
{{
bindTips
}}
</view>
</view>
</view>
<u-gap
height=
"570"
></u-gap>
<button
class=
"loginBtn"
v-if=
"needAuth"
lang=
"zh_CN"
@
tap=
"getUserProfile"
>
<button
class=
"loginBtn"
v-if=
"needAuth"
lang=
"zh_CN"
@
tap=
"getUserProfile"
>
<text
class=
"u-font-32 white"
>
立即登录
</text>
<text
class=
"u-font-32 white"
>
{{
loginTitle
}}
</text>
</button>
</button>
<button
class=
"loginBtn"
v-else
open-type=
"getPhoneNumber"
throttle-time=
"1000"
<button
class=
"loginBtn"
v-else
open-type=
"getPhoneNumber"
throttle-time=
"1000"
@
getphonenumber=
"signupLogin"
>
@
getphonenumber=
"signupLogin"
>
<text
class=
"u-font-32 white"
>
授权登录
</text>
<text
class=
"u-font-32 white"
>
{{
bindTitle
}}
</text>
</button>
</button>
<view
class=
"cancelView"
>
<text
class=
"cancelText"
@
click=
"cancelClick()"
>
取消
</text>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -29,24 +38,27 @@ const app = getApp()
...
@@ -29,24 +38,27 @@ const app = getApp()
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isNewUser
:
false
,
qnPath
:
process
.
uniEnv
.
qn_base_url
,
needAuth
:
true
,
needAuth
:
true
,
unionID
:
''
,
openID
:
''
,
icon_notice
:
''
,
TimeID
:
-
1
,
TimeID
:
-
1
,
icon_auth_notice_new
:
''
,
loginTitle
:
'用户登录'
,
authNoticeTitle
:
'申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务'
,
bindTitle
:
'立即绑定'
,
suginNoticeTitle
:
'申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务'
,
bindPhone
:
'绑定手机'
,
bindTips
:
'首次登录的用户需绑定手机才可接单'
,
}
}
},
},
onLoad
()
{
computed
:
{
logo
()
{
return
this
.
qnPath
+
'logo.png'
},
logo2
()
{
return
this
.
qnPath
+
'logo-2.png'
},
},
onLoad
(
e
)
{
app
.
trackPage
(
'授权登录页'
)
app
.
trackPage
(
'授权登录页'
)
this
.
icon_notice
=
app
.
globalData
.
icon_auth_notice
this
.
icon_auth_notice_new
=
app
.
globalData
.
icon_auth_notice_new
},
},
onShow
()
{
onShow
()
{
app
.
globalData
.
jumpLoginStatus
=
true
// 微信授权过用户信息,则无需重复授权
// 微信授权过用户信息,则无需重复授权
if
(
app
.
globalData
.
authUserInfo
)
{
if
(
app
.
globalData
.
authUserInfo
)
{
this
.
needAuth
=
false
this
.
needAuth
=
false
...
@@ -211,7 +223,7 @@ export default {
...
@@ -211,7 +223,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.backView
{
.backView
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
position
:
absolute
;
position
:
absolute
;
...
@@ -219,8 +231,32 @@ export default {
...
@@ -219,8 +231,32 @@ export default {
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
.login-block
{
margin-top
:
240rpx
;
}
.bind-block
{
margin-top
:
202rpx
;
margin-left
:
50rpx
;
.bind-phone
{
font-size
:
52rpx
;
margin-top
:
48rpx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
52rpx
;
margin-left
:
10rpx
;
}
.bind-tips
{
margin
:
24rpx
60rpx
14rpx
10rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
40rpx
;
}
}
}
.logo2
{
margin-top
:
28rpx
;
}
}
.noticeView
{
.noticeView
{
...
@@ -257,10 +293,13 @@ export default {
...
@@ -257,10 +293,13 @@ export default {
.loginBtn
{
.loginBtn
{
background-color
:
#2272FF
;
background-color
:
#2272FF
;
width
:
390
rpx
;
font-size
:
32rpx
;
height
:
80
rpx
;
font-weight
:
600
;
border-radius
:
40
rpx
;
color
:
#FFFFFF
;
margin-top
:
334
rpx
;
line-height
:
104px
;
width
:
600rpx
;
height
:
104rpx
;
border-radius
:
52rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -282,4 +321,5 @@ export default {
...
@@ -282,4 +321,5 @@ export default {
.white
{
.white
{
color
:
#FFFFFF
;
color
:
#FFFFFF
;
}
}
</
style
>
</
style
>
src/pages/mine/contract/index.vue
View file @
397835be
...
@@ -8,16 +8,16 @@
...
@@ -8,16 +8,16 @@
></u-navbar>
></u-navbar>
<view
class=
"content"
>
<view
class=
"content"
>
<text
class=
"title"
>
合同清单
</text>
<text
class=
"title"
>
合同清单
</text>
<view
class=
"jf-currency-class"
v-for=
"item in res"
:key=
"item.id"
>
<view
class=
"jf-currency-class"
v-for=
"item in res"
:key=
"item.id"
@
click=
"goBaidu(item.url)"
>
<view
class=
"left"
>
{{
item
.
name
}}
</view>
<view
class=
"left"
>
{{
item
.
name
}}
</view>
<view
class=
"text1"
>
《
{{
item
.
name
}}
》
</view>
<view
class=
"text1"
>
《
{{
item
.
name
}}
》
</view>
<view
class=
"text2"
>
下载时间:
{{
item
.
create_at
}}
</view>
<view
class=
"text2"
>
下载时间:
{{
item
.
create_at
}}
</view>
</view>
</view>
<!--
<view
class=
"jf-currency-class"
>
<view
class=
"left"
>
新风机技工入驻签约合同
</view>
<view
class=
"text1"
>
《新风机技工入驻签约合同》
</view>
<view
class=
"text2"
>
下载时间: 2021.05.06 15:01:48
</view>
</view>
-->
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -28,14 +28,6 @@ export default {
...
@@ -28,14 +28,6 @@ export default {
return
{
return
{
background
:
{
background
:
{
backgroundColor
:
"#F4F5F7"
,
backgroundColor
:
"#F4F5F7"
,
// 导航栏背景图
// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
// 还可以设置背景图size属性
// backgroundSize: 'cover',
// 渐变色
// backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
},
},
res
:
[],
res
:
[],
type
:
"充电桩"
,
type
:
"充电桩"
,
...
@@ -52,50 +44,37 @@ export default {
...
@@ -52,50 +44,37 @@ export default {
if
(
res
.
data
)
{
if
(
res
.
data
)
{
let
length
=
res
.
data
.
length
;
let
length
=
res
.
data
.
length
;
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
var
re
=
/
[^\u
4e00-
\u
9fa5
]
/gi
;
// res.data.name = res.data.name.replace(re, "");
let
data
=
new
Date
(
let
data
=
new
Date
(
Number
(
res
.
data
[
i
].
create_at
)
*
1000
Number
(
res
.
data
[
i
].
create_at
)
*
1000
);
);
res
.
data
[
i
].
create_at
=
moment
(
data
).
format
(
res
.
data
[
i
].
create_at
=
moment
(
data
).
format
(
"yyyy.MM.DD HH:mm:ss"
"yyyy.MM.DD HH:mm:ss"
);
);
res
.
data
[
i
].
name
=
res
.
data
[
i
].
name
.
replace
(
re
,
""
);
}
}
this
.
res
=
this
.
res
.
concat
(
res
.
data
);
this
.
res
=
this
.
res
.
concat
(
res
.
data
);
console
.
log
(
this
.
res
);
console
.
log
(
this
.
res
);
}
}
}
else
{
}
else
{
console
.
log
(
res
.
code
);
//接口请求失败的处理
uni
.
showToast
({
title
:
res
.
message
,
icon
:
"none"
,
});
}
}
});
});
},
},
add0
(
m
)
{
goBaidu
(
a
)
{
return
m
<
10
?
"0"
+
m
:
m
;
getApp
().
globalData
.
contractUrl
=
a
;
wx
.
navigateTo
({
url
:
"./out"
,
success
:
function
()
{},
//成功回调
fail
:
function
()
{},
complete
:
function
()
{},
});
},
},
// format(shijianchuo) {
// //shijianchuo是整数,否则要parseInt转换
// var time = new Date(shijianchuo * 1000);
// var y = time.getFullYear();
// var m = time.getMonth() + 1;
// var d = time.getDate();
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
// return (
// y +
// "." +
// this.add0(m) +
// "." +
// this.add0(d) +
// " " +
// this.add0(h) +
// ":" +
// this.add0(mm) +
// ":" +
// this.add0(s)
// );
// // },
// gettime(time) {
// moment(new Date(time).format("yyyy.MM.DD HH:mm:ss"));
// },
},
},
};
};
</
script
>
</
script
>
...
@@ -122,7 +101,6 @@ export default {
...
@@ -122,7 +101,6 @@ export default {
}
}
.jf-currency-class
{
.jf-currency-class
{
width
:
100%
;
width
:
100%
;
height
:
180rpx
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding-top
:
40rpx
;
padding-top
:
40rpx
;
margin-top
:
74rpx
;
margin-top
:
74rpx
;
...
...
src/pages/mine/contract/out.vue
0 → 100644
View file @
397835be
<
template
>
<view>
<web-view
:src=
"url"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
url
:
""
,
};
},
onLoad
(
option
)
{
this
.
url
=
option
.
url
;
var
app
=
getApp
();
this
.
url
=
app
.
globalData
.
contractUrl
;
console
.
log
(
app
.
globalData
,
"这是个标识符"
);
},
methods
:
{},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/pages/mine/wallet/index.vue
View file @
397835be
...
@@ -106,16 +106,23 @@
...
@@ -106,16 +106,23 @@
}
}
},
},
created
()
{
created
()
{
var
item
=
{
// var item = {
paymentTime
:
new
Date
().
getTime
(),
// paymentTime: new Date().getTime(),
payableRecordStatusText
:
'预结'
,
// payableRecordStatusText: '预结',
orderNumber
:
'EE999777'
,
// orderNumber: 'EE999777',
orderServiceType
:
'安装'
,
// orderServiceType: '安装',
inGuaranteePeriod
:
false
,
// true 保内;false 保外
// inGuaranteePeriod: false, // true 保内;false 保外
payableAmount
:
9899
,
// payableAmount: 9899,
orderId
:
12313
,
// orderId: 12313,
// }
// this.statementList = [item, item, item, item, item]
},
onLoad
()
{
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
route
({
url
:
'pages/login/index'
})
}
}
this
.
statementList
=
[
item
,
item
,
item
,
item
,
item
]
this
.
loadAssets
()
this
.
loadStatement
()
},
},
methods
:
{
methods
:
{
// 提现
// 提现
...
@@ -133,7 +140,28 @@
...
@@ -133,7 +140,28 @@
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
url
:
'pages/order/detail?id='
+
orderId
})
})
},
async
loadAssets
()
{
let
self
=
this
let
res
=
await
self
.
$u
.
api
.
getAssets
()
if
(
res
&&
res
.
code
==
200
)
{
self
.
info
=
res
.
data
||
self
.
info
}
},
async
loadStatement
()
{
let
self
=
this
let
res
=
await
self
.
$u
.
api
.
listStatement
()
if
(
res
&&
res
.
code
==
200
)
{
self
.
statementList
=
res
.
data
&&
res
.
data
.
orderList
||
[]
}
}
},
async
loadPayRecord
()
{
let
self
=
this
let
res
=
await
self
.
$u
.
api
.
payableRecord
()
// if(res && res.code == 200) {
// self.info = res.data || self.info
// }
},
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/mine/wallet/withdraw.vue
View file @
397835be
...
@@ -36,7 +36,8 @@
...
@@ -36,7 +36,8 @@
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
let
self
=
this
self
.
$u
.
api
.
workerApplyPay
()
}
}
}
}
}
}
...
...
src/pages/order/complete.vue
View file @
397835be
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
{{
item
.
fieldsTitle
}}
{{
item
.
fieldsTitle
}}
</view>
</view>
<template
v-if=
"item.fieldsType"
>
<template
v-if=
"item.fieldsType"
>
<xh-input
v-if=
"typeToComponentType(item.fieldsType)==='input'"
:groupIndex=
"groupIndex"
<xh-input
v-if=
"typeToComponentType(item.fieldsType)==='input'"
:groupIndex=
"groupIndex"
:type=
"inputType(item.fieldsType)"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
</xh-input>
</xh-input>
<xh-multi-input
v-else-if=
"typeToComponentType(item.fieldsType)==='multiinput'"
<xh-multi-input
v-else-if=
"typeToComponentType(item.fieldsType)==='multiinput'"
...
@@ -487,6 +487,30 @@
...
@@ -487,6 +487,30 @@
})
})
}
}
},
},
inputType
(
type
)
{
var
inputType
=
''
let
ty
=
type
.
toLocaleLowerCase
()
switch
(
ty
)
{
case
'text'
:
inputType
=
'textarea'
break
case
'password'
:
inputType
=
ty
break
case
'decimal'
:
case
'number'
:
case
'double'
:
case
'integer'
:
inputType
=
'digit'
break
case
'textarea'
:
default
:
inputType
=
'text'
break
}
return
inputType
},
typeToComponentType
(
type
)
{
typeToComponentType
(
type
)
{
// 将fieldType类型统一转换为公共组件判定类型
// 将fieldType类型统一转换为公共组件判定类型
let
formType
=
''
let
formType
=
''
...
...
src/pages/order/detail.vue
View file @
397835be
...
@@ -293,48 +293,48 @@
...
@@ -293,48 +293,48 @@
methods
:
{
methods
:
{
openLocation
(
address
){
openLocation
(
address
){
if
(
this
.
isAllowDianhuaAndDaohang
){
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
getLocation
({
// uni.getLocation({
type
:
'gcj02'
,
//返回可以用于uni.openLocation的经纬度
// type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success
:
function
(
res
)
{
// success: function (res) {
const
latitude
=
res
.
latitude
;
debugger
const
longitude
=
res
.
longitude
;
const
latitude
=
this
.
contactAddressLatitud
//res.latitude;
const
longitude
=
this
.
contactAddressLongitud
//res.longitude;
uni
.
openLocation
({
uni
.
openLocation
({
latitude
:
latitude
,
latitude
:
Number
(
this
.
contactAddressLatitud
)
,
longitude
:
longitude
,
longitude
:
Number
(
this
.
contactAddressLongitud
)
,
success
:
function
()
{
success
:
function
()
{
console
.
log
(
'success'
);
console
.
log
(
'success'
);
}
}
});
});
},
// }
complete
:
function
(
res
)
{
// ,
console
.
log
(
'-------complete-----'
,
res
)
// complete: function(res) {
if
(
res
.
errMsg
.
indexOf
(
'auth'
)
!=
-
1
)
{
// console.log('-------complete-----', res)
uni
.
showModal
({
// if (res.errMsg.indexOf('auth') != -1) {
title
:
'提示'
,
// uni.showModal({
content
:
'获取权限失败,请到设置页面开启权限'
,
// title: '提示',
confirmText
:
'好的'
,
// content: '获取权限失败,请到设置页面开启权限',
success
(
res
)
{
// confirmText: '好的',
if
(
res
.
confirm
)
{
// success(res) {
uni
.
openSetting
({
// if (res.confirm) {
success
(
res
)
{
// uni.openSetting({
console
.
log
(
res
.
authSetting
)
// success(res) {
}
// console.log(res.authSetting)
});
}
}
})
}
else
if
(
res
.
errMsg
)
{
// uni.setClipboardData({
// data: address,
// success: function () {
// console.log('success');
// }
// }
// });
// });
}
// }
}
});
// }
// })
// } else if (res.errMsg) {
// // uni.setClipboardData({
// // data: address,
// // success: function () {
// // console.log('success');
// // }
// // });
// }
// }
}
}
},
},
phoneToCustomer
(
phone
){
// 联系客户
phoneToCustomer
(
phone
){
// 联系客户
...
...
src/pages/order/feedback.vue
View file @
397835be
...
@@ -173,18 +173,7 @@ export default {
...
@@ -173,18 +173,7 @@ export default {
let
params
=
{
categoryId
:
self
.
categoryId
};
let
params
=
{
categoryId
:
self
.
categoryId
};
let
res
=
await
self
.
$u
.
api
.
feedbackConfig
(
params
);
let
res
=
await
self
.
$u
.
api
.
feedbackConfig
(
params
);
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
self
.
feedback
=
res
.
data
||
{};
if
(
!
self
.
showGY
)
{
delete
res
.
code
[
'改约'
]
}
var
data
=
{}
for
(
var
item
in
res
.
data
)
{
if
(
item
!=
'改约'
||
self
.
showGY
)
{
data
[
item
]
=
res
.
data
[
item
]
}
}
self
.
feedback
=
data
;
self
.
buildConfig
();
self
.
buildConfig
();
}
}
uni
.
hideLoading
();
uni
.
hideLoading
();
...
@@ -211,6 +200,22 @@ export default {
...
@@ -211,6 +200,22 @@ export default {
});
});
});
});
configs
.
map
((
item
,
key
)
=>
{
if
(
item
.
name
==
'报备'
)
{
configs
.
splice
(
key
,
1
);
configs
.
unshift
(
item
);
// 更新时间标题
let
title
=
self
.
appoint
[
key
]
self
.
appoint
.
splice
(
key
,
1
);
self
.
appoint
.
unshift
(
title
);
}
else
if
(
item
.
name
==
'改约'
&&
!
self
.
showGY
)
{
configs
.
splice
(
key
,
1
);
// 更新时间标题
self
.
appoint
.
splice
(
key
,
1
);
}
})
// 数组改写需要刷新绑定数据
// 数组改写需要刷新绑定数据
self
.
options
=
configs
;
self
.
options
=
configs
;
this
.
initParams
()
this
.
initParams
()
...
...
src/pages/settle/file.vue
View file @
397835be
...
@@ -258,7 +258,7 @@ export default {
...
@@ -258,7 +258,7 @@ export default {
// 初始化入驻信息
// 初始化入驻信息
async
initSettledInfo
()
{
async
initSettledInfo
()
{
let
self
=
this
let
self
=
this
let
settledInfo
=
app
.
globalData
.
settledInfo
let
settledInfo
=
self
.
vuex_settled
if
(
settledInfo
&&
settledInfo
.
length
)
{
if
(
settledInfo
&&
settledInfo
.
length
)
{
self
.
fileInfo
.
id
=
settledInfo
.
id
self
.
fileInfo
.
id
=
settledInfo
.
id
}
else
{
}
else
{
...
@@ -267,7 +267,7 @@ export default {
...
@@ -267,7 +267,7 @@ export default {
vm
.
settledInfo
=
result
.
record
vm
.
settledInfo
=
result
.
record
vm
.
fileInfo
.
id
=
result
.
record
.
id
vm
.
fileInfo
.
id
=
result
.
record
.
id
}
}
settledInfo
=
await
app
.
getBaseInfo
(
this
,
callBack
)
settledInfo
=
await
app
.
getBaseInfo
(
self
,
callBack
)
uni
.
hideLoading
()
uni
.
hideLoading
()
}
}
},
},
...
...
src/pages/settle/pay-ensure.vue
View file @
397835be
...
@@ -83,16 +83,17 @@
...
@@ -83,16 +83,17 @@
})
})
},
},
async
getBaseInfo
()
{
async
getBaseInfo
()
{
let
self
=
this
const
app
=
getApp
()
const
app
=
getApp
()
const
callBack
=
(
vm
,
result
)
=>
{
const
callBack
=
(
vm
,
result
)
=>
{
vm
.
settledInfo
=
result
vm
.
settledInfo
=
result
}
}
let
settledInfo
=
app
.
globalData
.
settledInfo
let
settledInfo
=
self
.
vuex_settled
if
(
settledInfo
)
{
if
(
settledInfo
)
{
callBack
(
this
,
settledInfo
)
callBack
(
self
,
settledInfo
)
return
return
}
}
await
app
.
getBaseInfo
(
this
,
callBack
)
await
app
.
getBaseInfo
(
self
,
callBack
)
},
},
async
pending
()
{
async
pending
()
{
...
...
src/pages/settle/sign-contract.vue
View file @
397835be
...
@@ -291,6 +291,7 @@
...
@@ -291,6 +291,7 @@
this
.
baseInfo
.
bank_site
=
''
this
.
baseInfo
.
bank_site
=
''
},
},
async
getBaseInfo
()
{
async
getBaseInfo
()
{
let
self
=
this
const
app
=
getApp
()
const
app
=
getApp
()
const
callBack
=
(
vm
,
result
)
=>
{
const
callBack
=
(
vm
,
result
)
=>
{
vm
.
settledInfo
=
result
vm
.
settledInfo
=
result
...
@@ -298,12 +299,12 @@
...
@@ -298,12 +299,12 @@
vm
.
baseInfo
.
name
=
record
.
id_card_name
vm
.
baseInfo
.
name
=
record
.
id_card_name
vm
.
baseInfo
.
id
=
record
.
id
vm
.
baseInfo
.
id
=
record
.
id
}
}
let
settledInfo
=
app
.
globalData
.
settledInfo
let
settledInfo
=
self
.
vuex_settled
if
(
settledInfo
)
{
if
(
settledInfo
)
{
callBack
(
this
,
settledInfo
)
callBack
(
self
,
settledInfo
)
return
return
}
}
await
app
.
getBaseInfo
(
this
,
callBack
)
await
app
.
getBaseInfo
(
self
,
callBack
)
},
},
async
submitInfo
()
{
async
submitInfo
()
{
// checkSettleSignInfo
// checkSettleSignInfo
...
...
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