xcx/pages/washer/apply/apply.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
const form = require("../../../components/utils/formValidation.js")
var util = require('../../../utils/util.js');
var api = require('../../../config/api.js');
var user = require('../../../utils/user.js');
var app = getApp();
Page({
data: {
tipsShow: false, //成功提示
userInfo: {},
hasLogin: false,
//服务下拉框显示
serviceShow: false,
merchantId: 0,
status: false,
},
onLoad: function (options) {
},
onShow: function () {
let that = this;
//获取用户的登录信息
let userInfo = wx.getStorageSync('userInfo');
that.setData({
userInfo: userInfo,
hasLogin: true
});
util.request(api.UserIndex).then(function (res) {
if (res.code === 0) {
if(res.data.userWasher!=undefined&&res.data.userWasher.status===2){
wx.redirectTo({
url: '/pages/washer/index/index',
});
}
if (res.data.userWasher != undefined && res.data.userWasher.status === 1) {
console.log(res)
that.setData({
merchantId: res.data.userWasher.id,
'form.fw': res.data.userWasher.name,
status: true,
});
}
that.setData({
user: res.data.user,
userWasher: res.data.userWasher,
});
}
});
that.getMerchanterList();
},
//商家一览
getMerchanterList: function () {
let that = this;
util.request(api.getMerchanterList, {}, "GET").then(function (res) {
if (res.code === 0) {
that.setData({
merchants: res.data.merchants,
});
}
});
},
后面还有 89 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
