完成首页任务接口联调暂存

This commit is contained in:
Dragon
2024-02-04 11:17:22 +08:00
parent ff64c396ec
commit 4b0993dee3
4 changed files with 60 additions and 42 deletions

View File

@@ -1363,7 +1363,8 @@ body {
position: fixed; position: fixed;
width: 10rem; width: 10rem;
height: 2.2rem; height: 2.2rem;
left: 0; left: 50%;
transform: translateX(-50%);
bottom: 0rem; bottom: 0rem;
z-index: 99; z-index: 99;
background: url(../images/myBg2.png) no-repeat; background: url(../images/myBg2.png) no-repeat;

View File

@@ -1393,7 +1393,8 @@ body {
width: px2rem(750); width: px2rem(750);
height: 2.2rem; height: 2.2rem;
// height: 8.74667rem; // height: 8.74667rem;
left: 0; left: 50%;
transform: translateX(-50%);
bottom: 0rem; bottom: 0rem;
z-index: 99; z-index: 99;
background: url(../images/myBg2.png) no-repeat; background: url(../images/myBg2.png) no-repeat;

View File

@@ -42,6 +42,7 @@
<!-- 铭牌 --> <!-- 铭牌 -->
<img src="./images/mp.png" alt="" class="mp"> <img src="./images/mp.png" alt="" class="mp">
<!-- 点亮列表 --> <!-- 点亮列表 -->
<div class="giftListBox">
<div class="giftList giftList1 filter"> <div class="giftList giftList1 filter">
<div class="qp"></div> <div class="qp"></div>
<img src="./images/1.png" alt="" class="gift"> <img src="./images/1.png" alt="" class="gift">
@@ -79,6 +80,7 @@
<div class="giftVAlue">1314钻</div> <div class="giftVAlue">1314钻</div>
</div> </div>
</div> </div>
</div>
<div class="bg2"> <div class="bg2">
<!-- 标题 --> <!-- 标题 -->

View File

@@ -47,18 +47,32 @@ $(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null) window.webkit.messageHandlers.closeWebView.postMessage(null)
} }
}) })
getTask();
}, 100) }, 100)
}) })
// 接口 // 获取任务接口
function get () { function getTask () {
showLoading() showLoading()
networkRequest({ networkRequest({
type: 'get', type: 'get',
url: urlPrefix + '', url: urlPrefix + '/activity/task/user',
data: { type: taskType }, data: { componentCode: 1 },
success (res) { success (res) {
if (res.code === 200) { if (res.code === 200) {
// 渲染合成列表
$('.page1 .bg1 .giftListBox .giftList').remove();
var str = '';
res.data.forEach((res, i) => {
str += `
<div class="giftList giftList${i + 1} ${res.completed ? '' : 'filter'}">
<div class="qp"></div>
<img src="${res.taskIcon}" alt="" class="gift">
<div class="giftName">${res.taskName}</div>
<div class="giftVAlue">${res.showValue}钻</div>
</div>
`
});
$('.page1 .bg1 .giftListBox').append(str);
} else { } else {
toastMsg(res.message) toastMsg(res.message)
} }