xcx/pages/user/user.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// pages/user/user.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
user: { headimgurl: '../images/touxiang.png', username: '昵称昵称', userMoney: '', userscore:''},
canIUse: wx.canIUse('button.open-type.getUserInfo'),
isPay:0,
isDelivery:0,
isReceiving: 0,
isTransaction: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 生命周期函数--监听页面显示
var that = this;
var userId = wx.getStorageSync('userId');
if (userId != null && userId > 0 && userId != '') {
that.getUser(userId);//读取会员
that.getOrderRed(userId)
that.getOrderRedOne(userId)
that.getOrderRedTwo(userId)
that.getOrderRedThree(userId)
that.getWebSite();//读取站点信息
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
getUser: function (userId) {//读取会员
var that = this;
wx.request({
url: app.globalData.apiUrl,
data: {
opt: 'getUser',
userId: userId,
},
header: {
'content-type': 'application/json'
},
success: function (res) {
if (res.data != null) {
后面还有 174 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
