diff --git a/api/http.js b/api/http.js new file mode 100644 index 0000000..72a97cb --- /dev/null +++ b/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) + } + }) + }) +} \ No newline at end of file diff --git a/api/store.js b/api/store.js new file mode 100644 index 0000000..ef53390 --- /dev/null +++ b/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) +} + diff --git a/api/user.js b/api/user.js new file mode 100644 index 0000000..1e7cbac --- /dev/null +++ b/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) +} + diff --git a/app.js b/app.js index 5a55b4c..5f74709 100644 --- a/app.js +++ b/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: [] } -}) +}) \ No newline at end of file diff --git a/app.json b/app.json index 02b5860..601b667 100644 --- a/app.json +++ b/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" -} \ No newline at end of file +} diff --git a/app.wxss b/app.wxss index 1ee78cf..86c435c 100644 --- a/app.wxss +++ b/app.wxss @@ -12,6 +12,8 @@ image { } image{ /* border-radius: 8rpx; */ + width: 100%; + height: 100%; } /* layout */ .acea-row-nowrap { diff --git a/images/arror-d.png b/images/arror-d.png new file mode 100644 index 0000000..064a596 Binary files /dev/null and b/images/arror-d.png differ diff --git a/images/arror-r.png b/images/arror-r.png new file mode 100644 index 0000000..2092de8 Binary files /dev/null and b/images/arror-r.png differ diff --git a/images/company-info.png b/images/company-info.png new file mode 100644 index 0000000..1816953 Binary files /dev/null and b/images/company-info.png differ diff --git a/images/home-bg.png b/images/home-bg.png new file mode 100644 index 0000000..068ee65 Binary files /dev/null and b/images/home-bg.png differ diff --git a/images/home-footer.png b/images/home-footer.png new file mode 100644 index 0000000..bd46356 Binary files /dev/null and b/images/home-footer.png differ diff --git a/images/jifen-icon.png b/images/jifen-icon.png new file mode 100644 index 0000000..3f2639e Binary files /dev/null and b/images/jifen-icon.png differ diff --git a/images/jixiang.png b/images/jixiang.png new file mode 100644 index 0000000..662f219 Binary files /dev/null and b/images/jixiang.png differ diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..aa4b114 Binary files /dev/null and b/images/logo.png differ diff --git a/images/member1.png b/images/member1.png new file mode 100644 index 0000000..8a18c71 Binary files /dev/null and b/images/member1.png differ diff --git a/images/member2.png b/images/member2.png new file mode 100644 index 0000000..e854a4e Binary files /dev/null and b/images/member2.png differ diff --git a/images/member3.png b/images/member3.png new file mode 100644 index 0000000..b936f97 Binary files /dev/null and b/images/member3.png differ diff --git a/images/member4.png b/images/member4.png new file mode 100644 index 0000000..b48158d Binary files /dev/null and b/images/member4.png differ diff --git a/images/member5.png b/images/member5.png new file mode 100644 index 0000000..da7e0b4 Binary files /dev/null and b/images/member5.png differ diff --git a/images/menu1.png b/images/menu1.png new file mode 100644 index 0000000..64aa530 Binary files /dev/null and b/images/menu1.png differ diff --git a/images/menu2.png b/images/menu2.png new file mode 100644 index 0000000..4e126b1 Binary files /dev/null and b/images/menu2.png differ diff --git a/images/menu3.png b/images/menu3.png new file mode 100644 index 0000000..af06aaa Binary files /dev/null and b/images/menu3.png differ diff --git a/images/menu4.png b/images/menu4.png new file mode 100644 index 0000000..7376837 Binary files /dev/null and b/images/menu4.png differ diff --git a/images/panel.png b/images/panel.png new file mode 100644 index 0000000..631638a Binary files /dev/null and b/images/panel.png differ diff --git a/images/profit.png b/images/profit.png new file mode 100644 index 0000000..6e18241 Binary files /dev/null and b/images/profit.png differ diff --git a/images/title1.png b/images/title1.png new file mode 100644 index 0000000..85128c7 Binary files /dev/null and b/images/title1.png differ diff --git a/images/title2.png b/images/title2.png new file mode 100644 index 0000000..11fd4a3 Binary files /dev/null and b/images/title2.png differ diff --git a/images/yssh.png b/images/yssh.png new file mode 100644 index 0000000..e063fa8 Binary files /dev/null and b/images/yssh.png differ diff --git a/pages/companyInfo/index.wxml b/pages/companyInfo/index.wxml index 3917c3a..4d7df54 100644 --- a/pages/companyInfo/index.wxml +++ b/pages/companyInfo/index.wxml @@ -18,5 +18,5 @@ - 更多商品 + 更多商品 diff --git a/pages/companyInfo/index.wxss b/pages/companyInfo/index.wxss index 75f525e..71b6a1b 100644 --- a/pages/companyInfo/index.wxss +++ b/pages/companyInfo/index.wxss @@ -44,5 +44,8 @@ border-radius: 8rpx; } .submit-btn{ + width: 200rpx; margin: 60rpx auto; + padding: 5rpx; + border: 1px solid #000; } \ No newline at end of file diff --git a/pages/courseDetail/index.js b/pages/courseDetail/index.js index 071c189..584a5b3 100644 --- a/pages/courseDetail/index.js +++ b/pages/courseDetail/index.js @@ -14,7 +14,11 @@ Page({ onLoad: function (options) { }, - + toReservation(){ + wx.navigateTo({ + url: '/pages/courseReservation/index', + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/courseDetail/index.wxml b/pages/courseDetail/index.wxml index 9e5bd9d..073b2c5 100644 --- a/pages/courseDetail/index.wxml +++ b/pages/courseDetail/index.wxml @@ -4,19 +4,19 @@ 弘扬传统国学 - 国学智慧-怎样学好国学 + 国学智慧-怎样学好国学 国学智慧-怎样学好国学 - + 武汉 - + 2021.11.13-11.15 22人已预约 - 去预约 - + 去预约 + @@ -29,7 +29,6 @@ 李大辉 中国资深国学大师 - 中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资 @@ -40,8 +39,9 @@ - 中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资. - 中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资. + + 中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师 + diff --git a/pages/courseReservation/index.js b/pages/courseReservation/index.js index 3c43e1f..3b3169c 100644 --- a/pages/courseReservation/index.js +++ b/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 + }) + } }, /** diff --git a/pages/courseReservation/index.wxml b/pages/courseReservation/index.wxml index b72ac7c..c499f40 100644 --- a/pages/courseReservation/index.wxml +++ b/pages/courseReservation/index.wxml @@ -4,10 +4,13 @@ - + - + - + + + 提交 + diff --git a/pages/courseReservation/index.wxss b/pages/courseReservation/index.wxss index 370b266..af27e02 100644 --- a/pages/courseReservation/index.wxss +++ b/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%; diff --git a/pages/goodsDetail/index.js b/pages/goodsDetail/index.js index 650f442..b99fd7c 100644 --- a/pages/goodsDetail/index.js +++ b/pages/goodsDetail/index.js @@ -24,6 +24,7 @@ Page({ url: '/pages/goodsList/index', }) }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/goodsList/index.js b/pages/goodsList/index.js index 620dff3..5c97029 100644 --- a/pages/goodsList/index.js +++ b/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, }) }, /** diff --git a/pages/goodsList/index.wxml b/pages/goodsList/index.wxml index 1f9724b..01a218a 100644 --- a/pages/goodsList/index.wxml +++ b/pages/goodsList/index.wxml @@ -7,12 +7,12 @@ 搜一下 - - + + 无极先天密码 商道智慧 - 商道商道智慧商道智慧商道智慧商道智慧智慧 + {{item.storeName}} diff --git a/pages/home/index.js b/pages/home/index.js index bdfd9a3..a2405a6 100644 --- a/pages/home/index.js +++ b/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', + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 13f4511..d1d1290 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -1,64 +1,85 @@ - - - - - - 点击查看 - - + + + 点击了解 - - - - 名师介绍 - + + 名师讲团 + + + + 李俊成 + 世界记忆大师 + 最强大脑国家队队员 + + 《最强大脑》第三季指纹解码师 + 世界记忆锦标赛奥运形象大使 + 绘背了APP创始人 + + + + + + 张敬成 + 世界记忆大师 + + 第25届世界记忆锦标赛推广大使 + 第25届世界记忆锦标赛城市赛执行主席 + 绘背了APP创始人 + 记忆培训行业金牌讲师 + 培养学生30000+ + + + + + + + + 付成伟 + + 世界记忆锦标赛城市赛总亚军 + 世界记忆锦标赛选手训练导师 + 超级记忆力金牌讲师 + 绘背了APP技术执行官 + + + + + + 刘杰 + + 第25届世界记忆锦标赛城市赛裁判长 + 世界记忆锦标赛选手训练导师 + 超级记忆力金牌讲师 + 绘背了APP联合创始人 + + + + + + + + 胡宝运 + + 世界记忆锦标赛城市赛单项冠军 + 世界记忆锦标赛选手训练导师 + 思维导图金牌讲师 + 10年企业内训经验 + + + + + + + 强将手下无弱兵 名师更易出高徒 + 记忆大师助启航 解决你的记忆烦恼 + + - - - - 刘朗菘,字瑞蓢 - - - 国学文化传播导师 当代民间隐士 武术练养家 - 湖北省文化产业商会常务副会长、传统文化专业委员会主任、国际易学研究院“中国易理策划名师”、“中国名师讲师” -“东方智慧国学风云人物终身推广者”。 - - - - - - 刘朗菘,字瑞蓢 - - - 国学文化传播导师 当代民间隐士 武术练养家 - 湖北省文化产业商会常务副会长、传统文化专业委员会主任、国际易学研究院“中国易理策划名师”、“中国名师讲师” -“东方智慧国学风云人物终身推广者”。 - - - - - - 课程介绍 - + + 名师讲团 + - - - - 传统武术 - - 中国武术不仅是一种中国传统的体育运动形式,而且是一个完整的文化意识形态,它涵容了中国古典哲学、伦理学、美学,医学、兵学等中国传统文化的各种成分和要素,渗透着中国传统文化的精髓。武术具有极其广泛的群众基础,是中国人民在长期的社会实践中不断积累和丰富起来的一项宝贵的文化遗产 - - - - - 传统武术 - - 中国武术不仅是一种中国传统的体育运动形式,而且是一个完整的文化意识形态,它涵容了中国古典哲学、伦理学、美学,医学、兵学等中国传统文化的各种成分和要素,渗透着中国传统文化的精髓。武术具有极其广泛的群众基础,是中国人民在长期的社会实践中不断积累和丰富起来的一项宝贵的文化遗产 - - - - - + 前去预约 diff --git a/pages/home/index.wxss b/pages/home/index.wxss index 77481c0..7f7767e 100644 --- a/pages/home/index.wxss +++ b/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; } \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js deleted file mode 100644 index 543a3f9..0000000 --- a/pages/index/index.js +++ /dev/null @@ -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 - }) - } -}) diff --git a/pages/index/index.json b/pages/index/index.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/index/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml deleted file mode 100644 index f00d294..0000000 --- a/pages/index/index.wxml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - 请使用1.4.4及以上版本基础库 - - - - {{userInfo.nickName}} - - - - {{motto}} - - diff --git a/pages/index/index.wxss b/pages/index/index.wxss deleted file mode 100644 index eb64203..0000000 --- a/pages/index/index.wxss +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/pages/login/index.js b/pages/login/index.js index 4ff5d7a..ef6ea22 100644 --- a/pages/login/index.js +++ b/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' - }) - } - } - ) } }) }, diff --git a/pages/logs/logs.js b/pages/logs/logs.js deleted file mode 100644 index 85f6aac..0000000 --- a/pages/logs/logs.js +++ /dev/null @@ -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 - } - }) - }) - } -}) diff --git a/pages/logs/logs.json b/pages/logs/logs.json deleted file mode 100644 index 3ee76c1..0000000 --- a/pages/logs/logs.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "navigationBarTitleText": "查看启动日志", - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml deleted file mode 100644 index 0b6b645..0000000 --- a/pages/logs/logs.wxml +++ /dev/null @@ -1,6 +0,0 @@ - - - - {{index + 1}}. {{log.date}} - - diff --git a/pages/logs/logs.wxss b/pages/logs/logs.wxss deleted file mode 100644 index 94d4b88..0000000 --- a/pages/logs/logs.wxss +++ /dev/null @@ -1,8 +0,0 @@ -.log-list { - display: flex; - flex-direction: column; - padding: 40rpx; -} -.log-item { - margin: 10rpx; -} diff --git a/pages/user/bindCard/index.js b/pages/user/bindCard/index.js new file mode 100644 index 0000000..e3ab625 --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/user/bindCard/index.json b/pages/user/bindCard/index.json new file mode 100644 index 0000000..b99eea8 --- /dev/null +++ b/pages/user/bindCard/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "绑定银行卡" +} \ No newline at end of file diff --git a/pages/user/bindCard/index.wxml b/pages/user/bindCard/index.wxml new file mode 100644 index 0000000..52650f9 --- /dev/null +++ b/pages/user/bindCard/index.wxml @@ -0,0 +1,18 @@ + + + + + 持卡人 + + + + 银行卡号 + + + + 开户行 + + + + 确定 + diff --git a/pages/user/bindCard/index.wxss b/pages/user/bindCard/index.wxss new file mode 100644 index 0000000..084af47 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/pages/user/cashOut/index.js b/pages/user/cashOut/index.js new file mode 100644 index 0000000..247fa3f --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/user/cashOut/index.json b/pages/user/cashOut/index.json new file mode 100644 index 0000000..bb2f852 --- /dev/null +++ b/pages/user/cashOut/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "提现", + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/pages/user/cashOut/index.wxml b/pages/user/cashOut/index.wxml new file mode 100644 index 0000000..28a1e89 --- /dev/null +++ b/pages/user/cashOut/index.wxml @@ -0,0 +1,20 @@ + + + + + + 当前可提现积分(积分比例为1:1) + {{brokeragePrice}} + + + 注:提现需在每月20-26日进行,其他时间不可提现 + + 提现金额 + + + + 全部提现 + + + 提现 + diff --git a/pages/user/cashOut/index.wxss b/pages/user/cashOut/index.wxss new file mode 100644 index 0000000..81cc0f3 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/pages/user/index.js b/pages/user/index.js new file mode 100644 index 0000000..cd75368 --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/user/index.json b/pages/user/index.json new file mode 100644 index 0000000..b2597ff --- /dev/null +++ b/pages/user/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "我的", + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/pages/user/index.wxml b/pages/user/index.wxml new file mode 100644 index 0000000..24fe7d1 --- /dev/null +++ b/pages/user/index.wxml @@ -0,0 +1,74 @@ + + + + + + {{userInfo.nickname || '瑞梦思'}} + ID:{{userInfo.uid}} + + + + + + + + 今日收益 + {{userInfo.todayBrokerage || 0}}积分 + + + 累计收益 + {{userInfo.brokeragePrice || 0}}积分 + + + + + + 推广人数 + {{userInfo.spreadCount || 0}}人 + + + 今日新增 + {{userInfo.todaySpreadNum || 0}}人 + + + + + + 积分详情 + + + + + + + + + + 去提现 + + + + + + + + 我的团队 + + + + + + + + + 官方客服电话:027-88888877 + + + + \ No newline at end of file diff --git a/pages/user/index.wxss b/pages/user/index.wxss new file mode 100644 index 0000000..c9c243e --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/pages/user/myTeam/index.js b/pages/user/myTeam/index.js new file mode 100644 index 0000000..ae57f29 --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/user/myTeam/index.json b/pages/user/myTeam/index.json new file mode 100644 index 0000000..9825d33 --- /dev/null +++ b/pages/user/myTeam/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "我的团队" +} \ No newline at end of file diff --git a/pages/user/myTeam/index.wxml b/pages/user/myTeam/index.wxml new file mode 100644 index 0000000..ef7b4e1 --- /dev/null +++ b/pages/user/myTeam/index.wxml @@ -0,0 +1,30 @@ + + + + + 今日新增 + 20人 + + + 一级 + 12人 + + + 二级 + 8人 + + + + + 成员名称 + 一级积分收益 + 二级积分收益 + + + + 李元芳 + 500积分 + 9030积分 + + + diff --git a/pages/user/myTeam/index.wxss b/pages/user/myTeam/index.wxss new file mode 100644 index 0000000..9a6ee59 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/pages/user/profit/index.js b/pages/user/profit/index.js new file mode 100644 index 0000000..ac7f0c3 --- /dev/null +++ b/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 () { + + } +}) \ No newline at end of file diff --git a/pages/user/profit/index.json b/pages/user/profit/index.json new file mode 100644 index 0000000..8e0619d --- /dev/null +++ b/pages/user/profit/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "我的收益", + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/pages/user/profit/index.wxml b/pages/user/profit/index.wxml new file mode 100644 index 0000000..aada5c9 --- /dev/null +++ b/pages/user/profit/index.wxml @@ -0,0 +1,53 @@ + + + + + + + {{userInfo.nickname}} + ID:{{userInfo.uid}} + + + + + + + + + 今日收益 + {{userInfo.todayBrokerage}}积分 + + + 累计收益 + {{userInfo.brokeragePrice}}积分 + + + 去提现 + + + + + 积分动态 + + + {{item.title}} + {{item.createTime}} + + + {{item.pm == 0 ? '-' : '+'}}{{item.number}}积分 + {{item.mark}} + + + {{loadingStatus}} + + + diff --git a/pages/user/profit/index.wxss b/pages/user/profit/index.wxss new file mode 100644 index 0000000..47f3739 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 42e4d18..eaf5a0f 100644 --- a/project.config.json +++ b/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": []