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
f7ecf540
Commit
f7ecf540
authored
Aug 03, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of
https://git.banshouhui.com/wuzhenzhe/study
into dev-v1.0.0
parents
904b564d
c7a5238b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
11 deletions
+28
-11
App.vue
src/App.vue
+24
-9
answer.vue
src/pages/learn/answer.vue
+3
-1
detail.vue
src/pages/search/detail.vue
+1
-1
No files found.
src/App.vue
View file @
f7ecf540
...
@@ -4,20 +4,15 @@ export default {
...
@@ -4,20 +4,15 @@ export default {
globalData
:
{
globalData
:
{
// 开发环境
// 开发环境
uniEnv
:
process
.
uniEnv
,
uniEnv
:
process
.
uniEnv
,
questionList
:
[],
questionList
:
[]
orgId
:
-
1
},
},
onLaunch
:
function
(
options
)
{
onLaunch
:
function
(
options
)
{
this
.
globalData
.
id
=
options
?.
query
?.
orgId
||
-
1
// 版本更新
// 版本更新
this
.
updateApp
()
this
.
updateApp
()
},
},
onShow
:
function
()
{
onShow
:
function
(
options
)
{
const
orgId
=
this
.
globalData
.
id
console
.
log
(
"options"
,
options
)
if
(
orgId
!==
this
.
orgId
)
{
this
.
updateOrgId
(
options
)
this
.
logout
()
}
this
.
$u
.
vuex
(
'orgId'
,
orgId
)
},
},
onHide
:
function
()
{
onHide
:
function
()
{
console
.
log
(
'App Hide'
)
console
.
log
(
'App Hide'
)
...
@@ -81,10 +76,30 @@ export default {
...
@@ -81,10 +76,30 @@ export default {
})
})
}
}
},
},
// 更新机构ID
updateOrgId
(
options
)
{
const
orgId
=
options
?.
query
?.
orgId
||
-
1
// 需要更新机构ID的场景,详细可参考 https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html
const
scene
=
[
1005
,
1006
,
1011
,
1012
,
1013
,
1026
,
1035
,
1047
,
1048
,
1049
,
1053
,
1058
,
1067
,
1091
,
1145
,
1135
,
1183
]
if
(
!
this
.
orgId
)
{
this
.
$u
.
vuex
(
'orgId'
,
orgId
)
}
else
{
if
(
scene
.
includes
(
options
.
scene
))
{
if
(
orgId
!==
this
.
orgId
)
this
.
logout
()
this
.
$u
.
vuex
(
'orgId'
,
orgId
)
}
}
},
logout
()
{
logout
()
{
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
this
.
$u
.
vuex
(
'orgId'
,
''
)
this
.
$u
.
vuex
(
'openId'
,
''
)
this
.
$u
.
vuex
(
'openId'
,
''
)
this
.
$u
.
vuex
(
'userInfo'
,
{})
this
.
$u
.
vuex
(
'userInfo'
,
{})
this
.
$u
.
vuex
(
'questionList'
,
{})
this
.
$u
.
vuex
(
'lastIndex'
,
{})
this
.
$u
.
vuex
(
'answerCount'
,
{})
}
}
},
},
}
}
...
...
src/pages/learn/answer.vue
View file @
f7ecf540
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<view
class=
"u-flex default"
v-if=
"total === 0 && [3, 4].includes(type)"
>
<view
class=
"u-flex default"
v-if=
"total === 0 && [3, 4].includes(type)"
>
<view>
<view>
<
image
:src=
"defaultImg
"
/>
<
u-image
:src=
"defaultImg"
width=
"374"
height=
"322"
:fade=
"false
"
/>
</view>
</view>
<view
class=
"no-result"
>
<view
class=
"no-result"
>
{{
type
===
4
?
'当前暂无错题记录'
:
'当前暂无收藏题目'
}}
{{
type
===
4
?
'当前暂无错题记录'
:
'当前暂无收藏题目'
}}
...
@@ -278,6 +278,8 @@ export default {
...
@@ -278,6 +278,8 @@ export default {
this
.
$u
.
vuex
(
`answerCount.
${
this
.
questionWarehouseId
}
`
,
0
)
this
.
$u
.
vuex
(
`answerCount.
${
this
.
questionWarehouseId
}
`
,
0
)
this
.
$u
.
vuex
(
`questionList.
${
this
.
questionWarehouseId
}
`
,
[])
this
.
$u
.
vuex
(
`questionList.
${
this
.
questionWarehouseId
}
`
,
[])
}
}
}
else
if
(
this
.
source
===
3
)
{
this
.
title
=
'考试'
}
else
if
(
this
.
source
===
4
)
{
}
else
if
(
this
.
source
===
4
)
{
this
.
title
=
'收藏的题'
this
.
title
=
'收藏的题'
}
else
if
(
this
.
source
===
5
)
{
}
else
if
(
this
.
source
===
5
)
{
...
...
src/pages/search/detail.vue
View file @
f7ecf540
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<view
class=
"u-flex default"
v-if=
"lists.length === 0"
>
<view
class=
"u-flex default"
v-if=
"lists.length === 0"
>
<view>
<view>
<
image
:src=
"defaultImg
"
/>
<
u-image
:src=
"defaultImg"
width=
"374"
height=
"256"
:fade=
"false
"
/>
</view>
</view>
<view
class=
"no-result"
>
<view
class=
"no-result"
>
当前暂无搜索结果
当前暂无搜索结果
...
...
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