From 02d0d484ad2372e439fdcbac2affe59242e5dac5 Mon Sep 17 00:00:00 2001 From: GL <954534408@qq.com> Date: Wed, 30 Jun 2021 18:02:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8C=82=E8=BD=BD=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 9 +- app.json | 2 +- app.ttss | 2 +- components/navbar/img/home.png | Bin 0 -> 798 bytes components/navbar/navbar.js | 12 +- components/navbar/navbar.ttml | 2 +- config/config.js | 1 + pages/UpHome/UpHome.js | 11 +- pages/UpHome/UpHome.ttml | 14 ++ pages/UpHome/UpHome.ttss | 55 ++++- pages/category/category.js | 4 +- pages/category/category.ttss | 13 +- pages/classDetails/classDetails.js | 183 +++++++++++----- pages/classDetails/classDetails.ttml | 70 ++++-- pages/classDetails/classDetails.ttss | 167 +++++++++++---- pages/course/course.ttml | 2 +- pages/course/course.ttss | 1 + pages/index/index.js | 309 ++++++++++++++------------- pages/index/index.json | 1 - pages/index/index.ttml | 37 ++-- pages/index/index.ttss | 244 ++++++++++++--------- pages/mianCollect/mianCollect.js | 2 + pages/mianCollect/mianCollect.ttss | 10 +- pages/order/order.js | 45 ++-- pages/order/order.ttml | 26 ++- pages/order/order.ttss | 31 ++- pages/publicity/publicity.ttml | 2 +- pages/publicity/publicity.ttss | 29 +-- pages/ranking/ranking.ttml | 2 +- pages/ranking/ranking.ttss | 28 +-- pages/search/search.js | 31 ++- pages/search/search.ttml | 2 +- pages/search/search.ttss | 23 +- pages/sponsor/sponsor.ttml | 13 +- pages/sponsor/sponsor.ttss | 1 + pages/upEnter/upEnter.js | 59 ++++- pages/upEnter/upEnter.ttml | 11 +- pages/user/user.ttml | 15 +- pages/user/user.ttss | 12 +- project.config.json | 8 +- utils/HttpBasics.js | 3 +- utils/util.js | 12 +- 42 files changed, 983 insertions(+), 521 deletions(-) create mode 100644 components/navbar/img/home.png diff --git a/app.js b/app.js index beebddf..f2ddfcc 100644 --- a/app.js +++ b/app.js @@ -23,6 +23,7 @@ App({ }, statusBarHeight: 0, logn(){ + let that = this; tt.login({ success:(res=>{ let {code} = res @@ -30,13 +31,13 @@ App({ url:config.api.login, data:{ code:code, - appId:'tt9da4eb19029c2bb301' + appId:'tt8183f73e1ebb053701' } }).then(res=>{ Http.setToken(res.data.token); - this.globalData.token = res.data.token - if (this.tokenCallback) { - this.tokenCallback(res.data.token); + that.globalData.token = res.data.token + if (that.tokenCallback) { + that.tokenCallback(res.data.token); } }).catch(err=>{ console.log(err); diff --git a/app.json b/app.json index bdde7c6..c6b5b6d 100644 --- a/app.json +++ b/app.json @@ -20,7 +20,7 @@ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#000033", "navigationBarTitleText": "知播堂", - "navigationBarTextStyle":"#fff", + "navigationBarTextStyle":"white", "navigationStyle":"custom" }, diff --git a/app.ttss b/app.ttss index b861eff..67ef5da 100644 --- a/app.ttss +++ b/app.ttss @@ -13,4 +13,4 @@ } .oh{ overflow: hidden; -} \ No newline at end of file +} diff --git a/components/navbar/img/home.png b/components/navbar/img/home.png new file mode 100644 index 0000000000000000000000000000000000000000..ae0eb91a0122c0221c343ffea300abcbe5dd1c9f GIT binary patch literal 798 zcmV+(1L6FMP)+pNlv!3;?SA1bnZ{yqU3oHlz z1AdY8e{X#C3c&Ud-~=!ygI)%fNqXHVM8g2K$7JwnWx;MoMkGCH1fn4T+fy_6xD2ux z=mYG|=f|0eJM}`;4Pg6Q;1n<{okz+~#&6rJfWx`|cS2mP2cj+j+Y5lxKtJFOuvF5O z;sCb4ONhb1hlDuS6GV>ywpRm(($S*~ez%%q+p~Zpz^MFxoumWZL39gXdke5D9ozzz zNP6C#L)&A4v%r+p+bU^CEt{GEw)X&=((qyif7eq=vnIX*!e(~r|0HQ+HQTBHwvPfU z(%^`sIEIGB_5~nnBjkjnXj~;y0$_Upa0Zx{T015E*l^?`1Kaz7wYhW&SR|<{lU)F| zzs|Fpp2`~}?QJG_!PfQxzf1HMV6#gd|sS|+xaWFHBi4}iH* z&;@`FU|YrcNIhQDdI)X1ir#if9R+|Hz|X+wVnwwN;32R|((Q^J+76iOo#)dHfbBs* z9NkCYg`|ILWuqtqGbP<9*<`sle zm$BO6B^`_3wwD3NbA7O+f==gB%Z?zO#pDwcP{^yih9mNMjiibK zZ7D!PtOxd$Rr{}!q8KZrdHyxIOJyj(sTK#e|7b-67WXd6JL_b*^PP|~*> z30kHbM|DrqUiMzV!KjAbQvy$OKm5%JY@zAk{wLVW+lJU6t7z+oDb&qYaZtNCfk cz|jogCk(GuFegCds{jB107*qoM6N<$f})jiQvd(} literal 0 HcmV?d00001 diff --git a/components/navbar/navbar.js b/components/navbar/navbar.js index 9b7b74b..78099a8 100644 --- a/components/navbar/navbar.js +++ b/components/navbar/navbar.js @@ -38,9 +38,15 @@ Component({ }, methods: { backHome: function () { - wx.switchTab({ - url: '/index/index', - }) + tt.switchTab({ + url: `/pages/index/index`, + success(res) { + console.log(`${res}`); + }, + fail(res) { + console.log(`switchTab调用失败`); + }, + }); }, bindPickerChange: function (e) { console.log('picker发送选择改变,携带值为', e.detail.value) diff --git a/components/navbar/navbar.ttml b/components/navbar/navbar.ttml index c8caadc..1988acc 100644 --- a/components/navbar/navbar.ttml +++ b/components/navbar/navbar.ttml @@ -6,7 +6,7 @@ - + {{text}} diff --git a/config/config.js b/config/config.js index 4ecc2cd..78db652 100644 --- a/config/config.js +++ b/config/config.js @@ -20,6 +20,7 @@ let config = { getPublicity:"/wxCampaign/list",//轮播图 getPublicityDetail:"/wxCampaign/findById",//宣传页详情 apply:"/upSettlein/add",//提交入住申请 + getCodePhone:"/upSettlein/sendLoginPhoneCode",//获取手机验证码 } } module.exports = config; \ No newline at end of file diff --git a/pages/UpHome/UpHome.js b/pages/UpHome/UpHome.js index bd173b6..4e8b83b 100644 --- a/pages/UpHome/UpHome.js +++ b/pages/UpHome/UpHome.js @@ -56,9 +56,16 @@ Page({ id:this.data.id } }).then(res=>{ - console.log(res.data); + let temp = res.data + let arr = JSON.parse(res.data.businessTypes) + let sring = "" + arr.map(item=>{ + sring += ' '+item.title + }) + temp.sring = sring + console.log(temp); this.setData({ - upData:res.data + upData:temp }) }).catch(err=>{ tt.showToast({ diff --git a/pages/UpHome/UpHome.ttml b/pages/UpHome/UpHome.ttml index 11bd993..fa68eef 100644 --- a/pages/UpHome/UpHome.ttml +++ b/pages/UpHome/UpHome.ttml @@ -4,6 +4,7 @@ + {{upData.sring}} {{upData.name}} @@ -30,6 +31,19 @@ {{item.merchantName}} + + + ¥ + + {{item.salePriceStr}} + + {{"免费"}} + + {{item.popularity}} + 人气 + + + diff --git a/pages/UpHome/UpHome.ttss b/pages/UpHome/UpHome.ttss index d3db634..ade364a 100644 --- a/pages/UpHome/UpHome.ttss +++ b/pages/UpHome/UpHome.ttss @@ -16,6 +16,16 @@ top: 480rpx; left: 50rpx; } +.category{ + position: absolute; + top: 560rpx; + left: 300rpx; + padding: 20rpx; + border-radius: 10rpx; + background-color: #222735; + text-align: center; + line-height: 32rpx; +} .nameBox{ margin-top: 180rpx; } @@ -58,7 +68,7 @@ width: 60rpx; height: 2rpx; background-color: #07E881; - margin-left: 30rpx; + margin-left: 20rpx; } .singleText{ font-size: 30rpx; @@ -95,7 +105,7 @@ width: 350rpx; height: 40rpx; line-height: 40rpx; - font-size: 36rpx; + font-size: 30rpx; font-family: PingFang SC; font-weight: 500; color: #FEFEFE; @@ -122,25 +132,56 @@ -webkit-line-clamp:1; } .moreBox{ - margin-top: 30rpx; + margin-top: 20rpx; position: relative; } .user{ float: left; - width: 60rpx; - height: 60rpx; + width: 50rpx; + height: 50rpx; border-radius: 50%; background-color: beige; } .userText{ width: 200rpx; text-align: center; - height: 60rpx; - line-height: 60rpx; + height: 50rpx; + line-height: 50rpx; background: #222735; border-radius: 50rpx; font-family: PingFang SC; font-weight: 500; font-size: 26rpx; color: #8790A8; +} +.incomeBox{ + margin-top: 10rpx; +} +.money{ + float: left; + color: #ff3366; + font-size: 28rpx; +} +.py{ + font-size: 24rpx; + float: left; + color: #ff3366; +} +.moodsImg{ + float: right; + width: 30rpx; + height: 30rpx; + margin-top: 8rpx; + /* background-color: cornflowerblue; */ +} +.moodsText{ + float: right; + color: #ffffff; + margin: 0 10rpx; + font-size: 22rpx; + margin-top: 6rpx; +} +.moodsNum{ + float: right; + color: #00cc99; } \ No newline at end of file diff --git a/pages/category/category.js b/pages/category/category.js index 02bd09b..b16e13c 100644 --- a/pages/category/category.js +++ b/pages/category/category.js @@ -54,7 +54,7 @@ Page({ }) }).catch(err=>{ tt.showToast({ - title: err.data, // 内容 + title: err.message, // 内容 }); }) @@ -82,7 +82,7 @@ Page({ }) }).catch(err=>{ tt.showToast({ - title: err.data, // 内容 + title: err.message, // 内容 }); }) }, diff --git a/pages/category/category.ttss b/pages/category/category.ttss index 5597338..96580d9 100644 --- a/pages/category/category.ttss +++ b/pages/category/category.ttss @@ -27,7 +27,11 @@ /* float: left; */ position: fixed; top: 270rpx; - /* height: 600rpx; */ + height: 1200rpx; + overflow: scroll; +} +.columnBox::-webkit-scrollbar { + display: none; } .courseBox{ float: left; @@ -80,7 +84,7 @@ .Name{ height: 50rpx; line-height: 50rpx; - font-size: 32rpx; + font-size: 30rpx; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; @@ -94,6 +98,7 @@ } .tiem{ + font-size: 24rpx; float: left; color: #999999; } @@ -101,10 +106,10 @@ float: right; color: #ff3366; -font-size: 34rpx; +font-size: 26rpx; } .py{ - font-size: 26rpx; + font-size: 24rpx; float: right; color: #ff3366; line-height: 46rpx; diff --git a/pages/classDetails/classDetails.js b/pages/classDetails/classDetails.js index abe760d..70c9851 100644 --- a/pages/classDetails/classDetails.js +++ b/pages/classDetails/classDetails.js @@ -4,9 +4,9 @@ const config = require("../../config/config") const Http = require("../../utils/HttpBasics.js") Page({ data: { - ifPay:app.globalData.platform, - classTitle:"",//课程标题 - showIos:false,//ios字符提示 + ifPay: app.globalData.platform, + classTitle: "",//课程标题 + showIos: false,//ios字符提示 showHie: false,//提示框 anthology: 0,//选集 classNumber: "",//有多少集 @@ -17,7 +17,7 @@ Page({ ifpay: 0,//是否支付 0免费 1付费 goPayFlag: false,//支付按钮显隐 btnSuspend: true,//控制播放按钮 - columnIndex: 0, + columnIndex: 1, addFlag: true, thenIndex: 0,//播放选合集 popupNum: 0,//弹出选集 @@ -27,23 +27,35 @@ Page({ data: {},//数据源 iscollect: false,//是否收藏 mp4Url: "", - tiemLsit: [{//试看时间 - value: 1, - name: 60 - }, { - value: 2, - name: 180, - }, { - value: 3, - name: 300, - }], + tiemLsit: [ + {//不预览 + value: -1, + name: 0 + }, + {//试看时间 + value: 1, + name: 1000000000000000000//无限大=》免费观看 + }, { + value: 2, + name: 30, + }, { + value: 3, + name: 60, + }, { + value: 4, + name: 180, + } + , { + value: 5, + name: 300, + }], }, // goIndent(e){ // console.log(e.dataset.url); // }, - showIos(){ + showIos() { this.setData({ - showIos:true + showIos: true }) }, cancel(e) { @@ -79,15 +91,22 @@ Page({ }) }, setThenIndex(e) { + tt.showLoading({ + title: '加载中...', // 内容 + }); let index = e.currentTarget.dataset.index let id = e.currentTarget.dataset.id - console.log(id); this.getVideoUrl(id) this.setData({ - anthology: index + anthology: index, + goPayFlag: false, + btnSuspend: true, }) }, siteVid(e) {//切换视频 + tt.showLoading({ + title: '加载中...', // 内容 + }); let index = e.currentTarget.dataset.index let id = e.currentTarget.dataset.id this.getVideoUrl(id) @@ -125,6 +144,7 @@ Page({ }) }, order() {//支付 + let _this = this Http.post({//下订单 url: config.api.order, data: { @@ -140,7 +160,6 @@ Page({ orderId: res.data.id } }).then(item => { - console.log(item, "orderId"); tt.pay({ service: 5, orderInfo: { @@ -148,8 +167,37 @@ Page({ order_token: item.data.token, }, success(res) { + console.log(res.code, Http.address, "支付成功回调code"); + let id = res.id if (res.code === 0) { - this.getData() + tt.request({ + url: Http.address + config.api.ifPayOk, // 目标服务器url + method: "post", + headers: { + "Content-Type": "application/json;charset=UTF-8", + token: app.globalData.token + }, + data: { + code: 0, + orderId: id + }, + success: (res) => { + _this.setData({ + goPayFlag:false + }) + _this.getData() + }, + fail: (err) => { + tt.showToast({ + title: err.message, // 内容 + icon: "none" + }); + console.log("我失败; err", err); + _this.getData() + } + }); + + tt.showToast({ title: '支付成功!', // 内容 }); @@ -161,13 +209,7 @@ Page({ title: '支付超时', // 内容 icon: "none" }); - Http.post({ - url: config.api.ifPayOk, - data: { - code: 1, - orderId: res.data.id - } - }) + } else if (res.code === 2) { tt.showToast({ title: '支付失败', // 内容 @@ -225,7 +267,7 @@ Page({ time(e) { let time = e.detail.currentTime.toFixed(0); if (!this.data.ifpay || this.data.data.view) {//已经支付过或免费 - if(this.data.data.columnCoupons){ + if (this.data.data.columnCoupons) {//判断有没有集数 this.setData({ classNumber: this.data.data.columnCoupons.length }) @@ -234,7 +276,7 @@ Page({ } else {//需要付费或已支付 let tempTime = "" //预览时间 if (this.data.data.columnCoupons) {//是不是集合 - + this.setData({ classNumber: this.data.data.columnCoupons.length }) @@ -267,7 +309,7 @@ Page({ this.ifCollect() }).catch(err => { tt.showToast({ - title: err.data, // 内容 + title: err.message, // 内容 icon: "none" }); }) @@ -279,7 +321,7 @@ Page({ this.ifCollect() }).catch(err => { tt.showToast({ - title: err.data, // 内容 + title: err.message, // 内容 icon: "none" }); }) @@ -295,16 +337,21 @@ Page({ this.setData({ iscollect: res.data }) + }).catch(err=>{ + this.setData({ + iscollect:false + }) }) }, - getData() {//订单详情 + getData() {//课程详情 Http.get({ url: config.api.classDetails, data: { id: this.data.id } }).then(res => { this.setData({ data: res.data, - ifpay: res.data.isPayment + ifpay: res.data.isPayment, + columnIndex: res.data.type == 1 ? 0 : 1 }) if (res.data.columnCoupons) { this.getVideoUrl(res.data.columnCoupons[0].videoId) @@ -314,7 +361,7 @@ Page({ }).catch(err => { tt.showToast({ - title: err.data, // 内容 + title: err.messagea, // 内容 icon: "none" }); }) @@ -326,10 +373,17 @@ Page({ videoId: id } }).then(res => { - console.log(res); + this.setData({ mp4Url: res.data.videoUrl }) + tt.hideLoading(); + }).catch(err => { + t.hideLoading(); + tt.showToast({ + title: err.messagea, // 内容 + icon: "none" + }); }) }, onReady() { @@ -338,21 +392,54 @@ Page({ }) }, onLoad(options) { - if (options.id) { - this.setData({ - id: options.id, - classTitle:options.title - }) - this.ifCollect() - // this.getData() - + if(app.globalData.token){ + if (options.id) { + this.setData({ + id: options.id, + classTitle: options.title + }) + this.ifCollect() + this.getData() + } + }else{ + app.tokenCallback = token =>{ + if (options.id) { + this.setData({ + id: options.id, + classTitle: options.title + }) + this.ifCollect() + this.getData() + } + } } + + }, - onShow(){ - this.getData() - }, - onShareAppMessage: function () { - // return custom share data when user share. + onShow() { }, + onShareAppMessage: function (shareOption) { + console.log(this.data.data.dyTitle); +  let that = this +  if (shareOption.channel == 'video') { // 判断是是不是分享视频 +    return { +     channel: 'video', // 必写 video + //     templateId: '',   // 分享的模版 id (如果未设置就是默认,下面会说如何设置) +     title: '知播堂',     // 分享的标题 + //     desc: '我是简介',     // 分享的内容介绍目前没有用 + //     path: `/pages/index/index`,  // 分享的路径 +     extra: { +      videoTopics: ["知播堂", that.data.data.dyTitle] // 只有抖音才会有的属性 +     }, +    } +   } else { // 右上角分享 +     return { +      templateId: '',         //分享的模版 id +      title: '',            //分享的标题 +      desc: '',           // 分享的内容 + //      path: ``, // 分享的路径 +     } +    } +   }, }) \ No newline at end of file diff --git a/pages/classDetails/classDetails.ttml b/pages/classDetails/classDetails.ttml index e01f3e2..60267cc 100644 --- a/pages/classDetails/classDetails.ttml +++ b/pages/classDetails/classDetails.ttml @@ -1,6 +1,6 @@ - + @@ -36,13 +36,14 @@ - + - + {{(index+1)+'.'+item.title}} + - - 介绍 - - + 目录 - - + + 介绍 + - + + @@ -107,11 +107,30 @@ {{data.author.introduction}} - + - - + + + 购买须知 + + + + 如何观看以购买的课程? + + 您可以点击知播堂小程序底部的“课程”按钮学习已经购买的课程。 + + + + 课程是否可以退款? + + 知播堂的全部课程均属虚拟商品,购买后无特殊情况不支持退款,请在购买前预览并慎重购买,如课程存在内容与描述不符、违规行为,您有权自行联系老师,并向老师提出退款。 + + + + + + 课程分集 @@ -127,29 +146,36 @@ 正在播放 - - + + - - + + + + + + 申请入驻 + - - + + + ¥{{data.salePriceStr}} ¥{{data.salePriceStr}} diff --git a/pages/classDetails/classDetails.ttss b/pages/classDetails/classDetails.ttss index bcc9215..7ddaf8a 100644 --- a/pages/classDetails/classDetails.ttss +++ b/pages/classDetails/classDetails.ttss @@ -50,7 +50,7 @@ } .title{ color: #ffffff; - font-size: 36rpx; + font-size: 32rpx; font-family: PingFang SC; font-weight: bold; height: 40rpx; @@ -126,19 +126,25 @@ font-weight: 800; color: #FFFFFF; font-size: 32rpx; - margin-left: 20rpx; + margin: 0 20rpx; border-bottom: 4rpx solid #07E881; padding-bottom: 6rpx; } .introduce{ float: left; font-family: OPPOSans; - margin: 20rpx 40px; + padding: 20rpx 20px; + margin-left: 50rpx; + font-size: 30rpx; + font-weight: 500; } .catalogue{ font-family: OPPOSans; float: left; - margin: 20rpx 40rpx; + padding: 20rpx 20px; + margin: 0 20rpx; + font-size: 30rpx; + font-weight: 500; } .userParticularsBox{ border-radius: 20rpx; @@ -227,7 +233,7 @@ } .addBox-moved { - left: 50%; + left: 5%; } @keyframes addBox-ani { @@ -258,8 +264,7 @@ width: 70rpx; height: 70rpx; float: left; - /* margin-left: 80rpx; */ - margin-left: 10rpx; + margin-left: 80rpx; margin-top: 10rpx; } .issue{ @@ -285,7 +290,7 @@ position: fixed; left: 0; bottom: 0; - height: 120rpx; + height: 100rpx; background: #141928; } .shareImg{ @@ -293,7 +298,7 @@ float: left; width: 40rpx; height: 40rpx; - margin-top: 20rpx; + margin-top: 25rpx; margin-left: 40rpx; } .shareText{ @@ -318,13 +323,13 @@ float: left; width: 40rpx; height: 40rpx; - margin-top: 20rpx; + margin-top: 25rpx; margin-left: 40rpx; line-height: 40rpx; } .service{ float: left; - margin-top: 10rpx; + margin-top: 25rpx; margin-left: 10rpx; color: #ffffff; width: 100rpx; @@ -340,27 +345,29 @@ height: 100%; } .shopping{ - height: 90rpx; - line-height: 90rpx; + margin-top: 15rpx; + height: 80rpx; + line-height: 80rpx; text-align: center; float: left; padding: 0 60rpx; background: linear-gradient(-4deg, #4EE09D, #02C96E); border-radius: 50rpx; - margin-left: 30rpx; + margin-left: 80rpx; color: #FFFFFF; - font-size: 36rpx; + font-size: 32rpx; font-family: OPPOSans; } .nOshopping{ - height: 90rpx; - line-height: 90rpx; + margin-top: 15rpx; + height: 80rpx; + line-height: 80rpx; text-align: center; float: left; padding: 0 60rpx; background-color: rgba(255, 255, 255, 0.1); border-radius: 50rpx; - margin-left: 10rpx; + margin-left: 80rpx; color: #FFFFFF; font-size: 32rpx; font-family: OPPOSans; @@ -382,9 +389,10 @@ margin: 40rpx 20rpx; } .transmitImg{ - width: 100rpx; - height: 100rpx; + width: 70rpx; + height: 70rpx; float: left; + margin: 15rpx auto; } .timeBox{ float: left; @@ -448,61 +456,72 @@ .hit{ height: 120rpx; } +/* .shadow{ + position: absolute; + right: 0; + top: 20px; + height: 80rpx; + width: 120rpx; + +} */ .purchaseBox{ float: left; - width: 90%; - overflow: hidden; + width: 96%; overflow-y: hidden; overflow-x: auto; white-space: nowrap; + display:-webkit-box; + -webkit-box-orient:horizontal; margin-top: 20rpx; - height: 70rpx; + margin-left: 2%; + height: 120rpx; } .purchaseBox::-webkit-scrollbar { display: none; } .anthology_a{ width: 220rpx; - padding: 10rpx 20rpx; - border-radius: 50rpx; - text-align: center; - border: 1rpx solid #ffffff; - color: #FFFFFF; + height: 70rpx; + padding: 10rpx 10rpx; + border-radius: 20rpx; + border: 1rpx solid #07E881; + color: #07E881; display: inline-block; text-align: center; margin-left: 20rpx; + overflow:hidden; + display: flex; + align-items: center; + justify-content: center; } .anthology{ width: 220rpx; - padding: 10rpx 20rpx; - border-radius: 50rpx; - text-align: center; - display: inline-block; - border: 1rpx solid #7A8399; - color: #7A8399;; - - margin-left: 20rpx; - margin-top: 20rpx 0; -} -.anthology_a{ - width: 220rpx; - padding: 10rpx 20rpx; - border-radius: 50rpx; + padding: 10rpx 10rpx; + border-radius: 20rpx; text-align: center; display: inline-block; border: 1rpx solid #7A8399; - color: #ffffff;; - + color: #7A8399; + height: 70rpx; margin-left: 20rpx; margin-top: 20rpx 0; + overflow:hidden; + display: flex; + align-items: center; + justify-content: center; } + .anthologyItem{ + text-align: c; width: 220rpx; + /* height: 70rpx; */ overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; - -webkit-line-clamp:1; + -webkit-line-clamp:2; + font-size: 24rpx; + /* text-indent: 0; */ } .more{ width: 20rpx; @@ -606,4 +625,60 @@ -webkit-box-orient:vertical; -webkit-line-clamp:1; margin-top: 10rpx; -} \ No newline at end of file +} +.purchaseTitle{ + color: #ffffff; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + padding: 10rpx 0; +} +.purchaseXian{ + width: 60rpx; + height: 5rpx; + margin-left: 4rpx; + background-color: #ffffff; +} +.issueBox{ + width: 96%; + /* padding: 20rpx; */ + background-color: #111827; + margin: 20rpx auto; + overflow: hidden; + border-radius: 20rpx; +} +.issueTitle{ + font-size: 30rpx; + color: #ffffff; + font-family: PingFang SC; + margin: 20rpx 20rpx 10rpx 20rpx; +} + +.answer{ + color: #535E75; + font-size: 24rpx; + margin: 10rpx 20rpx 20rpx 20rpx; +} +.answer::before{ + content: ""; + color: #07E881; +} +button::after { + border: none; + + } + +button { + background-color: transparent; + + padding-left: 0; + + padding-right: 0; + + line-height:inherit; + +} + +button { + border-radius:0; +} diff --git a/pages/course/course.ttml b/pages/course/course.ttml index 2a586f2..58556ed 100644 --- a/pages/course/course.ttml +++ b/pages/course/course.ttml @@ -123,7 +123,7 @@ - + diff --git a/pages/course/course.ttss b/pages/course/course.ttss index aa158c8..f1ba536 100644 --- a/pages/course/course.ttss +++ b/pages/course/course.ttss @@ -240,6 +240,7 @@ .noDataImg{ width: 500rpx; height: 400rpx; + margin-top: 200rpx; } .instrumentBox{ width: 100%; diff --git a/pages/index/index.js b/pages/index/index.js index 076cdd4..cdbccda 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,224 +1,237 @@ const app = getApp() const config = require("../../config/config") const Http = require("../../utils/HttpBasics.js") -const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" +const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" +const convert = require("../../utils/util.js") Page({ data: { - imgHttps:app.globalData.imgHttps, - column:[], - topFlag:0, - swiperLsit:[], - inputValue:'', + imgHttps: app.globalData.imgHttps, + column: [], + topFlag: 0, + swiperLsit: [], + inputValue: '', navigationBarHeight, - deyList:[],//今天推荐 - deyPageNum:1, - classLsit:[],//精选类容 - classpageNum:1, - autho:[],//推荐作者 - authoPageNum:1, - rankingList:[],//热门排行 - rankingPageNum:1, + deyList: [],//今天推荐 + deyPageNum: 1, + classLsit: [],//精选类容 + classpageNum: 1, + autho: [],//推荐作者 + authoPageNum: 1, + rankingList: [],//热门排行 + rankingPageNum: 1, }, - goXq(e){//跳转详情 + + goXq(e) {//跳转详情 let id = e.currentTarget.dataset.id let title = e.currentTarget.dataset.title tt.navigateTo({ url: `/pages/classDetails/classDetails?id=${id}&title=${title}` // 指定页面的url }); }, - goPublicity(e){ + goPublicity(e) { let id = e.currentTarget.dataset.id let type = e.currentTarget.dataset.type tt.navigateTo({ url: `/pages/publicity/publicity?id=${id}&type=${type}` // 指定页面的url }); }, - getNweDataLsit(){//今天推荐 + getNweDataLsit() {//今天推荐 Http.get({ - url:config.api.columnLsit, - data:{ - pageNum:this.data.deyPageNum, - pageSize:4, - sortOrder:"desc" - } - }).then(res=>{ - let temp = this.data.list - if(this.data.pageNum>1){ - temp.push(...res.data.list) - - }else{ - temp = res.data.list - } - this.setData({ - deyList:temp - }) - }).catch(err=>{ - tt.showToast({ - title: err.message, // 内容 - icon: "none" - }); + url: config.api.columnLsit, + data: { + pageNum: this.data.deyPageNum, + pageSize: 4, + sortOrder: "desc" + } + }).then(res => { + let temp = this.data.list + if (this.data.pageNum > 1) { + temp.push(...res.data.list) + + } else { + temp = res.data.list + } + temp.map(item => { + item.popularity = convert.moodsText(item.popularity) + }) + this.setData({ + deyList: temp + }) + }).catch(err => { + tt.showToast({ + title: err.message, // 内容 + icon: "none" + }); }) }, - getSwiperLsit(){//获取轮播图 + getSwiperLsit() {//获取轮播图 Http.get({ - url:config.api.getPublicity, - data:{ - pageSize:7, - pageNum:1 + url: config.api.getPublicity, + data: { + pageSize: 7, + pageNum: 1 } - }).then(res=>{ - console.log(res.data,"轮播图"); + }).then(res => { + console.log(res.data, "轮播图"); this.setData({ - swiperLsit:res.data.list + swiperLsit: res.data.list }) - }).catch(err=>{ + }).catch(err => { tt.showToast({ title: err.message, // 内容 icon: "none" }); }) }, - getClassLsit(){//精选课程 + getClassLsit() {//精选课程 Http.get({ - url:config.api.columnLsit, - data:{ - pageNum:this.data.classpageNum, - pageSize:3, - mark:1, - sortColumn: "markTime", - sortOrder: "desc" - } - }).then(res=>{ - let temp = this.data.list - if(this.data.pageNum>1){ - temp.push(...res.data.list) - - }else{ - temp = res.data.list - } - this.setData({ - classLsit:temp - }) - }).catch(err=>{ - tt.showToast({ - title: err.message, // 内容 - icon: "none" - }); + url: config.api.columnLsit, + data: { + pageNum: this.data.classpageNum, + pageSize: 3, + mark: 1, + sortColumn: "markTime", + sortOrder: "desc" + } + }).then(res => { + let temp = this.data.list + if (this.data.pageNum > 1) { + temp.push(...res.data.list) + + } else { + temp = res.data.list + } + temp.map(item => { + item.popularity = convert.moodsText(item.popularity) + }) + + this.setData({ + classLsit: temp + }) + }).catch(err => { + tt.showToast({ + title: err.message, // 内容 + icon: "none" + }); }) }, - getRanking(){//排行榜 + getRanking() {//排行榜 Http.get({ - url:config.api.columnLsit, - data:{ - pageNum:this.data.rankingPageNum, - pageSize:6, - sortColumn:"popularity", - sortOrder:"desc" - } - }).then(res=>{ - let temp = this.data.list - if(this.data.pageNum>1){ - temp.push(...res.data.list) - - }else{ - temp = res.data.list - } - this.setData({ - rankingList:temp - }) - }).catch(err=>{ - tt.showToast({ - title: err.message, // 内容 - icon: "none" - }); + url: config.api.columnLsit, + data: { + pageNum: this.data.rankingPageNum, + pageSize: 6, + sortColumn: "popularity", + sortOrder: "desc" + } + }).then(res => { + let temp = this.data.list + if (this.data.pageNum > 1) { + temp.push(...res.data.list) + + } else { + temp = res.data.list + } + temp.map(item => { + item.popularity = convert.moodsText(item.popularity) + }) + this.setData({ + rankingList: temp + }) + }).catch(err => { + tt.showToast({ + title: err.message, // 内容 + icon: "none" + }); }) -}, - getAuthor(){//推荐作者 + }, + getAuthor() {//推荐作者 Http.get({ - url:config.api.getAuthor, - data:{ - pageNum:this.data.authoPageNum, - pageSize:4, - mark:1, + url: config.api.getAuthor, + data: { + pageNum: this.data.authoPageNum, + pageSize: 4, + mark: 1, sortColumn: "markTime", sortOrder: "desc" } - }).then(res=>{ - let text ="" - let arr=res.data.list + }).then(res => { - if(res.data.list[0].businessTypes){ + let arr = res.data.list + if (arr.length == 0) return - arr.map(item1=>{ - JSON.parse(item1.businessTypes).map(item2=>{ - text += " "+item2.title + if (res.data.list[0].businessTypes) { + + arr.map(item1 => { + let text = "" + JSON.parse(item1.businessTypes).map(item2 => { + text += " " + item2.title }) item1.authoRemark = text }) - + } console.log(arr); this.setData({ - autho:arr, + autho: arr, }) }) }, - search(){ + search() { console.log(this.data.inputValue); }, - - setTopFlag(e){ - let index = e.currentTarget.dataset.index + + setTopFlag(e) { + let index = e.currentTarget.dataset.index let itemId = e.currentTarget.dataset.itemid console.log(itemId); this.setData({ - topFlag:index + topFlag: index }) tt.navigateTo({ url: `/pages/category/category?itemId=${itemId}` // 指定页面的url - }); + }); }, - getColumn(){ + getColumn() { Http.get({ - url:config.api.getColumn - }).then(res=>{ - let tempData = res.data - tempData.unshift({ - id:"", - title:"推荐" - }) + url: config.api.getColumn + }).then(res => { + let tempData = res.data + tempData.unshift({ + id: "", + title: "推荐" + }) this.setData({ - column:tempData + column: tempData }) - }).catch(err=>{ - tt.showToast({ - title: err.data, // 内容 - - }); + }).catch(err => { + tt.showToast({ + title: err.message, // 内容 + + }); }) -}, -getWeapNote(){//初始化 - if (app.globalData.token){//登录 - this.getColumn() - this.getNweDataLsit() - this.getClassLsit() - this.getRanking() - this.getAuthor() - this.getSwiperLsit() - }else{//未登录 - app.tokenCallback = token => { + }, + + onLoad: function () { + if (app.globalData.token) { this.getColumn() this.getNweDataLsit() this.getClassLsit() this.getRanking() this.getAuthor() this.getSwiperLsit() + } else { + app.tokenCallback = token => { + this.getColumn() + this.getNweDataLsit() + this.getClassLsit() + this.getRanking() + this.getAuthor() + this.getSwiperLsit() + } } - } -}, - onLoad: function () { - this.getWeapNote() }, + onPullDownRefresh() { this.getColumn() this.getNweDataLsit() diff --git a/pages/index/index.json b/pages/index/index.json index 958e731..becaf34 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -4,5 +4,4 @@ "navbar": "../../components/navbar/navbar" }, "enablePullDownRefresh": true - } \ No newline at end of file diff --git a/pages/index/index.ttml b/pages/index/index.ttml index 7fdfbe5..2bbcaaa 100644 --- a/pages/index/index.ttml +++ b/pages/index/index.ttml @@ -33,14 +33,14 @@ - + 最新上架 - + 精选课程 @@ -48,7 +48,7 @@ - + 排行榜 @@ -56,7 +56,7 @@ - + 全部分类 @@ -67,7 +67,7 @@ + mode="" lazy-load="false" binderror="" bindload="" /> 今日推荐 @@ -83,7 +83,7 @@ - 投资者-周期 + {{item.title}} @@ -113,7 +113,7 @@ - 最近人气 @@ -129,10 +129,13 @@ {{item.title}} - - - {{item.merchantName}} + + + + {{item.merchantName}} + + @@ -184,7 +187,7 @@ - 推荐作者 @@ -275,10 +278,10 @@ - + - @@ -295,9 +298,11 @@ {{item.title}} - - - {{item.merchantName}} + + + + {{item.merchantName}} + diff --git a/pages/index/index.ttss b/pages/index/index.ttss index 20fc346..f5b2f5a 100644 --- a/pages/index/index.ttss +++ b/pages/index/index.ttss @@ -26,7 +26,7 @@ display: none; } .logo{ - width: 32rpx; + width: 33rpx; float: right; height: 36rpx; float: left; @@ -57,25 +57,23 @@ .searchBox{ overflow: hidden; -} -.searchText{ - color: #666666; - line-height: 80rpx; } .searchF{ - width: 90%; - height: 80rpx; + width: 96%; + height: 68rpx; background-color: rgba(51, 51, 51, 0.5); border-radius: 60rpx; margin: 20rpx auto; } .searchLogo{ - width: 40rpx; - height: 40rpx; + width: 30rpx; + height: 30rpx; float: left; margin: 20rpx 10rpx 15rpx 60rpx; } .searchText{ + color: #666666; + line-height: 68rpx; float: left; width: 80%; margin: 0 auto; @@ -84,12 +82,13 @@ overflow: hidden; } .swiperBox{ - margin: 30rpx 0; + margin: 20rpx 0; border-radius: 10rpx; } .swiper{ - height: 320rpx; + width: 100%; + height: 280rpx; } .swiperImg{ width: 100%; @@ -98,53 +97,66 @@ overflow: hidden; border-radius: 10rpx; } .columnBox{ - height: 180rpx; - padding: 40rpx 0 ; display: flex; justify-content: center; + margin-top: 20rpx; } .columnItem{ width: 20%; margin: 0 auto; - - +} +.columnImg{ + width: 90rpx; + height: 90rpx; + display: block; + margin: 20rpx auto; } .columnText{ color: #ffffff; text-align: center; line-height: 40rpx; + font-size: 26rpx; + font-family: PingFang SC; + font-weight: 500; + color: #FFFFFF; } .deyBox{ overflow: hidden; - } .deyTitleBox{ - /* overflow: hidden; */margin: 20rpx 0; + /* overflow: hidden; */margin: 60rpx 0 35rpx 0; } .deyTitleImg{ - width: 60rpx; - height: 70rpx; + width: 48rpx; + height: 50rpx; float: left; - margin: 0 10rpx; + margin: 0 10rpx ; + display: block; +} +.authorImg{ + width: 40rpx; + height:46rpx; + float: left; + margin: 0 10rpx ; + display: block; } .deyTitle{ font-size: 36rpx; - color:#ffffff; - font-weight: 700; - padding: 10rpx 0 30rpx 0 ; + font-family: OPPOSans; + font-weight: 500; + color: #FFFFFF; margin-left: 10rpx; letter-spacing:4rpx; } .authorBox1{ - margin-top: 20rpx; + margin-top: 26rpx; } .authorImgTop{ - width: 150rpx; - height: 150rpx; - background-color: #00cc99; + width: 110rpx; + height: 110rpx; border-radius: 50%; margin: 40rpx auto; } @@ -172,8 +184,8 @@ overflow: hidden; display: none; } .authorItem{ - width: 32%; - /* height: 400rpx; */ + width: 200rpx; + height: 300rpx; margin: 0 2%; border-radius: 10rpx 10rpx 10rpx 40rpx; text-align: center; @@ -181,11 +193,11 @@ overflow: hidden; } .imgBox{ - width: 46%; + width: 44%; overflow: hidden; display: inline-block; text-align: center; - margin: 0 2%; + margin: 0 3%; /* height: 400rpx; */ } @@ -195,7 +207,7 @@ overflow: hidden; .imgitem .img{ width: 100%; /* background-color: chartreuse; */ - height: 200rpx; + height: 185rpx; border-radius: 10rpx; } .posClass{ @@ -204,11 +216,13 @@ overflow: hidden; top: 0; width: 70rpx; height: 40rpx; - background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_bnt_bq.png'); - background-size:70rpx 40rpx; + /* background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_bnt_bq.png'); */ + /* background-size:74rpx 40rpx; */ color: #ffffff; font-size: 24rpx; z-index: 100000; + background-color: rgb(124, 122, 122,0.5); + border-radius: 10rpx ; } .imgBox .itemTitle{ height: 60rpx; @@ -216,6 +230,9 @@ overflow: hidden; text-align: center; color: #ffffff; font-size: 30rpx; + font-family: PingFang SC; + font-weight: 500; + color: #FCFFFF; } .handpickBox{ @@ -224,23 +241,23 @@ overflow: hidden; .handpickTop{ overflow: hidden; - margin: 40rpx 0 ; + margin: 40rpx 0 20rpx 0 ; } .handpickImg{ - width: 60rpx; - height: 70rpx; + width: 40rpx; + height: 46rpx; float: left; - margin: 0 10rpx; + margin: 16rpx 10rpx 10rpx 10rpx ; } .handpickText{ font-size: 36rpx; color:#ffffff; - font-weight: 700; - height: 36rpx; padding: 10rpx 0 30rpx 0 ; margin-left: 10rpx; float: left; - letter-spacing:4rpx + letter-spacing:4rpx; + font-family: OPPOSans; + font-weight: 500; } .handpickadd{ float: right; @@ -286,59 +303,69 @@ overflow: hidden; height: 70rpx; } .commodityImg{ - position: relative; - width: 320rpx; - background-color: chocolate; + width: 254rpx; border-radius: 10rpx; - height: 200rpx; + height: 194rpx; + float: left; + margin-left: 10rpx; +} +.newCommodityImg{ + width: 254rpx; + border-radius: 10rpx; + height: 194rpx; float: left; margin-left: 10rpx; } .commodityImage{ width: 100%; - height: 100%; + height: 154rpx; border-radius: 10rpx; } .classBoxImg{ width: 100%; - height: 100%; - border-radius: 10rpx; + height: 154rpx; + border-radius: 10rpx 10rpx 0 0; + margin: 0; } .describeBox{ - width: 360rpx; + width: 384rpx; margin-left: 30rpx; float: left; } .describeBame{ - width: 80%; - height: 50rpx; - line-height: 50rpx; - font-size: 34rpx; + width: 100%; + height: 64rpx; + line-height: 32rpx; + font-size: 30rpx; color: #ffffff; - font-weight: 560; + font-weight: 500; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; - -webkit-line-clamp:1; + -webkit-line-clamp:2; } .headImgBox{ float: left; } .headImg{ - float: left; - width: 60rpx; - height: 60rpx; + position: absolute; + + width: 50rpx; + height: 50rpx; border-radius: 50%; - background-color: #00cc99; + top: 0; + left: 0; } .annotation{ - width: 240rpx; + padding-left:70rpx ; + padding-right:50rpx ; + float: left; border-radius: 50rpx; - height: 60rpx; + height: 50rpx; background-color: #333; text-align: center; - line-height: 60rpx; + line-height: 50rpx; color: #9999cc; } .introduce{ @@ -354,19 +381,20 @@ overflow: hidden; -webkit-line-clamp:2; } .priceBox{ - margin-top: 20rpx; + margin-top: 18rpx; overflow: hidden; } .priceF{ float: left; color: #ff3366; - line-height: 60rpx; + font-size: 28rpx; } .price{ - font-size: 34rpx; + color: #ff3366; float: left; - line-height: 60rpx; + /* line-height: 60rpx; */ + font-size: 28rpx; } .popularity{ width: 180rpx; @@ -415,24 +443,25 @@ overflow: hidden; } .nameBox{ - height: 140rpx; + height: 120rpx; background-color: rgba(51, 51, 51,0.6); border-radius: 0rpx 40rpx 0rpx 40rpx; } .authorName{ - height: 60rpx; - line-height: 60rpx; + height: 50rpx; + line-height: 50rpx; text-align: center; - color: #ffffff; - font-size: 36rpx; - font-weight: 600; + font-size: 30rpx; + font-family: OPPOSans; + font-weight: 500; + color: #FFFFFF; } .authorText{ width: 90%; margin: 0 auto; color: #9999cc; - height: 60rpx; - line-height: 60rpx; + height: 50rpx; + line-height: 50rpx; text-align: center; overflow:hidden; text-overflow:ellipsis; @@ -445,13 +474,16 @@ overflow: hidden; } .sortBox{ overflow: hidden; - + display: flex; + flex-wrap: wrap; + justify-content:flex-start; } .sortNmu{ width: 18%; background-color: aqua; height: 360rpx; float: left; + } .articleBox{ width: 82%; @@ -486,15 +518,15 @@ overflow: hidden; background-color: chocolate; } .sortItemBox{ - width: 31%; - margin: 20rpx 1%; + width: 220rpx; + margin: 10rpx ; float: left; } .sortItemImg{ position: relative; width: 100%; - height: 160rpx; + height: 134rpx; border-radius: 10rpx; } .sortItemImg image{ @@ -504,10 +536,11 @@ overflow: hidden; } .sortNumBj_0{ position: absolute; - width: 52rpx; - height: 65rpx; + width: 42rpx; + height: 55rpx; background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); - background-size:52rpx 65rpx; + background-size:42rpx 55rpx; + background-repeat:no-repeat; color: #ffffff; text-align: center; line-height: 46rpx; @@ -516,10 +549,11 @@ overflow: hidden; } .sortNumBj_1{ position: absolute; - width: 52rpx; - height: 65rpx; + width: 42rpx; + height: 55rpx; background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); - background-size:52rpx 65rpx; + background-size:42rpx 55rpx; + background-repeat:no-repeat; color: #ffffff; text-align: center; line-height: 46rpx; @@ -528,10 +562,11 @@ overflow: hidden; } .sortNumBj_2{ position: absolute; - width: 52rpx; - height: 65rpx; + width: 42rpx; + height: 55rpx; background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); - background-size:52rpx 65rpx; + background-size:42rpx 55rpx; + background-repeat:no-repeat; color: #ffffff; text-align: center; line-height: 46rpx; @@ -540,10 +575,11 @@ overflow: hidden; } .sortNumBj_3{ position: absolute; - width: 52rpx; - height: 65rpx; + width: 42rpx; + height: 55rpx; background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); - background-size:52rpx 65rpx; + background-size:42rpx 55rpx; + background-repeat:no-repeat; color: #ffffff; text-align: center; line-height: 46rpx; @@ -551,19 +587,19 @@ overflow: hidden; left: 0; } .sortTitle{ - height: 40rpx; - line-height: 40rpx; - font-size: 32rpx; + height: 60rpx; + line-height: 30rpx; + font-size: 24rpx; color: #FEFEFE; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; - -webkit-line-clamp:1; - margin: 10rpx 0; + -webkit-line-clamp:2; + margin-top: 10rpx; } .popularityBox { - padding: 10rpx 0; + padding-bottom: 10rpx; } .popularityImg{ float: left; @@ -574,21 +610,27 @@ overflow: hidden; } .popularityText{ float: left; - font-size: 26rpx; + font-size: 22rpx; margin: 0 10rpx; + font-family: OPPOSans; + line-height: 40rpx; + font-weight: 500; } .popularityNum{ float: left; color: #07E881; - font-size: 26rpx; + font-size: 24rpx; + height: 40rpx; + line-height: 40rpx; } .newPopularity{ width: 100%; - position: absolute; - bottom: 0; - left: 10; + /* position: absolute; */ + /* bottom: 0; */ + /* left: 10; */ background-color: #222735; height: 40rpx; border-radius: 0 0 10rpx 10rpx ; + margin-top: -8rpx; } \ No newline at end of file diff --git a/pages/mianCollect/mianCollect.js b/pages/mianCollect/mianCollect.js index 151bfe6..61d4997 100644 --- a/pages/mianCollect/mianCollect.js +++ b/pages/mianCollect/mianCollect.js @@ -32,6 +32,8 @@ Page({ id:this.data.id } }).then(res=>{{ + this.search() + this.hie() tt.showToast({ title: '已取消收藏', // 内容 icon: "none" diff --git a/pages/mianCollect/mianCollect.ttss b/pages/mianCollect/mianCollect.ttss index 3527976..bd7f78a 100644 --- a/pages/mianCollect/mianCollect.ttss +++ b/pages/mianCollect/mianCollect.ttss @@ -46,7 +46,7 @@ width: 350rpx; height: 40rpx; line-height: 40rpx; - font-size: 36rpx; + font-size: 32rpx; font-family: PingFang SC; font-weight: 500; color: #FEFEFE; @@ -78,16 +78,16 @@ } .user{ float: left; - width: 60rpx; - height: 60rpx; + width: 50rpx; + height: 50rpx; border-radius: 50%; background-color: beige; } .userText{ width: 200rpx; text-align: center; - height: 60rpx; - line-height: 60rpx; + height: 50rpx; + line-height: 50rpx; background: #222735; border-radius: 50rpx; font-family: PingFang SC; diff --git a/pages/order/order.js b/pages/order/order.js index 3c1a21f..fd66497 100644 --- a/pages/order/order.js +++ b/pages/order/order.js @@ -10,6 +10,7 @@ Page({ pitch: 0,//选中支付类型 orderLsit: [],//订单列表 pageNum: 1, + noDAtaFlag:false, statusLsit: [ { value: 0, @@ -44,7 +45,7 @@ Page({ orderId: id } }).then(item => { - console.log(item, "orderId"); + let _this = this tt.pay({ service: 5, orderInfo: { @@ -56,7 +57,29 @@ Page({ tt.showToast({ title: '支付成功!', // 内容 }); - + tt.request({ + url: Http.address + config.api.ifPayOk, // 目标服务器url + method: "post", + headers: { + "Content-Type": "application/json;charset=UTF-8", + token: app.globalData.token + }, + data: { + code: 0, + orderId: id + }, + success: (res) => { + _this.getOrder() + }, + fail: (err) => { + tt.showToast({ + title: err.message, // 内容 + icon: "none" + }); + console.log("我失败; err", err); + _this.getOrder() + } + }); // 支付成功处理逻辑,只有res.code=0时,才表示支付成功 // 但是最终状态要以商户后端结果为准 } else if (res.code === 1) { @@ -64,13 +87,6 @@ Page({ title: '支付超时', // 内容 icon: "none" }); - Http.post({ - url: config.api.ifPayOk, - data: { - code: 1, - orderId: res.data.id - } - }) } else if (res.code === 2) { tt.showToast({ title: '支付失败', // 内容 @@ -133,15 +149,18 @@ Page({ item.createDate = util.formatTime(item.createDate, "yyyy-MM-dd hh:mm:ss") }) if(this.data.pageNum>1){ - + let tempLsit = this.data.orderLsit - tempLsit.push(...arr) + let tempArr = tempLsit.push(...arr) + this.setData({ - orderLsit:tempLsit + orderLsit:tempArr, + noDAtaFlag:tempArr.length==0?true: false, }) }else{ this.setData({ - orderLsit:arr + orderLsit:arr, + noDAtaFlag:arr.length==0?true: false, }) } diff --git a/pages/order/order.ttml b/pages/order/order.ttml index f7bcbcf..0ee659a 100644 --- a/pages/order/order.ttml +++ b/pages/order/order.ttml @@ -3,8 +3,8 @@ - - + + {{item.name}} @@ -14,7 +14,7 @@ - + 订单编号:{{item.id}} @@ -49,8 +49,8 @@ 订单时间:{{item.createDate}} - - {{item.paymentTime?item.paymentTime:'请您在30分支之内支付'}} + + {{item.paymentTime?item.paymentTime:'请您在30分钟之内支付'}} @@ -61,11 +61,27 @@ 已完成 + + 已取消 + + + + + + diff --git a/pages/order/order.ttss b/pages/order/order.ttss index 2ca5715..c7e5ae8 100644 --- a/pages/order/order.ttss +++ b/pages/order/order.ttss @@ -8,6 +8,7 @@ .fPay{ width: 50%; float: left; + height: 120rpx; } .tPay{ width: 50%; @@ -15,9 +16,9 @@ } .aText{ margin-top: 20rpx; -font-size: 36rpx; +font-size: 32rpx; font-family: PingFang SC; -font-weight: 800; +font-weight: 700; color: #07E881; text-align: center; } @@ -83,7 +84,6 @@ text-align: center; width: 60rpx; height: 60rpx; border-radius: 50%; - background-color: coral; float: left; } @@ -128,18 +128,21 @@ margin: 20rpx auto; } .payBtn{ float: right; - width: 180rpx; - line-height: 80rpx; + margin-right: 20rpx; + width: 120rpx; + line-height: 60rpx; text-align: center; border: 2rpx solid #06D176; border-radius: 50rpx; color: #06D176; + } .payOk{ float: right; - width: 180rpx; - line-height: 80rpx; + margin-right: 20rpx; + width: 120rpx; + line-height: 60rpx; text-align: center; border: 2rpx solid #666D80; border-radius: 50rpx; @@ -147,3 +150,17 @@ margin: 20rpx auto; background-color: rgba(135, 144, 168, 0.1);; } +.noDataBox{ + width: 100%; + height: 600rpx; + top: 300rpx; + left: 0; + background-color: #0E1119; + + text-align: center; +} +.noDataImg{ + width: 500rpx; + height: 400rpx; + margin: 200rpx auto; +} diff --git a/pages/publicity/publicity.ttml b/pages/publicity/publicity.ttml index 32ad7f3..fe37666 100644 --- a/pages/publicity/publicity.ttml +++ b/pages/publicity/publicity.ttml @@ -17,7 +17,7 @@ {{item.title}} - + {{item.merchantName}} diff --git a/pages/publicity/publicity.ttss b/pages/publicity/publicity.ttss index 34a5cc1..ec1c510 100644 --- a/pages/publicity/publicity.ttss +++ b/pages/publicity/publicity.ttss @@ -49,8 +49,8 @@ margin: 20rpx 0; } .cover{ - width: 300rpx; - height: 200rpx; + width: 250rpx; + height: 162rpx; float: left; border-radius: 10rpx; /* background-color: cornflowerblue; */ @@ -65,29 +65,31 @@ .courseName{ height: 50rpx; line-height: 50rpx; - font-size: 32rpx; + font-size: 30rpx; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; color: #ffffff; + font-family: PingFang SC; + font-weight: 500; + color: #FEFEFE; } .headImg{ float: left; - width: 60rpx; - height: 60rpx; + width: 50rpx; + height: 50rpx; border-radius: 50%; - background-color: #00cc99; } .annotation{ - width: 240rpx; + width: 168rpx; border-radius: 50rpx; - height: 60rpx; + height: 50rpx; background-color: #333; text-align: center; - line-height: 60rpx; + line-height: 50rpx; color: #9999cc; } .incomeBox{ @@ -96,13 +98,12 @@ .money{ float: left; color: #ff3366; - font-size: 34rpx; + font-size: 28rpx; } .py{ - font-size: 26rpx; - float: left; + float: left; color: #ff3366; - line-height: 46rpx; + font-size: 24rpx; } .moodsImg{ float: right; @@ -115,6 +116,8 @@ float: right; color: #ffffff; margin: 0 10rpx; + font-size: 22rpx; + margin-top: 6rpx; } .moodsNum{ float: right; diff --git a/pages/ranking/ranking.ttml b/pages/ranking/ranking.ttml index 0f859a9..a9fd5db 100644 --- a/pages/ranking/ranking.ttml +++ b/pages/ranking/ranking.ttml @@ -20,7 +20,7 @@ {{item.title}} - + {{item.merchantName}} diff --git a/pages/ranking/ranking.ttss b/pages/ranking/ranking.ttss index 46c002b..1fcc70b 100644 --- a/pages/ranking/ranking.ttss +++ b/pages/ranking/ranking.ttss @@ -45,8 +45,8 @@ position: relative; } .cover{ - width: 300rpx; - height: 200rpx; + width: 250rpx; + height: 162rpx; float: left; border-radius: 10rpx; /* background-color: cornflowerblue; */ @@ -61,29 +61,30 @@ .courseName{ height: 50rpx; line-height: 50rpx; - font-size: 32rpx; + font-size: 30rpx; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; color: #ffffff; - + font-family: PingFang SC; + font-weight: 500; + color: #FEFEFE; } .headImg{ float: left; - width: 60rpx; - height: 60rpx; + width: 50rpx; + height: 50rpx; border-radius: 50%; - background-color: #00cc99; } .annotation{ - width: 240rpx; + width: 168rpx; border-radius: 50rpx; - height: 60rpx; + height: 50rpx; background-color: #333; text-align: center; - line-height: 60rpx; + line-height: 50rpx; color: #9999cc; } .incomeBox{ @@ -92,13 +93,12 @@ .money{ float: left; color: #ff3366; - font-size: 34rpx; + font-size: 28rpx; } .py{ - font-size: 26rpx; + font-size: 24rpx; float: left; color: #ff3366; - line-height: 46rpx; } .moodsImg{ float: right; @@ -111,6 +111,8 @@ float: right; color: #ffffff; margin: 0 10rpx; + font-size: 22rpx; + margin-top: 6rpx; } .moodsNum{ float: right; diff --git a/pages/search/search.js b/pages/search/search.js index 5bd38d9..c37ddb0 100644 --- a/pages/search/search.js +++ b/pages/search/search.js @@ -10,6 +10,7 @@ Page({ pageNum:1, inputValue:"", list:[], + noDAtaFlag:false, }, setSearchValue(e){ let value = e.detail.value @@ -23,6 +24,8 @@ Page({ activityFlag:index, pageNum:1, inputValue:"", + noDAtaFlag:false, + list:[] }) this.search() }, @@ -63,42 +66,54 @@ Page({ data:data }).then(res=>{ let arr = [] - if(res.data.list[0].businessTypes){ + + if(res.data.list!=0&&res.data.list[0].businessTypes){ arr = res.data.list let sting = "" arr.map(item=>{ if(item.businessTypes){ - item.authoRemark = JSON.parse(item.businessTypes)[0].title + if(JSON.parse(item.businessTypes).length>0){ + item.authoRemark = JSON.parse(item.businessTypes)[0].title + }else{ + item.authoRemark = "" + } + } }) let tempArr = this.data.list if(this.data.pageNum>1){ - tempArr.push(...arr) + let contArr= tempArr.push(...arr) this.setData({ - list:tempArr + list:arr, + noDAtaFlag:contArr.length==0?true:false }) }else{ this.setData({ - list:arr + list:arr, + noDAtaFlag:arr.length==0?true:false }) } }else{ if(this.pageNum>1){ let tempArr = this.data.list - tempArr.push(...res.data.list) + let contArr= tempArr.push(...res.data.list) + this.setData({ - list:tempArr + list:tempArr, + noDAtaFlag:contArr.length==0?true:false }) }else{ this.setData({ - list:res.data.list + list:res.data.list, + noDAtaFlag:res.data.list==0?true:false }) } } }) + console.log(this.data.list); }, onLoad(){ this.search() diff --git a/pages/search/search.ttml b/pages/search/search.ttml index 6ec2edd..a617dc9 100644 --- a/pages/search/search.ttml +++ b/pages/search/search.ttml @@ -125,7 +125,7 @@ --> - + diff --git a/pages/search/search.ttss b/pages/search/search.ttss index 828559f..88ebbdd 100644 --- a/pages/search/search.ttss +++ b/pages/search/search.ttss @@ -5,7 +5,7 @@ } .searchF{ width: 80%; - height: 80rpx; + height: 68rpx; background-color: rgba(51, 51, 51, 0.5); border-radius: 60rpx; margin: 20rpx; @@ -19,10 +19,10 @@ } .searchBtn{ width: 10%; - line-height: 100rpx; + line-height: 80rpx; color: #00ff99; float: left; - height: 100rpx; + height: 80rpx; margin-top: 10rpx; font-size: 30rpx; } @@ -171,10 +171,9 @@ } .h3{ - width: 360rpx; line-height: 60rpx; - font-size: 34rpx; + font-size: 30rpx; color: #ffffff; font-weight: 560; overflow:hidden; @@ -184,21 +183,21 @@ -webkit-line-clamp:1; } .headImg{ - width: 60rpx; - height: 60rpx; + width: 50rpx; + height: 50rpx; border-radius: 50%; - background-color: coral; float: left; } .name{ width: 220rpx; - line-height: 60rpx; - height: 60rpx; + line-height: 50rpx; + height: 50rpx; border-radius: 50rpx; color: #8790A8; text-align: center; background-color: #222735; + font-size: 28rpx; } .priceBox{ /* margin-top: 20rpx; */ @@ -241,7 +240,6 @@ margin: 20rpx auto; float: left; width: 120rpx; height: 120rpx; - background-color: aqua; border-radius: 50%; margin: 20rpx; } @@ -303,9 +301,10 @@ margin: 20rpx auto; left: 0; background-color: #0E1119; - + text-align: center; } .noDataImg{ width: 500rpx; height: 400rpx; + margin: 200rpx auto; } \ No newline at end of file diff --git a/pages/sponsor/sponsor.ttml b/pages/sponsor/sponsor.ttml index bcf07e6..d7978aa 100644 --- a/pages/sponsor/sponsor.ttml +++ b/pages/sponsor/sponsor.ttml @@ -4,7 +4,7 @@ - LOGO + 知播堂 版本 1.0.0 @@ -13,18 +13,13 @@ - dddddddddasd阿德飒飒啊啊啊啊啊啊啊啊啊打算大苏打顶顶 - 顶顶顶顶顶顶大师水水水水水水水水水水水水水水大飒飒飒飒 - 飒飒飒飒飒飒飒飒飒飒飒飒飒飒d阿三水水水水水水水水水水 + 把知识传播到每个角落是我们的使命。知播堂是由北京商宇咨询有限公司打造的一款针对抖音达人在线推广教学课程的小程序平台。旨在通过即时短视频传播达人的教学,培训课程。用户在小程序端购买或者观看广告后,即可在抖音app内解锁和学习达人课程。 - - - 咨询我们 - - + + diff --git a/pages/sponsor/sponsor.ttss b/pages/sponsor/sponsor.ttss index 25dd213..2808ba9 100644 --- a/pages/sponsor/sponsor.ttss +++ b/pages/sponsor/sponsor.ttss @@ -49,6 +49,7 @@ line-height: 80rpx; text-align: center; color: #FFFFFF; + font-size: 30rpx; background: linear-gradient(-4deg, #4EE09D, #02C96E); } \ No newline at end of file diff --git a/pages/upEnter/upEnter.js b/pages/upEnter/upEnter.js index c76f8b1..4002dda 100644 --- a/pages/upEnter/upEnter.js +++ b/pages/upEnter/upEnter.js @@ -10,7 +10,9 @@ Page({ ttBean:"",//抖音粉丝数量 userName:"",//姓名 userPhone:"",//手机号 - + codePhone:"",//手机验证码 + Num:60, + NumFlag:false, }, setTtNum(e){ let value = e.detail.value @@ -36,8 +38,58 @@ Page({ userPhone: value }) }, + setCodePhone(e){ + let value = e.detail.value + this.setData({ + codePhone: value + }) + }, + getCode(){//获取验证码 + console.log(this.data.userPhone); + let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; + if(!myreg.test(this.data.userPhone)){ + tt.showToast({ + title: '请输入正确的手机号', + icon: "none" + }); + return + } + Http.get({ + url:config.api.getCodePhone, + data:{ + phone:this.data.userPhone + } + }).then(res=>{ + this.setData({ + NumFlag:true + }) + let tiem = setInterval(()=>{ + console.log(this.data.Num) + this.setData({ + Num:this.data.Num-1 + }) + if(this.data.Num<=1){ + clearInterval(tiem) + this.setData({ + NumFlag:false + }) + } + },1000) + + tt.showToast({ + title: '发送成功', + icon: "none" + }); + }).catch(err=>{ + tt.showToast({ + title: err.message, + icon: "none" + }); + }) + }, submit(){ let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; + if(this.data.ttNum==""){ tt.showToast({ title: '请填写抖音号', // 抖音号 @@ -74,13 +126,14 @@ Page({ ttUserName:this.data.ttNum, ttCountFans:this.data.ttBean, liaisonMan:this.data.userName, - liaisonPhone:this.data.userPhone + liaisonPhone:this.data.userPhone, + code:this.data.codePhone } }).then(res=>{ tt.showToast({ title: '提交成功!', // 内容 success: (res) => { - + tt.navigateBack(); } }); }).catch(err=>{ diff --git a/pages/upEnter/upEnter.ttml b/pages/upEnter/upEnter.ttml index beebd19..653829c 100644 --- a/pages/upEnter/upEnter.ttml +++ b/pages/upEnter/upEnter.ttml @@ -14,7 +14,7 @@ 粉丝数 - + @@ -27,10 +27,11 @@ - + + + 获取验证码 + {{Num}}s + 提交申请 diff --git a/pages/user/user.ttml b/pages/user/user.ttml index 8ebf68c..3eac9e3 100644 --- a/pages/user/user.ttml +++ b/pages/user/user.ttml @@ -14,8 +14,8 @@ {{userData.nickName}} - + - + @@ -67,7 +67,8 @@ - + + + 10000){ + sing = (Num/10000).toFixed(2)+"w" + + }else{ + sing =Num + } + return sing +} const formatTime = (date, fmt) => { try { @@ -192,6 +202,6 @@ module.exports = { fmtDate: fmtDate, timechuo: timechuo, timecha: timecha, - + moodsText:moodsText, convertUTCTimeToLocalTime: convertUTCTimeToLocalTime };