@@ -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); | |||
@@ -20,7 +20,7 @@ | |||
"backgroundTextStyle":"light", | |||
"navigationBarBackgroundColor": "#000033", | |||
"navigationBarTitleText": "知播堂", | |||
"navigationBarTextStyle":"#fff", | |||
"navigationBarTextStyle":"white", | |||
"navigationStyle":"custom" | |||
}, | |||
@@ -13,4 +13,4 @@ | |||
} | |||
.oh{ | |||
overflow: hidden; | |||
} | |||
} |
@@ -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) | |||
@@ -6,7 +6,7 @@ | |||
<image style="left:36%;" src='./img/back.png'></image> | |||
</view> | |||
<view bindtap='backHome' tt:if="{{home}}"> | |||
<image src='img/home.svg' style="width:90%;"></image> | |||
<image src='img/home.png' style="width:60%;"></image> | |||
</view> | |||
</view> | |||
<view class='title' style="color:{{color}}!important">{{text}}</view> | |||
@@ -20,6 +20,7 @@ let config = { | |||
getPublicity:"/wxCampaign/list",//轮播图 | |||
getPublicityDetail:"/wxCampaign/findById",//宣传页详情 | |||
apply:"/upSettlein/add",//提交入住申请 | |||
getCodePhone:"/upSettlein/sendLoginPhoneCode",//获取手机验证码 | |||
} | |||
} | |||
module.exports = config; |
@@ -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({ | |||
@@ -4,6 +4,7 @@ | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<image class="backImg" src="{{imgHttps+'upzy_tab_bnt.png'}}" mode="" /> | |||
<image src="{{upData.imgUrl}}" mode="" class="headImg" /> | |||
<view class="category">{{upData.sring}}</view> | |||
<view class="nameBox oh"> | |||
<view class="userName">{{upData.name}}</view> | |||
@@ -30,6 +31,19 @@ | |||
<image class="user" src="{{item.merchantPic}}" mode="" /> | |||
<view class="userText">{{item.merchantName}}</view> | |||
</view> | |||
<view class="incomeBox oh"> | |||
<view class="py" tt:if="{{item.salePriceStr!=0}}"> | |||
¥ | |||
</view> | |||
<view class="money" tt:if="{{item.salePriceStr!=0}}">{{item.salePriceStr}}</view> | |||
<view class="money" tt:if="{{item.salePriceStr==0}}"> | |||
{{"免费"}} | |||
</view> | |||
<view class="moodsNum">{{item.popularity}}</view> | |||
<view class="moodsText">人气</view> | |||
<image class="moodsImg" src="{{imgHttps+'home_ic_renq.png'}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /> | |||
</view> | |||
</view> | |||
</navigator> | |||
@@ -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; | |||
} |
@@ -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, // 内容 | |||
}); | |||
}) | |||
}, | |||
@@ -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; |
@@ -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: ``, // 分享的路径 | |||
} | |||
} | |||
}, | |||
}) |
@@ -1,6 +1,6 @@ | |||
<view id="BoxBg" bindtap="hieaddCheck" > | |||
<view class="Box"> | |||
<navbar back text="{{classTitle}}" background="#0E1119" color="#fff"></navbar> | |||
<navbar home back text="{{classTitle}}" background="#0E1119" color="#fff"></navbar> | |||
<prompt bind:hie="cancel" url="/pages/order/order" tt:if="{{showHie}}" titil="提示" text="您有已存在的订单" assistant="取消" advocate="去查看"></prompt> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<video id="myVideo" bindtimeupdate="time" controls="{{btnSuspend}}" src="{{mp4Url}}"></video> | |||
@@ -36,13 +36,14 @@ | |||
</view> | |||
<!-- 未购买出现 --> | |||
<!-- 购买出现 --> | |||
<view class="oh" tt:if="{{data.columnCoupons}}"> | |||
<view class="oh " style="position: relative;" tt:if="{{data.columnCoupons}}"> | |||
<view class="purchaseBox oh" > | |||
<view bindtap="siteVid" data-id="{{item.videoId}}" data-index="{{index}}" class="{{anthology==index?'anthology_a':'anthology'}} anthology" tt:for="{{data.columnCoupons}}"> | |||
<view bindtap="siteVid" data-id="{{item.videoId}}" data-index="{{index}}" class="{{anthology==index?'anthology_a':'anthology'}} " tt:for="{{data.columnCoupons}}"> | |||
<view class="anthologyItem">{{(index+1)+'.'+item.title}}</view> | |||
</view> | |||
</view> | |||
<!-- <image class="more" bindtap="setShowPopup" src="{{imgHttps+'me_icon_jiantou.png'}}" mode="" /> --> | |||
<!-- <view class="shadow"></view> --> | |||
</view> | |||
<!-- 选集弹框 --> | |||
<!-- <view class="compilationsBox oh" tt:if="{{showPopup}}"> | |||
@@ -77,17 +78,16 @@ | |||
<!-- 购买出现 --> | |||
<view class="columnBox oh"> | |||
<view class=" {{columnIndex==0?'introduce columnB_a':'introduce'}}" bindtap="setColumnIndex" data-index="{{0}}"> | |||
介绍 | |||
</view> | |||
<view class=" {{columnIndex==1?'catalogue columnB_a':'catalogue'}}" bindtap="setColumnIndex" data-index="{{1}}" tt:if="{{data.type==1}}"> | |||
<view class=" {{columnIndex==0?'catalogue columnB_a':'catalogue'}}" bindtap="setColumnIndex" data-index="{{0}}" tt:if="{{data.type==1}}"> | |||
<!-- 目录({{classNumber}}) --> | |||
目录 | |||
</view> | |||
<view class=" {{columnIndex==1?'introduce columnB_a':'introduce'}}" bindtap="setColumnIndex" data-index="{{1}}"> | |||
介绍 | |||
</view> | |||
</view> | |||
<navigator url="/pages/UpHome/UpHome?id={{data.merchantId}}&name={{data.merchantName}}" open-type="" hover-class="className" class="userParticularsBox oh" tt:if="{{columnIndex==0}}"> | |||
<!-- 介绍 --> | |||
<navigator url="/pages/UpHome/UpHome?id={{data.merchantId}}&name={{data.merchantName}}" open-type="" hover-class="className" class="userParticularsBox oh" tt:if="{{columnIndex==1}}"> | |||
<view class="userBox oh" > | |||
<image class="userLogo" src="{{data.merchantPic}}" mode="" /> | |||
<view class="userNameBox oh"> | |||
@@ -107,11 +107,30 @@ | |||
</view> | |||
<view class="userDescribe">{{data.author.introduction}}</view> | |||
</navigator> | |||
<view class="richtextBox" tt:if="{{columnIndex==0}}"> | |||
<view class="richtextBox" tt:if="{{columnIndex==1}}"> | |||
<rich-text class="rich_text" nodes="{{data.html}}"></rich-text> | |||
</view> | |||
<view tt:if="{{columnIndex==1}}" class="catalogueBox"> | |||
<view class="purchaseNotes" tt:if="{{columnIndex==1}}"> | |||
<view class="purchaseTitleBox"> | |||
<view class="purchaseTitle">购买须知</view> | |||
<view class="purchaseXian"></view> | |||
</view> | |||
<view class="issueBox"> | |||
<view class="issueTitle">如何观看以购买的课程?</view> | |||
<view class="answerBox"> | |||
<view class="answer">您可以点击知播堂小程序底部的“课程”按钮学习已经购买的课程。</view> | |||
</view> | |||
</view> | |||
<view class="issueBox"> | |||
<view class="issueTitle">课程是否可以退款?</view> | |||
<view class="answerBox"> | |||
<view class="answer">知播堂的全部课程均属虚拟商品,购买后无特殊情况不支持退款,请在购买前预览并慎重购买,如课程存在内容与描述不符、违规行为,您有权自行联系老师,并向老师提出退款。</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!--/ 介绍 --> | |||
<!-- 目录 --> | |||
<view tt:if="{{columnIndex==0}}" class="catalogueBox"> | |||
<view class="titleImgBox oh"> | |||
<image src="{{imgHttps+'details_icon_kcfj.png'}}" mode="" class="h3Img"/> | |||
<view class="h3">课程分集</view> | |||
@@ -127,29 +146,36 @@ | |||
<view class="then" tt:if="{{anthology==index}}">正在播放</view> | |||
</view> | |||
</view> | |||
<image class="try" src="{{imgHttps+'details_ml_sk.png'}}" mode="" tt:if="{{anthology==index}}"/> | |||
<image class="shuo" src="{{imgHttps+'details_ml_wgm.png'}}" mode="" tt:if="{{anthology==!index}}"/> | |||
<!-- <image class="try" src="{{imgHttps+'details_ml_sk.png'}}" mode="" tt:if="{{!data.view&&anthology==index}}"/> | |||
<image class="shuo" src="{{imgHttps+'details_ml_wgm.png'}}" mode="" tt:if="{{anthology==!index}}"/> --> | |||
</view> | |||
</view> | |||
<view class="hit"></view> | |||
<image catchtap="addCheck" class="add" src="{{imgHttps+'details_bat_xf_zk.png'}}" mode="" tt:if="{{addFlag}}"/> | |||
<!-- 入驻 挂载 --> | |||
<view class="addBox {{extraClasses}} oh"> | |||
<!-- <navigator url="" class="goruzu oh"> | |||
<image src="{{imgHttps+'details_xf_ic_fbsp.png'}}" mode="" class="video"/> | |||
<view class="issue">发布视频</view> | |||
</navigator> --> | |||
<!-- <view class="xian"></view> --> | |||
<view class="goruzu oh"> | |||
<button class="mount oh" open-type="share" data-channel="video"> | |||
<image src="{{imgHttps+'details_xf_ic_fbsp.png'}}" mode="" class="video"/> | |||
<view class="issue">发布视频</view> | |||
</button> | |||
</view> | |||
<view class="xian"></view> | |||
<navigator url="/pages/upEnter/upEnter" class="goruzu oh"> | |||
<image src="{{imgHttps+'details_xf_ic_sqrz.png'}}" mode="" class="checkImg"/> | |||
<view class="issue" url="/pages/upEnter/upEnter">申请入驻</view> | |||
</navigator> | |||
</view> | |||
<!-- 分享 咨询 购买 --> | |||
<view class="shareBox oh"> | |||
<image class="shareImg" src="{{imgHttps+'details_bat_fx.png'}}" mode=""/> | |||
<button class="service" open-type="share"> 分享 </button> | |||
<view class="xuxian"></view> | |||
<image class="consult" src="{{imgHttps+'details_bat_zx.png'}}" mode=""/> | |||
<view class="xuxian"></view> | |||
<image class="consult" src="{{imgHttps+'details_bat_zx.png'}}" mode=""/> | |||
<button class="service" open-type="contact" > 咨询 </button> | |||
<view class="shopping" bindtap="goPay" tt:if="{{ifPay!='ios'&&!data.view}}">¥{{data.salePriceStr}}</view> | |||
<view class="nOshopping" bindtap="showIos" tt:if="{{ifPay=='ios'&&!data.view}}">¥{{data.salePriceStr}}</view> | |||
</view> | |||
@@ -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; | |||
} | |||
} | |||
.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; | |||
} |
@@ -123,7 +123,7 @@ | |||
</view> | |||
</navigator> | |||
<view class="noDataBox" tt:if="{{list.length==0}}" > | |||
<image class="noDataImg" src="{{imgHttps+'no_favorite.png'}}" mode="" /> | |||
<image class="noDataImg" src="{{imgHttps+'no_content.png'}}" mode="" /> | |||
</view> | |||
</view> | |||
@@ -240,6 +240,7 @@ | |||
.noDataImg{ | |||
width: 500rpx; | |||
height: 400rpx; | |||
margin-top: 200rpx; | |||
} | |||
.instrumentBox{ | |||
width: 100%; | |||
@@ -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() | |||
@@ -4,5 +4,4 @@ | |||
"navbar": "../../components/navbar/navbar" | |||
}, | |||
"enablePullDownRefresh": true | |||
} |
@@ -33,14 +33,14 @@ | |||
</view> | |||
<view class="columnBox"> | |||
<navigator class="columnItem" target="" url="/pages/ranking/ranking?type=1&titilText=最新上架" hover-class="navigator-hover" open-type="navigate"> | |||
<image src="{{imgHttps+'home_nav_ic_zxsj.png'}}" class="columnImg" style="width: 90%; height: 70%; margin: 0 5%;"> | |||
<image src="{{imgHttps+'home_nav_ic_zxsj.png'}}" class="columnImg"> | |||
</image> | |||
<view class="columnText"> | |||
最新上架 | |||
</view> | |||
</navigator> | |||
<navigator class="columnItem" target="" url="/pages/ranking/ranking?type=2&titilText=精选课程" hover-class="navigator-hover" open-type="navigate"> | |||
<image src="{{imgHttps+'home_nav_ic_jxkc.png'}}" class="columnImg" style="width: 90%; height: 70%; margin: 0 5%;"> | |||
<image src="{{imgHttps+'home_nav_ic_jxkc.png'}}" class="columnImg" > | |||
</image> | |||
<view class="columnText"> | |||
精选课程 | |||
@@ -48,7 +48,7 @@ | |||
</navigator> | |||
<navigator class="columnItem" target="" url="/pages/ranking/ranking?type=3&titilText=排行榜" hover-class="navigator-hover" | |||
open-type="navigate"> | |||
<image src="{{imgHttps+'home_nav_ic_phb.png'}}" class="columnImg" style="width: 90%; height: 70%; margin: 0 5%;"> | |||
<image src="{{imgHttps+'home_nav_ic_phb.png'}}" class="columnImg" > | |||
</image> | |||
<view class="columnText"> | |||
排行榜 | |||
@@ -56,7 +56,7 @@ | |||
</navigator> | |||
<navigator class="columnItem" target="" url="/pages/category/category" hover-class="navigator-hover" | |||
open-type="navigate"> | |||
<image src="{{imgHttps+'home_nav_ic_qbfl.png'}}" class="columnImg" style="width: 90%; height: 70%; margin: 0 5%;"> | |||
<image src="{{imgHttps+'home_nav_ic_qbfl.png'}}" class="columnImg" > | |||
</image> | |||
<view class="columnText"> | |||
全部分类 | |||
@@ -67,7 +67,7 @@ | |||
<view class="deyBox" tt:if="{{deyList.length!=0}}"> | |||
<view class="deyTitleBox"> | |||
<image class="deyTitleImg" src="{{imgHttps+'home_tab_ic_jrtj.png'}}" | |||
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /> | |||
mode="" lazy-load="false" binderror="" bindload="" /> | |||
<view class="deyTitle"> | |||
今日推荐 | |||
</view> | |||
@@ -83,7 +83,7 @@ | |||
</view> | |||
<view class="itemTitle"> | |||
投资者-周期 | |||
{{item.title}} | |||
</view> | |||
</view> | |||
@@ -113,7 +113,7 @@ | |||
<view class="commodityImg"> | |||
<image class="classBoxImg" src="{{item.coverImg}}" mode="" /> | |||
<view class="newPopularity oh"> | |||
<image class="popularityImg" style="margin-left: 50rpx;" src="{{imgHttps+'home_ic_renq.png'}}" | |||
<image class="popularityImg" style="margin-left: 30rpx;" src="{{imgHttps+'home_ic_renq.png'}}" | |||
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /> | |||
<view class="popularityText"> | |||
最近人气 | |||
@@ -129,10 +129,13 @@ | |||
{{item.title}} | |||
</view> | |||
<view class="authorBox1"> | |||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||
<view class="annotation"> | |||
{{item.merchantName}} | |||
<view class="oh" style=" position: relative;"> | |||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||
<view class="annotation"> | |||
{{item.merchantName}} | |||
</view> | |||
</view> | |||
<view class="priceBox"> | |||
<view class="priceF" tt:if="{{item.salePriceStr!=0}}"> | |||
@@ -184,7 +187,7 @@ | |||
<!--推荐作者 --> | |||
<view class="deyBox author" tt:if="{{autho.length!=0}}"> | |||
<view class="deyTitleBox"> | |||
<image class="deyTitleImg" src="{{imgHttps+'home_tab_tjzz.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
<image class="authorImg" src="{{imgHttps+'home_tab_tjzz.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
lazy-load="false" binderror="" bindload="" /> | |||
<view class="deyTitle"> | |||
推荐作者 | |||
@@ -275,10 +278,10 @@ | |||
</view> | |||
</view> | |||
<view class="commodityBox" tt:for="{{deyList}}" bindtap="goXq" data-id="{{item.id}}" data-title="{{item.title}}"> | |||
<view class="commodityImg"> | |||
<view class="newCommodityImg"> | |||
<image class="commodityImage" src="{{item.coverImg}}" mode="" /> | |||
<view class="newPopularity oh"> | |||
<image class="popularityImg" style="margin-left: 50rpx;" src="{{imgHttps+'home_ic_renq.png'}}" | |||
<image class="popularityImg" style="margin-left: 25rpx;" src="{{imgHttps+'home_ic_renq.png'}}" | |||
mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /> | |||
<view class="popularityText"> | |||
@@ -295,9 +298,11 @@ | |||
{{item.title}} | |||
</view> | |||
<view class="authorBox1"> | |||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||
<view class="annotation"> | |||
{{item.merchantName}} | |||
<view class="oh" style=" position: relative;"> | |||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||
<view class="annotation"> | |||
{{item.merchantName}} | |||
</view> | |||
</view> | |||
<view class="priceBox"> | |||
@@ -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; | |||
} |
@@ -32,6 +32,8 @@ Page({ | |||
id:this.data.id | |||
} | |||
}).then(res=>{{ | |||
this.search() | |||
this.hie() | |||
tt.showToast({ | |||
title: '已取消收藏', // 内容 | |||
icon: "none" | |||
@@ -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; | |||
@@ -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, | |||
}) | |||
} | |||
@@ -3,8 +3,8 @@ | |||
<navbar back text="我的订单" background="#0E1119" color="#fff"></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="navigation oh"> | |||
<view class="fPay" tt:for="{{statusLsit}}"> | |||
<view class="{{pitch==item.value?'aText':'Text'}} " bindtap="setPitch" data-index="{{item.value}}" > | |||
<view class="fPay" tt:for="{{statusLsit}}" bindtap="setPitch" data-index="{{item.value}}" > | |||
<view class="{{pitch==item.value?'aText':'Text'}} " > | |||
{{item.name}} | |||
</view> | |||
<view class="Axian" tt:if="{{pitch==item.value}}"> | |||
@@ -14,7 +14,7 @@ | |||
</view> | |||
<view class="orderBox oh" tt:for="{{orderLsit}}" bindtap="goClass" data-title="{{item.title}}" data-id="{{item.productId}}"> | |||
<view class="orderBox oh" tt:for="{{orderLsit}}" bindtap="goClass" data-title="{{item.productTitle}}" data-id="{{item.productId}}"> | |||
<view class="orderNum"> | |||
订单编号:{{item.id}} | |||
</view> | |||
@@ -49,8 +49,8 @@ | |||
<view class="timeBox oh"> | |||
<view class="timeTitile "> | |||
<view class="time">订单时间:{{item.createDate}}</view> | |||
<view class="payTiem"> | |||
{{item.paymentTime?item.paymentTime:'请您在30分支之内支付'}} | |||
<view class="payTiem" tt:if="{{item.orderStatus==0}}"> | |||
{{item.paymentTime?item.paymentTime:'请您在30分钟之内支付'}} | |||
</view> | |||
</view> | |||
@@ -61,11 +61,27 @@ | |||
<view class="payOk" tt:if="{{item.orderStatus==2}}"> | |||
已完成 | |||
</view> | |||
<view class="payOk" tt:if="{{item.orderStatus==3}}"> | |||
已取消 | |||
</view> | |||
<!-- ORDER_STATUS_PENDING_PAYMENT(0, "待付款"), | |||
// ORDER_STATUS_PAYMENT_ING(1,"支付中"), | |||
ORDER_STATUS_PAYMENT_SUCCESS(2, "已支付"), | |||
ORDER_STATUS_OVERTIME_CANCEL(3, "已取消"),//已关闭 | |||
ORDER_STATUS_PENDING_REFUND(4, "待退款"), | |||
ORDER_STATUS_REFUND_SUCCESS(5,"已退款"), | |||
ORDER_STATUS_REFUND_FAILD(6, "退款失败"), --> | |||
</view> | |||
</view> | |||
<view class="noDataBox" tt:if="{{noDAtaFlag}}"> | |||
<image class="noDataImg" src="{{imgHttps+'no_order.png'}}" mode="" /> | |||
</view> | |||
</view> | |||
@@ -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; | |||
} |
@@ -17,7 +17,7 @@ | |||
<view class="courseName"> | |||
{{item.title}} | |||
</view> | |||
<view class="oh" style="margin-top: 20rpx;"> | |||
<view class="oh" style="margin-top: 10rpx;"> | |||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||
<view class="annotation"> | |||
{{item.merchantName}} | |||
@@ -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; | |||
@@ -20,7 +20,7 @@ | |||
<view class="courseName"> | |||
{{item.title}} | |||
</view> | |||
<view class="oh" style="margin-top: 20rpx;"> | |||
<view class="oh" style="margin-top: 10rpx;"> | |||
<image class="headImg" src="{{item.merchantPic}}" mode="" /> | |||
<view class="annotation"> | |||
{{item.merchantName}} | |||
@@ -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; | |||
@@ -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() | |||
@@ -125,7 +125,7 @@ | |||
</view> --> | |||
</navigator> | |||
<view class="noDataBox" tt:if="{{list.length==0}}"> | |||
<view class="noDataBox" tt:if="{{noDAtaFlag}}"> | |||
<image class="noDataImg" src="{{imgHttps+'no_result.png'}}" mode="" /> | |||
</view> | |||
@@ -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; | |||
} |
@@ -4,7 +4,7 @@ | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="versionsBox oh"> | |||
<view class="logoText"> | |||
LOGO | |||
知播堂 | |||
</view> | |||
<view class="versions"> | |||
版本 1.0.0 | |||
@@ -13,18 +13,13 @@ | |||
<view class="describeBox oh"> | |||
<view class="describe"> | |||
dddddddddasd阿德飒飒啊啊啊啊啊啊啊啊啊打算大苏打顶顶 | |||
顶顶顶顶顶顶大师水水水水水水水水水水水水水水大飒飒飒飒 | |||
飒飒飒飒飒飒飒飒飒飒飒飒飒飒d阿三水水水水水水水水水水 | |||
把知识传播到每个角落是我们的使命。知播堂是由北京商宇咨询有限公司打造的一款针对抖音达人在线推广教学课程的小程序平台。旨在通过即时短视频传播达人的教学,培训课程。用户在小程序端购买或者观看广告后,即可在抖音app内解锁和学习达人课程。 | |||
</view> | |||
</view> | |||
<view class="consult"> | |||
咨询我们 | |||
</view> | |||
<button class="consult" open-type="contact" > 咨询我们 </button> | |||
</view> | |||
</view> |
@@ -49,6 +49,7 @@ | |||
line-height: 80rpx; | |||
text-align: center; | |||
color: #FFFFFF; | |||
font-size: 30rpx; | |||
background: linear-gradient(-4deg, #4EE09D, #02C96E); | |||
} |
@@ -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=>{ | |||
@@ -14,7 +14,7 @@ | |||
</view> | |||
<view class="ttTitle">粉丝数</view> | |||
<view class="inputBox"> | |||
<input type="text" bindinput="setTtBean" placeholder="请输入当前抖音号的粉丝数量" placeholder-style="color: #8790A8;font-family: PingFang SC;" class="input"/> | |||
<input type="number" bindinput="setTtBean" placeholder="请输入当前抖音号的粉丝数量" placeholder-style="color: #8790A8;font-family: PingFang SC;" class="input"/> | |||
</view> | |||
<view class="textBox oh"> | |||
@@ -27,10 +27,11 @@ | |||
<view class="inputBox1"> | |||
<input type="text" bindinput="setUserPhone" placeholder="请输入您的手机号码" placeholder-style="color: #8790A8;font-family: PingFang SC;" class="input"/> | |||
</view> | |||
<!-- <view class="inputBox1"> | |||
<input type="text" bindinput="setUserPhone" placeholder="请输入验证码" placeholder-style="color: #8790A8;font-family: PingFang SC;" class="input2"/> | |||
<view class="code">获取验证码</view> | |||
</view> --> | |||
<view class="inputBox1"> | |||
<input type="text" bindinput="setCodePhone" placeholder="请输入验证码" placeholder-style="color: #8790A8;font-family: PingFang SC;" class="input2"/> | |||
<view class="code" bindtap="getCode" tt:if="{{!NumFlag}}">获取验证码</view> | |||
<view class="code" tt:if="{{NumFlag}}">{{Num}}s</view> | |||
</view> | |||
<view class="submit" bindtap="submit">提交申请</view> | |||
</view> | |||
</view> |
@@ -14,8 +14,8 @@ | |||
<view class="name"> | |||
{{userData.nickName}} | |||
</view> | |||
<image class="go" src="../../assets/images/arrow-right-bold.png" mode="aspectFit|aspectFill|widthFix" | |||
lazy-load="false" binderror="" bindload="" /> | |||
<!-- <image class="go" src="../../assets/images/arrow-right-bold.png" mode="aspectFit|aspectFill|widthFix" | |||
lazy-load="false" binderror="" bindload="" /> --> | |||
</view> | |||
<!-- <view class="phone"> | |||
@@ -53,9 +53,9 @@ | |||
</view> --> | |||
<view class="elseBox"> | |||
<view class="elseTitle"> | |||
<!-- <view class="elseTitle"> | |||
其他服务 | |||
</view> | |||
</view> --> | |||
<navigator class="orderBox oh" target="" url="/pages/order/order" hover-class="navigator-hover" open-type="navigate"> | |||
<image class="logo" src="{{imgHttps+'me_icon_wddd.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
lazy-load="false" binderror="" bindload="" /> | |||
@@ -67,7 +67,8 @@ | |||
</navigator> | |||
<navigator class="orderBox oh" target="" url="" hover-class="navigator-hover" open-type="navigate"> | |||
<button class="orderBox oh" open-type="contact" > | |||
<image class="logo" src="{{imgHttps+'me_icon_zxkf.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
lazy-load="false" binderror="" bindload="" /> | |||
<view class="orderTitle"> | |||
@@ -75,8 +76,7 @@ | |||
</view> | |||
<image class="go" src="../../assets/images/arrow-right-bold.png" mode="aspectFit|aspectFill|widthFix" | |||
lazy-load="false" binderror="" bindload="" /> | |||
</navigator> | |||
</button> | |||
<navigator class="orderBox oh" target="" url="/pages/mianCollect/mianCollect" hover-class="navigator-hover" open-type="navigate"> | |||
<image class="logo" src="{{imgHttps+'details_tab_sc.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
@@ -88,6 +88,7 @@ | |||
lazy-load="false" binderror="" bindload="" /> | |||
</navigator> | |||
<navigator class="orderBox oh" target="" url="/pages/sponsor/sponsor" hover-class="navigator-hover" open-type="navigate"> | |||
<image class="logo" src="{{imgHttps+'me_icon_gywm.png'}}" mode="aspectFit|aspectFill|widthFix" | |||
@@ -1,5 +1,5 @@ | |||
.userInif{ | |||
margin-top: 40rpx; | |||
} | |||
.LogoBox{ | |||
margin: 20rpx; | |||
@@ -11,8 +11,8 @@ | |||
overflow: hidden; | |||
} | |||
.LogoBoxImg{ | |||
width: 130rpx; | |||
height: 130rpx; | |||
width: 100rpx; | |||
height: 100rpx; | |||
border-radius: 50%; | |||
margin-top: 10rpx; | |||
margin-left: 20rpx; | |||
@@ -24,7 +24,7 @@ | |||
margin-left: 20rpx; | |||
} | |||
.nameGoBox{ | |||
margin-top: 50rpx; | |||
margin-top: 30rpx; | |||
} | |||
.name{ | |||
font-size: 36rpx; | |||
@@ -32,6 +32,7 @@ | |||
font-weight: bold; | |||
color: #FFFFFF; | |||
float: left; | |||
margin-left: 20rpx; | |||
} | |||
.go{ | |||
margin-top: 15rpx; | |||
@@ -77,6 +78,7 @@ margin-top: 30rpx ; | |||
margin: 10rpx 0; | |||
} | |||
.elseBox{ | |||
margin-top: 40rpx; | |||
border-radius: 20rpx; | |||
background-color: #191F2E; | |||
} | |||
@@ -90,6 +92,8 @@ margin-top: 30rpx ; | |||
} | |||
.orderBox{ | |||
padding: 20rpx; | |||
background-color: #191F2E; | |||
font-size: 30rpx; | |||
} | |||
.serviceBox{ | |||
padding: 20rpx; | |||
@@ -9,17 +9,17 @@ | |||
"minified": false, | |||
"scripts": false | |||
}, | |||
"appid": "tt9da4eb19029c2bb301", | |||
"appid": "tt8183f73e1ebb053701", | |||
"projectname": "知播堂", | |||
"condition": { | |||
"miniprogram": { | |||
"current": -1, | |||
"current": 1625040084950, | |||
"list": [ | |||
{ | |||
"id": 1623739186577, | |||
"id": 1625040084950, | |||
"name": "classDetails", | |||
"pathName": "pages/classDetails/classDetails", | |||
"query": "", | |||
"query": "id=568597357595095040", | |||
"scene": "990001", | |||
"launchFrom": "scan", | |||
"location": "qr_code" | |||
@@ -12,7 +12,8 @@ class HttpBasics { | |||
/** | |||
* 请求路径前缀 | |||
*/ | |||
address ='https://ttctest.malls.iformall.com/tt/api'; | |||
// address ='https://ttctest.malls.iformall.com/tt/api';//测试 | |||
address ='https://c.jcwise.cn/tt/api';//生产 | |||
/** | |||
* 请求头 | |||
*/ | |||
@@ -29,6 +29,16 @@ function fmtDate(date) { | |||
return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''); | |||
} | |||
function moodsText(Num){//人气值处理 Num人气值 返回字符串 处理到万位 | |||
let sing = "" | |||
if(Num>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 | |||
}; |