Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
X
xundao
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoyao
xundao
Commits
1473f1ea
Commit
1473f1ea
authored
Nov 18, 2022
by
xiaochenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 广告
parent
a74a404f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
17 deletions
+46
-17
pages/index/index.js
pages/index/index.js
+19
-0
pages/index/index.wxml
pages/index/index.wxml
+3
-1
project.config.json
project.config.json
+24
-16
No files found.
pages/index/index.js
View file @
1473f1ea
...
@@ -14,6 +14,25 @@ Page({
...
@@ -14,6 +14,25 @@ Page({
onLoad
()
{
onLoad
()
{
this
.
echart
=
this
.
selectComponent
(
'
#mychart
'
);
this
.
echart
=
this
.
selectComponent
(
'
#mychart
'
);
// 在页面中定义插屏广告
let
interstitialAd
=
null
// 在页面onLoad回调事件中创建插屏广告实例
if
(
wx
.
createInterstitialAd
)
{
interstitialAd
=
wx
.
createInterstitialAd
({
adUnitId
:
'
adunit-a4fab2c7a6cb6510
'
})
interstitialAd
.
onLoad
(()
=>
{})
interstitialAd
.
onError
((
err
)
=>
{})
interstitialAd
.
onClose
(()
=>
{})
}
// 在适合的场景显示插屏广告
if
(
interstitialAd
)
{
interstitialAd
.
show
().
catch
((
err
)
=>
{
console
.
error
(
err
)
})
}
},
},
handleDate
(
e
)
{
handleDate
(
e
)
{
...
...
pages/index/index.wxml
View file @
1473f1ea
...
@@ -17,5 +17,7 @@
...
@@ -17,5 +17,7 @@
</view>
</view>
</view>
</view>
<button type="primary" class="button" bind:tap="handleScle">计算八字</button>
<button type="primary" class="button" bind:tap="handleScle">计算八字</button>
<view style="position: absolute; bottom: 0;width: 100%;">
<ad unit-id="adunit-5d509a2d2926ec2a"></ad>
</view>
</view>
</view>
\ No newline at end of file
project.config.json
View file @
1473f1ea
...
@@ -4,34 +4,42 @@
...
@@ -4,34 +4,42 @@
"ignore"
:
[]
"ignore"
:
[]
},
},
"setting"
:
{
"setting"
:
{
"bundle"
:
false
,
"userConfirmedBundleSwitch"
:
false
,
"urlCheck"
:
true
,
"urlCheck"
:
true
,
"scopeDataCheck"
:
false
,
"coverView"
:
true
,
"es6"
:
true
,
"es6"
:
true
,
"enhance"
:
true
,
"postcss"
:
true
,
"postcss"
:
true
,
"compileHotReLoad"
:
true
,
"lazyloadPlaceholderEnable"
:
false
,
"preloadBackgroundData"
:
false
,
"preloadBackgroundData"
:
false
,
"minified"
:
true
,
"minified"
:
true
,
"autoAudits"
:
false
,
"newFeature"
:
false
,
"newFeature"
:
false
,
"uglifyFileName"
:
false
,
"coverView"
:
true
,
"uploadWithSourceMap"
:
true
,
"useIsolateContext"
:
true
,
"nodeModules"
:
false
,
"nodeModules"
:
false
,
"enhance"
:
true
,
"autoAudits"
:
false
,
"useMultiFrameRuntime"
:
true
,
"useApiHook"
:
true
,
"useApiHostProcess"
:
true
,
"showShadowRootInWxmlPanel"
:
true
,
"showShadowRootInWxmlPanel"
:
true
,
"scopeDataCheck"
:
false
,
"uglifyFileName"
:
false
,
"checkInvalidKey"
:
true
,
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
true
,
"lazyloadPlaceholderEnable"
:
false
,
"useMultiFrameRuntime"
:
false
,
"useApiHook"
:
false
,
"useApiHostProcess"
:
false
,
"babelSetting"
:
{
"ignore"
:
[],
"disablePlugins"
:
[],
"outputPath"
:
""
},
"useIsolateContext"
:
false
,
"userConfirmedBundleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmManually"
:
false
,
"enableEngineNative"
:
false
,
"packNpmRelationList"
:
[],
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
,
"minifyWXSS"
:
true
,
"disableUseStrict"
:
false
,
"minifyWXML"
:
true
,
"showES6CompileOption"
:
false
,
"showES6CompileOption"
:
false
,
"minifyWXML"
:
true
"useCompilerPlugins"
:
false
,
"ignoreUploadUnusedFiles"
:
true
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.19.4"
,
"libVersion"
:
"2.19.4"
,
...
...
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