lion 2 years ago
parent 02bb51af02
commit 3577f67d0b

@ -186,14 +186,17 @@
tocancelApply(id) {
var that = this;
uni.showModal({
title: "确认申请退单?",
title: "请输入退单理由",
editable:true,
success: (res) => {
if (res.confirm) {
console.log(res)
weixin.request({
api: '/api/member/order-item-cancel',
method: 'POST',
data: {
id: id
id: id,
remark:res.content
},
utilSuccess: res => {
console.log(res)

@ -18,6 +18,10 @@
<view class="placeholder" :style="{ height: navBarHeight + statusBarHeight + 'px', background: 'red' }">
</view>
<view class="termBox">
<view class="tabsnav" :style="{top:navBarHeight + statusBarHeight + 'px'}">
<u-tabs lineWidth="100" active-color="#FF578A" lineHeight="2" :scrollable="false" :list="tablist" lineColor="#FF578A"
:is-scroll="false" :current="current" @change="activeChange"></u-tabs>
</view>
<!-- <view class="termOuter">
<view class="termCol cur">综合排序<text class="iconfont icon-arrowbottom"></text></view>
<view class="termCol">距离最近<text class="iconfont icon-arrowbottom"></text></view>
@ -80,6 +84,14 @@
product_type_id: 0,
isLoading: false,
activeTypeId:'',
current: 0,
tablist:[{
name: '当前活动',
idx: 1
}, {
name: '往期回顾',
idx: 0
}]
}
},
@ -138,6 +150,7 @@
if(options.activeTypeId){
this.activeTypeId = options.activeTypeId
}
console.log(this.current)
this.loadPage(1);
},
onShow() {},
@ -165,9 +178,17 @@
url: "/pages/active/detail?id=" + id
})
},
activeChange(e) {
let that = this
that.current = e;
that.dataList = []
this.loadPage(1);
},
loadPage: function(page) {
uni.hideKeyboard()
var that = this;
console.log(that.current)
that.isLoading = true;
weixin.request({
bindThis: that,
@ -179,6 +200,7 @@
keyword: that.keyword,
sort_name:'sort',
sort_type:"ASC",
review:that.tablist[that.current].idx,
active_type_id:this.activeTypeId
},
utilSuccess: function(r) {
@ -187,6 +209,18 @@
that.isLoading = false;
var hasNoMore = r.total < 6 && page > 1;
console.log("hasNoMore", hasNoMore)
if(res.length==0 && page == 1){
uni.showToast({
title: '当前暂无活动',
icon: 'none'
});
setTimeout(function(){
that.current = 1
that.loadPage(1)
},1000)
return
}
if (hasNoMore || res.length == 0 && page > 1) {
uni.stopPullDownRefresh(); // < ,
@ -237,6 +271,18 @@
page {
display: flex
}
.tabsnav{
position: fixed;
top:0;
left:0;
width:100%;
z-index:999
}
/deep/ .tabsnav .u-tab-item{
}
/deep/ .u-tab-bar{
width:80rpx;
}
</style>
<style lang="scss" scoped>
.navbar {
@ -277,6 +323,7 @@
height: 100%;
flex: 1;
overflow: hidden;
margin-top: 40px;
}
.scroll-y-item {

@ -26,7 +26,7 @@
<p class='address'>{{item.address}}</p>
</u-td>
<u-td>
<p class='name'>{{item.name}}</p>
<p class='name'>{{item.theme}}</p>
</u-td>
<u-td>
<p class='speaker'>{{item.speaker?item.speaker:''}}</p>
@ -156,6 +156,7 @@
time: time,
address: k.address,
name: k.name,
theme:k.theme?k.theme:k.name,
speaker: k.speaker,
isBut: isBut,
link: k.link

@ -250,7 +250,7 @@
origin_system: 1
},
utilSuccess: (res) => {
res.map(item => {
res.data.map(item => {
if (item.type === 0) {
this.ads.push({
id: item.id,
@ -259,6 +259,7 @@
})
}
})
},
utilFail: (err) => {
console.log(err, 'err');

Loading…
Cancel
Save