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) {
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)

@ -17,7 +17,11 @@
<!-- 占位盒子 它的高度=状态栏高度+导航栏高度-->
<view class="placeholder" :style="{ height: navBarHeight + statusBarHeight + 'px', background: 'red' }">
</view>
<view class="termBox">
<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>
@ -79,7 +83,15 @@
currentPage: 1,
product_type_id: 0,
isLoading: false,
activeTypeId:'',
activeTypeId:'',
current: 0,
tablist:[{
name: '当前活动',
idx: 1
}, {
name: '往期回顾',
idx: 0
}]
}
},
@ -137,7 +149,8 @@
}
if(options.activeTypeId){
this.activeTypeId = options.activeTypeId
}
}
console.log(this.current)
this.loadPage(1);
},
onShow() {},
@ -164,10 +177,18 @@
uni.navigateTo({
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;
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) {
@ -186,7 +208,19 @@
that.isLoading = false;
var hasNoMore = r.total < 6 && page > 1;
console.log("hasNoMore", hasNoMore)
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(); // < ,
@ -236,6 +270,18 @@
<style>
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>
@ -276,7 +322,8 @@
box-sizing: border-box;
height: 100%;
flex: 1;
overflow: hidden;
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>
@ -155,7 +155,8 @@
day: day,
time: time,
address: k.address,
name: k.name,
name: k.name,
theme:k.theme?k.theme:k.name,
speaker: k.speaker,
isBut: isBut,
link: k.link

@ -249,16 +249,17 @@
data: {
origin_system: 1
},
utilSuccess: (res) => {
res.map(item => {
if (item.type === 0) {
this.ads.push({
id: item.id,
pic: item.pic,
action: item.action
})
}
utilSuccess: (res) => {
res.data.map(item => {
if (item.type === 0) {
this.ads.push({
id: item.id,
pic: item.pic,
action: item.action
})
}
})
},
utilFail: (err) => {
console.log(err, 'err');

Loading…
Cancel
Save