Compare commits

..

No commits in common. "9cd484242cfcd3f1879bd7840878cb45d5f1f546" and "0a77ba151568b958eef27391b2fb6c94a81edd99" have entirely different histories.

7 changed files with 14 additions and 127 deletions

View File

@ -1,8 +1,12 @@
{ {
"pages": [ "pages": [
"pages/loginModule/pwdLogin/pwdLogin",
"pages/personCenter/mine/mine", "pages/personCenter/mine/mine",
"pages/projectModule/subSettlement/subSettlement",
"pages/projectModule/settlement/settlement",
"pages/personCenter/resetPwd/resetPwd",
"pages/personCenter/subCommissionSetting/subCommissionSetting", "pages/personCenter/subCommissionSetting/subCommissionSetting",
"pages/personCenter/commissionSetting/commissionSetting",
"pages/loginModule/pwdLogin/pwdLogin",
"pages/test/testVideo/testVideo", "pages/test/testVideo/testVideo",
"pages/personCenter/withdrawal/withdrawal", "pages/personCenter/withdrawal/withdrawal",
"pages/personCenter/withdrawalAccount/withdrawalAccount", "pages/personCenter/withdrawalAccount/withdrawalAccount",
@ -17,8 +21,7 @@
"pages/loginModule/register/register", "pages/loginModule/register/register",
"pages/projectModule/applyCode/applyCode", "pages/projectModule/applyCode/applyCode",
"pages/projectModule/userProject/userProject", "pages/projectModule/userProject/userProject",
"pages/loginModule/forgetPwd/forgetPwd", "pages/loginModule/forgetPwd/forgetPwd"
"pages/personCenter/commissionSetting/commissionSetting"
], ],
"window": { "window": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",

View File

@ -1,73 +1,22 @@
// pages/personCenter/accountSetting/accountSetting.js // pages/personCenter/accountSetting/accountSetting.js
const { baseUrl } = require("../../../request");
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
nickName: "",
userAvatar: "",
phoneNumber: ""
},
logOut() { },
wx.request({ gotoResetPwd() {
url: baseUrl + '/userInfo/mini/logout', wx.navigateTo({
method: 'GET', url: '/pages/personCenter/resetPwd/resetPwd',
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) { 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' });
}
})
}, },
/** /**

View File

@ -6,8 +6,8 @@
src="./images/logo.png" src="./images/logo.png"
/> />
<view class="flex-col items-start flex-1 self-start group_2 ml-8"> <view class="flex-col items-start flex-1 self-start group_2 ml-8">
<text class="text">{{ nickName }}</text> <text class="text">user</text>
<text class="font text_2 mt-28">{{ phoneNumber }}</text> <text class="font text_2 mt-28">15888610253</text>
</view> </view>
</view> </view>
<text class="self-start font_2 text_3 mt-19">平台服务</text> <text class="self-start font_2 text_3 mt-19">平台服务</text>
@ -45,5 +45,5 @@
</view> </view>
</view> </view>
</view> </view>
<view class="flex-col justify-start items-center text-wrapper" bind:tap="logOut"><text class="font_2 text_7">退出登录</text></view> <view class="flex-col justify-start items-center text-wrapper"><text class="font_2 text_7">退出登录</text></view>
</view> </view>

View File

@ -1,6 +1,4 @@
// pages/personCenter/mine/mine.js // pages/personCenter/mine/mine.js
const { baseUrl } = require("../../../request");
Page({ Page({
/** /**
@ -8,15 +6,6 @@ Page({
*/ */
data: { data: {
items: [null], items: [null],
nickName: "",
userAvatar: "",
phoneNumber: "",
userAccount: "",
invitationCode: "",
currentBalance: "", // 当前余额
withdrawalAmount: "", // 提现中的余额
withdrawnAmount: "", // 已提现的余额
totalIncome:"" // 累计收入
}, },
myteam(){ myteam(){
wx.navigateTo({ wx.navigateTo({
@ -72,55 +61,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { 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
})
}
}
})
}, },
/** /**

View File

@ -18,7 +18,6 @@
src="./images/fuzhi.png" src="./images/fuzhi.png"
mode="aspectFill" mode="aspectFill"
/> />
<text class="font_3 text_3">邀请码123445</text>
</view> </view>
</view> </view>
<view class="flex-col items-center" bind:tap="erweima"> <view class="flex-col items-center" bind:tap="erweima">

View File

@ -31,14 +31,9 @@ Page({
Authorization: token // 带上授权头 Authorization: token // 带上授权头
}, },
success: res => { success: res => {
console.log(res.data);
if (res.data.code === 1) { if (res.data.code === 1) {
// 渲染项目数据 // 渲染项目数据
this.setData({ items: res.data.data }); this.setData({ items: res.data.data });
} else if(res.data.code === 40101) {
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
} else { } else {
wx.showToast({ wx.showToast({
title: res.data.message || '获取项目列表失败', title: res.data.message || '获取项目列表失败',

View File

@ -1,6 +1,6 @@
{ {
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "qingcheng-xiaochengxu", "projectname": "%E9%9D%92%E6%A9%99",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false, "urlCheck": false,