Browse Source

2570

pull/31/head
余菲 1 year ago
parent
commit
9cca5779d5
6 changed files with 46 additions and 12 deletions
  1. +9
    -0
      api/protection.js
  2. +2
    -2
      environment.js
  3. +26
    -8
      package_first/pages/ProtectionActivity/index.js
  4. +1
    -1
      package_first/pages/ProtectionActivity/index.wxml
  5. +1
    -1
      package_first/pages/ProtectionActivity/index.wxss
  6. +7
    -0
      project.private.config.json

+ 9
- 0
api/protection.js View File

const {request} = require("../request/index")

export const integratDetail = function (data) {
return request({
url: '/westreamUser/getIntegralInfo',
method: 'GET',
data
})
}

+ 2
- 2
environment.js View File

const __request_base_url__ = { const __request_base_url__ = {
// develop: "http://192.168.11.11:9061/api",
develop: "https://qmhhapi-test.t-aaron.com/api",
develop: "http://192.168.11.11:9061/api",
// develop: "https://qmhhapi-test.t-aaron.com/api",
trial: "https://qmhhapi-test.t-aaron.com/api", trial: "https://qmhhapi-test.t-aaron.com/api",
release: "https://qmhh.t-aaron.com/api" release: "https://qmhh.t-aaron.com/api"
} }

+ 26
- 8
package_first/pages/ProtectionActivity/index.js View File

