调整首页顶部布局
This commit is contained in:
parent
e3d6564aee
commit
e9a3cc700c
@ -1,7 +1,7 @@
|
||||
{
|
||||
"description": "A WePY project",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"urlCheck": false,
|
||||
"es6": false,
|
||||
"postcss": false,
|
||||
"minified": false,
|
||||
|
@ -1,4 +1,4 @@
|
||||
const env = 'product'; //product, test
|
||||
const env = 'test'; //product, test
|
||||
export default {
|
||||
env: env,
|
||||
// apiBase: env === 'test'? 'http://192.168.100.226' : 'https://ghost.kingsome.cn',
|
||||
|
@ -12,26 +12,31 @@
|
||||
<view class="userinfo-user">
|
||||
<image class="userinfo-avatar" src="{{avatar}}"></image>
|
||||
<view class="userinfo-nickname">{{ nickname }}</view>
|
||||
<view class="vip-view {{showAll? '' : 'hidden'}}">
|
||||
<image src="{{vipImg}}"></image>
|
||||
<text class="vip-expire-txt">{{expire_str}}</text>
|
||||
<navigator class="vip-btn zan-btn zan-btn--small zan-btn--primary zan-btn--plain button-hover {{showBuy ? '' : 'hidden'}}"
|
||||
target="miniProgram"
|
||||
open-type="navigate"
|
||||
app-id="wx815bf59d472c0a63"
|
||||
path="/pages/buyvip?{{vip_params}}"
|
||||
extra-data=""
|
||||
@tap = 'vipBtnTap'
|
||||
version="{{payVer}}"
|
||||
>
|
||||
{{vip_btn_title}}</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zan-btn zan-btn--small zan-btn--primary button-hover {{showAll? '' : 'hidden'}}" @tap="showInviteView">免费获取游戏</view>
|
||||
<view class="userinfo-score {{showAll? '' : 'hidden'}}">金币: {{score}}</view>
|
||||
<view class="vip-view {{showAll? '' : 'hidden'}}">
|
||||
<navigator class="vip-btn zan-btn zan-btn--small zan-btn--primary zan-btn--plain button-hover {{showBuy ? '' : 'hidden'}}"
|
||||
target="miniProgram"
|
||||
open-type="navigate"
|
||||
app-id="wx815bf59d472c0a63"
|
||||
path="/pages/buyvip?{{vip_params}}"
|
||||
extra-data=""
|
||||
@tap = 'vipBtnTap'
|
||||
version="{{payVer}}"
|
||||
>
|
||||
{{vip_btn_title}}</navigator>
|
||||
<image src="{{vipImg}}"></image>
|
||||
<text class="vip-expire-txt">{{expire_str}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
|
||||
<view class="user-info-ext {{(showAll && !vip)? '' : 'hidden'}}">
|
||||
<view class="info-part">
|
||||
<view class="info-part-top">拥有游戏: <text class="info">{{my_game_list.length}}</text></view>
|
||||
<view class="zan-btn zan-btn--small zan-btn--plain zan-btn--warn button-hover" @tap="showInviteView">免费获取游戏</view>
|
||||
</view>
|
||||
<view class="info-part">
|
||||
<view class="info-part-top">金币: <text class="info">{{score}}</text></view>
|
||||
<view class="zan-btn zan-btn--small zan-btn--plain zan-btn--warn button-hover" @tap="toGetMoney">免费获取金币</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<myGame class="{{(showAll && showMyGame)? '' : 'hidden'}}" :idx.sync="recentCurrent" :titleList.sync="myGameTitles"
|
||||
@ -108,7 +113,7 @@
|
||||
vip: false,
|
||||
expire_str: '',
|
||||
vipImg: image.vip_s,
|
||||
vip_btn_title: '激活',
|
||||
vip_btn_title: '激活VIP, 畅玩所有游戏',
|
||||
vip_params: '',
|
||||
showBuy: false,
|
||||
payVer: 'develop',
|
||||
@ -165,6 +170,10 @@
|
||||
wepy.navigateTo({
|
||||
url: '/pages/game?link=' + encodeURIComponent(url) + '&gid=0&category=ad'
|
||||
});
|
||||
},
|
||||
toGetMoney() {
|
||||
this.$parent.log('main_get_coin_btn', {});
|
||||
this.requestAd('');
|
||||
}
|
||||
};
|
||||
onPullDownRefresh() {
|
||||
@ -404,7 +413,7 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
this.vip_btn_title = '激活';
|
||||
this.vip_btn_title = '激活VIP, 畅玩所有游戏';
|
||||
this.vipImg = image.vip_s;
|
||||
}
|
||||
this.showBuy = !!this.vip_btn_title && this.$showBuy();
|
||||
@ -488,6 +497,20 @@
|
||||
}
|
||||
this.$apply();
|
||||
}
|
||||
async requestAd(text) {
|
||||
try {
|
||||
let res = await http.post('/api/emulated/request_ad', {});
|
||||
if (res.errcode === 0) {
|
||||
wepy.navigateTo({
|
||||
url: `/pages/jumppage?text=${text}&aid=${res.aid}`
|
||||
});
|
||||
} else {
|
||||
console.log('request ad with errmsg: ' + res.errmsg);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
onShareAppMessage() {
|
||||
let account = wepy.getStorageSync('account');
|
||||
let shareObj = this.$getShareCfg();
|
||||
|
@ -18,9 +18,9 @@ page {
|
||||
}
|
||||
|
||||
.userinfo-nickname {
|
||||
color: #aaa;
|
||||
color: #777777;
|
||||
font-size: 60 rpx;
|
||||
margin-left: 8px;
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
.zan-btns {
|
||||
@ -103,4 +103,44 @@ page {
|
||||
.record-list {
|
||||
background-color: white;
|
||||
}
|
||||
.top-view .user-info-ext {
|
||||
display: flex;
|
||||
position: relative;
|
||||
font-size:12px;
|
||||
color:#aaa;
|
||||
|
||||
}
|
||||
.top-view .user-info-ext::before{
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
background: #e5e5e5;
|
||||
content: ' ';
|
||||
}
|
||||
.top-view .user-info-ext .info-part{
|
||||
width: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
position: relative;
|
||||
flex-direction:column;
|
||||
}
|
||||
.top-view .user-info-ext .info-part::after {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
bottom: 10px;
|
||||
border-right: 1rpx solid #e5e5e5;
|
||||
background: #e5e5e5;
|
||||
content: ' ';
|
||||
}
|
||||
.top-view .user-info-ext .info-part .info-part-top {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.info {
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user