通过微信开发者工具 商城模板 创建新小程序
This commit is contained in:
32
mini-program/pages/coupon/coupon-detail/index.js
Normal file
32
mini-program/pages/coupon/coupon-detail/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { fetchCouponDetail } from '../../../services/coupon/index';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
detail: null,
|
||||
storeInfoList: [],
|
||||
storeInfoStr: '',
|
||||
showStoreInfoList: false,
|
||||
},
|
||||
|
||||
id: '',
|
||||
|
||||
onLoad(query) {
|
||||
const id = parseInt(query.id);
|
||||
this.id = id;
|
||||
this.getGoodsList(id);
|
||||
},
|
||||
|
||||
getGoodsList(id) {
|
||||
fetchCouponDetail(id).then(({ detail }) => {
|
||||
this.setData({
|
||||
detail,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
navGoodListHandle() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/coupon/coupon-activity-goods/index?id=${this.id}`,
|
||||
});
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user