5 Commits
master ... xbx

Author SHA1 Message Date
d63d4cee1a 修改地址 2020-07-16 10:26:11 +08:00
55a7b3a27f 完成 2020-07-16 10:25:32 +08:00
05f5fedfe5 1 2020-07-14 15:31:38 +08:00
74ea8ab8cc 1 2020-07-14 13:18:26 +08:00
ea09bc38a8 1 2020-07-13 09:30:49 +08:00
16 changed files with 1153 additions and 269 deletions

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

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

40
.vscode/ftp-kr.sync.cache.json vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"ftp://192.168.42.121:14147@xingbangtuan": {
"App.vue": {
"type": "-",
"size": 517,
"lmtime": 0,
"modified": false
},
"components": {},
"main.js": {
"type": "-",
"size": 2126,
"lmtime": 0,
"modified": false
},
"manifest.json": {
"type": "-",
"size": 3595,
"lmtime": 0,
"modified": false
},
"pages": {},
"pages.json": {
"type": "-",
"size": 2105,
"lmtime": 0,
"modified": false
},
"static": {},
"store": {},
"uni.scss": {
"type": "-",
"size": 2311,
"lmtime": 0,
"modified": false
},
"unpackage": {}
},
"$version": 1
}

View File

@@ -237,6 +237,7 @@
color: #999;
font-size: 24rpx;
overflow: hidden;
width: 350rpx;
}
.right{
width: 40rpx;

View File

@@ -241,4 +241,4 @@
.uni-popup__info {
color: #909399;
}
</style>
</style>

View File

@@ -4,7 +4,7 @@
<view class="uni-share-content">
<view class="uni-share-content-box">
<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
<button v-if="item.text == '群或好友'" class="share" open-type="share">
<button v-if="item.text == '群或好友'" class="share" open-type="share" @click.stop="">
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
<view class="uni-share-text">{{item.text}}</view>
</button>
@@ -75,51 +75,51 @@
.uni-popup-share {
background-color: #fff;
z-index: 9999999;
}
.uni-share-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 40px;
}
.uni-share-title-text {
font-size: 14px;
color: #666;
}
.uni-share-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 10px;
}
.uni-share-content-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
}
.uni-share-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 40px;
}
.uni-share-title-text {
font-size: 14px;
color: #666;
}
.uni-share-content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 10px;
}
.uni-share-content-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
width: 360px;
}
justify-content: space-around;
width: 360px;
}
.uni-share-content-box>view{
text-align: center;
}
.uni-share-content-item {
width: 90px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
padding: 10px 0;
align-items: center;
}
}
.uni-share-content-item {
width: 90px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
padding: 10px 0;
align-items: center;
}
.uni-share-content-item button{
padding: 0;
@@ -132,39 +132,39 @@
}
.uni-share-content-item button::after{
display: none;
}
.uni-share-content-item:active {
background-color: #f5f5f5;
}
.uni-share-image {
width: 30px;
height: 30px;
margin: 0 auto;
}
.uni-share-text {
margin-top: 10px;
font-size: 14px;
color: #3B4144;
}
.uni-share-button-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 10px 15px;
}
.uni-share-button {
flex: 1;
border-radius: 50px;
color: #666;
font-size: 16px;
}
.uni-share-button::after {
border-radius: 50px;
}
</style>
.uni-share-content-item:active {
background-color: #f5f5f5;
}
.uni-share-image {
width: 30px;
height: 30px;
margin: 0 auto;
}
.uni-share-text {
margin-top: 10px;
font-size: 14px;
color: #3B4144;
}
.uni-share-button-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
padding: 10px 15px;
}
.uni-share-button {
flex: 1;
border-radius: 50px;
color: #666;
font-size: 16px;
}
.uni-share-button::after {
border-radius: 50px;
}
</style>

View File

