mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
!188 fitler data except H5 data
Merge pull request !188 from Admin/sit-Leung-v3
This commit is contained in:
commit
d926990a5d
@ -21,6 +21,9 @@
|
||||
<div class="online bold"></div>
|
||||
|
||||
<div class="rs-dis">
|
||||
<div class="ts-no-data" v-if="!newlist.length">
|
||||
暂未发现相关记录
|
||||
</div>
|
||||
<div
|
||||
class="rc-discount"
|
||||
v-for="(item, index) in newlist"
|
||||
@ -71,7 +74,7 @@ export default {
|
||||
// middleware: 'metaTitle',
|
||||
// // middleware: 'metaTitle',
|
||||
// meta: {title: '优惠券'},
|
||||
data() {
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
@ -89,14 +92,7 @@ export default {
|
||||
userstates:0,
|
||||
userimage: require("../../assets/image/unused.png"),
|
||||
newlist: [
|
||||
{
|
||||
price: "30",
|
||||
pricestype: "新客优惠券",
|
||||
special: "全场每满299-30",
|
||||
period: "有效期",
|
||||
starttime: "2021.11.29-2022.01.28",
|
||||
catimage: require("../../assets/image/unused.png"),
|
||||
},
|
||||
|
||||
],
|
||||
discountlist: [
|
||||
{
|
||||
@ -139,19 +135,21 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取用户领取的优惠券
|
||||
async userdraw(mobile,states) {
|
||||
let data = await getdraw(mobile,states);
|
||||
if(data){
|
||||
console.log(data);
|
||||
this.newlist=data.data;
|
||||
this.newlist.forEach(element=>{
|
||||
element.validFrom=element.validFrom.slice(0,10)
|
||||
element.validTo=element.validTo.slice(0,10)
|
||||
})
|
||||
console.log(this.newlist);
|
||||
}
|
||||
|
||||
//获取用户领取的优惠券
|
||||
async userdraw(mobile,states) {
|
||||
let data = await getdraw(mobile,states);
|
||||
let _self = this;
|
||||
if(data){
|
||||
let list = [];
|
||||
data.data.forEach(function(element,index){
|
||||
element.validFrom = element.validFrom.slice(0,10);
|
||||
element.validTo = element.validTo.slice(0,10);
|
||||
if(element.udf2 && element.udf2 == 'H5') {
|
||||
list.push(element);
|
||||
}
|
||||
});
|
||||
this.newlist = list;
|
||||
}
|
||||
},
|
||||
selectGoods(item, index) {
|
||||
this.activeIndex = index;
|
||||
|
@ -247,73 +247,57 @@ export default {
|
||||
}
|
||||
},
|
||||
findall(){
|
||||
console.log('PPP');
|
||||
console.log(this.userid.length);
|
||||
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress/",
|
||||
query: {
|
||||
stype: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
let user= this.$store.state.userInfo;
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress/",
|
||||
query: {
|
||||
stype: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
//地址的跳转
|
||||
obligation(item,index){
|
||||
console.log(index);
|
||||
console.log(item);
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
|
||||
}else{
|
||||
if(item.title=='待付款'){
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 1,
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
else if(item.title=='待发货'){
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 2,
|
||||
},
|
||||
});
|
||||
}
|
||||
else if(item.title=='待收货'){
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 3,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
obligation(item,index){
|
||||
let user= this.$store.state.userInfo;
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
}else{
|
||||
if(item.title=='待付款'){
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 1,
|
||||
},
|
||||
});
|
||||
} else if(item.title=='待发货') {
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 2,
|
||||
},
|
||||
});
|
||||
} else if(item.title=='待收货') {
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
stype: 3,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
handleClose(){
|
||||
this.dialogInfo1=false;
|
||||
console.log(this.dialogInfo1);
|
||||
@ -347,39 +331,41 @@ obligation(item,index){
|
||||
}
|
||||
},
|
||||
openaddress(item,index){
|
||||
let user= localStorage.getItem("userInfo");
|
||||
let user= this.$store.state.userInfo;
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
}else{
|
||||
if(item.title=='收货地址'){
|
||||
this.$router.push({
|
||||
path: `/useraddress/openaddress/`
|
||||
})
|
||||
return
|
||||
} else {
|
||||
if(item.title=='收货地址'){
|
||||
this.$router.push({
|
||||
path: `/useraddress/openaddress/`
|
||||
})
|
||||
}
|
||||
if(index==0){
|
||||
this.userlog=true
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"jump_to_crmMiniApp",
|
||||
{
|
||||
"type":"积分商城",
|
||||
}
|
||||
])
|
||||
let isMobile = this.ifadroind();
|
||||
if(isMobile)
|
||||
window.location.href="weixin://dl/business/?t=BE1OA2AngRs";
|
||||
}
|
||||
if(index==1){
|
||||
this.$router.push({
|
||||
path: `/personal/discount/`
|
||||
})
|
||||
}
|
||||
}
|
||||
if(index==0){
|
||||
this.userlog=true
|
||||
let isMobile = this.ifadroind();
|
||||
if(isMobile)
|
||||
window.location.href="weixin://dl/business/?t=BE1OA2AngRs";
|
||||
}
|
||||
|
||||
if(index==1){
|
||||
this.$router.push({
|
||||
path: `/personal/discount/`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
opendialog(){
|
||||
|
||||
this.ifadroind();
|
||||
this.ifadroind();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -421,6 +421,9 @@ export default {
|
||||
if(myCoupon.minPrice && myCoupon.minPrice>this.sumPrice) {
|
||||
dateChecked=false;
|
||||
}
|
||||
if(myCoupon.udf2!='H5') {
|
||||
dateChecked=false;
|
||||
}
|
||||
|
||||
if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
||||
data.data.splice(tmpIndex,1);
|
||||
|
@ -659,7 +659,7 @@ export default {
|
||||
this.courseId(item);
|
||||
if (orderm == 0) {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
type: "success",
|
||||
message: "加入购物车成功",
|
||||
});
|
||||
_hmt.push([
|
||||
|
Loading…
Reference in New Issue
Block a user