Browse Source

上传代码

master
杨豪 3 years ago
parent
commit
36f70e3a3d
  1. 37
      api/http.js
  2. 12
      api/user.js
  3. 69
      app.js
  4. 28
      app.json
  5. 5
      app.wxss
  6. BIN
      images/arror-d.png
  7. BIN
      images/arror-r.png
  8. BIN
      images/index-top.png
  9. BIN
      images/jifen-icon.png
  10. BIN
      images/menu1.png
  11. BIN
      images/menu2.png
  12. BIN
      images/menu3.png
  13. BIN
      images/menu4.png
  14. BIN
      images/panel.png
  15. BIN
      images/profit.png
  16. BIN
      images/tab/home-a.png
  17. BIN
      images/tab/home.png
  18. BIN
      images/tab/list-a.png
  19. BIN
      images/tab/list.png
  20. BIN
      images/tab/my-a.png
  21. BIN
      images/tab/my.png
  22. 41
      pages/home/index.js
  23. 8
      pages/home/index.wxml
  24. 50
      pages/login/index.js
  25. 66
      pages/user/bindCard/index.js
  26. 4
      pages/user/bindCard/index.json
  27. 18
      pages/user/bindCard/index.wxml
  28. 41
      pages/user/bindCard/index.wxss
  29. 66
      pages/user/cashOut/index.js
  30. 5
      pages/user/cashOut/index.json
  31. 19
      pages/user/cashOut/index.wxml
  32. 68
      pages/user/cashOut/index.wxss
  33. 70
      pages/user/index.js
  34. 4
      pages/user/index.json
  35. 70
      pages/user/index.wxml
  36. 113
      pages/user/index.wxss
  37. 66
      pages/user/myTeam/index.js
  38. 4
      pages/user/myTeam/index.json
  39. 30
      pages/user/myTeam/index.wxml
  40. 45
      pages/user/myTeam/index.wxss
  41. 66
      pages/user/profit/index.js
  42. 5
      pages/user/profit/index.json
  43. 42
      pages/user/profit/index.wxml
  44. 93
      pages/user/profit/index.wxss
  45. 2
      project.config.json

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

69
app.js

@ -1,59 +1,38 @@
// 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
}
http.$http('post','wxapp/auth',data).then((result)=>{
console.log('数据已返回')
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
}
})

28
app.json

@ -1,10 +1,14 @@
{
"pages":[
"pages/home/index",
"pages/goodsList/index",
"pages/login/index",
"pages/goodsDetail/index",
"pages/user/index",
"pages/user/myTeam/index",
"pages/user/bindCard/index",
"pages/user/cashOut/index",
"pages/user/profit/index",
"pages/login/index",
"pages/companyInfo/index",
"pages/index/index"
],
@ -14,6 +18,26 @@
"navigationBarTitleText": "Weixin",
"navigationBarTextStyle":"black"
},
"tabBar": {
"selectedColor": "#E1994C",
"list": [{
"pagePath": "pages/home/index",
"iconPath": "/images/tab/home.png",
"selectedIconPath": "/images/tab/home-a.png",
"text": "首页"
}, {
"pagePath": "pages/goodsList/index",
"iconPath": "/images/tab/list.png",
"selectedIconPath": "/images/tab/list-a.png",
"text": "商品列表"
},
{
"pagePath": "pages/user/index",
"iconPath": "/images/tab/my.png",
"selectedIconPath": "/images/tab/my-a.png",
"text": "我的"
}]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}

5
app.wxss

@ -12,6 +12,8 @@ image {
}
image{
/* border-radius: 8rpx; */
width: 100%;
height: 100%;
}
/* layout */
.acea-row-nowrap {
@ -92,4 +94,5 @@ image{
color: #fff;
font-weight: 500;
margin: 60rpx auto;
}
}

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/index-top.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 KiB

After

Width:  |  Height:  |  Size: 228 KiB

BIN
images/jifen-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

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/tab/home-a.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/tab/home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

BIN
images/tab/list-a.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/tab/list.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/tab/my-a.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/tab/my.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

41
pages/home/index.js

@ -1,31 +1,48 @@
// pages/home/index.js
const app = getApp()
const user = require('../../api/user.js')
Page({
/**
* 页面的初始数据
*/
data: {
isAuth: false, //是否认证
authorize: false,
canIUseGetUserProfile: false
canIUseGetUserProfile: false,
name: '',
phone: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// this.getUserInfo()
console.log(app)
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
app.globalData.$http()
},
getUserInfoProfile(){
wx.getUserProfile({
lang: 'zh_CN',
desc: '需要获取您的信息用来展示',
success: res => {
console.log(res)
uni.showLoading({
title: '登录中',
})
},
app.login().then((res)=>{
console.log(res)
})
},
submitInfo(){
if(this.data.name == '' ){
return this.alertMessage('请输入您的姓名')
} else if(this.data.phone == ''){
return this.alertMessage('请输入您的电话')
}
},
alertMessage(msg){
wx.showToast({
title: msg,
icon: 'none'
})
},
toDetial(){

8
pages/home/index.wxml

@ -40,12 +40,12 @@
</view>
<view class="inp-item acea-row row-middle">
<text class="label">您的电话:</text>
<input type="text" placeholder="请输入您的电话" />
<input type="text" maxlength="11" placeholder="请输入您的电话" />
</view>
</view>
</view>
<button class="submit-btn" wx:if="canIUseGetUserProfile" bindtap="getUserInfoProfile">立即咨询</button>
<button class="submit-btn" wx:else open-type="getUserInfo" bindtap="getUserInfo">立即咨询</button>
<view class="submit-btn">立即咨询</view>
<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" wx:if="{{isAuth}}" bindtap="submitInfo">立即咨询</view>
</view>
</view>

50
pages/login/index.js

@ -19,17 +19,6 @@ Page({
canIUseGetUserProfile: true
})
}
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
this.setData({
code: res.code
})
}
})
},
setUserInfo(){
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
@ -39,45 +28,8 @@ Page({
wx.showLoading({
title: '登陆中...',
})
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'
})
}
}
)
}
})
})
},
getPhoneNumber(e) {
if(e.detail.errMsg == 'getPhoneNumber:ok'){

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

70
pages/user/index.js

@ -0,0 +1,70 @@
// pages/user/index.js
const app = getApp()
const userApi = require('../../api/user.js')
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
userApi.bingPhone().then(res=>{
console.log(res)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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;
}

2
project.config.json

@ -40,7 +40,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.19.4",
"appid": "wxdb1f3c2997df014a",
"appid": "wxfacd60a8724f128c",
"projectname": "%E7%91%9E%E6%A2%A6%E6%80%9D%E5%B0%8F%E7%A8%8B%E5%BA%8F",
"debugOptions": {
"hidedInDevtools": []

Loading…
Cancel
Save