Files
sykl-hy/pages/member/look/index.js

53 lines
1.1 KiB
JavaScript

/*
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
Page({
/**
* 页面的初始数据
*/
data: {
orderId: '', //身份id
rights : [], //权益
rules : [],
newId: '',
identities: '',
identityId: '',
can: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 获取身份前置
this.identityInfo(options.orderid);
this.setData({
orderId: options.orderid
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 身份前置
*/
identityInfo(orderId){
wx.$api.member.identitySee(orderId).then(res => {
this.setData({
identities : res.data,
rules : res.data.rules,
couponPrice : res.data.coupon_price,
rights : res.data.rights,
newId : res.data.identity_id,
can : res.data.can,
buttonText : res.data.buttonText
})
}).catch(err => {})
}
})