Commit 90e3e76f authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent f97a1da8
{
"current": 0,
"modes": [
{
"title": "分享进",
"page": "pages/pageshou_ye/pageshou_ye",
"pageQuery": "openId=AAGK5ZCBAMaFIi626fKFCdXP&shoestype=3",
"update": true
}
]
}
\ No newline at end of file
...@@ -101,6 +101,11 @@ const apiList = { ...@@ -101,6 +101,11 @@ const apiList = {
handle: 'getPickShoesList', handle: 'getPickShoesList',
method:'post', method:'post',
isShowLoading: false isShowLoading: false
},
notification:{
handle: 'notification',
method:'post',
isShowLoading: false
} }
}; };
......
...@@ -2,13 +2,12 @@ import cloud from '@tbmp/mp-cloud-sdk'; ...@@ -2,13 +2,12 @@ import cloud from '@tbmp/mp-cloud-sdk';
import tbcc from './tbcc-sdk'; import tbcc from './tbcc-sdk';
cloud.init({ cloud.init({
env: 'online' // 云函数环境 test 测试环境 online 线上环境 env: 'test' // 云函数环境 test 测试环境 online 线上环境
}); });
App({ App({
requestType: 'cloud', // yapi,cloud: 云函数
requestType: 'local', // yapi,cloud: 云函数 requestType: 'local', // yapi,cloud: 云函数
cloudName: 'tmallCat', // 主云函数项目名 tmallCat cloudName: 'xtepCard2c', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat // cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud, cloud,
tbcc, tbcc,
...@@ -25,7 +24,7 @@ App({ ...@@ -25,7 +24,7 @@ App({
*/ */
handleQuery(query) { handleQuery(query) {
const { activityId } = query; const { activityId } = query;
this.activityId = activityId || '5f34e1c4964f9706aa7d803c'; this.activityId = activityId || '5f85118f738989848eb9ab4b';
} }
}); });
...@@ -27,15 +27,24 @@ Component({ ...@@ -27,15 +27,24 @@ Component({
}, },
lower(e) { lower(e) {
let getpage = this.data.getpage; let getpage = this.data.getpage;
console.log("lower=========>", e,getpage); console.log("lower=========>", e, getpage);
if(!getpage){ if (!getpage) {
this.getRankData(); // this.getRankData();
} }
}, },
scroll(e) { scroll(e) {
// let scrollTop = e.detail.scrollTop; // let scrollTop = e.detail.scrollTop;
// console.log("scroll=========>", scrollTop); // console.log("scroll=========>", scrollTop);
}, },
changenameShow(name) {
let firststr = name.slice(0, 1);
let endstr = name.slice(-1);
let contstr = "";
for (let i = 0; i < name.length - 2; i++) {
contstr += "*";
}
return firststr + contstr + endstr;
},
async getRankData() { async getRankData() {
let topN = 200; let topN = 200;
let setpagesize = 20; let setpagesize = 20;
...@@ -59,17 +68,22 @@ Component({ ...@@ -59,17 +68,22 @@ Component({
console.log("rankdata=====>", rankdata); console.log("rankdata=====>", rankdata);
const { success, data } = rankdata; const { success, data } = rankdata;
if (success) { if (success) {
const { myData, list } = data; const { myRank, list } = data;
let getpage = false; let getpage = false;
if (list.length < pagesize) { if (list.length < pagesize) {
getpage = true; getpage = true;
} }
myRank.userNick = this.changenameShow(myRank.userNick);
if(!myRank.count)myRank.count=0;
for(let i=0;i<list.length;i++){
let idata = list[i];
idata.userNick = this.changenameShow(idata.userNick);
}
let nrankdata = this.data.rankdata; let nrankdata = this.data.rankdata;
nrankdata.push(...list); nrankdata.push(...list);
this.setData({ this.setData({
rankdata: nrankdata, rankdata: nrankdata,
myData: myData, myData: myRank,
getpage: getpage, getpage: getpage,
pageidx: pageno + 1 pageidx: pageno + 1
}); });
...@@ -84,7 +98,4 @@ Component({ ...@@ -84,7 +98,4 @@ Component({
}); });
this.getRankData(); this.getRankData();
}, },
}); });
\ No newline at end of file
...@@ -32,6 +32,34 @@ ...@@ -32,6 +32,34 @@
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 0rpx 0rpx 0rpx;
text-align: center; text-align: center;
} }
.sui_pian_dan_chuang .sui_piantit1 {
width: 750rpx;
height: 40rpx;
opacity: 1;
display: block;
left: 0rpx;
top: 80rpx;
position: absolute;
font-size: 36rpx;
letter-spacing: 1rpx;
color: #ffffff;
transform-origin: 0rpx 0rpx 0rpx;
text-align: center;
}
.sui_pian_dan_chuang .sui_pian_futit1 {
width: 750rpx;
height: 40rpx;
opacity: 1;
display: block;
left: 0rpx;
top: 130rpx;
position: absolute;
font-size: 36rpx;
letter-spacing: 1rpx;
color: #ffffff;
transform-origin: 0rpx 0rpx 0rpx;
text-align: center;
}
.sui_pian_dan_chuang .image { .sui_pian_dan_chuang .image {
width: 508rpx; width: 508rpx;
height: 335rpx; height: 335rpx;
......
<view class="sui_pian_dan_chuang modal-animate-fade-in diacontmidpos" disable-scroll="true"> <view class="sui_pian_dan_chuang modal-animate-fade-in diacontmidpos" disable-scroll="true">
<label class="sui_piantit">{{tit}}</label> <label class="{{btntype!=5?'sui_piantit':'sui_piantit1'}}">{{tit}}</label>
<label class="sui_pian_futit">{{subtit}}</label> <label class="{{btntype!=5?'sui_pian_futit':'sui_pian_futit1'}}">{{subtit}}</label>
<image class="image" src={{spimg}} /> <image class="image" src={{spimg}} />
<image class="prizekuang1" a:if="{{israre==1}}" src={{resList['2a016267-8fd5-4524-8f7b-e3bdfa541fe1'].url}} /> <image class="prizekuang1" a:if="{{israre==1}}" src={{resList['2a016267-8fd5-4524-8f7b-e3bdfa541fe1'].url}} />
<image class="prizekuang2" a:if="{{israre==2}}" src={{resList['a6f59e24-ff10-4aab-b9c2-3dacf6c91399'].url}} /> <image class="prizekuang2" a:if="{{israre==2}}" src={{resList['a6f59e24-ff10-4aab-b9c2-3dacf6c91399'].url}} />
......
...@@ -40,21 +40,23 @@ Component({ ...@@ -40,21 +40,23 @@ Component({
}, },
//老用户,关闭,新用户加入会员 //老用户,关闭,新用户加入会员
checkJoinVip(){ checkJoinVip(){
const {isvip} = this.props; const {onCheckJoinVip} = this.props;
if(isvip){ onCheckJoinVip&&onCheckJoinVip();
this.onClose(); // const {isvip} = this.props;
}else{ // if(isvip){
this.onJoinVip(); // this.onClose();
} // }else{
// this.onJoinVip();
// }
} }
}, },
didMount() { didMount() {
let { cardType, israre, btntype, spimg ,nearchashare,nearchaprize} = this.props; let { cardType, shoesName,israre, btntype, spimg ,nearchashare,nearchaprize} = this.props;
let tit = "你获得了xx碎片"; let tit = "你获得了xx碎片";
let subtit = ""; let subtit = "";
if (btntype == 1) { if (btntype == 1) {
tit = "你获得了" + cardType + "碎片"; tit = "你获得了" + shoesName + "碎片";
if(nearchashare&&nearchaprize.length>0&&nearchashare<=3){ if(nearchashare&&nearchaprize.length>0&&nearchashare<=3){
subtit = "再召唤"+nearchashare+"位好友就能获得"+nearchaprize; subtit = "再召唤"+nearchashare+"位好友就能获得"+nearchaprize;
} }
...@@ -64,10 +66,15 @@ Component({ ...@@ -64,10 +66,15 @@ Component({
tit = "你的好友邀请你一起集碎片\n赢特步全年12双新款鞋"; tit = "你的好友邀请你一起集碎片\n赢特步全年12双新款鞋";
} else if (btntype == 4) { } else if (btntype == 4) {
tit = "集碎片赢特步新品同款鞋\n你的好友送了你一个卡包"; tit = "集碎片赢特步新品同款鞋\n你的好友送了你一个卡包";
} else { } else if(btntype==5){
tit = "你的好友邀请你为TA助力";
subtit = "赢特步全年12双新鞋随心穿福利";
}else{
console.error("未定义类型23333========》"); console.error("未定义类型23333========》");
} }
if(btntype!=4){
if(btntype==1||btntype==2){
this.onUpdateUinfo(); this.onUpdateUinfo();
} }
this.setData({ this.setData({
......
This diff is collapsed.
{
"exclude": [
"server/**"
]
}
{
"success": true,
"message":"网络异常",
"data": {
"showTakeSurprisePrize": true,
"inviteResult":{
"inviteCount":5,
"addDrawTimes":7
}
}
}
\ 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