Commit d2900717 authored by zhangjinzhou's avatar zhangjinzhou

暂存

parent 57f5a6f9
{
"enableLegacyRemoteDebug": true
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ cloud.init({
});
App({
requestType: 'local', // yapi,cloud: 云函数
requestType: 'cloud', // yapi,cloud: 云函数
cloudName: 'xtepCard2c', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud,
......
......@@ -16,12 +16,12 @@ Component({
*/
onOpenGift(){
const {onOpenGift} = this.props;
my.setStorageSync({
key: 'tbjkactnewgift',
data: {
click:"1"
}
});
// my.setStorageSync({
// key: 'tbjkactnewgift',
// data: {
// click:"1"
// }
// });
onOpenGift&&onOpenGift();
}
},
......
......@@ -6,15 +6,15 @@
"cardCountList": {
"1":99,
"2":1,
"3":0,
"3":1,
"4":1,
"5":0,
"5":1,
"6":1,
"7":1,
"8":0,
"9":0
"8":1,
"9":1
},
"collectedCount": 2,
"collectedCount": 9,
"canTakeRankPrize":false,
"shoesType": 1,
"inviteResult": {
......
{
"success": true,
"success": false,
"message":"网络异常",
"data": {
"name": "山海",
......
......@@ -146,7 +146,7 @@ Page({
}
flag = true;
// const { item: { strategyCode, code, channel } } = e.target.dataset;
const { item } = e.target.dataset;
// this.cloudTBIssue({ strategyCode, code, channel })
const { activityId } = app;
console.log(item, '领取权益')
......
......@@ -804,7 +804,8 @@
left: 0rpx;
top: 80rpx;
position: absolute;
overflow-x:auto;
/* overflow-x:auto; */
overflow-y: hidden;
transform-origin: 0rpx 0rpx 0rpx;
}
.shou_ye .botnode .selshoes .selscroll .shoes1 {
......
......@@ -7,7 +7,7 @@ const { tbcc } = app;
import { SHARE_CONFIG } from '/tbcc-sdk/lib/constants';
import resList from '../../resconfig/resList'; //import API from '../../api';
import API from '../../api';
const { commonToast, getAuthUserInfo, navigateToOutside, getSystemInfo } = tbcc.tb;
const { commonToast, getAuthUserInfo, navigateToOutside, getSystemInfo, getServerTime } = tbcc.tb;
const checkSystem = async () => {
const {
......@@ -305,8 +305,10 @@ Page({
async getAuth() {
const userInfo = await getAuthUserInfo().catch(err => {
console.log('未授权成功', err);
// commonToast('getAuth--error');
});
if (userInfo) {
// commonToast('getAuth');
// console.log('userInfo', userInfo);
const { nickName, avatar } = userInfo;
app.nickName = nickName;
......@@ -322,15 +324,16 @@ Page({
* 登录接口
*/
async login() {
// commonToast('login');
const { nickName, avatar } = app;
const { success, data } = await API.login({ userNick: nickName, avatar: avatar, isFollow: false }).catch(res => {
const { success, data } = await API.login({ userNick: nickName, avatar: avatar }).catch(res => {
commonToast(res && res.message);
if (res && res.code == "220003") {
this.setData({
actover: true
});
this.init();
}
// if (res && res.code == "220003") {
// this.setData({
// actover: true
// });
// this.init();
// }
}) || {};
if (success) {
......@@ -344,10 +347,12 @@ Page({
async init() {
// console.log("获取基本信息");
//获取vip信息
await this.checkIsVip();
this.getUserCardInfo();
this.getactivityData();
console.log("from=====>init");
this.getUserCardInfo();
},
/**
* 获取基本信息
......@@ -359,16 +364,18 @@ Page({
const { success, data } = activityInfo;
if (success) {
const { rule, startTime, endTime, awardReceiveExpiredTime, source1, source2, shoesList, sourceImg1, sourceImg2 } = data;
let datenow = Date.now();
// let actover = false;
// if (datenow >= endTime) {//活动未结束
// actover = true;
// }
const serverTime = await getServerTime().catch(() => {})
// let datenow = Date.now();
let actover = false;
if (serverTime&&serverTime > endTime) {//活动未结束
actover = true;
}
this.setData({
rule: rule,
startTime: startTime,
endTime: endTime,
// actover: actover,
actover: actover,
awardReceiveExpiredTime: awardReceiveExpiredTime,
source1: source1,
source2: source2,
......@@ -382,6 +389,7 @@ Page({
* 更新用户信息
*/
async getUserCardInfo() {
// commonToast('getUserCardInfo');
//进来提示助力
let lselected = this.data.selected;
let actover = this.data.actover;
......@@ -406,6 +414,7 @@ Page({
}) || {};
const { success, data } = userinfo;
if (success) {
console.log("我的信息", userinfo);
let { shoesName, cardCountList, collectedCount, canTakeRankPrize, shoesType, inviteResult, hasTakeCollectedPrize, hasTakeFirstPrize } = data;
let selected = 2;
......@@ -486,7 +495,9 @@ Page({
opengift: hasTakeFirstPrize,
selshoesname: selshoesname
});
if(lselected==0){
await this.checkIsVip();
}
this.checkOpenNgift();
if (selected == 2) {
......@@ -626,14 +637,14 @@ Page({
if (!opengift && selected == 2) {//新人
// this.openGift();
//判断有无点过会员按钮
let res1 = my.getStorageSync({
key: 'tbjkactnewgift'
});
if (res1 && res1.data) {
this.addDialogsData({}, "xinshouprize");
} else {
// let res1 = my.getStorageSync({
// key: 'tbjkactnewgift'
// });
// if (res1 && res1.data) {
// this.addDialogsData({}, "xinshouprize");
// } else {
this.addDialogsData({}, "xinshou");
}
// }
} else {
// this.setData({
// opengift: true
......@@ -1105,7 +1116,10 @@ Page({
}) || {};
// console.log("抽奖结果", glPrizeData);
const { success, data } = glPrizeData;
this.showPrizePage(success, data);
if(success){
this.showPrizePage(success, data);
}
this.changeBtnReady(true);
this.setData({
canTakeRankPrize: false
......
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