This commit is contained in:
2020-07-16 10:25:32 +08:00
parent 05f5fedfe5
commit 55a7b3a27f
7 changed files with 142 additions and 26 deletions

2
.vscode/ftp-kr.json vendored
View File

@@ -1,5 +1,5 @@
{
"host": "10.42.0.101",
"host": "192.168.43.121",
"username": "xingbangtuan",
"password": "123456",
"remotePath": "/",

View File

@@ -1,5 +1,5 @@
{
"ftp://10.42.0.101:14147@xingbangtuan": {
"ftp://192.168.43.121:14147@xingbangtuan": {
"App.vue": {
"type": "-",
"size": 517,

View File

@@ -95,11 +95,20 @@
starId:this.id
},
success:(res)=>{
uni.showToast({
title: '守护成功',
duration: 2000
});
that.getshouhuLog()
if(res.data.code != 0){
uni.showToast({
icon: 'none',
title: res.data.msg,
duration: 2000
});
}else{
uni.showToast({
title: '守护成功',
duration: 2000
});
that.getshouhuLog()
}
}
})
},

View File

@@ -8,7 +8,7 @@
<image :src="info.head" mode="aspectFill"></image>
<view class="name"><text>{{info.nick}}</text></view>
<view class="center-bottom">
<view><image src="../../static/de.png" mode="aspectFit"></image><text v-if="isVip">VIP</text><text v-else>平民</text></view>
<view><image src="../../static/de.png" mode="aspectFit"></image><text v-if="isVIP">VIP</text><text v-else>平民</text></view>
<view><image src="../../static/xin.png" mode="aspectFit"></image>{{info.much}}</view>
<view><image src="../../static/id.png" mode="aspectFit"></image>{{info.id}}</view>
</view>
@@ -177,12 +177,13 @@ export default {
console.log(this.info)
}
})
let that = this
this.request({
url:this.path+'/api/xyb/star/taskList',
success:(res)=>{
let d = res.data;
if(d.code == 0){
this.isVIP = d.rows[6].isHaveVip == 1 ? true : false
that.isVIP = d.rows[6].isHaveVip == "1" ? true : false
}
}
})

View File

@@ -39,23 +39,34 @@
</swiper>
</view>
</view>
<view v-if="guardPeople.length" class="guard-people">
<view class="left">我们正在守护{{ nowStar.name }}</view>
<image :src="guardPeople[0].customer.head"></image>
<view class="right" @click="toGuard" v-if="isGuard">
<image src="/static/shouhu.png"></image>
<view>
<view class="text-top">我要加入</view>
<view class="text-bottom">守护队伍</view>
</view>
</view>
</view>
<view class="top-notice">
公告
<view>陪伴是最长情的告白</view>
</view>
<uni-list class="my-bottom">
<uni-list-item @click="goLuck" rightText="立即抽奖" :showArrow="false" title="抽奖" note="100%中奖" thumb="/static/supprt/chou.png" />
<uni-list-item @click="confirmShare" rightText="立即分享" :showArrow="false" title="好友每次助力10票" note="分享给好友或群好友点击后您可以每次获得10票" thumb="/static/supprt/fen.png" />
<uni-list-item @click="confirmShare" rightText="立即分享" :showArrow="false" title="好友每次助力+10票" note="分享给好友或群好友点击后您可以每次获得10票" thumb="/static/supprt/fen.png" />
<uni-list-item @click="goSign" :isabled="sign.signStateId == 2?true:false" :rightText="sign.signStateId == 2?'已签到':'立即签到'" :showArrow="false" title="每日签到" :note="'签到时间'+sign.signDate+'连续签到'+sign.signCount+'天'" thumb="/static/supprt/qian.png" />
<uni-list-item @click="goAdd" rightText="看视频" :showArrow="false" title="看视频(+10票)" note="每日可看到无视频为止" thumb="/static/supprt/kan.png" />
<uni-list-item @click="showGuard" :rightText="isVIP ? '已开通' : '开启权限'" :isabled="isVIP ? true : false" :showArrow="false" title="守护得票" note="每日领取300票" thumb="/static/supprt/guard.png" />
<uni-list-item v-if="guardStatus == '1'" @click="showGuard" :rightText="isVIP ? '已开通' : '开启权限'" :isabled="isVIP ? true : false" :showArrow="false" title="守护得票" note="每日领取500票" thumb="/static/supprt/guard.png" />
<uni-list-item @click="goAddPiao" rightText="立即领取" :showArrow="false" title="日常加票" note="更多加票" thumb="/static/supprt/ri.png" />
<!-- <button class="share" open-type="share"></button> -->
<cell class="gcontact" @tap="goContact" bind:startmessage='startmessage' bind:completemessage="completemessage" plugid='edc6797f8b36c85af0a284dca7a99aaf'>
<!-- <uni-list-item rightText="立即联系" :showArrow="false" title="联系我领20票" thumb="/static/supprt/lian.png" /> -->
</cell>
</uni-list>
<view @tap.stop="toGuard" class="dingyue">{{isVIP ? '您有VIP特权要守护' + nowStar.name || '' + '吗?': '我要守护爱豆' + nowStar.name || ''}}</view>
<view @tap.stop="toGuard" v-if="guardStatus == '1'" class="dingyue">{{isVIP ? '您有VIP特权要守护' + nowStar.name || '' + '': '我要守护爱豆' + nowStar.name || ''}}</view>
<form @submit='dingyues' report-submit='true'>
<button class="dingyue" form-type="submit">订阅{{nowStar.name}}排名变化您可以通知{{dingyue}}次哦</button>
</form>
@@ -86,7 +97,7 @@
</view>
</uniPopup>
<view class="support-rank">
<view class="support-rank" v-if="guardStatus == '1'">
<view v-for="(item, index) in newArgeList" :key="index" class="rank-row">
<view v-for="(value, idx) in item" :key="idx" @click="supportRankbuy(1,value.id, value.muchPiao)">+{{ value.muchPiao }}</view>
</view>
@@ -171,6 +182,9 @@
<uni-popup ref="popupShare" type="share" @change="change">
<uni-popup-share title="分享到" @select="select"></uni-popup-share>
</uni-popup>
<uniPopup ref="imagePopup" type="top">
<image src="/static/share.png" mode="aspectFit" style="margin-left: 70rpx" @click="$refs.imagePopup.close()"></image>
</uniPopup>
</view>
</template>
@@ -227,6 +241,9 @@ export default {
lingqu:true,
piao:500,
isVIP: false,
guardPeople: [],
guardStatus: '', // 等于一的时候,让他们展示,等于零的时候不展示
isGuard: ''
};
},
onLoad(opt) {
@@ -310,8 +327,53 @@ export default {
if(this.hasLogin){
this.getUserInfo();
}
console.log('ceshiceshi')
this.getGuardPeople();
this.judgeGuardShow();
this.getshouhuLog();
},
methods:{
judgeGuardShow() {
let that = this
this.request({
url: this.path + "/api/xyb/banner/isOpen",
data: {
starId: this.id
},
success(res){
that.guardStatus = res.data.msg;
console.log(that.guardStatus)
}
})
},
getshouhuLog(){
let that = this
this.request({
url:that.path + "/api/xyb/star/isShouhuLog",
data:{
starId:that.id
},
success:(res)=>{
if(res.data.code == 301) that.isGuard = false;
else that.isGuard = true;
console.log(that.isGuard)
}
})
},
// 查询当前明星被哪些会员守护
getGuardPeople() {
let that = this
this.request({
url: this.path + "/api/xyb/star/shouhuLogByStarId",
data: {
starId: this.id
},
success(res){
that.guardPeople = res.data.data
console.log(that.guardPeople)
}
})
},
// 领取
lq(){
this.request({
@@ -359,7 +421,7 @@ export default {
if(res.platform == 'ios'){
uni.showModal({
title: '提示',
content: 'ios不支持购买',
content: 'ios不支持',
showCancel: false,
success: function (res) {
if (res.confirm) {
@@ -474,19 +536,24 @@ export default {
this.$refs.popupShare.open()
},
select(e, done) {
let that = this;
uni.getSystemInfo({
success(res){
uni.showModal({
title: '朋友圈',
content: res.platform == 'ios' ? 'ios功能暂不可用' : '请点击右上角更多进行分享',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// if(res.platform == 'ios' ){
// uni.showModal({
// title: '朋友圈',
// content: 'ios功能暂不可用',
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
// }else{
that.$refs.imagePopup.open();
// }
}
})
@@ -792,6 +859,7 @@ export default {
if(this.shengMuch>0){
this.tMuch = this.shengMuch;
this.vote = true;
this.dingyues()
}else{
uni.showToast({
title:"票数不足!",
@@ -1416,7 +1484,45 @@ export default {
font-size: 14px;
}
}
.guard-people {
padding: 20rpx;
margin: 0 30rpx 10rpx;
display: flex;
align-items: center;
.left {
font-size: 30rpx;
}
> image {
width: 70rpx;
height: 70rpx;
border-radius: 50%;
}
.right {
border-radius: 22rpx;
margin-left: auto;
width: 256rpx;
height: 90rpx;
box-shadow: 0 0 10rpx #f0f0f0;
display: flex;
align-items: center;
> image {
width: 50rpx;
height: 50rpx;
margin: 0 40rpx 0 20rpx;
}
> view {
.text-top {
color: #333;
font-size: 26rpx;
margin-bottom: 10rpx;
}
.text-bottom {
font-size: 20rpx;
color: rgb(25, 191, 202);
}
}
}
}
.top-notice {
display: flex;
font-size: 24rpx;

BIN
static/share.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/shouhu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB