|
|
@ -1,46 +1,12 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view class="width90 height120 backcorfff mart15"> |
|
|
|
<view class="onorder width90" v-if="agentCouponList.length==0"> |
|
|
|
<image class="flleft agent_img margle mart10" src='../../../static/img/logo.png'></image> |
|
|
|
<image src="../../../static/img/noorder.png"></image> |
|
|
|
<view class="agent_title paddtop13"> |
|
|
|
<view class="text"> |
|
|
|
<view class="font18 fcor333 width100">重庆中石化码商券</view> |
|
|
|
暂无数据... |
|
|
|
<view class="width100 mart5 font14 fcor333 height22"> |
|
|
|
|
|
|
|
<view class="agent_left_num flleft"> |
|
|
|
|
|
|
|
42342424234234 |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="agent_right_num flright fotrt"> |
|
|
|
|
|
|
|
300.00 |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="width100 line1 mart5"></view> |
|
|
|
|
|
|
|
<view class="width90"> |
|
|
|
|
|
|
|
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode">生成油码</button> |
|
|
|
|
|
|
|
<view class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="width90 height120 backcorfff mart15"> |
|
|
|
|
|
|
|
<image class="flleft agent_img margle mart10" src='../../../static/img/logo.png'></image> |
|
|
|
|
|
|
|
<view class="agent_title paddtop13"> |
|
|
|
|
|
|
|
<view class="font18 fcor333 width100">重庆中石化码商券</view> |
|
|
|
|
|
|
|
<view class="width100 mart5 font14 fcor333 height22"> |
|
|
|
|
|
|
|
<view class="agent_left_num flleft"> |
|
|
|
|
|
|
|
42342424234234 |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="agent_right_num flright fotrt"> |
|
|
|
|
|
|
|
300.00 |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="width100 line1 mart5"></view> |
|
|
|
|
|
|
|
<view class="width90"> |
|
|
|
|
|
|
|
<button class="flright backcorf06 fcorfff font15 agent_btn mart10">生成油码</button> |
|
|
|
|
|
|
|
<view class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="width90 height120 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index"> |
|
|
|
<view class="width90 height120 backcorfff mart15"> |
|
|
|
|
|
|
|
<image class="flleft agent_img margle mart10" src='../../../static/img/logo.png'></image> |
|
|
|
<image class="flleft agent_img margle mart10" src='../../../static/img/logo.png'></image> |
|
|
|
<view class="agent_title paddtop13"> |
|
|
|
<view class="agent_title paddtop13"> |
|
|
|
<view class="font18 fcor333 width100">重庆中石化码商券</view> |
|
|
|
<view class="font18 fcor333 width100">重庆中石化码商券</view> |
|
|
@ -55,7 +21,10 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="width100 line1 mart5"></view> |
|
|
|
<view class="width100 line1 mart5"></view> |
|
|
|
<view class="width90"> |
|
|
|
<view class="width90"> |
|
|
|
<button class="flright backcorf06 fcorfff font15 agent_btn mart10">生成油码</button> |
|
|
|
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="generateCode(agent.id)" |
|
|
|
|
|
|
|
v-if="typeId == 1">生成油码</button> |
|
|
|
|
|
|
|
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)" |
|
|
|
|
|
|
|
v-if="typeId == 2">查看详情</button> |
|
|
|
<view class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view> |
|
|
|
<view class="agent_ts font15 fcor333 fotrt">出售时间:2021.4.13 23:14</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -70,42 +39,91 @@ |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
|
|
agentCouponList: [], |
|
|
|
|
|
|
|
isNoMoreData: false, |
|
|
|
|
|
|
|
typeId: '', |
|
|
|
|
|
|
|
reFreshs: "" |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
|
|
|
|
onLoad(option) { |
|
|
|
|
|
|
|
this.typeId = option.id; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onShow() { |
|
|
|
this.getCodeListByAgentCoupon(); |
|
|
|
this.getCodeListByAgentCoupon(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
//监听reFresh,如果有修改就执行监听器 |
|
|
|
|
|
|
|
reFreshs: function() { |
|
|
|
|
|
|
|
this.pageNum = 1; |
|
|
|
|
|
|
|
this.agentCouponList = [] |
|
|
|
|
|
|
|
this.isNoMoreData = false; |
|
|
|
|
|
|
|
this.getCodeListByAgentCoupon(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//查询列表 |
|
|
|
//查询列表 |
|
|
|
getCodeListByAgentCoupon() { |
|
|
|
getCodeListByAgentCoupon() { |
|
|
|
let datas = { |
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title: '加载中...' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (this.isNoMoreData) { |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let pagenum = this.pageNum; |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
pageNum: pagenum, |
|
|
|
couponId: 23423529, |
|
|
|
couponId: 23423529, |
|
|
|
pageNum: 1, |
|
|
|
status: this.typeId, |
|
|
|
pageSize: 10 |
|
|
|
pageSize: this.pageSize |
|
|
|
} |
|
|
|
} |
|
|
|
getCodeListByAgentCoupon(datas).then(res => { |
|
|
|
getCodeListByAgentCoupon(params).then(res => { |
|
|
|
if (res.return_code == '000000') {} else { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.showToast({ |
|
|
|
if (res.return_code == '000000') { |
|
|
|
title: res.return_msg, |
|
|
|
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; |
|
|
|
icon: "none" |
|
|
|
if (res.return_data.total == (this.pageNum * this.pageSize)) { |
|
|
|
}) |
|
|
|
this.isNoMoreData = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.agentCouponList = this.agentCouponList.concat(res.return_data.list); |
|
|
|
|
|
|
|
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.agentCouponList = []; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//生成二维码 |
|
|
|
//生成二维码 |
|
|
|
generateCode() { |
|
|
|
generateCode(item) { |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title: '油码生成中...' |
|
|
|
|
|
|
|
}) |
|
|
|
let datas = { |
|
|
|
let datas = { |
|
|
|
couponAgentCodeId: 8 |
|
|
|
couponAgentCodeId: item |
|
|
|
} |
|
|
|
} |
|
|
|
generateCode(datas).then(res => { |
|
|
|
generateCode(datas).then(res => { |
|
|
|
if (res.return_code == '000000') {} else { |
|
|
|
uni.hideLoading() |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
uni.navigateTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../../goods/coupons-info-details/coupons-info-details?id=1' |
|
|
|
url: '../../goods/coupons-info-details/coupons-info-details?id=' + item |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//查看详情 |
|
|
|
|
|
|
|
jumpCouponDes(ids) { |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
|
|
url: '../../goods/coupons-info-details/coupons-info-details?id=' + ids |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -115,6 +133,31 @@ |
|
|
|
background-color: #f5f5f5; |
|
|
|
background-color: #f5f5f5; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.onorder { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 50vw; |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
align-content: center; |
|
|
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
|
|
|
width: 20vw; |
|
|
|
|
|
|
|
height: 20vw; |
|
|
|
|
|
|
|
border-radius: 100%; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
height: 60upx; |
|
|
|
|
|
|
|
font-size: 28upx; |
|
|
|
|
|
|
|
color: #444; |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.agent_img { |
|
|
|
.agent_img { |
|
|
|
width: 50px; |
|
|
|
width: 50px; |
|
|
|
height: 50px; |
|
|
|
height: 50px; |
|
|
|