Commit 12d9d55e authored by xd's avatar xd

Merge branch 'master' of http://114.67.93.201/xulili/ybf

parents 788841a8 5469705f
...@@ -22,3 +22,4 @@ dist.zip ...@@ -22,3 +22,4 @@ dist.zip
*.sln *.sln
*.sw? *.sw?
package-lock.json package-lock.json
sh.exe.stackdump
Stack trace:
Frame Function Args
00000010000 0018006133E (0018025BEB0, 0018024E199, 00000010000, 000FFFFBA20)
00000010000 00180049229 (00100002000, 00000000002, 00000000002, 00180338F90)
00000010000 00180049262 (00000000002, 001803392A0, 00000010000, 00000000008)
00000010000 0018005A98C (000FFFFCC72, 000FFFFCC55, 00000000000, 0018024E48F)
000FFFFCCD0 0018005AA30 (645C655C725C635C, 695C745C6E5C655C, 6D5C2D5C6C5C615C, 675C615C6E5C615C)
000FFFFCCD0 001800499EC (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00180048343 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 001800483F4 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
...@@ -205,7 +205,7 @@ export default { ...@@ -205,7 +205,7 @@ export default {
}; };
console.log("params", params); console.log("params", params);
APi_Active.isMember(params).then(res => { APi_Active.isMember(params).then(res => {
this.isMember = res.data.vipId !== ""; this.isMember = res.data.vipId != null;
this.userBaseInfo.vipId = res.data.vipId; this.userBaseInfo.vipId = res.data.vipId;
this.userBaseInfo.mobile = res.data.mobile; this.userBaseInfo.mobile = res.data.mobile;
this.userBaseInfo.name = res.data.name; this.userBaseInfo.name = res.data.name;
...@@ -246,7 +246,6 @@ export default { ...@@ -246,7 +246,6 @@ export default {
unionId: this.userBaseInfo.unionid, unionId: this.userBaseInfo.unionid,
vipId: this.userBaseInfo.vipId vipId: this.userBaseInfo.vipId
}; };
console.log("领取", params);
APi_Active.collectMyCoupon(params).then(res => { APi_Active.collectMyCoupon(params).then(res => {
this.showAward = false; this.showAward = false;
this.$toast( this.$toast(
...@@ -309,7 +308,7 @@ export default { ...@@ -309,7 +308,7 @@ export default {
this.$toast("活动已结束"); this.$toast("活动已结束");
return false; return false;
} }
if (!this.userBaseInfo.vipId) { if (this.userBaseInfo.vipId === null) {
this.$toast("非会员,"); this.$toast("非会员,");
let url = "http://oysales.oywanhao.com/register"; let url = "http://oysales.oywanhao.com/register";
window.location.href = url; window.location.href = url;
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
@blur="totalLimit_show = false" @blur="totalLimit_show = false"
/> />
</div> </div>
</template> --> </template>-->
</van-cell> </van-cell>
<van-cell <van-cell
:required="true" :required="true"
...@@ -191,8 +191,7 @@ export default { ...@@ -191,8 +191,7 @@ export default {
totalLimit_show: false totalLimit_show: false
}; };
}, },
created() { created() {},
},
methods: { methods: {
openStartTime() { openStartTime() {
this.startShow = true; this.startShow = true;
...@@ -259,7 +258,6 @@ export default { ...@@ -259,7 +258,6 @@ export default {
} }
}, },
getCoupons() { getCoupons() {
console.log("获取优惠券");
let id = sessionStorage.getItem("oyStallCode") || 1; let id = sessionStorage.getItem("oyStallCode") || 1;
API_Active.getAllCouponsByOyStallCode(id).then(res => { API_Active.getAllCouponsByOyStallCode(id).then(res => {
if (res.data.length === 0 || !res.data.length) { if (res.data.length === 0 || !res.data.length) {
...@@ -268,7 +266,13 @@ export default { ...@@ -268,7 +266,13 @@ export default {
this.$router.push("/"); this.$router.push("/");
}, 500); }, 500);
} else { } else {
this.coupons = res.data; let temp = [];
res.data.forEach(i => {
let item = i;
item.name = i.name + " ID:" + i.id;
temp.push(item);
});
this.coupons = temp;
} }
}); });
}, },
......
...@@ -338,6 +338,7 @@ import { Toast } from "vant"; ...@@ -338,6 +338,7 @@ import { Toast } from "vant";
export default { export default {
data() { data() {
return { return {
can_create: true,
minStartDate: null, minStartDate: null,
minEndDate: null, minEndDate: null,
// 选择优惠券 当前下标 // 选择优惠券 当前下标
...@@ -519,13 +520,20 @@ export default { ...@@ -519,13 +520,20 @@ export default {
}, },
// 选择优惠券 // 选择优惠券
onSelect(val) { onSelect(val) {
console.log(val);
this.prizeList[this.current_index].checked_coupon = val; this.prizeList[this.current_index].checked_coupon = val;
this.show = false; this.show = false;
}, },
getCoupons() { getCoupons() {
let id = sessionStorage.getItem("oyStallCode") || 1; let id = sessionStorage.getItem("oyStallCode") || 1;
API_Active.getAllCouponsByOyStallCode(id).then(res => { API_Active.getAllCouponsByOyStallCode(id).then(res => {
this.coupons = res.data; let temp = [];
res.data.forEach(i => {
let item = i;
item.name = i.name + ' ID:' + i.id;
temp.push(item);
})
this.coupons = temp;
}); });
}, },
afterImgRead(file) { afterImgRead(file) {
...@@ -582,6 +590,9 @@ export default { ...@@ -582,6 +590,9 @@ export default {
// console.log(val); // console.log(val);
}, },
handleCreate() { handleCreate() {
if (!this.can_create) {
return false;
}
if ( if (
this.basicInfo.title == "" || this.basicInfo.title == "" ||
this.basicInfo.startTime1 == "" || this.basicInfo.startTime1 == "" ||
...@@ -696,6 +707,7 @@ export default { ...@@ -696,6 +707,7 @@ export default {
return false; return false;
} }
Toast.success("创建成功"); Toast.success("创建成功");
this.can_create = true;
setTimeout(() => { setTimeout(() => {
this.$router.push({ this.$router.push({
name: "createSuccess", name: "createSuccess",
......
<template> <template>
<div class="contain"> <div class="contain">
<div class="box" v-for="(item,index) in list" :key="index" @click="handleCoupon(item.id)"> <div class="box" v-for="(item,index) in list" :key="index" @click="handleCoupon(item.id)">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }} ID: {{ item.id }}</div>
<div class="nr"> <div class="nr">
<div class="left" > <div class="left" >
<div class="price">¥{{ item.unit }}</div> <div class="price">¥{{ item.unit }}</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment