Commit ba0e0146 authored by Edwise's avatar Edwise 🍷

主页,分享图,排行榜,收藏商品

parent 8af470bc
......@@ -13,7 +13,7 @@ class Pagepagerank extends Component {
render() {
return (
<div className="pagerank ">
<img className="rankbg " src={this.state.resList['eb407995-cc98-4846-bf45-d7ac37e9037e'].url} />
<img className="rankbg " src={this.state.resList['bf292c37-4753-46bc-bae5-e886ae9cec80'].url} />
<img className="rankreturnbtn " src={this.state.resList['071da23d-ca97-4979-91d1-533fe386eef7'].url} />
<div className="ranktex ">
<div className="myrank ">
......@@ -23,7 +23,7 @@ class Pagepagerank extends Component {
</div>
<div className="bang_dan_xin_xi ">
<span className="tao_baoid ">淘宝id</span>
<span className="lei_ji_ji_bai_ren_shu ">累计击败人数</span>
<span className="lei_ji_ji_bai_ren_shu ">累计温暖值</span>
<span className="pai_ming ">排名</span>
</div>
<div className="ranktit2 ">
......@@ -31,9 +31,23 @@ class Pagepagerank extends Component {
<span className="ranktit3 ">赢取清空购物车终极大奖</span>
<span className="ranktim ">活动时间:2020.10.01-2020.11.11</span>
</div>
<div className="div ">
<span className="xxxxxxxxxx ">499</span>
<span className="ccccccccccccc ">caoxingru12</span>
<span className="zzzzzzzzzzz ">99</span>
</div>
</div>
<div className="rankprizelist ">
<div className="rankprizeitem ">
<img className="rankprizeitemimg " src={this.state.resList['af0fe4d0-011d-4822-96e0-03198626f23d'].url} />
<img className="rankprizenamebg " src={this.state.resList['cf80459a-6c7d-408e-bb5e-f23fa5d9f89a'].url} />
<img className="rankprizetopbg " src={this.state.resList['8e864ede-469f-491f-a9aa-41948c5d82c3'].url} />
<img className="rankprizetop " src={this.state.resList['031e266a-ddfb-4a34-aea6-c5cb73b590df'].url} />
<span className="rankprizename ">2999元购物金</span>
</div>
</div>
</div>
);
}
}
export default Pagepagerank;
export default Pagepagerank;
\ No newline at end of file
.pagerank {
width: 750px;
height: 1624px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
.rankbg {
width: 750px;
height: 1624px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
}
.rankreturnbtn {
width: 591px;
height: 112px;
opacity: 1;
left: 81px;
top: 1236px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.ranktex {
width: 596px;
height: 893px;
opacity: 1;
left: 75px;
top: 256px;
position: absolute;
transform-origin: 0px 0px 0px;
.myrank {
width: 434px;
height: 20px;
left: 0px;
top: 0px;
.rankbg {
width: 750px;
height: 1624px;
opacity: 1;
left: 40px;
top: 873px;
position: absolute;
transform-origin: 0px 0px 0px;
.rankid {
width: 155px;
height: 20px;
opacity: 0.6196078431372549;
left: 145px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(0, 0, 0, 1);
}
.ranktemp {
width: 13px;
height: 19px;
opacity: 0.6196078431372549;
left: 421px;
top: 1px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(0, 0, 0, 1);
}
.rank {
width: 38px;
height: 19px;
opacity: 0.6196078431372549;
top: 1px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 24px;
color: rgba(0, 0, 0, 1);
}
}
.bang_dan_xin_xi {
width: 522px;
height: 29px;
.rankreturnbtn {
width: 591px;
height: 112px;
opacity: 1;
left: 39px;
top: 221px;
left: 81px;
top: 1236px;
position: absolute;
transform-origin: 0px 0px 0px;
.tao_baoid {
width: 100px;
height: 29px;
opacity: 0.6196078431372549;
left: 180px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(0, 0, 0, 1);
}
.lei_ji_ji_bai_ren_shu {
width: 190px;
height: 29px;
opacity: 0.6196078431372549;
left: 344px;
}
.ranktex {
width: 596px;
height: 893px;
opacity: 1;
left: 75px;
top: 256px;
position: absolute;
transform-origin: 0px 0px 0px;
display: none;
.myrank {
width: 434px;
height: 20px;
opacity: 1;
left: 40px;
top: 873px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(0, 0, 0, 1);
.rankid {
width: 155px;
height: 20px;
opacity: 0.6196078431372549;
left: 145px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(0, 0, 0, 1);
top: -10px;
}
.ranktemp {
width: 13px;
height: 19px;
opacity: 0.6196078431372549;
left: 421px;
top: -10px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(0, 0, 0, 1);
}
.rank {
width: 38px;
height: 19px;
opacity: 0.6196078431372549;
top: -10px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(0, 0, 0, 1);
}
}
.pai_ming {
width: 80px;
.bang_dan_xin_xi {
width: 522px;
height: 29px;
opacity: 0.6196078431372549;
opacity: 1;
left: 39px;
top: 221px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(0, 0, 0, 1);
.tao_baoid {
width: 100px;
height: 29px;
opacity: 0.6196078431372549;
left: 180px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(0, 0, 0, 1);
}
.lei_ji_ji_bai_ren_shu {
width: 190px;
height: 29px;
opacity: 0.6196078431372549;
left: 344px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(0, 0, 0, 1);
}
.pai_ming {
width: 80px;
height: 29px;
opacity: 0.6196078431372549;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
color: rgba(0, 0, 0, 1);
}
}
}
.ranktit2 {
width: 596px;
height: 165px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
.ranktit4 {
width: 750px;
height: 53px;
.ranktit2 {
width: 596px;
height: 165px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 72px;
color: rgba(1, 1, 0, 1);
left: -75px;
text-align: center;
top: -30px;
.ranktit4 {
width: 750px;
height: 53px;
opacity: 1;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 72px;
color: rgba(1, 1, 0, 1);
left: -75px;
text-align: center;
top: -30px;
}
.ranktit3 {
width: 750px;
height: 35px;
opacity: 1;
left: -75px;
top: 72px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 36px;
color: rgba(1, 1, 0, 1);
text-align: center;
}
.ranktim {
width: 750px;
height: 26px;
opacity: 1;
left: -75px;
top: 139px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(80, 80, 80, 1);
text-align: center;
}
}
.ranktit3 {
width: 750px;
height: 35px;
.div {
width: 596px;
height: 574px;
opacity: 1;
left: -75px;
top: 72px;
display: block;
left: 4px;
top: 268px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 36px;
color: rgba(1, 1, 0, 1);
text-align: center;
.xxxxxxxxxx {
width: 98px;
height: 40px;
opacity: 1;
display: block;
left: 16px;
top: 8px;
position: absolute;
font-size: 26px;
color: rgba(0, 0, 0, 1);
transform-origin: 0px 0px 0px;
text-align: center;
}
.ccccccccccccc {
width: 300px;
height: 40px;
opacity: 1;
display: block;
left: 108px;
top: 8px;
position: absolute;
font-size: 26px;
color: rgba(0, 0, 0, 1);
transform-origin: 0px 0px 0px;
text-align: center;
}
.zzzzzzzzzzz {
width: 150px;
height: 40px;
opacity: 1;
display: block;
left: 376px;
top: 8px;
position: absolute;
font-size: 26px;
color: rgba(0, 0, 0, 1);
transform-origin: 0px 0px 0px;
text-align: center;
}
}
.ranktim {
width: 750px;
height: 26px;
}
.rankprizelist {
width: 510px;
height: 164px;
opacity: 1;
display: block;
left: 120px;
top: 394px;
position: absolute;
transform-origin: 0px 0px 0px;
.rankprizeitem {
width: 164px;
height: 164px;
opacity: 1;
left: -75px;
top: 139px;
display: block;
left: 0px;
top: 0px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 28px;
color: rgba(80, 80, 80, 1);
text-align: center;
background-color: #d5d5d5;
border-bottom-right-radius: 30px;
border-top-left-radius: 30px;
border-radius: 2px;
border-bottom-left-radius: 30px;
border-top-right-radius: 30px;
.rankprizeitemimg {
width: 164px;
height: 164px;
opacity: 1;
display: block;
left: 0px;
top: 0px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.rankprizenamebg {
width: 164px;
height: 42px;
opacity: 1;
display: block;
left: 0px;
top: 124px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.rankprizetopbg {
width: 144px;
height: 29px;
opacity: 1;
display: block;
left: 10px;
top: 95px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.rankprizetop {
width: 63px;
height: 12px;
opacity: 1;
display: block;
left: 55px;
top: 104px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.rankprizename {
width: 164px;
height: 40px;
opacity: 1;
display: block;
left: 0px;
top: 125px;
position: absolute;
font-size: 22px;
color: rgba(0, 0, 0, 1);
transform-origin: 0px 0px 0px;
text-align: center;
}
}
}
}
}
}
\ No newline at end of file
......@@ -25,19 +25,22 @@ Component({
onCloseModal(){
const {onCloseModal} = this.props;
onCloseModal&&onCloseModal();
this.openInviteFailedModal();
commonToast("助力失败")
},
/**助力 */
async doHelp(){
const {success,data} = await API.doHelp({inviteId:app.inviteId,inviteStep:app.step});
const {success,data,message} = await API.doHelp({inviteId:app.openId,inviteStep:app.step});
console.log("hhahahha")
if(!success){
if(data&&!data.isVip){
commonToast("3s入会,即可为好友助力",1500,()=>{
app.isGoVip = true;
navigateToOutside(data.url);
})
}else{
}else if(data&&data.isVip){
this.openInviteFailedModal();
}else{
commonToast(message);
}
}else{
this.openInviteSuccessModal();
......
......@@ -3,7 +3,7 @@
<!-- <label class="ranknoprizeindex ">500+</label> -->
<image class="ranknoprize500 " a:if="{{myRank>500}}" src={{resList['14fbf7c8-43e2-4bb9-81c8-d1392455cf39'].url}} />
<image class="rankNoPirzeHundred " a:if="{{myRank<=500&&myRankHundred>0}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankHundred)].url}} />
<image class="rankNoPirzeTen " a:if="{{myRank<=500&&myRankTen>=0&&myRankHundred<0}}" style="{{{'left':tenLeft+'rpx'}}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankTen)].url}} />
<image class="rankNoPirzeTen " a:if="{{myRank<=500&&myRankTen>0&&myRankHundred<=0||myRank<=500&&myRankHundred>0&&myRankTen>=0}}" style="{{{'left':tenLeft+'rpx'}}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankTen)].url}} />
<image class="rankNoPirzeOne " a:if="{{myRank<=500&&myRankOne>=0}}" style="{{{'left':oneLeft+'rpx'}}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankOne)].url}} />
<image class="ranknoprizebtn btn" onTap="onCloseModal" src={{resList['d0c616aa-c606-40dd-b6f1-e9d370f3d053'].url}} />
<image class="ranknoprizeclose btn" onTap="onCloseModal" src={{resList['843f7959-252d-403d-8287-e212b46b1fc1'].url}} />
......
......@@ -3,7 +3,7 @@
import resList from '../../resconfig/resList';
Component({
props: {
gameInfo:{rank:10}
gameInfo:{rank:501}
},
data: {
resList: resList,
......@@ -39,7 +39,14 @@ Component({
tenLeft:164
})
}
if(hundred>0){
this.setData({
oneLeft:308,
tenLeft:222
})
}
this.setData({
myRank:rank,
myRankHundred:hundred,
myRankTen:ten,
myRankOne:one
......
......@@ -3,9 +3,9 @@
height: 936rpx;
opacity: 1;
left: 111rpx;
top: 431rpx;
top: 401rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.rankprizemodal .rankprizebg {
width: 527rpx;
......@@ -62,7 +62,7 @@
left: 83rpx;
top: 681rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.rankprizemodal .rankprizeclose {
width: 72rpx;
......@@ -71,5 +71,34 @@
left: 228rpx;
top: 864rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
transform-origin: 50% 50% 0rpx;
}
.rankprizemodal .rankNoPirzeHundred {
width: 88rpx;
height: 77rpx;
opacity: 1;
left: 134rpx;
top: 210rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.rankprizemodal .rankNoPirzeTen {
width: 87rpx;
height: 77rpx;
opacity: 1;
left: 222rpx;
top: 208rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.rankprizemodal .rankNoPirzeOne {
width: 87rpx;
height: 77rpx;
opacity: 1;
left: 308rpx;
top: 208rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
<view class="rankprizemodal ">
<view class="rankprizemodal modal-animate-zoom-in">
<image class="rankprizebg " src={{resList['26550a63-4fb6-4cb9-9e00-3cc6ff1bcc51'].url}} />
<image class="rankprizeimg " src={{resList['760fb409-dced-46bb-ab1e-d488584c9eec'].url}} />
<image class="rankprizeimg " src={{prizeImg}} />
<view class="rankprizetext ">
<span class="rankprizeindex ">15</span>
<span class="rankprizename ">产品六字名称</span>
<!-- <label class="rankprizeindex ">15</label> -->
<label class="rankprizename ">{{prizeName}}</label>
</view>
<image class="rankprizebtn " src={{resList['6ec1ee81-67dd-4303-a201-f69644c658e9'].url}} />
<image class="rankprizeclose " src={{resList['843f7959-252d-403d-8287-e212b46b1fc1'].url}} />
<image class="rankNoPirzeHundred " a:if="{{myRank<=500&&myRankHundred>0}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankHundred)].url}} />
<image class="rankNoPirzeTen " a:if="{{myRank<=500&&myRankTen>0&&myRankHundred<=0||myRank<=500&&myRankHundred>0&&myRankTen>=0}}" style="{{{'left':tenLeft+'rpx'}}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankTen)].url}} />
<image class="rankNoPirzeOne " a:if="{{myRank<=500&&myRankOne>=0}}" style="{{{'left':oneLeft+'rpx'}}}" src={{resList['55fd44df-0153-4a6b-aa5c-b1aea201cdb8-'+(myRankOne)].url}} />
<image class="rankprizebtn btn" onTap="onCloseModal" src={{resList['6ec1ee81-67dd-4303-a201-f69644c658e9'].url}} />
<image class="rankprizeclose btn" onTap="onCloseModal" src={{resList['843f7959-252d-403d-8287-e212b46b1fc1'].url}} />
</view>
\ No newline at end of file
......@@ -2,14 +2,59 @@
import resList from '../../resconfig/resList';
Component({
props: {},
data: {},
methods: {},
props: {
gameInfo:{}
},
data: {
resList: resList,
myRank:800,
myRankHundred:0,
myRankTen:0,
tenLeft:0,
myRankOne:0,
oneLeft:0,
prizeName:'',
prizeImg:''
},
methods: {
onCloseModal() {
const {
onCloseModal
} = this.props;
onCloseModal && onCloseModal();
},
},
onInit(props) {
didMount(){
console.log(this.props.gameInfo)
const {rank,rankPrize} = this.props.gameInfo;
let hundred = Math.floor(rank%1000/100);
let ten = Math.floor(rank%1000%100/10);
let one = Math.floor(rank%1000%100%10);
console.log("排名",hundred,ten,one)
if(ten<=0){
this.setData({
oneLeft:222
})
}else if(hundred<=0&&ten>0){
this.setData({
oneLeft:260,
tenLeft:164
})
}
if(hundred>0){
this.setData({
oneLeft:308,
tenLeft:222
})
}
this.setData({
resList: resList
});
myRank:rank,
myRankHundred:hundred,
myRankTen:ten,
myRankOne:one,
prizeName:rankPrize.name,
prizeImg:rankPrize.image
})
}
});
\ No newline at end of file
......@@ -8,7 +8,8 @@ const {
const {
openDetail,
collectGoods,
checkGoodsCollectedStatus
checkGoodsCollectedStatus,
navigateToOutside
} = tbcc.tb;
Component({
......@@ -84,13 +85,17 @@ Component({
percent: this.data.usePercent,
})
const {
itemId
itemId,
url
} = e.target.dataset.item
const {
onSetNotColletArr
} = this.props;
onSetNotColletArr && await onSetNotColletArr(itemId)
await openDetail(String(itemId))
const {onSetCurItemId} = this.props;
onSetCurItemId&&onSetCurItemId(itemId);
// const {
// onSetNotColletArr
// } = this.props;
// onSetNotColletArr && await onSetNotColletArr(itemId)
// await openDetail(String(itemId))
navigateToOutside(url);
},
/**
* 收藏商品
......
......@@ -5,5 +5,6 @@
task="{{task}}"
onSetNotColletArr="setNotColletArr"
onSetColletArr="setColletArr"
onSetCurItemId="setCurItemId"
onCompleteTask="onCompleteTask" />
</view>
\ No newline at end of file
......@@ -29,7 +29,7 @@ import API from '../../api';
Page({
collectGoodsArr: [],
notCollectGoodsArr: [],
curItemId: 0,
curItemId: null,
data: {
query: {},
task: {},
......@@ -49,10 +49,42 @@ Page({
this.setData({
isBackFlag: Math.floor((Math.random() * 100)) == this.data.isBackFlag ? 101 : Math.floor((Math.random() * 100))
})
if(taskType == 'collectGoods'){
console.log("2222")
this.isCanCompleteCollectTask();
if(this.curItemId){
this.jdgeCollect();
}
// if(taskType == 'collectGoods'){
// console.log("2222")
// this.isCanCompleteCollectTask();
// }
},
onHide(){
console.log("aaaaa")
},
setCurItemId(id){
console.log("设置当前id",id)
this.curItemId = id;
},
jdgeCollect(){
console.log("判断是否收藏")
my.tb.checkGoodsCollectedStatus({
id: this.curItemId,
success: (res) => {
const {isCollect,id} = res;
if(isCollect){
this.onCompleteTask("collectGoods",id)
console.log("收藏成功")
}else{
console.log("收藏失败",id)
}
// my.alert({ content: "success - " + isCollect })
},
fail: (res) => {
const {isCollect,id} = res;
console.log("收藏失败",id)
// my.alert({ content: "fail - " + isCollect })
}
})
},
init() {
const {
......@@ -139,10 +171,10 @@ Page({
goodsList: data || []
})
}
if(taskType == 'collectGoods'){
console.log("1111")
this.isCanCompleteCollectTask();
}
// if(taskType == 'collectGoods'){
// console.log("1111")
// this.isCanCompleteCollectTask();
// }
},
/**判断收藏商品任务是否完成 */
async isCanCompleteCollectTask(itemId) {
......
......@@ -295,6 +295,7 @@ Page({
// console.log("游戏结束");
let iswin = this.data.iswin;
let step = this.data.step;
app.curGameWars = this.data.myidx;
const overdata = await API.gameOver({
isWin: iswin,
step: step
......@@ -424,7 +425,7 @@ Page({
} = SHARE_CONFIG;
if (app.openId) {
let step = this.data.step;
path = "pages/pagepageindex/pagepageindex?openId=" + app.openId + "&inviteStep=" + step;
path = "/pages/pagepageindex/pagepageindex?openId=" + app.openId + "&inviteStep=" + step;
}
return {
...rest,
......
......@@ -238,3 +238,76 @@
position: absolute;
transform-origin: 100% 0rpx 0rpx;
}
.pageindex .indexPrizelist {
width: 580rpx;
height: 164rpx;
opacity: 1;
left: 90rpx;
top: 1434rpx;
position: absolute;
word-break: keep-all;
white-space: nowrap;
transform-origin: 0rpx 0rpx 0rpx;
overflow-x: scroll;
}
.pageindex .indexPrizelist .indexPrizeitem {
position: relative;
width: 164rpx;
height: 164rpx;
opacity: 1;
display: inline-block;
margin: 0 30rpx 0 0;
transform-origin: 0rpx 0rpx 0rpx;
background-color: #d5d5d5;
border-radius: 20rpx;
}
.pageindex .indexPrizelist .indexPrizeitem .indexPrizeitemimg {
width: 164rpx;
height: 164rpx;
opacity: 1;
left: 0rpx;
top: 0rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
border-radius: 20rpx;
}
.pageindex .indexPrizelist .indexPrizeitem .indexPrizenamebg {
width: 164rpx;
height: 42rpx;
opacity: 1;
left: 0rpx;
top: 124rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pageindex .indexPrizelist .indexPrizeitem .indexPrizetopbg {
width: 144rpx;
height: 29rpx;
opacity: 1;
left: 10rpx;
top: 95rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pageindex .indexPrizelist .indexPrizeitem .indexPrizetop {
width: 73rpx;
height: 16rpx;
opacity: 1;
left: 47rpx;
top: 102rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pageindex .indexPrizelist .indexPrizeitem .indexPrizeNameLabel {
width: 164rpx;
height: 40rpx;
opacity: 1;
left: 0rpx;
top: 125rpx;
position: absolute;
font-size: 22rpx;
color: #000000;
transform-origin: 0rpx 0rpx 0rpx;
text-align: center;
}
\ No newline at end of file
......@@ -29,6 +29,15 @@
<image class="rankbtn btn" onTap="navigateTo" data-item="pagepagerank" src={{resList['c57b33fc-8a26-4f7c-9a62-d0d16cae3406'].url}} />
<image class="rule btn" onTap="openModal" data-item="rule" src={{resList['8bc27234-3326-4564-9697-31beca682da8'].url}} />
<image class="myprize btn" onTap="navigateTo" data-item="myprize" src={{resList['49f550d3-50eb-492a-9fe3-79014e2c42a4'].url}} />
<view class="indexPrizelist ">
<view class="indexPrizeitem " onTap="navigateToOutsideGoodsDetail" data-item="{{item}}" a:for="{{indexPrize}}">
<image class="indexPrizeitemimg " src={{resList['4842d868-b00c-415b-98fd-e76647407e54-'+(item.id)].url}} />
<image class="indexPrizenamebg " src={{resList['cf80459a-6c7d-408e-bb5e-f23fa5d9f89a'].url}} />
<image class="indexPrizetopbg " src={{resList['8e864ede-469f-491f-a9aa-41948c5d82c3'].url}} />
<image class="indexPrizetop " src={{resList['eafd2aa7-5a8e-43d6-a352-bab3ff002347'].url}} />
<label class="indexPrizeNameLabel ">{{item.name}}</label>
</view>
</view>
</view>
<view disable-scroll="true" class="page-game">
......@@ -57,11 +66,11 @@
</view>
<view class="popcontainer" a:if="{{modalStatus==6}}">
<ranknoprize-modal a:if="{{modalStatus==6}}" onCloseModal="closeModal"></ranknoprize-modal>
<ranknoprize-modal a:if="{{modalStatus==6}}" gameInfo="{{gameInfo}}" onCloseModal="closeModal"></ranknoprize-modal>
</view>
<view class="popcontainer" a:if="{{modalStatus==7}}">
<rankprize-modal a:if="{{modalStatus==7}}" onCloseModal="closeModal"></rankprize-modal>
<rankprize-modal a:if="{{modalStatus==7}}" gameInfo="{{gameInfo}}" onCloseModal="closeModal"></rankprize-modal>
</view>
......
......@@ -5,7 +5,7 @@ import API from '../../api';
import * as FYGE from "fyge-tbmini";
import * as SvgaParser from "svga-parser";
import {
modalType
modalType,SHARE_CONFIG
} from '../../tbcc-sdk/lib/constants';
const app = getApp();
const {
......@@ -15,7 +15,8 @@ const {
commonToast,
getAuthUserInfo,
navigateToOutside,
getSystemInfo
getSystemInfo,
checkShopFavoredStatus
} = tbcc.tb;
const snowSrc = "cloud://B975D7429522C2AA89E6FD651523DC57//snow.svga";
const fireSrc = "cloud://F03F0071205084B1A58F9C560010C076//fire.svga"
......@@ -29,6 +30,23 @@ const checkSystem = async () => {
Page({
data: {
indexPrize: [{
id:1,
name:'301+热皮',
url:"https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4d7c687df8mh9y&id=624231380919"
}, {
id:2,
name:'502++热皮',
url:"https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687do2J7Y4&id=625018335779"
}, {
id:3,
name:'500E内裤',
url:"https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687do2J7Y4&id=560474460284"
}, {
id:4,
name:'311S袜子',
url:"https://detail.tmall.com/item.htm?spm=a212k0.12153887.0.0.4e60687do2J7Y4&id=600583964263"
}],
/**弹窗状态 */
modalStatus: 0,
/**当前温暖值 */
......@@ -38,7 +56,14 @@ Page({
/**当前游戏阶段 */
curGameStep: 1,
/**活动结束后排行榜奖励信息 */
rankPrize: {}
rankPrize: {},
/**游戏信息 */
gameInfo:{}
},
navigateToOutsideGoodsDetail(e){
const {item} = e.target.dataset;
navigateToOutside(item.url);
},
onLoad(query) {
......@@ -114,7 +139,7 @@ Page({
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 275;
mv.y = 755;
mv.y = 835;
console.log("svgmv", mv)
},
......@@ -128,7 +153,7 @@ Page({
console.log("svga" + v);
var mv = stage.addChild(new FYGE.MovieClip(v));
mv.x = 175;
mv.y = 565;
mv.y = 645;
console.log("svgmv", mv)
},
......@@ -164,14 +189,18 @@ Page({
} = userInfo;
app.nickName = nickName;
app.avatar = avatar;
const favoredStatus = await checkShopFavoredStatus(3035493001).catch(err => {
console.log('查询关注店铺状态失败', err);
});
// this.judgeDoHelp();
this.login();
this.login(favoredStatus);
}
},
/**
* 登录接口
*/
async login() {
async login(isFollow) {
my.showLoading();
const {
nickName,
......@@ -182,7 +211,10 @@ Page({
data
} = await API.login({
userNick: nickName,
avatar
avatar,
isFollow:isFollow,
inviteId:app.inviteId,
inviteStep:app.step
}).catch(res => {
my.hideLoading();
commonToast(res && res.message);
......@@ -191,6 +223,7 @@ Page({
if (success) {
my.hideLoading();
app.openId = data.openId;
app.step = data.inviteStep;
this.getActivityBaseInfoById();
}
},
......@@ -234,17 +267,20 @@ Page({
commonToast(r && r.message);
}) || {};
if (success) {
if(data.rankPrize&&data.rankPrize.type==5){
this.setData({modalStatus: modalType['ranknoprize']})
}else if(data.rankPrize.type!=5){
this.setData({modalStatus: modalType['rankprize']})
}
let str = data.rank>500?'500+':data.rank
this.setData({
gameInfo: data,
curWarms: data.warms + '',
curRank: str,
curGameStep: data.step
})
if(data.rankPrize&&data.rankPrize.type==5){
this.setData({modalStatus: modalType['ranknoprize']})
}else if(data.rankPrize&&data.rankPrize.type!=5&&data.rankPrize.image&&data.rankPrize.image.length>0){
this.setData({modalStatus: modalType['rankprize']})
}
my.hideLoading();
}
......@@ -260,7 +296,9 @@ Page({
step: this.data.curGameStep
});
if (success) {
my.redirectTo({url:'/pages/pagegamemain/pagegamemain'})
my.redirectTo({url:'/pages/pagegamemain/pagegamemain?'+
"step="+this.data.curGameStep+"&start="+data.joinGameStartTime+
"&end="+data.joinGameEndTime+"&gl="+parseFloat(data.winRate)+"&toolcd="+data.propsCD})
my.hideLoading();
} else {
if (data && !data.isVip) {
......@@ -299,6 +337,52 @@ Page({
my.navigateTo({
url: `/pages/${item}/${item}`
});
},
onShareAppMessage() {
// 返回自定义分享信息
let {
path,
...rest
} = SHARE_CONFIG;
console.log('app.openId', app.openId);
if (app.openId) {
path = '/pages/pagepageindex/pagepageindex' + '?openId=' + app.openId+'&inviteStep='+app.step;
}
console.log('path', path)
return {
...rest,
path
}
},
onShow(){
if(app.isGoVip){
this.doHelp();
}
},
openInviteFailedModal(){
my._showIndexModal("invitefail");
},
openInviteSuccessModal(){
my._showIndexModal("invitesuccess");
},
/**助力 */
async doHelp(){
const {success,data,message} = await API.doHelp({inviteId:app.inviteId,inviteStep:app.step});
console.log("hhahahha")
if(!success){
if(data&&!data.isVip){
commonToast("3s入会,即可为好友助力",1500,()=>{
navigateToOutside(data.url);
})
}else if(data&&data.isVip){
this.openInviteFailedModal();
}else{
commonToast(message);
}
}else{
this.openInviteSuccessModal();
}
}
});
\ No newline at end of file
......@@ -30,7 +30,7 @@
height: 893rpx;
opacity: 1;
left: 75rpx;
top: 256rpx;
top: 386rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
......@@ -39,7 +39,7 @@
height: 20rpx;
opacity: 1;
left: 40rpx;
top: 873rpx;
top: 783rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
......@@ -116,7 +116,7 @@
}
.pagerank .ranktex .rankList {
width: 596rpx;
height: 574rpx;
height: 484rpx;
opacity: 1;
left: 4rpx;
top: 268rpx;
......@@ -209,10 +209,82 @@
height: 26rpx;
opacity: 1;
left: -75rpx;
top: 139rpx;
top: -30rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
font-size: 28rpx;
color: #505050;
text-align: center;
}
.pagerank .rankprizelist {
width: 520rpx;
height: 164rpx;
opacity: 1;
left: 120rpx;
top: 414rpx;
position: absolute;
word-break: keep-all;
white-space: nowrap;
transform-origin: 0rpx 0rpx 0rpx;
overflow-x: scroll;
}
.pagerank .rankprizelist .rankprizeitem {
position: relative;
width: 164rpx;
height: 164rpx;
opacity: 1;
display: inline-block;
margin: 0 10rpx 0 0;
transform-origin: 0rpx 0rpx 0rpx;
background-color: #d5d5d5;
border-radius: 20rpx;
}
.pagerank .rankprizelist .rankprizeitem .rankprizeitemimg {
width: 164rpx;
height: 164rpx;
opacity: 1;
left: 0rpx;
top: 0rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
border-radius: 20rpx;
}
.pagerank .rankprizelist .rankprizeitem .rankprizenamebg {
width: 164rpx;
height: 42rpx;
opacity: 1;
left: 0rpx;
top: 124rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pagerank .rankprizelist .rankprizeitem .rankprizetopbg {
width: 144rpx;
height: 29rpx;
opacity: 1;
left: 10rpx;
top: 95rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pagerank .rankprizelist .rankprizeitem .rankprizetop {
width: 63rpx;
height: 12rpx;
opacity: 1;
left: 55rpx;
top: 104rpx;
position: absolute;
transform-origin: 0rpx 0rpx 0rpx;
}
.pagerank .rankprizelist .rankprizeitem .rankPrizeNameLabel {
width: 164rpx;
height: 40rpx;
opacity: 1;
left: 0rpx;
top: 125rpx;
position: absolute;
font-size: 22rpx;
color: #000000;
transform-origin: 0rpx 0rpx 0rpx;
text-align: center;
}
\ No newline at end of file
<view class="pagerank ">
<image class="rankbg " src={{resList['eb407995-cc98-4846-bf45-d7ac37e9037e'].url}} />
<image class="rankbg " src={{resList['bf292c37-4753-46bc-bae5-e886ae9cec80'].url}} />
<image class="rankreturnbtn btn" onTap="navigateToIndex" src={{resList['071da23d-ca97-4979-91d1-533fe386eef7'].url}} />
<view class="ranktex ">
<view class="myrank ">
......@@ -20,9 +20,18 @@
</view>
</view>
<view class="ranktit2 ">
<label class="ranktit4 ">抱团取暖冲榜赢大奖</label>
<label class="ranktit3 ">赢取清空购物车终极大奖</label>
<!-- <label class="ranktit4 ">抱团取暖冲榜赢大奖</label>
<label class="ranktit3 ">赢取清空购物车终极大奖</label> -->
<label class="ranktim ">{{activtyTime}}</label>
</view>
</view>
<view class="rankprizelist ">
<view class="rankprizeitem " a:for="{{rankPrize}}">
<image class="rankprizeitemimg " src={{resList['af0fe4d0-011d-4822-96e0-03198626f23d-'+(item.id)].url}} />
<image class="rankprizenamebg " src={{resList['cf80459a-6c7d-408e-bb5e-f23fa5d9f89a'].url}} />
<image class="rankprizetopbg " src={{resList['8e864ede-469f-491f-a9aa-41948c5d82c3'].url}} />
<image class="rankprizetop " style="{{{'width':item.w+'rpx','left':item.left+'rpx'}}}" src={{resList['031e266a-ddfb-4a34-aea6-c5cb73b590df-'+(item.id)].url}} />
<label class="rankPrizeNameLabel ">{{item.name}}</label>
</view>
</view>
</view>
\ No newline at end of file
......@@ -17,7 +17,38 @@ Page({
rankList: [],
myRankInfo: {},
myRank: '',
activtyTime: ''
activtyTime: '',
rankPrize: [{
id:1,
name:'2999元购物金',
w:63,
left:55
}, {
id:2,
name:'1111元购物金',
w:94,
left:40
}, {
id:3,
name:'蕉内热皮套装',
w:102,
left:32
}, {
id:4,
name:'蕉内家居服',
w:110,
left:28
}, {
id:5,
name:'蕉内袜子礼盒',
w:125,
left:24
}, {
id:6,
name:'蕉内睡眠眼罩',
w:140,
left:12
}]
},
onLoad(props) {
......@@ -58,7 +89,7 @@ Page({
let startStr = this.getTime1(startTime);
let endStr = this.getTime1(endTime);
this.setData({
activtyTime:'活动时间:'+startStr+'-'+endStr
activtyTime: '活动时间:' + startStr + '-' + endStr
})
},
......
......@@ -614,5 +614,125 @@ const resList = {
url: '//yun.duiba.com.cn/spark/assets/rankplus.41fdb644cd6d89a7835757cb15787385912bae97.png',
uuid: '3202ce2d-89f6-4b02-ba30-8eb0d163d757'
},
'bf292c37-4753-46bc-bae5-e886ae9cec80': {
name: 'rankPageBg',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/rankPageBg.8b9986cb40ee53236566ea9ade005f6cc5164467.png',
uuid: 'bf292c37-4753-46bc-bae5-e886ae9cec80'
},
'af0fe4d0-011d-4822-96e0-03198626f23d-1': {
name: 'rankListItem1111',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/rankListItem1111.05783f4a9562c170034e8c5e86aa4ecc15e072d7.png',
uuid: 'af0fe4d0-011d-4822-96e0-03198626f23d'
},
'af0fe4d0-011d-4822-96e0-03198626f23d-2': {
name: 'rankListItem2222',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/rankListItem2222.b3d16c471ad68d40fc14b2b4027881386f38db3c.png',
uuid: 'd72e2d2f-ecef-41fa-bc2e-a8f306f7e931'
},
'cf80459a-6c7d-408e-bb5e-f23fa5d9f89a': {
name: 'rankListPrizeItemBg',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/rankListPrizeItemBg.27ee8e8dccb4faae339a1aa0831cccba372bf2b6.png',
uuid: 'cf80459a-6c7d-408e-bb5e-f23fa5d9f89a'
},
'8e864ede-469f-491f-a9aa-41948c5d82c3': {
name: 'rankListTopBg',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/rankListTopBg.915c1f28671fd03f11082a427e5336aa2270697a.png',
uuid: '8e864ede-469f-491f-a9aa-41948c5d82c3'
},
'031e266a-ddfb-4a34-aea6-c5cb73b590df-1': {
name: 'TOP1',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/TOP1.1e632465944457e760bbe01494e460a83e65ab09.png',
uuid: '031e266a-ddfb-4a34-aea6-c5cb73b590df'
},
'031e266a-ddfb-4a34-aea6-c5cb73b590df-2': {
name: 'TOP2',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/TOP2.12bdc811c5c3a006c808c57d30273ed7fd7c314a.png',
uuid: '6ff72cd0-e227-4b6c-b04b-6165d1f43179'
},
'031e266a-ddfb-4a34-aea6-c5cb73b590df-3': {
name: 'TOP3',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/TOP3.645aebdea13bd2dd4be04fcd2d0226f02fc5c2ab.png',
uuid: '1f34d3a3-ffdc-45fb-90d7-6e295db0c845'
},
'031e266a-ddfb-4a34-aea6-c5cb73b590df-4': {
name: 'TOP4',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/TOP4.2f8bfa668dd7209245d2692f64faeaccb9949787.png',
uuid: 'fa57af71-0d9d-46f9-833d-ee3697781cd8'
},
'031e266a-ddfb-4a34-aea6-c5cb73b590df-5': {
name: 'TOP5',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/TOP5.64f969838baf6e84674ee79d47d1bd0ca3983885.png',
uuid: '97c785aa-c3ec-4204-8d04-3739d574cf11'
},
'031e266a-ddfb-4a34-aea6-c5cb73b590df-6': {
name: 'TOP6',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/TOP6.72d35368d1fbb5c86b0ea3e11ea2c230fc933477.png',
uuid: '3a1522ed-4c1d-49c2-a4cf-1150b43daebe'
},
'af0fe4d0-011d-4822-96e0-03198626f23d-3': {
name: '榜单奖品1',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/榜单奖品1.a6d36387f2a89b151715b1993f080d21438306ac.jpg',
uuid: 'cf70dc0a-568c-4032-9393-3d320012398e'
},
'af0fe4d0-011d-4822-96e0-03198626f23d-4': {
name: '榜单奖品2',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/榜单奖品2.5cb06eb769fbf67b338b5e772ed0cc6cb6c5d787.jpg',
uuid: '91a4186a-1672-4090-8b01-78d7013667ae'
},
'af0fe4d0-011d-4822-96e0-03198626f23d-5': {
name: '榜单奖品3',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/榜单奖品3.aafbcc9c8fc3b777188906b79bbd5918d5e871cb.jpg',
uuid: '1b7d7c8b-9807-4b38-9f8f-37101700a0c9'
},
'af0fe4d0-011d-4822-96e0-03198626f23d-6': {
name: '榜单奖品4',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/榜单奖品4.f59bc7fcdd82f8b5a32fd53ed92d3cbe888060d5.jpg',
uuid: '24b4ae46-45a6-4991-b938-bb2ab3fd05db'
},
'eafd2aa7-5a8e-43d6-a352-bab3ff002347': {
name: 'topGoods',
ext: '.png',
url: '//yun.duiba.com.cn/spark/assets/topGoods.f858cc23cd1e64239d4724a21e30337b723f8507.png',
uuid: 'eafd2aa7-5a8e-43d6-a352-bab3ff002347'
},
'4842d868-b00c-415b-98fd-e76647407e54-1': {
name: 'indexprize1',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/indexprize1.5de2c8eaa11cfe25a3e84f3a83e127a4da1c8863.jpg',
uuid: '4842d868-b00c-415b-98fd-e76647407e54'
},
'4842d868-b00c-415b-98fd-e76647407e54-2': {
name: 'indexprize2',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/indexprize2.b99a949be6ff2a73732eedf0b429e897651bd888.jpg',
uuid: '0808a5e3-2361-4360-8d29-5e5de404a8e3'
},
'4842d868-b00c-415b-98fd-e76647407e54-3': {
name: 'indexprize3',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/indexprize3.daf8de5a768ba691f1890f0ba09340ff8d76998e.jpg',
uuid: 'fe9de2e5-09d1-4de4-b7ef-689191085de3'
},
'4842d868-b00c-415b-98fd-e76647407e54-4': {
name: 'indexprize4',
ext: '.jpg',
url: '//yun.duiba.com.cn/spark/assets/indexprize4.4c3ceb7099263b118cc59e50d2e54e86d96358d4.jpg',
uuid: '130d2ea1-d79f-4180-b02c-bc94df2583a3'
},
};
export default resList;
\ No newline at end of file
// 分享配置
export const SHARE_CONFIG = {
title: '爱斐楼上请',
desc: '积分盖楼赢锦鲤 享一年新衣',
imageUrl: 'https://isv.alibabausercontent.com/00000000/imgextra/i2/676606897/O1CN01eNrwLl20osHoB4Y7d_!!676606897-2-isvtu-00000000.png', // 分享图片URL
path: '/pages/pageshou_ye/pageshou_ye'
title: '抱团取暖 冲刺2999元蕉内购物金',
desc: '降温了!来玩抱团游戏赢取双11大奖',
imageUrl: 'https://isv.alibabausercontent.com/00000000/imgextra/i1/3035493001/O1CN01TEmmQP1Y2VDuoPLYn_!!3035493001-0-isvtu-00000000.jpg', // 分享图片URL
path: '/pages/pagepageindex/pagepageindex'
};
// 链接配置
......
......@@ -247,6 +247,7 @@ export const openDetail = async itemId => {
return new Promise((resolve, reject) => {
my.tb.openDetail({
itemId: itemId + '',
forceH5:true,
success: res => {
resolve(res);
},
......
This diff is collapsed.
{
"code": -15559199.54038009,
"success": true,
"success": false,
"code": "nulla laborum",
"data": {
"joinGameEndTime": 45401690.52271202,
"joinGameStartTime": -54711633.18867665
}
"isVip":false,
"url":""
},
"message": "sit tempor anim"
}
\ No newline at end of file
{
"code": -15559199.54038009,
"code": -31510764.37943834,
"success": true,
"data": {
"joinGameEndTime": 45401690.52271202,
"joinGameStartTime": -54711633.18867665
"joinGameEndTime": -44096271.73831963,
"propsCD": 5,
"winRate": 0.5,
"joinGameStartTime": -43682558.46960456
}
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
"name": "商品名商品名商品名商品名商品名商品名商品名商品商品",
"price": "388",
"itemId": 617724147979,
"url":"www.baidu.com",
"collected": true
},
{
......
......@@ -3,14 +3,11 @@
"success": true,
"data": {
"warms": 59,
"rank": 510,
"rank": 10,
"winTimes": 22180029.681882724,
"step": 2,
"openId": -56636935.38550403,
"rankPrize": {
"name": "reprehenderit voluptate dolore Lorem pariatur",
"type": "5",
"image": "Lorem irure sed"
}
}
}
\ 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