Browse Source

添加tabBar,请求方法,授权方法

zys
杨豪 3 years ago
parent
commit
7c28fa5d94
  1. 37
      api/http.js
  2. 12
      api/user.js
  3. 61
      app.js
  4. 32
      app.json
  5. 2
      app.wxss
  6. BIN
      images/arror-d.png
  7. BIN
      images/arror-r.png
  8. BIN
      images/book-icon.png
  9. BIN
      images/coursepage.png
  10. BIN
      images/cy1.png
  11. BIN
      images/cy2.png
  12. BIN
      images/cy3.png
  13. BIN
      images/head.png
  14. BIN
      images/jifen-icon.png
  15. BIN
      images/lh-bottom.png
  16. BIN
      images/lh-ico.png
  17. BIN
      images/lh-top.png
  18. BIN
      images/lh.png
  19. BIN
      images/logo.png
  20. BIN
      images/menu1.png
  21. BIN
      images/menu2.png
  22. BIN
      images/menu3.png
  23. BIN
      images/menu4.png
  24. BIN
      images/namebg.png
  25. BIN
      images/panel.png
  26. 0
      images/placeicon.png
  27. BIN
      images/profit.png
  28. BIN
      images/telbg.png
  29. BIN
      images/user-icon.png
  30. BIN
      images/yykc.png
  31. 66
      pages/companyPage/index.js
  32. 7
      pages/companyPage/index.json
  33. 10
      pages/companyPage/index.wxml
  34. 26
      pages/companyPage/index.wxss
  35. 66
      pages/courseDetail/index.js
  36. 4
      pages/courseDetail/index.json
  37. 48
      pages/courseDetail/index.wxml
  38. 158
      pages/courseDetail/index.wxss
  39. 66
      pages/courseReservation/index.js
  40. 4
      pages/courseReservation/index.json
  41. 13
      pages/courseReservation/index.wxml
  42. 56
      pages/courseReservation/index.wxss
  43. 50
      pages/index/index.js
  44. 3
      pages/index/index.json
  45. 23
      pages/index/index.wxml
  46. 19
      pages/index/index.wxss
  47. 18
      pages/logs/logs.js
  48. 4
      pages/logs/logs.json
  49. 6
      pages/logs/logs.wxml
  50. 8
      pages/logs/logs.wxss
  51. 66
      pages/user/bindCard/index.js
  52. 4
      pages/user/bindCard/index.json
  53. 18
      pages/user/bindCard/index.wxml
  54. 41
      pages/user/bindCard/index.wxss
  55. 66
      pages/user/cashOut/index.js
  56. 5
      pages/user/cashOut/index.json
  57. 19
      pages/user/cashOut/index.wxml
  58. 68
      pages/user/cashOut/index.wxss
  59. 66
      pages/user/index.js
  60. 4
      pages/user/index.json
  61. 70
      pages/user/index.wxml
  62. 113
      pages/user/index.wxss
  63. 66
      pages/user/myTeam/index.js
  64. 4
      pages/user/myTeam/index.json
  65. 30
      pages/user/myTeam/index.wxml
  66. 45
      pages/user/myTeam/index.wxss
  67. 66
      pages/user/profit/index.js
  68. 5
      pages/user/profit/index.json
  69. 42
      pages/user/profit/index.wxml
  70. 93
      pages/user/profit/index.wxss

37
api/http.js

@ -0,0 +1,37 @@
const baseURL = 'http://192.168.0.112:8088/api/';
export function $http(methods,url,params){
var header = {
'content-type': 'application/json',
'Authorization' : wx.getStorageSync('token') || ''
};
return new Promise((resolve,reject)=>{
wx.showLoading({
title: '正在加载中...',
})
wx.request({
url: baseURL + url,
method: methods,
header: header,
data: params || {},
success: res=> {
wx.hideLoading();
if(!res.data.success && res.data.status == 401){
// console.log('登陆失效')
wx.navigateTo({
url: '/pages/login/index',
})
}
resolve(res);
},
fail: err=> {
wx.hideLoading();
wx.showToast({
title: '服务器错误,请稍后再试!',
icon : 'none'
})
reject(err)
}
})
})
}

12
api/user.js

@ -0,0 +1,12 @@
const http = require('./http.js')
export function bingPhone(){
return new Promise((resolve,reject)=> {
// http.$http().then((res)=>{
// if(res.success){
// resolve(res)
// } else{
// resolve(res)
// }
// })
})
}

61
app.js

@ -1,59 +1,38 @@
// app.js // app.js
const http = require('./api/http.js')
App({ App({
onLaunch() { onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录 // 登录
}, },
login(loginInfo){ login(){
wx.login({ return new Promise((resolve,reject)=>{
wx.getUserProfile({
lang: 'zh_CN',
desc: '需要获取您的信息用来展示',
success: res => { success: res => {
wx.showLoading({ title: '登录中' })
wx.login({
success: result => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId // 发送 res.code 到后台换取 openId, sessionKey, unionId
let data = {
code: result.code,
iv: res.iv,
encryptedData:res.encryptedData
} }
}) http.$http('post','wxapp/auth',data).then((result)=>{
}, console.log('数据已返回')
http(methods,url,params){ resolve(result)
var header = {
'content-type': 'application/json',
'Authorization' : wx.getStorageSync('token') || ''
};
return new Promise((resolve,reject)=>{
wx.showLoading({
title: '正在加载中...',
})
wx.request({
url: this.globalData.baseUrl + url,
method: methods,
header: header,
data: params || {},
success: res=> {
wx.hideLoading();
if(!res.data.success && res.data.status == 401){
// console.log('登陆失效')
wx.navigateTo({
url: '/pages/login/index',
}) })
} }
resolve(res);
},
fail: err=> {
wx.hideLoading();
wx.showToast({
title: '服务器错误,请稍后再试!',
icon : 'none'
}) })
reject(err) },
fail: res=>{
console.log('取消授权')
} }
}) })
}) })
}, },
globalData: { globalData: {
baseURL : 'http://192.168.0.114:8092/api/', $http: http.$http
// baseURL : 'https://cloud.api.cyjyyjy.com/api/',
} }
}) })

32
app.json

@ -1,13 +1,39 @@
{ {
"pages": [ "pages": [
"pages/home/index", "pages/home/index",
"pages/courseDetail/index",
"pages/courseReservation/index",
"pages/companyPage/index",
"pages/goodsDetail/index",
"pages/goodsList/index", "pages/goodsList/index",
"pages/login/index", "pages/login/index",
"pages/goodsDetail/index",
"pages/companyInfo/index", "pages/companyInfo/index",
"pages/index/index" "pages/user/index",
"pages/user/myTeam/index",
"pages/user/bindCard/index",
"pages/user/cashOut/index",
"pages/user/profit/index"
], ],
"tabBar": {
"selectedColor": "#E1994C",
"list": [{
"pagePath": "pages/home/index",
"iconPath": "/images/lh.png",
"selectedIconPath": "/images/lh.png",
"text": "首页"
}, {
"pagePath": "pages/goodsList/index",
"iconPath": "/images/book-icon.png",
"selectedIconPath": "/images/book-icon.png",
"text": "商品列表"
},
{
"pagePath": "pages/user/index",
"iconPath": "/images/user-icon.png",
"selectedIconPath": "/images/user-icon.png",
"text": "我的"
}]
},
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",

2
app.wxss

@ -12,6 +12,8 @@ image {
} }
image{ image{
/* border-radius: 8rpx; */ /* border-radius: 8rpx; */
width: 100%;
height: 100%;
} }
/* layout */ /* layout */
.acea-row-nowrap { .acea-row-nowrap {

BIN
images/arror-d.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

BIN
images/arror-r.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

BIN
images/book-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/coursepage.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
images/cy1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

BIN
images/cy2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 KiB

BIN
images/cy3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

BIN
images/head.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/jifen-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

BIN
images/lh-bottom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
images/lh-ico.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
images/lh-top.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
images/lh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
images/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
images/menu1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/menu2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/menu3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/menu4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/namebg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/panel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

0
images/address.png → images/placeicon.png

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/profit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
images/telbg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
images/user-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/yykc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

66
pages/companyPage/index.js

@ -0,0 +1,66 @@
// pages/companyPage/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

7
pages/companyPage/index.json

@ -0,0 +1,7 @@
{
"usingComponents": {},
"navigationBarBackgroundColor": "#343434",
"navigationBarTitleText": "公司介绍",
"navigationBarTextStyle": "white"
}

10
pages/companyPage/index.wxml

@ -0,0 +1,10 @@
<!--pages/companyPage/index.wxml-->
<view class="detail-page ">
<view class="cy1 cy"><image src="../../images/cy1.png" mode="aspectFill"></image></view>
<view class="cy2 cy"><image src="../../images/cy2.png" mode="aspectFill"></image></view>
<view class="cy3 cy"><image src="../../images/cy3.png" mode="aspectFill"></image></view>
<view class="footer ">
<view class="acea-row row-center-wrapper">全国咨询热线</view>
<view class="acea-row row-center-wrapper">400-631-8531</view>
</view>
</view>

26
pages/companyPage/index.wxss

@ -0,0 +1,26 @@
/* pages/companyPage/index.wxss */
.detail-page{
min-height: 100vh;
background: linear-gradient(180deg, #343434 0%, #777777 100%);
font-size: 24rpx;
}
.cy image{
width: 100%;
}
.cy1 image{
height: 1354rpx;
}
.cy2 image{
height: 1434rpx;
}
.cy3 image{
height: 1531rpx;
}
.footer{
height: 214rpx;
font-size: 32rpx;
color: #fff;
}

66
pages/courseDetail/index.js

@ -0,0 +1,66 @@
// pages/courseDetail/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/courseDetail/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "课程详情"
}

48
pages/courseDetail/index.wxml

@ -0,0 +1,48 @@
<!--pages/courseDetail/index.wxml-->
<view class="detail-page">
<view class="subscribe">
<image src="../../images/coursepage.png" alt=""></image>
<view class="title acea-row row-center-wrapper">弘扬传统国学</view>
<view class="subscribe-con">
<view class="headline">国学智慧-怎样学好国学</view>
<view class="subtitle">国学智慧-怎样学好国学</view>
<view class="placeicon acea-row row-middle">
<image src="../../images/placeicon.png"></image>
<text>武汉</text>
</view>
<view class="timeicon acea-row row-middle">
<image src="../../images/time.png"></image>
<text>2021.11.13-11.15</text>
</view>
<view class="num">22人已预约</view>
<view class="order-btn acea-row row-center-wrapper">去预约</view>
</view>
</view>
<view class="introduse-box">
<view class="teach acea-row row-middle">
<image src="../../images/lh-ico.png" alt=""></image>
<text>授课老师</text>
</view>
<view class="introduce-name acea-row row-left">
<image src="../../images/head.png" class=""></image>
<view>
<view class="name">李大辉</view>
<view>中国资深国学大师</view>
</view>
</view>
<view class="desc">中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资</view>
</view>
<view class="course-box">
<view class="teach acea-row row-middle">
<image src="../../images/lh-ico.png" alt=""></image>
<text>授课老师</text>
</view>
<view class="course-con">
<image src="../../images/lh-top.png"></image>
<view>
中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师
</view>
<image src="../../images/lh-bottom.png"></image>
</view>
</view>
</view>

158
pages/courseDetail/index.wxss

@ -0,0 +1,158 @@
/* pages/courseDetail/index.wxss */
.detail-page{
min-height: 100vh;
background-color: #F5F5F5;
font-size: 24rpx;
}
.subscribe{
width: 100%;
height: 688rpx;
}
.subscribe,.introduse-box,.course-box{
background-color: #fff;
}
.subscribe image{
width: 100%;
height: 432rpx;
position: relative;
display: block;
}
.title{
width: 100%;
font-size: 96rpx;
position: absolute;
top: 76px;
color: #fff;
}
.subscribe-con{
width: 100%;
height: 256rpx;
position: relative;
right: 40rpx;
padding-left: 80rpx;
}
.headline{
font-size: 36rpx;
font-weight: 600;
color: #4A4A4A;
padding-top: 30rpx;
}
.subtitle{
font-weight: 400;
color: #A5A5A5;
padding-top: 8rpx;
}
.placeicon{
float: left;
margin-top: 24rpx;
}
.placeicon image{
width: 21rpx;
height: 25rpx;
}
.timeicon image{
width: 26rpx;
height: 26rpx;
margin-left: 30rpx;
}
.timeicon text,.placeicon text{
padding-left: 8rpx;
color: #A5A5A5;
font-weight: 400;
}
.timeicon{
margin-top: 24rpx;
}
.num{
color: #E19C01;
margin-top: 16rpx;
}
.order-btn{
position: absolute;
width: 216rpx;
height: 64rpx;
font-size: 36rpx;
color: #FFFFFF;
right: 0;
bottom: 32rpx;
background: linear-gradient(225deg, #FFD87D 0%, #E19C00 100%);
border-radius: 40px;
}
.introduse-box{
width: 100%;
height: 416rpx;
margin-top: 20rpx;
padding-left: 40rpx;
}
.teach{
padding-top: 28rpx;
}
.teach image{
width: 44rpx;
height: 28rpx;
}
.teach text{
font-size: 28rpx;
margin-left: 16rpx;
}
.introduce-name{
margin-top: 32rpx;
}
.introduce-name image{
width: 76rpx;
height: 76rpx;
margin-right: 18rpx;
}
.introduce-name view{
margin-bottom: 4rpx;
font-size: 28rpx;
color: #4A4A4A;
}
.name{
font-weight: 600;
}
.desc{
width: 672rpx;
height: 102rpx;
color: #989898;
margin-top: 16rpx;
}
.course-box{
width: 100%;
height: 976rpx;
margin-top: 44rpx;
padding: 0 40rpx;
}
.course-con{
background-color: #E7DBBD;
margin: 12rpx 0 48rpx 0;
}
.course-con image{
width: 100%;
height: 178rpx;
}
.course-con view{
color: #343434;
padding: 8rpx 22rpx 18rpx 24rpx;
}
.list-box{
width: 100%;
height: 162rpx;
padding: 0 62rpx 0 64rpx;
box-shadow: 6rpx 0rpx 24rpx rgba(0, 0, 0, 0.16);
}
.list-box image{
width: 96rpx;
height: 96rpx;
}
.list-box text{
font-size: 32rpx;
font-weight: 500;
color: #4A4A4A;
}

66
pages/courseReservation/index.js

@ -0,0 +1,66 @@
// pages/courseReservation/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/courseReservation/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "课程预约"
}

13
pages/courseReservation/index.wxml

@ -0,0 +1,13 @@
<!--pages/courseReservation/index.wxml-->
<view class="detail-page">
<view class="top-bg"><image src="../../images/lh-top.png"></image></view>
<view class="title acea-row row-center-wrapper"><image src="../../images/yykc.png"></image></view>
<view class="input-box">
<view class="name"><image src="../../images/namebg.png"></image></view>
<input type="text" class="input" placeholder="刘天城" placeholder-style="color:#fff"/>
<view class="tel"><image src="../../images/telbg.png" ></image></view>
<input type="text" class="input" placeholder="17671086998" placeholder-style="color:#fff"/>
</view>
<button class="submit">提交</button>
<view class="bottom-bg"><image src="../../images/lh-bottom.png"></image></view>
</view>

56
pages/courseReservation/index.wxss

@ -0,0 +1,56 @@
/* pages/courseReservation/index.wxss */
.detail-page{
min-height: 100vh;
background-color: #FDF1D3;
position: relative;
}
.top-bg image{
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
}
.title image{
width: 408rpx;
height: 122rpx;
margin-top: 304rpx;
}
.input-box{
width: 100%;
padding: 44rpx 126rpx 100rpx 128rpx;
}
.name image{
width: 104rpx;
height: 48rpx;
}
.input{
width: 496rpx;
height: 80rpx;
background: #298C93;
border: 2px solid #CFBFA3;
border-radius: 56rpx;
margin-top: 16rpx;
padding-left: 32rpx;
font-size: 32rpx;
color: #FFFFFF;
}
.tel image{
width: 184rpx;
height: 48rpx;
margin-top: 64rpx;
}
.submit{
height: 80rpx;
background: linear-gradient(49deg, #E6A717 0%, #FFD471 100%);
border-radius: 16rpx;
font-size: 36rpx;
color: #fff;
margin-bottom: 224rpx;
}
.bottom-bg image{
width: 100%;
height: 200rpx;
position: absolute;
bottom: 0;
}

50
pages/index/index.js

@ -1,50 +0,0 @@
// index.js
// 获取应用实例
const app = getApp()
Page({
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
// canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName' // 如需尝试获取用户信息可改为false
canIUseOpenData: false
},
// 事件处理函数
bindViewTap() {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad() {
console.log(wx.getUserProfile)
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
},
getUserInfo(e) {
// 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息
console.log(e)
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
})
}
})

3
pages/index/index.json

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

23
pages/index/index.wxml

@ -1,23 +0,0 @@
<!--index.wxml-->
<view class="container">
<view class="userinfo">
<block wx:if="{{canIUseOpenData}}">
<view class="userinfo-avatar" bindtap="bindViewTap">
<open-data type="userAvatarUrl"></open-data>
</view>
<open-data type="userNickName"></open-data>
</block>
<block wx:elif="{{!hasUserInfo}}">
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
<button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
</block>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</view>

19
pages/index/index.wxss

@ -1,19 +0,0 @@
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
color: #aaa;
}
.userinfo-avatar {
overflow: hidden;
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.usermotto {
margin-top: 200px;
}

18
pages/logs/logs.js

@ -1,18 +0,0 @@
// logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad() {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return {
date: util.formatTime(new Date(log)),
timeStamp: log
}
})
})
}
})

4
pages/logs/logs.json

@ -1,4 +0,0 @@
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}

6
pages/logs/logs.wxml

@ -1,6 +0,0 @@
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log.date}}</text>
</block>
</view>

8
pages/logs/logs.wxss

@ -1,8 +0,0 @@
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}

66
pages/user/bindCard/index.js

@ -0,0 +1,66 @@
// pages/user/bindCard/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/bindCard/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "绑定银行卡"
}

18
pages/user/bindCard/index.wxml

@ -0,0 +1,18 @@
<!--pages/user/bindCard/index.wxml-->
<view class="bindcard-page">
<view class="form">
<view class="form-item">
<view class="label">持卡人</view>
<input type="text" placeholder="请输入持卡人姓名" />
</view>
<view class="form-item">
<view class="label">银行卡号</view>
<input type="text" placeholder="请输入银行卡号" />
</view>
<view class="form-item">
<view class="label">开户行</view>
<input type="text" placeholder="请输入开户行" />
</view>
</view>
<view class="submit">确定</view>
</view>

41
pages/user/bindCard/index.wxss

@ -0,0 +1,41 @@
/* pages/user/bindCard/index.wxss */
page{
width: 100%;
height: 100%;
background: #F8F8F8;
}
.bindcard-page{
width: 100%;
padding: 32rpx 38rpx;
}
.form{
width: 100%;
background: #fff;
border-radius: 18rpx;
}
.form-item{
width: 100%;
height: 100rpx;
padding: 0 36rpx;
font-size: 34rpx;
color: #000;
display: flex;
align-items: center;
justify-content: space-between;
border: 2rpx solid #F5F5F5;
}
.form-item input{
text-align: right;
font-size: 32rpx;
}
.submit{
width: 440rpx;
height: 88rpx;
background: #F7C37A;
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
font-size: 46rpx;
color: #fff;
margin: 60rpx auto;
}

66
pages/user/cashOut/index.js

@ -0,0 +1,66 @@
// pages/user/cashOut/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/user/cashOut/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "提现",
"enablePullDownRefresh": true
}

19
pages/user/cashOut/index.wxml

@ -0,0 +1,19 @@
<!--pages/user/cashOut/index.wxml-->
<view class="cashout-page">
<view class="profit-box">
<image src="../../../images/profit.png" class="profit-bg"></image>
<view class="profit-info">
<view>当前可提现积分<text class="s-word">(积分比例为1:1)</text></view>
<view class="fz70">300</view>
</view>
</view>
<view class="tips">注:提现需在每月20-26日进行,其他时间不可提现</view>
<view class="handle-box">
<view class="tit">提现金额</view>
<view class="inp-box acea-row row-between row-middle">
<text class="fz50">¥</text>
<input type="text" placeholder="最低提现100积分" />
<view class="colO">全部提现</view>
</view>
</view>
</view>

68
pages/user/cashOut/index.wxss

@ -0,0 +1,68 @@
/* pages/user/cashOut/index.wxss */
.cashout-page{
width: 100%;
min-height: 100vh;
padding: 40rpx;
background: #F8F8F8;
}
.profit-box{
width: 100%;
height: 256rpx;
position: relative;
margin-top: 20rpx;
}
.profit-box image{
position: absolute;
top: 0;
}
.profit-info{
width: 100%;
height: 100%;
position: absolute;
top: 0;
z-index: 3;
padding: 48rpx 94rpx 0 36rpx;
color: #fff;
font-weight: 500;
}
.s-word{
font-size: 22rpx;
}
.fz70{
font-size: 70rpx;
font-weight: 500;
line-height: 98rpx;
}
.tips{
font-size: 20rpx;
color:#FF3434;
margin: 62rpx 0 20rpx;
font-weight: 600;
}
.handle-box{
background: #fff;
border-radius: 18rpx;
font-size: 28rpx;
}
.handle-box .tit{
width: 100%;
height: 98rpx;
line-height: 98rpx;
text-indent: 2em;
border-bottom: 2rpx solid #F5F5F5;
font-size: 28rpx;
}
.inp-box{
width: 100%;
padding: 0 32rpx;
height: 108rpx;
}
.inp-box input{
margin-left: -100rpx;
}
.fz50{
font-size: 50rpx;
}
.colO{
color: #F68514;
}

66
pages/user/index.js

@ -0,0 +1,66 @@
// pages/user/index.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "我的"
}

70
pages/user/index.wxml

@ -0,0 +1,70 @@
<!--pages/user/index.wxml-->
<view class="user-page">
<view class="user-box acea-row row-middle">
<view class="avatar"><image src="../../images/logo.png"></image></view>
<view class="userInfo">
<view class="name">赵铁柱</view>
<view class="id-num">ID:2123</view>
</view>
</view>
<view class="panel-box">
<image src="../../images/panel.png" class="panel-bg"></image>
<view class="panel-content acea-row">
<view class="profit-box">
<view class="mt20">
<view>今日收益</view>
<view class="fz40">200积分</view>
</view>
<view class="">
<view>累计收益</view>
<view class="fz40">200积分</view>
</view>
</view>
<view class="col-line"></view>
<view class="sale-box">
<view class="mt20">
<view>推广人数</view>
<view class="fz40">20人</view>
</view>
<view class="">
<view>今日收益</view>
<view class="fz40">20人</view>
</view>
</view>
<view class="to-more-box">
<image src="../../images/jifen-icon.png" class="jifen-icon"></image>
<view class="col-text">积分详情</view>
<image src="../../images/arror-d.png" class="arror-r-icon"></image>
</view>
</view>
</view>
<view class="menu-list">
<view class="menu-item acea-row row-middle row-between">
<view class="item-l acea-row row-middle">
<image src="../../images/menu1.png"></image>
<text>去提现</text>
</view>
<image src="../../images/arror-r.png" class="arrow-r"></image>
</view>
<view class="menu-item acea-row row-middle row-between">
<view class="item-l acea-row row-middle">
<image src="../../images/menu2.png"></image>
<text>我的团队</text>
</view>
<image src="../../images/arror-r.png" class="arrow-r"></image>
</view>
<view class="menu-item acea-row row-middle row-between">
<view class="item-l acea-row row-middle">
<image src="../../images/menu3.png"></image>
<text>设置</text>
</view>
<image src="../../images/arror-r.png" class="arrow-r"></image>
</view>
<view class="menu-item acea-row row-middle row-between">
<view class="item-l acea-row row-middle">
<image src="../../images/menu4.png"></image>
<text>官方客服电话:027-88888877</text>
</view>
</view>
</view>
</view>

113
pages/user/index.wxss

@ -0,0 +1,113 @@
/* pages/user/index.wxss */
.user-page{
width: 100%;
min-height: 100vh;
padding: 40rpx;
background: #F8F8F8;
}
.user-box{
width: 100%;
}
.avatar{
width: 128rpx;
height: 128rpx;
border-radius: 50%;
margin-right: 30rpx;
}
.avatar image{
border-radius: 50%;
}
.userInfo{
color: #333333;
font-size: 40rpx;
font-weight: 500;
}
.id-num{
color: #E1994C;
font-weight: 400;
font-size: 36rpx;
}
.panel-box{
width: 100%;
height: 304rpx;
position: relative;
margin-top: 32rpx;
}
.panel-bg{
position: absolute;
left: 0;
}
.panel-content{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
font-size: 28rpx;
color: #fff;
padding: 32rpx 0;
}
.profit-box{
width: 312rpx;
text-align: center;
}
.fz40{
font-size: 40rpx;
}
.mt20{
margin: 20rpx 0;
}
.col-line{
width: 2rpx;
height: 100%;
background: #fff;
}
.sale-box{
width: 256rpx;
text-align: center;
}
.to-more-box{
width: 100rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.jifen-icon{
width: 37rpx;
height: 42rpx;
}
.col-text{
width: 30rpx;
margin: 4rpx 0;
}
.arror-r-icon{
width: 28rpx;
height: 16rpx;
}
.menu-list{
width: 100%;
background: #fff;
border-radius: 24rpx;
margin-top: 24rpx;
}
.menu-item{
width: 100%;
height: 136rpx;
padding: 0 32rpx;
border-bottom: 1px solid #F2F2F2;
}
.menu-item:nth-last-child(1){
border: none;
}
.item-l image{
width: 48rpx;
height: 48rpx;
margin-right: 16rpx;
}
.arrow-r{
width: 16rpx;
height: 28rpx;
}

66
pages/user/myTeam/index.js

@ -0,0 +1,66 @@
// pages/user/myTeam/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/myTeam/index.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "我的团队"
}

30
pages/user/myTeam/index.wxml

@ -0,0 +1,30 @@
<!--pages/user/myTeam/index.wxml-->
<view class="index-page">
<view class="data-panel-box acea-row row-between">
<view>
<view>今日新增</view>
<view class="fz40">20人</view>
</view>
<view>
<view>一级</view>
<view class="fz40">12人</view>
</view>
<view>
<view>二级</view>
<view class="fz40">8人</view>
</view>
</view>
<view class="t-header acea-row row-middle row-between">
<view class="h-item">成员名称</view>
<view class="h-item w180">一级积分收益</view>
<view class="h-item w180">二级积分收益</view>
</view>
<view class="t-body">
<view class="b-item acea-row row-middle row-between">
<view class="name">李元芳</view>
<view class="name w180">500积分</view>
<view class="name w180">9030积分</view>
</view>
</view>
</view>

45
pages/user/myTeam/index.wxss

@ -0,0 +1,45 @@
/* pages/user/myTeam/index.wxss */
.index-page{
width: 100%;
min-height: 100vh;
background: #F8F8F8;
padding: 32rpx 38rpx;
}
.data-panel-box{
width: 100%;
padding: 38rpx 66rpx;
background: #FFD092;
border-radius: 24rpx;
color: #fff;
}
.data-panel-box view{
text-align: center;
}
.fz40{
font-size: 40rpx;
line-height: 56rpx;
}
.t-header{
width: 100%;
height: 48rpx;
border-radius: 16rpx;
color: #AF681B;
font-size: 28rpx;
background: #fff;
padding: 0 22rpx;
margin: 16rpx 0;
}
.b-item{
width: 100%;
padding: 22rpx;
background: #fff;
border-radius: 24rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
color: #CC8E46;
}
.w180{
width: 180rpx;
text-align: center;
}

66
pages/user/profit/index.js

@ -0,0 +1,66 @@
// pages/user/profit/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/user/profit/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTitleText": "我的收益",
"enablePullDownRefresh": true
}

42
pages/user/profit/index.wxml

@ -0,0 +1,42 @@
<!--pages/user/profit/index.wxml-->
<view class="profit-page">
<view class="user-box acea-row row-middle">
<view class="avatar"><image src="../../../images/logo.png"></image></view>
<view class="userInfo">
<view class="name">赵铁柱</view>
<view class="id-num">ID:2123</view>
</view>
</view>
<view class="profit-box">
<image src="../../../images/profit.png" class="profit-bg"></image>
<view class="profit-info">
<view class="acea-row row-between">
<view class="">
<view>今日收益</view>
<view class="fz40">200积分</view>
</view>
<view class="">
<view>累计收益</view>
<view class="fz40">200积分</view>
</view>
</view>
<view class="to-cash-out">去提现</view>
</view>
</view>
<view class="int-list">
<view class="int-t">积分动态</view>
<view class="int-item" wx:for="{{3}}" :key="index">
<view>
<view class="title">禅易风云</view>
<view class="time colR">2021-11-26</view>
</view>
<view class="">
<view class="title fz40 colR">+500积分</view>
<view class="time">一级收益</view>
</view>
</view>
</view>
</view>

93
pages/user/profit/index.wxss

@ -0,0 +1,93 @@
/* pages/user/profit/index.wxss */
.profit-page{
width: 100%;
min-height: 100vh;
padding: 40rpx;
background: #F8F8F8;
}
.user-box{
width: 100%;
}
.avatar{
width: 128rpx;
height: 128rpx;
border-radius: 50%;
margin-right: 30rpx;
}
.avatar image{
border-radius: 50%;
}
.userInfo{
color: #333333;
font-size: 40rpx;
font-weight: 500;
}
.id-num{
color: #E1994C;
font-weight: 400;
font-size: 36rpx;
}
.profit-box{
width: 100%;
height: 256rpx;
position: relative;
margin-top: 20rpx;
}
.profit-box image{
position: absolute;
top: 0;
}
.profit-info{
width: 100%;
height: 100%;
position: absolute;
top: 0;
z-index: 3;
padding: 48rpx 94rpx 0 94rpx;
color: #E18F38;
text-align: center;
}
.fz40{
font-size: 40rpx;
}
.to-cash-out{
width: 180rpx;
height: 64rpx;
background: #FFFFFF;
border-radius: 32rpx;
text-align: center;
line-height: 64rpx;
font-size: 28rpx;
color: #E1994C;
margin: 16rpx auto;
}
.int-list{
margin-top: 32rpx;
width: 100%;
}
.int-t{
color: #AA6214;
font-size: 32rpx;
font-weight: 500;
margin-bottom: 16rpx;
}
.int-item{
width: 100%;
padding: 36rpx 32rpx;
font-size: 28rpx;
color: #3A3A3A;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
border: 24rpx;
margin-bottom: 16rpx;
border-radius: 32rpx;
}
.title{
font-weight: 500;
}
.colR{
color: #CC8E46;
}
Loading…
Cancel
Save