12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- const util = require('../../../utils/util.js');
- Component({
- properties: {
- show:{
- type: Boolean,
- observer: function (newVal) {
- this.setData({ show: newVal });
- if (this.data.show) {
- this.getPopupContent()
- }
- }
- },
- theam:{
- type: String,
- value:'redContent',
- observer: function (newVal) {
- this.setData({ theam: newVal });
- }
- },
- wheelId:{
- type: String,
- observer: function (newVal) {
- this.setData({ wheelId: newVal });
- }
- }
- },
- data: {
- show:false,
- height:'60%',
- theam:'',
- wheelId:'',
- content:{}
- },
- methods: {
- // 获取弹窗内容
- getPopupContent(){
- let that=this;
- util.ajax({
- func: "v2/market/wheel/info",
- data: {wheelId:that.data.wheelId}
- }, function (res) {
- if (res.code==0) {
- that.setData({content:res.data})
- } else {
- util.showTips(res.reason);
- }
- })
- },
- // 关闭弹窗
- closeTip(e){
- this.colse(e.detail)
- },
- // 确定
- closePopup(){
- this.colse(false)
- },
- colse(data){
- this.triggerEvent("close",{
- status:data,
- type:'rules'
- } );
- }
- }
- })
|