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 b080a672
authored
Sep 25, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加
1 parent
27ec1eeb
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
109 additions
and
59 deletions
api/env/index.js
api/module/index.js
api/module/strategy.js
app.json
packageStrategy/pages/strategyDetail/index.js
packageStrategy/pages/strategyDetail/index.json
packageStrategy/pages/strategyDetail/index.wxml
packageStrategy/pages/strategyDetail/index.wxss
pages/tab/strategy/index.js
pages/tab/strategy/index.wxml
api/env/index.js
View file @
b080a67
import
{
preReleaseAppId
}
from
'~/config'
import
{
preReleaseAppId
}
from
'~/config'
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
let
index
=
2
let
index
=
1
/**
/**
*
*
...
...
api/module/index.js
View file @
b080a67
...
@@ -9,6 +9,7 @@ import couponsApi from './coupons'
...
@@ -9,6 +9,7 @@ import couponsApi from './coupons'
import
equityApi
from
'./equity'
import
equityApi
from
'./equity'
import
common
from
'./common'
import
common
from
'./common'
import
entmicroApi
from
'./entmicro'
import
entmicroApi
from
'./entmicro'
import
strategyApi
from
'./strategy'
module
.
exports
=
{
module
.
exports
=
{
wechatApi
,
wechatApi
,
...
@@ -21,5 +22,6 @@ module.exports = {
...
@@ -21,5 +22,6 @@ module.exports = {
couponsApi
,
couponsApi
,
equityApi
,
equityApi
,
common
,
common
,
entmicroApi
entmicroApi
,
strategyApi
}
}
\ No newline at end of file
\ No newline at end of file
api/module/strategy.js
0 → 100644
View file @
b080a67
import
api
from
'../request/http'
module
.
exports
=
{
// 查询攻略列表
getStrategyList
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.shopmall.strategy.list'
,
...
data
})
},
// 查询攻略详情
getStrategyDetail
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.shopmall.strategy.detail'
,
...
data
})
},
}
\ No newline at end of file
\ No newline at end of file
app.json
View file @
b080a67
...
@@ -102,6 +102,12 @@
...
@@ -102,6 +102,12 @@
"pages/pay/index"
,
"pages/pay/index"
,
"pages/PayResult/payResult"
"pages/PayResult/payResult"
]
]
},
{
"root"
:
"packageStrategy"
,
"pages"
:
[
"pages/strategyDetail/index"
]
}
}
],
],
"usingComponents"
:
{
"usingComponents"
:
{
...
...
packageStrategy/pages/strategyDetail/index.js
0 → 100644
View file @
b080a67
Page
({
data
:
{
strategyDetailObj
:
{},
},
onLoad
(
options
)
{
this
.
getStrategyDetail
(
options
.
id
);
},
getStrategyDetail
(
id
)
{
wx
.
p
.
api
.
strategyApi
.
getStrategyDetail
({
id
,
})
.
then
((
res
)
=>
{
this
.
setData
({
strategyDetailObj
:
res
,
});
});
},
});
packageStrategy/pages/strategyDetail/index.json
0 → 100644
View file @
b080a67
{}
\ No newline at end of file
\ No newline at end of file
packageStrategy/pages/strategyDetail/index.wxml
0 → 100644
View file @
b080a67
<view class="strategy-detail-box">
<view class="strategy-detail-title">{{strategyDetailObj.strategyName}}</view>
<view class="strategy-detail-view">{{strategyDetailObj.viewAmount}}人浏览</view>
<image webp src="{{item.strategyImg}}" class="strategy-img"></image>
<view class="">{{strategyDetailObj.content}}</view>
</view>
\ No newline at end of file
\ No newline at end of file
packageStrategy/pages/strategyDetail/index.wxss
0 → 100644
View file @
b080a67
.strategy-detail-box {
height: 100vh;
background: #FFFFFF;
padding: 30rpx 40rpx;
box-sizing: border-box;
}
.strategy-detail-title {
font-weight: 600;
font-size: 48rpx;
color: #333333;
letter-spacing: 2rpx;
}
.strategy-detail-view {
font-weight: 400;
font-size: 32rpx;
color: #999999;
}
.strategy-img {
width: 670rpx;
height: 376rpx;
border-radius: 16rpx;
-webkit-border-radius: 16rpx;
-moz-border-radius: 16rpx;
-ms-border-radius: 16rpx;
-o-border-radius: 16rpx;
}
\ No newline at end of file
\ No newline at end of file
pages/tab/strategy/index.js
View file @
b080a67
// pages/tab/select/index.js
// pages/tab/select/index.js
import
{
strategyList
}
from
'./constant/constant'
// import { strategyList } from "./constant/constant";
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
strategyList
strategyList
:
[],
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
getStrategyList
();
},
},
getStrategyList
()
{
/**
wx
.
p
.
api
.
strategyApi
.
getStrategyList
({
* 生命周期函数--监听页面初次渲染完成
pageNum
:
1
,
*/
pageSize
:
100
onReady
()
{
}).
then
(
res
=>
{
console
.
log
(
res
);
},
this
.
setData
({
strategyList
:
res
.
list
/**
})
* 生命周期函数--监听页面显示
});
*/
},
onShow
()
{
selectStrategy
(
e
)
{
console
.
log
(
e
);
},
const
{
id
}
=
e
.
currentTarget
.
dataset
.
item
wx
.
p
.
router
.
go
(
'/packageStrategy/pages/strategyDetail/index'
,
{
/**
id
* 生命周期函数--监听页面隐藏
})
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
}
})
\ No newline at end of file
\ No newline at end of file
});
pages/tab/strategy/index.wxml
View file @
b080a67
<view class="strategy-box">
<view class="strategy-box">
<view class="strategy-item" wx:for="{{strategyList}}" wx:key="index" data-item="{{item}}" bind:tap="selectStrategy">
<view class="strategy-item" wx:for="{{strategyList}}" wx:key="index" data-item="{{item}}" bind:tap="selectStrategy">
<
glsx-image webp src="strategy/{{item.url}}" class="strategy-img"></glsx-
image>
<
image webp src="{{item.strategyImg}}" class="strategy-img"></
image>
<view class="strategy-detail">
<view class="strategy-detail">
<text class="strategy-detail-title">{{item.
n
ame}}</text>
<text class="strategy-detail-title">{{item.
strategyN
ame}}</text>
<view class="strategy-detail-bottom">
<view class="strategy-detail-bottom">
<view class="tag">{{item.tagName}}</view>
<view class="tag">{{item.tagName}}</view>
<view class="viewer">{{item.view
er
}}人浏览</view>
<view class="viewer">{{item.view
Amount
}}人浏览</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
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