diff --git a/api/http.js b/api/http.js index 0348a89..1d70a91 100644 --- a/api/http.js +++ b/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){ var header = { 'content-type': 'application/json', - 'Authorization' :'Bearer '+ wx.getStorageSync('token') || '', + 'Authorization':'Bearer '+ wx.getStorageSync('token') || '', 'dept': '16' }; return new Promise((resolve,reject)=>{ @@ -26,10 +26,11 @@ export function $http(methods,url,params){ } if(res.data.success){ resolve(res); + wx.hideLoading(); } else{ wx.showToast({ - title: '服务器错误,请稍后再试!', - icon : 'none' + title: res.data.msg, + icon: 'none' }) reject(err) } @@ -38,7 +39,7 @@ export function $http(methods,url,params){ wx.hideLoading(); wx.showToast({ title: '服务器错误,请稍后再试!', - icon : 'none' + icon: 'none' }) reject(err) } diff --git a/api/user.js b/api/user.js index 1e7cbac..04a7a9e 100644 --- a/api/user.js +++ b/api/user.js @@ -1,7 +1,11 @@ const http = require('./http.js') -//绑定手机号 -export function bingPhone(){ - return http.$http() +//绑定银行卡 +export function bingCard(data){ + return http.$http('post','userBank/saveBankInfo',data) +} +//提现 +export function cash(data){ + return http.$http('post','extract/cash',data) } //获取用户信息 export function getUserInfo(){ @@ -15,7 +19,7 @@ export function saleLeads(data){ // 获取我的团队 export function getMyTeam(){ - return http.$http('get','getTeam') + return http.$http('post','user/myTeam') } // 积分动态 diff --git a/app.js b/app.js index 5f74709..56402ff 100644 --- a/app.js +++ b/app.js @@ -44,6 +44,12 @@ App({ }) }) }, + alertMessage(msg){ + wx.showToast({ + title: msg, + icon: 'none' + }) + }, globalData: { http: http.$http, products: [] diff --git a/app.json b/app.json index f832f66..8bfc048 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,7 @@ { "pages": [ - - "pages/goodsList/index", "pages/home/index", + "pages/goodsList/index", "pages/home2/index", "pages/courseDetail/index", "pages/companyInfo/index", @@ -12,7 +11,6 @@ "pages/user/profit/index", "pages/user/cashOut/index", "pages/goodsDetail/index", - "pages/login/index", "pages/user/index", "pages/user/myTeam/index" diff --git a/app.wxss b/app.wxss index 86c435c..e821d7d 100644 --- a/app.wxss +++ b/app.wxss @@ -82,4 +82,10 @@ image{ -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; +} + +.loading-status{ + text-align: center; + font-size: 28rpx; + color: #B9B9B9; } \ No newline at end of file diff --git a/images/arror-d.png b/images/arror-d.png index 064a596..de02e94 100644 Binary files a/images/arror-d.png and b/images/arror-d.png differ diff --git a/images/arror-r.png b/images/arror-r.png index 2092de8..cbc8fa0 100644 Binary files a/images/arror-r.png and b/images/arror-r.png differ diff --git a/images/book-icon.png b/images/book-icon.png index 9608a3e..1bf2e84 100644 Binary files a/images/book-icon.png and b/images/book-icon.png differ diff --git a/images/btn-bg.png b/images/btn-bg.png index db4eb8a..e7341d0 100644 Binary files a/images/btn-bg.png and b/images/btn-bg.png differ diff --git a/images/company-info.png b/images/company-info.png deleted file mode 100644 index 1816953..0000000 Binary files a/images/company-info.png and /dev/null differ diff --git a/images/coursepage.png b/images/coursepage.png deleted file mode 100644 index 236b190..0000000 Binary files a/images/coursepage.png and /dev/null differ diff --git a/images/cy1.png b/images/cy1.png index 316b7b7..7dc93fb 100644 Binary files a/images/cy1.png and b/images/cy1.png differ diff --git a/images/cy2.png b/images/cy2.png index 2e2346d..fed6aa0 100644 Binary files a/images/cy2.png and b/images/cy2.png differ diff --git a/images/cy3.png b/images/cy3.png index a2f89dc..c3f47ca 100644 Binary files a/images/cy3.png and b/images/cy3.png differ diff --git a/images/head.png b/images/head.png deleted file mode 100644 index fb460c3..0000000 Binary files a/images/head.png and /dev/null differ diff --git a/images/header.png b/images/header.png deleted file mode 100644 index 23eae37..0000000 Binary files a/images/header.png and /dev/null differ diff --git a/images/home-bg.png b/images/home-bg.png index 068ee65..7a42e98 100644 Binary files a/images/home-bg.png and b/images/home-bg.png differ diff --git a/images/home-footer.png b/images/home-footer.png index bd46356..c44774f 100644 Binary files a/images/home-footer.png and b/images/home-footer.png differ diff --git a/images/jifen-icon.png b/images/jifen-icon.png index 3f2639e..41b6a44 100644 Binary files a/images/jifen-icon.png and b/images/jifen-icon.png differ diff --git a/images/jixiang.png b/images/jixiang.png deleted file mode 100644 index 662f219..0000000 Binary files a/images/jixiang.png and /dev/null differ diff --git a/images/lh-bottom.png b/images/lh-bottom.png index c86c5d3..5fd70e7 100644 Binary files a/images/lh-bottom.png and b/images/lh-bottom.png differ diff --git a/images/lh-ico.png b/images/lh-ico.png index b7a085e..bcaf3aa 100644 Binary files a/images/lh-ico.png and b/images/lh-ico.png differ diff --git a/images/lh-icon.png b/images/lh-icon.png index 5d77ce7..54bfb34 100644 Binary files a/images/lh-icon.png and b/images/lh-icon.png differ diff --git a/images/lh-top.png b/images/lh-top.png index 3b3033b..f8bfbb2 100644 Binary files a/images/lh-top.png and b/images/lh-top.png differ diff --git a/images/lh.png b/images/lh.png index 2091fcc..1d045a3 100644 Binary files a/images/lh.png and b/images/lh.png differ diff --git a/images/logo.png b/images/logo.png index aa4b114..2c09699 100644 Binary files a/images/logo.png and b/images/logo.png differ diff --git a/images/member1.png b/images/member1.png index 8a18c71..9692228 100644 Binary files a/images/member1.png and b/images/member1.png differ diff --git a/images/member2.png b/images/member2.png index e854a4e..470b050 100644 Binary files a/images/member2.png and b/images/member2.png differ diff --git a/images/member3.png b/images/member3.png index b936f97..f628e27 100644 Binary files a/images/member3.png and b/images/member3.png differ diff --git a/images/member4.png b/images/member4.png index b48158d..5f421f6 100644 Binary files a/images/member4.png and b/images/member4.png differ diff --git a/images/member5.png b/images/member5.png index da7e0b4..32866f2 100644 Binary files a/images/member5.png and b/images/member5.png differ diff --git a/images/panel.png b/images/panel.png index 631638a..a0ff4ac 100644 Binary files a/images/panel.png and b/images/panel.png differ diff --git a/images/title-bg.png b/images/title-bg.png deleted file mode 100644 index c25330c..0000000 Binary files a/images/title-bg.png and /dev/null differ diff --git a/images/title1.png b/images/title1.png deleted file mode 100644 index 85128c7..0000000 Binary files a/images/title1.png and /dev/null differ diff --git a/images/title2.png b/images/title2.png deleted file mode 100644 index 11fd4a3..0000000 Binary files a/images/title2.png and /dev/null differ diff --git a/images/top-bg.png b/images/top-bg.png deleted file mode 100644 index a6fc485..0000000 Binary files a/images/top-bg.png and /dev/null differ diff --git a/images/yssh.png b/images/yssh.png index e063fa8..b46b84f 100644 Binary files a/images/yssh.png and b/images/yssh.png differ diff --git a/pages/companyPage/index.js b/pages/companyPage/index.js index 5150105..56f9611 100644 --- a/pages/companyPage/index.js +++ b/pages/companyPage/index.js @@ -14,7 +14,11 @@ Page({ onLoad: function (options) { }, - + call(){ + wx.makePhoneCall({ + phoneNumber: '15623111593', + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/companyPage/index.wxml b/pages/companyPage/index.wxml index 472717a..08c8bb8 100644 --- a/pages/companyPage/index.wxml +++ b/pages/companyPage/index.wxml @@ -3,8 +3,8 @@ - + 全国咨询热线 - 400-631-8531 + 15623111593 diff --git a/pages/courseDetail/index.wxml b/pages/courseDetail/index.wxml index 00991a9..85b58d1 100644 --- a/pages/courseDetail/index.wxml +++ b/pages/courseDetail/index.wxml @@ -6,19 +6,19 @@ {{detail.storeInfo.storeInfo}} {{detail.storeInfo.storeName}} - + {{detail.storeInfo.sales}}人已预约 去预约 - + 授课老师 - - - 中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资中国杰出道家文化特邀嘉宾,互联网占扑界大师,资深命理大师家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师,资家文化特邀嘉宾,互联网占扑界大师 - - + + + diff --git a/pages/courseDetail/index.wxss b/pages/courseDetail/index.wxss index a96972b..8cfc717 100644 --- a/pages/courseDetail/index.wxss +++ b/pages/courseDetail/index.wxss @@ -128,11 +128,13 @@ width: 100%; height: 976rpx; margin-top: 44rpx; - padding: 0 40rpx; +} +.teach{ + padding: 20rpx 40rpx; } .course-con{ background-color: #E7DBBD; - margin: 12rpx 0 48rpx 0; + margin: 0rpx 0 56rpx 0; } .course-con image{ width: 100%; diff --git a/pages/courseReservation/index.js b/pages/courseReservation/index.js index 3b3169c..5794dd4 100644 --- a/pages/courseReservation/index.js +++ b/pages/courseReservation/index.js @@ -13,8 +13,8 @@ Page({ authorize: false, canIUseGetUserProfile: false,//判断小程序的api是否能够在当前版本使用 form: { - name: '', - phone: '', + name: '', + phone: '', }, products: [] }, diff --git a/pages/courseReservation/index.wxml b/pages/courseReservation/index.wxml index c499f40..772388e 100644 --- a/pages/courseReservation/index.wxml +++ b/pages/courseReservation/index.wxml @@ -4,13 +4,12 @@ - + - + 提交 - diff --git a/pages/goodsList/index.wxss b/pages/goodsList/index.wxss index f6320f5..226a09f 100644 --- a/pages/goodsList/index.wxss +++ b/pages/goodsList/index.wxss @@ -32,7 +32,6 @@ } .goods-item{ width: 100%; - height: 240rpx; background: #fff; border-radius: 12rpx; padding: 24rpx 32rpx; @@ -50,7 +49,7 @@ width: calc(100% - 224rpx); display: flex; flex-direction: column; - justify-content: space-between; + /* justify-content: space-between; */ } .name{ color: #202020; diff --git a/pages/home/index.js b/pages/home/index.js index 4694398..a791265 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -23,7 +23,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - // this.getUserInfo() if (wx.getUserProfile) { this.setData({ canIUseGetUserProfile: true //获取用户信息 @@ -33,6 +32,7 @@ Page({ }, //获取产品列表 getProducts(){ + wx.hideLoading(); store.getCategory().then((res)=>{ this.setData({ products: res.data.data[0].children[0].products diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 6d2dd75..33672b6 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -71,7 +71,7 @@ - + 强将手下无弱兵 名师更易出高徒 记忆大师助启航 解决你的记忆烦恼 diff --git a/pages/home/index.wxss b/pages/home/index.wxss index 7f7767e..37738f6 100644 --- a/pages/home/index.wxss +++ b/pages/home/index.wxss @@ -20,7 +20,7 @@ page{ height: 64rpx; font-size: 32rpx; border-radius: 32rpx; - bottom: 80rpx; + bottom: 20rpx; color: #9A7045; border: 2rpx solid #9B7245; } @@ -46,6 +46,7 @@ page{ border-radius: 14px; } .row-line{ + width: calc(100% - 320rpx); padding-left: 24rpx; } .name{ @@ -66,15 +67,27 @@ page{ width: 670rpx; height: 160rpx; margin-top: 16rpx; + position: relative; +} +.bottom-world image{ + position: absolute; + top: 0; } .world{ + width: 100%; + height: 100%; position: absolute; + top: 0; + z-index: 2; font-size: 32rpx; color: #9A7045; - margin: 15rpx 0 0 84rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } .world view{ - margin-top: 20rpx; + margin-top: 10rpx; } .footer{ width: 100%; diff --git a/pages/user/bindCard/index.js b/pages/user/bindCard/index.js index e3ab625..68f1df8 100644 --- a/pages/user/bindCard/index.js +++ b/pages/user/bindCard/index.js @@ -1,11 +1,17 @@ // pages/user/bindCard/index.js +const app = getApp() +const user = require('../../../api/user.js') Page({ /** * 页面的初始数据 */ data: { - + form: { + name: '', + card: '', + bank: '' + } }, /** @@ -14,7 +20,45 @@ Page({ 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: '绑定成功!', + }) + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/user/bindCard/index.wxml b/pages/user/bindCard/index.wxml index 52650f9..cd091c4 100644 --- a/pages/user/bindCard/index.wxml +++ b/pages/user/bindCard/index.wxml @@ -3,16 +3,16 @@ 持卡人 - + 银行卡号 - + 开户行 - + - 确定 + 确定 diff --git a/pages/user/cashOut/index.js b/pages/user/cashOut/index.js index 247fa3f..4ff59c2 100644 --- a/pages/user/cashOut/index.js +++ b/pages/user/cashOut/index.js @@ -1,23 +1,51 @@ // pages/user/cashOut/index.js +const app = getApp() +const user = '../../../api/user.js' Page({ - /** * 页面的初始数据 */ data: { - brokeragePrice: 20 + brokeragePrice: 0, + cashNum: '' }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(options) this.setData({ 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) + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/user/cashOut/index.wxml b/pages/user/cashOut/index.wxml index 28a1e89..132ef8d 100644 --- a/pages/user/cashOut/index.wxml +++ b/pages/user/cashOut/index.wxml @@ -4,7 +4,7 @@ 当前可提现积分(积分比例为1:1) - {{brokeragePrice}} + {{brokeragePrice || 0}} 注:提现需在每月20-26日进行,其他时间不可提现 @@ -12,9 +12,9 @@ 提现金额 - - 全部提现 + + 全部提现 - 提现 + 提现 diff --git a/pages/user/index.js b/pages/user/index.js index cd75368..ea1e8e4 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -14,10 +14,7 @@ Page({ * 生命周期函数--监听页面加载 */ 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, }) }, + call(){ + wx.makePhoneCall({ + phoneNumber: '15623111593', + }) + }, /** * 生命周期函数--监听页面隐藏 */ diff --git a/pages/user/index.wxml b/pages/user/index.wxml index 24fe7d1..9341eb6 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -67,7 +67,7 @@ - 官方客服电话:027-88888877 + 官方客服电话:15623111593 diff --git a/pages/user/myTeam/index.js b/pages/user/myTeam/index.js index ae57f29..99de556 100644 --- a/pages/user/myTeam/index.js +++ b/pages/user/myTeam/index.js @@ -1,20 +1,33 @@ // pages/user/myTeam/index.js +const app = getApp() +const user = require('../../../api/user.js') Page({ /** * 页面的初始数据 */ data: { - + teamInfo: {}, + loadingStatus: '没有更多了。。。' }, /** * 生命周期函数--监听页面加载 */ 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 () { - + this.getTeam() }, /** diff --git a/pages/user/myTeam/index.json b/pages/user/myTeam/index.json index 9825d33..2270d4c 100644 --- a/pages/user/myTeam/index.json +++ b/pages/user/myTeam/index.json @@ -1,4 +1,5 @@ { "usingComponents": {}, - "navigationBarTitleText": "我的团队" + "navigationBarTitleText": "我的团队", + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/user/myTeam/index.wxml b/pages/user/myTeam/index.wxml index ef7b4e1..a0bfbb7 100644 --- a/pages/user/myTeam/index.wxml +++ b/pages/user/myTeam/index.wxml @@ -3,15 +3,15 @@ 今日新增 - 20人 + {{teamInfo.todayNum}}人 一级 - 12人 + {{teamInfo.firstNum}}人 二级 - 8人 + {{teamInfo.secondNum}}人 @@ -21,10 +21,16 @@ 二级积分收益 - + + {{item.name}} + {{item.firstNum}}积分 + {{item.secondNum}}积分 + + + {{loadingStatus}} diff --git a/project.config.json b/project.config.json index eaf5a0f..38ef7a8 100644 --- a/project.config.json +++ b/project.config.json @@ -1,74 +1,82 @@ { - "description": "项目配置文件", - "packOptions": { - "ignore": [ - { - "type": "file", - "value": ".eslintrc.js" - } - ] + "description": "项目配置文件", + "packOptions": { + "ignore": [ + { + "type": "file", + "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": { - "bundle": false, - "userConfirmedBundleSwitch": false, - "urlCheck": true, - "scopeDataCheck": false, - "coverView": true, - "es6": true, - "postcss": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "preloadBackgroundData": false, - "minified": true, - "autoAudits": false, - "newFeature": false, - "uglifyFileName": false, - "uploadWithSourceMap": true, - "useIsolateContext": true, - "nodeModules": false, - "enhance": true, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "showShadowRootInWxmlPanel": true, - "packNpmManually": false, - "enableEngineNative": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "showES6CompileOption": false, - "minifyWXML": true + "enableEngineNative": false, + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": false + }, + "compileType": "miniprogram", + "libVersion": "2.19.4", + "appid": "wx5bd2ad30d3bb47c5", + "projectname": "%E7%A6%85%E6%98%93%E8%AF%BE%E5%A0%82", + "debugOptions": { + "hidedInDevtools": [] + }, + "scripts": {}, + "staticServerOptions": { + "baseURL": "", + "servePath": "" + }, + "isGameTourist": false, + "condition": { + "search": { + "list": [] }, - "compileType": "miniprogram", - "libVersion": "2.19.4", - "appid": "wx5bd2ad30d3bb47c5", - "projectname": "%E7%A6%85%E6%98%93%E8%AF%BE%E5%A0%82", - "debugOptions": { - "hidedInDevtools": [] + "conversation": { + "list": [] }, - "scripts": {}, - "staticServerOptions": { - "baseURL": "", - "servePath": "" + "game": { + "list": [] }, - "isGameTourist": false, - "condition": { - "search": { - "list": [] - }, - "conversation": { - "list": [] - }, - "game": { - "list": [] - }, - "plugin": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [] - } + "plugin": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [] } + } } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index e5be272..c7515fb 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,23 +1,30 @@ { - "condition": { - "plugin": { - "list": [] + "setting": {}, + "condition": { + "plugin": { + "list": [] + }, + "game": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [ + { + "name": "pages/courseDetail/index", + "pathName": "pages/courseDetail/index", + "query": "", + "scene": null }, - "game": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [ - { - "name": "pages/courseDetail/index", - "pathName": "pages/courseDetail/index", - "query": "", - "scene": null - } - ] + { + "name": "pages/user/bindCard/index", + "pathName": "pages/user/bindCard/index", + "query": "", + "scene": null } + ] } + } } \ No newline at end of file