Commit 8a981045 authored by wildfirecode13's avatar wildfirecode13

1

parent c17eff98
{ {
"success": true, "code": "000000",
"fuck":"1", "data": {
"data": { "happyCoin": 90,
"list": [ "list": [
{ {
"hasStock": false, "_id": "5f6c3e7d114fbbc8c98bffae",
"image": "Excepteur eiusmod sit dolor", "asac": "1A202010JWPLV3428VWIEP",
"name": "aliquip", "can_win": true,
"code": "reprehenderit", "code": "7254115b0fcc4c77bdbb35ed658c1db2",
"type": 4112149.6368029267, "effective_interval": 31,
"_id": "2", "effective_time_mode": "RELATIVE",
"value": 51585947.06940037, "end_date": "2020-12-23 23:59:59",
"status": 1 "feature": {
}, "couponTag": "49534003",
{ "description": "酒店信用住立减券",
"hasStock": false, "sellerId": "4064563648",
"image": "Excepteur eiusmod sit dolor", "spreadId": "3465672059",
"name": "aliquip", "subActId": "34922",
"code": "reprehenderit", "templateCode": "3545184060",
"type": 4112149.6368029267, "title": "酒店信用住优惠券",
"_id": "2", "uuid": "6ff76ab7cf3c4002be6f64902e659322"
"value": 51585947.06940037, },
"status": 1 "hasStock": true,
}, "has_inventory": true,
{ "interval_time_unit": "DAYS",
"hasStock": false, "material": {
"image": "Excepteur eiusmod sit dolor", "benefitBigPic": "https://gw.alicdn.com/tfs/TB1aF67RFP7gK0jSZFjXXc5aXXa-895-703.png",
"name": "aliquip", "benefitSmallPic": "https://gw.alicdn.com/tfs/TB1aF67RFP7gK0jSZFjXXc5aXXa-895-703.png",
"code": "reprehenderit", "benefitUrl": "https://h5.m.taobao.com/trip/hotel/search/index.html?ttid=12zfb000000416"
"type": 4112149.6368029267, },
"_id": "1", "name": "酒店最高减50元券",
"value": 51585947.06940037, "send_life_cycle_state": "running",
"status": 1 "show_rules": {
} "show_rule_dto": [
], {
"happyCoin": 56338398.29509869 "passed": true,
} "type": "WIN_LIMIT"
} }
\ No newline at end of file ]
},
"start_date": "2020-07-15 15:45:12",
"status": 1,
"test": false,
"title": "酒店最高减50元券",
"type": 1,
"type_desc": "飞猪资格券",
"value": 10
},
{
"_id": "5f6c3e7d114fbbc8c98bffae",
"amount": 20000,
"amount_unit": "分",
"asac": "1A202010JWPLV3428VWIEP",
"can_win": true,
"code": "a66621ec7c434842bfe4d01082128f1d",
"display_amount": "200",
"display_amount_unit": "元",
"display_start_fee": "2000",
"effective_end": "2020-10-11 00:00:00",
"effective_start": "2020-08-24 00:00:00",
"effective_time_mode": "ABSOLUTE",
"end_date": "2020-09-25 23:59:59",
"feature": {
"bcType": "B",
"couponTag": "1002",
"itemIds": "611952670190",
"sellerId": "2838892713",
"shopId": "150920153",
"shopLogo": "/5a/f4/TB16vpHhER1BeNjy0FmSuv0wVXa.jpg",
"shopName": "华为官方旗舰店",
"shopSiteCategory": "3",
"shopUrl": "//store.taobao.com/shop/view_shop.htm?shop_id=150920153",
"spreadId": "4327893208",
"templateCode": "15398721100",
"title": "MatePro",
"uuid": "1094cefe51a348698e6647f5e6ba4181"
},
"hasStock": true,
"has_inventory": true,
"material": {
"SHORT_NAME": "华为MatePad Pro",
"brandLogo": "T1bOKxFoFcXXb1upjX.jpg",
"itemIDTianHe": "611952670190",
"itemMainPicture": "O1CN01HHEnRU1KZ6mud3VjW_!!6000000001177-2-yinhe.png",
"mamaCouponValue": "学生专享200元",
"mamaShopItemurl": "https://detail.tmall.com/item.htm?spm=a1z10.1-b-s.w20163031-21766675787.18.10577597DWdOA0&id=611952670190&scene=taobao_shop&sku_properties=5919063:6536025"
},
"name": "MatePro",
"send_life_cycle_state": "running",
"show_rules": {
"show_rule_dto": [
{
"passed": true,
"type": "WIN_LIMIT"
}
]
},
"start_date": "2020-08-27 16:21:56",
"start_fee": 200000,
"status": 1,
"test": false,
"title": "MatePro",
"type": 1,
"type_desc": "商品优惠券",
"value": 10
},
{
"_id": "5f6c3e7d114fbbc8c98bffae",
"amount": 10000,
"amount_unit": "分",
"asac": "1A202010JWPLV3428VWIEP",
"can_win": true,
"code": "f8564ef50a86418b9226ce1d9bb6ace6",
"display_amount": "100",
"display_amount_unit": "元",
"display_start_fee": "200",
"effective_end": "2020-09-30 00:00:00",
"effective_start": "2020-08-28 00:00:00",
"effective_time_mode": "ABSOLUTE",
"end_date": "2020-09-26 23:59:59",
"feature": {
"bcType": "B",
"couponTag": "1002",
"itemIds": "611439436633",
"sellerId": "2838892713",
"shopId": "150920153",
"shopLogo": "/5a/f4/TB16vpHhER1BeNjy0FmSuv0wVXa.jpg",
"shopName": "华为官方旗舰店",
"shopSiteCategory": "3",
"shopUrl": "//store.taobao.com/shop/view_shop.htm?shop_id=150920153",
"spreadId": "4328244590",
"templateCode": "15417747656",
"title": "freebuds 3",
"uuid": "ea9a79c0459640f8aeb94c24530e4141"
},
"hasStock": true,
"has_inventory": true,
"material": {
"brandLogo": "T1bOKxFoFcXXb1upjX.jpg"
},
"name": "freebuds 3",
"send_life_cycle_state": "running",
"show_rules": {
"show_rule_dto": [
{
"passed": true,
"type": "WIN_LIMIT"
}
]
},
"start_date": "2020-08-28 11:04:24",
"start_fee": 20000,
"status": 1,
"test": false,
"title": "freebuds 3",
"type": 1,
"type_desc": "商品优惠券",
"value": 10
},
{
"_id": "5f6b09b39897b412b595a32b",
"activityId": "5f6b09b3c3ad342fed5a0b21",
"codeList": [],
"createTime": 1600850355504,
"credits": "",
"deleteStatus": 1,
"desc": "兑换奖励-实物",
"ename": "",
"hasStock": false,
"image": "https://img.alicdn.com/imgextra/i2/2208492139886/O1CN01XlNdWj2Mtq8E9OEw1_!!2208492139886-2-miniprogram.png",
"level": "",
"name": "兑换奖励235",
"openId": "AAHeNvjuAMaJc3uyPjfQ8e6b",
"prizeDataType": 2,
"probablity": "",
"rank": "",
"status": 1,
"stock": "",
"strategyCode": "",
"switchStock": 2,
"type": 3,
"updateTime": 1600928287353,
"useStock": 0,
"useUrl": "",
"value": "1000"
}
]
},
"message": "成功",
"success": true
}
\ No newline at end of file
{ {
"success": true, "code": "000000",
"code": "nostrud",
"data": [ "data": [
{ {
"taskType": "jcA", "completeTimes": 0,
"title": "w5Qd%", "rewards": 1,
"rewards": 2, "status": 1,
"taskRateType": 2, "taskRateType": 2,
"waitReceive": -59123924.96824288, "taskType": "sign",
"status": -22575314.240724027, "times": 1,
"completeTimes": -88356510.39271703, "title": "每日签到",
"times": "3", "todayCompleteTimes": 0,
"todayCompleteTimes": -15114879.481988683, "waitReceive": 0
"itemIds": "esse", },
"url": "ex Lorem deserunt" {
"completeTimes": 0,
"rewards": 10,
"sellerId": "wwwww",
"status": 1,
"taskRateType": 1,
"taskType": "follow",
"title": "关注店铺"
},
{
"completeTimes": 0,
"rewards": 10,
"sellerId": "oooo",
"status": 1,
"taskRateType": 1,
"taskType": "follow",
"title": "关注店铺"
},
{
"completeTimes": 0,
"itemIds": "",
"rewards": "2",
"status": 1,
"taskRateType": 2,
"taskType": "browseGoods",
"times": 1,
"title": "浏览商品",
"todayCompleteTimes": 0,
"url": "http://www.taobao.com",
"waitReceive": 0
},
{
"completeTimes": 0,
"rewards": "1",
"status": 1,
"taskRateType": 1,
"taskType": "invites",
"times": 3,
"title": "邀请",
"todayCompleteTimes": 0,
"waitReceive": 0
} }
], ],
"message": "pariatur ut id irure sit" "message": "成功",
"success": true
} }
\ No newline at end of file
...@@ -31,7 +31,7 @@ position: absolute; ...@@ -31,7 +31,7 @@ position: absolute;
transform-origin: 0px 0px 0px; transform-origin: 0px 0px 0px;
} }
.exchanged_title { .exchanged_title {
width: 164px; // width: 164px;
height: 35px; height: 35px;
opacity: 1; opacity: 1;
left: 295px; left: 295px;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 0rpx 0rpx 0rpx;
} }
.exchanged .exchanged_title { .exchanged .exchanged_title {
width: 164rpx; /* width: 164rpx; */
height: 35rpx; height: 35rpx;
opacity: 1; opacity: 1;
left: 295rpx; left: 295rpx;
......
<view class="exchanged"> <view class="exchanged">
<image class="exchanged_bg " src={{resList['65d97f17-4b35-4ba7-b21b-7ec0bfac6639'].url}} /> <image class="exchanged_bg " src={{resList['65d97f17-4b35-4ba7-b21b-7ec0bfac6639'].url}} />
<image class="exchanged_imgbg " src={{resList['e0ce2abf-64d3-40f3-a016-c7fb7772b3f6'].url}} /> <image class="exchanged_imgbg " src={{resList['e0ce2abf-64d3-40f3-a016-c7fb7772b3f6'].url}} />
<image class="exchanged_imgbg " src={{mydata.image}} />
<image class="exchanged_close " onTap="onModalClose" src={{resList['06f8e9d0-f0bf-41d3-bbc2-8a782eacae59'].url}} /> <image class="exchanged_close " onTap="onModalClose" src={{resList['06f8e9d0-f0bf-41d3-bbc2-8a782eacae59'].url}} />
<label class="exchanged_title ">{{mydata.name}}</label> <label class="exchanged_title ">{{mydata.name}}</label>
<image class="exchanged_btn " onTap="onModalClose" src={{resList['923ae629-84ed-406d-b3cb-258742ffa2ba'].url}} /> <image class="exchanged_btn " onTap="onModalClose" src={{resList['923ae629-84ed-406d-b3cb-258742ffa2ba'].url}} />
......
...@@ -4,7 +4,7 @@ import resList from '../../resconfig/resList'; ...@@ -4,7 +4,7 @@ import resList from '../../resconfig/resList';
Component({ Component({
props: { mydata:null}, props: { mydata:null},
data: { data: {
resList: resList, resList: resList,
}, },
methods: { methods: {
// onBtnClick() { // onBtnClick() {
......
...@@ -8,9 +8,10 @@ ...@@ -8,9 +8,10 @@
<view class="shopitem" a:for="{{list}}"> <view class="shopitem" a:for="{{list}}">
<image class="shopitem_bg2" src={{resList['a5230993-3870-4a91-bdd1-ffc4782770d0'].url}} /> <image class="shopitem_bg2" src={{resList['a5230993-3870-4a91-bdd1-ffc4782770d0'].url}} />
<image class="shopitem_bg1" src={{resList['dd4ee407-16e4-4cb7-9eba-365b33f466a3'].url}} /> <image class="shopitem_bg1" src={{resList['dd4ee407-16e4-4cb7-9eba-365b33f466a3'].url}} />
<image class="shopitem_bg1" src={{item.image}} />
<image onTap="handleClick" data-item="{{item}}" a:if="{{!item.exchanged}}" class="shopitem_buybtn" src={{resList['dd8ea96e-e33f-4f5d-b31f-29f332c3c867'].url}} /> <image onTap="handleClick" data-item="{{item}}" a:if="{{!item.exchanged}}" class="shopitem_buybtn" src={{resList['dd8ea96e-e33f-4f5d-b31f-29f332c3c867'].url}} />
<image a:if="{{item.exchanged}}" class="shopitem_disabledbtn" src={{resList['8d08152f-311a-446a-a15a-ff02ebed0139'].url}} /> <image a:if="{{item.exchanged}}" class="shopitem_disabledbtn" src={{resList['8d08152f-311a-446a-a15a-ff02ebed0139'].url}} />
<label a:if="{{!item.exchanged}}" class="shopitem_txt">101010</label> <label a:if="{{!item.exchanged}}" class="shopitem_txt">{{item.value}}</label>
<label class="shopitem_name">{{item.name}}</label> <label class="shopitem_name">{{item.name}}</label>
</view> </view>
......
...@@ -28,8 +28,7 @@ Page({ ...@@ -28,8 +28,7 @@ Page({
data: { data: {
catType: 1, catType: 1,
catName: '', catName: '',
taskModalVisible:0, recallCatInfo: {},
recallCatInfo:{},
taskModalVisible: false, taskModalVisible: false,
messageModalVisible: false, messageModalVisible: false,
messageModalData: {}, messageModalData: {},
...@@ -42,7 +41,7 @@ Page({ ...@@ -42,7 +41,7 @@ Page({
getcatModalVisible: false, getcatModalVisible: false,
getcatModalData: {}, getcatModalData: {},
catbackbedModalVisible: false, catbackbedModalVisible: false,
catruleModalVisible:true catruleModalVisible: 0
}, },
onLoad(props) { onLoad(props) {
...@@ -61,35 +60,34 @@ Page({ ...@@ -61,35 +60,34 @@ Page({
onReady() { onReady() {
console.log('on ready') console.log('on ready')
var that = this;
// setTimeout(() => {
// var parameter = {
// name: "recallcatModal"
// }
// var data = {
// netName: "mine.showModal",
// parameter
// }
// that.onMessage({
// data: data
// })
// }, 500)
//授权和登录先搞 //授权和登录先搞
this.getAuth(); this.getAuth();
my.__onMessage__ = (e) => { my.__onMessage__ = (e) => {
this.onMessage(e) this.onMessage(e)
} }
my.__showModal__ = (key,data) => { my.__showModal__ = (key, data) => {
this.onMessage({ this.onMessage({
data: { data: {
netName: 'mine.showModal', netName: 'mine.showModal',
parameter: { parameter: {
name: key+'Modal', name: key + 'Modal',
data: data data: data
} }
} }
}); });
} }
my.__pageTo__ = (key, data) => {
this.onMessage({
data: {
netName: 'mine.navigateToPage',
parameter: {
name: key
}
}
});
}
}, },
init() { init() {
...@@ -99,12 +97,12 @@ Page({ ...@@ -99,12 +97,12 @@ Page({
}, },
spark_startEngine() { spark_startEngine() {
console.log('spark_startEngine',my) console.log('spark_startEngine', my)
var self = this; var self = this;
my.createCanvas({ my.createCanvas({
id: 'canvas', id: 'canvas',
success: ccc => { success: ccc => {
console.log('createCanvas success' ); console.log('createCanvas success');
const dpr = my.getSystemInfoSync().pixelRatio; const dpr = my.getSystemInfoSync().pixelRatio;
const windowWidth = my.getSystemInfoSync().windowWidth; const windowWidth = my.getSystemInfoSync().windowWidth;
const windowHeight = my.getSystemInfoSync().windowHeight; const windowHeight = my.getSystemInfoSync().windowHeight;
...@@ -122,7 +120,7 @@ Page({ ...@@ -122,7 +120,7 @@ Page({
this.main.addGlobalEvent("hideloading", self.hideLoadingHandler, self); this.main.addGlobalEvent("hideloading", self.hideLoadingHandler, self);
} }
}, },
fail:()=>{console.log('createCanvas fail' );} fail: () => { console.log('createCanvas fail'); }
}); });
}, },
...@@ -288,7 +286,7 @@ Page({ ...@@ -288,7 +286,7 @@ Page({
} }
}, },
/**刷新用户信息 */ /**刷新用户信息 */
updateUserInfo(){ updateUserInfo() {
console.log("通知canvas刷新用户信息") console.log("通知canvas刷新用户信息")
this.main && this.main.dispatchGlobalEvent("UPDATE_USERINFO") this.main && this.main.dispatchGlobalEvent("UPDATE_USERINFO")
}, },
...@@ -313,10 +311,10 @@ Page({ ...@@ -313,10 +311,10 @@ Page({
this.main.dispatchGlobalEvent("selectEnd", r); this.main.dispatchGlobalEvent("selectEnd", r);
}, },
/**召回猫 */ /**召回猫 */
recallCat(r){ recallCat(r) {
this.setData({ this.setData({
recallCatInfo:r, recallCatInfo: r,
catbackbedModalVisible:true catbackbedModalVisible: true
}) })
}, },
closeLevelupModal() { closeLevelupModal() {
...@@ -356,7 +354,7 @@ Page({ ...@@ -356,7 +354,7 @@ Page({
}) })
}, },
closeGetcatModal() { closeGetcatModal() {
this.setData({ this.setData({
getcatModalVisible: false getcatModalVisible: false
}) })
...@@ -366,9 +364,9 @@ Page({ ...@@ -366,9 +364,9 @@ Page({
catbackbedModalVisible: false catbackbedModalVisible: false
}) })
}, },
closeCatruleModal(){ closeCatruleModal() {
this.setData({ this.setData({
catruleModalVisible:false catruleModalVisible: false
}) })
} }
}); });
\ No newline at end of file
...@@ -12,8 +12,8 @@ const { commonToast } = tbcc.tb; ...@@ -12,8 +12,8 @@ const { commonToast } = tbcc.tb;
let flag = 0; let flag = 0;
Page({ Page({
data: { data: {
exchangedModalVisible:false, exchangedModalVisible: false,
exchangedModalData:null, exchangedModalData: null,
list: [], list: [],
happyCoin: null happyCoin: null
}, },
...@@ -30,13 +30,15 @@ Page({ ...@@ -30,13 +30,15 @@ Page({
if (flag) return; if (flag) return;
flag = 1; flag = 1;
const { item } = e.target.dataset; const { item } = e.target.dataset;
const {_id}=item; const { _id, code, type } = item;
const { success, data, message } = await API.exchangeGood({ _id }).catch(res => { const params = { id: _id };
if (type == 1) params.code = code;
const { success, data, message } = await API.exchangeGood(params).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
if (success && data) { if (success && data) {
this.setData({exchangedModalVisible:1,exchangedModalData: item}) this.setData({ exchangedModalVisible: 1, exchangedModalData: item })
} }
await this.getExchangeGoodList(); await this.getExchangeGoodList();
flag = 0; flag = 0;
...@@ -71,9 +73,9 @@ Page({ ...@@ -71,9 +73,9 @@ Page({
}); });
this.setData({ list, happyCoin }); this.setData({ list, happyCoin });
}, },
closeExchangedModal(){ closeExchangedModal() {
this.setData({ this.setData({
exchangedModalVisible:false exchangedModalVisible: false
}) })
} }
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment