Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
c6d4609d
Commit
c6d4609d
authored
Aug 03, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
f972f22e
2290feae
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
130 additions
and
73 deletions
+130
-73
.env.js
.env.js
+3
-1
mine.vue
src/pages/index/mine.vue
+1
-1
manualBinding.vue
src/pages/learn/manualBinding.vue
+5
-2
selectCategory.vue
src/pages/learn/selectCategory.vue
+48
-24
index.vue
src/pages/login/index.vue
+12
-1
bank.vue
src/pages/mine/bank.vue
+2
-2
certify.vue
src/pages/mine/certify.vue
+20
-5
info.vue
src/pages/mine/info.vue
+35
-35
setting.vue
src/pages/mine/setting.vue
+4
-2
No files found.
.env.js
View file @
c6d4609d
;(
function
()
{
let
NODE_ENV
=
'
dev
'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'
test
'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
VERSION
=
'v1.0.0'
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
ENV_VAR
=
require
(
'./.env.dev.js'
)
...
...
@@ -21,6 +22,7 @@
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{}
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
process
.
uniEnv
[
'version'
]
=
VERSION
for
(
let
key
in
ENV_VAR
)
{
process
.
uniEnv
[
key
]
=
ENV_VAR
[
key
]
}
...
...
src/pages/index/mine.vue
View file @
c6d4609d
...
...
@@ -29,7 +29,7 @@
</view>
</view>
<view
class=
"u-m-r-10 avatar"
>
<u-avatar
class=
"avatar-iamge"
:src=
"avatar"
size=
"1
4
0"
></u-avatar>
<u-avatar
class=
"avatar-iamge"
:src=
"avatar"
size=
"1
6
0"
></u-avatar>
</view>
</view>
<view
class=
""
>
...
...
src/pages/learn/manualBinding.vue
View file @
c6d4609d
...
...
@@ -22,9 +22,10 @@
input-align=
"center"
placeholder=
"请输入卡号"
:placeholder-style=
"placeplaceholderStyle"
cursor-spacing=
"
140
"
cursor-spacing=
"
272
"
:focus=
"focus"
adjust-position
hold-keyboard
/>
</view>
<view
class=
"field-title"
>
学习卡密码
</view>
...
...
@@ -38,6 +39,8 @@
:placeholder-style=
"placeplaceholderStyle"
cursor-spacing=
"140"
adjust-position
hold-keyboard
:password-icon=
"false"
/>
</view>
</view>
...
...
@@ -71,7 +74,7 @@ export default {
return
{
code
:
''
,
password
:
''
,
focus
:
tru
e
,
focus
:
fals
e
,
loading
:
false
,
// relationId: 0,
}
...
...
src/pages/learn/selectCategory.vue
View file @
c6d4609d
...
...
@@ -9,11 +9,12 @@
title-bold
></u-navbar>
<!-- 标签列表 -->
<scroll-view
<
!--
<
scroll-view
class=
"select-category-content"
scroll-y
:scroll-into-view=
"scrollId"
>
>
-->
<view
class=
"select-category-content"
>
<view
v-for=
"(items, key) in labels"
:key=
"key"
class=
"label-list"
>
<view
v-for=
"(list, index) in items"
...
...
@@ -26,36 +27,43 @@
: 0,
}"
>
<view
class=
"label-title"
:id=
"key + index"
>
<!-- 品类title -->
<view>
{{
key
==
secondKey
?
labels
[
firstKey
][
0
][
index
].
label
:
'非煤矿类'
}}
</view>
</view>
<view
class=
"label-content"
>
<view
v-for=
"(label, ind) in list"
:key=
"ind"
class=
"label-item"
>
<!-- 选中为蓝底,非选中状态为白底 -->
<view
:class=
"[
'label-normal',
{
selected: label.id == selected[key].id,
wide: key == secondKey,
},
]"
@click="handleClick(key, index, ind, label)"
>
<text
class=
"label-text"
>
{{
label
.
label
}}
</text>
<scroll-view
scroll-y
:scroll-into-view=
"scrollId"
class=
"select-category-content + key"
>
<view
class=
"label-title"
:id=
"key + index"
>
<!-- 品类title -->
<view>
{{
key
==
secondKey
?
labels
[
firstKey
][
0
][
index
].
label
:
'非煤矿类'
}}
</view>
</view>
<view
class=
"label-content"
>
<view
v-for=
"(label, ind) in list"
:key=
"ind"
class=
"label-item"
>
<!-- 选中为蓝底,非选中状态为白底 -->
<view
:class=
"[
'label-normal',
{
selected: label.id == selected[key].id,
wide: key == secondKey,
},
]"
@click="handleClick(key, index, ind, label)"
>
<text
class=
"label-text"
>
{{
label
.
label
}}
</text>
</view>
</view>
</view>
</view>
</
scroll-
view>
</view>
</view>
<!-- 标签加载中 -->
<view
class=
"tag-loading-view"
v-if=
"tapLoading"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
</scroll-view>
<!--
</scroll-view>
-->
</view>
</view>
</
template
>
...
...
@@ -164,6 +172,22 @@ export default {
for
(
var
item
of
res
)
{
if
(
item
.
parentId
==
data
.
id
)
{
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
this
.
labels
[
key2
][
i
].
push
(
item
)
}
}
}
...
...
src/pages/login/index.vue
View file @
c6d4609d
...
...
@@ -35,6 +35,7 @@ export default {
return
{
title
:
'微信授权登录'
,
host
:
''
,
//配置为自己的额服务器即可
back
:
false
,
//跳回页面
}
},
computed
:
{
...
...
@@ -42,7 +43,11 @@ export default {
return
process
.
uniEnv
.
qn_base_url
+
'LOGO@3x.png'
},
},
onShow
()
{},
onLoad
(
params
)
{
if
(
params
&&
params
.
back
)
{
this
.
back
=
true
}
},
methods
:
{
wxLogin
()
{
// 获取code 小程序专有,用户登录凭证。
...
...
@@ -68,6 +73,12 @@ export default {
})
this
.
$u
.
api
.
loginWechatAuth
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
if
(
this
.
back
)
{
this
.
$u
.
route
({
type
:
'back'
,
})
return
}
this
.
$u
.
vuex
(
'vuex_token'
,
res
.
token
)
this
.
$u
.
vuex
(
'openId'
,
res
.
openId
)
this
.
$u
.
vuex
(
'userInfo'
,
userInfo
)
...
...
src/pages/mine/bank.vue
View file @
c6d4609d
...
...
@@ -8,7 +8,7 @@
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"content"
v-if=
"lists"
>
<view
class=
"content"
v-if=
"lists
.length > 0
"
>
<!--
<text
class=
"title"
>
{{
title
}}
</text>
-->
<my-subject
class=
"subject-item"
...
...
@@ -118,7 +118,7 @@ export default {
// if (data.length > 0) {
// this.lists = data
// console.log('tiku data', data
)
console
.
log
(
'tiku data'
,
this
.
lists
)
// }
})
},
...
...
src/pages/mine/certify.vue
View file @
c6d4609d
...
...
@@ -79,7 +79,8 @@ export default {
data
()
{
return
{
student
:
{},
token
:
''
,
qiToken
:
''
,
vToken
:
null
,
}
},
computed
:
{
...
...
@@ -118,7 +119,11 @@ export default {
},
onLoad
()
{
this
.
student
=
getApp
().
globalData
.
student
this
.
token
=
getApp
().
globalData
.
qiNiuToken
this
.
qiToken
=
getApp
().
globalData
.
qiNiuToken
this
.
vToken
=
this
.
vuex_token
},
onUnload
()
{
uni
.
hideLoading
()
},
methods
:
{
submit
()
{
...
...
@@ -148,19 +153,24 @@ export default {
})
},
getFront
()
{
let
that
=
this
//身份证正面图片识别
upload
.
getPhoto
(
2
,
this
.
t
oken
).
then
((
res
)
=>
{
upload
.
getPhoto
(
2
,
this
.
qiT
oken
).
then
((
res
)
=>
{
this
.
student
.
identityFrontPath
=
res
.
key
uni
.
showLoading
({
title
:
'识别中,请稍后'
,
})
this
.
$u
.
api
.
getCertifyInfoByType
(
'front'
,
{
url
:
process
.
uniEnv
.
qn_asset_url
+
res
.
key
,
})
.
then
((
res
)
=>
{
console
.
log
(
'识别结果'
,
res
)
uni
.
hideLoading
(
)
this
.
student
.
name
=
res
.
name
this
.
student
.
identityNumber
=
res
.
number
})
.
catch
((
data
)
=>
{
uni
.
hideLoading
()
this
.
student
.
name
=
''
this
.
student
.
identityNumber
=
''
this
.
$u
.
toast
(
'识别身份证信息错误'
)
...
...
@@ -169,17 +179,22 @@ export default {
},
getBack
()
{
//身份证反面图片识别
upload
.
getPhoto
(
2
,
this
.
t
oken
).
then
((
res
)
=>
{
upload
.
getPhoto
(
2
,
this
.
qiT
oken
).
then
((
res
)
=>
{
this
.
student
.
identityBackPath
=
res
.
key
uni
.
showLoading
({
title
:
'识别中,请稍后'
,
})
this
.
$u
.
api
.
getCertifyInfoByType
(
'back'
,
{
url
:
process
.
uniEnv
.
qn_asset_url
+
res
.
key
,
})
.
then
((
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'识别结果'
,
res
)
this
.
student
.
certificateValidityDate
=
res
.
expire
})
.
catch
((
data
)
=>
{
uni
.
hideLoading
()
this
.
student
.
certificateValidityDate
=
''
this
.
$u
.
toast
(
'识别身份证信息错误'
)
})
...
...
src/pages/mine/info.vue
View file @
c6d4609d
...
...
@@ -86,7 +86,7 @@ export default {
student
:
{
isCertify
:
false
,
},
t
oken
:
null
,
qiT
oken
:
null
,
code
:
''
,
count
:
0
,
}
...
...
@@ -126,7 +126,7 @@ export default {
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
then
((
res
)
=>
{
console
.
log
(
'chushihua token'
,
res
)
this
.
t
oken
=
res
//token为七牛云的token一般由后台接口提供
this
.
qiT
oken
=
res
//token为七牛云的token一般由后台接口提供
getApp
().
globalData
.
qiNiuToken
=
res
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
...
...
@@ -159,7 +159,6 @@ export default {
},
getPhonenumber
(
e
)
{
console
.
log
(
'eeeee'
,
e
)
let
that
=
this
let
params
=
{}
if
(
e
&&
e
.
detail
)
{
if
(
e
.
detail
.
errMsg
.
indexOf
(
'user deny'
)
>
-
1
)
{
...
...
@@ -172,14 +171,14 @@ export default {
iv
:
e
.
detail
.
iv
,
}
}
else
{
th
at
.
$u
.
toast
(
e
.
detail
.
errMsg
)
th
is
.
$u
.
toast
(
e
.
detail
.
errMsg
)
return
}
}
else
{
th
at
.
$u
.
toast
(
'授权失败,请重新授权'
)
th
is
.
$u
.
toast
(
'授权失败,请重新授权'
)
return
}
th
at
.
syncUserinfo
(
params
)
th
is
.
syncUserinfo
(
params
)
},
syncUserinfo
(
params
)
{
let
that
=
this
...
...
@@ -190,24 +189,12 @@ export default {
uni
.
login
({
provider
:
'weixin'
,
success
:
(
code_res
)
=>
{
//获取code
if
(
code_res
.
errMsg
==
'login:ok'
)
{
console
.
log
(
'走的第一个2'
)
params
.
code
=
code_res
.
code
that
.
$u
.
api
.
loginWechatAuth
(
params
)
.
then
((
res
)
=>
{
that
.
student
.
phoneNumber
=
res
.
phoneNumber
that
.
$u
.
api
.
updateUserInfo
({
phoneNumber
:
res
.
phoneNumber
,
})
.
then
((
ret
)
=>
{
that
.
$u
.
toast
(
'绑定成功!'
)
})
})
.
catch
((
err
)
=>
{
that
.
toLogin
()
})
//传参到服务器解析
that
.
sendInfo
(
params
)
}
},
})
...
...
@@ -215,26 +202,39 @@ export default {
fail
()
{
console
.
log
(
'走的第二个1'
,
params
)
// session_key 已经失效,需要重新执行登录流程
that
.
count
++
if
(
that
.
count
>
1
)
{
console
.
log
(
'重试次数大于1'
)
that
.
toLogin
()
}
that
.
syncUserinfo
(
params
)
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
'pages/login/index'
,
})
},
800
)
},
})
},
toLogin
()
{
that
.
$u
.
toast
(
'登录信息失效,请重新登录后重试'
)
setTimeout
(()
=>
{
uni
.
navigateTo
({
url
:
'pages/login/index'
,
sendInfo
(
params
)
{
this
.
$u
.
api
.
loginWechatAuth
(
params
)
.
then
((
res
)
=>
{
this
.
student
.
phoneNumber
=
res
.
phoneNumber
this
.
$u
.
api
.
updateUserInfo
({
phoneNumber
:
res
.
phoneNumber
,
})
.
then
((
ret
)
=>
{
this
.
$u
.
toast
(
'绑定成功!'
)
})
})
.
catch
((
err
)
=>
{
this
.
$u
.
route
({
url
:
'pages/login/index'
,
params
:
{
back
:
true
,
},
})
})
},
800
)
},
changeHead
()
{
//获取图片
upload
.
getPhoto
(
2
,
this
.
t
oken
).
then
((
res
)
=>
{
upload
.
getPhoto
(
2
,
this
.
qiT
oken
).
then
((
res
)
=>
{
this
.
student
.
avatarPath
=
process
.
uniEnv
.
qn_asset_url
+
res
.
key
this
.
$u
.
api
.
updateUserInfo
({
avatarPath
:
this
.
student
.
avatarPath
,
...
...
@@ -243,7 +243,7 @@ export default {
},
changeCertPhoto
()
{
//获取图片
upload
.
getPhoto
(
2
,
this
.
t
oken
).
then
((
res
)
=>
{
upload
.
getPhoto
(
2
,
this
.
qiT
oken
).
then
((
res
)
=>
{
//显示
this
.
student
.
certificatePhotoPath
=
process
.
uniEnv
.
qn_asset_url
+
res
.
key
...
...
src/pages/mine/setting.vue
View file @
c6d4609d
...
...
@@ -3,7 +3,7 @@
<u-cell-group
class=
"cell-group"
:border=
"false"
>
<u-cell-item
title=
"版本更新"
value=
"当前版本v1.1.0
"
:value=
"newVersion
"
:border-bottom=
"false"
@
tap=
"upgrade"
></u-cell-item>
...
...
@@ -15,7 +15,9 @@
<
script
>
export
default
{
data
()
{
return
{}
return
{
newVersion
:
'当前版本'
+
process
.
uniEnv
.
version
,
}
},
computed
:
{},
onLoad
()
{},
...
...
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