Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
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 e48f7a98
authored
Sep 27, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
插件
1 parent
0ae0d32d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
97 deletions
app.json
packagePlugin/pages/index/index.js
packagePlugin/pages/index/index.wxml
packageSaveMoney/pages/chargeDetail/chargeDetail.js
packageSaveMoney/pages/detail/detail.js
app.json
View file @
e48f7a9
...
...
@@ -112,7 +112,18 @@
"pages/index/index"
],
"plugins"
:
{
"ticketPlugin"
:
{
"version"
:
"2.0.2"
,
"provider"
:
"wxd5b8312c3a09901a"
},
"express-plugin"
:
{
"version"
:
"1.2.0"
,
"provider"
:
"wx1b1f66316b427c74"
},
"collectionPlugin"
:
{
"version"
:
"1.2.0"
,
"provider"
:
"wx5e90fdd843841356"
}
}
},
{
...
...
packagePlugin/pages/index/index.js
View file @
e48f7a9
// Page({
// data: {
// list: [{
// id: 1,
// }, {
// id: 2,
// }, {
// id: 3,
// }, {
// id: 4,
// }, {
// id: 5,
// },]
// },
Page
({
// onLoad(options) {
data
:
{
list
:
[{
id
:
1
,
},
{
id
:
2
,
},
{
id
:
3
,
},
{
id
:
4
,
},
{
id
:
5
,
},]
},
// },
// toJump(e) {
// const { id } = e.currentTarget.dataset
// let url = ''
// const shareCode = '5759S2m7h'
// switch (id) {
// case 1:
// url = `plugin://collectionPlugin/sbkHome?shareCode=${shareCode}&userId=ooPYo45el_GJ55vqhdME5-tqQmaw`
// break;
// case 2:
// url = `plugin://collectionPlugin/sbkHome?shareCode=${shareCode}`
// break;
// case 3:
// url = `plugin://collectionPlugin/naixueHome?shareCode=${shareCode}`
// break;
// case 4:
// url = `plugin://ticketPlugin/home?shareCode=${shareCode}&reLocation=true`
// break;
// case 5:
// url = `plugin://express-plugin/home?shareCode=${shareCode}`
// break;
// default:
// break;
// }
// wx.navigateTo({
// url,
// })
// }
onLoad
(
options
)
{
// })
const
BRAND_ENUM
=
{
1
:
{
name
:
"肯德基"
,
link
:
"plugin://collectionPlugin/kfcHome"
},
2
:
{
name
:
"星巴克"
,
link
:
"plugin://collectionPlugin/sbkHome"
},
3
:
{
name
:
"电影票"
,
link
:
"plugin://ticketPlugin/home"
}
}
Page
({
/**
* 页面的初始数据
*/
data
:
{
BRAND_ENUM
},
/**
* 跳转插件
*/
testJump
()
{
wx
.
navigateTo
({
url
:
'plugin://collectionPlugin/sbkHome?shareCode=5759S2m7h'
,
})
},
/**
* 测试循环跳转插件
*/
testLoopJump
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
toJump
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
let
url
=
''
const
shareCode
=
'5759S2m7h'
switch
(
id
)
{
case
1
:
url
=
`plugin://collectionPlugin/sbkHome?shareCode=
${
shareCode
}
&userId=ooPYo45el_GJ55vqhdME5-tqQmaw`
break
;
case
2
:
url
=
`plugin://collectionPlugin/sbkHome?shareCode=
${
shareCode
}
`
break
;
case
3
:
url
=
`plugin://collectionPlugin/naixueHome?shareCode=
${
shareCode
}
`
break
;
case
4
:
url
=
`plugin://ticketPlugin/home?shareCode=
${
shareCode
}
&reLocation=true`
break
;
case
5
:
url
=
`plugin://express-plugin/home?shareCode=
${
shareCode
}
`
break
;
default
:
break
;
}
wx
.
navigateTo
({
url
:
`
${
item
.
link
}
?shareCode=5759S2m7h`
,
url
,
})
}
})
\ No newline at end of file
})
packagePlugin/pages/index/index.wxml
View file @
e48f7a9
<
!-- <
view class="container">
<view class="container">
<block wx:for="{{list}}" wx:key="index">
<glsx-image bind:tap="toJump" data-id="{{item.id}}" class="cover" webp src="equity/plugin/equity_plugin_{{index}}.png"></glsx-image>
</block>
</view> -->
<view>
<button bindtap="testJump">点击跳转插件页面</button>
-------------------------------------------------------------
<view>
<view wx:for="{{BRAND_ENUM}}">
<button bindtap="testLoopJump" data-item="{{item}}">{{item.name}}</button>
</view>
</view>
</view>
<glsx-privacy appletName="车生活助手"></glsx-privacy>
\ No newline at end of file
packageSaveMoney/pages/chargeDetail/chargeDetail.js
View file @
e48f7a9
import
{
IMG_URL
}
from
'~/config'
;
Page
({
data
:
{
IMGURL
:
IMG_URL
,
curIndex
:
0
,
checkedItem
:
0
,
isOpen
:
false
,
...
...
packageSaveMoney/pages/detail/detail.js
View file @
e48f7a9
const
baseUrl
=
'https://img02.glsx.com.cn/weapp/resource/equity-h5-new/mini/'
import
{
IMG_URL
}
from
'~/config'
;
Page
({
data
:
{
imageURL
:
baseUrl
,
IMGURL
:
IMG_URL
,
isOpen
:
false
,
isHaveInventory
:
true
,
goodsList
:
[],
...
...
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