Browse Source

提现,部分ui修改

master
杨豪 3 years ago
parent
commit
a0b12aef3b
  1. 13
      api/http.js
  2. 12
      api/user.js
  3. 6
      app.js
  4. 4
      app.json
  5. 6
      app.wxss
  6. BIN
      images/arror-d.png
  7. BIN
      images/arror-r.png
  8. BIN
      images/book-icon.png
  9. BIN
      images/btn-bg.png
  10. BIN
      images/company-info.png
  11. BIN
      images/coursepage.png
  12. BIN
      images/cy1.png
  13. BIN
      images/cy2.png
  14. BIN
      images/cy3.png
  15. BIN
      images/head.png
  16. BIN
      images/header.png
  17. BIN
      images/home-bg.png
  18. BIN
      images/home-footer.png
  19. BIN
      images/jifen-icon.png
  20. BIN
      images/jixiang.png
  21. BIN
      images/lh-bottom.png
  22. BIN
      images/lh-ico.png
  23. BIN
      images/lh-icon.png
  24. BIN
      images/lh-top.png
  25. BIN
      images/lh.png
  26. BIN
      images/logo.png
  27. BIN
      images/member1.png
  28. BIN
      images/member2.png
  29. BIN
      images/member3.png
  30. BIN
      images/member4.png
  31. BIN
      images/member5.png
  32. BIN
      images/panel.png
  33. BIN
      images/title-bg.png
  34. BIN
      images/title1.png
  35. BIN
      images/title2.png
  36. BIN
      images/top-bg.png
  37. BIN
      images/yssh.png
  38. 6
      pages/companyPage/index.js
  39. 4
      pages/companyPage/index.wxml
  40. 16
      pages/courseDetail/index.wxml
  41. 6
      pages/courseDetail/index.wxss
  42. 4
      pages/courseReservation/index.js
  43. 5
      pages/courseReservation/index.wxml
  44. 3
      pages/goodsList/index.wxss
  45. 2
      pages/home/index.js
  46. 2
      pages/home/index.wxml
  47. 19
      pages/home/index.wxss
  48. 48
      pages/user/bindCard/index.js
  49. 8
      pages/user/bindCard/index.wxml
  50. 36
      pages/user/cashOut/index.js
  51. 8
      pages/user/cashOut/index.wxml
  52. 8
      pages/user/index.js
  53. 2
      pages/user/index.wxml
  54. 21
      pages/user/myTeam/index.js
  55. 3
      pages/user/myTeam/index.json
  56. 16
      pages/user/myTeam/index.wxml
  57. 142
      project.config.json
  58. 43
      project.private.config.json

13
api/http.js

@ -1,9 +1,9 @@
const baseURL = 'http://192.168.0.111:8088/api/'; // const baseURL= 'http://192.168.0.111:8088/api/';
const baseURL= "https://www.cyjyyjy.com/api/"
export function $http(methods,url,params){ export function $http(methods,url,params){
var header = { var header = {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization' :'Bearer '+ wx.getStorageSync('token') || '', 'Authorization':'Bearer '+ wx.getStorageSync('token') || '',
'dept': '16' 'dept': '16'
}; };
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
@ -26,10 +26,11 @@ export function $http(methods,url,params){
} }
if(res.data.success){ if(res.data.success){
resolve(res); resolve(res);
wx.hideLoading();
} else{ } else{
wx.showToast({ wx.showToast({
title: '服务器错误,请稍后再试!', title: res.data.msg,
icon : 'none' icon: 'none'
}) })
reject(err) reject(err)
} }
@ -38,7 +39,7 @@ export function $http(methods,url,params){
wx.hideLoading(); wx.hideLoading();
wx.showToast({ wx.showToast({
title: '服务器错误,请稍后再试!', title: '服务器错误,请稍后再试!',
icon : 'none' icon: 'none'
}) })
reject(err) reject(err)
} }

12
api/user.js