api_getIsApply, api_getIsApply,
api_TiktokAdd api_TiktokAdd
} from '../../../api/attention.js'; } from '../../../api/attention.js';
import {integratDetail} from '../../../api/protection.js'
Page({ Page({


/** /**
iconPath:'../../../assets/img/attentionIcon.png', iconPath:'../../../assets/img/attentionIcon.png',
path: '/package_first/pages/AttentionMethod/index', path: '/package_first/pages/AttentionMethod/index',
isJoin: false, isJoin: false,
isShow: true
// type: 'tiktok'
isShow: true,
type: 'tiktok'
}, },
{ {
title:'学习视频', title:'学习视频',
iconPath:'../../../assets/img/video.png', iconPath:'../../../assets/img/video.png',
path: '/package_first/pages/LearningVideo/index', path: '/package_first/pages/LearningVideo/index',
isJoin: false, isJoin: false,
isShow: true
// type: 'video'
isShow: true,
type: 'video'
}, },
{ {
title:'志愿者活动', title:'志愿者活动',
iconPath:'../../../assets/img/volunteer.png', iconPath:'../../../assets/img/volunteer.png',
path: '/package_first/pages/VolunteerActivity/index', path: '/package_first/pages/VolunteerActivity/index',
isJoin: false, isJoin: false,
isShow: true
// type: 'activity'
isShow: true,
type: 'volunteer_activity'
} }
]
],
// 护河活动积分
integratData: {}

}, },


/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getIntegral()
}, },


/** /**


}, },


// 获取积分明细
async getIntegral() {
const openid = wx.getStorageSync('openid')
const res = await integratDetail({openid})
if(res.code === 0) {
const list = res.data
const integratData = {}
list.forEach(item=> {
integratData[item.name] = item.value
})
this.setData({integratData})
}
},

/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */

+ 1
- 1
package_first/pages/ProtectionActivity/index.wxml View File

<view> <view>
<image class="marks_icon" src="../../../assets/img/gold.png" mode=""/> <image class="marks_icon" src="../../../assets/img/gold.png" mode=""/>
</view> </view>
<!-- <view class="marks_text">10积分</view> -->
<view class="marks_text">{{integratData[item.type]}} 积分</view>
</view> </view>
</view> </view>
<view class="item__button is--join" wx:if="{{item.isJoin}}"> <view class="item__button is--join" wx:if="{{item.isJoin}}">

+ 1
- 1
package_first/pages/ProtectionActivity/index.wxss View File

margin: 16rpx 10rpx 0rpx 0rpx; margin: 16rpx 10rpx 0rpx 0rpx;
} }
.marks_text{ .marks_text{
width: 80rpx;
/* width: 80rpx; */
font-size: 24rpx; font-size: 24rpx;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;

+ 7
- 0
project.private.config.json View File

"query": "data=%257B%2522id%2522%253A4%252C%2522createUser%2522%253A10%252C%2522createTime%2522%253A%25222023-06-08%252015%253A02%253A47%2522%252C%2522updateUser%2522%253A0%252C%2522updateTime%2522%253Anull%252C%2522mark%2522%253A1%252C%2522tenantId%2522%253A1%252C%2522videoTitle%2522%253A%2522%25E7%25AB%25AF%25E5%258D%2588%25E8%258A%2582%25E7%259A%2584%25E7%2594%25B1%25E6%259D%25A5%2522%252C%2522videoBrief%2522%253A%2522%25E7%25AB%25AF%25E5%258D%2588%25E8%258A%2582%25E5%258D%25B3%25E5%25B0%2586%25E6%259D%25A5%25E4%25B8%25B4%25EF%25BC%258C%25E6%25B2%25B3%25E9%2595%25BF%25E5%2588%25B6%25E6%2595%25B4%25E7%2590%2586%25E4%25BA%2586%25E5%2585%25B3%25E4%25BA%258E%25E7%25AB%25AF%25E5%258D%2588%25E4%25B9%25A0%25E4%25BF%2597%25E7%259A%2584%25E5%25AD%25A6%25E4%25B9%25A0%25E8%25A7%2586%25E9%25A2%2591%2522%252C%2522videoUrl%2522%253A%2522http%253A%252F%252Fvod.play.t-aaron.com%252FcustomerTrans%252Fedc96ea2115a0723a003730956208134%252F3507f116-18899d07d1c-0004-f90c-f2c-7ec68.mp4%2522%252C%2522imageUrl%2522%253A%2522https%253A%252F%252Fimage.t-aaron.com%252Fimagedir%252Fmk6te6rob9s_1686207766029.jpg%2522%252C%2522status%2522%253A0%257D", "query": "data=%257B%2522id%2522%253A4%252C%2522createUser%2522%253A10%252C%2522createTime%2522%253A%25222023-06-08%252015%253A02%253A47%2522%252C%2522updateUser%2522%253A0%252C%2522updateTime%2522%253Anull%252C%2522mark%2522%253A1%252C%2522tenantId%2522%253A1%252C%2522videoTitle%2522%253A%2522%25E7%25AB%25AF%25E5%258D%2588%25E8%258A%2582%25E7%259A%2584%25E7%2594%25B1%25E6%259D%25A5%2522%252C%2522videoBrief%2522%253A%2522%25E7%25AB%25AF%25E5%258D%2588%25E8%258A%2582%25E5%258D%25B3%25E5%25B0%2586%25E6%259D%25A5%25E4%25B8%25B4%25EF%25BC%258C%25E6%25B2%25B3%25E9%2595%25BF%25E5%2588%25B6%25E6%2595%25B4%25E7%2590%2586%25E4%25BA%2586%25E5%2585%25B3%25E4%25BA%258E%25E7%25AB%25AF%25E5%258D%2588%25E4%25B9%25A0%25E4%25BF%2597%25E7%259A%2584%25E5%25AD%25A6%25E4%25B9%25A0%25E8%25A7%2586%25E9%25A2%2591%2522%252C%2522videoUrl%2522%253A%2522http%253A%252F%252Fvod.play.t-aaron.com%252FcustomerTrans%252Fedc96ea2115a0723a003730956208134%252F3507f116-18899d07d1c-0004-f90c-f2c-7ec68.mp4%2522%252C%2522imageUrl%2522%253A%2522https%253A%252F%252Fimage.t-aaron.com%252Fimagedir%252Fmk6te6rob9s_1686207766029.jpg%2522%252C%2522status%2522%253A0%257D",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "护河活动",
"pathName": "package_first/pages/ProtectionActivity/index",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }

Loading…
Cancel
Save