|
- const app = getApp()
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- paramAtoB: String,
- from: String,
- data: {
- value: {},
- type: Object
- },
- },
-
- /**
- * 组件的初始数据
- */
- data: {
- mouldType: 0,
- },
- attached: function () {
- // 在组件实例进入页面节点树时执行
- if (app.globalData.mouldType) {
- this.setData({
- mouldType: app.globalData.mouldType
- })
- }
- },
- methods: {
- gotoDetail(e) {
-
- console.log(e, 'e');
- let couponId = e.currentTarget.dataset.couponid;
- let title = e.currentTarget.dataset.title;
- let id = e.currentTarget.dataset.id;
- let targetAd = e.currentTarget.dataset.targetad;
- let mallTenantId = e.currentTarget.dataset.malltenantid;
- if (id && targetAd != 7) {
- tt.navigateTo({
- url: `/pages/coupon/detail/index?couponChannelId=${id}&couponId=${couponId}&title=${title}&mallTenantId=${mallTenantId}`,
- })
- } else if (targetAd == 7) {
- tt.navigateTo({
- url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`,
- })
- }
- }
- }
- });
|