yuminge-app/yun-min-program-plugin-master/packageB/member/love/love_explain/love_explain.js

96 lines
1.6 KiB
JavaScript

// pages/member/rankingListSecond/rankingListSecond.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
// 说明标题
titlew: "",
// 爱心值说明
content: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getUsable();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
getUsable() {
let urlStr = app.getNetAddresss("plugin.love.Frontend.Controllers.explain.index");
app._getNetWork({
url: urlStr,
success: (res) => {
if (res.data.result === 1) {
this.setData({
content: res.data.data.content,
titlew: res.data.data.title
});
wx.setNavigationBarTitle({
title: res.data.data.title?res.data.data.title:''
});
} else {
wx.showToast({
title: res.data.msg,
icon: "none"
});
}
},
fail: function(res) {
console.log(res);
}
});
}
});