Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 86aec38a
authored
Jan 08, 2026
by
cen
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.5.3' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V5.5.3
2 parents
8db3a080
43becd6a
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
444 additions
and
87 deletions
api/module/activity.js
api/module/systemApi.js
components/HomeFrame/components/ActivityPopup.vue
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/components/SettingBox.vue
components/HomeFrame/index.vue
js_sdk/wa-permission/permission.js
manifest.json
pages/boutique/index.vue
pages/common/login.vue
pages/equity/index.vue
store/getters.js
store/modules/sys.js
api/module/activity.js
View file @
86aec38
...
@@ -16,5 +16,25 @@ module.exports = {
...
@@ -16,5 +16,25 @@ module.exports = {
projectName
:
'pad'
,
projectName
:
'pad'
,
...
data
...
data
})
})
}
},
/**
* 获取活动弹框
*/
getActivityMessagePopUpWindow
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.activity.message.pop.up.window'
,
projectName
:
'pad'
,
...
data
})
},
/**
* 更新活动弹框状态
*/
updateActivityMessagePopUpWindow
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.activity.pop.up.window.update'
,
projectName
:
'pad'
,
...
data
})
},
}
}
api/module/systemApi.js
View file @
86aec38
import
http
from
'../request/http'
import
http
from
'../request/http'
import
{
env
}
from
'../../env'
import
{
env
}
from
'../../env'
const
serverConfig
=
{
const
ENV
=
env
==
'ip'
?
'develop'
:
env
,
serverConfig
=
{
mockRequestCount
:
null
,
mockRequestCount
:
null
,
mockTimer
:
{},
mockTimer
:
{},
mockCache
:
null
mockCache
:
null
...
@@ -13,8 +14,8 @@ const serverConfig = {
...
@@ -13,8 +14,8 @@ const serverConfig = {
},
},
configModule
=
'app-tape'
,
configModule
=
'app-tape'
,
boutiqueConfigModule
=
'boutique-pad-config'
,
boutiqueConfigModule
=
'boutique-pad-config'
,
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
,
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
ENV
}
`
,
boutiqueConfigUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
boutiqueConfigModule
}
&env=
${
env
}
`
boutiqueConfigUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
boutiqueConfigModule
}
&env=
${
ENV
}
`
/**获取APP配置 */
/**获取APP配置 */
const
getMockData
=
async
(
immediate
=
false
)
=>
{
const
getMockData
=
async
(
immediate
=
false
)
=>
{
const
MOCKDATA
=
uni
.
$storage
.
get
(
'mock_data'
)
const
MOCKDATA
=
uni
.
$storage
.
get
(
'mock_data'
)
...
...
components/HomeFrame/components/ActivityPopup.vue
0 → 100644
View file @
86aec38
<
template
>
<uni-popup
ref=
"popup"
border-radius=
"20px"
@
maskClick=
"updateActivity"
>
<view
class=
"activity-box"
>
<view
class=
"close flex"
@
click=
"close"
>
<uni-icons
type=
"closeempty"
:size=
"18"
color=
"#1A1A1A"
></uni-icons>
</view>
<image
:src=
"bgUrl"
class=
"bg"
/>
<view
class=
"content"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"description"
>
{{
description
}}
</view>
</view>
<view
class=
"btn"
@
click=
"jump"
></view>
</view>
</uni-popup>
</
template
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
'ActivityPopup'
,
data
()
{
return
{
data
:
{}
}
},
computed
:
{
bgUrl
()
{
let
{
type
}
=
this
.
data
return
`https://img02.glsx.com.cn/weapp/resource/app-tape/common/activity-
${
type
}
.webp`
},
title
()
{
return
this
.
data
.
activityName
||
''
},
description
()
{
return
{
0
:
'获奖名单已出炉!快来看看是谁斩获大奖,围观本期“销售之星”。'
,
1
:
'新的销售竞赛活动已发布!请尽快查阅评选规则与奖励方案,力争上游!'
}[
this
.
data
.
type
]
},
},
mounted
()
{
},
methods
:
{
open
(
data
)
{
this
.
data
=
data
this
.
$refs
.
popup
.
open
(
"center"
);
},
close
()
{
this
.
$refs
.
popup
.
close
()
this
.
updateActivity
()
},
jump
()
{
this
.
close
()
uni
.
$emit
(
'ActivityCenter'
)
},
async
updateActivity
()
{
const
{
msgId
}
=
this
.
data
await
uni
.
$api
.
activityApi
.
updateActivityMessagePopUpWindow
({
msgId
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.activity-box
{
position
:
relative
;
width
:
toRpx
(
1400
);
height
:
toRpx
(
928
);
//
background
:
#ffffff
;
border-radius
:
toRpx
(
64
);
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
.close
{
position
:
absolute
;
width
:
toRpx
(
160
);
height
:
toRpx
(
160
);
top
:
0
;
right
:
0
;
justify-content
:
center
;
}
.bg
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
z-index
:
-1
;
}
.content
{
position
:
absolute
;
top
:
toRpx
(
284
);
right
:
toRpx
(
100
);
width
:
toRpx
(
650
);
.title
{
color
:
#333333
;
font-size
:
toRpx
(
56
);
font-weight
:
700
;
margin-bottom
:
toRpx
(
24
);
line-height
:
toRpx
(
80
);
display
:
-webkit-box
;
word-break
:
break-all
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.description
{
color
:
#999999
;
font-size
:
toRpx
(
34
);
line-height
:
toRpx
(
52
);
}
}
.btn
{
position
:
absolute
;
width
:
toRpx
(
516
);
height
:
toRpx
(
120
);
right
:
toRpx
(
266
);
bottom
:
toRpx
(
116
);
}
}
</
style
>
components/HomeFrame/components/LeftSide.vue
View file @
86aec38
<
template
>
<
template
>
<view
class=
"left-side"
>
<view
class=
"left-side"
>
<view
class=
"user-box"
>
<view
class=
"user-box"
>
<view
class=
"user-info flex"
@
click=
"jumpPersonCenter"
>
<view
class=
"user-info flex"
@
click=
"jumpPersonCenter"
>
<view
:class=
"['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"
></view>
<view
:class=
"['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"
></view>
<view
class=
"user-name"
>
<view
class=
"user-name"
>
<view
class=
"user-name-text"
>
{{
userInfo
.
name
}}
</view>
<view
class=
"user-name-text"
>
{{
userInfo
.
name
}}
</view>
<view
v-if=
"hasPerson"
class=
"sprite-icon icon-arrow-next"
></view>
<view
v-if=
"hasPerson"
class=
"sprite-icon icon-arrow-next"
></view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
:class=
"['left-tabs',
{ three: tabs.length == 3 }]">
<view
:class=
"['left-tabs',
{ three: tabs.length == 3 }]">
<template
v-for=
"(i, index) in tabs"
>
<template
v-for=
"(i, index) in tabs"
>
<view
:class=
"['tab-item',
{ tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index, i)" v-if="!i.hidden
&&
(i.name !== 'ActivityCenter' || activityTabVisible)">
<view
:class=
"['tab-item',
{ tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index, i)"
v-if="!i.hidden
&&
(i.name !== 'ActivityCenter' || activityTabVisible)"
>
<view
class=
"icon-box"
>
<view
class=
"icon-box"
>
<view
:class=
"['sprite-icon', `icon-$
{i.icon}${tabIndex == index ? '-active' : ''}`]">
</view>
<view
:class=
"['sprite-icon', `icon-$
{i.icon}${tabIndex == index ? '-active' : ''}`]">
</view>
</view>
</view>
{{
i
.
label
}}
{{
i
.
label
}}
<view
class=
"dot"
v-if=
"i.icon == 'record' && perRecordNumber"
></view>
<view
<view
class=
"tip-box"
v-if=
"i.icon == 'study' && readCount"
>
待办事项:
{{
readCount
}}
</view>
class=
"dot"
v-if=
"i.icon == 'record' && perRecordNumber"
></view>
<view
class=
"tip-box"
v-if=
"i.icon == 'study' && readCount"
>
待办事项:
{{
readCount
}}
</view>
</view>
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -32,19 +49,40 @@
...
@@ -32,19 +49,40 @@
v-if="messageTotal > 0"
v-if="messageTotal > 0"
></view>
></view>
</view> -->
</view> -->
<view
class=
"btn"
@
click=
"openScenePopup"
>
<view
class=
"btn"
@
click=
"openScenePopup"
>
<view
class=
"sprite-icon icon-scene-change"
></view>
<view
class=
"sprite-icon icon-scene-change"
></view>
</view>
</view>
<view
class=
"btn"
@
click=
"handleSetting"
>
<view
class=
"btn"
@
click=
"handleSetting"
>
<view
class=
"sprite-icon icon-setting"
></view>
<view
class=
"sprite-icon icon-setting"
></view>
</view>
</view>
</view>
</view>
<!-- 客服弹框 -->
<!-- 客服弹框 -->
<!-- <kf-box ref="kfRef" /> -->
<!-- <kf-box ref="kfRef" /> -->
<message-pop
ref=
"kfRef"
:type=
"messageType"
:messageData=
"messageData"
></message-pop>
<message-pop
ref=
"kfRef"
:type=
"messageType"
:messageData=
"messageData"
></message-pop>
<!-- 设置弹框 -->
<!-- 设置弹框 -->
<setting-box
ref=
"settingRef"
@
stopAudio=
"$emit('stopAudio')"
/>
<setting-box
<center-popup
:list=
"sceneTypeList"
ref=
"sceneTypeRef"
@
choose=
"chooseSceneType"
title=
"选择场景"
tag=
"当前场景"
:id=
"userInfo.sceneType"
isLine
/>
ref=
"settingRef"
@
stopAudio=
"$emit('stopAudio')"
/>
<center-popup
:list=
"sceneTypeList"
ref=
"sceneTypeRef"
@
choose=
"chooseSceneType"
title=
"选择场景"
tag=
"当前场景"
:id=
"userInfo.sceneType"
isLine
/>
</view>
</view>
</template>
</template>
...
@@ -61,7 +99,7 @@ export default {
...
@@ -61,7 +99,7 @@ export default {
userInfo
:
Object
userInfo
:
Object
},
},
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{
return
{
messageData
:
{
messageData
:
{
classCountList
:
[],
classCountList
:
[],
...
@@ -80,7 +118,7 @@ export default {
...
@@ -80,7 +118,7 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
userInfo
(
n
)
{
userInfo
(
n
)
{
console
.
log
(
'userInfo'
,
n
)
console
.
log
(
'userInfo'
,
n
)
if
(
n
.
shopMerchantId
)
this
.
haveCustomerAccess
(
n
)
if
(
n
.
shopMerchantId
)
this
.
haveCustomerAccess
(
n
)
},
},
...
@@ -92,10 +130,10 @@ export default {
...
@@ -92,10 +130,10 @@ export default {
// }
// }
},
},
computed
:
{
computed
:
{
perRecordNumber
()
{
perRecordNumber
()
{
return
this
.
$store
.
state
.
audio
.
perRecordNumber
return
this
.
$store
.
state
.
audio
.
perRecordNumber
},
},
sceneTypeList
()
{
sceneTypeList
()
{
const
sceneTypeObject
=
{
const
sceneTypeObject
=
{
1
:
{
1
:
{
title
:
'轻改'
,
title
:
'轻改'
,
...
@@ -132,7 +170,7 @@ export default {
...
@@ -132,7 +170,7 @@ export default {
return
result
return
result
},
},
// 这个tabs进来的值更新触发顺序是 getStudyCenterPermission的方法变更 => 计算属性的变更 => userInfo的监听变更 => haveCustomerAccess的变更。 计算属性的变更后的更新值是不会重新触发渲染的
// 这个tabs进来的值更新触发顺序是 getStudyCenterPermission的方法变更 => 计算属性的变更 => userInfo的监听变更 => haveCustomerAccess的变更。 计算属性的变更后的更新值是不会重新触发渲染的
tabs
()
{
tabs
()
{
const
tabs
=
[
const
tabs
=
[
{
{
label
:
"首页"
,
label
:
"首页"
,
...
@@ -200,7 +238,7 @@ export default {
...
@@ -200,7 +238,7 @@ export default {
},
},
inject
:
[
'showPage'
],
inject
:
[
'showPage'
],
methods
:
{
methods
:
{
getUnreadCount
()
{
getUnreadCount
()
{
let
_this
=
this
let
_this
=
this
uni
.
$api
.
commonApi
.
getUnreadCount
({}).
then
(
res
=>
{
uni
.
$api
.
commonApi
.
getUnreadCount
({}).
then
(
res
=>
{
this
.
readCount
=
res
.
data
this
.
readCount
=
res
.
data
...
@@ -236,15 +274,15 @@ export default {
...
@@ -236,15 +274,15 @@ export default {
// this.leaveTrack()
// this.leaveTrack()
// }, 5000)
// }, 5000)
// },
// },
clickHome
()
{
clickHome
()
{
if
(
this
.
tabs
[
this
.
tabIndex
].
isTrack
)
if
(
this
.
tabs
[
this
.
tabIndex
].
isTrack
)
this
.
changeIndex
(
0
,
this
.
tabs
[
0
])
this
.
changeIndex
(
0
,
this
.
tabs
[
0
])
},
},
handleSetting
()
{
handleSetting
()
{
this
.
$refs
.
settingRef
.
open
()
this
.
$refs
.
settingRef
.
open
()
this
.
clickHome
()
this
.
clickHome
()
},
},
findBeiSenSSOToken
()
{
findBeiSenSSOToken
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
const
url
=
'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
const
url
=
'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
uni
.
$api
.
commonApi
.
findBeiSenSSOToken
({}).
then
(
res
=>
{
uni
.
$api
.
commonApi
.
findBeiSenSSOToken
({}).
then
(
res
=>
{
...
@@ -254,7 +292,7 @@ export default {
...
@@ -254,7 +292,7 @@ export default {
})
})
})
})
},
},
handleActivityCenter
()
{
handleActivityCenter
()
{
console
.
log
(
'ActivityCenter triggered'
);
// 添加日志查看触发次数
console
.
log
(
'ActivityCenter triggered'
);
// 添加日志查看触发次数
let
{
tabs
}
=
this
;
let
{
tabs
}
=
this
;
let
index
=
tabs
.
findIndex
(
e
=>
e
.
name
==
'ActivityCenter'
);
let
index
=
tabs
.
findIndex
(
e
=>
e
.
name
==
'ActivityCenter'
);
...
@@ -262,7 +300,7 @@ export default {
...
@@ -262,7 +300,7 @@ export default {
this
.
changeIndex
(
index
,
this
.
tabs
[
index
]);
this
.
changeIndex
(
index
,
this
.
tabs
[
index
]);
}
}
},
},
async
changeIndex
(
index
,
item
)
{
async
changeIndex
(
index
,
item
)
{
if
(
item
.
eventCode
)
uni
.
$track
.
add
({
if
(
item
.
eventCode
)
uni
.
$track
.
add
({
eventCode
:
item
.
eventCode
eventCode
:
item
.
eventCode
})
})
...
@@ -283,13 +321,13 @@ export default {
...
@@ -283,13 +321,13 @@ export default {
this
.
findBeiSenSSOToken
()
this
.
findBeiSenSSOToken
()
}
}
},
},
async
haveCustomerAccess
(
val
)
{
async
haveCustomerAccess
(
val
)
{
const
{
shopMerchantId
,
sceneType
:
scene
}
=
val
const
{
shopMerchantId
,
sceneType
:
scene
}
=
val
uni
.
$api
.
customerApi
.
saleOpen
({
uni
.
$api
.
customerApi
.
saleOpen
({
merchantId
:
shopMerchantId
,
merchantId
:
shopMerchantId
,
scene
scene
}).
then
(
result
=>
{
}).
then
(
result
=>
{
console
.
log
(
'有客户权限'
,
result
)
console
.
log
(
'有客户权限'
,
result
)
if
(
result
)
{
if
(
result
)
{
this
.
hasPerson
=
true
this
.
hasPerson
=
true
// this.activityTabVisible = scene !== 7
// this.activityTabVisible = scene !== 7
...
@@ -325,7 +363,7 @@ export default {
...
@@ -325,7 +363,7 @@ export default {
})
})
},
},
// 获取话术未读列表
// 获取话术未读列表
async
getMessage
()
{
async
getMessage
()
{
const
{
sceneType
,
uuid
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
sceneType
,
uuid
}
=
uni
.
$storage
.
get
(
"userInfo"
)
let
businessTypeList
=
[]
let
businessTypeList
=
[]
if
(
sceneType
==
0
)
{
if
(
sceneType
==
0
)
{
...
@@ -341,8 +379,9 @@ export default {
...
@@ -341,8 +379,9 @@ export default {
if
(
res
.
total
)
{
if
(
res
.
total
)
{
this
.
messageData
=
res
this
.
messageData
=
res
this
.
messageType
=
'attendance'
this
.
messageType
=
'attendance'
this
.
$refs
.
kfRef
.
open
()
this
.
openStudyPopup
()
}
}
return
Promise
.
resolve
(
res
.
total
)
},
},
// 消息中心未读总数
// 消息中心未读总数
// async getMessageCount () {
// async getMessageCount () {
...
@@ -354,7 +393,8 @@ export default {
...
@@ -354,7 +393,8 @@ export default {
// this.messageTotal = res
// this.messageTotal = res
// },
// },
// 学习中心消息弹窗,优先级高于有修改话术弹窗
// 学习中心消息弹窗,优先级高于有修改话术弹窗
async
getMessagePop
()
{
async
getMessagePop
()
{
this
.
$store
.
dispatch
(
'setIndexMessagePopupStatus'
,
true
)
const
res
=
await
uni
.
$api
.
commonApi
.
getMessagePop
({})
const
res
=
await
uni
.
$api
.
commonApi
.
getMessagePop
({})
if
(
res
.
ids
&&
res
.
ids
.
length
>
0
)
{
if
(
res
.
ids
&&
res
.
ids
.
length
>
0
)
{
if
(
Array
.
isArray
(
res
.
moduleTypeList
)
&&
(
res
.
moduleTypeList
.
includes
(
3
)
||
res
.
moduleTypeList
.
includes
(
4
))
if
(
Array
.
isArray
(
res
.
moduleTypeList
)
&&
(
res
.
moduleTypeList
.
includes
(
3
)
||
res
.
moduleTypeList
.
includes
(
4
))
...
@@ -362,7 +402,7 @@ export default {
...
@@ -362,7 +402,7 @@ export default {
// 3, 4学习任务弹窗
// 3, 4学习任务弹窗
this
.
messageType
=
'study'
this
.
messageType
=
'study'
this
.
messageData
=
res
this
.
messageData
=
res
this
.
$refs
.
kfRef
.
open
()
this
.
openStudyPopup
()
// 确认消息
// 确认消息
if
(
res
.
ids
.
length
)
{
if
(
res
.
ids
.
length
)
{
uni
.
$api
.
commonApi
.
getStudyTaskConfirm
({
uni
.
$api
.
commonApi
.
getStudyTaskConfirm
({
...
@@ -372,21 +412,25 @@ export default {
...
@@ -372,21 +412,25 @@ export default {
}
else
{
}
else
{
this
.
messageType
=
'system'
this
.
messageType
=
'system'
this
.
messageData
=
res
this
.
messageData
=
res
this
.
$refs
.
kfRef
.
open
()
this
.
openStudyPopup
()
}
}
}
else
{
}
else
{
await
this
.
getMessage
()
const
data
=
await
this
.
getMessage
()
if
(
!
data
)
this
.
$store
.
dispatch
(
'setIndexMessagePopupStatus'
,
false
)
}
}
},
},
openPop
()
{
openStudyPopup
()
{
this
.
$refs
.
kfRef
.
open
()
},
openPop
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/common/messageList`
url
:
`/pages/common/messageList`
})
})
},
},
getMessageInfo
()
{
getMessageInfo
()
{
this
.
getMessagePop
()
this
.
getMessagePop
()
},
},
jumpPersonCenter
()
{
jumpPersonCenter
()
{
if
(
this
.
hasPerson
)
{
if
(
this
.
hasPerson
)
{
uni
.
$track
.
add
({
uni
.
$track
.
add
({
eventCode
:
'app_personal_center'
eventCode
:
'app_personal_center'
...
@@ -395,7 +439,7 @@ export default {
...
@@ -395,7 +439,7 @@ export default {
this
.
$emit
(
'update:tabIndex'
,
99
)
this
.
$emit
(
'update:tabIndex'
,
99
)
}
}
},
},
chooseSceneType
(
index
)
{
chooseSceneType
(
index
)
{
let
{
userInfo
,
sceneTypeList
}
=
this
,
let
{
userInfo
,
sceneTypeList
}
=
this
,
sceneType
=
sceneTypeList
[
index
].
id
sceneType
=
sceneTypeList
[
index
].
id
if
(
sceneType
==
userInfo
.
sceneType
)
return
if
(
sceneType
==
userInfo
.
sceneType
)
return
...
@@ -414,7 +458,7 @@ export default {
...
@@ -414,7 +458,7 @@ export default {
url
url
})
})
},
},
openScenePopup
()
{
openScenePopup
()
{
this
.
$refs
.
sceneTypeRef
.
open
()
this
.
$refs
.
sceneTypeRef
.
open
()
uni
.
$track
.
add
({
uni
.
$track
.
add
({
eventCode
:
'app_scene_change'
eventCode
:
'app_scene_change'
...
@@ -424,10 +468,10 @@ export default {
...
@@ -424,10 +468,10 @@ export default {
getStudyCenterPermission
()
{
getStudyCenterPermission
()
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
const
res
=
uni
.
$storage
.
get
(
'studyCenterPermission'
)
const
res
=
uni
.
$storage
.
get
(
'studyCenterPermission'
)
if
(
!
res
)
{
if
(
!
res
)
{
uni
.
$api
.
commonApi
.
getStudyCenterPermission
({}).
then
(
res
=>
{
uni
.
$api
.
commonApi
.
getStudyCenterPermission
({}).
then
(
res
=>
{
uni
.
$storage
.
set
(
'studyCenterPermission'
,
res
)
uni
.
$storage
.
set
(
'studyCenterPermission'
,
res
)
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
})
})
}
}
if
(
userInfo
.
sceneType
==
7
)
{
if
(
userInfo
.
sceneType
==
7
)
{
...
@@ -440,11 +484,11 @@ export default {
...
@@ -440,11 +484,11 @@ export default {
}
}
}
}
},
},
beforeCreate
()
{
beforeCreate
()
{
// clearInterval(this.trackInterval)
// clearInterval(this.trackInterval)
// this.trackInterval = null
// this.trackInterval = null
},
},
beforeDestroy
()
{
beforeDestroy
()
{
// uni.$off('pageBack')
// uni.$off('pageBack')
// uni.$off('studyCenter')
// uni.$off('studyCenter')
uni
.
$off
(
'ActivityCenter'
,
this
.
handleActivityCenter
);
uni
.
$off
(
'ActivityCenter'
,
this
.
handleActivityCenter
);
...
...
components/HomeFrame/components/SettingBox.vue
View file @
86aec38
<
template
>
<
template
>
<uni-popup
ref=
"popup"
border-radius=
"20px"
>
<uni-popup
ref=
"popup"
border-radius=
"20px"
>
<view
class=
"setting-box"
>
<view
class=
"setting-box"
>
<view
class=
"close flex"
@
click=
"close"
>
<view
<uni-icons
type=
"closeempty"
:size=
"18"
color=
"#1A1A1A"
></uni-icons>
class=
"close flex"
@
click=
"close"
>
<uni-icons
type=
"closeempty"
:size=
"18"
color=
"#1A1A1A"
></uni-icons>
</view>
</view>
<view
class=
"app-info flex"
>
<view
class=
"app-info flex"
>
<view
class=
"sprite-icon icon-logo"
></view>
<view
class=
"sprite-icon icon-logo"
></view>
展业助手
展业助手
<view
class=
"version"
>
版本号:V
{{
version
}}
</view>
<view
class=
"version"
>
版本号:V
{{
version
}}
</view>
<view
class=
"check-box"
@
click=
"handleCheck"
>
检查更新
</view>
<view
class=
"check-box"
@
click=
"handleCheck"
>
检查更新
</view>
</view>
</view>
<view
class=
"btn-box"
>
<view
class=
"btn-box"
>
<view
class=
"btn flex"
@
click=
"changeAccount"
>
切换账号
</view>
<view
<view
class=
"btn flex logout"
@
click=
"logout"
>
退出
</view>
class=
"btn flex"
@
click=
"changeAccount"
>
切换账号
</view>
<view
class=
"btn flex logout"
@
click=
"delAccount"
>
注销
</view>
<view
class=
"btn flex logout"
@
click=
"logout"
>
退出
</view>
</view>
</view>
<view
class=
"a"
@
click=
"jump('agreement')"
>
《用户隐私协议》
</view>
<view
<view
class=
"icp flex"
@
click=
"jump('icp')"
>
class=
"a"
@
click=
"jump('agreement')"
>
《隐私协议》
</view>
<view
class=
"icp flex"
@
click=
"jump('icp')"
>
ICP备案号:苏ICP备18023686号-2A
ICP备案号:苏ICP备18023686号-2A
<view
class=
"sprite-icon icon-arrow-right"
></view>
<view
class=
"sprite-icon icon-arrow-right"
></view>
</view>
</view>
<view
class=
"app-code flex"
>
<view
class=
"app-code flex"
>
APP编码:
{{
deviceId
}}
APP编码:
{{
deviceId
}}
<view
class=
"sprite-icon icon-clone"
@
click=
"copyText"
></view>
<view
class=
"sprite-icon icon-clone"
@
click=
"copyText"
></view>
</view>
</view>
</view>
</view>
</uni-popup>
</uni-popup>
...
@@ -32,13 +64,13 @@ import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update
...
@@ -32,13 +64,13 @@ import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update
import
utils
from
'@/utils/utils'
import
utils
from
'@/utils/utils'
export
default
{
export
default
{
name
:
'SettingBox'
,
name
:
'SettingBox'
,
data
()
{
data
()
{
return
{
return
{
version
:
''
,
version
:
''
,
deviceId
:
''
deviceId
:
''
}
}
},
},
mounted
()
{
mounted
()
{
this
.
version
=
plus
?.
runtime
?.
version
||
'1.0.0'
this
.
version
=
plus
?.
runtime
?.
version
||
'1.0.0'
const
{
const
{
deviceId
deviceId
...
@@ -46,10 +78,10 @@ export default {
...
@@ -46,10 +78,10 @@ export default {
this
.
deviceId
=
deviceId
this
.
deviceId
=
deviceId
},
},
methods
:
{
methods
:
{
copyText
()
{
copyText
()
{
uni
.
setClipboardData
({
uni
.
setClipboardData
({
data
:
this
.
deviceId
,
data
:
this
.
deviceId
,
success
:
function
()
{
success
:
function
()
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'复制成功'
,
title
:
'复制成功'
,
icon
:
'success'
icon
:
'success'
...
@@ -58,14 +90,14 @@ export default {
...
@@ -58,14 +90,14 @@ export default {
});
});
},
},
async
handleCheck
()
{
async
handleCheck
()
{
const
{
const
{
textList
,
textList
,
tempFileURL
,
tempFileURL
,
version
version
}
=
uni
.
$storage
.
get
(
'mock_data'
)
}
=
uni
.
$storage
.
get
(
'mock_data'
)
const
res
=
utils
.
compareVersions
(
this
.
version
,
version
)
const
res
=
utils
.
compareVersions
(
this
.
version
,
version
)
if
(
res
>
-
1
)
{
if
(
res
>
-
1
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'目前已是最新版本'
,
title
:
'目前已是最新版本'
,
duration
:
2000
,
duration
:
2000
,
...
@@ -88,25 +120,25 @@ export default {
...
@@ -88,25 +120,25 @@ export default {
}
}
checkUpdate
(
e
)
checkUpdate
(
e
)
},
},
open
()
{
open
()
{
this
.
$refs
.
popup
.
open
(
"center"
);
this
.
$refs
.
popup
.
open
(
"center"
);
},
},
close
()
{
close
()
{
this
.
$refs
.
popup
.
close
()
this
.
$refs
.
popup
.
close
()
},
},
changeAccount
()
{
changeAccount
()
{
uni
.
reLaunch
({
uni
.
reLaunch
({
url
:
'/pages/common/accountItems'
url
:
'/pages/common/accountItems'
})
})
},
},
// 退出
// 退出
logout
()
{
logout
()
{
let
_this
=
this
let
_this
=
this
uni
.
showModal
({
uni
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
content
:
'是否退出当前账号?'
,
content
:
'是否退出当前账号?'
,
confirmColor
:
'#347BFF'
,
confirmColor
:
'#347BFF'
,
async
success
(
res
)
{
async
success
(
res
)
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
// _this.$emit('stopAudio')
// _this.$emit('stopAudio')
try
{
try
{
...
@@ -143,12 +175,25 @@ export default {
...
@@ -143,12 +175,25 @@ export default {
}
}
})
})
},
},
jump
(
type
)
{
jump
(
type
)
{
let
url
=
type
==
'icp'
?
'https://beian.miit.gov.cn/'
:
let
url
=
type
==
'icp'
?
'https://beian.miit.gov.cn/'
:
'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/common/webview?url=
${
url
}
`
url
:
`/pages/common/webview?url=
${
url
}
`
})
})
},
delAccount
()
{
uni
.
showModal
({
title
:
'账号注销'
,
content
:
'注销申请将提交给企业管理员审核,审核通过后账号将无法登录。确认提交吗?'
,
confirmColor
:
'#347BFF'
,
success
(
res
)
{
if
(
res
.
confirm
)
uni
.
showToast
({
title
:
'申请已提交'
,
icon
:
"none"
,
});
}
})
}
}
}
}
}
}
...
...
components/HomeFrame/index.vue
View file @
86aec38
...
@@ -102,6 +102,7 @@
...
@@ -102,6 +102,7 @@
<StudyPopup
:show
.
sync=
"showStudyPermissionPopup"
title=
""
:width=
"848"
:height=
"870"
:topImage=
"require('@/assets/images/common/warning-notice.png')"
:topImageWidth=
"848"
:topImageHeight=
"248"
style=
"overflow: hidden"
>
<StudyPopup
:show
.
sync=
"showStudyPermissionPopup"
title=
""
:width=
"848"
:height=
"870"
:topImage=
"require('@/assets/images/common/warning-notice.png')"
:topImageWidth=
"848"
:topImageHeight=
"248"
style=
"overflow: hidden"
>
<StudyCenterPermissionPopup
:lockReason=
"lockReason"
@
confirm=
"handleStudyPermissionConfirm"
/>
<StudyCenterPermissionPopup
:lockReason=
"lockReason"
@
confirm=
"handleStudyPermissionConfirm"
/>
</StudyPopup>
</StudyPopup>
<activity-popup
ref=
"activityPopup"
></activity-popup>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
...
@@ -137,9 +138,35 @@ import StudyPopup from '@/components/StudyPopup.vue'
...
@@ -137,9 +138,35 @@ import StudyPopup from '@/components/StudyPopup.vue'
import
StudyPopupContent
from
'@/components/StudyPopupContent.vue'
import
StudyPopupContent
from
'@/components/StudyPopupContent.vue'
import
ExamSubmitPopup
from
'@/components/ExamSubmitPopup.vue'
import
ExamSubmitPopup
from
'@/components/ExamSubmitPopup.vue'
import
StudyCenterPermissionPopup
from
'@/components/StudyCenterPermissionPopup.vue'
import
StudyCenterPermissionPopup
from
'@/components/StudyCenterPermissionPopup.vue'
import
ActivityPopup
from
'./components/ActivityPopup.vue'
export
default
{
export
default
{
mixins
:
[
recorder
,
uploader
,
timeout
,
versionCheck
,
merge
,
interceptionMixin
],
mixins
:
[
recorder
,
uploader
,
timeout
,
versionCheck
,
merge
,
interceptionMixin
],
components
:
{
ReceptionCenter
,
StudyCenter
,
SceneMarket
,
LeftSide
,
Point
,
dayPoint
,
rulePoint
,
Course
,
Ranking
,
LevelPoint
,
Calendar
,
Promotion
,
History
,
LevelMedal
,
MessageDetail
,
SwiperComponent
,
MessageIndex
,
Entrance
,
StudyPopup
,
StudyPopupContent
,
ExamSubmitPopup
,
StudyCenterPermissionPopup
,
ActivityCenter
},
components
:
{
ReceptionCenter
,
StudyCenter
,
SceneMarket
,
LeftSide
,
Point
,
dayPoint
,
rulePoint
,
Course
,
Ranking
,
LevelPoint
,
Calendar
,
Promotion
,
History
,
LevelMedal
,
MessageDetail
,
SwiperComponent
,
MessageIndex
,
Entrance
,
StudyPopup
,
StudyPopupContent
,
ExamSubmitPopup
,
StudyCenterPermissionPopup
,
ActivityCenter
,
ActivityPopup
},
props
:
{
props
:
{
id
:
[
String
,
Number
],
id
:
[
String
,
Number
],
finishDoneText
:
String
,
finishDoneText
:
String
,
...
@@ -185,7 +212,8 @@ export default {
...
@@ -185,7 +212,8 @@ export default {
courseInfo
:
{
courseInfo
:
{
title
:
''
title
:
''
},
},
lockReason
:
0
lockReason
:
0
,
onShowCount
:
0
}
}
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
@@ -224,6 +252,18 @@ export default {
...
@@ -224,6 +252,18 @@ export default {
sceneType
()
{
sceneType
()
{
const
{
sceneType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
{
sceneType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
return
sceneType
return
sceneType
},
activityStatus
()
{
return
this
.
$store
.
getters
.
indexMessagePopupStatus
}
},
watch
:
{
activityStatus
:
{
handler
(
val
)
{
if
(
!
val
&&
this
.
onShowCount
)
this
.
getActivityMessage
(
0
)
},
immediate
:
true
,
deep
:
true
}
}
},
},
methods
:
{
methods
:
{
...
@@ -597,6 +637,20 @@ export default {
...
@@ -597,6 +637,20 @@ export default {
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/
${
pageName
}
/tool/index?componentName=
${
item
.
name
}
`
url
:
`/pages/
${
pageName
}
/tool/index?componentName=
${
item
.
name
}
`
})
})
},
async
getActivityMessage
(
count
=
1
)
{
try
{
this
.
onShowCount
=
count
if
(
this
.
activityStatus
)
return
const
{
sceneType
}
=
this
,
data
=
await
uni
.
$api
.
activityApi
.
getActivityMessagePopUpWindow
({
businessType
:
sceneType
})
this
.
onShowCount
=
0
if
(
data
)
this
.
$refs
.
activityPopup
.
open
(
data
)
}
catch
(
error
)
{
this
.
onShowCount
=
0
}
}
}
}
}
}
}
...
...
js_sdk/wa-permission/permission.js
View file @
86aec38
...
@@ -8,7 +8,7 @@ isIos = (plus.os.name == "iOS")
...
@@ -8,7 +8,7 @@ isIos = (plus.os.name == "iOS")
// #endif
// #endif
// 判断推送权限是否开启
// 判断推送权限是否开启
function
judgeIosPermissionPush
()
{
function
judgeIosPermissionPush
()
{
var
result
=
false
;
var
result
=
false
;
var
UIApplication
=
plus
.
ios
.
import
(
"UIApplication"
);
var
UIApplication
=
plus
.
ios
.
import
(
"UIApplication"
);
var
app
=
UIApplication
.
sharedApplication
();
var
app
=
UIApplication
.
sharedApplication
();
...
@@ -40,7 +40,7 @@ function judgeIosPermissionPush() {
...
@@ -40,7 +40,7 @@ function judgeIosPermissionPush() {
}
}
// 判断定位权限是否开启
// 判断定位权限是否开启
function
judgeIosPermissionLocation
()
{
function
judgeIosPermissionLocation
()
{
var
result
=
false
;
var
result
=
false
;
var
cllocationManger
=
plus
.
ios
.
import
(
"CLLocationManager"
);
var
cllocationManger
=
plus
.
ios
.
import
(
"CLLocationManager"
);
var
status
=
cllocationManger
.
authorizationStatus
();
var
status
=
cllocationManger
.
authorizationStatus
();
...
@@ -62,7 +62,7 @@ function judgeIosPermissionLocation() {
...
@@ -62,7 +62,7 @@ function judgeIosPermissionLocation() {
}
}
// 判断麦克风权限是否开启
// 判断麦克风权限是否开启
function
judgeIosPermissionRecord
()
{
function
judgeIosPermissionRecord
()
{
var
result
=
false
;
var
result
=
false
;
var
avaudiosession
=
plus
.
ios
.
import
(
"AVAudioSession"
);
var
avaudiosession
=
plus
.
ios
.
import
(
"AVAudioSession"
);
var
avaudio
=
avaudiosession
.
sharedInstance
();
var
avaudio
=
avaudiosession
.
sharedInstance
();
...
@@ -79,7 +79,7 @@ function judgeIosPermissionRecord() {
...
@@ -79,7 +79,7 @@ function judgeIosPermissionRecord() {
}
}
// 判断相机权限是否开启
// 判断相机权限是否开启
function
judgeIosPermissionCamera
()
{
function
judgeIosPermissionCamera
()
{
var
result
=
false
;
var
result
=
false
;
var
AVCaptureDevice
=
plus
.
ios
.
import
(
"AVCaptureDevice"
);
var
AVCaptureDevice
=
plus
.
ios
.
import
(
"AVCaptureDevice"
);
var
authStatus
=
AVCaptureDevice
.
authorizationStatusForMediaType
(
'vide'
);
var
authStatus
=
AVCaptureDevice
.
authorizationStatusForMediaType
(
'vide'
);
...
@@ -95,7 +95,7 @@ function judgeIosPermissionCamera() {
...
@@ -95,7 +95,7 @@ function judgeIosPermissionCamera() {
}
}
// 判断相册权限是否开启
// 判断相册权限是否开启
function
judgeIosPermissionPhotoLibrary
()
{
function
judgeIosPermissionPhotoLibrary
()
{
var
result
=
false
;
var
result
=
false
;
var
PHPhotoLibrary
=
plus
.
ios
.
import
(
"PHPhotoLibrary"
);
var
PHPhotoLibrary
=
plus
.
ios
.
import
(
"PHPhotoLibrary"
);
var
authStatus
=
PHPhotoLibrary
.
authorizationStatus
();
var
authStatus
=
PHPhotoLibrary
.
authorizationStatus
();
...
@@ -111,7 +111,7 @@ function judgeIosPermissionPhotoLibrary() {
...
@@ -111,7 +111,7 @@ function judgeIosPermissionPhotoLibrary() {
}
}
// 判断通讯录权限是否开启
// 判断通讯录权限是否开启
function
judgeIosPermissionContact
()
{
function
judgeIosPermissionContact
()
{
var
result
=
false
;
var
result
=
false
;
var
CNContactStore
=
plus
.
ios
.
import
(
"CNContactStore"
);
var
CNContactStore
=
plus
.
ios
.
import
(
"CNContactStore"
);
var
cnAuthStatus
=
CNContactStore
.
authorizationStatusForEntityType
(
0
);
var
cnAuthStatus
=
CNContactStore
.
authorizationStatusForEntityType
(
0
);
...
@@ -126,7 +126,7 @@ function judgeIosPermissionContact() {
...
@@ -126,7 +126,7 @@ function judgeIosPermissionContact() {
}
}
// 判断日历权限是否开启
// 判断日历权限是否开启
function
judgeIosPermissionCalendar
()
{
function
judgeIosPermissionCalendar
()
{
var
result
=
false
;
var
result
=
false
;
var
EKEventStore
=
plus
.
ios
.
import
(
"EKEventStore"
);
var
EKEventStore
=
plus
.
ios
.
import
(
"EKEventStore"
);
var
ekAuthStatus
=
EKEventStore
.
authorizationStatusForEntityType
(
0
);
var
ekAuthStatus
=
EKEventStore
.
authorizationStatusForEntityType
(
0
);
...
@@ -141,7 +141,7 @@ function judgeIosPermissionCalendar() {
...
@@ -141,7 +141,7 @@ function judgeIosPermissionCalendar() {
}
}
// 判断备忘录权限是否开启
// 判断备忘录权限是否开启
function
judgeIosPermissionMemo
()
{
function
judgeIosPermissionMemo
()
{
var
result
=
false
;
var
result
=
false
;
var
EKEventStore
=
plus
.
ios
.
import
(
"EKEventStore"
);
var
EKEventStore
=
plus
.
ios
.
import
(
"EKEventStore"
);
var
ekAuthStatus
=
EKEventStore
.
authorizationStatusForEntityType
(
1
);
var
ekAuthStatus
=
EKEventStore
.
authorizationStatusForEntityType
(
1
);
...
@@ -156,11 +156,35 @@ function judgeIosPermissionMemo() {
...
@@ -156,11 +156,35 @@ function judgeIosPermissionMemo() {
}
}
// Android权限查询
// Android权限查询
function
requestAndroidPermission
(
permissionID
)
{
function
requestAndroidPermission
(
permissionID
)
{
const
PermissionTips
=
{
[
'android.permission.RECORD_AUDIO'
]:
{
title
:
'麦克风(录音)'
,
content
:
'为了记录接待过程以保障服务质量及订单纠纷处理,展业助手需要申请您的麦克风(录音)权限。'
},
[
'android.permission.CAMERA'
]:
{
title
:
'相机'
,
content
:
'为了拍摄活动现场照片及客户购车凭证,展业助手需要申请您的相机权限。'
},
[
'android.permission.READ_EXTERNAL_STORAGE'
]:
{
title
:
'相册'
,
content
:
'为了上传活动现场照片及客户购车凭证,展业助手需要申请您的相册权限。'
}
}[
permissionID
]
||
{
title
:
permissionID
,
content
:
'请在permission。js中配置此权限。'
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
plus
.
android
.
checkPermission
(
permissionID
,
({
checkResult
})
=>
{
if
(
checkResult
==
-
1
)
uni
.
showModal
({
...
PermissionTips
,
showCancel
:
true
,
success
:
res
=>
{
if
(
res
.
confirm
)
{
plus
.
android
.
requestPermissions
(
plus
.
android
.
requestPermissions
(
[
permissionID
],
// 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
[
permissionID
],
// 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
function
(
resultObj
)
{
function
(
resultObj
)
{
var
result
=
0
;
var
result
=
0
;
for
(
var
i
=
0
;
i
<
resultObj
.
granted
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
resultObj
.
granted
.
length
;
i
++
)
{
var
grantedPermission
=
resultObj
.
granted
[
i
];
var
grantedPermission
=
resultObj
.
granted
[
i
];
...
@@ -183,7 +207,7 @@ function requestAndroidPermission(permissionID) {
...
@@ -183,7 +207,7 @@ function requestAndroidPermission(permissionID) {
// gotoAppPermissionSetting()
// gotoAppPermissionSetting()
// }
// }
},
},
function
(
error
)
{
function
(
error
)
{
console
.
log
(
'申请权限错误:'
+
error
.
code
+
" = "
+
error
.
message
);
console
.
log
(
'申请权限错误:'
+
error
.
code
+
" = "
+
error
.
message
);
resolve
({
resolve
({
code
:
error
.
code
,
code
:
error
.
code
,
...
@@ -191,11 +215,16 @@ function requestAndroidPermission(permissionID) {
...
@@ -191,11 +215,16 @@ function requestAndroidPermission(permissionID) {
});
});
}
}
);
);
}
}
})
else
resolve
(
1
)
})
});
});
}
}
// 使用一个方法,根据参数判断权限
// 使用一个方法,根据参数判断权限
function
judgeIosPermission
(
permissionID
)
{
function
judgeIosPermission
(
permissionID
)
{
if
(
permissionID
==
"location"
)
{
if
(
permissionID
==
"location"
)
{
return
judgeIosPermissionLocation
()
return
judgeIosPermissionLocation
()
}
else
if
(
permissionID
==
"camera"
)
{
}
else
if
(
permissionID
==
"camera"
)
{
...
@@ -217,7 +246,7 @@ function judgeIosPermission(permissionID) {
...
@@ -217,7 +246,7 @@ function judgeIosPermission(permissionID) {
}
}
// 跳转到**应用**的权限页面
// 跳转到**应用**的权限页面
function
gotoAppPermissionSetting
()
{
function
gotoAppPermissionSetting
()
{
if
(
isIos
)
{
if
(
isIos
)
{
var
UIApplication
=
plus
.
ios
.
import
(
"UIApplication"
);
var
UIApplication
=
plus
.
ios
.
import
(
"UIApplication"
);
var
application2
=
UIApplication
.
sharedApplication
();
var
application2
=
UIApplication
.
sharedApplication
();
...
@@ -245,7 +274,7 @@ function gotoAppPermissionSetting() {
...
@@ -245,7 +274,7 @@ function gotoAppPermissionSetting() {
// 检查系统的设备服务是否开启
// 检查系统的设备服务是否开启
// var checkSystemEnableLocation = async function () {
// var checkSystemEnableLocation = async function () {
function
checkSystemEnableLocation
()
{
function
checkSystemEnableLocation
()
{
if
(
isIos
)
{
if
(
isIos
)
{
var
result
=
false
;
var
result
=
false
;
var
cllocationManger
=
plus
.
ios
.
import
(
"CLLocationManager"
);
var
cllocationManger
=
plus
.
ios
.
import
(
"CLLocationManager"
);
...
...
manifest.json
View file @
86aec38
...
@@ -56,7 +56,10 @@
...
@@ -56,7 +56,10 @@
],
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
],
"targetSdkVersion"
:
30
,
"targetSdkVersion"
:
30
,
"minSdkVersion"
:
21
"minSdkVersion"
:
21
,
"excludePermissions"
:
[
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
]
},
},
/*
ios打包配置
*/
/*
ios打包配置
*/
"ios"
:
{
"ios"
:
{
...
@@ -73,7 +76,8 @@
...
@@ -73,7 +76,8 @@
"appkey_ios"
:
""
,
"appkey_ios"
:
""
,
"appkey_android"
:
"rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
"appkey_android"
:
"rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
}
}
}
},
"maps"
:
{}
},
},
"icons"
:
{
"icons"
:
{
"android"
:
{
"android"
:
{
...
...
pages/boutique/index.vue
View file @
86aec38
...
@@ -195,6 +195,7 @@ export default {
...
@@ -195,6 +195,7 @@ export default {
this
.
$refs
.
home
.
updateApp
(
true
)
this
.
$refs
.
home
.
updateApp
(
true
)
},
},
async
onShow
()
{
async
onShow
()
{
this
.
getActivityMessage
()
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"userInfo"
);
...
@@ -210,6 +211,10 @@ export default {
...
@@ -210,6 +211,10 @@ export default {
computed
:
{
computed
:
{
},
},
methods
:
{
methods
:
{
getActivityMessage
()
{
if
(
this
.
$refs
.
home
)
this
.
$refs
.
home
.
getActivityMessage
()
else
setTimeout
(
this
.
getActivityMessage
,
200
)
},
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
init
()
{
init
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
),
...
...
pages/common/login.vue
View file @
86aec38
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
:color=
"`${readingStatus ? '#2C66F7' : '#858A94'}`"
:color=
"`${readingStatus ? '#2C66F7' : '#858A94'}`"
></uni-icons>
></uni-icons>
我已阅读并同意
我已阅读并同意
<text
@
click
.
stop=
"jumpUrl()"
>
《
用户隐私协议》
</text>
<text
@
click
.
stop=
"jumpUrl()"
>
《
隐私协议》
</text>
</view>
</view>
<view
<view
class=
"autoLogin"
class=
"autoLogin"
...
@@ -104,7 +104,7 @@ export default {
...
@@ -104,7 +104,7 @@ export default {
code
:
''
,
code
:
''
,
count
:
''
,
count
:
''
,
noSignIn
:
true
,
noSignIn
:
true
,
readingStatus
:
true
,
readingStatus
:
false
,
dateKey
:
{
dateKey
:
{
mobile
:
0
,
mobile
:
0
,
code
:
0
code
:
0
...
@@ -206,7 +206,7 @@ export default {
...
@@ -206,7 +206,7 @@ export default {
if
(
!
mobile
)
throw
'请输入手机号'
if
(
!
mobile
)
throw
'请输入手机号'
if
(
!
phoneRex
.
test
(
mobile
))
throw
'请输入正确的手机号'
;
if
(
!
phoneRex
.
test
(
mobile
))
throw
'请输入正确的手机号'
;
if
(
!
smsCode
)
throw
'请输入验证码'
if
(
!
smsCode
)
throw
'请输入验证码'
if
(
!
readingStatus
)
throw
'请
阅读用户隐私协议'
if
(
!
readingStatus
)
throw
'请
您阅读并同意《隐私协议》'
let
params
=
{
let
params
=
{
mobile
,
mobile
,
code
:
smsCode
code
:
smsCode
...
...
pages/equity/index.vue
View file @
86aec38
...
@@ -93,6 +93,7 @@ export default {
...
@@ -93,6 +93,7 @@ export default {
this
.
$refs
.
home
.
updateApp
(
true
)
this
.
$refs
.
home
.
updateApp
(
true
)
},
},
async
onShow
()
{
async
onShow
()
{
this
.
getActivityMessage
()
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
'userInfo'
)
uni
.
$storage
.
rm
(
'userInfo'
)
...
@@ -105,6 +106,10 @@ export default {
...
@@ -105,6 +106,10 @@ export default {
this
.
init
()
this
.
init
()
},
},
methods
:
{
methods
:
{
getActivityMessage
()
{
if
(
this
.
$refs
.
home
)
this
.
$refs
.
home
.
getActivityMessage
()
else
setTimeout
(
this
.
getActivityMessage
,
200
)
},
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
]),
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
]),
init
()
{
init
()
{
this
.
findPayInfo
()
this
.
findPayInfo
()
...
...
store/getters.js
View file @
86aec38
...
@@ -9,5 +9,6 @@ export default {
...
@@ -9,5 +9,6 @@ export default {
receptionStatus
:
(
state
)
=>
state
.
audio
.
receptionStatus
,
receptionStatus
:
(
state
)
=>
state
.
audio
.
receptionStatus
,
booksList
:
(
state
)
=>
state
.
audio
.
booksList
,
booksList
:
(
state
)
=>
state
.
audio
.
booksList
,
receptionKey
:
(
state
)
=>
state
.
user
.
receptionKey
,
receptionKey
:
(
state
)
=>
state
.
user
.
receptionKey
,
customerKey
:
(
state
)
=>
state
.
user
.
customerKey
customerKey
:
(
state
)
=>
state
.
user
.
customerKey
,
indexMessagePopupStatus
:
(
state
)
=>
state
.
sys
.
indexMessagePopupStatus
,
};
};
store/modules/sys.js
View file @
86aec38
export
default
{
export
default
{
state
()
{
state
()
{
return
{
return
{
isInBackgound
:
false
isInBackgound
:
false
,
indexMessagePopupStatus
:
true
,
// 首页弹窗状态
}
}
},
},
mutations
:
{
mutations
:
{
SET_BACKGROUND_STATE
(
state
,
value
)
{
SET_BACKGROUND_STATE
(
state
,
value
)
{
state
.
isInBackgound
=
value
state
.
isInBackgound
=
value
},
SET_INDEX_MESSAGE_POPUP_STATUS
(
state
,
value
){
state
.
indexMessagePopupStatus
=
value
}
}
},
},
actions
:
{
actions
:
{
setBackgroundState
({
commit
},
value
)
{
setBackgroundState
({
commit
},
value
)
{
uni
.
$logger
.
local
.
info
(
`【====
${[
'切回'
,
'切出'
][
+
value
]}
====】 APP`
)
uni
.
$logger
.
local
.
info
(
`【====
${[
'切回'
,
'切出'
][
+
value
]}
====】 APP`
)
commit
(
'SET_BACKGROUND_STATE'
,
value
)
commit
(
'SET_BACKGROUND_STATE'
,
value
)
},
setIndexMessagePopupStatus
({
commit
},
value
){
commit
(
'SET_INDEX_MESSAGE_POPUP_STATUS'
,
value
)
}
}
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment