Browse Source

cy首頁

zys
kk_888 3 years ago
parent
commit
9fe11a1012
  1. 47
      api/http.js
  2. 22
      api/store.js
  3. 25
      api/user.js
  4. 86
      app.js
  5. 49
      app.json
  6. 2
      app.wxss
  7. BIN
      images/arror-d.png
  8. BIN
      images/arror-r.png
  9. BIN
      images/company-info.png
  10. BIN
      images/home-bg.png
  11. BIN
      images/home-footer.png
  12. BIN
      images/jifen-icon.png
  13. BIN
      images/jixiang.png
  14. BIN
      images/logo.png
  15. BIN
      images/member1.png
  16. BIN
      images/member2.png
  17. BIN
      images/member3.png
  18. BIN
      images/member4.png
  19. BIN
      images/member5.png
  20. BIN
      images/menu1.png
  21. BIN
      images/menu2.png
  22. BIN
      images/menu3.png
  23. BIN
      images/menu4.png
  24. BIN
      images/panel.png
  25. BIN
      images/profit.png
  26. BIN
      images/title1.png
  27. BIN
      images/title2.png
  28. BIN
      images/yssh.png
  29. 2
      pages/companyInfo/index.wxml
  30. 3
      pages/companyInfo/index.wxss
  31. 6
      pages/courseDetail/index.js
  32. 16
      pages/courseDetail/index.wxml
  33. 87
      pages/courseReservation/index.js
  34. 9
      pages/courseReservation/index.wxml
  35. 4
      pages/courseReservation/index.wxss
  36. 1
      pages/goodsDetail/index.js
  37. 20
      pages/goodsList/index.js
  38. 6
      pages/goodsList/index.wxml
  39. 49
      pages/home/index.js
  40. 137
      pages/home/index.wxml
  41. 186
      pages/home/index.wxss
  42. 50
      pages/index/index.js
  43. 3
      pages/index/index.json
  44. 23
      pages/index/index.wxml
  45. 19
      pages/index/index.wxss
  46. 57
      pages/login/index.js
  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. 69
      pages/user/cashOut/index.js
  56. 5
      pages/user/cashOut/index.json
  57. 20
      pages/user/cashOut/index.wxml
  58. 79
      pages/user/cashOut/index.wxss
  59. 75
      pages/user/index.js
  60. 5
      pages/user/index.json
  61. 74
      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. 91
      pages/user/profit/index.js
  68. 5
      pages/user/profit/index.json
  69. 53
      pages/user/profit/index.wxml
  70. 93
      pages/user/profit/index.wxss
  71. 2
      project.config.json

47
api/http.js

@ -0,0 +1,47 @@
const baseURL = 'http://192.168.0.112:8088/api/';
export function $http(methods,url,params){
var header = {
'content-type': 'application/json',
'Authorization' :'Bearer '+ wx.getStorageSync('token') || '',
'dept': '16'
};
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',
})
return
}
if(res.data.success){
resolve(res);
} else{
wx.showToast({
title: '服务器错误,请稍后再试!',
icon : 'none'
})
reject(err)
}
},
fail: err=> {
wx.hideLoading();
wx.showToast({
title: '服务器错误,请稍后再试!',
icon : 'none'
})
reject(err)
}
})
})
}

22
api/store.js

@ -0,0 +1,22 @@
const http = require('./http.js')
/*
* 商品分类
* */
export function getCategory() {
return http.$http('get','category');
}
/*
* 商品列表
* */
export function getProducts(q) {
return http.$http('get','products',q)
}
/*
* 商品详情
* */
export function getProductDetail(id) {
return http.$http('get',"/product/detail/" + id)
}

25
api/user.js

@ -0,0 +1,25 @@
const http = require('./http.js')
//绑定手机号
export function bingPhone(){
return http.$http()
}
//获取用户信息
export function getUserInfo(){
return http.$http('get','userinfo')
}
//立即咨询
export function saleLeads(data){
return http.$http('post','user/saleLeads',data)
}
// 获取我的团队
export function getMyTeam(){
return http.$http('get','getTeam')
}
// 积分动态
export function getIntegralList(data){
return http.$http('get','integral/list',data)
}

86
app.js

@ -1,59 +1,51 @@
// app.js
const http = require('./api/http.js')
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
},
login(loginInfo){
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
},
http(methods,url,params){
var header = {
'content-type': 'application/json',
'Authorization' : wx.getStorageSync('token') || ''
};
login(){
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'
wx.getUserProfile({
lang: 'zh_CN',
desc: '需要获取您的信息用来展示',
success: res => {
wx.showLoading({ title: '登录中' })
wx.login({
success: result => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
let data = {
code: result.code,
iv: res.iv,
encryptedData: res.encryptedData
}
console.log(data)
http.$http('post','wxapp/auth',data).then((result)=>{
if(result.data.success){
wx.setStorageSync('token', result.data.data.token)
wx.setStorageSync('userInfo', result.data.data.user)
wx.showToast({
title: '授权成功!',
icon: 'none'
})
} else{
wx.showToast({
title: result.data.msg,
icon: 'none'
})
}
resolve(result)
})
}
})
reject(err)
},
fail: res=>{
console.log('取消授权')
}
})
})
},
globalData: {
baseURL : 'http://192.168.0.114:8092/api/',
// baseURL : 'https://cloud.api.cyjyyjy.com/api/',
http: http.$http,
products: []
}
})
})

49
app.json

@ -1,16 +1,43 @@
{
"pages": [
"pages/courseDetail/index",
"pages/companyPage/index",
"pages/courseReservation/index",
"pages/goodsDetail/index",
"pages/goodsList/index",
"pages/home/index",
"pages/login/index",
"pages/companyInfo/index",
"pages/index/index"
"pages/home/index",
"pages/courseDetail/index",
"pages/companyInfo/index",
"pages/companyPage/index",
"pages/courseReservation/index",
"pages/user/bindCard/index",
"pages/user/profit/index",
"pages/user/cashOut/index",
"pages/goodsDetail/index",
"pages/goodsList/index",
"pages/login/index",
"pages/user/index",
"pages/user/myTeam/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": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
@ -19,4 +46,4 @@
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
}

2
app.wxss

@ -12,6 +12,8 @@ image {
}
image{
/* border-radius: 8rpx; */
width: 100%;
height: 100%;
}
/* layout */
.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/company-info.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

BIN
images/home-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
images/home-footer.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
images/jifen-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

BIN
images/jixiang.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 KiB

BIN
images/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
images/member1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
images/member2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
images/member3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
images/member4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
images/member5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 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/panel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/profit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
images/title1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/title2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/yssh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

2
pages/companyInfo/index.wxml

@ -18,5 +18,5 @@
<view class="item"><image src="../../images/jixiang.png" mode="aspectFill"></image></view>
</view>
</view>
<view class="submit-btn" bindtap="toList">更多商品</view>
<view class="submit-btn acea-row row-center" bindtap="toList">更多商品</view>
</view>

3
pages/companyInfo/index.wxss

@ -44,5 +44,8 @@
border-radius: 8rpx;
}
.submit-btn{
width: 200rpx;
margin: 60rpx auto;
padding: 5rpx;
border: 1px solid #000;
}

6
pages/courseDetail/index.js

