Commit d2900717 authored by zhangjinzhou's avatar zhangjinzhou

暂存

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