Compare commits
2 Commits
0a77ba1515
...
9cd484242c
Author | SHA1 | Date | |
---|---|---|---|
9cd484242c | |||
fcc9e21a7b |
11
app.json
11
app.json
|
@ -1,12 +1,8 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/personCenter/mine/mine",
|
||||
"pages/projectModule/subSettlement/subSettlement",
|
||||
"pages/projectModule/settlement/settlement",
|
||||
"pages/personCenter/resetPwd/resetPwd",
|
||||
"pages/personCenter/subCommissionSetting/subCommissionSetting",
|
||||
"pages/personCenter/commissionSetting/commissionSetting",
|
||||
"pages/loginModule/pwdLogin/pwdLogin",
|
||||
"pages/personCenter/mine/mine",
|
||||
"pages/personCenter/subCommissionSetting/subCommissionSetting",
|
||||
"pages/test/testVideo/testVideo",
|
||||
"pages/personCenter/withdrawal/withdrawal",
|
||||
"pages/personCenter/withdrawalAccount/withdrawalAccount",
|
||||
|
@ -21,7 +17,8 @@
|
|||
"pages/loginModule/register/register",
|
||||
"pages/projectModule/applyCode/applyCode",
|
||||
"pages/projectModule/userProject/userProject",
|
||||
"pages/loginModule/forgetPwd/forgetPwd"
|
||||
"pages/loginModule/forgetPwd/forgetPwd",
|
||||
"pages/personCenter/commissionSetting/commissionSetting"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
|
|
@ -1,22 +1,73 @@
|
|||
// pages/personCenter/accountSetting/accountSetting.js
|
||||
const { baseUrl } = require("../../../request");
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
nickName: "",
|
||||
userAvatar: "",
|
||||
phoneNumber: ""
|
||||
},
|
||||
gotoResetPwd() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/resetPwd/resetPwd',
|
||||
|
||||
logOut() {
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/mini/logout',
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
wx.showToast({
|
||||
title: '退出登录',
|
||||
icon: 'success'
|
||||
})
|
||||
wx.reLaunch({
|
||||
url: '/pages/loginModule/pwdLogin/pwdLogin',
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const token = wx.getStorageSync('token');
|
||||
|
||||
// 获取用户信息
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/get/jwt',
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: token
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
nickName: res.data.data.nickName,
|
||||
// TODO 头像未连接
|
||||
userAvatar: res.data.data.userAvatar,
|
||||
phoneNumber: res.data.data.phoneNumber,
|
||||
userAccount: res.data.data.userAccount
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
src="./images/logo.png"
|
||||
/>
|
||||
<view class="flex-col items-start flex-1 self-start group_2 ml-8">
|
||||
<text class="text">user</text>
|
||||
<text class="font text_2 mt-28">15888610253</text>
|
||||
<text class="text">{{ nickName }}</text>
|
||||
<text class="font text_2 mt-28">{{ phoneNumber }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="self-start font_2 text_3 mt-19">平台服务</text>
|
||||
|
@ -45,5 +45,5 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center text-wrapper"><text class="font_2 text_7">退出登录</text></view>
|
||||
<view class="flex-col justify-start items-center text-wrapper" bind:tap="logOut"><text class="font_2 text_7">退出登录</text></view>
|
||||
</view>
|
|
@ -1,4 +1,6 @@
|
|||
// pages/personCenter/mine/mine.js
|
||||
const { baseUrl } = require("../../../request");
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
|
@ -6,6 +8,15 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
items: [null],
|
||||
nickName: "",
|
||||
userAvatar: "",
|
||||
phoneNumber: "",
|
||||
userAccount: "",
|
||||
invitationCode: "",
|
||||
currentBalance: "", // 当前余额
|
||||
withdrawalAmount: "", // 提现中的余额
|
||||
withdrawnAmount: "", // 已提现的余额
|
||||
totalIncome:"" // 累计收入
|
||||
},
|
||||
myteam(){
|
||||
wx.navigateTo({
|
||||
|
@ -61,7 +72,55 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const token = wx.getStorageSync('token');
|
||||
|
||||
// 获取用户主要信息
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/get/main/jwt',
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: token
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
currentBalance: res.data.data.currentBalance, // 当前余额
|
||||
withdrawalAmount: res.data.data.withdrawalAmount, // 提现中的余额
|
||||
withdrawnAmount: res.data.data.withdrawnAmount, // 已提现的余额
|
||||
totalIncome: res.data.data.totalIncome // 累计收入
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '获取个人信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
|
||||
}
|
||||
})
|
||||
|
||||
// 获取用户信息
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/get/jwt',
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: token
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
nickName: res.data.data.nickName,
|
||||
// TODO 头像未连接
|
||||
userAvatar: res.data.data.userAvatar,
|
||||
phoneNumber: res.data.data.phoneNumber,
|
||||
userAccount: res.data.data.userAccount,
|
||||
invitationCode: res.data.data.invitationCode
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
src="./images/fuzhi.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<text class="font_3 text_3">邀请码:123445</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col items-center" bind:tap="erweima">
|
||||
|
|
|
@ -31,9 +31,14 @@ Page({
|
|||
Authorization: token // 带上授权头
|
||||
},
|
||||
success: res => {
|
||||
console.log(res.data);
|
||||
if (res.data.code === 1) {
|
||||
// 渲染项目数据
|
||||
this.setData({ items: res.data.data });
|
||||
} else if(res.data.code === 40101) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/loginModule/pwdLogin/pwdLogin',
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.message || '获取项目列表失败',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"projectname": "%E9%9D%92%E6%A9%99",
|
||||
"projectname": "qingcheng-xiaochengxu",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
|
|
Loading…
Reference in New Issue
Block a user