Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e963813d
authored
Nov 24, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
cca4463b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
39 deletions
api/environment.js
app.js
project.config.json
project.private.config.json
api/environment.js
View file @
e963813
...
...
@@ -7,7 +7,7 @@ const target = ["ip", "dev", "uat", "beta", "prod"];
3预发布
4生产
*/
const
index
=
2
;
const
index
=
3
;
const
secretKey
=
{
ip
:
{},
dev
:
{
...
...
app.js
View file @
e963813
...
...
@@ -71,46 +71,48 @@ App({
merchant
:
res
.
merchantId
,
cardId
:
res
.
cardId
})
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
wechatInfo
)
_this
.
getUserInfo
(
openId
,
returnResponse
).
then
(
result
=>
{
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
wechatInfo
)
resolve
(
result
)
})
})
// } else if (wx.$trackData.isShare) {
// wx.$storage.set('scene', wx.$trackData)
// } else if (!wx.$trackData.detailShare && wx.$trackData.cardId) {
// // 名片分享在这里设置埋点
// wx.$storage.set('scene', wx.$trackData)
// wx.$Track.sendTrack(trackData.COMPANY, wechatInfo)
}
else
if
(
wx
.
$trackData
.
shareType
)
{
// 其他的分享进来的页面走这里,在进页面的onshow中需对wx.$trackData先赋值
const
shareType
=
wx
.
$trackData
.
shareType
switch
(
shareType
)
{
case
'SHARE_HOME'
:
// 名片分享在这里设置埋点
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
wechatInfo
)
break
case
'SHARE_D'
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
break
default
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
}
}
ssoApi
.
getUserInfo
({
openId
})
.
then
(
result
=>
{
if
(
returnResponse
)
{
resolve
(
result
)
}
else
{
if
(
result
.
code
==
0
)
{
util
.
setUserInfo
(
result
.
data
)
}
else
{
util
.
showToast
(
result
.
message
||
'网络异常'
)
}
resolve
(
result
)
_this
.
getUserInfo
(
openId
,
returnResponse
).
then
(
result
=>
{
switch
(
shareType
)
{
case
'SHARE_HOME'
:
// 名片分享在这里设置埋点
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
wechatInfo
)
break
case
'SHARE_D'
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
break
default
:
wx
.
$storage
.
set
(
'scene'
,
wx
.
$trackData
)
}
resolve
(
result
)
})
}
// ssoApi
// .getUserInfo({
// openId
// })
// .then(result => {
// if (returnResponse) {
// resolve(result)
// } else {
// if (result.code == 0) {
// util.setUserInfo(result.data)
// } else {
// util.showToast(result.message || '网络异常')
// }
// resolve(result)
// }
// })
})
.
catch
(()
=>
{
wx
.
$authStatus
=
true
...
...
@@ -120,6 +122,27 @@ App({
})
})
},
getUserInfo
(
openId
,
returnResponse
)
{
console
.
log
(
'openId'
,
openId
)
return
new
Promise
((
resolve
)
=>
{
ssoApi
.
getUserInfo
({
openId
})
.
then
(
result
=>
{
if
(
returnResponse
)
{
resolve
(
result
)
}
else
{
if
(
result
.
code
==
0
)
{
util
.
setUserInfo
(
result
.
data
)
}
else
{
util
.
showToast
(
result
.
message
||
'网络异常'
)
}
resolve
(
result
)
}
})
})
},
getScene
(
scene
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wechatApi
...
...
project.config.json
View file @
e963813
...
...
@@ -39,14 +39,14 @@
"disableUseStrict"
:
false
,
"minifyWXML"
:
true
,
"showES6CompileOption"
:
false
,
"ignoreUploadUnusedFiles"
:
fals
e
,
"ignoreUploadUnusedFiles"
:
tru
e
,
"useCompilerPlugins"
:
[
"sass"
]
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.25.4"
,
"appid"
:
"wx
1bd947039419e6ce
"
,
"appid"
:
"wx
cf971cf4ada61d8b
"
,
"projectname"
:
"%E5%B9%BF%E8%81%94%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%A8%A1%E7%89%88"
,
"simulatorType"
:
"wechat"
,
"simulatorPluginLibVersion"
:
{},
...
...
project.private.config.json
View file @
e963813
...
...
@@ -43,7 +43,7 @@
{
"name"
:
""
,
"pathName"
:
"pages/tab/index/index"
,
"query"
:
"scene=sceneId%3D
3275
"
,
"query"
:
"scene=sceneId%3D
406
"
,
"launchMode"
:
"default"
,
"scene"
:
null
},
...
...
@@ -178,7 +178,8 @@
},
"setting"
:
{
"urlCheck"
:
false
,
"compileHotReLoad"
:
false
"compileHotReLoad"
:
false
,
"autoAudits"
:
true
},
"libVersion"
:
"2.26.1"
,
"projectname"
:
"ai-card"
...
...
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