@ -1,7 +1,11 @@
const http = require('./http.js') const http = require('./http.js')
//绑定手机号 //绑定银行卡
export function bingPhone(){ export function bingCard(data){
return http.$http() return http.$http('post','userBank/saveBankInfo',data)
}
//提现
export function cash(data){
return http.$http('post','extract/cash',data)
} }
//获取用户信息 //获取用户信息
export function getUserInfo(){ export function getUserInfo(){
@ -15,7 +19,7 @@ export function saleLeads(data){
// 获取我的团队 // 获取我的团队
export function getMyTeam(){ export function getMyTeam(){
return http.$http('get','getTeam') return http.$http('post','user/myTeam')
} }
// 积分动态 // 积分动态

6
app.js

@ -44,6 +44,12 @@ App({
}) })
}) })
}, },
alertMessage(msg){
wx.showToast({
title: msg,
icon: 'none'
})
},
globalData: { globalData: {
http: http.$http, http: http.$http,
products: [] products: []

4
app.json

@ -1,8 +1,7 @@
{ {
"pages": [ "pages": [
"pages/goodsList/index",
"pages/home/index", "pages/home/index",
"pages/goodsList/index",
"pages/home2/index", "pages/home2/index",
"pages/courseDetail/index", "pages/courseDetail/index",
"pages/companyInfo/index", "pages/companyInfo/index",
@ -12,7 +11,6 @@
"pages/user/profit/index", "pages/user/profit/index",
"pages/user/cashOut/index", "pages/user/cashOut/index",
"pages/goodsDetail/index", "pages/goodsDetail/index",
"pages/login/index", "pages/login/index",
"pages/user/index", "pages/user/index",
"pages/user/myTeam/index" "pages/user/myTeam/index"

6
app.wxss

@ -83,3 +83,9 @@ image{
-webkit-box-orient:vertical; -webkit-box-orient:vertical;
overflow:hidden; overflow:hidden;
} }
.loading-status{
text-align: center;
font-size: 28rpx;
color: #B9B9B9;
}

BIN
images/arror-d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 456 B

BIN
images/arror-r.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 365 B

BIN
images/book-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/btn-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
images/company-info.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 KiB

BIN
images/coursepage.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

BIN
images/cy1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 KiB

After

Width:  |  Height:  |  Size: 131 KiB

BIN
images/cy2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

After

Width:  |  Height:  |  Size: 166 KiB

BIN
images/cy3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 126 KiB

BIN
images/head.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

BIN
images/header.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

BIN
images/home-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/home-footer.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
images/jifen-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

After

Width:  |  Height:  |  Size: 696 B

BIN
images/jixiang.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 KiB

BIN
images/lh-bottom.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 27 KiB

BIN
images/lh-ico.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 918 B

BIN
images/lh-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 863 B

BIN
images/lh-top.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 27 KiB

BIN
images/lh.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
images/member1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 29 KiB

BIN
images/member2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
images/member3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
images/member4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
images/member5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
images/panel.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
images/title-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

BIN
images/title1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
images/title2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
images/top-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 KiB

BIN
images/yssh.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 52 KiB

6
pages/companyPage/index.js

@ -14,7 +14,11 @@ Page({
onLoad: function (options) { onLoad: function (options) {
}, },
call(){
wx.makePhoneCall({
phoneNumber: '15623111593',
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

4
pages/companyPage/index.wxml

@ -3,8 +3,8 @@
<view class="cy1 cy"><image src="../../images/cy1.png" mode="aspectFill"></image></view> <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="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="cy3 cy"><image src="../../images/cy3.png" mode="aspectFill"></image></view>
<view class="footer "> <view class="footer " bindtap="call">
<view class="acea-row row-center-wrapper">全国咨询热线</view> <view class="acea-row row-center-wrapper">全国咨询热线</view>
<view class="acea-row row-center-wrapper">400-631-8531</view> <view class="acea-row row-center-wrapper">15623111593</view>
</view> </view>
</view> </view>

16
pages/courseDetail/index.wxml

@ -6,19 +6,19 @@
<view class="subscribe-con"> <view class="subscribe-con">
<view class="headline">{{detail.storeInfo.storeInfo}}</view> <view class="headline">{{detail.storeInfo.storeInfo}}</view>
<view class="subtitle">{{detail.storeInfo.storeName}}</view> <view class="subtitle">{{detail.storeInfo.storeName}}</view>
<view class="placeicon acea-row row-middle"> <!-- <view class="placeicon acea-row row-middle">
<image src="../../images/placeicon.png"></image> <image src="../../images/placeicon.png"></image>
<text>武汉</text> <text>武汉</text>
</view> </view>
<view class="timeicon acea-row row-middle"> <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> <text>2021.11.13-11.15</text>
</view> </view> -->
<view class="num">{{detail.storeInfo.sales}}人已预约</view> <view class="num">{{detail.storeInfo.sales}}人已预约</view>
<view class="order-btn acea-row row-center-wrapper" bindtap="toReservation">去预约</view> <view class="order-btn acea-row row-center-wrapper" bindtap="toReservation">去预约</view>
</view> </view>
</view> </view>
<view class="introduse-box"> <!-- <view class="introduse-box">
<view class="teach acea-row row-middle"> <view class="teach acea-row row-middle">
<image src="../../images/lh-ico.png" alt=""></image> <image src="../../images/lh-ico.png" alt=""></image>
<text>授课老师</text> <text>授课老师</text>
@ -31,18 +31,16 @@
</view> </view>
</view> </view>
<view class="desc">中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资</view> <view class="desc">中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资</view>
</view> </view> -->
<view class="course-box"> <view class="course-box">
<view class="teach acea-row row-middle"> <view class="teach acea-row row-middle">
<image src="../../images/lh-ico.png" alt=""></image> <image src="../../images/lh-ico.png" alt=""></image>
<text>授课老师</text> <text>授课老师</text>
</view> </view>
<view class="course-con"> <view class="course-con">
<image src="../../images/lh-top.png"></image> <!-- <image src="../../images/lh-top.png"></image> -->
<view> <rich-text nodes="{{detail.storeInfo.description}}"></rich-text>
中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师 <!-- <image src="../../images/lh-bottom.png"></image> -->
</view>
<image src="../../images/lh-bottom.png"></image>
</view> </view>
</view> </view>

6
pages/courseDetail/index.wxss

@ -128,11 +128,13 @@
width: 100%; width: 100%;
height: 976rpx; height: 976rpx;
margin-top: 44rpx; margin-top: 44rpx;
padding: 0 40rpx; }
.teach{
padding: 20rpx 40rpx;
} }
.course-con{ .course-con{
background-color: #E7DBBD; background-color: #E7DBBD;
margin: 12rpx 0 48rpx 0; margin: 0rpx 0 56rpx 0;
} }
.course-con image{ .course-con image{
width: 100%; width: 100%;

4
pages/courseReservation/index.js

@ -13,8 +13,8 @@ Page({
authorize: false, authorize: false,
canIUseGetUserProfile: false,//判断小程序的api是否能够在当前版本使用 canIUseGetUserProfile: false,//判断小程序的api是否能够在当前版本使用
form: { form: {
name: '', name: '',
phone: '', phone: '',
}, },
products: [] products: []
}, },

5
pages/courseReservation/index.wxml

@ -4,13 +4,12 @@
<view class="title acea-row row-center-wrapper"><image src="../../images/yykc.png"></image></view> <view class="title acea-row row-center-wrapper"><image src="../../images/yykc.png"></image></view>
<view class="input-box"> <view class="input-box">
<view class="name"><image src="../../images/namebg.png"></image></view> <view class="name"><image src="../../images/namebg.png"></image></view>
<input type="text" class="input" placeholder="刘天城" placeholder-style="color:#fff" bindtap="inpName" value="{{form.name}}"/> <input type="text" class="input" placeholder="请输入姓名" placeholder-style="color:#fff" bindinput="inpName" value="{{form.name}}"/>
<view class="tel"><image src="../../images/telbg.png" ></image></view> <view class="tel"><image src="../../images/telbg.png" ></image></view>
<input type="text" class="input" placeholder="17671086998" placeholder-style="color:#fff" bindtap="inpPhone" value="{{form.phone}}"/> <input type="text" class="input" placeholder="请输入手机号" maxlength="11" placeholder-style="color:#fff" bindinput="inpPhone" value="{{form.phone}}"/>
</view> </view>
<button class="submit-btn" wx:if="{{canIUseGetUserProfile && !isAuth}}" bindtap="getUserInfoProfile">提交</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> <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="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 class="bottom-bg"><image src="../../images/lh-bottom.png"></image></view>
</view> </view>

3
pages/goodsList/index.wxss

@ -32,7 +32,6 @@
} }
.goods-item{ .goods-item{
width: 100%; width: 100%;
height: 240rpx;
background: #fff; background: #fff;
border-radius: 12rpx; border-radius: 12rpx;
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
@ -50,7 +49,7 @@
width: calc(100% - 224rpx); width: calc(100% - 224rpx);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; /* justify-content: space-between; */
} }
.name{ .name{
color: #202020; color: #202020;

2
pages/home/index.js

@ -23,7 +23,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.getUserInfo()
if (wx.getUserProfile) { if (wx.getUserProfile) {
this.setData({ this.setData({
canIUseGetUserProfile: true //获取用户信息 canIUseGetUserProfile: true //获取用户信息
@ -33,6 +32,7 @@ Page({
}, },
//获取产品列表 //获取产品列表
getProducts(){ getProducts(){
wx.hideLoading();
store.getCategory().then((res)=>{ store.getCategory().then((res)=>{
this.setData({ this.setData({
products: res.data.data[0].children[0].products products: res.data.data[0].children[0].products

2
pages/home/index.wxml

@ -71,7 +71,7 @@
</view> </view>
<view class="bottom-world acea-row row-between"> <view class="bottom-world acea-row row-between">
<image src="../../images/home-bg.png"></image> <image src="../../images/home-bg.png"></image>
<view class="world acea-row row-between"> <view class="world">
<view>强将手下无弱兵 名师更易出高徒</view> <view>强将手下无弱兵 名师更易出高徒</view>
<view>记忆大师助启航 解决你的记忆烦恼</view> <view>记忆大师助启航 解决你的记忆烦恼</view>
</view> </view>

19
pages/home/index.wxss

@ -20,7 +20,7 @@ page{
height: 64rpx; height: 64rpx;
font-size: 32rpx; font-size: 32rpx;
border-radius: 32rpx; border-radius: 32rpx;
bottom: 80rpx; bottom: 20rpx;
color: #9A7045; color: #9A7045;
border: 2rpx solid #9B7245; border: 2rpx solid #9B7245;
} }
@ -46,6 +46,7 @@ page{
border-radius: 14px; border-radius: 14px;
} }
.row-line{ .row-line{
width: calc(100% - 320rpx);
padding-left: 24rpx; padding-left: 24rpx;
} }
.name{ .name{
@ -66,15 +67,27 @@ page{
width: 670rpx; width: 670rpx;
height: 160rpx; height: 160rpx;
margin-top: 16rpx; margin-top: 16rpx;
position: relative;
}
.bottom-world image{
position: absolute;
top: 0;
} }
.world{ .world{
width: 100%;
height: 100%;
position: absolute; position: absolute;
top: 0;
z-index: 2;
font-size: 32rpx; font-size: 32rpx;
color: #9A7045; color: #9A7045;
margin: 15rpx 0 0 84rpx; display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
} }
.world view{ .world view{
margin-top: 20rpx; margin-top: 10rpx;
} }
.footer{ .footer{
width: 100%; width: 100%;

48
pages/user/bindCard/index.js

@ -1,11 +1,17 @@
// pages/user/bindCard/index.js // pages/user/bindCard/index.js
const app = getApp()
const user = require('../../../api/user.js')
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
form: {
name: '',
card: '',
bank: ''
}
}, },
/** /**
@ -14,7 +20,45 @@ Page({
onLoad: function (options) { onLoad: function (options) {
}, },
inpChange(e){
let t= e.currentTarget.dataset.type
switch (t){
case 'name':
this.setData({
'form.name': e.detail.value
})
break
case 'card':
this.setData({
'form.card': e.detail.value
})
break
case 'bank':
this.setData({
'form.bank': e.detail.value
})
break
}
},
submit(){
console.log(this.data.form)
if(this.data.form.name == '' ){
return app.alertMessage('请输入持卡人姓名')
} else if(this.data.form.card == ''){
return app.alertMessage('请输入银行卡号')
} else if(this.data.form.bank == ''){
return app.alertMessage('请输入开户行')
}
user.bingCard({
bankName: this.data.form.bank,
cardNumber: this.data.form.card,
cardholderName: this.data.form.name
}).then((res)=>{
wx.showToast({
title: '绑定成功!',
})
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

8
pages/user/bindCard/index.wxml

@ -3,16 +3,16 @@
<view class="form"> <view class="form">
<view class="form-item"> <view class="form-item">
<view class="label">持卡人</view> <view class="label">持卡人</view>
<input type="text" placeholder="请输入持卡人姓名" /> <input type="text" bindinput="inpChange" data-type="name" value="{{form.name}}" placeholder="请输入持卡人姓名" />
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="label">银行卡号</view> <view class="label">银行卡号</view>
<input type="text" placeholder="请输入银行卡号" /> <input type="text" bindinput="inpChange" data-type="card" value="{{form.card}}" placeholder="请输入银行卡号" />
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="label">开户行</view> <view class="label">开户行</view>
<input type="text" placeholder="请输入开户行" /> <input type="text" bindinput="inpChange" data-type="bank" value="{{form.bank}}" placeholder="请输入开户行" />
</view> </view>
</view> </view>
<view class="submit">确定</view> <view class="submit" bindtap="submit">确定</view>
</view> </view>

36
pages/user/cashOut/index.js

@ -1,23 +1,51 @@
// pages/user/cashOut/index.js // pages/user/cashOut/index.js
const app = getApp()
const user = '../../../api/user.js'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
brokeragePrice: 20 brokeragePrice: 0,
cashNum: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options)
this.setData({ this.setData({
brokeragePrice: options.brokeragePrice brokeragePrice: options.brokeragePrice
}) })
}, },
allCash(){
this.setData({
cashNum: this.data.brokeragePrice
})
},
cashChange(e){
this.setData({
cashNum: e.detail.value
})
},
cashClick(){
if(this.data.cashNum == '' || this.data.cashNum <= 100){
return app.alertMessage('请输入正确的积分')
}
user.cash({
extractType: 'bank',
money: this.data.cashNum
}).then((res)=>{
wx.showToast({
title: '申请提现成功',
})
setTimeout(()=>{
wx.navigateBack({
delta: 1,
})
},1500)
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

8
pages/user/cashOut/index.wxml

@ -4,7 +4,7 @@
<image src="../../../images/profit.png" class="profit-bg"></image> <image src="../../../images/profit.png" class="profit-bg"></image>
<view class="profit-info"> <view class="profit-info">
<view>当前可提现积分<text class="s-word">(积分比例为1:1)</text></view> <view>当前可提现积分<text class="s-word">(积分比例为1:1)</text></view>
<view class="fz70">{{brokeragePrice}}</view> <view class="fz70">{{brokeragePrice || 0}}</view>
</view> </view>
</view> </view>
<view class="tips">注:提现需在每月20-26日进行,其他时间不可提现</view> <view class="tips">注:提现需在每月20-26日进行,其他时间不可提现</view>
@ -12,9 +12,9 @@
<view class="tit">提现金额</view> <view class="tit">提现金额</view>
<view class="inp-box acea-row row-between row-middle"> <view class="inp-box acea-row row-between row-middle">
<text class="fz50">¥</text> <text class="fz50">¥</text>
<input type="text" placeholder="最低提现100积分" /> <input type="text" bindinput="cashChange" value="{{cashNum}}" placeholder="最低提现100积分" />
<view class="colO">全部提现</view> <view class="colO" bindtap="allCash">全部提现</view>
</view> </view>
</view> </view>
<view class="submit-btn">提现</view> <view class="submit-btn" bindtap="cashClick">提现</view>
</view> </view>

8
pages/user/index.js

@ -14,9 +14,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// userApi.getMyTeam().then((res)=>{
// console.log(res)
// })
}, },
@ -38,6 +35,11 @@ Page({
url: '/pages/user/cashOut/index?brokeragePrice=' + this.data.userInfo.brokeragePrice, url: '/pages/user/cashOut/index?brokeragePrice=' + this.data.userInfo.brokeragePrice,
}) })
}, },
call(){
wx.makePhoneCall({
phoneNumber: '15623111593',
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */

2
pages/user/index.wxml

@ -67,7 +67,7 @@
<view class="menu-item acea-row row-middle row-between"> <view class="menu-item acea-row row-middle row-between">
<view class="item-l acea-row row-middle"> <view class="item-l acea-row row-middle">
<image src="../../images/menu4.png"></image> <image src="../../images/menu4.png"></image>
<text>官方客服电话:027-88888877</text> <text bindtap="call">官方客服电话:15623111593</text>
</view> </view>
</view> </view>
</view> </view>

21
pages/user/myTeam/index.js

@ -1,20 +1,33 @@
// pages/user/myTeam/index.js // pages/user/myTeam/index.js
const app = getApp()
const user = require('../../../api/user.js')
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
teamInfo: {},
loadingStatus: '没有更多了。。。'
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({
userInfo: wx.getStorageSync('userInfo')
})
this.getTeam()
},
getTeam(){
user.getMyTeam().then((res)=>{
this.setData({
teamInfo: res.data.data
})
wx.stopPullDownRefresh()
})
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -47,7 +60,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
this.getTeam()
}, },
/** /**

3
pages/user/myTeam/index.json

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

16
pages/user/myTeam/index.wxml

@ -3,15 +3,15 @@
<view class="data-panel-box acea-row row-between"> <view class="data-panel-box acea-row row-between">
<view> <view>
<view>今日新增</view> <view>今日新增</view>
<view class="fz40">20人</view> <view class="fz40">{{teamInfo.todayNum}}人</view>
</view> </view>
<view> <view>
<view>一级</view> <view>一级</view>
<view class="fz40">12人</view> <view class="fz40">{{teamInfo.firstNum}}人</view>
</view> </view>
<view> <view>
<view>二级</view> <view>二级</view>
<view class="fz40">8人</view> <view class="fz40">{{teamInfo.secondNum}}人</view>
</view> </view>
</view> </view>
@ -21,10 +21,16 @@
<view class="h-item w180">二级积分收益</view> <view class="h-item w180">二级积分收益</view>
</view> </view>
<view class="t-body"> <view class="t-body">
<view class="b-item acea-row row-middle row-between"> <view class="b-item acea-row row-middle row-between" wx:for="{{teamInfo.teamList}}" wx:key="index">
<view class="name">{{item.name}}</view>
<view class="name w180">{{item.firstNum}}积分</view>
<view class="name w180">{{item.secondNum}}积分</view>
</view>
<!-- <view class="b-item acea-row row-middle row-between">
<view class="name">李元芳</view> <view class="name">李元芳</view>
<view class="name w180">500积分</view> <view class="name w180">500积分</view>
<view class="name w180">9030积分</view> <view class="name w180">9030积分</view>
</view> </view> -->
</view> </view>
<view class="loading-status">{{loadingStatus}}</view>
</view> </view>

142
project.config.json

@ -1,74 +1,82 @@
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": { "packOptions": {
"ignore": [ "ignore": [
{ {
"type": "file", "type": "file",
"value": ".eslintrc.js" "value": ".eslintrc.js"
} }
] ]
},
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}, },
"setting": { "enableEngineNative": false,
"bundle": false, "useIsolateContext": true,
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"urlCheck": true, "packNpmManually": false,
"scopeDataCheck": false, "packNpmRelationList": [],
"coverView": true, "minifyWXSS": true,
"es6": true, "disableUseStrict": false,
"postcss": true, "minifyWXML": true,
"compileHotReLoad": false, "showES6CompileOption": false,
"lazyloadPlaceholderEnable": false, "useCompilerPlugins": false
"preloadBackgroundData": false, },
"minified": true, "compileType": "miniprogram",
"autoAudits": false, "libVersion": "2.19.4",
"newFeature": false, "appid": "wx5bd2ad30d3bb47c5",
"uglifyFileName": false, "projectname": "%E7%A6%85%E6%98%93%E8%AF%BE%E5%A0%82",
"uploadWithSourceMap": true, "debugOptions": {
"useIsolateContext": true, "hidedInDevtools": []
"nodeModules": false, },
"enhance": true, "scripts": {},
"useMultiFrameRuntime": true, "staticServerOptions": {
"useApiHook": true, "baseURL": "",
"useApiHostProcess": true, "servePath": ""
"showShadowRootInWxmlPanel": true, },
"packNpmManually": false, "isGameTourist": false,
"enableEngineNative": false, "condition": {
"packNpmRelationList": [], "search": {
"minifyWXSS": true, "list": []
"showES6CompileOption": false,
"minifyWXML": true
}, },
"compileType": "miniprogram", "conversation": {
"libVersion": "2.19.4", "list": []
"appid": "wx5bd2ad30d3bb47c5",
"projectname": "%E7%A6%85%E6%98%93%E8%AF%BE%E5%A0%82",
"debugOptions": {
"hidedInDevtools": []
}, },
"scripts": {}, "game": {
"staticServerOptions": { "list": []
"baseURL": "",
"servePath": ""
}, },
"isGameTourist": false, "plugin": {
"condition": { "list": []
"search": { },
"list": [] "gamePlugin": {
}, "list": []
"conversation": { },
"list": [] "miniprogram": {
}, "list": []
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
} }
}
} }

43
project.private.config.json

@ -1,23 +1,30 @@
{ {
"condition": { "setting": {},
"plugin": { "condition": {
"list": [] "plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"name": "pages/courseDetail/index",
"pathName": "pages/courseDetail/index",
"query": "",
"scene": null
}, },
"game": { {
"list": [] "name": "pages/user/bindCard/index",
}, "pathName": "pages/user/bindCard/index",
"gamePlugin": { "query": "",
"list": [] "scene": null
},
"miniprogram": {
"list": [
{
"name": "pages/courseDetail/index",
"pathName": "pages/courseDetail/index",
"query": "",
"scene": null
}
]
} }
]
} }
}
} }
Loading…
Cancel
Save