@@ -73,4 +73,4 @@ Vue.prototype.request = function(options){
const app = new Vue({
...App
})
app.$mount()
app.$mount()

View File

@@ -1,12 +1,17 @@
{
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"enablePullDownRefresh": true
}
},
},{
"path" : "pages/my/my",
"style" : {
"navigationStyle":"custom"
}
}
,
{
"path" : "pages/support/support",
"style" : {
@@ -15,15 +20,7 @@
"cell": "plugin://contactPlugin/cell"
}
}
}
,
{
"path" : "pages/my/my",
"style" : {
"navigationStyle":"custom"
}
}
,
},
{
"path" : "pages/ad/ad",
"style" : {
@@ -55,7 +52,13 @@
,{
"path" : "pages/card/card",
"style" : {}
}
},
{
"path" : "pages/guard/index",
"style" : {
"navigationBarTitleText":"守护详情"
}
}
],
"globalStyle": {
@@ -83,4 +86,4 @@
}
]
}
}
}

241
pages/guard/index.vue Normal file
View File

@@ -0,0 +1,241 @@
<template>
<view class="view-box">
<image :src="'https://xyb.wlkjwl.cn/'+url" mode="aspectFill"></image>
<view class="guard">
<view class="tips">我要守护你<span>{{ name }}</span></view>
<view class="guard-item" v-for="(item, index) in timeList" :key="index">
<view class="line">
<view class="outer">
<view class="inner"></view>
</view>
</view>
<view class="guard-main">
<view class="time">今天{{ item }}00{{ item+1 }}00</view>
<view class="text" v-if="userlist[parseInt(item)] == undefined">守护{{ name }}这一个小时</view>
<view v-else style="display:flex;flex-warp:warp">
<view class="user" v-for="(u,k) in userlist[item]" :key="k">
<image :src="u.head"></image>
<view class="name">{{ u.nick }}</view>
</view>
</view>
</view>
<view class="guard-brn" @click="guardStar(item)">我要守护</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
url: '',
id: '',
name: '',
timeList: [],
userInfo: {},
userlist:{}
};
},
onLoad(option) {
this.url = option.url;
this.id = option.id;
this.name = option.name;
this.setTimeList();
this.getUserInfo();
this.getshouhuLog()
},
methods: {
getshouhuLog(){
let that = this
this.request({
url:this.path +'/api/xyb/star/shouhuLogByStarId',
data:{
starId:this.id
},
headers:{
"Content-type":"application/x-www-form-urlencoded"
},
success(res){
// console.log(new Date(res.data.data[0].startTime).getHours())
let list= {}
for(let i of res.data.data){
console.log(i)
let time = new Date(i.startTime).getHours()
if(list[time] == undefined){
list[time] = [i.customer]
}else{
list[time].push(i.customer)
}
}
console.log(that.userlist = list)
}
})
},
guardStar(time) {
let startTime, endTime;
const date = new Date();
console.log(time)
startTime = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate() + ' ' + parseInt(time) + ":00:00"
endTime = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate() + ' ' + (parseInt(time)+1) + ":00:00"
// startTime = new Date(startTime).toString()
// endTime = new Date(endTime).toString()
console.log(startTime);
// console.log(new Date(startTime));
let that = this
this.request({
url:this.path + "/api/xyb/star/shouhuLog",
data:{
startTime,
endTime,
starId:this.id
},
success:(res)=>{
if(res.data.code != 0){
uni.showToast({
icon: 'none',
title: res.data.msg,
duration: 2000
});
}else{
uni.showToast({
title: '守护成功',
duration: 2000
});
that.getshouhuLog()
}
}
})
},
setTimeList() {
let timeList = [], hour = new Date().getHours();
console.log(hour);
while (hour < 24) {
timeList.push(hour)
hour++
}
console.log(timeList);
this.timeList = timeList;
},
getUserInfo() {
this.userInfo = uni.getStorageSync('userInfo');
}
}
}
</script>
<style scoped lang="scss">
.view-box {
background-color: #f8f7fc;
min-height: 100vh;
position: relative;
> image {
width: 100%;
height: 360rpx;
overflow: hidden;
}
.guard {
border-radius: 10rpx;
z-index: 9;
position: absolute;
top: 340rpx;
left: 50%;
transform: translate(-50%, 0);
box-sizing: border-box;
background-color: #FFF;
width: 710rpx;
// margin: 0 auto;
padding: 30rpx;
.tips {
font-size: 27rpx;
color: rgb(255,235,68);
margin-bottom: 30rpx;
> span {
color: #000;
}
}
.guard-item {
display: flex;
position: relative;
z-index: 9;
&:not(:last-child) {
.text {
padding-bottom: 80rpx;
color: rgb(156,156,156);
font-size: 22rpx;
}
.user {
padding-bottom: 30rpx;
margin-right: 20rpx;
}
}
.line {
position: absolute;
z-index: 19;
left: -11rpx;
top: 0;
background-color: #FFF;
.outer {
width: 22rpx;
height: 22rpx;
border: 1rpx solid #07a6e0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
.inner {
width: 8rpx;
height: 8rpx;
background-color: #07a6e0;
border-radius: 50%;
}
}
}
.guard-main {
padding-left: 30rpx;
margin-right: 105rpx;
border-left: #07a6e0 dashed 1rpx;
.time {
font-size: 27rpx;
color: rgb(19,160,213);
margin-bottom: 27rpx;
}
.text {
color: rgb(156,156,156);
font-size: 22rpx;
}
.user {
> image {
width: 50rpx;
height: 50rpx;
margin-bottom: 4rpx;
border-radius: 50%;
background-color: #07a6e0;
}
.name {
font-size: 18rpx;
color: rgb(7,7,7);
}
}
}
.guard-brn {
margin-left: auto;
margin-right: 55rpx;
font-size: 27rpx;
background-color: #07a6e0;
color: #FFF;
width: 180rpx;
height: 58rpx;
border-radius: 26rpx;
text-align: center;
line-height: 57rpx;
}
}
}
}
</style>

