xcx/pages/online/online.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// pages/online/online.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
imgUrl: app.globalData.imgUrl,
content: '',
mobile: '',
name:'',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
that.setData({
name: options.name,
})
},
//查询栏目分类
addMessage: function () {
var that = this;
wx.request({
url: app.globalData.apiUrl,
data: {
action: 'addMessage',
full_name: that.data.name,
telephone: that.data.mobile,
content: that.data.content,
},
header: {
'content-type': 'application/json'
},
success: function (res) {
if (res.data.status == 1) {
that.setData({
content: '',
mobile: '',
})
wx.showToast({
title: res.data.message,
icon: 'success',
duration: 1000
})
}else{
wx.showToast({
title: res.data.message,
icon: 'loading',
duration: 1000
})
}
}
})
},
contentInput: function(e) {
console.log(e.detail.value)
后面还有 58 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