@ -14,7 +14,11 @@ Page({
onLoad: function (options) {
},
toReservation(){
wx.navigateTo({
url: '/pages/courseReservation/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

16
pages/courseDetail/index.wxml

@ -4,19 +4,19 @@
<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="headline">国学智慧-怎样学好国学</view>
<view class="subtitle">国学智慧-怎样学好国学</view>
<view class="placeicon acea-row row-middle">
<image src="../../images/placeicon.png" ></image>
<image src="../../images/placeicon.png"></image>
<text>武汉</text>
</view>
<view class="timeicon acea-row row-middle">
<image src="../../images/time.png" ></image>
<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 class="order-btn acea-row row-center-wrapper" bindtap="toReservation">去预约</view>
</view>
</view>
<view class="introduse-box">
<view class="teach acea-row row-middle">
@ -29,7 +29,6 @@
<view class="name">李大辉</view>
<view>中国资深国学大师</view>
</view>
</view>
<view class="desc">中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资</view>
</view>
@ -40,8 +39,9 @@
</view>
<view class="course-con">
<image src="../../images/lh-top.png"></image>
<view>中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资.</view>
<view>中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资.</view>
<view>
中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师
</view>
<image src="../../images/lh-bottom.png"></image>
</view>
</view>

87
pages/courseReservation/index.js

@ -1,20 +1,95 @@
// pages/courseReservation/index.js
const app = getApp()
const user = require('../../api/user.js')
const store = require('../../api/store.js')
Page({
/**
* 页面的初始数据
*/
data: {
isAuth: false, //是否认证
authorize: false,
canIUseGetUserProfile: false,//判断小程序的api是否能够在当前版本使用
form: {
name: '',
phone: '',
},
products: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true //获取用户信息
})
}
this.getProducts()
},
//获取产品列表
getProducts(){
store.getCategory().then((res)=>{
this.setData({
products: res.data.data[0].children[0].products
})
app.globalData.products = res.data.data[0].children[0].products
})
},
getUserInfoProfile(){
app.login().then((res)=>{
if(res.data.success){
this.setData({
isAuth: true
})
}
})
},
inpName(e){
this.setData({
'form.name': e.detail.value
})
},
inpPhone(e){
this.setData({
'form.phone': e.detail.value
})
},
submitInfo(){
if(this.data.form.name == '' ){
return this.alertMessage('请输入您的姓名')
} else if(this.data.form.phone == ''){
return this.alertMessage('请输入您的电话')
}
user.saleLeads(this.data.form).then((res)=>{
wx.showModal({
title: '温馨提示',
content: '恭喜您预约成功,稍后会有专属服务老师与您联系。',
showCancel: false
})
})
},
alertMessage(msg){
wx.showToast({
title: msg,
icon: 'none'
})
},
toDetial(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/goodsDetail/index?id='+ id,
})
},
toCompany(){
wx.navigateTo({
url: '/pages/companyInfo/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -26,7 +101,11 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(wx.getStorageSync('token')){
this.setData({
isAuth: true
})
}
},
/**

9
pages/courseReservation/index.wxml

@ -4,10 +4,13 @@
<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"/>
<input type="text" class="input" placeholder="刘天城" placeholder-style="color:#fff" bindtap="inpName" value="{{form.name}}"/>
<view class="tel"><image src="../../images/telbg.png" ></image></view>
<input type="text" class="input" placeholder="17671086998" placeholder-style="color:#fff"/>
<input type="text" class="input" placeholder="17671086998" placeholder-style="color:#fff" bindtap="inpPhone" value="{{form.phone}}"/>
</view>
<button class="submit">提交</button>
<button class="submit-btn" wx:if="{{canIUseGetUserProfile && !isAuth}}" bindtap="getUserInfoProfile">提交</button>
<button class="submit-btn" wx:if="{{!canIUseGetUserProfile && !isAuth}}" open-type="getUserInfo" bindtap="getUserInfo">提交</button>
<view class="submit-btn acea-row row-center-wrapper" wx:if="{{isAuth}}" bindtap="submitInfo">提交</view>
<view class="bottom-bg"><image src="../../images/lh-bottom.png"></image></view>
</view>

4
pages/courseReservation/index.wxss

@ -40,13 +40,15 @@
height: 48rpx;
margin-top: 64rpx;
}
.submit{
.submit-btn{
width: 300rpx;
height: 80rpx;
background: linear-gradient(49deg, #E6A717 0%, #FFD471 100%);
border-radius: 16rpx;
font-size: 36rpx;
color: #fff;
margin-bottom: 224rpx;
margin: 0 auto;
}
.bottom-bg image{
width: 100%;

1
pages/goodsDetail/index.js

@ -24,6 +24,7 @@ Page({
url: '/pages/goodsList/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

20
pages/goodsList/index.js

@ -1,22 +1,36 @@
// pages/goodsList/index.js
const app = getApp()
const user = require('../../api/user.js')
const store = require('../../api/store.js')
Page({
/**
* 页面的初始数据
*/
data: {
products: [],
loadingStatus: '没有更多了。。。'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(this.data.products)
this.getProducts()
},
//获取产品列表
getProducts(){
store.getCategory().then((res)=>{
this.setData({
products: res.data.data[0].children[0].products
})
})
},
toDetail(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/goodsDetail/index',
url: '/pages/goodsDetail/index?id=' + id,
})
},
/**

6
pages/goodsList/index.wxml

@ -7,12 +7,12 @@
<view class="search-btn">搜一下</view>
</view>
<view class="goods-list">
<view class="goods-item acea-row" wx:for="{{3}}" :key="index" bindtap="toDetail" data-id="id">
<image src="../../images/jixiang.png" class="img" mode="aspectFill"></image>
<view class="goods-item acea-row" wx:for="{{products}}" :key="index" bindtap="toDetail" data-id="id">
<image src="{{item.image}}" class="img" mode="aspectFill"></image>
<view class="goods-info">
<view class="name line1">无极先天密码</view>
<view class="tips">商道智慧</view>
<view class="desc line1">商道商道智慧商道智慧商道智慧商道智慧智慧</view>
<view class="desc line1">{{item.storeName}}</view>
<view class="location-box acea-row row-middle">
<view class="address">
<image src="../../images/address.png"></image>

49
pages/home/index.js

@ -1,31 +1,52 @@
// pages/home/index.js
const app = getApp()
const user = require('../../api/user.js')
const store = require('../../api/store.js')
Page({
/**
* 页面的初始数据
*/
data: {
isAuth: false, //是否认证
authorize: false,
canIUseGetUserProfile: false
canIUseGetUserProfile: false,//判断小程序的api是否能够在当前版本使用
form: {
name: '',
phone: '',
},
products: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// this.getUserInfo()
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true //获取用户信息
})
}
this.getProducts()
},
//获取产品列表
getProducts(){
store.getCategory().then((res)=>{
this.setData({
products: res.data.data[0].children[0].products
})
app.globalData.products = res.data.data[0].children[0].products
})
},
getUserInfoProfile(){
wx.getUserProfile({
lang: 'zh_CN',
desc: '需要获取您的信息用来展示',
success: res => {
console.log(res)
uni.showLoading({
title: '登录中',
app.login().then((res)=>{
if(res.data.success){
this.setData({
isAuth: true
})
},
}
})
},
toDetial(){
@ -38,6 +59,12 @@ Page({
url: '/pages/companyInfo/index',
})
},
//点击查看
toCheck(){
wx.navigateTo({
url: '/pages/companyPage/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

137
pages/home/index.wxml

@ -1,64 +1,85 @@
<!--pages/home/index.wxml-->
<view class="home-page">
<view class="top-box">
<image src="../../images/top-bg.png"></image>
<view class="top-content">
<view class="title-box">
<image src="../../images/title.png"></image>
<view class="tosee-btn">点击查看</view>
</view>
<image src="../../images/ts.png" class="tisheng"></image>
<view class="top-box acea-row row-center-wrapper">
<image src="../../images/yssh.png"></image>
<view class="click acea-row row-center-wrapper">点击了解</view>
</view>
</view>
<view class="teacher-introduce-box">
<view class="t-box acea-row row-middle">
<view>名师介绍</view>
<image src="../../images/lh-icon.png"></image>
<view class="home-list-box">
<view class="title">名师讲团</view>
<view class="list-item acea-row row-middle">
<image src="../../images/member1.png"></image>
<view class="row-line">
<view class="name">李俊成</view>
<view class="name2">世界记忆大师</view>
<view class="name2">最强大脑国家队队员</view>
<view class="desc">
<view>《最强大脑》第三季指纹解码师</view>
<view>世界记忆锦标赛奥运形象大使</view>
<view>绘背了APP创始人</view>
</view>
</view>
</view>
<view class="list-item acea-row row-middle">
<view class="row-line">
<view class="name">张敬成</view>
<view class="name2">世界记忆大师</view>
<view class="desc">
<view>第25届世界记忆锦标赛推广大使</view>
<view>第25届世界记忆锦标赛城市赛执行主席</view>
<view>绘背了APP创始人</view>
<view>记忆培训行业金牌讲师</view>
<view>培养学生30000+</view>
</view>
</view>
<image src="../../images/member2.png"></image>
</view>
<view class="list-item acea-row row-middle">
<image src="../../images/member3.png"></image>
<view class="row-line">
<view class="name">付成伟</view>
<view class="desc">
<view>世界记忆锦标赛城市赛总亚军</view>
<view>世界记忆锦标赛选手训练导师</view>
<view>超级记忆力金牌讲师</view>
<view>绘背了APP技术执行官</view>
</view>
</view>
</view>
<view class="list-item acea-row row-middle">
<view class="row-line">
<view class="name">刘杰</view>
<view class="desc">
<view>第25届世界记忆锦标赛城市赛裁判长</view>
<view>世界记忆锦标赛选手训练导师</view>
<view>超级记忆力金牌讲师</view>
<view>绘背了APP联合创始人</view>
</view>
</view>
<image src="../../images/member4.png"></image>
</view>
<view class="list-item acea-row row-middle">
<image src="../../images/member5.png"></image>
<view class="row-line">
<view class="name">胡宝运</view>
<view class="desc">
<view>世界记忆锦标赛城市赛单项冠军</view>
<view>世界记忆锦标赛选手训练导师</view>
<view>思维导图金牌讲师</view>
<view>10年企业内训经验</view>
</view>
</view>
</view>
<view class="bottom-world acea-row row-between">
<image src="../../images/home-bg.png"></image>
<view class="world acea-row row-between">
<view>强将手下无弱兵 名师更易出高徒</view>
<view>记忆大师助启航 解决你的记忆烦恼</view>
</view>
</view>
</view>
<view class="teacher-item acea-row">
<view class="item-l">
<image src="../../images/header.png"></image>
<view class="name">刘朗菘,字瑞蓢</view>
</view>
<view class="introduce">
<view class="tips">国学文化传播导师 当代民间隐士 武术练养家</view>
<view class="desc">湖北省文化产业商会常务副会长、传统文化专业委员会主任、国际易学研究院“中国易理策划名师”、“中国名师讲师”
“东方智慧国学风云人物终身推广者”。</view>
</view>
</view>
<view class="teacher-item acea-row flexR">
<view class="item-l">
<image src="../../images/header.png"></image>
<view class="name">刘朗菘,字瑞蓢</view>
</view>
<view class="introduce">
<view class="tips">国学文化传播导师 当代民间隐士 武术练养家</view>
<view class="desc">湖北省文化产业商会常务副会长、传统文化专业委员会主任、国际易学研究院“中国易理策划名师”、“中国名师讲师”
“东方智慧国学风云人物终身推广者”。</view>
</view>
</view>
</view>
<view class="course-introduce-box">
<view class="t-box acea-row row-middle">
<view>课程介绍</view>
<image src="../../images/lh-icon.png"></image>
<view class="footer">
<view class="title">名师讲团</view>
<image src="../../images/home-footer.png"></image>
</view>
<view class="course-item">
<view class="course-name">
<image src="../../images/title-bg.png"></image>
<text>传统武术</text>
</view>
<view class="introduce"> 中国武术不仅是一种中国传统的体育运动形式,而且是一个完整的文化意识形态,它涵容了中国古典哲学、伦理学、美学,医学、兵学等中国传统文化的各种成分和要素,渗透着中国传统文化的精髓。武术具有极其广泛的群众基础,是中国人民在长期的社会实践中不断积累和丰富起来的一项宝贵的文化遗产 </view>
</view>
<view class="course-item">
<view class="course-name">
<image src="../../images/title-bg.png"></image>
<text>传统武术</text>
</view>
<view class="introduce"> 中国武术不仅是一种中国传统的体育运动形式,而且是一个完整的文化意识形态,它涵容了中国古典哲学、伦理学、美学,医学、兵学等中国传统文化的各种成分和要素,渗透着中国传统文化的精髓。武术具有极其广泛的群众基础,是中国人民在长期的社会实践中不断积累和丰富起来的一项宝贵的文化遗产 </view>
</view>
</view>
<view class="submit-btn">
<image src="../../images/btn-bg.png"></image>
</view>
<view class="btn-order acea-row row-center-wrapper">前去预约</view>
</view>

186
pages/home/index.wxss

@ -1,144 +1,98 @@
/* pages/home/index.wxss */
page{
width: 100%;
background: #343434;
background: #131313;
}
.home-page{
background: #343434;
margin-top: 72rpx;
}
.top-box{
width: 100%;
height: 1160rpx;
position: relative;
}
.top-box image{
width: 100%;
height: 100%;
position: absolute;
height: 1000rpx;
position: relative;
}
.top-content{
width: 100%;
height: 100%;
.click{
position: absolute;
z-index: 3;
padding-top: 180rpx;
padding-left: 40rpx;
}
.top-content .tisheng{
width: 176rpx;
height: 64rpx;
font-size: 32rpx;
border-radius: 32rpx;
bottom: 80rpx;
color: #9A7045;
border: 2rpx solid #9B7245;
}
.home-list-box{
padding: 0 40rpx;
margin: 18rpx 0 0 0;
}
.title{
font-size: 48rpx;
color: #9A7045;
}
.list-item{
width: 670rpx;
height: 316rpx;
background: linear-gradient(11deg, #E9DECA 0%, #FCFCFA 100%);
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.16);
border-radius: 14px;
margin: 24rpx 0 0 0;
}
.list-item image{
width: 316rpx;
height: 760rpx;
height: 316rpx;
border-radius: 14px;
}
.title-box{
width: 100%;
height: 80rpx;
position: relative;
.row-line{
padding-left: 24rpx;
}
.title-box image{
width: 434rpx;
height: 74rpx;
margin-right: 16rpx;
}
.tosee-btn{
width: 134rpx;
height: 54rpx;
border: 2rpx solid #986F43;
border-radius: 28rpx;
text-align: center;
line-height: 54rpx;
color: #986F43;
font-size: 24rpx;
position: absolute;
left: 456rpx;
top: 20rpx;
.name{
font-size: 48rpx;
color: #4A3737;
margin-bottom: 10rpx;
}
.teacher-introduce-box,.course-introduce-box{
width: 100%;
padding: 20rpx 40rpx;
background: #343434;
}
.teacher-item{
margin-bottom: 76rpx;
}
.item-l image{
width: 240rpx;
height: 240rpx;
}
.item-l .name{
font-size: 36rpx;
color: #987A59;
font-weight: 500;
margin-top: 24rpx;
}
.teacher-introduce-box .introduce{
width: 400rpx;
margin-left: 20rpx;
font-size: 24rpx;
color: #E5E5E5;
}
.introduce .tips{
font-size: 36rpx;
color: #fff;
margin-bottom: 24rpx;
.name2{
font-size: 28rpx;
color: #C5A669;
}
.flexR{
flex-direction: row-reverse;
.desc{
font-size: 20rpx;
color: #C5A669;
margin-top: 8rpx;
}
.course-item{
width: 100%;
background: #171414;
border-radius: 32rpx;
padding: 32rpx 24rpx;
position: relative;
margin-bottom: 80rpx;
.bottom-world{
width: 670rpx;
height: 160rpx;
margin-top: 16rpx;
}
.course-name{
width: 400rpx;
height: 76rpx;
.world{
position: absolute;
font-size: 32rpx;
color: #363636;
text-align: center;
line-height: 76rpx;
left: 50%;
top: -38rpx;
transform: translateX(-50%);
}
.course-name image{
width: 100%;
height: 100%;
position: absolute;
left: 0;
color: #9A7045;
margin: 15rpx 0 0 84rpx;
}
.course-name text{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
z-index: 3;
}
.course-item .introduce{
font-size: 24rpx;
color: #707070;
line-height: 34rpx;
margin-top: 12rpx;
text-indent: 1em;
}
.t-box{
color: #987A59;
font-size: 40rpx;
margin-bottom: 40rpx;
.world view{
margin-top: 20rpx;
}
.t-box image{
width: 64rpx;
height: 64rpx;
margin-left: 8rpx;
}
.submit-btn {
.footer{
width: 100%;
height: 156rpx;
margin-top: 22rpx;
padding: 0 40rpx;
}
.submit-btn image{
.footer image{
width: 100%;
height: 100%;
height: 736rpx;
margin: 14rpx 0 24rpx 0;
}
.btn-order{
font-size: 40rpx;
color: #fff;
width: 394rpx;
height: 90rpx;
background: linear-gradient(225deg, #FFD87D 0%, #E19C00 100%);
border-radius: 46px;
margin: 0 auto;
margin-bottom: 40rpx;
}

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;
}

57
pages/login/index.js

@ -19,63 +19,14 @@ Page({
canIUseGetUserProfile: true
})
}
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
this.setData({
code: res.code
})
}
})
},
setUserInfo(){
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (response) => {
wx.showLoading({
title: '登陆中...',
app.login().then((res)=>{
if(res.data.success){
wx.navigateBack({
delta: 1,
})
let data = {
code: this.data.code,
iv: response.iv,
encryptedData:response.encryptedData,
spread: 0,
login_type: 0
}
app.http('POST','wxapp/auth',data).then(
result =>{
if(result.data.success){
wx.hideLoading()
wx.setStorageSync('token', 'Bearer '+ result.data.data.token)
wx.setStorageSync('userInfo', result.data.data.user)
wx.showToast({
title: '授权成功!',
duration: 1500
})
if(!result.data.data.user.phone){
this.setData({
login: true
})
} else{
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},1500)
}
} else{
wx.showToast({
title: result.data.msg,
icon : 'none'
})
}
}
)
}
})
},

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;
}

69
pages/user/cashOut/index.js

@ -0,0 +1,69 @@
// pages/user/cashOut/index.js
Page({
/**
* 页面的初始数据
*/
data: {
brokeragePrice: 20
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
brokeragePrice: options.brokeragePrice
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
}

20
pages/user/cashOut/index.wxml

@ -0,0 +1,20 @@
<!--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">{{brokeragePrice}}</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 class="submit-btn">提现</view>
</view>

79
pages/user/cashOut/index.wxss

@ -0,0 +1,79 @@
/* 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;
}
.submit-btn{
width: 440rpx;
height: 88rpx;
background: #F7C37A;
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
font-size: 42rpx;
color: #FFFFFF;
margin: 110rpx auto 0;
}

75
pages/user/index.js

@ -0,0 +1,75 @@
// pages/user/index.js
const app = getApp()
const user = require('../../api/user.js')
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// userApi.getMyTeam().then((res)=>{
// console.log(res)
// })
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getUserInfo()
},
getUserInfo(){
user.getUserInfo().then((res)=> {
this.setData({
userInfo: res.data.data
})
})
},
toCashOut(){
wx.navigateTo({
url: '/pages/user/cashOut/index?brokeragePrice=' + this.data.userInfo.brokeragePrice,
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/user/index.json

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

74
pages/user/index.wxml

@ -0,0 +1,74 @@
<!--pages/user/index.wxml-->
<view class="user-page">
<view class="user-box acea-row row-middle">
<view class="avatar"><image src="{{userInfo.avatar || '../../images/logo.png'}}"></image></view>
<view class="userInfo">
<view class="name">{{userInfo.nickname || '瑞梦思'}}</view>
<view class="id-num">ID:{{userInfo.uid}}</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">{{userInfo.todayBrokerage || 0}}积分</view>
</view>
<view class="">
<view>累计收益</view>
<view class="fz40">{{userInfo.brokeragePrice || 0}}积分</view>
</view>
</view>
<view class="col-line"></view>
<view class="sale-box">
<view class="mt20">
<view>推广人数</view>
<view class="fz40">{{userInfo.spreadCount || 0}}人</view>
</view>
<view class="">
<view>今日新增</view>
<view class="fz40">{{userInfo.todaySpreadNum || 0}}人</view>
</view>
</view>
<navigator url="/pages/user/profit/index" hover-class="none">
<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>
</navigator>
</view>
</view>
<view class="menu-list">
<view class="menu-item acea-row row-middle row-between" bindtap="toCashOut">
<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>
<navigator url="/pages/user/myTeam/index" hover-class="none">
<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>
</navigator>
<!-- <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;
}

91
pages/user/profit/index.js

@ -0,0 +1,91 @@
// pages/user/profit/index.js
const app = getApp()
const user = require('../../../api/user.js')
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: {},
integralList: [],
page: 1,
pagesize: 300,
loadingStatus: '没有更多了。。。'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
userInfo: wx.getStorageSync('userInfo')
})
this.getIntegralList()
},
getIntegralList(){
let data= {
page: this.data.page,
limit: this.data.pagesize
}
user.getIntegralList(data).then((res)=>{
this.setData({
integralList: res.data.data.content
})
})
},
toCashOut(){
wx.navigateTo({
url: '/pages/user/cashOut/index?brokeragePrice=' + this.data.userInfo.brokeragePrice,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
}

53
pages/user/profit/index.wxml

@ -0,0 +1,53 @@
<!--pages/user/profit/index.wxml-->
<view class="profit-page">
<view class="user-box acea-row row-middle">
<view class="avatar"><image src="{{userInfo.avatar}}"></image></view>
<view class="userInfo">
<view class="name">{{userInfo.nickname}}</view>
<view class="id-num">ID:{{userInfo.uid}}</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">{{userInfo.todayBrokerage}}积分</view>
</view>
<view class="">
<view>累计收益</view>
<view class="fz40">{{userInfo.brokeragePrice}}积分</view>
</view>
</view>
<view class="to-cash-out" bindtap="toCashOut">去提现</view>
</view>
</view>
<view class="int-list">
<view class="int-t">积分动态</view>
<view class="int-item" wx:for="{{integralList}}" wx:key="index">
<view>
<view class="title">{{item.title}}</view>
<view class="time colR">{{item.createTime}}</view>
</view>
<view class="">
<view class="title fz40 colR">{{item.pm == 0 ? '-' : '+'}}{{item.number}}积分</view>
<view class="time">{{item.mark}}</view>
</view>
</view>
<view class="loading-status">{{loadingStatus}}</view>
<!-- <view class="int-item">
<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;
}

2
project.config.json

@ -40,7 +40,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.19.4",
"appid": "wxdb1f3c2997df014a",
"appid": "wx5bd2ad30d3bb47c5",
"projectname": "%E7%A6%85%E6%98%93%E8%AF%BE%E5%A0%82",
"debugOptions": {
"hidedInDevtools": []

Loading…
Cancel
Save