| @@ -6,7 +6,7 @@ App({ | |||
| }, | |||
| globalData:{ | |||
| token: null, | |||
| imgHttps: 'https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/', | |||
| imgHttps: 'https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/', | |||
| platform:null,//手机型号 | |||
| }, | |||
| onLaunch: function () { | |||
| @@ -15,7 +15,7 @@ App({ | |||
| try { | |||
| var res = tt.getSystemInfoSync(); | |||
| that.statusBarHeight = res.statusBarHeight | |||
| console.log(res,"型号"); | |||
| console.log(`手机型号为 ${res.platform}`); | |||
| this.globalData.platform = res.platform | |||
| } catch (error) { | |||
| console.log(`获取系统信息失败`); | |||
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "pages":[ | |||
| "pages": [ | |||
| "pages/index/index", | |||
| "pages/category/category", | |||
| "pages/ranking/ranking", | |||
| @@ -17,13 +17,12 @@ | |||
| "pages/integral/integral" | |||
| ], | |||
| "usingComponents": {}, | |||
| "window":{ | |||
| "backgroundTextStyle":"light", | |||
| "window": { | |||
| "backgroundTextStyle": "light", | |||
| "navigationBarBackgroundColor": "#000033", | |||
| "navigationBarTitleText": "知播堂", | |||
| "navigationBarTextStyle":"white", | |||
| "navigationStyle":"custom" | |||
| "navigationBarTextStyle": "white", | |||
| "navigationStyle": "custom" | |||
| }, | |||
| "tabBar": { | |||
| "custom": true, | |||
| @@ -51,7 +50,6 @@ | |||
| "selectedIconPath": "assets/images/home_btn_ic_wd1.png" | |||
| } | |||
| ] | |||
| } | |||
| } | |||
| }, | |||
| "sitemapLocation": "sitemap.json" | |||
| } | |||
| @@ -62,6 +62,7 @@ Component({ | |||
| }, | |||
| attached: function(){ | |||
| let pages = getCurrentPages(); | |||
| console.log(pages,"pages"); | |||
| if (pages.length <= 1) { | |||
| this.setData({ | |||
| back: false | |||
| @@ -22,6 +22,9 @@ let config = { | |||
| getPublicityDetail:"/wxCampaign/findById",//宣传页详情 | |||
| apply:"/upSettlein/add",//提交入住申请 | |||
| getCodePhone:"/upSettlein/sendLoginPhoneCode",//获取手机验证码 | |||
| phoneFromCode:"/user/phoneFromCode",//授权收手机号 | |||
| creditsave:"/order/creditsave",//ios积分抵扣 | |||
| creditList:"/credit/list",//积分记录 | |||
| } | |||
| } | |||
| module.exports = config; | |||
| @@ -1,6 +1,7 @@ | |||
| const app = getApp() | |||
| const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | |||
| const navigationBarHeight2 = (getApp().statusBarHeight + 44) | |||
| const screenHeight = (getApp().screenHeight) | |||
| const config = require("../../config/config.js"); | |||
| const Http = require("../../utils/HttpBasics") | |||
| Page({ | |||
| @@ -8,6 +9,7 @@ Page({ | |||
| imgHttps:app.globalData.imgHttps, | |||
| navigationBarHeight, | |||
| navigationBarHeight2, | |||
| screenHeight, | |||
| activityFlag: 0, | |||
| column: [], | |||
| id:"",//选中分类id | |||
| @@ -5,10 +5,13 @@ const Http = require("../../utils/HttpBasics.js") | |||
| Page({ | |||
| data: { | |||
| direction:-90, | |||
| showGoDouDian: false, | |||
| direction: -90, | |||
| screenFlag: false, | |||
| showAddBox: {}, | |||
| signal: app.globalData.platform, | |||
| // signal: app.globalData.platform, | |||
| signal:'Android',//零时 写死不走积分 | |||
| flagSystem:app.globalData.platform, | |||
| classTitle: "",//课程标题 | |||
| showIos: false,//ios字符提示 | |||
| showHie: false,//提示框 | |||
| @@ -57,25 +60,27 @@ Page({ | |||
| // goIndent(e){ | |||
| // console.log(e.dataset.url); | |||
| // }, | |||
| itiRecording(){//防止录屏初始化函数 | |||
| if(this.data.signal=='ios'){ | |||
| itiRecording() {//防止录屏初始化函数 | |||
| console.log(this.data.flagSystem); | |||
| if (this.data.flagSystem == 'ios') { | |||
| this.onRecord() | |||
| }else{ | |||
| } else { | |||
| this.disable() | |||
| } | |||
| }, | |||
| disable: function() {// 防止录屏录制 安卓 | |||
| disable: function () {// 防止录屏录制 安卓 | |||
| tt.disableUserScreenRecord({ | |||
| success(res) { | |||
| console.log("disableUserScreenRecord 调用成功", res) | |||
| }, | |||
| fail(res) { | |||
| console.log("disableUserScreenRecord 调用失败", res); | |||
| }, | |||
| success(res) { | |||
| console.log("disableUserScreenRecord 调用成功", res) | |||
| }, | |||
| fail(res) { | |||
| console.log("disableUserScreenRecord 调用失败", res); | |||
| }, | |||
| }) | |||
| }, | |||
| }, | |||
| onRecord: function () { // 防止录屏录制 ios | |||
| const callback = (res) => { | |||
| console.log("我执行了") | |||
| if (res.state === 'start') { | |||
| this.data.videoContext.pause()//暂停 | |||
| this.data.videoContext.exitFullScreen()//退出全屏 | |||
| @@ -228,7 +233,8 @@ Page({ | |||
| }, | |||
| success: (res) => { | |||
| _this.setData({ | |||
| goPayFlag: false | |||
| goPayFlag: false, | |||
| btnSuspend: true, | |||
| }) | |||
| _this.getData() | |||
| }, | |||
| @@ -301,13 +307,61 @@ Page({ | |||
| }) | |||
| }, | |||
| goPay() { | |||
| this.order() | |||
| console.log("我支付了"); | |||
| this.setData({ | |||
| goPayFlag: false, | |||
| btnSuspend: true, | |||
| }) | |||
| if (this.data.signal == 'ios') { | |||
| tt.showLoading({ | |||
| title: '支付中...', // 内容 | |||
| }); | |||
| let _this = this | |||
| //获取积分信息 | |||
| Http.get({ | |||
| url: config.api.getUserInfo | |||
| }).then(res => { | |||
| //获取当前用户积分 | |||
| let integral = res.data.credit | |||
| if (Number(_this.data.data.salePrice) <= integral) {//判断用户积分是否大于购买该课程的积分 | |||
| Http.post({ | |||
| url: config.api.creditsave, | |||
| data: { | |||
| couponId: _this.data.id | |||
| } | |||
| }).then(res => { | |||
| tt.showToast({ | |||
| title: '购买成功', // 内容 | |||
| duration: 2000, | |||
| success: (res) => { | |||
| _this.setData({ | |||
| goPayFlag: false, | |||
| btnSuspend: true, | |||
| }) | |||
| _this.getData() | |||
| tt.hideLoading(); | |||
| } | |||
| }); | |||
| }).catch(err => { | |||
| tt.showToast({ | |||
| title: err.message ? err.message : err.data, | |||
| icon: "none" | |||
| }); | |||
| }) | |||
| } else { | |||
| tt.hideLoading(); | |||
| //积分不足 | |||
| this.setData({ | |||
| showGoDouDian: true | |||
| }) | |||
| } | |||
| }).catch(err => { | |||
| tt.showToast({ | |||
| title: err.message ? err.message : err.data, | |||
| icon: "none" | |||
| }); | |||
| }) | |||
| } else { | |||
| this.order() | |||
| } | |||
| }, | |||
| time(e) { | |||
| let time = e.detail.currentTime.toFixed(0); | |||
| @@ -389,6 +443,26 @@ Page({ | |||
| }) | |||
| }) | |||
| }, | |||
| openGood(e) { | |||
| this.setData({ | |||
| showGoDouDian: false, | |||
| }) | |||
| console.log(e.target.dataset.id); | |||
| tt.openEcGood({ | |||
| promotionId: e.target.dataset.id, | |||
| success(res) { | |||
| console.log("调用成功", res); | |||
| }, | |||
| fail(res) { | |||
| console.log("调用失败", res); | |||
| }, | |||
| }); | |||
| }, | |||
| hieGoDou() { | |||
| this.setData({ | |||
| showGoDouDian: false, | |||
| }) | |||
| }, | |||
| getData() {//课程详情 | |||
| Http.get({ | |||
| url: config.api.classDetails, | |||
| @@ -404,6 +478,7 @@ Page({ | |||
| } else { | |||
| this.getVideoUrl(res.data.videoId) | |||
| } | |||
| console.log(res.data.view, "支付状态"); | |||
| }).catch(err => { | |||
| tt.showToast({ | |||
| @@ -419,18 +494,18 @@ Page({ | |||
| videoId: id | |||
| } | |||
| }).then(res => { | |||
| console.log(res.data.width,res.data.height); | |||
| if((res.data.width)*1>=(res.data.height)*1){ | |||
| console.log(res.data.width, res.data.height); | |||
| if ((res.data.width) * 1 >= (res.data.height) * 1) { | |||
| //横屏 | |||
| console.log("横屏"); | |||
| this.setData({ | |||
| direction:-90 | |||
| direction: -90 | |||
| }) | |||
| }else{ | |||
| } else { | |||
| //竖屏 | |||
| console.log("竖屏"); | |||
| this.setData({ | |||
| direction:0 | |||
| direction: 0 | |||
| }) | |||
| } | |||
| this.setData({ | |||
| @@ -485,10 +560,10 @@ Page({ | |||
| animation.translateX(400).step() | |||
| this.setData({ | |||
| showAddBox: animation.export(), | |||
| screenFlag:false,//初始化防录屏弹框 | |||
| screenFlag: false,//初始化防录屏弹框 | |||
| }) | |||
| // this.itiRecording() | |||
| this.itiRecording() | |||
| }, | |||
| onShareAppMessage: function (shareOption) { | |||
| console.log(this.data.data.dyTitle); | |||
| @@ -497,18 +572,21 @@ Page({ | |||
| return { | |||
| channel: 'video', // 必写 video | |||
| // templateId: '', // 分享的模版 id (如果未设置就是默认,下面会说如何设置) | |||
| title: '知播堂', // 分享的标题 | |||
| // desc: '我是简介', // 分享的内容介绍目前没有用 | |||
| title: `${that.data.data.dyTitle}`, // 分享的标题 | |||
| // desc: `${that.data.data.dyTitle}`, // 分享的内容介绍目前没有用 | |||
| // path: `/pages/index/index`, // 分享的路径 | |||
| extra: { | |||
| videoTopics: ["知播堂", that.data.data.dyTitle] // 只有抖音才会有的属性 | |||
| }, | |||
| // extra: { | |||
| // videoTopics: [ that.data.data.dyTitle] // 只有抖音才会有的属性 | |||
| // }, | |||
| } | |||
| } else { // 右上角分享 | |||
| return { | |||
| extra: { | |||
| videoTopics: [ that.data.data.dyTitle] // 只有抖音才会有的属性 | |||
| }, | |||
| templateId: '', //分享的模版 id | |||
| title: '', //分享的标题 | |||
| desc: '', // 分享的内容 | |||
| title: `${that.data.data.dyTitle}`, //分享的标题 | |||
| // desc: `${that.data.data.dyTitle}`, // 分享的内容 | |||
| // path: ``, // 分享的路径 | |||
| } | |||
| } | |||
| @@ -5,7 +5,7 @@ | |||
| <view style="height:{{navigationBarHeight}} "></view> | |||
| <video direction="{{direction}}" id="myVideo" bindtimeupdate="time" controls="{{btnSuspend}}" src="{{mp4Url}}"></video> | |||
| <cover-view class="coverPay" tt:if="{{goPayFlag&&signal!='ios'}}" bindtap="goPay">¥ {{data.salePriceStr}} 购买</cover-view> | |||
| <cover-view class="noCoverPay" tt:if="{{goPayFlag&&signal=='ios'}}" >暂不支持购买</cover-view> | |||
| <cover-view class="noCoverPay" tt:if="{{goPayFlag&&signal=='ios'}}" bindtap="goPay">{{data.salePrice}}积分</cover-view> | |||
| <view class="showContBox oh"> | |||
| <view class="titleBox"> | |||
| <view class="title">{{data.title}}</view> | |||
| @@ -115,6 +115,12 @@ | |||
| <view class="purchaseTitle">购买须知</view> | |||
| <view class="purchaseXian"></view> | |||
| </view> | |||
| <view class="issueBox"> | |||
| <!-- <view class="issueTitle">注</view> --> | |||
| <view class="answerBox"> | |||
| <view class="answer1">小程序内购买课程为课程兑换权益,购买成功后将自动兑换到您的账户内,可在小程序中重复学习观看。</view> | |||
| </view> | |||
| </view> | |||
| <view class="issueBox"> | |||
| <view class="issueTitle">如何观看以购买的课程?</view> | |||
| <view class="answerBox"> | |||
| @@ -127,6 +133,7 @@ | |||
| <view class="answer">知播堂的全部课程均属虚拟商品,购买后无特殊情况不支持退款,请在购买前预览并慎重购买,如课程存在内容与描述不符、违规行为,您有权自行联系老师,并向老师提出退款。</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <!--/ 介绍 --> | |||
| <!-- 目录 --> | |||
| @@ -179,13 +186,23 @@ | |||
| <button class="service" open-type="contact" > 咨询 </button> | |||
| <view class="shopping" bindtap="goPay" tt:if="{{signal!='ios'&&!data.view}}">¥{{data.salePriceStr}}</view> | |||
| <view class="nOshopping" bindtap="showIos" tt:if="{{signal=='ios'&&!data.view}}">¥{{data.salePriceStr}}</view> | |||
| <view class="nOshopping" bindtap="goPay" tt:if="{{signal=='ios'&&!data.view}}">¥{{data.salePrice}}积分</view> | |||
| </view> | |||
| </view> | |||
| <!-- <view class="temp"></view> --> | |||
| <prompt bind:hie="cancelIos" tt:if="{{showIos}}" titil="提示" text="Ios当前暂不支持购买" hidText="确定" ></prompt> | |||
| <!--<prompt bind:hie="cancelIos" tt:if="{{showIos}}" titil="提示" text="Ios当前暂不支持购买" hidText="确定" ></prompt>--> | |||
| <view class="screenBox" tt:if="{{screenFlag}}"> | |||
| <view class="screenText">由于版权原因,此内容不支持iOS录屏</view> | |||
| </view> | |||
| </view> | |||
| <view class="goDouDianBox" tt:if="{{showGoDouDian}}"> | |||
| <view class="jifenText">积分不足请去抖店充值</view> | |||
| <view class="caozuoBox oh"> | |||
| <view class="esc" bindtap="hieGoDou">取消</view> | |||
| <button class="goDouDian" type="default" size="default" data-id="3496026267042605702" bindtap="openGood"> | |||
| 去抖店 | |||
| </button> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -37,7 +37,7 @@ | |||
| line-height: 90rpx; | |||
| text-align: center; | |||
| border-radius: 40rpx; | |||
| background-color: rgba(255, 255, 255, 0.3); | |||
| background-color: #07E881; | |||
| color: #ffffff; | |||
| position: absolute; | |||
| left: 40%; top: 293rpx; | |||
| @@ -328,29 +328,27 @@ | |||
| height: 100%; | |||
| } | |||
| .shopping{ | |||
| margin-top: 15rpx; | |||
| height: 80rpx; | |||
| line-height: 80rpx; | |||
| margin: 15rpx 30rpx; | |||
| height: 70rpx; | |||
| line-height: 70rpx; | |||
| text-align: center; | |||
| float: left; | |||
| padding: 0 60rpx; | |||
| float: right; | |||
| padding: 0 50rpx; | |||
| background: linear-gradient(-4deg, #4EE09D, #02C96E); | |||
| border-radius: 50rpx; | |||
| margin-left: 80rpx; | |||
| color: #FFFFFF; | |||
| font-size: 32rpx; | |||
| font-family: OPPOSans; | |||
| } | |||
| .nOshopping{ | |||
| margin-top: 15rpx; | |||
| height: 80rpx; | |||
| line-height: 80rpx; | |||
| margin: 15rpx 30rpx; | |||
| height: 70rpx; | |||
| line-height: 70rpx; | |||
| text-align: center; | |||
| float: left; | |||
| padding: 0 60rpx; | |||
| background-color: rgba(255, 255, 255, 0.1); | |||
| float: right; | |||
| padding: 0 30rpx; | |||
| background: linear-gradient(-4deg, #4EE09D, #02C96E); | |||
| border-radius: 50rpx; | |||
| margin-left: 80rpx; | |||
| color: #FFFFFF; | |||
| font-size: 32rpx; | |||
| font-family: OPPOSans; | |||
| @@ -646,6 +644,15 @@ | |||
| content: "答:"; | |||
| color: #07E881; | |||
| } | |||
| .answer1{ | |||
| color: #535E75; | |||
| font-size: 24rpx; | |||
| margin: 10rpx 20rpx 20rpx 20rpx; | |||
| } | |||
| .answer1::before{ | |||
| content: "注:"; | |||
| color: red; | |||
| } | |||
| button::after { | |||
| border: none; | |||
| @@ -700,4 +707,46 @@ rich-text img{ | |||
| /* width: 100%; */ | |||
| max-width: 100%; | |||
| /* max-height: 400rpx; */ | |||
| } | |||
| } | |||
| .AAVV{ | |||
| background-color: #fff; | |||
| margin-bottom: 30rpx; | |||
| } | |||
| .goDouDianBox{ | |||
| width: 70%; | |||
| /* height: 300rpx; */ | |||
| background-color: #222633; | |||
| border-radius: 20rpx; | |||
| position: fixed; | |||
| top: 400rpx; | |||
| left: 15%; | |||
| } | |||
| .jifenText{ | |||
| text-align: center; | |||
| height: 180rpx; | |||
| color: #fff; | |||
| line-height: 180rpx; | |||
| } | |||
| .esc{ | |||
| float: left; | |||
| width: 49%; | |||
| border-top: #3D4253 1rpx solid; | |||
| border-right: #3D4253 1rpx solid; | |||
| /* border-bottom: #3D4253 1rpx solid; */ | |||
| text-align: center; | |||
| height: 70rpx; | |||
| line-height: 70rpx; | |||
| } | |||
| .goDouDian{ | |||
| float: left; | |||
| width: 50%; | |||
| border-top: #3D4253 1rpx solid; | |||
| /* border-radius: #fff 1rpx solid; */ | |||
| /* border-bottom: #3D4253 1rpx solid; */ | |||
| text-align: center; | |||
| color: #4EE09D; | |||
| height: 70rpx; | |||
| line-height: 70rpx; | |||
| font-size: 28rpx; | |||
| } | |||
| @@ -1,13 +1,13 @@ | |||
| /* .headBox{ | |||
| width: 100%; | |||
| height: 320rpx; | |||
| background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/course_bnt.png"); | |||
| background-image: url("https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/course_bnt.png"); | |||
| background-size: 100% 320rpx; | |||
| } | |||
| .classHourBox{ | |||
| width: 80%; | |||
| height: 222rpx; | |||
| background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/course_bnt_xuexi.png"); | |||
| background-image: url("https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/course_bnt_xuexi.png"); | |||
| background-size: 100% 222rpx; | |||
| margin-top:60rpx ; | |||
| margin-left: auto; | |||
| @@ -268,6 +268,7 @@ Page({ | |||
| title: '', //分享的标题 | |||
| desc: '', // 分享的内容 | |||
| // path: ``, // 分享的路径 | |||
| imageUrl:"../../assets/images/1.png" | |||
| } | |||
| } | |||
| }, | |||
| @@ -221,7 +221,7 @@ 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-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_bnt_bq.png'); */ | |||
| /* background-size:74rpx 40rpx; */ | |||
| color: #ffffff; | |||
| font-size: 24rpx; | |||
| @@ -553,7 +553,7 @@ overflow: hidden; | |||
| position: absolute; | |||
| width: 42rpx; | |||
| height: 55rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); | |||
| background-size:42rpx 55rpx; | |||
| background-repeat:no-repeat; | |||
| color: #ffffff; | |||
| @@ -566,7 +566,7 @@ overflow: hidden; | |||
| position: absolute; | |||
| width: 42rpx; | |||
| height: 55rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); | |||
| background-size:42rpx 55rpx; | |||
| background-repeat:no-repeat; | |||
| color: #ffffff; | |||
| @@ -579,7 +579,7 @@ overflow: hidden; | |||
| position: absolute; | |||
| width: 42rpx; | |||
| height: 55rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); | |||
| background-size:42rpx 55rpx; | |||
| background-repeat:no-repeat; | |||
| color: #ffffff; | |||
| @@ -592,7 +592,7 @@ overflow: hidden; | |||
| position: absolute; | |||
| width: 42rpx; | |||
| height: 55rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); | |||
| background-size:42rpx 55rpx; | |||
| background-repeat:no-repeat; | |||
| color: #ffffff; | |||
| @@ -1,41 +1,77 @@ | |||
| const app = getApp() | |||
| const config = require("../../config/config") | |||
| const Http = require("../../utils/HttpBasics.js") | |||
| const util = require("../../utils/util.js") | |||
| const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | |||
| Page({ | |||
| data:{ | |||
| imgHttps:app.globalData.imgHttps, | |||
| navigationBarHeight, | |||
| list:[ | |||
| { | |||
| title:"积分充值", | |||
| type: 1, | |||
| id:123102410, | |||
| tiem:"2020-11-03", | |||
| num:2354121551, | |||
| }, | |||
| { | |||
| title:"积分消费", | |||
| type: 2, | |||
| id:1231023234, | |||
| tiem:"2020-10-03", | |||
| num:23545, | |||
| }, | |||
| { | |||
| title:"积分充值", | |||
| type: 1, | |||
| id:123104432, | |||
| tiem:"2020-11-03", | |||
| num:111, | |||
| }, | |||
| { | |||
| title:"积分充值", | |||
| type: 1, | |||
| id:1231422342, | |||
| tiem:"2020-11-03", | |||
| num:23, | |||
| }, | |||
| list:[ | |||
| ], | |||
| credit:"", | |||
| pageNum:1, | |||
| }, | |||
| //获取积分信息 | |||
| getUserData(){ | |||
| Http.get({ | |||
| url:config.api.getUserInfo | |||
| }).then(res=>{ | |||
| this.setData({ | |||
| credit:res.data.credit | |||
| }) | |||
| }).catch(err=>{ | |||
| tt.showToast({ | |||
| title: err.message ? err.message : err.data, | |||
| icon: "none" | |||
| }); | |||
| }) | |||
| }, | |||
| getList(){ | |||
| tt.showLoading({ | |||
| title: '加载中...', // 内容 | |||
| }); | |||
| Http.get({ | |||
| url:config.api.creditList, | |||
| data:{ | |||
| pageNum: this.data.pageNum, | |||
| pageSize: 10, | |||
| } | |||
| }).then(res=>{ | |||
| let tmepLsit = res.data.list | |||
| tmepLsit.map(item=>{ | |||
| item.createDate = util.formatTime(item.createDate,"yyyy-MM-dd hh:mm:ss") | |||
| }) | |||
| if(this.data.pageNum>1){ | |||
| let arr = this.data.list | |||
| this.setData({ | |||
| list:[...arr,...tmepLsit] | |||
| }) | |||
| }else{ | |||
| this.setData({ | |||
| list:tmepLsit | |||
| }) | |||
| } | |||
| tt.hideLoading(); | |||
| ] | |||
| }).catch(err=>{ | |||
| tt.hideLoading(); | |||
| tt.showToast({ | |||
| title: err.message?err.message:err.data, // 内容 | |||
| }); | |||
| }) | |||
| }, | |||
| onLoad: function () { | |||
| this.getUserData() | |||
| this.getList() | |||
| }, | |||
| onReachBottom(){ | |||
| console.log("到底了"); | |||
| this.setData({ | |||
| pageNum:this.data.pageNum +1 | |||
| }) | |||
| this.getList() | |||
| } | |||
| }) | |||
| @@ -3,22 +3,22 @@ | |||
| <navbar back text="我的积分" background="#0E1119" color="#fff"></navbar> | |||
| <view style="height:{{navigationBarHeight}} "></view> | |||
| <view class="limit">积分余额</view> | |||
| <view class="balance">20151111.20</view> | |||
| <view class="balance">{{credit}}</view> | |||
| <view class="detail"> 积分收支明细</view> | |||
| <view class="itemBox oh" tt:for="{{list}}"> | |||
| <view class="oh"> | |||
| <view class="leftBox"> | |||
| <view class="tpyeText">{{item.title}}</view> | |||
| <view class="tpyeText">{{item.changePurpose}}</view> | |||
| <view class="order">订单编号:{{item.id}}</view> | |||
| <view class="orderTiem">{{item.tiem}}</view> | |||
| <view class="orderTiem">{{item.createDate}}</view> | |||
| </view> | |||
| <view class="rightBox" tt:if="{{item.type==1}}"> | |||
| +{{item.num}} | |||
| <view class="rightBox" tt:if="{{item.creditNum>=0}}"> | |||
| +{{item.creditNum}} | |||
| </view> | |||
| <view class="addright" tt:if="{{item.type==2}}"> | |||
| -{{item.num}} | |||
| <view class="addright" tt:if="{{item.creditNum<0}}"> | |||
| {{item.creditNum}} | |||
| </view> | |||
| </view> | |||
| @@ -8,7 +8,7 @@ Page({ | |||
| data: { | |||
| navigationBarHeight, | |||
| imgHttps: app.globalData.imgHttps, | |||
| pitch: 0,//选中支付类型 | |||
| pitch: 1,//选中支付类型 | |||
| orderLsit: [],//订单列表 | |||
| pageNum: 1, | |||
| noDAtaFlag:false, | |||
| @@ -140,7 +140,7 @@ Page({ | |||
| url: config.api.getOrderLsit, | |||
| data: { | |||
| pageNum: this.data.pageNum, | |||
| pageSize: 3, | |||
| pageSize: 6, | |||
| statusS: tempArr | |||
| } | |||
| }).then(res => { | |||
| @@ -138,7 +138,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -150,7 +150,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -162,7 +162,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -174,7 +174,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -10,7 +10,7 @@ | |||
| width: 100%; | |||
| height: 480rpx; | |||
| border-radius: 10rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/leaderboard_bnt.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/leaderboard_bnt.png'); | |||
| background-size: 100% 480rpx; | |||
| background-position: 0 -1500rpx; | |||
| } | |||
| @@ -133,7 +133,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_1.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -145,7 +145,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_2.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -157,7 +157,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_3.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -169,7 +169,7 @@ | |||
| position: absolute; | |||
| width: 52rpx; | |||
| height: 65rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/home_rmph_ic_4.png'); | |||
| background-size:52rpx 65rpx; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| @@ -55,6 +55,9 @@ Page({ | |||
| pageNum:this.data.pageNum, | |||
| pageSize:8 | |||
| } | |||
| if(this.data.inputValue!=""){ | |||
| data.isSearch = 1 | |||
| } | |||
| }else{//作者 | |||
| url = config.api.getAuthor | |||
| data = { | |||
| @@ -1,6 +1,6 @@ | |||
| .versionsBox{ | |||
| height: 360rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/aboutUs_bnt.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/aboutUs_bnt.png'); | |||
| background-size: 100% 360rpx; | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| .backImg{ | |||
| width: 100%; | |||
| height: 750rpx; | |||
| background-image: url('https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/apply_bnt.png'); | |||
| background-image: url('https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/apply_bnt.png'); | |||
| background-size: 100% 750rpx; | |||
| } | |||
| .messageBox{ | |||
| @@ -5,11 +5,13 @@ const Http = require("../../utils/HttpBasics.js") | |||
| const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||
| Page({ | |||
| data: { | |||
| signal: app.globalData.platform, | |||
| navigationBarHeight, | |||
| imgHttps: app.globalData.imgHttps, | |||
| userData: "", | |||
| userPhone: "", | |||
| showBindPhone: false,//绑定手机号边框 | |||
| phoneNum:"", | |||
| showBindPhone: false,//绑定手机号弹框 | |||
| Num: 60, | |||
| NumFlag: false, | |||
| code: ""//验证码 | |||
| @@ -36,6 +38,30 @@ Page({ | |||
| code: value | |||
| }) | |||
| }, | |||
| phoneFromCode() {//授权手机号 | |||
| Http.post({ | |||
| url: config.api.phoneFromCode, | |||
| data: { | |||
| code: this.data.code, | |||
| phone: this.data.userPhone | |||
| } | |||
| }).then(res => { | |||
| tt.showToast({ | |||
| title: '授权成功', // 内容 | |||
| icon: "none" | |||
| }); | |||
| this.setData({ | |||
| showBindPhone: false | |||
| }) | |||
| this.getUserData() | |||
| }).catch(err => { | |||
| tt.showToast({ | |||
| title: err.message ? err.message : err.data, | |||
| icon: "none" | |||
| }); | |||
| }) | |||
| }, | |||
| getCode() {//获取验证码 | |||
| console.log(this.data.userPhone); | |||
| let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; | |||
| @@ -82,21 +108,21 @@ Page({ | |||
| getUserData() {//获取用户信息 | |||
| Http.get({ | |||
| url:config.api.getUserInfo | |||
| }).then(res=>{ | |||
| if(res.data.phone){ | |||
| url: config.api.getUserInfo | |||
| }).then(res => { | |||
| console.log(res.data.phone); | |||
| if (res.data.phone) { | |||
| this.setData({ | |||
| userPhone:res.data.phone | |||
| phoneNum: res.data.phone | |||
| }) | |||
| } | |||
| }).catch(err=>{ | |||
| }).catch(err => { | |||
| tt.showToast({ | |||
| title: err.message ? err.message : err.data, | |||
| icon: "none" | |||
| }); | |||
| }) | |||
| }, | |||
| onLoad: function () { | |||
| console.log(123); | |||
| this.getUserData() | |||
| @@ -18,10 +18,10 @@ | |||
| lazy-load="false" binderror="" bindload="" /> --> | |||
| </view> | |||
| <view class="phoneBox oh"> | |||
| <!-- <view class="phoneBox oh"> | |||
| <view class="phone">{{phoneNum}}</view> | |||
| <view class="phoneBtn" bindtap="showBox">{{phoneNum?'更改绑定手机号':'绑定手机号'}}</view> | |||
| </view> | |||
| </view> --> | |||
| </view> | |||
| </view> | |||
| <!-- <view class="functionBox oh"> | |||
| @@ -65,10 +65,9 @@ | |||
| </view> | |||
| <image class="go" src="../../assets/images/arrow-right-bold.png" mode="aspectFit|aspectFill|widthFix" | |||
| lazy-load="false" binderror="" bindload="" /> | |||
| </navigator> | |||
| <navigator class="orderBox oh" target="" url="/pages/integral/integral" hover-class="navigator-hover" open-type="navigate"> | |||
| <navigator tt:if="{{signal=='ios'}}" class="orderBox oh" target="" url="/pages/integral/integral" hover-class="navigator-hover" open-type="navigate"> | |||
| <image class="logo" src="{{imgHttps+'money.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
| lazy-load="false" binderror="" bindload="" /> | |||
| <view class="orderTitle"> | |||
| @@ -130,7 +129,7 @@ | |||
| <view class="operationBox oh"> | |||
| <view class="cancel" bindtap="hideBox">取消</view> | |||
| <view class="xian"></view> | |||
| <view class="submit">确定</view> | |||
| <view class="submit" bindtap="phoneFromCode">确定</view> | |||
| </view> | |||
| </view> | |||
| @@ -6,7 +6,7 @@ margin-top: 40rpx; | |||
| width: 162rpx; | |||
| height: 162rpx; | |||
| float: left; | |||
| background-image: url("https://formall.oss-accelerate.aliyuncs.com/douyin/drawable-xhdpi/me_bnt_touxiang.png"); | |||
| background-image: url("https://zhibotang.oss-cn-beijing.aliyuncs.com/douyin/drawable-xhdpi/me_bnt_touxiang.png"); | |||
| background-size: 156rpx 162rpx; | |||
| overflow: hidden; | |||
| } | |||
| @@ -1,33 +1 @@ | |||
| { | |||
| "setting": { | |||
| "urlCheck": true, | |||
| "es6": true, | |||
| "newFeature": false, | |||
| "postcss": false, | |||
| "autoCompile": true, | |||
| "mockUpdate": true, | |||
| "minified": false, | |||
| "scripts": false | |||
| }, | |||
| "appid": "tt8183f73e1ebb053701", | |||
| "projectname": "知播堂", | |||
| "condition": { | |||
| "miniprogram": { | |||
| "current": -1, | |||
| "list": [ | |||
| { | |||
| "id": 1625040084950, | |||
| "name": "classDetails", | |||
| "pathName": "pages/user/user", | |||
| "query": "", | |||
| "scene": "990001", | |||
| "launchFrom": "scan", | |||
| "location": "qr_code" | |||
| } | |||
| ] | |||
| } | |||
| }, | |||
| "scripts": { | |||
| "afterOpen": "" | |||
| } | |||
| } | |||
| {"setting":{"urlCheck":true,"es6":true,"newFeature":false,"postcss":false,"autoCompile":false,"mockUpdate":true,"minified":false,"scripts":false,"mockLogin":false},"appid":"tt8183f73e1ebb053701","projectname":"ttc","scripts":{"afterOpen":""},"simulatorType":"wechat","simulatorPluginLibVersion":{},"condition":{"miniprogram":{"current":1647311408202,"list":[{"id":1625040084950,"name":"classDetails","pathName":"pages/user/user","query":"","scene":"990001","launchFrom":"scan","location":"qr_code"},{"id":1644300710833,"name":"8元看同款魔术揭秘","pathName":"pages/classDetails/classDetails","query":"id=625983793617334272&title=%E9%92%A2%E9%92%89%E5%BC%AF%E6%9B%B2%E9%AD%94%E6%9C%AF%E6%8F%AD%E7%A7%98","scene":"","launchFrom":"","location":""},{"id":1647311408202,"name":"8元看视频同款揭秘","pathName":"pages/classDetails/classDetails","query":"id=624123356909826048&title=%E7%BB%86%E9%92%88%E7%A9%BF%E8%B6%8A%E9%93%81%E6%9D%BF%E9%AD%94%E6%9C%AF%E6%8F%AD%E7%A7%98","scene":"","launchFrom":"","location":""}]}}} | |||
| @@ -0,0 +1,7 @@ | |||
| { | |||
| "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", | |||
| "rules": [{ | |||
| "action": "allow", | |||
| "page": "*" | |||
| }] | |||
| } | |||
| @@ -24,10 +24,10 @@ function convertUTCTimeToLocalTime(UTCDateString) { | |||
| return dateStr; | |||
| } | |||
| function fmtDate(date) { | |||
| var dateee = new Date(date).toJSON(); | |||
| return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''); | |||
| } | |||
| // function fmtDate(date) { | |||
| // var dateee = new Date(date).toJSON(); | |||
| // return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''); | |||
| // } | |||
| function moodsText(Num){//人气值处理 Num人气值 返回字符串 处理到万位 | |||
| let sing = "" | |||
| @@ -104,22 +104,22 @@ function qrc(id, code, width, height) { | |||
| height: convert_length(height) | |||
| }); | |||
| } | |||
| function fmtDate(obj) { | |||
| if (typeof obj === 'string' && obj.length === 13) { | |||
| obj = Number(obj); | |||
| } | |||
| var date = new Date(obj); | |||
| var y = 1900 + date.getYear(); | |||
| var m = "0" + (date.getMonth() + 1); | |||
| var d = "0" + date.getDate(); | |||
| return ( | |||
| y + | |||
| "-" + | |||
| m.substring(m.length - 2, m.length) + | |||
| "-" + | |||
| d.substring(d.length - 2, d.length) | |||
| ); | |||
| } | |||
| // function fmtDate(obj) { | |||
| // if (typeof obj === 'string' && obj.length === 13) { | |||
| // obj = Number(obj); | |||
| // } | |||
| // var date = new Date(obj); | |||
| // var y = 1900 + date.getYear(); | |||
| // var m = "0" + (date.getMonth() + 1); | |||
| // var d = "0" + date.getDate(); | |||
| // return ( | |||
| // y + | |||
| // "-" + | |||
| // m.substring(m.length - 2, m.length) + | |||
| // "-" + | |||
| // d.substring(d.length - 2, d.length) | |||
| // ); | |||
| // } | |||
| //计算下单的时间与现在的时间的 | |||
| function timechuo(startTime) { | |||
| @@ -199,7 +199,7 @@ module.exports = { | |||
| barcode: barc, | |||
| qrcode: qrc, | |||
| isJSON: isJSON, | |||
| fmtDate: fmtDate, | |||
| // fmtDate: fmtDate, | |||
| timechuo: timechuo, | |||
| timecha: timecha, | |||
| moodsText:moodsText, | |||