Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
d6e3c4c4
Commit
d6e3c4c4
authored
Aug 29, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 非常用地提示
parent
cff7e169
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
27 deletions
+51
-27
src/main.js
+19
-19
src/pages/login/index.vue
+32
-8
No files found.
src/main.js
View file @
d6e3c4c4
...
@@ -50,25 +50,25 @@ mpAnalytics.init({
...
@@ -50,25 +50,25 @@ mpAnalytics.init({
Vue
.
prototype
.
$mpAnalytics
=
mpAnalytics
;
Vue
.
prototype
.
$mpAnalytics
=
mpAnalytics
;
// 神策埋点
// 神策埋点
let
sensors
=
require
(
'../node_modules/sa-sdk-miniprogram/sensorsdata.min.js'
);
//
let sensors = require('../node_modules/sa-sdk-miniprogram/sensorsdata.min.js');
sensors
.
setPara
({
//
sensors.setPara({
name
:
'sensors'
,
//
name: 'sensors',
server_url
:
process
.
env
.
CLK_LOG_URL
,
//
server_url: process.env.CLK_LOG_URL,
// 全埋点控制开关
//
// 全埋点控制开关
autoTrack
:
{
//
autoTrack: {
appLaunch
:
true
,
// 默认为 true,false 则关闭 $MPLaunch 事件采集
//
appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow
:
true
,
// 默认为 true,false 则关闭 $MPShow 事件采集
//
appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集
appHide
:
true
,
// 默认为 true,false 则关闭 $MPHide 事件采集
//
appHide: true, // 默认为 true,false 则关闭 $MPHide 事件采集
pageShow
:
true
,
// 默认为 true,false 则关闭 $MPViewScreen 事件采集
//
pageShow: true, // 默认为 true,false 则关闭 $MPViewScreen 事件采集
pageShare
:
true
,
// 默认为 true,false 则关闭 $MPShare 事件采集
//
pageShare: true, // 默认为 true,false 则关闭 $MPShare 事件采集
mpClick
:
true
,
// 默认为 false,true 则开启 $MPClick 事件采集
//
mpClick: true, // 默认为 false,true 则开启 $MPClick 事件采集
mpFavorite
:
true
,
// 默认为 true,false 则关闭 $MPAddFavorites 事件采集
//
mpFavorite: true, // 默认为 true,false 则关闭 $MPAddFavorites 事件采集
pageLeave
:
true
,
// 默认为 false, true 则开启 $MPPageLeave事件采集
//
pageLeave: true, // 默认为 false, true 则开启 $MPPageLeave事件采集
},
//
},
show_log
:
true
//
show_log: true
});
//
});
sensors
.
init
();
//
sensors.init();
Vue
.
prototype
.
$sensors
=
sensors
;
Vue
.
prototype
.
$sensors
=
""
;
const
app
=
new
Vue
(
App
)
const
app
=
new
Vue
(
App
)
...
...
src/pages/login/index.vue
View file @
d6e3c4c4
...
@@ -891,6 +891,7 @@ export default {
...
@@ -891,6 +891,7 @@ export default {
loginIn
(
a
)
{
loginIn
(
a
)
{
let
val
=
a
.
val
;
let
val
=
a
.
val
;
let
loginType
=
a
.
type
;
let
loginType
=
a
.
type
;
let
_this
=
this
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"enterpriseAccount"
,
key
:
"enterpriseAccount"
,
data
:
""
data
:
""
...
@@ -922,21 +923,44 @@ export default {
...
@@ -922,21 +923,44 @@ export default {
.
then
(
res
=>
{
.
then
(
res
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
sessionId
=
res
.
data
.
data
.
sessionId
||
''
;
if
(
res
.
data
.
data
.
isCommonlyUsedLocationLogin
==
'false'
)
{
this
.
backParams
+=
`&sessionid=
${
wx
.
showModal
({
content
:
`当前账号处于非常用地`
,
confirmText
:
"确认"
,
cancelText
:
"取消"
,
showCancel
:
false
,
success
:
function
(
res
)
{
console
.
log
(
res
);
//点击“确认”时打开设置页面
if
(
res
.
confirm
)
{
console
.
log
(
"用户点击确认"
);
login
();
}
else
{
console
.
log
(
"用户点击取消"
);
login
();
}
}
});
}
else
{
login
();
}
let
login
=
()
=>
{
_this
.
sessionId
=
res
.
data
.
data
.
sessionId
||
''
;
_this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
_
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
console
.
log
(
this
.
mpApp
.
globalData
.
shopInfo
,
"------------------
this.mpApp.globalData.shopInfo"
)
console
.
log
(
_this
.
mpApp
.
globalData
.
shopInfo
,
"------------------_
this.mpApp.globalData.shopInfo"
)
if
(
this
.
whetherOpenEnterprisesWantGoods
==
1
&&
res
.
data
.
data
.
masterAccount
&&
res
.
data
.
data
.
masterAccount
.
length
>
0
){
if
(
_
this
.
whetherOpenEnterprisesWantGoods
==
1
&&
res
.
data
.
data
.
masterAccount
&&
res
.
data
.
data
.
masterAccount
.
length
>
0
){
this
.
selectEnterpriseAccountOpenType
=
0
;
_
this
.
selectEnterpriseAccountOpenType
=
0
;
this
.
$refs
.
SelectEnterpriseAccount
.
open
(
res
.
data
.
data
.
masterAccount
);
_
this
.
$refs
.
SelectEnterpriseAccount
.
open
(
res
.
data
.
data
.
masterAccount
);
}
else
{
}
else
{
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
data
:
res
.
data
.
data
.
sessionId
data
:
res
.
data
.
data
.
sessionId
});
});
this
.
pushPageType
();
_this
.
pushPageType
();
}
}
}
}
else
{
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
})
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
})
...
...
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