You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
928 lines
24 KiB
928 lines
24 KiB
<template>
|
|
<view class="coupon">
|
|
<far-bottom></far-bottom>
|
|
<!-- 头部导航栏 -->
|
|
<view class="topNav">
|
|
<view @click="checkStatus(1)">
|
|
<view :class="status == 1 ? 'check' : ''"><span>{{languageStatus!=1?'未使用':'미사용'}}({{wsyallnum}})</span></view>
|
|
</view>
|
|
<view @click="checkStatus(2)">
|
|
<view :class="status == 2 ? 'check' : ''"><span>{{languageStatus!=1?'已使用':'이미사용'}}({{ysyallnum}})</span></view>
|
|
</view>
|
|
<view @click="checkStatus(3)">
|
|
<view :class="status == 3 ? 'check' : ''"><span>{{languageStatus!=1?'已过期':'기한만료'}}({{ygqallnum}})</span></view>
|
|
</view>
|
|
<view @click="checkStatus(4)" v-if="transfer == 1">
|
|
<view :class="status == 4 ? 'check' : ''"><span>已赠送({{yzsallnum}})</span></view>
|
|
</view>
|
|
</view>
|
|
<!-- 头部导航栏 -->
|
|
|
|
<scroll-view v-if="status == 1" class="scollList" :style="{ height: scrollHeight }" :scroll-y="true" :lower-threshold="1" @scrolltolower="wsyLoad">
|
|
<!-- 优惠卷循环模板 -->
|
|
<nonemores v-if="wsyPagetotal==0"></nonemores>
|
|
<view v-for="(item, index) in wsyList" v-if="wsyPagetotal!=0">
|
|
<view class="yhjMb" >
|
|
<view class="yhjMbTitle" @click="goStore(item.storeid)">
|
|
<view class="yhjMbTitlePackage">
|
|
<view><image :src="item.storelogo" /></view>
|
|
<span>{{item.storename}}</span>
|
|
<image :src="imgfixUrls + 'merchant/right.svg'" />
|
|
</view>
|
|
</view>
|
|
<view class="yhjMbBody" @click="goCouponDetails(item.id,item.orderid)">
|
|
<view class="yhjMbBodyPackage">
|
|
<view class="yhjMbLeft">
|
|
<view><span>{{item.title}}</span></view>
|
|
<view><span>使用条件:{{item.sub_title}}</span></view>
|
|
<view><span>有效期:{{item.starttime}}-{{item.endtime}}</span></view>
|
|
<view><span>订单编号:{{item.orderno}}</span></view>
|
|
</view>
|
|
<view class="yhjMbRight"><span>立即使用</span>
|
|
<view style="background-color: #58BDFD;margin-top: 20upx;"v-if="item.transferstatus ==1" @click.stop="makered(item)" class="yhjMbRight"><span>转赠</span></view>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
<view class="unused-list-rad" v-if="item.status =='6'">
|
|
<view class="flex-box">
|
|
<view class="t-r" style="line-height: 368upx;color: #ffffff;">
|
|
转赠中(不可使用)
|
|
</view>
|
|
</view>
|
|
<view class="flex-box " style="padding-top: 150upx;">
|
|
<view class="closeBtn" @click="closeCard(item)">
|
|
取消转赠
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<view style="margin: 10upx 30upx 30upx;padding: 10upx;background-color: #ffffff;border-radius: 10upx;" v-if="item.transferflag == 1">
|
|
<view class="cardlink">
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
赠送人
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.oldnickname}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex" style="padding: 10upx 0;">
|
|
<view class="t-l flex-box">
|
|
手机号
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.oldmobile}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
领取时间
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.gettime}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 优惠卷循环模板 -->
|
|
<view class="tips" v-if="wsyPagetotal!=0">
|
|
<loadmore :isMore="wsyisMore"></loadmore>
|
|
</view>
|
|
</scroll-view>
|
|
|
|
<scroll-view v-if="status == 2 || status == 4" class="scollList" :style="{ height: scrollHeight }" :scroll-y="true" :lower-threshold="1" @scrolltolower="ysyLoad">
|
|
<!-- 优惠卷循环模板 -->
|
|
|
|
<view class="search dis-flex" v-if="status == 4">
|
|
<view class="iconfont icon-search t-c"
|
|
style="width: 80upx;height: 80upx;line-height: 80upx;">
|
|
|
|
</view>
|
|
<input class="searchInput" v-model="mobile" type="text" @confirm="confirm" maxlength="11" placeholder="请输入手机号" value="" />
|
|
</view>
|
|
|
|
<view v-if="status == 2">
|
|
<nonemores v-if="ysyPagetotal==0"></nonemores>
|
|
<view v-for="(item, index) in ysyList" v-if="ysyPagetotal!=0">
|
|
<view class="yhjMb" >
|
|
<view class="yhjMbTitle" @click="goStore(item.storeid)">
|
|
<view class="yhjMbTitlePackage">
|
|
<view><image :src="item.storelogo" /></view>
|
|
<span>{{item.storename}}</span>
|
|
<image :src="imgfixUrls + 'merchant/right.svg'" />
|
|
</view>
|
|
</view>
|
|
<view class="yhjMbBody">
|
|
<view class="yhjMbBodyPackage">
|
|
<view class="yhjMbLeft">
|
|
<view><span>{{item.title}}</span></view>
|
|
<view><span>使用条件:{{item.sub_title}}</span></view>
|
|
<view><span>有效期:{{item.starttime}}-{{item.endtime}}</span></view>
|
|
<view><span>订单编号:{{item.orderno}}</span></view>
|
|
</view>
|
|
<view class="yhjMbRight1" v-if="status == 2"><image :src="imgfixUrls + 'merchant/ysy.png'" /></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="margin: 10upx 30upx 30upx;padding: 10upx;background-color: #ffffff;border-radius: 10upx;" v-if="item.transferflag == 1">
|
|
<view class="cardlink">
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
赠送人
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.oldnickname}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex" style="padding: 10upx 0;">
|
|
<view class="t-l flex-box">
|
|
手机号
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.oldmobile}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
领取时间
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.gettime}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="dd" v-if="status == 4">
|
|
<nonemores v-if="linklist.length ==0"></nonemores>
|
|
<view v-for="(item, index) in linklist" v-if="linklist.length > 0">
|
|
<view class="yhjMb" >
|
|
<view class="yhjMbTitle" @click="goStore(item.storeid)">
|
|
<view class="yhjMbTitlePackage">
|
|
<view><image :src="item.storelogo" /></view>
|
|
<span>{{item.storename}}</span>
|
|
<image :src="imgfixUrls + 'merchant/right.svg'" />
|
|
</view>
|
|
</view>
|
|
<view class="yhjMbBody">
|
|
<view class="yhjMbBodyPackage">
|
|
<view class="yhjMbLeft">
|
|
<view><span>{{item.title}}</span></view>
|
|
<view><span>使用条件:{{item.sub_title}}</span></view>
|
|
<view><span>有效期:{{item.starttime}}-{{item.endtime}}</span></view>
|
|
<view><span>订单编号:{{item.orderno}}</span></view>
|
|
</view>
|
|
<view class="yhjMbRight1" v-if="status == 4"><image :src="imgfixUrls + 'redpacket/haveGive.png'" /></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="margin: 10upx 30upx 30upx;padding: 10upx;background-color: #ffffff;border-radius: 10upx;" v-if="status == 4">
|
|
<view class="cardlink">
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
{{item.transfermode == 1?'赠送人':'领取人'}}
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.getname}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex" style="padding: 10upx 0;">
|
|
<view class="t-l flex-box">
|
|
手机号
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.mobile}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
领取时间
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.transfertime}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 优惠卷循环模板 -->
|
|
<!-- <view class="tips" v-if="ysyPagetotal!=0">
|
|
<loadmore :isMore="ysyisMore"></loadmore>
|
|
</view> -->
|
|
</scroll-view>
|
|
|
|
<scroll-view v-if="status == 3" class="scollList" :style="{ height: scrollHeight }" :scroll-y="true" :lower-threshold="1" @scrolltolower="ygqLoad">
|
|
<!-- 优惠卷循环模板 -->
|
|
<nonemores v-if="ygqPagetotal==0"></nonemores>
|
|
<view v-for="(item, index) in ygqList" v-if="ygqPagetotal!=0">
|
|
<view class="yhjMb" >
|
|
<view class="yhjMbTitle" @click="goStore(item.storeid)">
|
|
<view class="yhjMbTitlePackage">
|
|
<view><image :src="item.storelogo" /></view>
|
|
<span>{{item.storename}}</span>
|
|
<image :src="imgfixUrls + 'merchant/right.svg'" />
|
|
</view>
|
|
</view>
|
|
<view class="yhjMbBody">
|
|
<view class="yhjMbBodyPackage">
|
|
<view class="yhjMbLeft">
|
|
<view><span>{{item.title}}</span></view>
|
|
<view><span>使用条件:{{item.sub_title}}</span></view>
|
|
<view><span>有效期:{{item.starttime}}-{{item.endtime}}</span></view>
|
|
</view>
|
|
<view class="yhjMbRight1"><image :src="imgfixUrls + 'merchant/ygq.png'" /></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="margin: 10upx 30upx 30upx;padding: 10upx;background-color: #ffffff;border-radius: 10upx;" v-if="item.transferflag == 1">
|
|
<view class="cardlink">
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
赠送人
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.oldnickname}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex" style="padding: 10upx 0;">
|
|
<view class="t-l flex-box">
|
|
手机号
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.oldmobile}}
|
|
</view>
|
|
</view>
|
|
<view class="dis-flex">
|
|
<view class="t-l flex-box">
|
|
领取时间
|
|
</view>
|
|
<view class="t-r flex-box">
|
|
{{item.gettime}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 优惠卷循环模板 -->
|
|
<view class="tips" v-if="ygqPagetotal!=0">
|
|
<loadmore :isMore="ygqisMore"></loadmore>
|
|
</view>
|
|
</scroll-view>
|
|
<PopManager :show="showlink" type="bottom" @clickmask="showlink = false">
|
|
<view class="shareBox dis-flex" v-if="showlink">
|
|
<button class="flex-box sharebtn t-c" @click="sharelinkman">
|
|
<image :src="imgfixUrls+ 'wxhaoyou.png'" mode=""></image>
|
|
<view class="sharetext">
|
|
联系人
|
|
</view>
|
|
</button>
|
|
<!-- #ifdef H5 || APP-PLUS -->
|
|
<button class="flex-box sharebtn t-c" @click="shareover">
|
|
<image :src="imgfixUrls+ 'checkout/weixin.png'" mode=""></image>
|
|
<view class="sharetext">
|
|
微信好友
|
|
</view>
|
|
</button>
|
|
<!-- #endif -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<button class="flex-box sharebtn t-c" open-type="share" >
|
|
<image :src="imgfixUrls+ 'checkout/weixin.png'" mode=""></image>
|
|
<view class="sharetext">
|
|
微信好友
|
|
</view>
|
|
</button>
|
|
<!-- #endif -->
|
|
<button class="flex-box sharebtn t-c" @click="sharelint">
|
|
<image :src="imgfixUrls+ 'pengyouquan.png'" mode=""></image>
|
|
<view class="sharetext">
|
|
微信朋友圈
|
|
</view>
|
|
</button>
|
|
</view>
|
|
<view class="b-f close" @click="showlink = false">
|
|
关闭
|
|
</view>
|
|
</PopManager>
|
|
<PopManager :show="shareShow" :type="'top'" @clickmask="shareShow = false">
|
|
<cover-view>
|
|
<cover-image v-if="shareShow" :src="imageRoot + 'share.png'" class="coverImg"></cover-image>
|
|
</cover-view>
|
|
</PopManager>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import App from '@/common/js/app.js';
|
|
|
|
// #ifdef H5
|
|
import wxApi from '@/common/js/wxApi.js';
|
|
// #endif
|
|
import nonemores from '@/components/template/nonemores.vue';
|
|
import loadmore from '@/components/template/loadmore.vue';
|
|
import PopManager from '@/components/template/PopManager.vue';
|
|
|
|
export default {
|
|
components:{
|
|
nonemores,
|
|
loadmore,
|
|
PopManager
|
|
},
|
|
data() {
|
|
return {
|
|
ygqisMore:true,
|
|
ysyisMore:true,
|
|
wsyisMore:true,
|
|
status: 1,
|
|
scrollHeight: null,
|
|
phoneHight: null,
|
|
wsyText: '',
|
|
wsyPage: 1,
|
|
wsyList: [],
|
|
ysyText: '',
|
|
ysyPage: 1,
|
|
ysyList: [],
|
|
ygqText: '',
|
|
ygqPage: 1,
|
|
ygqList: [],
|
|
wsyPagetotal:null,
|
|
ygqPagetotal:null,
|
|
id:null,
|
|
redItem:{},
|
|
showlink:false,
|
|
shareShow:false,
|
|
mobile:'',
|
|
linklist:[],
|
|
transfer:0,
|
|
isShare:false,
|
|
ygqallnum:0,
|
|
wsyallnum:0,
|
|
ysyallnum:0,
|
|
yzsallnum:0
|
|
};
|
|
},
|
|
onLoad: function(e) {
|
|
// this.init();
|
|
this.$nextTick(function(){
|
|
setTimeout(()=>{
|
|
uni.setNavigationBarTitle({
|
|
title:e.title
|
|
})
|
|
},500)
|
|
})
|
|
uni.$once('couponShare',function(data){
|
|
this.shareover()
|
|
})
|
|
},
|
|
onShow() {
|
|
this.wsyList = [];
|
|
this.ysyList = [];
|
|
this.ygqList = [];
|
|
this.linklist = [];
|
|
this.init();
|
|
},
|
|
methods: {
|
|
confirm(e){
|
|
console.log(e);
|
|
this.ysyPage = 1;
|
|
let _this = this;
|
|
_this.ysyisMore = false;
|
|
let data = {
|
|
type:1,
|
|
mobile:_this.mobile || '',
|
|
page: _this.ysyPage
|
|
};
|
|
|
|
App._post_form('&p=Order&do=alreadyTransferList', data, res => {
|
|
_this.linklist = res.data.list;
|
|
_this.ysyPagetotal = res.data.pagetotal;
|
|
_this.ysyText = '';
|
|
_this.yzsallnum = res.data.totalnum;
|
|
_this.ysyisMore = true;
|
|
});
|
|
},
|
|
closeCard(item){
|
|
App.showError(
|
|
`确定取消转赠?`,
|
|
data => {
|
|
if (data.confirm) {
|
|
App._post_form('&p=Order&do=cancelTransfer', {
|
|
objid:item.id,
|
|
type:1
|
|
}, res => {
|
|
uni.showToast({
|
|
title:'操作成功'
|
|
});
|
|
this.wsyList.map((items,index)=>{
|
|
if(items.id == item.id){
|
|
items.status = 1;
|
|
}
|
|
})
|
|
})
|
|
}
|
|
},
|
|
true
|
|
);
|
|
},
|
|
makered(item) {
|
|
let _this = this;
|
|
this.redItem = item;
|
|
_this.showlink = true;
|
|
},
|
|
redShare(id,type){
|
|
return new Promise((resolve, reject) => {
|
|
App._post_form('&p=Order&do=planTransfer', {
|
|
id,
|
|
type
|
|
}, res => {
|
|
resolve(res.data);
|
|
})
|
|
})
|
|
},
|
|
async shareover(){
|
|
let _this = this;
|
|
// #ifdef H5
|
|
_this.shareShow = true;
|
|
_this.id = await _this.redShare(_this.redItem.id,1);
|
|
let shareLinkurl = uni.getStorageSync('shareLinkurl');
|
|
shareLinkurl = shareLinkurl.replace('pages/subPages/coupon/coupon','pages/mainPages/index/index');
|
|
let shareData = uni.getStorageSync('shareObj');
|
|
jWeixin.ready(() => {
|
|
wxApi.wxShare({
|
|
title: _this.id?_this.id.title:shareData.title, // 分享标题
|
|
desc:_this.id?_this.id.desc:shareData.desc, // 分享标题
|
|
link: _this.id?shareLinkurl + '&isred=' + _this.id.recordid:shareLinkurl, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
imgUrl: _this.id?_this.id.shareimg:shareData.imageUrl, // 分享图标
|
|
success: function(res) {
|
|
|
|
}
|
|
})
|
|
})
|
|
// #endif
|
|
},
|
|
async sharelint(){
|
|
let _this = this;
|
|
|
|
_this.id = await _this.redShare(_this.redItem.id,1);
|
|
uni.setStorageSync('redItem',_this.id);
|
|
//#ifdef MP-WEIXIN
|
|
App.showError(
|
|
`即将前往“首页”,稍后按照“界面提示”进行点击右上角“···”选择“分享到朋友圈”即可`,
|
|
data => {
|
|
if (data.confirm) {
|
|
App.navigationTo({
|
|
url: 'pages/mainPages/index/index?isRedShare=1&isRedId=' + this.redItem.id
|
|
})
|
|
}
|
|
},
|
|
true
|
|
);
|
|
//#endif
|
|
// #ifdef H5
|
|
_this.shareShow = true;
|
|
let shareLinkurl = uni.getStorageSync('shareLinkurl');
|
|
shareLinkurl = shareLinkurl.replace('pages/subPages/coupon/coupon','pages/mainPages/index/index');
|
|
let shareData = uni.getStorageSync('shareObj');
|
|
jWeixin.ready(() => {
|
|
wxApi.wxShare({
|
|
title: _this.id?_this.id.title:shareData.title, // 分享标题
|
|
desc:_this.id?_this.id.desc:shareData.desc, // 分享标题
|
|
link: _this.id?shareLinkurl + '&isred=' + _this.id.recordid:shareLinkurl, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
|
imgUrl: _this.id?_this.id.shareimg:shareData.imageUrl, // 分享图标
|
|
success: function(res) {
|
|
|
|
}
|
|
})
|
|
})
|
|
// #endif
|
|
},
|
|
sharelinkman(){
|
|
App.navigationTo({
|
|
url: 'pages/subPages2/redClothes/redClothes?type=1&id=' + this.redItem.id
|
|
})
|
|
},
|
|
init() {
|
|
let _this = this;
|
|
_this.wsyCoupon();
|
|
_this.ysyCoupon();
|
|
_this.ygqCoupon();
|
|
_this.linkCoupon();
|
|
uni.getSystemInfo({
|
|
success(res) {
|
|
_this.phoneHight = res.windowHeight;
|
|
console.info(_this.phoneHight);
|
|
_this.scrollHeight = _this.phoneHight - 45 + 'px';
|
|
console.info(_this.scrollHeight);
|
|
}
|
|
});
|
|
},
|
|
goStore(sid){
|
|
App.navigationTo({
|
|
url:'pages/mainPages/store/index?sid='+sid
|
|
})
|
|
},
|
|
goCouponDetails(id,orderid){
|
|
App.navigationTo({
|
|
url:'pages/subPages/coupon/couponDetails/couponDetails?id='+id+'&order_id='+orderid
|
|
})
|
|
},
|
|
checkStatus(status) {
|
|
let _this = this;
|
|
_this.status = status;
|
|
},
|
|
// 未使用卡券列表
|
|
wsyCoupon() {
|
|
let _this = this;
|
|
_this.wsyisMore = false;
|
|
let data = {
|
|
status: 1,
|
|
page: _this.wsyPage
|
|
};
|
|
App._post_form('&p=member&do=memberCoupon', data, res => {
|
|
_this.wsyList = [..._this.wsyList, ...res.data.list];
|
|
_this.wsyPagetotal = res.data.pagetotal;
|
|
_this.wsyText = '';
|
|
_this.wsyallnum = res.data.allnum;
|
|
_this.wsyisMore = true;
|
|
_this.transfer = res.data.transfer;
|
|
});
|
|
},
|
|
// 未使用加载
|
|
wsyLoad() {
|
|
let _this = this;
|
|
if (_this.wsyPage == _this.wsyPagetotal) {
|
|
_this.wsyisMore = true;
|
|
} else {
|
|
_this.wsyPage++;
|
|
_this.wsyCoupon();
|
|
}
|
|
},
|
|
// 已使用卡券列表
|
|
ysyCoupon() {
|
|
let _this = this;
|
|
_this.ysyisMore = false;
|
|
let data = {
|
|
status: 2,
|
|
page: _this.ysyPage
|
|
};
|
|
App._post_form('&p=member&do=memberCoupon', data, res => {
|
|
_this.ysyList = [..._this.ysyList, ...res.data.list];
|
|
_this.ysyPagetotal = res.data.pagetotal;
|
|
_this.ysyText = '';
|
|
_this.ysyallnum = res.data.allnum;
|
|
_this.ysyisMore = true;
|
|
});
|
|
},
|
|
linkCoupon(flag = false) {
|
|
let _this = this;
|
|
_this.ysyisMore = false;
|
|
let data = {
|
|
type:1,
|
|
mobile:_this.mobile || '',
|
|
page: _this.ysyPage
|
|
};
|
|
App._post_form('&p=Order&do=alreadyTransferList', data, res => {
|
|
_this.linklist = [..._this.linklist, ...res.data.list];
|
|
_this.ysyPagetotal = res.data.pagetotal;
|
|
_this.ysyText = '';
|
|
_this.yzsallnum = res.data.totalnum;
|
|
_this.ysyisMore = true;
|
|
});
|
|
},
|
|
// 已使用加载
|
|
ysyLoad() {
|
|
let _this = this;
|
|
if (_this.ysyPage == _this.ysyPagetotal) {
|
|
_this.ysyisMore = true;
|
|
} else {
|
|
_this.ysyPage++;
|
|
_this.ysyCoupon();
|
|
}
|
|
},
|
|
// 已过期卡券列表
|
|
ygqCoupon() {
|
|
let _this = this;
|
|
_this.ygqisMore = false;
|
|
let data = {
|
|
status: 3,
|
|
page: _this.ygqPage
|
|
};
|
|
App._post_form('&p=member&do=memberCoupon', data, res => {
|
|
_this.ygqList = [..._this.ygqList, ...res.data.list];
|
|
_this.ygqPagetotal = res.data.pagetotal;
|
|
_this.ygqText = '';
|
|
_this.ygqallnum = res.data.allnum;
|
|
_this.ygqisMore = true;
|
|
});
|
|
},
|
|
// 已使用加载
|
|
ygqLoad() {
|
|
let _this = this;
|
|
if (_this.ygqPage == _this.ygqPagetotal) {
|
|
_this.ygqisMore = true;
|
|
} else {
|
|
_this.ygqPage++;
|
|
_this.ygqCoupon();
|
|
}
|
|
},
|
|
},
|
|
async onShareAppMessage() {
|
|
let _this = this;
|
|
if(_this.redItem.id){
|
|
_this.id = await _this.redShare(_this.redItem.id,1);
|
|
}else{
|
|
_this.id = null;
|
|
}
|
|
let getUserinfo = uni.getStorageSync('userinfo'),
|
|
ShareData = uni.getStorageSync('shareDataInfo'),
|
|
agencyData = uni.getStorageSync('agencyData'),
|
|
aid = agencyData.aid;
|
|
return {
|
|
title: _this.id?_this.id.title:ShareData.title, // 分享标题
|
|
desc: _this.id?_this.id.desc:ShareData.title, // 分享描述
|
|
imageUrl:_this.id?_this.id.shareimg:ShareData.img,
|
|
path: _this.id?'pages/mainPages/index/index?head_id=' + getUserinfo.mid + '&aid=' + aid + '&isred=' + _this.id.recordid:'pages/mainPages/index/index?head_id=' + getUserinfo.mid + '&aid=' + aid
|
|
};
|
|
},
|
|
// async onShareTimeline() {
|
|
// let _this = this;
|
|
// if(_this.redItem.id){
|
|
// _this.id = await _this.redShare(_this.redItem.id,2);
|
|
// }else{
|
|
// _this.id = null;
|
|
// }
|
|
// let getUserinfo = uni.getStorageSync('userinfo'),
|
|
// ShareData = uni.getStorageSync('shareDataInfo'),
|
|
// agencyData = uni.getStorageSync('agencyData'),
|
|
// aid = agencyData.aid;
|
|
// return {
|
|
// title: _this.id?_this.id.title:ShareData.title, // 分享标题
|
|
// desc: _this.id?_this.id.desc:ShareData.title, // 分享描述
|
|
// imageUrl:_this.id?_this.id.shareimg:ShareData.img,
|
|
// path: _this.id?'pages/mainPages/index/index?head_id=' + getUserinfo.mid + '&aid=' + aid + '&isred=' + _this.id.recordid:'pages/mainPages/index/index?head_id=' + getUserinfo.mid + '&aid=' + aid
|
|
// };
|
|
// }
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
page {
|
|
background: #f8f8f8;
|
|
}
|
|
.coverImg {
|
|
/* #ifdef H5 */
|
|
width: 750upx;
|
|
/* #endif */
|
|
/* #ifdef MP-WEIXIN */
|
|
width: 540upx;
|
|
/* #endif */
|
|
}
|
|
.coupon {
|
|
font-size: 0;
|
|
background: #f8f8f8;
|
|
}
|
|
.check {
|
|
border-bottom: 4upx solid rgba(255, 68, 68, 1);
|
|
> span {
|
|
color: rgba(255, 68, 68, 1) !important;
|
|
}
|
|
}
|
|
.tips {
|
|
height: 80upx;
|
|
text-align: center;
|
|
> span {
|
|
line-height: 80upx;
|
|
font-size: 28upx;
|
|
|
|
|
|
color: black;
|
|
}
|
|
}
|
|
.topNav {
|
|
z-index: 999;
|
|
display: flex;
|
|
position: fixed;
|
|
top: 0upx;
|
|
width: 750upx;
|
|
height: 90upx;
|
|
background: rgba(255, 255, 255, 1);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
overflow: hidden;
|
|
> view {
|
|
// display: inline-block;
|
|
text-align: center;
|
|
flex: 1;
|
|
// width: 33%;
|
|
> view {
|
|
height: 86upx;
|
|
// margin: 0 auto;
|
|
text-align: center;
|
|
text-align: center;
|
|
// width: 90upx;
|
|
> span {
|
|
line-height: 90upx;
|
|
font-size: 28upx;
|
|
|
|
|
|
color: rgba(153, 153, 153, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.cardlink{
|
|
padding: 30upx;
|
|
color: #666666;
|
|
background-color: #f8f8f8;
|
|
font-size: 24upx;
|
|
border-radius: 10upx;
|
|
}
|
|
.search{
|
|
margin: 30upx;
|
|
border-radius: 20upx;
|
|
background-color: #ffffff;
|
|
/deep/.searchInput{
|
|
height: 80upx;
|
|
line-height: 80upx;
|
|
font-size: 28upx;
|
|
width: 100%;
|
|
}
|
|
}
|
|
.yhjMb {
|
|
margin: 20upx auto 0 auto;
|
|
width: 688upx;
|
|
background: rgba(255, 255, 255, 1);
|
|
border-radius: 10upx;
|
|
position: relative;
|
|
|
|
.unused-list-rad{
|
|
display: flex;
|
|
width: 688upx;
|
|
height: 100%;
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
background-color: rgba(0,0,0,0.6);
|
|
z-index: 1;
|
|
font-size: 28upx;
|
|
border-radius: 10upx;
|
|
// padding-top: 40upx;
|
|
.closeBtn{
|
|
width: 150upx;
|
|
height: 70upx;
|
|
line-height: 70upx;
|
|
background-color: #FFFFFF;
|
|
font-size: 28upx;
|
|
border-radius: 10upx;
|
|
float: right;
|
|
text-align: center;
|
|
margin-right: 60upx;
|
|
}
|
|
}
|
|
}
|
|
.topFull {
|
|
width: 750upx;
|
|
height: 90upx;
|
|
}
|
|
.yhjMbTitle {
|
|
width: 688upx;
|
|
border-bottom: 1px dashed rgba(238, 238, 238, 1);
|
|
}
|
|
.yhjMbTitlePackage {
|
|
padding: 30upx;
|
|
> view {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
width: 48upx;
|
|
height: 48upx;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
> image {
|
|
width: 48upx;
|
|
height: 48upx;
|
|
}
|
|
}
|
|
> span {
|
|
margin-left: 20upx;
|
|
vertical-align: middle;
|
|
font-size: 24upx;
|
|
|
|
|
|
color: rgba(153, 153, 153, 1);
|
|
}
|
|
> image {
|
|
margin-left: 20upx;
|
|
vertical-align: middle;
|
|
width: 15upx;
|
|
height: 23upx;
|
|
}
|
|
}
|
|
.yhjMbBodyPackage {
|
|
padding: 30upx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
> view {
|
|
vertical-align: middle;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
.yhjMbLeft {
|
|
width: 620upx;
|
|
> view:nth-child(1) {
|
|
> span {
|
|
font-size: 30upx;
|
|
|
|
|
|
color: rgba(51, 51, 51, 1);
|
|
}
|
|
}
|
|
> view:nth-child(2) {
|
|
margin-top: 10upx;
|
|
> span {
|
|
font-size: 24upx;
|
|
|
|
|
|
color: rgba(153, 153, 153, 1);
|
|
}
|
|
}
|
|
> view:nth-child(3) {
|
|
margin-top: 10upx;
|
|
> span {
|
|
font-size: 24upx;
|
|
|
|
|
|
color: rgba(153, 153, 153, 1);
|
|
}
|
|
}
|
|
> view:nth-child(4) {
|
|
margin-top: 10upx;
|
|
> span {
|
|
font-size: 24upx;
|
|
|
|
|
|
color: rgba(153, 153, 153, 1);
|
|
}
|
|
}
|
|
}
|
|
.yhjMbRight {
|
|
margin-top: 44upx;
|
|
width: 136upx;
|
|
height: 52upx;
|
|
background: rgba(255, 68, 68, 1);
|
|
border-radius: 26upx;
|
|
text-align: center;
|
|
> span {
|
|
line-height: 52upx;
|
|
font-size: 24upx;
|
|
|
|
|
|
color: rgba(255, 255, 255, 1);
|
|
}
|
|
}
|
|
.yhjMbRight1 {
|
|
width: 112upx;
|
|
height: 112upx;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
> image {
|
|
width: 112upx;
|
|
height: 112upx;
|
|
}
|
|
}
|
|
.scollList {
|
|
overflow: hidden;
|
|
padding-top: 90upx;
|
|
}
|
|
.shareBox{
|
|
padding: 50upx 30upx;
|
|
width: 92vw;
|
|
background-color: #FFFFFF;
|
|
border-radius: 30upx 30upx 0 0;
|
|
image{
|
|
width: 100upx;
|
|
height: 100upx;
|
|
}
|
|
.sharetext{
|
|
font-size: 28upx;
|
|
color: #666666;
|
|
}
|
|
/deep/.sharebtn{
|
|
background-color: #FFFFFF;
|
|
}
|
|
}
|
|
.close{
|
|
text-align: center;
|
|
padding: 20upx;
|
|
border-top: 1upx solid #EEEEEE;
|
|
font-size: 36upx;
|
|
color: #666666;
|
|
}
|
|
</style>
|
|
|