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 d930c51f
authored
Oct 21, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
禁用分享
1 parent
298fb4e6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
app.js
pages/newEnergy/newEnergy.js
pages/newEnergy/newEnergy.wxml
pages/newEnergy/newEnergy.wxss
app.js
View file @
d930c51
...
@@ -17,6 +17,7 @@ App({
...
@@ -17,6 +17,7 @@ App({
wx
.
$imgUrl
=
'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
wx
.
$imgUrl
=
'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
wx
.
$appId
=
wx
.
getAccountInfoSync
().
miniProgram
.
appId
wx
.
$appId
=
wx
.
getAccountInfoSync
().
miniProgram
.
appId
const
systemInfo
=
wx
.
getStorageSync
(
'aicard_system_info'
)
const
systemInfo
=
wx
.
getStorageSync
(
'aicard_system_info'
)
wx
.
firstVisiter
=
false
if
(
!
systemInfo
)
wx
.
getSystemInfo
({
if
(
!
systemInfo
)
wx
.
getSystemInfo
({
success
(
res
)
{
success
(
res
)
{
util
.
setStorageSync
(
'aicard_system_info'
,
res
)
util
.
setStorageSync
(
'aicard_system_info'
,
res
)
...
@@ -47,7 +48,7 @@ App({
...
@@ -47,7 +48,7 @@ App({
openId
=
wechatInfo
.
openId
openId
=
wechatInfo
.
openId
// util.setStorageSync('openId', openId)
// util.setStorageSync('openId', openId)
console
.
log
(
wx
.
$trackData
)
console
.
log
(
wx
.
$trackData
)
if
(
wx
.
$trackData
.
scene
)
{
if
(
wx
.
$trackData
.
scene
&&
!
wx
.
firstVisiter
)
{
// 初次进入小程序默认埋首页
// 初次进入小程序默认埋首页
_this
.
getScene
(
wx
.
$trackData
.
scene
).
then
(
res
=>
{
_this
.
getScene
(
wx
.
$trackData
.
scene
).
then
(
res
=>
{
wx
.
$trackData
.
merchant
=
res
.
merchantId
wx
.
$trackData
.
merchant
=
res
.
merchantId
...
@@ -57,6 +58,7 @@ App({
...
@@ -57,6 +58,7 @@ App({
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'aicard_system_info'
))
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'aicard_system_info'
))
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
wechatInfo
)
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
,
wechatInfo
)
wx
.
firstVisiter
=
true
})
})
}
else
if
(
wx
.
$trackData
.
detailShare
)
{
}
else
if
(
wx
.
$trackData
.
detailShare
)
{
// d+产品分享在这里设置埋点
// d+产品分享在这里设置埋点
...
...
pages/newEnergy/newEnergy.js
View file @
d930c51
...
@@ -18,7 +18,9 @@ Page({
...
@@ -18,7 +18,9 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
wx
.
hideShareMenu
({
menus
:
[
'shareAppMessage'
,
'shareTimeline'
]
})
},
},
/**
/**
...
@@ -77,11 +79,5 @@ Page({
...
@@ -77,11 +79,5 @@ Page({
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{
onShareAppMessage
()
{
return
{
title
:
trackData
.
NEWENERGY
.
pageName
,
path
:
"pages/newEnergy/newEnergy?cardId="
+
util
.
getStorageSync
(
"scene"
).
cardId
+
"&merchant="
+
util
.
getStorageSync
(
"scene"
).
merchantId
+
'&detailShare='
+
trackData
.
NEWENERGY
.
pageName
};
}
}
})
})
\ No newline at end of file
\ No newline at end of file
pages/newEnergy/newEnergy.wxml
View file @
d930c51
<!--pages/newEnergy/newEnergy.wxml-->
<!--pages/newEnergy/newEnergy.wxml-->
<view class="wrapper-bg">
<view class="wrapper-bg">
<image class="newenergy-img" mode="widthFix" webp src="{{IMGURL}}home/newenergy1.png?v={{img_version}}"></image>
<image class="newenergy-img
newenergy-img1
" mode="widthFix" webp src="{{IMGURL}}home/newenergy1.png?v={{img_version}}"></image>
<image class="newenergy-img" mode="widthFix" webp src="{{IMGURL}}home/newenergy2.png?v={{img_version}}"></image>
<image class="newenergy-img
newenergy-img2
" mode="widthFix" webp src="{{IMGURL}}home/newenergy2.png?v={{img_version}}"></image>
<image class="newenergy-img" mode="widthFix" webp src="{{IMGURL}}home/newenergy3.png?v={{img_version}}"></image>
<image class="newenergy-img
newenergy-img3
" mode="widthFix" webp src="{{IMGURL}}home/newenergy3.png?v={{img_version}}"></image>
</view>
</view>
<button bindtap="toSuccess">提交</button>
\ No newline at end of file
\ No newline at end of file
<!-- <button bindtap="toSuccess">提交</button> -->
\ No newline at end of file
\ No newline at end of file
pages/newEnergy/newEnergy.wxss
View file @
d930c51
...
@@ -7,3 +7,12 @@
...
@@ -7,3 +7,12 @@
width: 100%;
width: 100%;
margin-top: 24rpx;
margin-top: 24rpx;
}
}
.newenergy-img1 {
height: 816rpx;
}
.newenergy-img2 {
height: 1696rpx;
}
.newenergy-img3 {
height: 1092rpx;
}
\ No newline at end of file
\ No newline at end of file
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