123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- // components/creditGiftAlert/creditGiftAlert.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- isReady: {
- type: Boolean,
- value: false
- },
- obj: Object
- },
- /**
- * 组件的初始数据
- */
- data: {
- imgOne: 'https://yuesuo.yueguanjia.com/MiniProgram/images/phaseI/coupnB.png',
- imgRed: 'https://yuesuo.yueguanjia.com/MiniProgram/images/phaseI/coupnR.png',
- sB: 'https://yuesuo.yueguanjia.com/MiniProgram/images/phaseI/giftB.png',
- sR: 'https://yuesuo.yueguanjia.com/MiniProgram/images/phaseI/giftR.png',
- gifpicsrc: ''
- },
- /**
- * 组件的方法列表
- */
- methods: {
- // 关闭弹窗
- closeGift: function() {
- this.triggerEvent('closeGift', {}, {})
- },
- // 跳转到优惠券页面
- gotoCoupon: function() {
- this.closeGift()
- wx.navigateTo({
- url: '/pages/mine/mycoupon/mycoupon'
- })
- },
- //领取实物礼品
- getgift: function() {
- this.closeGift()
- let cityname = wx.getStorageSync('branche_name')
- if (cityname == '上海') {
- this.setData({
- gifpicsrc: 'http://yuesuo.yueguanjia.com/college/present/sh.jpg'
- })
- } else if (cityname == '苏州') {
- this.setData({
- gifpicsrc: 'http://yuesuo.yueguanjia.com/college/present/sz.jpg'
- })
- }
- wx.navigateTo({
- url: '/pages/supermama/gifout/gifout?src='+this.data.gifpicsrc
- })
-
- }
- },
- ready: function() {
- console.log(this.data.obj)
- }
- })
|