fix 任务工单
This commit is contained in:
parent
0fd5d81f09
commit
9c199e7943
@ -7,29 +7,19 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list:[
|
||||
{
|
||||
name:'傲娇薄荷•斯基',
|
||||
tag:'夏日续命草',
|
||||
url:'https://res.catter.cn/pub/2025/12/04/20251204113223290.png',
|
||||
count:1,
|
||||
status:0
|
||||
},
|
||||
{
|
||||
name:'呆萌多肉•丸子',
|
||||
tag:'佛系晒太阳',
|
||||
url:'https://res.catter.cn/pub/2025/12/04/20251204113419078.png',
|
||||
count:2,
|
||||
status:1
|
||||
}
|
||||
]
|
||||
points:0,
|
||||
list:[],
|
||||
inviteCode:""
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
const inviteCode = wx.getStorageSync('inviteCode')
|
||||
this.setData({
|
||||
inviteCode: inviteCode
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@ -47,11 +37,24 @@ Page({
|
||||
},
|
||||
|
||||
fetchList(){
|
||||
api('/personal/personal', 'GET').then(res => {
|
||||
if (res.code === 200) {
|
||||
const tmps = res.data
|
||||
this.setData({
|
||||
points: tmps.pointsCount
|
||||
})
|
||||
api('/claim/list','POST',{current:0,pageSize:10,name:'',keyword:''},'json').then(res => {
|
||||
if (res.code === 200){
|
||||
console.log(res);
|
||||
const tmps = res.data.list.map(e => {
|
||||
e.status = e.points < this.data.points ? 0:1
|
||||
return e
|
||||
})
|
||||
this.setData({list:tmps})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@ -86,6 +89,18 @@ Page({
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '发现一个宝藏养花神器',
|
||||
imageUrl: "https://res.catter.cn/pub/2025/12/08/20251208112039694.png",
|
||||
path: '/pages/index/index?inviteCode=' + this.data.inviteCode
|
||||
};
|
||||
},
|
||||
|
||||
onShareTimeline() {
|
||||
return {
|
||||
title: '发现一个宝藏养花神器',
|
||||
imageUrl: "https://res.catter.cn/pub/2025/12/08/20251208112039694.png",
|
||||
path: '/pages/index/index?inviteCode=' + this.data.inviteCode
|
||||
};
|
||||
}
|
||||
})
|
||||
@ -2,17 +2,17 @@
|
||||
<view>
|
||||
<view class="flex flex-center primary-bg padding">
|
||||
<view class="white">
|
||||
我的阳光值 1 枚
|
||||
我的阳光值 {{points}}
|
||||
</view>
|
||||
<view class="ml-16" style="color: orange;">
|
||||
邀请好友获取更多兑换币
|
||||
<button class="avatar-wrapper" open-type="share">邀请好友获取更多兑换币</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid margin">
|
||||
<view wx:for="{{list}}">
|
||||
<view class="white-bg row">
|
||||
<image style="width: 100%; border-top-left-radius: 16rpx; border-top-right-radius: 16rpx;" src="{{item.url}}" mode="aspectFill"></image>
|
||||
<view style="background-color: #C35D4B;margin-top: -10rpx; padding: 8rpx;" class="font-12 white">需要 {{item.count}} 兑换币</view>
|
||||
<image style="width: 100%; border-top-left-radius: 16rpx; border-top-right-radius: 16rpx;" src="{{item.imgList[0].url}}" mode="aspectFill"></image>
|
||||
<view style="background-color: #C35D4B;margin-top: -10rpx; padding: 8rpx;" class="font-12 white">需要 {{item.points}} 阳光值</view>
|
||||
<view style="padding: 0 16rpx;" class="mt-16">
|
||||
<view class="font-14 w400">
|
||||
{{item.name}}
|
||||
|
||||
@ -5,3 +5,15 @@
|
||||
grid-row-gap: 8px;
|
||||
grid-column-gap: 8px;
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.avatar-wrapper {
|
||||
padding: 0;
|
||||
font-size: 16px !important;
|
||||
color: orange !important;
|
||||
background-color: transparent !important;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user