View File

@@ -92,14 +92,34 @@
<view @tap="hideIsShow" class="show-model-mask">
</view>
</view>
<uniPopup ref="hongbao">
<view class="hongbao">
<image src="/static/106.png"></image>
<view class="title">超级奖励发放</view>
<view class="button" v-if="lingqu" @click="lq">领取</view>
<view v-else>
<view class="text">今天赠送给你的每日权益票</view>
<view class="piao">{{piao}}</view>
</view>
</view>
</uniPopup>
</view>
</template>
<script>
import { mapState,mapMutations } from 'vuex';
import uniCountdown from '@/components/uni-countdown/uni-countdown.vue'
import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
import uniPopupShare from '@/components/uni-popup/uni-popup-share.vue'
import uniPopup from '@/components/uni-popup/uni-popup.vue'
export default {
components:{
uniCountdown
uniCountdown,
uniPopupMessage,
uniPopupDialog,
uniPopupShare,
uniPopup,
},
computed: {
...mapState(['hasLogin','userInfo']),
@@ -129,6 +149,8 @@
isLoad:true,
imgPath:'',
// nRanklist:[]
lingqu:true,
piao: '',
}
},
onLoad() {
@@ -156,6 +178,22 @@
}
},
methods: {
// 领取
lq(){
this.request({
url:this.path + "/api/xyb/star/getMuch",
data:{
typeId: 12,
much: this.piao,
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
this.lingqu = false;
}
}
})
},
...mapMutations(['login']),
getContent(){
uni.getClipboardData({
@@ -175,29 +213,7 @@
title:'奖励抽奖次数+1',
icon:"none"
})
this.request({
url:this.path + "/api/xyb/star/getMuch",
data:{
typeId: 5,
much: 20
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showModal({
title: '恭喜',
content: '领取到来自好友 赠送的20票',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
})
}
}
})
@@ -212,6 +228,7 @@
},
init(type){
this.defaultDataList();
this.judgeShowHong();
//周榜
if(type == 1){
this.rankingZero = 0;
@@ -232,6 +249,19 @@
this.getKeepWeekAndMoth(4)
}
},
judgeShowHong() {
let that = this;
that.request({
url:that.path + "/api/xyb/star/isHaveRedPackgeToday",
method:"GET",
success(res){
if(res.data.data.code == 1) {
that.piao = res.data.data.num;
that.$refs.hongbao.open();
}
}
})
},
getKeepWeekAndMoth(id){
this.request({
url:this.path+'/api/xyb/banner/list',
@@ -818,4 +848,46 @@
z-index: -1;
}
}
</style>
.hongbao{
width: 550rpx;
height: 678rpx;
position: relative;
>image{
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
}
.title{
font-size: 36rpx;
color: #fff;
padding-top: 300rpx;
text-align: center;
}
.button{
width: 100rpx;
height: 100rpx;
background-color: #ED9C00;
border-radius: 50%;
font-size: 34rpx;
color: #333;
text-align: center;
line-height: 100rpx;
margin: 60rpx auto;
}
.text{
font-size: 30rpx;
text-align: center;
color: #fff;
margin-top: 53rpx;
padding: 0 60rpx;
}
.piao{
font-size: 63rpx;
color: #fff;
margin-top: 66rpx;
text-align: center;
}
}
</style>

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="info.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>
@@ -81,6 +81,7 @@ export default {
info:'',
dataList:'',
isLogin:false,
isVIP:false
};
},
onLoad() {
@@ -176,6 +177,16 @@ 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){
that.isVIP = d.rows[6].isHaveVip == "1" ? true : false
}
}
})
},
navToSup(item){
uni.navigateTo({
@@ -418,4 +429,4 @@ export default {
}
</style>
</style>

View File

@@ -39,24 +39,68 @@
</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="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 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> -->
<uni-list-item @click="confirmShare" rightText="立即分享" :showArrow="false" title="分享助力" note="每天最多助力4次,助力成功抽奖次数+1" thumb="/static/supprt/fen.png" />
<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="dingyues" class="dingyue">订阅{{nowStar.name}}排名变化您可以通知{{dingyue}}次哦</view>
<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>
<uniPopup ref="red"></uniPopup>
<uniPopup ref="guard">
<view class="guard-popup">
<view class="title">开启守护权限</view>
<view class="cando">
<view>1获得守护权限</view>
<view>2解锁多个资源每天只能解锁1个</view>
<view>3每天可守护偶像1小时</view>
</view>
<view class="guard-item">
<view v-for="(item, index) in guardList" :key="index" @click="supportRankbuy(2,item.id)">{{ item.name }}</view>
</view>
<view class="close" @click="closeGuard">X</view>
</view>
</uniPopup>
<uniPopup ref="hongbao">
<view class="hongbao">
<image src="/static/106.png"></image>
<view class="title">超级奖励发放</view>
<view class="button" v-if="lingqu" @click="lq">领取</view>
<view v-else>
<view class="text">今天赠送给你的每日权益票</view>
<view class="piao">{{piao}}</view>
</view>
</view>
</uniPopup>
<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>
</view>
<view class="ad-view">
<ad unit-id="adunit-f6387bd5404467fd" ad-type="video" ad-theme="white"></ad>
@@ -138,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>
@@ -148,6 +195,7 @@ import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
import uniPopupShare from '@/components/uni-popup/uni-popup-share.vue'
import uniPopup from '@/components/uni-popup/uni-popup.vue'
let rewardedVideoAd = null;
import { mapState,mapMutations } from 'vuex';
export default {
@@ -157,7 +205,8 @@ export default {
uniListItem,
uniPopupMessage,
uniPopupDialog,
uniPopupShare
uniPopupShare,
uniPopup,
},
data() {
return {
@@ -186,20 +235,40 @@ export default {
cid:'',
time:'',
yaoQingMa:'',
argeList:[
{name:"+66票",number:66,text:"冲榜",rmb:2},
{name:"+330票",number:330,text:"冲榜",rmb:10},
{name:"+1800票",number:1800,text:"冲榜",rmb:50},
{name:"+3344票",number:3344,text:"冲榜",rmb:88},
{name:"+7788票",number:7788,text:"冲榜",rmb:188},
{name:"+13140票",number:13140,text:"冲榜",rmb:288},
{name:"+24000票",number:24000,text:"冲榜",rmb:520},
{name:"+42000票",number:42000,text:"获取",rmb:888},
{name:"+66666票",number:66666,text:"冲榜",rmb:1314},
]
argeLength: 0,
newArgeList: [],
guardList: [],
lingqu:true,
piao:500,
isVIP: false,
guardPeople: [],
guardStatus: '', // 等于一的时候,让他们展示,等于零的时候不展示
isGuard: ''
};
},
onLoad(opt) {
// uni.showModal({
// title: '恭喜',
// content: opt.cid + "1",
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// })
console.log(opt)
wx.showShareMenu({
withShareTicket:true,
menus:['shareAppMessage','shareTimeline']
})
this.supportRank()
this.getgoodsVip()
if(this.hasLogin){
this.id = opt.id;
this.getStarInfo();
@@ -227,19 +296,235 @@ export default {
imgSrc = 'https://xyb.wlkjwl.cn/'+this.nowStar.head
}
if(userInfo.token){
return {
title:`${this.nowStar.name}一起来打榜`,
path:"/pages/support/support?cid="+userInfo.token+'&id='+this.id,
imageUrl:imgSrc
}
}
},
onShareTimeline(){
let userInfo = uni.getStorageSync('userInfo') || '';
let imgSrc = '';
if(this.nowStar.photo){
imgSrc = 'https://xyb.wlkjwl.cn/'+this.nowStar.photo
}else{
imgSrc = 'https://xyb.wlkjwl.cn/'+this.nowStar.head
}
if(userInfo.token){
console.log("朋友圈分享")
return {
title:`${this.nowStar.name}一起来打榜`,
query:"cid="+userInfo.token+'&id='+this.id,
imageUrl:imgSrc
}
}
},
onShow() {
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({
url:this.path + "/api/xyb/star/getMuch",
data:{
typeId: 12,
much: this.piao,
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
this.lingqu = false;
// uni.showModal({
// title: '恭喜',
// content: '领取到来自好友 赠送的20票',
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
}
}
})
},
// vip商品获取
getgoodsVip(){
let that = this
this.request({
url: this.path + "/api/xyb/star/goodsVip",
success(res){
console.log(res)
that.guardList = res.data.data
console.log(that.guardList)
}
})
},
// vip 冲榜下单
supportRankbuy(type,id,num){
let that = this
uni.getSystemInfo({
success(res){
if(res.platform == 'ios'){
uni.showModal({
title: '提示',
content: 'ios暂不支持',
showCancel: false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}else{
that.request({
url: that.path + '/api/xyb/star/orderProgramCreate',
method:"POSt",
headers:{
"Content-type":"application/x-www-form-urlencoded"
},
data:{
type: type,
goodsId: id,
starId: that.id,
},
success: res => {
console.log(res)
// 创建新数组循环
let {nonceStr,timeStamp,signType,paySign} = res.data
wx.requestPayment({
nonceStr,timeStamp,signType,paySign,package:res.data.package,
success(res){
if(type == 1){
uni.showModal({
title: '打榜成功',
content: `已经成功为${that.nowStar.name}冲榜${num}`,
showCancel: false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}else{
that.request({
url:that.path + "/api/xyb/star/isHaveRedPackgeToday",
method:"GET",
success(res){
console.log(res)
this.piao = res.data.data.num;
}
})
that.$refs.guard.close();
that.$refs.hongbao.open()
}
},
fail(err){
console.log(err,"支付失败")
}
})
}
})
}
}
})
},
// 获取冲榜列表
supportRank() {
this.request({
url: this.path + '/api/xyb/star/goodsChongbang',
success: res => {
console.log(res)
// 创建新数组循环
for (let index = 0; index < res.data.data.length; index+=3) {
const element = res.data.data.slice(index, index + 3);
this.newArgeList.push(element);
}
console.log(this.newArgeList)
}
})
},
toGuard() {
console.log(this.isVIP)
if(this.isVIP){
uni.navigateTo({
url: '/pages/guard/index?url=' + this.nowStar.head + '&id=' + this.nowStar.id + '&name=' + this.nowStar.name
})
}else{
this.showGuard()
}
},
showGuard() {
if(this.isVIP){
return ;
}
this.$refs.guard.open();
},
closeGuard() {
this.$refs.guard.close();
},
...mapMutations(['login']),
init(){
this.getStarInfo();
@@ -251,25 +536,46 @@ export default {
this.$refs.popupShare.open()
},
select(e, done) {
uni.showModal({
title: '分享到群或者好友',
content: `将邀请码 ${this.yaoQingMa} 发送到群或者好友,如果有人复制你的邀请码并且进入明星权力榜小程序,那么你和他都将获得次数奖励!`,
success: (res)=> {
if (res.confirm) {
console.log('用户点击确定');
uni.setClipboardData({
data: '复制我的邀请码'+this.yaoQingMa+'进入明星权力榜您可获得20票为偶像 '+this.nowStar.name+' 提升排名!目前 '+this.nowStar.name+' 已获得 '+this.nowStar.much+' 次支持,排名第'+this.nowStar.rankIngNum,
success: function () {
console.log('success');
}
});
// 复制我的邀请码 qbb99631进入星榜团APP您可获得10票为偶像许佳琪提升排名目前许佳琪已获得50210次支持排名第27
let that = this;
uni.getSystemInfo({
success(res){
// 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();
// }
}
})
// uni.showModal({
// title: '分享到群或者好友',
// content: `将邀请码 ${this.yaoQingMa} 发送到群或者好友,如果有人复制你的邀请码并且进入明星权力榜小程序,那么你和他都将获得次数奖励!`,
// success: (res)=> {
// if (res.confirm) {
// console.log('用户点击确定');
// uni.setClipboardData({
// data: '复制我的邀请码'+this.yaoQingMa+'进入明星权力榜您可获得20票为偶像 '+this.nowStar.name+' 提升排名!目前 '+this.nowStar.name+' 已获得 '+this.nowStar.much+' 次支持,排名第'+this.nowStar.rankIngNum,
// success: function () {
// console.log('success');
// }
// });
// // 复制我的邀请码 qbb99631进入星榜团APP您可获得10票为偶像许佳琪提升排名目前许佳琪已获得50210次支持排名第27
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
// uni.showToast({
// title: `您选择了第${e.index+1}项:${e.item.text}`,
// icon: 'none'
@@ -279,27 +585,58 @@ export default {
change(e) {
console.log('popup ' + e.type + ' 状态', e.show)
},
dingyues(){
dingyues(e){
let that = this;
console.log(e)
// sendTongzhiMessage
// that.request({
// url:that.path+'/api/xyb/wechat/sendTongzhiMessage',
// data:{
// openid:that.userInfo.token,
// starName:"lalala",
// fromid:e.detail.formId
// },
// success:(res)=>{
// let d = res.data;
// if(d.code == 0){
// uni.showToast({
// title:'订阅成功!',
// icon:'none',
// success() {
// that.getUserInfo();
// }
// })
// }
// }
// })
uni.requestSubscribeMessage({
tmplIds: ['3zrZxU3CYZYLWw3fGObzfw13jHbXYXUUQRTlJpvpPuw'],
success (res) {
console.log(res)
that.request({
url:that.path+'/api/xyb/star/customerInfoAddDingyue',
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showToast({
title:'订阅成功!',
icon:'none',
success() {
that.getUserInfo();
}
})
}
}
})
if(res["3zrZxU3CYZYLWw3fGObzfw13jHbXYXUUQRTlJpvpPuw"] == "accept"){
that.request({
url:that.path+'/api/xyb/star/customerInfoAddDingyue',
data:{
starId:that.id
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
uni.showToast({
title:'订阅成功!',
icon:'none',
success() {
that.getUserInfo();
}
})
}
}
})
}
},
fail(err){
console.log(err)
}
})
},
@@ -348,43 +685,79 @@ export default {
}
},
updateRequest(cid){
// uni.showModal({
// title: '恭喜',
// content: 'cid',
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// })
// this.request({
// url:this.path+'/api/xyb/star/customerInfoUpdate',
// data:{
// customerId:cid,
// type:1,
// },
// success:(res)=>{
// let d = res.data;
// if(d.code == 0){
// console.log("助力成功")
// // this.getUserInfo();
// }
// }
// })
this.request({
url:this.path+'/api/xyb/star/customerInfoUpdate',
data:{
customerId:cid,
type:1,
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
console.log("助力成功")
// this.getUserInfo();
}
}
})
this.request({
url:this.path + "/api/xyb/star/getMuch",
url: this.path + "/api/xyb/star/getMuch",
data:{
typeId: 5,
much: 20
openid: cid,
much:10
},
success:(res)=>{
let d = res.data;
if(d.code == 0){
success(res){
if(res.data.code == 0){
uni.showModal({
title: '恭喜',
content: '领取到来自好友 赠送的20票',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
title: '恭喜',
content: '获得好友分享的10张票',
showCancel: false,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
}
})
// this.request({
// url:this.path + "/api/xyb/star/getMuch",
// data:{
// typeId: 5,
// much: 20
// },
// success:(res)=>{
// let d = res.data;
// if(d.code == 0){
// uni.showModal({
// title: '恭喜',
// content: '领取到来自好友 赠送的20票',
// success: function (res) {
// if (res.confirm) {
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
// }
// }
// })
},
wxGetUserInfo(){
//api/xyb/wechat/wxLogin
@@ -449,6 +822,8 @@ export default {
if(d.code == 0){
this.aList = d.data.list;
this.time = this.changeTimeList(d.data.timeDiff/1000)
// if(d.data.timeDiff > 0) this.isVIP = true;
// else this.isVIP = false;
}
}
})
@@ -484,6 +859,7 @@ export default {
if(this.shengMuch>0){
this.tMuch = this.shengMuch;
this.vote = true;
this.dingyues()
}else{
uni.showToast({
title:"票数不足!",
@@ -586,6 +962,7 @@ export default {
if(d.code == 0){
this.sign = d.rows[1];
this.dataList.rightText = this.sign.wayName;
this.isVIP = d.rows[6].isHaveVip == 1 ? true : false
}
}
})
@@ -665,13 +1042,55 @@ export default {
uni.navigateTo({
url:'/pages/help/help?id='+item.id+'&starId='+this.nowStar.id
})
}
},
}
};
</script>
<style scoped lang="scss">
.hongbao{
width: 550rpx;
height: 678rpx;
position: relative;
>image{
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
}
.title{
font-size: 36rpx;
color: #fff;
padding-top: 300rpx;
text-align: center;
}
.button{
width: 100rpx;
height: 100rpx;
background-color: #ED9C00;
border-radius: 50%;
font-size: 34rpx;
color: #333;
text-align: center;
line-height: 100rpx;
margin: 60rpx auto;
}
.text{
font-size: 30rpx;
text-align: center;
color: #fff;
margin-top: 53rpx;
padding: 0 60rpx;
}
.piao{
font-size: 63rpx;
color: #fff;
margin-top: 66rpx;
text-align: center;
}
}
.vote-model{
position: fixed;
top: 0;
@@ -942,83 +1361,83 @@ export default {
margin-left: 20rpx;
}
}
.bg-red {
background-color: #e54d42;
color: #ffffff;
.bg-red {
background-color: #e54d42;
color: #ffffff;
}
.bg-blue{
background-color: #4CD964;
color: #FFFFFF;
}
.cu-progress {
overflow: hidden;
height: 28upx;
background-color: #ebeef5;
display: inline-flex;
align-items: center;
.cu-progress {
overflow: hidden;
height: 28upx;
background-color: #ebeef5;
display: inline-flex;
align-items: center;
width: 100%;
position: relative;
.text{
position: absolute;
top: 0;
left: 0;
}
}
.cu-progress+view,
.cu-progress+text {
line-height: 1;
}
.cu-progress.xs {
height: 10upx;
}
.cu-progress.sm {
height: 20upx;
}
.cu-progress view {
height: 100%;
align-items: center;
display: flex;
justify-items: flex-end;
justify-content: space-around;
font-size: 20upx;
color: #ffffff;
transition: width 0.6s ease;
}
.cu-progress text {
align-items: center;
display: flex;
font-size: 20upx;
color: #333333;
text-indent: 10upx;
}
.cu-progress.text-progress {
padding-right: 60upx;
}
.cu-progress.striped view {
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 72upx 72upx;
}
.cu-progress.active view {
animation: progress-stripes 2s linear infinite;
}
@keyframes progress-stripes {
from {
background-position: 72upx 0;
}
to {
background-position: 0 0;
}
}
}
.cu-progress+view,
.cu-progress+text {
line-height: 1;
}
.cu-progress.xs {
height: 10upx;
}
.cu-progress.sm {
height: 20upx;
}
.cu-progress view {
height: 100%;
align-items: center;
display: flex;
justify-items: flex-end;
justify-content: space-around;
font-size: 20upx;
color: #ffffff;
transition: width 0.6s ease;
}
.cu-progress text {
align-items: center;
display: flex;
font-size: 20upx;
color: #333333;
text-indent: 10upx;
}
.cu-progress.text-progress {
padding-right: 60upx;
}
.cu-progress.striped view {
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 72upx 72upx;
}
.cu-progress.active view {
animation: progress-stripes 2s linear infinite;
}
@keyframes progress-stripes {
from {
background-position: 72upx 0;
}
to {
background-position: 0 0;
}
}
.content {
.ad-view{
@@ -1065,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;
@@ -1123,5 +1580,64 @@ export default {
}
}
}
.support-rank {
margin: 30rpx;
.rank-row {
display: flex;
background-color: rgb(248,248,248);
margin-bottom: 24rpx;
justify-content: space-around;
> view {
box-sizing: border-box;
color: #249bc5;
font-size: 25rpx;
padding-top: 18rpx;
text-align: center;
width: 196rpx;
height: 121rpx;
background: url("/static/supprt/rank.png") center center/100% 100% no-repeat;
}
}
}
}
</style>
.guard-popup {
background-color: #FFFFFF;
box-sizing: border-box;
width: 650rpx;
padding: 50rpx 30rpx 100rpx;
position: relative;
.title {
text-align: center;
font-size: 40rpx;
color: #07a6e0;
margin-bottom: 50rpx;
}
.cando {
font-size: 33rpx;
color: #646464;
> view {
margin: 0 15rpx 30rpx;
}
}
.guard-item {
font-size: 30rpx;
> view {
width: 580rpx;
height: 108rpx;
text-align: center;
line-height: 108rpx;
border: 2rpx solid #f59ccc;
color: #FFFFFF;
margin-bottom: 16rpx;
background-color: rgb(7,166,224);
}
}
.close {
position: absolute;
right: 30rpx;
top: 30rpx;
font-size: 40rpx;
color: #000;
}
}
</style>

BIN
static/106.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

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

BIN
static/supprt/guard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
static/supprt/rank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB