|
|
|
@ -3,19 +3,20 @@ |
|
|
|
|
<view class="onorder width90" v-if="agentCouponList.length==0"> |
|
|
|
|
<image src="../../../static/img/noorder.png"></image> |
|
|
|
|
<view class="text"> |
|
|
|
|
暂无数据... |
|
|
|
|
暂无数据 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 height120 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index"> |
|
|
|
|
<image class="flleft agent_img margle mart10" src='../../../static/img/logo.png'></image> |
|
|
|
|
<image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null" src='../../../static/img/logo.png'></image> |
|
|
|
|
<image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image> |
|
|
|
|
<view class="agent_title paddtop13"> |
|
|
|
|
<view class="font18 fcor333 width100">重庆中石化码商券</view> |
|
|
|
|
<view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view> |
|
|
|
|
<view class="width100 mart5 font14 fcor333 height22"> |
|
|
|
|
<view class="agent_left_num flleft"> |
|
|
|
|
42342424234234 |
|
|
|
|
<view class="agent_left_num flleft text1"> |
|
|
|
|
{{agent.highCouponCode.salesCode}} |
|
|
|
|
</view> |
|
|
|
|
<view class="agent_right_num flright fotrt"> |
|
|
|
|
300.00 |
|
|
|
|
{{agent.highCoupon.salesPrice}}.00 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -25,7 +26,8 @@ |
|
|
|
|
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" v-if="typeId == 2"> |
|
|
|
|
出售时间:{{agent.highCouponCode.receiveTime | formatDate('-')}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -36,6 +38,7 @@ |
|
|
|
|
getCodeListByAgentCoupon, |
|
|
|
|
generateCode |
|
|
|
|
} from "../../../Utils/Api.js"; |
|
|
|
|
let app =getApp(); |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -44,12 +47,32 @@ |
|
|
|
|
agentCouponList: [], |
|
|
|
|
isNoMoreData: false, |
|
|
|
|
typeId: '', |
|
|
|
|
reFreshs: "" |
|
|
|
|
reFreshs: '', |
|
|
|
|
couponId: '', |
|
|
|
|
image_url : app.globalData.imgUrl |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
filters: { |
|
|
|
|
//过滤器 用于格式化时间 |
|
|
|
|
formatDate: function(value, spe = '/') { |
|
|
|
|
let data = new Date(value); |
|
|
|
|
let year = data.getFullYear(); |
|
|
|
|
let month = data.getMonth() + 1; |
|
|
|
|
let day = data.getDate(); |
|
|
|
|
let h = data.getHours(); |
|
|
|
|
let mm = data.getMinutes(); |
|
|
|
|
let s = data.getSeconds(); |
|
|
|
|
month = month > 10 ? month : "0" + month; |
|
|
|
|
day = day > 10 ? day : "0" + day; |
|
|
|
|
h = h > 10 ? h : "0" + h; |
|
|
|
|
mm = mm > 10 ? mm : "0" + mm; |
|
|
|
|
s = s > 10 ? s : "0" + s; |
|
|
|
|
return `${year}${spe}${month}${spe}${day}`; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad(option) { |
|
|
|
|
this.typeId = option.id; |
|
|
|
|
this.couponId = option.couponsId; |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
this.getCodeListByAgentCoupon(); |
|
|
|
@ -74,12 +97,23 @@ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
let pagenum = this.pageNum; |
|
|
|
|
let params = { |
|
|
|
|
pageNum: pagenum, |
|
|
|
|
couponId: 23423529, |
|
|
|
|
status: this.typeId, |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
let params; |
|
|
|
|
if (this.typeId == 1) { |
|
|
|
|
params = { |
|
|
|
|
pageNum: pagenum, |
|
|
|
|
couponId: this.couponId, |
|
|
|
|
status: 1, |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
} |
|
|
|
|
} else if(this.typeId == 2){ |
|
|
|
|
params = { |
|
|
|
|
pageNum: pagenum, |
|
|
|
|
couponId: this.couponId, |
|
|
|
|
status: '2,3', |
|
|
|
|
pageSize: this.pageSize |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getCodeListByAgentCoupon(params).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|