liluo293254 11c5647ae5 feat: 统一环境配置并移除本地测试登录入口
新增 config/env.js 管理 local/test/prod 网关,清理调试登录与页面联调相关改动。
2026-08-07 08:47:52 +08:00

126 lines
2.3 KiB
JavaScript

import { doNavigateWithUser } from '../../../utils/helper';
import { postUrl } from '../../../utils/util';
import waterApiArr from '../../../api/water_filter';
const __staticUrl = require('../../../config/env.js').static_url
Page({
/**
* 页面的初始数据
*/
data: {
functional_List: [
{
"image": (__staticUrl + '/User/_assets/Group_25.png'),
"name": "推广海报",
"url": "/packages/user/share/index",
"type": "h5"
},
{
"image": (__staticUrl + '/User/_assets/Group_26.png'),
"name": "我的下级",
"url": "",
"type": "h5"
},
{
"image": (__staticUrl + '/User/_assets/Group_35.png'),
"name": "下级订单",
"url": "",
"type": "h5"
},
{
"image": (__staticUrl + '/User/_assets/Group_30.png'),
"name": "联系平台",
"url": "",
"type": "h5"
},
],
userInfo: {},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.init();
},
init() {
postUrl(waterApiArr.loginInfo,{},res=>{
console.log('loginInfo 接口结果', res);
this.setData({
userInfo: res
})
})
},
/**
* 点击跳转账户详情页
*/
handleUserInfoClick() {
doNavigateWithUser({ url: '/packages/user/userInfo/index' });
},
handleShareClick() {
doNavigateWithUser({ url: '/packages/user/share/index' });
},
headerOrderClick(event) {
console.log('11111', event)
const { url } = event.currentTarget.dataset;
if (!url) {
wx.showModal({
title: '提示',
content: '此功能暂未开通!',
showCancel: false,
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})