123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- // pages/my/coupon/coupon.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- down: false,
- shopping: [
- {
- list: [
- 'sss',
- 'sss',
- 'sss',
- ],
- isExpire:false
- },
- {
- list: [
- 'sss',
- 'sss',
- 'sss',
- ],
- isExpire:true
- },
- ],
- isNum:false,
- code:''
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
- changeBtn(e) {
- console.log(e.detail);
- if (e.detail.value || e.detail.value != '') {
- this.setData({
- isNum:true
- })
- }else{
- this.setData({
- isNum:false
- })
- }
-
- },
- onReady: function () {
- this.toast = this.selectComponent("#toast");
- },
- listenerLogin: function () {
- this.toast.showToast('优惠券无效');
- },
- exchange(){
- if (!this.data.isNum) return
- this.listenerLogin()
- },
- clearValue(){
- this.setData({
- code:'',
- isNum:false
- })
- }
- })
|