Commit 6db9cd53 authored by 黄媛媛's avatar 黄媛媛

登录优惠卷

parent 5ec95e86
...@@ -5,17 +5,32 @@ ...@@ -5,17 +5,32 @@
<button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="getUserInfo"></button> <button :style="sureStyle" class="hotsopt" open-type="getUserInfo" @getuserinfo="getUserInfo"></button>
<button :style="cancelStyle" class="hotsopt" @click="close"></button> <button :style="cancelStyle" class="hotsopt" @click="close"></button>
</u-popup> </u-popup>
<coupon
v-if="showCoupons"
:coupon-message="couponMessage"
@goLook="goLook"
@closeBtn="closeBtn"
></coupon>
</div> </div>
</template> </template>
<script> <script>
import coupon from "@/components/coupons/coupons";
export default { export default {
components:{
coupon
},
data() { data() {
return { return {
pageinfo: {}, pageinfo: {},
sureStyle: '', sureStyle: '',
cancelStyle: '', cancelStyle: '',
showDialog: true showDialog: true,
showCoupons:false,
couponMessage:'',
}; };
}, },
created() { created() {
...@@ -120,10 +135,21 @@ export default { ...@@ -120,10 +135,21 @@ export default {
this.showDialog=false; this.showDialog=false;
uni.setStorageSync('mall_UserInfo', res.data); uni.setStorageSync('mall_UserInfo', res.data);
that.$emit('changeuserinfo'); that.$emit('changeuserinfo');
if(res.couponResultCode==1){
this.showCoupons = true;
this.couponMessage = res.couponMessage;
}
uni.removeStorageSync('pid'); uni.removeStorageSync('pid');
} }
} }
); );
},
goLook(){
this.showCoupons = false;
},
closeBtn(){
this.showCoupons = false
} }
} }
}; };
......
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