更改随机名字
This commit is contained in:
@@ -298,7 +298,7 @@
|
||||
this.getMyMoney()
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/bind'
|
||||
url: '/pages/ghtwwlkXYG/MFkHiQghje'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -319,7 +319,7 @@
|
||||
this.getMyMoney()
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/bind'
|
||||
url: '/pages/ghtwwlkXYG/MFkHiQghje'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -98,11 +98,11 @@
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/course/courseDet?id=' + e
|
||||
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
815
me/assistance/assistance.vue
Normal file
815
me/assistance/assistance.vue
Normal file
@@ -0,0 +1,815 @@
|
||||
<template>
|
||||
<view class="assist">
|
||||
<!-- 背景图片 -->
|
||||
<image src="../static/assist/zlBg.png" class="bg" mode="widthFix"></image>
|
||||
<!-- 内容 -->
|
||||
<view class="content">
|
||||
<!-- #ifdef H5 -->
|
||||
<image v-if="isBack" src="/static/images/index/left.png" class="left_viewimage" @tap="goBack"></image>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 标题 -->
|
||||
<view class="content-title">
|
||||
邀好友助力
|
||||
</view>
|
||||
<!-- 副标题 -->
|
||||
<view class="content-titles">
|
||||
免费领会员
|
||||
</view>
|
||||
<!-- 邀请好友展示框 -->
|
||||
<view class="content-hy flex align-center justify-center">
|
||||
<view class="content-hy-box">
|
||||
<view class="content-hy-box-title1" v-if="rlueList[rlueIndex] && rlueList[rlueIndex].inviteMonth>0">
|
||||
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可再得{{rlueList[rlueIndex].inviteMonth}}个月会员
|
||||
</view>
|
||||
<view class="content-hy-box-title1" v-else>
|
||||
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可升级永久免费无限会员
|
||||
</view>
|
||||
<view class="" v-for="(item,index) in rlueList" :key="index">
|
||||
<view v-if="index>rlueIndex" class="content-hy-box-title2">
|
||||
<block v-if="item.inviteMonth>0">
|
||||
再邀请{{item.inviteCount - nowPeopNum}}位好友,可再得{{item.inviteMonth}}个月会员
|
||||
</block>
|
||||
<block v-else>
|
||||
再邀请{{item.inviteCount - nowPeopNum}}位好友,可升级永久免费无限会员
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-hy-box-peop">
|
||||
<view class="content-hy-box-peop-my flex align-center justify-center">
|
||||
<image :src="avatar?avatar:'../../static/images/logo.png'" mode=""></image>
|
||||
</view>
|
||||
<view class="content-hy-box-peop-title">
|
||||
您已注册成功,还需邀请
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list flex align-center justify-between flex-wrap">
|
||||
<view class="content-hy-box-peop-list-i flex align-center justify-center"
|
||||
v-for="(item,index) in getPeopNum" :key="index">
|
||||
<block v-if="getPeopList[index]">
|
||||
<view class="content-hy-box-peop-list-ia flex align-center justify-center"
|
||||
style="border: none;">
|
||||
<image style="width: 100%;height: 100%;border-radius: 50%;"
|
||||
:src="getPeopList[index].avatar?getPeopList[index].avatar:'../../static/images/logo.png'"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list-it flex align-center justify-center">
|
||||
{{getPeopList[index].userName}}
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view @click="onSaveImg()"
|
||||
class="content-hy-box-peop-list-ia flex align-center justify-center">
|
||||
<u-icon name="plus" color="#ffffff" size="28"></u-icon>
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list-it flex align-center justify-center">
|
||||
待助力
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
<view class="content-hy-box-peop-list-i flex align-center justify-center"
|
||||
style="height: 0;">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="getPeopList.length>0">
|
||||
<!-- 进度条 -->
|
||||
<view class="content-hy-box-schedule">
|
||||
<u-line-progress height="16" inactive-color="#f5e0b0" active-color="#edb840"
|
||||
:show-percent="false" :percent="getMathNum()" :round="true"></u-line-progress>
|
||||
</view>
|
||||
<view class="content-hy-box-schedulet">
|
||||
距离领取会员仅差<span>{{getUserPeopNum}}</span>位好友
|
||||
</view>
|
||||
<view class="content-hy-box-peops">
|
||||
<swiper class="content-hy-box-peopss" next-margin="80px" :circular="true"
|
||||
:indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
|
||||
<swiper-item class="content-hy-box-peopssi" v-for="(item,index) in getPeopList"
|
||||
:key="index">
|
||||
<view class="content-hy-box-peopssis flex align-center">
|
||||
<image :src="item.avatar?item.avatar:'../../static/images/logo.png'" mode="">
|
||||
</image>
|
||||
<view class="content-hy-box-peopssit">
|
||||
{{item.userName}}已为您助力
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 助力按钮 -->
|
||||
<!-- #ifndef MP-KUAISHOU -->
|
||||
<view class="content-btn flex align-center justify-center" @click="onSaveImg()">
|
||||
{{getPeopList.length==0?'开始助力':'继续助力'}}
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-KUAISHOU -->
|
||||
<view class="content-btn flex align-center justify-center">
|
||||
<u-button open-type="share" :custom-style="customStyle" :hair-line="false"
|
||||
style="width: 100%;height: 100%;" shape="circle"
|
||||
:ripple="true">{{getPeopList.length==0?'开始助力':'继续助力'}}</u-button>
|
||||
</view>
|
||||
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 活动流程 -->
|
||||
<view class="content-lc">
|
||||
<view class="content-lc-title flex align-center justify-center">
|
||||
活动流程
|
||||
</view>
|
||||
<view class="content-lc-ls flex justify-between">
|
||||
<view class="content-lc-ls-i">
|
||||
<image src="../static/assist/as1.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
点击发起助力
|
||||
</view>
|
||||
</view>
|
||||
<image class="content-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="content-lc-ls-i">
|
||||
<image src="../static/assist/as2.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
邀请对应数量好友
|
||||
</view>
|
||||
</view>
|
||||
<image class="content-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="content-lc-ls-i">
|
||||
<image src="../static/assist/as3.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
每位好友注册成功
|
||||
</view>
|
||||
</view>
|
||||
<image class="content-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
|
||||
<view class="content-lc-ls-i">
|
||||
<image src="../static/assist/as4.png" mode=""></image>
|
||||
<view class="content-lc-ls-it">
|
||||
领取对应时间会员
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 活动规则 -->
|
||||
<view class="content-rule">
|
||||
<view class="content-rule-title flex align-center justify-center">
|
||||
活动规则
|
||||
</view>
|
||||
<view class="content-rule-list">
|
||||
<view class="content-rule-list-i flex align-center" v-for="(item,index) in rlueList" :key="index">
|
||||
<image :src="item.inviteImg" mode=""></image>
|
||||
<view class="content-rule-list-i-r">
|
||||
<view class="content-rule-list-i-r-t" v-if="item.inviteMonth>0">
|
||||
领取{{item.inviteMonth}}个月会员
|
||||
</view>
|
||||
<view class="content-rule-list-i-r-t" v-else>
|
||||
领取永久会员
|
||||
</view>
|
||||
<view class="content-rule-list-i-r-b" v-if="item.inviteMonth>0">
|
||||
邀请{{item.inviteCount}}位好友,您可以免费{{item.inviteMonth}}个月无限看短剧。
|
||||
</view>
|
||||
<view class="content-rule-list-i-r-b" v-else>
|
||||
邀请{{item.inviteCount}}位好友,您可以永久免费无限看短剧。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <image src="../../static/images/logo.png" mode=""></image> -->
|
||||
|
||||
<tki-qrcode ref="qrcode" :val="erweima" :size="100" background="#ffffff" foreground="#000000" pdground="#000000"
|
||||
:onval="true" :loadMake="true" @result="qrR" :show="false"></tki-qrcode>
|
||||
|
||||
<view class="cu-modal" :class="modalName == 'Image' ? 'show' : ''" @tap="hideModal">
|
||||
<view class="cu-dialog" v-if="bgImg && erweimapath && haibaoShow" @tap="hideModal">
|
||||
<view class="bg-img">
|
||||
<wm-poster @success="posterSuccess" @successH5="successH5" :imgSrc="bgImg"
|
||||
:Referrer="'我的邀请码:'+invitationCode" :QrSrc="erweimapath" :LineType="false"></wm-poster>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tkiQrcode from '../../components/tki-qrcode/tki-qrcode.vue';
|
||||
import wmPoster from '../components/wm-poster/wm-posterordershd.vue';
|
||||
import config from '../../common/config.js'
|
||||
export default {
|
||||
components: {
|
||||
tkiQrcode,
|
||||
wmPoster
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
customStyle: {
|
||||
width: '100%',
|
||||
height: '98rpx',
|
||||
border: 'none',
|
||||
background: 'transparent',
|
||||
color: '#ffffff',
|
||||
fontSize: '12px',
|
||||
fontWeight: '500',
|
||||
|
||||
// padding: '24px 20px',
|
||||
},
|
||||
avatar: '',
|
||||
inviteAwardId: '', //等级id
|
||||
rlueList: [], //规则列表
|
||||
getPeopNum: 0, //当前需要邀请的人数
|
||||
getUserPeopNum: 0, //还需要邀请的人数
|
||||
rlueIndex: 0, //当前等级对应的下标
|
||||
nowPeopNum: 0, //已经邀请的人数
|
||||
getPeopList: [], //已经邀请的人列表
|
||||
userName: '', //用户名称
|
||||
avatar: '', //用户头像
|
||||
erweima: '',
|
||||
modalName: '',
|
||||
bgImg: '',
|
||||
erweimapath: '',
|
||||
haibaoShow: false,
|
||||
invitationCode: 0,
|
||||
erweimapath: '',
|
||||
haibaoImgH5: '',
|
||||
qdCode: '', //渠道码
|
||||
isBack: false,
|
||||
bgImgs: '',
|
||||
tuiguang: '',
|
||||
}
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
|
||||
.qdCode, //这是为了传参 onload(data){let id=data.id;}
|
||||
title: this.tuiguang,
|
||||
imageUrl: this.bgImgs
|
||||
}
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
return {
|
||||
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
|
||||
.qdCode, //这是为了传参 onload(data){let id=data.id;}
|
||||
title: this.tuiguang,
|
||||
imageUrl: this.bgImgs
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') !== -1) {
|
||||
this.isBack = false
|
||||
} else {
|
||||
this.isBack = true
|
||||
}
|
||||
// #endif
|
||||
|
||||
if (uni.getStorageSync('qdCode')) {
|
||||
this.qdCode = uni.getStorageSync('qdCode')
|
||||
}
|
||||
this.getBgImg()
|
||||
this.invitationCode = uni.getStorageSync('invitationCode')
|
||||
// h5携带邀请码去首页
|
||||
// #ifdef H5
|
||||
this.erweima = config.APIHOST2 + '/?invitation=' + this
|
||||
.invitationCode + '&qdCode=' + this.qdCode
|
||||
// #endif
|
||||
// app直接去app注册页面
|
||||
// #ifdef APP
|
||||
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + this
|
||||
.invitationCode + '&qdCode=' + this.qdCode
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
this.getWxEq()
|
||||
// #endif
|
||||
// #ifdef MP-TOUTIAO
|
||||
this.getTouTiao()
|
||||
// #endif
|
||||
this.getUserInfo()
|
||||
this.getActivity()
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
//获取头条二维码
|
||||
getTouTiao() {
|
||||
let that = this
|
||||
uni.downloadFile({
|
||||
url: config.APIHOST +
|
||||
'/app/invite/dyCreateQr?invitationCode=' + that
|
||||
.invitationCode + ',' + that.qdCode + '&page=/pages/index/index',
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
if (res.statusCode === 200) {
|
||||
that.erweimapath = res.tempFilePath
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '海报制作失败,图片下载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '海报制作失败,图片下载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取微信二维码
|
||||
getWxEq() {
|
||||
let that = this
|
||||
uni.downloadFile({
|
||||
url: config.APIHOST +
|
||||
'/app/invite/mpCreateQr?invitationCode=' + that
|
||||
.invitationCode + ',' + that.qdCode,
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
if (res.statusCode === 200) {
|
||||
that.erweimapath = res.tempFilePath
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '海报制作失败,图片下载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '海报制作失败,图片下载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取背景图
|
||||
getBgImg() {
|
||||
this.$Request.get('/app/common/type/812').then(res => {
|
||||
if (res.code == 0 && res.data.value) {
|
||||
this.bgImg = res.data.value
|
||||
}
|
||||
})
|
||||
this.$u.get('app/banner/selectBannerList?classify=5').then(res => {
|
||||
if (res.code == 0) {
|
||||
this.bgImgs = res.data[0].imageUrl
|
||||
this.tuiguang = res.data[0].describes
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
showModal() {
|
||||
console.log(this.erweima, '二维码地址')
|
||||
// #ifndef H5
|
||||
if (!this.haibaoImg) {
|
||||
this.haibaoShow = true;
|
||||
uni.showLoading({
|
||||
title: '海报生成中'
|
||||
});
|
||||
} else {
|
||||
this.modalName = 'Image';
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') !== -1) {
|
||||
//微信浏览器
|
||||
if (!this.haibaoImg) {
|
||||
this.haibaoShow = true;
|
||||
uni.showLoading({
|
||||
title: '海报生成中'
|
||||
});
|
||||
} else {
|
||||
this.modalName = 'Image';
|
||||
}
|
||||
} else {
|
||||
if (!this.haibaoImgH5) {
|
||||
this.haibaoShow = true;
|
||||
uni.showLoading({
|
||||
title: '海报生成中'
|
||||
});
|
||||
} else {
|
||||
uni.previewImage({
|
||||
urls: [this.haibaoImgH5],
|
||||
current: 1,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onSaveImg() {
|
||||
this.showModal();
|
||||
},
|
||||
posterSuccess(haibaoImg) {
|
||||
this.haibaoImg = haibaoImg;
|
||||
this.modalName = 'Image';
|
||||
uni.hideLoading();
|
||||
},
|
||||
successH5(haibaoImg) {
|
||||
this.haibaoImgH5 = haibaoImg
|
||||
uni.previewImage({
|
||||
urls: [haibaoImg],
|
||||
current: 1,
|
||||
})
|
||||
},
|
||||
hideModal() {
|
||||
this.modalName = null;
|
||||
},
|
||||
qrR(path) {
|
||||
console.log(path, '二维码回调地址')
|
||||
this.erweimapath = path;
|
||||
},
|
||||
//计算百分比
|
||||
getMathNum() {
|
||||
return (this.getPeopList.length / this.getPeopNum).toFixed(2) * 100
|
||||
},
|
||||
//获取登录用户信息
|
||||
getUserInfo() {
|
||||
this.$u.api.userinfo().then(res => {
|
||||
if (res.code == 0) {
|
||||
this.userName = res.data.userName;
|
||||
this.avatar = res.data.avatar;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取活动等级
|
||||
getActivity() {
|
||||
this.$Request.getT('/app/invite/selectInviteAwardByUserId').then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.inviteAwardId = res.data.inviteAwardId
|
||||
this.getPeopNum = res.data.inviteCount
|
||||
this.getActivityrule()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取活动规则列表
|
||||
getActivityrule() {
|
||||
this.$Request.getT('/app/invite/selectInviteAwardList', {
|
||||
page: 1,
|
||||
limit: 100
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.rlueList = res.data.records
|
||||
this.rlueIndex = this.rlueList.findIndex(item => item.inviteAwardId === this
|
||||
.inviteAwardId)
|
||||
this.getActivityList()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取邀请人列表
|
||||
getActivityList() {
|
||||
this.$Request.getT('/app/invite/selectInviteUserListByUserId').then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.nowPeopNum = res.data.length
|
||||
|
||||
this.getPeopList = res.data
|
||||
this.getUserPeopNum = Number(this.getPeopNum) - Number(res.data.length)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.assist {
|
||||
background-color: #F22947;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f8cfc3;
|
||||
}
|
||||
|
||||
.left_viewimage {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
top: 60rpx;
|
||||
left: 40rpx;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.bg {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.content-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 78rpx;
|
||||
font-weight: bold;
|
||||
color: #FFF4E4;
|
||||
text-shadow: 0rpx 6rpx 9rpx rgba(118, 4, 17, 0.26);
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.content-titles {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 100rpx;
|
||||
font-weight: bold;
|
||||
color: #FFF4E4;
|
||||
text-shadow: 0rpx 6rpx 9rpx rgba(118, 4, 17, 0.26);
|
||||
}
|
||||
|
||||
.content-hy {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.content-hy-box {
|
||||
padding: 40rpx 0;
|
||||
width: 615rpx;
|
||||
height: 100%;
|
||||
background: linear-gradient(0deg, #FBEDCC 0%, #FFF7F0 98%);
|
||||
border-radius: 48rpx 48rpx 24rpx 24rpx;
|
||||
|
||||
.content-hy-box-title1 {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: #F22947;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
|
||||
span {
|
||||
font-size: 54rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-hy-box-title2 {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 16rpx;
|
||||
color: #F22947;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peop {
|
||||
width: 550rpx;
|
||||
height: auto;
|
||||
background: linear-gradient(45deg, #f27e8c 0%, #fa3653 100%);
|
||||
border-radius: 24rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 20rpx;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-my {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
|
||||
image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.content-hy-box-peop-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-list {
|
||||
width: calc(100% - 60rpx);
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-list-i {
|
||||
width: 32%;
|
||||
flex-direction: column;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
.content-hy-box-peop-list-ia {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
border: 1px dashed #ffffff;
|
||||
}
|
||||
|
||||
.content-hy-box-peop-list-it {
|
||||
color: #ffffff;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-hy-box-schedule {
|
||||
width: 550rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-schedulet {
|
||||
width: 550rpx;
|
||||
margin: 0 auto;
|
||||
font-size: 22rpx;
|
||||
|
||||
span {
|
||||
color: #F22A48;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content-hy-box-peops {
|
||||
width: 550rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 26rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.content-hy-box-peopss {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.content-hy-box-peopssi {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.content-hy-box-peopssis {
|
||||
width: 90%;
|
||||
// width: 300rpx;
|
||||
height: 100%;
|
||||
background-color: green;
|
||||
padding: 0 10rpx;
|
||||
background: linear-gradient(-90deg, #FCE9A4 0%, #FDFBD4 100%);
|
||||
border-radius: 25rpx;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.content-hy-box-peopssit {
|
||||
width: 80%;
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-btn {
|
||||
width: 666rpx;
|
||||
height: 98rpx;
|
||||
background: linear-gradient(-90deg, #F22C49 0%, #FF7989 100%);
|
||||
border: 1px solid #FFD4CF;
|
||||
border-radius: 49rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-lc {
|
||||
width: 666rpx;
|
||||
height: 344rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.content-lc-title {
|
||||
width: 434rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #FF969B 0%, #FF345B 100%);
|
||||
border-radius: 0rpx 0rpx 50rpx 50rpx;
|
||||
margin: 0 auto;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-lc-ls {
|
||||
width: calc(100% - 40rpx);
|
||||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.content-lc-ls-ir {
|
||||
width: 26rpx;
|
||||
height: 16rpx;
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.content-lc-ls-i {
|
||||
width: 100rpx;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.content-lc-ls-it {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #9C2A2A;
|
||||
font-weight: bold;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-rule {
|
||||
width: 666rpx;
|
||||
height: auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.content-rule-title {
|
||||
width: 434rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #FF969B 0%, #FF345B 100%);
|
||||
border-radius: 0rpx 0rpx 50rpx 50rpx;
|
||||
margin: 0 auto;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-rule-list {
|
||||
width: 626rpx;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.content-rule-list-i {
|
||||
padding: 18rpx 12rpx;
|
||||
background-color: #FFF8E6;
|
||||
border-radius: 14rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
image {
|
||||
width: 106rpx;
|
||||
height: 82rpx;
|
||||
}
|
||||
|
||||
.content-rule-list-i-r {
|
||||
margin-left: 18rpx;
|
||||
|
||||
.content-rule-list-i-r-t {
|
||||
color: #9C2A2A;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content-rule-list-i-r-b {
|
||||
font-size: 24rpx;
|
||||
color: #9C2A2A;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
265
me/balance/index.vue
Normal file
265
me/balance/index.vue
Normal file
@@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="jf flex align-center justify-between">
|
||||
<view class="jf-l">
|
||||
<view class="jf-l-t">
|
||||
当前余额
|
||||
</view>
|
||||
<view class="jf-l-b">
|
||||
{{amount || '0.00'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="jf-r" @click="withdraw()">
|
||||
提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="listTitle flex align-center">
|
||||
<u-icon name="order" color="#2e2f33" size="50"></u-icon>
|
||||
<text>
|
||||
余额明细
|
||||
</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<scroll-view @scrollToLower="scrollToLower" :refresher-enabled="refresherTriggered"
|
||||
@scrollToUpper="scrollToUpper" scroll-y="true"
|
||||
style="width: 100%;height: 100%;background-color: #ffffff;padding-bottom: 30rpx;">
|
||||
<view class="list-item flex align-center justify-center" v-for="(item,index) in list" :key="index">
|
||||
<view class="list-item-box flex align-center justify-between">
|
||||
<view class="list-item-box-l">
|
||||
<view class="list-item-box-l-t">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="list-item-box-l-b">
|
||||
{{item.createTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item-box-r" v-if="item.type == 1">
|
||||
+{{item.num}}
|
||||
</view>
|
||||
<view class="list-item-box-r" v-else>
|
||||
-{{item.num}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%;height: 30rpx;" v-if="list.length>0"></view>
|
||||
<u-loadmore v-if="list.length>0" :status="status" />
|
||||
<empty :isShow="true" title="暂无明细" v-if="list.length == 0" />
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import empty from '../../components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
boxStyle: {
|
||||
margin: 0,
|
||||
padding: '200rpx 0 0 0',
|
||||
},
|
||||
amount: 0,
|
||||
list: [],
|
||||
status: 'loadmore',
|
||||
page: 1,
|
||||
limit: 10,
|
||||
pages: 1,
|
||||
refresherTriggered: true
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
if ( options && options.amount) {
|
||||
this.amount = options.amount
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getAmount()
|
||||
this.getUserBalanceList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getAmount()
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* 获取当前钱包信息
|
||||
*/
|
||||
getAmount() {
|
||||
this.$Request.getT('app/moneyDetails/selectUserMoney').then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code === 0) {
|
||||
this.amount = res.data.amount || 0
|
||||
} else {
|
||||
this.amount = '0.00'
|
||||
}
|
||||
})
|
||||
},
|
||||
withdraw() {
|
||||
let params = {
|
||||
amount: this.amount
|
||||
}
|
||||
this.$Request.getT('app/cash/withdraw', params).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
// this.amount = res.data.amount
|
||||
} else {
|
||||
// this.amount = '0.00'
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取余额明细
|
||||
*/
|
||||
getUserBalanceList() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}
|
||||
this.$Request.getT('app/moneyDetails/queryUserMoneyDetails', data).then(res => {
|
||||
setTimeout(() => {
|
||||
this.refresherTriggered = false
|
||||
}, 1500)
|
||||
if (res.code === 0) {
|
||||
this.pages = res.data.pages
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loadmore'
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
if (this.page === 1) {
|
||||
this.list = res.data.records
|
||||
} else {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goNav(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
//上拉刷新
|
||||
scrollToUpper() {
|
||||
this.page = 1
|
||||
this.refresherTriggered = true
|
||||
this.getUserBalanceList()
|
||||
},
|
||||
//加载更多
|
||||
scrollToLower() {
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loading'
|
||||
this.page += 1
|
||||
this.getUserBalanceList()
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.jf {
|
||||
width: 100%;
|
||||
height: 252rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
|
||||
padding: 0 40rpx;
|
||||
|
||||
.jf-l-t {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.jf-l-b {
|
||||
font-size: 40rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.jf-r {
|
||||
padding: 20rpx 40rpx;
|
||||
border-radius: 40rpx;
|
||||
color: #ff7581;
|
||||
background-color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.listTitle {
|
||||
width: 100%;
|
||||
height: 110rpx;
|
||||
margin-top: -40rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
border-bottom: 1px solid hsla(0, 0%, 90.2%, .8);
|
||||
padding-left: 20rpx;
|
||||
|
||||
text {
|
||||
color: #2e2f33;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-left: 20rpx;
|
||||
padding-top: 8rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
width: 100%;
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 252rpx - 70rpx - 88rpx);
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
height: calc(100vh - 252rpx - 70rpx);
|
||||
/* #endif */
|
||||
background-color: #ffffff;
|
||||
|
||||
.list-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list-item-box {
|
||||
width: calc(100% - 40rpx);
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid hsla(0, 0%, 90.2%, .8);
|
||||
|
||||
.list-item-box-l-t {
|
||||
color: #2e2f33;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.list-item-box-l-b {
|
||||
font-size: 24rpx;
|
||||
color: #aeb2c1;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.list-item-box-r {
|
||||
color: #2e2f33;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
760
me/choujiang/choujiang.vue
Normal file
760
me/choujiang/choujiang.vue
Normal file
@@ -0,0 +1,760 @@
|
||||
<template>
|
||||
|
||||
<view class="almost-lottery min-page">
|
||||
<u-navbar title="" back-icon-color="#fff" :background="background" immersive :border-bottom="false"
|
||||
title-color="#fff"></u-navbar>
|
||||
<!-- head -->
|
||||
<view class="almost-lottery__head">
|
||||
<view class="btn-group u-flex u-row-between">
|
||||
<view :class="['action', isApple && 'action-shadow']" @click="toRed">
|
||||
<text class="pack"></text>
|
||||
<text class="content">红包<text class="num">{{ totalMoney }}</text></text>
|
||||
</view>
|
||||
<view :class="['action', isApple && 'action-shadow']" @click="toGift">
|
||||
<text class="gift"></text>
|
||||
<text class="content">我的奖品</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="tip"><text class="tip-content">每次抽奖消耗 {{ goldNum }} 金币,不限次数</text></view> -->
|
||||
</view>
|
||||
<!-- action -->
|
||||
|
||||
<!-- <view class="almost-lottery__action-dev" @tap="handleInitCanvas" v-if="isDev">
|
||||
<text class="text">重新生成画板-开发模式使用</text>
|
||||
</view>
|
||||
<view class="almost-lottery__action-dev" @tap="handleCheckPopup">
|
||||
<text class="text">查看 uni-popup 用例</text>
|
||||
</view> -->
|
||||
|
||||
<!-- lottery -->
|
||||
<view class="almost-lottery__wheel">
|
||||
<view class="almost-lottery__count">
|
||||
<text class="text">剩余免费抽奖 {{ freeNum }} 次</text>
|
||||
</view>
|
||||
<!-- <button @click="showLingPop">showLingPop</button> -->
|
||||
<almost-lottery :lottery-size="lotteryConfig.lotterySize" :action-size="lotteryConfig.actionSize"
|
||||
:selfTime="selfTime"
|
||||
:ring-count="2" :duration="1" :self-rotaty="false" :img-circled="true" :canvasCached="true"
|
||||
:prize-list="prizeList" :prize-index="prizeIndex" :lotteryBg="lotteryBg" :actionBg="actionBg"
|
||||
@reset-index="prizeIndex = -1" @draw-before="handleDrawBefore" @draw-start="handleDrawStart"
|
||||
@draw-end="handleDrawEnd" @finish="handleDrawFinish" v-if="prizeList.length" />
|
||||
|
||||
</view>
|
||||
<!-- rule -->
|
||||
<view class="almost-lottery__rule">
|
||||
<view class="rule-head">
|
||||
<view class="line"></view>
|
||||
<text class="title">活动规则</text>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<view class="rule-body">
|
||||
<view class="item">
|
||||
<view class="number">1</view>
|
||||
<view class="text">
|
||||
<text>抽奖细则:</text>
|
||||
<text>每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item item-rule">
|
||||
<view class="number">2</view>
|
||||
<view class="text">
|
||||
<text>奖励说明:红包奖励将自动发放到红包余额,已绑定支付宝账号将会自动发起提现。其余奖品则需联系客服领取。</text>
|
||||
<!-- <text>b.金币奖:系统会即时转入金币账户,可在平台内使用。</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <template >
|
||||
<view class="item">
|
||||
<view class="number">3</view>
|
||||
<view class="text">本次活动由XXXXXXX发起。</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="number">4</view>
|
||||
<view class="text">本活动仅限17岁以上用户参加。</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="number">5</view>
|
||||
<view class="text">本活动最终解释权归XXXXXXX所有。</view>
|
||||
</view>
|
||||
</template> -->
|
||||
</view>
|
||||
</view>
|
||||
<ling-qu ref="refLingqu" @close="lingquClose" ></ling-qu>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AlmostLottery from '@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue'
|
||||
import lingQu from '@/components/pop-ling-qu.vue'
|
||||
import {
|
||||
clearCacheFile,
|
||||
clearStore
|
||||
} from '@/uni_modules/almost-lottery/utils/almost-utils.js'
|
||||
export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
AlmostLottery,lingQu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 1 订单拉起抽奖
|
||||
// 2 周任务拉起抽奖
|
||||
// 3 月任务拉起抽奖
|
||||
source:1,
|
||||
background:{
|
||||
background:'transparent'
|
||||
},
|
||||
//红包余额
|
||||
totalMoney:0,
|
||||
//抽奖结果
|
||||
result:'',
|
||||
// 开启调试模式
|
||||
isDev: true,
|
||||
option: {},
|
||||
// 以下是转盘配置相关数据
|
||||
lotteryConfig: {
|
||||
// 抽奖转盘的整体尺寸,单位rpx
|
||||
lotterySize: 600,
|
||||
// 抽奖按钮的尺寸,单位rpx
|
||||
actionSize: 200
|
||||
},
|
||||
selfTime:2000,
|
||||
// 以下是转盘 UI 配置
|
||||
// 转盘外环图,如有需要,请参考替换为自己的设计稿
|
||||
lotteryBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__bg2x.png'),
|
||||
// 抽奖按钮图
|
||||
actionBg: require('@/uni_modules/almost-lottery/static/almost-lottery/almost-lottery__action2x.png'),
|
||||
|
||||
// 以下是奖品配置数据
|
||||
// 奖品数据
|
||||
prizeList: [],
|
||||
// 奖品是否设有库存
|
||||
onStock: true,
|
||||
// 中奖下标
|
||||
prizeIndex: -1,
|
||||
|
||||
// 是否正在抽奖中,避免重复触发
|
||||
prizeing: false,
|
||||
|
||||
// 以下为中奖概率有关数据
|
||||
// 是否由前端控制概率,默认不开启,强烈建议由后端控制
|
||||
onFrontend: false,
|
||||
// 权重随机数的最大值
|
||||
prizeWeightMax: 0,
|
||||
// 权重数组
|
||||
prizeWeightArr: [],
|
||||
|
||||
// 以下为业务需求有关示例数据
|
||||
// 金币余额
|
||||
goldCoin: 20,
|
||||
// 当日免费抽奖次数余额
|
||||
freeNum: 0,
|
||||
// 每次消耗的金币数
|
||||
goldNum: 20,
|
||||
// 每天免费抽奖次数
|
||||
freeNumDay: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isApple() {
|
||||
return uni.getSystemInfoSync().platform === 'ios'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lingquClose(key){
|
||||
console.log('lingquClose');
|
||||
console.log(key);
|
||||
if(key&&key=='isBindAliPay'){
|
||||
uni.navigateTo({
|
||||
url:'/me/invite/zhifubao'
|
||||
})
|
||||
}
|
||||
},
|
||||
toRed(){
|
||||
uni.navigateTo({
|
||||
url: '/me/invite/cashDetail'
|
||||
})
|
||||
|
||||
},
|
||||
toGift() {
|
||||
console.log('1');
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/me/gift/gift?source='+this.source
|
||||
})
|
||||
},
|
||||
// 重新生成
|
||||
handleInitCanvas() {
|
||||
clearCacheFile()
|
||||
clearStore()
|
||||
|
||||
this.prizeList = []
|
||||
this.getPrizeList()
|
||||
},
|
||||
// 通过 popup 打开
|
||||
handleCheckPopup() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/popup/popup'
|
||||
})
|
||||
},
|
||||
// 获取奖品列表
|
||||
async getPrizeList() {
|
||||
uni.showLoading({
|
||||
title: '奖品准备中...'
|
||||
})
|
||||
|
||||
// 等待接口返回的数据进一步处理
|
||||
let res = await this.requestApiGetPrizeList()
|
||||
console.log('获取奖品列表', res)
|
||||
|
||||
if (res.ok) {
|
||||
let data = res.data
|
||||
if (data.length) {
|
||||
this.prizeList = data
|
||||
console.log('已获取到奖品列表数据,开始绘制抽奖转盘')
|
||||
|
||||
// 计算开始绘制的时间
|
||||
if (console.time) {
|
||||
console.time('绘制转盘用时')
|
||||
}
|
||||
|
||||
// 如果开启了前端控制概率
|
||||
// 得出权重的最大值并生成权重数组
|
||||
if (this.onFrontend) {
|
||||
// 生成权重数组并排序取得最大值
|
||||
this.prizeWeightArr = this.prizeList.map(item => item.prizeWeight)
|
||||
let prizeWeightArrSort = [...this.prizeWeightArr]
|
||||
prizeWeightArrSort.sort((a, b) => b - a)
|
||||
|
||||
// 开放自定义权重最大值,没有自定义则取权重数组中的最大值
|
||||
this.prizeWeightMax = this.prizeWeightMax > 0 ? this.prizeWeightMax : prizeWeightArrSort[0]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '获取奖品失败',
|
||||
mask: true,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 模拟请求 获取奖品列表 接口,
|
||||
// 注意这里返回的是一个 Promise
|
||||
// 大哥,这里只是模拟,别告诉我你不会对接自己的接口
|
||||
async requestApiGetPrizeList() {
|
||||
const res = await this.$Request.getT('/app/discSpinning/selectDiscSpinning',{source:this.source})
|
||||
if (res.code == 0) {
|
||||
return {
|
||||
ok: true,
|
||||
data: res.data.records.map(v => {
|
||||
return {
|
||||
...v,
|
||||
prizeId: v.id,
|
||||
prizeName: v.name,
|
||||
prizeStock: 10,
|
||||
prizeWeight: 200,
|
||||
prizeImage: v.url,
|
||||
// prizeImage: require('@/static/git.png')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return
|
||||
// return new Promise((resolve, reject) => {
|
||||
// let requestTimer = setTimeout(() => {
|
||||
// clearTimeout(requestTimer)
|
||||
// requestTimer = null
|
||||
|
||||
// // prizeStock 奖品库存
|
||||
// // prizeWeight 中奖概率,数值越大中奖概率越高,权重一样时随机中奖
|
||||
// resolve({
|
||||
// ok: true,
|
||||
// data: [{
|
||||
// prizeId: 1,
|
||||
// prizeName: '0.1元现金',
|
||||
// prizeStock: 10,
|
||||
// prizeWeight: 200,
|
||||
// prizeImage: require('@/static/git.png')
|
||||
// },
|
||||
// {
|
||||
// prizeId: 2,
|
||||
// prizeName: '10元现金',
|
||||
// prizeStock: 0,
|
||||
// prizeWeight: 50,
|
||||
// prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
|
||||
// },
|
||||
// {
|
||||
// prizeId: 3,
|
||||
// prizeName: '5元话费',
|
||||
// prizeStock: 1,
|
||||
// prizeWeight: 80
|
||||
// },
|
||||
// {
|
||||
// prizeId: 4,
|
||||
// prizeName: '50元现金',
|
||||
// prizeStock: 0,
|
||||
// prizeWeight: 10,
|
||||
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB2klEQVRIia3Wv09TURjG8U+u2kQZcNENh2ok0cnJ0R+L0RB2g/EvwITEwRgnV0Zx0fAHYBh0khBD4sBAmAgDiwQNg4qwmSBDAYf7Fi+n97al9UlObnvO836f3tO355b2GsAYZrCBPRzGdSPmx8J3YtXwDDsB7TR2wl/rNmAYK13C07ES9W11E9s9BjTHdnBKVf8PAcWgehpwCssF0w/5FzqLgw7AA7zDQ/wqzC8H90jjSeFMYW0Yr8PzALfjOh7z1wve2YTzpLlQw2ay+KZ1N7vS24SziVqGexhKzB07pEJXk/dDwTetdZ9HewwZLWFNw2oyudZjQFNrCW8109pqS32GpPX1TOu586fPkLR+IEMjmbzYZ0ha34Atx/fwW58hXxPeFixo7Yg7PQbcKmEtZFgsMb/C4AkDBuUnQKpFuFZI3cZuvP6C+8g6wDP572O95C4Og49/W/YJl/G5YPqO9yV3dh4f8LMCfhjcI93Afix8xAX5SVx2YBY10yagEdxjmiwY7uISXuIFrlSEPG0TMllWcAbzYViXd0rzeXC6ImSiImA+eKU6h7mCeV/eCBMnCJkLzpHSztnFCJ7L//ZkOFv1iRLtRd1IcLpSHVP4jccVnkexPqXkmd7UX15b7tiz29ReAAAAAElFTkSuQmCC'
|
||||
// },
|
||||
// {
|
||||
// prizeId: 5,
|
||||
// prizeName: '1卷抽纸',
|
||||
// prizeStock: 3,
|
||||
// prizeWeight: 3000,
|
||||
// prizeImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAABCElEQVRoge3YMa4BURSH8Y8o7UAp0WgkotBZwluAfhqlZSgUGr23ENUUCpppJnTswAIUSCaTiziZJ8d9/193zdzrfMltABF5plb+oLscDoAV0Pn8OC/lwDhL0k35QT3wstcIuM61Cj0IhXiNuAvOFwr5SgrxRiHeKMSbhnHfAVgU1i1gajhnBpwK6wnQtgxkDTlmSTq/L7rLYQ9byG+WpLvCOT8YQ6K5WgrxRiHeKMQbhXijEG8U4o1CvIkmxPrDquwMrI37KlFJSJake2BUxVlW0VytaEKsV6t5+8Ohak3rRmtIH9hav/QvRHO1FOKNQrwJheQfn+I9wflCIeNHLzuQc51PRP6rC1ZeIm1I8cC5AAAAAElFTkSuQmCC'
|
||||
// },
|
||||
// {
|
||||
// prizeId: 6,
|
||||
// prizeName: '0.2元现金',
|
||||
// prizeStock: 8,
|
||||
// prizeWeight: 120
|
||||
// },
|
||||
// {
|
||||
// prizeId: 7,
|
||||
// prizeName: '谢谢参与',
|
||||
// prizeStock: 100,
|
||||
// prizeWeight: 10000
|
||||
// },
|
||||
// {
|
||||
// prizeId: 8,
|
||||
// prizeName: '100金币',
|
||||
// prizeStock: 100,
|
||||
// prizeWeight: 3000
|
||||
// }
|
||||
// ]
|
||||
// })
|
||||
// }, 200)
|
||||
// })
|
||||
},
|
||||
// 抽奖开始之前
|
||||
async handleDrawBefore(callback) {
|
||||
|
||||
console.log('抽奖开始之前')
|
||||
let flag = false
|
||||
|
||||
// 还有免费数次
|
||||
if (this.freeNum > 0) {
|
||||
flag = true
|
||||
} else {
|
||||
flag = false
|
||||
uni.showToast({
|
||||
title: '抽奖次数不足',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
callback(flag)
|
||||
},
|
||||
// 本次抽奖开始
|
||||
handleDrawStart() {
|
||||
console.log('触发抽奖按钮')
|
||||
if (this.prizeing) return
|
||||
this.prizeing = true
|
||||
this.tryLotteryDraw()
|
||||
},
|
||||
// 尝试发起抽奖
|
||||
tryLotteryDraw() {
|
||||
console.log('旋转开始,获取中奖下标......')
|
||||
// 判断是否由前端控制概率
|
||||
if (this.onFrontend) {
|
||||
this.localGetPrizeIndex()
|
||||
} else {
|
||||
this.remoteGetPrizeIndex()
|
||||
}
|
||||
},
|
||||
// 本地获取中奖下标
|
||||
localGetPrizeIndex() {
|
||||
console.warn('###当前处于前端控制中奖概率,安全起见,强烈建议由后端控制###')
|
||||
// 前端控制概率的情况下,需要拿到最接近随机权重且大于随机权重的值
|
||||
// 后端控制概率的情况下,通常会直接返回 prizeId
|
||||
if (!this.prizeWeightMax || !this.prizeWeightArr.length) {
|
||||
console.warn('###当前已开启前端控制中奖概率,但是奖品数据列表中的 prizeWeight 参数似乎配置不正确###')
|
||||
return
|
||||
}
|
||||
console.log('当前权重最大值为 =>', this.prizeWeightMax)
|
||||
|
||||
// 注意这里使用了 Math.ceil,如果某个权重的值为 0,则始终无法中奖
|
||||
let randomWeight = Math.ceil(Math.random() * this.prizeWeightMax)
|
||||
console.log('本次权重随机数 =>', randomWeight)
|
||||
|
||||
// 生成大于等于随机权重的数组
|
||||
let tempMaxArrs = []
|
||||
this.prizeList.forEach((item) => {
|
||||
if (item.prizeWeight >= randomWeight) {
|
||||
tempMaxArrs.push(item.prizeWeight)
|
||||
}
|
||||
})
|
||||
console.log('tempMaxArrs', tempMaxArrs)
|
||||
|
||||
// 如果大于随机权重的数组有值,先对这个数组排序然后取值
|
||||
// 反之新建一个临时的包含所有权重的已排序数组,然后取值
|
||||
let tempMaxArrsLen = tempMaxArrs.length
|
||||
if (tempMaxArrsLen) {
|
||||
tempMaxArrs.sort((a, b) => a - b)
|
||||
// 取值时,如果存在多个值,分两种情况
|
||||
if (tempMaxArrsLen > 1) {
|
||||
// 检查是否存在重复的值
|
||||
let sameCount = 0
|
||||
for (let i = 0; i < tempMaxArrs.length; i++) {
|
||||
if (tempMaxArrs[i] === tempMaxArrs[0]) {
|
||||
sameCount++
|
||||
}
|
||||
}
|
||||
|
||||
// 值不相等的情况下取最接近的值,也就是第1个值
|
||||
if (sameCount === 1) {
|
||||
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0])
|
||||
} else {
|
||||
// 存在值相等时,随机取值,当然这里你可以自己决定是否随机取值
|
||||
let sameWeight = tempMaxArrs[0]
|
||||
let sameWeightArr = []
|
||||
let sameWeightItem = {}
|
||||
this.prizeWeightArr.forEach((item, index) => {
|
||||
if (item === sameWeight) {
|
||||
sameWeightArr.push({
|
||||
prizeWeight: item,
|
||||
index
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log('sameWeightArr', sameWeightArr)
|
||||
sameWeightItem = sameWeightArr[Math.floor(Math.random() * sameWeightArr.length)]
|
||||
console.log('sameWeightItem', sameWeightItem)
|
||||
this.prizeIndex = sameWeightItem.index
|
||||
}
|
||||
} else {
|
||||
this.prizeIndex = this.prizeWeightArr.indexOf(tempMaxArrs[0])
|
||||
}
|
||||
}
|
||||
|
||||
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName)
|
||||
|
||||
// 如果奖品设有库存
|
||||
if (this.onStock) {
|
||||
console.log('本次奖品库存 =>', this.prizeList[this.prizeIndex].prizeStock)
|
||||
}
|
||||
},
|
||||
// 远程请求接口获取中奖下标
|
||||
// 大哥,这里只是模拟,别告诉我你不会对接自己的接口
|
||||
async remoteGetPrizeIndex() {
|
||||
this.result=''
|
||||
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###')
|
||||
const res = await this.$Request.getT('app/discSpinning/draw',{source:this.source})
|
||||
this.freeNum--
|
||||
// this.getCount()
|
||||
console.log(res);
|
||||
if (res.code != 0) {
|
||||
return uni.showToast({
|
||||
title: res.msg
|
||||
})
|
||||
}
|
||||
this.result=res.data
|
||||
|
||||
let list = [...this.prizeList]
|
||||
// 这里随机产生的 prizeId 是模拟后端返回的 prizeId
|
||||
const arr=list.filter(v=>v.type==res.data.type)
|
||||
let prizeId = arr[0].prizeId
|
||||
|
||||
// 拿到后端返回的 prizeId 后,开始循环比对得出那个中奖的数据
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let item = list[i]
|
||||
if (item.prizeId === prizeId) {
|
||||
// 中奖下标
|
||||
this.prizeIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
console.log('本次抽中奖品 =>', this.prizeList[this.prizeIndex].prizeName)
|
||||
},
|
||||
// 本次抽奖结束
|
||||
handleDrawEnd() {
|
||||
console.log('旋转结束,执行拿到结果后到逻辑')
|
||||
// 旋转结束后,开始处理拿到结果后的逻辑
|
||||
// const prize = this.prizeList[this.prizeIndex]
|
||||
const prize = this.result
|
||||
let {name} = prize
|
||||
let tipContent = ''
|
||||
|
||||
if (name.type ==1) {
|
||||
tipContent = '很遗憾,没有中奖,请再接再厉!'
|
||||
} else {
|
||||
tipContent = `恭喜您,获得 ${name}${this.result.type==2?(this.result.number+'元'):''} !`
|
||||
}
|
||||
const _this=this;
|
||||
console.log(this.result);
|
||||
this.showLingPop({...this.result})
|
||||
this.result=''
|
||||
this.prizeing = false
|
||||
return
|
||||
// uni.showModal({
|
||||
// content: tipContent,
|
||||
// showCancel: false,
|
||||
// success() {
|
||||
// const {
|
||||
// orderId,id
|
||||
// }=_this.result
|
||||
// _this.$Request.postJson('app/discSpinning/receive',_this.result).then(res=>{
|
||||
// _this.result=''
|
||||
// console.log(res)
|
||||
// if(res.code==0){
|
||||
// uni.showToast({
|
||||
// title: '领取成功',
|
||||
// icon:'none'
|
||||
// })
|
||||
// _this.getRedPack()
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// title: '领取失败',
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// complete: () => {
|
||||
// this.prizeing = false
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 抽奖转盘绘制完成
|
||||
handleDrawFinish(res) {
|
||||
console.log('抽奖转盘绘制完成', res)
|
||||
|
||||
if (res.ok) {
|
||||
// 计算结束绘制的时间
|
||||
if (console.timeEnd) {
|
||||
console.timeEnd('绘制转盘用时')
|
||||
}
|
||||
}
|
||||
|
||||
let stoTimer = setTimeout(() => {
|
||||
stoTimer = null
|
||||
|
||||
uni.hideLoading()
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// mask: true,
|
||||
// icon: 'none'
|
||||
// })
|
||||
}, 50)
|
||||
},
|
||||
async getRedPack(){
|
||||
const res=await this.$Request.getT('app/moneyDetails/selectUserMoney')
|
||||
if(res.code==0){
|
||||
this.totalMoney=res.data.amount
|
||||
}
|
||||
},
|
||||
async getCount(){
|
||||
const res=await this.$Request.getT('app/discSpinning/drawCount',{source:this.source})
|
||||
if(res.code==0){
|
||||
this.freeNum=res.count||0
|
||||
this.freeNumDay=res.sum||0
|
||||
}
|
||||
},
|
||||
lingquClose(){
|
||||
// this.getCount()
|
||||
this.getRedPack()
|
||||
},
|
||||
showLingPop(data){
|
||||
this.$refs.refLingqu.open(data)
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.option = opt
|
||||
if(opt.source){
|
||||
this.source=opt.source
|
||||
}
|
||||
this.prizeList = []
|
||||
this.getCount()
|
||||
this.getRedPack()
|
||||
this.getPrizeList()
|
||||
},
|
||||
onUnload() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn-group {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
top: 180px;
|
||||
gap: 20rpx;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.almost-lottery {
|
||||
flex: 1;
|
||||
background-color: #FF893F;
|
||||
}
|
||||
|
||||
.almost-lottery__head {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 460rpx;
|
||||
background: url('~static/images/lottery/top-bg.png') no-repeat center center/cover;
|
||||
|
||||
.action {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
margin: 0 auto;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
background-color: rgba(255, 136, 61, 1);
|
||||
border-radius: 44rpx;
|
||||
}
|
||||
|
||||
.action-shadow {
|
||||
box-shadow: 0px 14rpx 0px 0px rgba(235, 112, 36, 1);
|
||||
}
|
||||
|
||||
.pack {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-right: 10rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;
|
||||
background-image: url("~static/red-pack.png");
|
||||
}
|
||||
|
||||
.gift {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-right: 10rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;
|
||||
background-image: url("~static/gift.png");
|
||||
}
|
||||
|
||||
|
||||
.num {
|
||||
color: #F9FC31;
|
||||
}
|
||||
|
||||
.tip {
|
||||
position: relative;
|
||||
top: 428rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__wheel {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
margin-top: -10rpx;
|
||||
.almost-lottery__count {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 20rpx 0 40rpx 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__rule {
|
||||
padding: 0 28rpx;
|
||||
color: #FFF8CB;
|
||||
|
||||
.rule-head {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin: 40rpx 0;
|
||||
|
||||
.line {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background-color: #FFF3A5;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 280rpx;
|
||||
color: #F63857;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
margin: 0 20rpx;
|
||||
border-radius: 8rpx;
|
||||
background-image: linear-gradient(0deg, rgba(255, 242, 158, 1), rgba(255, 244, 168, 1));
|
||||
}
|
||||
}
|
||||
|
||||
.rule-body {
|
||||
color: #FFF8CB;
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 0 40rpx;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.number {
|
||||
position: relative;
|
||||
top: 4rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
line-height: 28rpx;
|
||||
text-align: center;
|
||||
color: #F63857;
|
||||
background: #FFF8CB;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-rule .text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__action-dev {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
background-color: red;
|
||||
margin: 0 auto 40rpx;
|
||||
|
||||
.text {
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.almost-lottery__popup-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.almost-lottery {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
96
me/collect/index.vue
Normal file
96
me/collect/index.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="margin bg-white padding-sm radius" v-if="collectList.length" v-for="(item,index) in collectList" :key='index' @click="goDet(item.courseId)" >
|
||||
<view class="flex">
|
||||
<u-image width="280rpx" height="200rpx" :src="item.titleImg"></u-image>
|
||||
<view class="flex-sub margin-left flex flex-direction justify-between" style="width:420rpx;">
|
||||
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{item.title}}
|
||||
</view>
|
||||
<view class="text-gray text-26 margin-top">最近{{item.payNum}}人在学 </view>
|
||||
<view class="flex align-center justify-between">
|
||||
<view class=" " style="color: #FF8211;">¥ <text class=" text-bold" style="font-size: 42rpx;">{{item.price}}</text></view>
|
||||
<view class="btn">马上学习</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 空数据 -->
|
||||
<empty v-if="!collectList.length"></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import empty from '@/components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
collectList: [],//收藏资源
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getCollectList()
|
||||
},
|
||||
methods: {
|
||||
// 获取收藏信息
|
||||
getCollectList() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
let data = {
|
||||
userId: this.userId,
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
}
|
||||
this.$u.api.collectList(data).then(res => {
|
||||
if(res.code === 0) {
|
||||
if( this.page === 1) {
|
||||
this.collectList = res.data.records
|
||||
uni.stopPullDownRefresh();
|
||||
return
|
||||
}
|
||||
this.collectList = [...this.collectList, ...res.data.records]
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
uni.hideLoading()
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
goDet(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.page = this.page + 1;
|
||||
this.getCollectList();
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.getCollectList();
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
width: 150upx;
|
||||
height: 60upx;
|
||||
background: #5074FF;
|
||||
border-radius: 30upx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="cYzTAgyqpL" :class="border" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="KYmugyqoee">{{title}}</text>
|
||||
<view class="mix-list-cell" :class="border" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="cell-tit">{{title}}</text>
|
||||
<input
|
||||
class="JCfohgyqmS"
|
||||
class="main-input"
|
||||
:value="value"
|
||||
:type="_type"
|
||||
placeholder-class="placeholder-class"
|
||||
:maxlength="maxlength"
|
||||
:placeholder="placeholder"
|
||||
:password="type==='password'&&!gyqiPDpmBTword"
|
||||
:password="type==='password'&&!showPassword"
|
||||
@input="onInput"
|
||||
:disabled="readOnly"
|
||||
/>
|
||||
@@ -18,14 +18,14 @@
|
||||
<image
|
||||
v-if="_isShowPass&&type==='password'&&!_isShowCode"
|
||||
class="img cuIcon"
|
||||
:class="gyqiPDpmBTword?'cuIcon-attention':'cuIcon-attentionforbid'"
|
||||
@tap="gyqiPDpmBT"
|
||||
:class="showPassword?'cuIcon-attention':'cuIcon-attentionforbid'"
|
||||
@tap="showPass"
|
||||
></image>
|
||||
<!-- 倒计时 -->
|
||||
<view
|
||||
v-if="_isShowCode&&!_isShowPass"
|
||||
:class="['vercode',{'vercode-run': second>0}]"
|
||||
@click="igyqPWOcGg"
|
||||
@click="setCode"
|
||||
>{{ getVerCodeSecond }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -42,7 +42,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
gyqiPDpmBTword: false, //是否显示明文
|
||||
showPassword: false, //是否显示明文
|
||||
second: 0, //倒计时
|
||||
isRunCode: false, //是否开始倒计时
|
||||
typeList: {
|
||||
@@ -125,15 +125,15 @@
|
||||
clearInterval(countDown);//先清理一次循环,避免缓存
|
||||
},
|
||||
methods: {
|
||||
gyqiPDpmBT() {
|
||||
showPass() {
|
||||
//是否显示密码
|
||||
this.gyqiPDpmBTword = !this.gyqiPDpmBTword
|
||||
this.showPassword = !this.showPassword
|
||||
},
|
||||
onInput(e) {
|
||||
//传出值
|
||||
this.$emit('input', e.target.value)
|
||||
},
|
||||
igyqPWOcGg() {
|
||||
setCode() {
|
||||
//设置获取验证码的事件
|
||||
if (this.isRunCode) {
|
||||
//判断是否开始倒计时,避免重复点击
|
||||
@@ -208,7 +208,7 @@
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
.JCfohgyqmS {
|
||||
.main-input {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
color: black;
|
||||
@@ -217,7 +217,7 @@
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.icon .cYzTAgyqpL.b-b:after {
|
||||
.icon .mix-list-cell.b-b:after {
|
||||
left: 45px;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.cYzTAgyqpL {
|
||||
.mix-list-cell {
|
||||
/* border-radius: 16upx; */
|
||||
border-bottom: 4upx solid #F8F8F8;
|
||||
margin-top: 1px;
|
||||
@@ -260,7 +260,7 @@
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.KYmugyqoee {
|
||||
.cell-tit {
|
||||
width: 80px;
|
||||
font-size: 16px;
|
||||
color: black;
|
||||
|
||||
301
me/course/index.vue
Normal file
301
me/course/index.vue
Normal file
@@ -0,0 +1,301 @@
|
||||
<template>
|
||||
<view class="page-box">
|
||||
<view class="order" v-if="courseList.length" v-for="(item, index) in courseList" :key="index"
|
||||
@click="goCourse(item.courseId)">
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<image :src="item.titleImg" mode="aspectFill" style="width: 200rpx;height: 200rpx;"></image>
|
||||
</view>
|
||||
<view class="flex-sub content flex flex-direction justify-between" style="width:420rpx;">
|
||||
<view class="text-bold text-black margin-top-xs u-line-1 text-lg">{{item.title}}
|
||||
</view>
|
||||
<view class="text-gray text-26 margin-top">最近{{item.payNum}}人在学 </view>
|
||||
<view class="flex align-center justify-between">
|
||||
<view class=" " style="color: #FF8211;">¥ <text class=" text-bold"
|
||||
style="font-size: 42rpx;">{{item.price}}</text></view>
|
||||
<view class="btn">马上学习</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="content flex-sub flex flex-direction justify-between">
|
||||
<view class="flex flex-direction justify-between flex-sub">
|
||||
<view class="title u-line-2" style="width: 380rpx;">{{ item.title }}</view>
|
||||
<view class="buttom margin-top">
|
||||
<view class="price">
|
||||
¥{{ priceInt(item.price) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex margin-top-sm">
|
||||
<view>
|
||||
<u-avatar v-for="(ite,ind) in item.avatar" :key='ind' v-if="ind < 3" class="head" size="44" :src="ite"></u-avatar>
|
||||
</view>
|
||||
<view class="text-gray number">{{item.courseCount}}人已观看</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 空数据 -->
|
||||
<empty v-if="!courseList.length" title="暂无资源"></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import empty from '@/components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
userId: '',
|
||||
courseList: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userId = uni.getStorageSync('userId')
|
||||
this.getCourseList()
|
||||
},
|
||||
methods: {
|
||||
// 我的资源列表
|
||||
getCourseList() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
let data = {
|
||||
userId: this.userId,
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
}
|
||||
this.$u.api.selectCourse(data).then(res => {
|
||||
if (res.code === 0) {
|
||||
res.data.list.forEach(ret => {
|
||||
if (ret.avatar) {
|
||||
ret.avatar = ret.avatar.split(',')
|
||||
}
|
||||
})
|
||||
if (this.page === 1) {
|
||||
this.courseList = res.data.list
|
||||
uni.stopPullDownRefresh();
|
||||
return
|
||||
}
|
||||
this.courseList = [...this.courseList, ...res.data.list]
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
uni.hideLoading()
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
// 跳转资源详情
|
||||
goCourse(e) {
|
||||
console.log(e)
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.page = this.page + 1;
|
||||
this.getCourseList();
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.courseList = []
|
||||
this.getCourseList();
|
||||
},
|
||||
computed: {
|
||||
// 价格小数
|
||||
priceDecimal() {
|
||||
return val => {
|
||||
if (val !== parseInt(val)) return val.slice(-2);
|
||||
else return '00';
|
||||
};
|
||||
},
|
||||
// 价格整数
|
||||
priceInt() {
|
||||
return val => {
|
||||
// if (val !== parseInt(val)) return val.split('.')[0];
|
||||
// else return val;
|
||||
return val
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn {
|
||||
width: 150upx;
|
||||
height: 60upx;
|
||||
background: #5074FF;
|
||||
border-radius: 30upx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order {
|
||||
width: 700rpx;
|
||||
background-color: #ffffff;
|
||||
margin: 20rpx auto;
|
||||
border-radius: 20rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.store {
|
||||
margin: 0 10rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
color: $u-type-warning-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
|
||||
.left {
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 280rpx;
|
||||
height: 240rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.title {
|
||||
font-size: 16px;
|
||||
line-height: 50rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.buttom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #E6E6E6;
|
||||
|
||||
.price {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #FF3838;
|
||||
}
|
||||
|
||||
.number {
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.head1 {
|
||||
position: relative;
|
||||
left: -5px;
|
||||
}
|
||||
|
||||
.head2 {
|
||||
position: relative;
|
||||
left: -10px;
|
||||
}
|
||||
|
||||
.number {
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.total {
|
||||
margin-top: 20rpx;
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
|
||||
.total-price {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
margin-top: 40rpx;
|
||||
padding: 0 10rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.btn {
|
||||
line-height: 52rpx;
|
||||
width: 160rpx;
|
||||
border-radius: 26rpx;
|
||||
border: 2rpx solid $u-border-color;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
color: $u-type-info-dark;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
color: $u-type-warning-dark;
|
||||
border-color: $u-type-warning-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.centre {
|
||||
text-align: center;
|
||||
margin: 200rpx auto;
|
||||
font-size: 32rpx;
|
||||
|
||||
image {
|
||||
width: 360rpx;
|
||||
height: 360rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
border: 1px dotted #000000;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 40rpx;
|
||||
color: #5074FF;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 80rpx auto;
|
||||
width: 600rpx;
|
||||
border-radius: 32rpx;
|
||||
line-height: 90rpx;
|
||||
color: #ffffff;
|
||||
font-size: 34rpx;
|
||||
background: #5074FF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -161,7 +161,7 @@
|
||||
{{countPrice}}元解锁单集视频
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
|
||||
<!-- <view class="pay-content-item" @click="goNav('/pages/iSiAnfghCC/vip/index')" v-if="isVips == '是'">
|
||||
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
<text class="pay-content-items">
|
||||
开通会员
|
||||
@@ -798,7 +798,7 @@
|
||||
// plus.runtime.openURL(ret.data.h5Url)
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
|
||||
url: '/pages/itkXJghyII/hLUkghGDXH?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
|
||||
});
|
||||
|
||||
// uni.navigateTo({
|
||||
@@ -996,7 +996,7 @@
|
||||
if (uni.getStorageSync('qdCode')) {
|
||||
qdCode = uni.getStorageSync('qdCode')
|
||||
}
|
||||
let url = config.APIHOST2 + '/pages/login/registerApp?invitation=' + invitationCode + '&qdCode=' + qdCode
|
||||
let url = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + invitationCode + '&qdCode=' + qdCode
|
||||
// this.setShareNum()
|
||||
uni.setClipboardData({
|
||||
data: url,
|
||||
@@ -1015,7 +1015,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1030,7 +1030,7 @@
|
||||
this.submitPay(type)
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -1158,7 +1158,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1185,7 +1185,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1317,7 +1317,7 @@
|
||||
console.log(res)
|
||||
if (res.count >= 1) {
|
||||
uni.navigateTo({
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
url: '/me/choujiang/choujiang'
|
||||
})
|
||||
} else {
|
||||
this.videoContext.play();
|
||||
@@ -1351,7 +1351,7 @@
|
||||
console.log('转盘抽奖次数')
|
||||
if (res.count >= 1) {
|
||||
uni.navigateTo({
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
url: '/me/choujiang/choujiang'
|
||||
})
|
||||
} else {
|
||||
this.videoContext.play();
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
|
||||
<view class="list-item-box flex align-center justify-center" @click="goNav('/pages/me/vip/index')">
|
||||
<view class="list-item-box flex align-center justify-center" @click="goNav('/pages/iSiAnfghCC/vip/index')">
|
||||
<image src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
开通会员
|
||||
#ifdef MP-TOUTIAO || MP-WEIXIN-->
|
||||
@@ -1087,7 +1087,7 @@
|
||||
let token = this.$queue.getData('token');
|
||||
if (!token) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
|
||||
})
|
||||
return;
|
||||
}
|
||||
@@ -1273,7 +1273,7 @@
|
||||
this.submitPay(type)
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1287,7 +1287,7 @@
|
||||
// this.payOrder(this.ordersId, this.payMoney)
|
||||
// #ifdef APP
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?ordersId=' + data.ordersId + '&url=' + data.h5Url
|
||||
url: '/pages/itkXJghyII/hLUkghGDXH?ordersId=' + data.ordersId + '&url=' + data.h5Url
|
||||
});
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
@@ -1370,7 +1370,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1390,7 +1390,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1417,7 +1417,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1560,7 +1560,7 @@
|
||||
if (this.noBuyVideoIndex !== null) {
|
||||
this.noBuyVideoIndex = null
|
||||
return uni.navigateTo({
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
url: '/me/choujiang/choujiang'
|
||||
})
|
||||
}
|
||||
} else { //直接跳转进来的
|
||||
@@ -1676,7 +1676,7 @@
|
||||
console.log('转盘抽奖次数', res.count)
|
||||
if (res.count >= 1) {
|
||||
uni.navigateTo({
|
||||
url: '/me/VjgyqAzklr/VjgyqAzklr'
|
||||
url: '/me/choujiang/choujiang'
|
||||
})
|
||||
} else {}
|
||||
})
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
{{countPrice}}元解锁单集视频
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
|
||||
<!-- <view class="pay-content-item" @click="goNav('/pages/iSiAnfghCC/vip/index')" v-if="isVips == '是'">
|
||||
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
<text class="pay-content-items">
|
||||
开通会员
|
||||
@@ -720,7 +720,7 @@
|
||||
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
|
||||
// plus.runtime.openURL(ret.data.h5Url)
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
|
||||
url: '/pages/itkXJghyII/hLUkghGDXH?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
|
||||
});
|
||||
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
|
||||
});
|
||||
@@ -920,7 +920,7 @@
|
||||
if (uni.getStorageSync('qdCode')) {
|
||||
qdCode = uni.getStorageSync('qdCode')
|
||||
}
|
||||
let url = config.APIHOST2 + '/pages/login/registerApp?invitation=' + invitationCode + '&qdCode=' + qdCode
|
||||
let url = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + invitationCode + '&qdCode=' + qdCode
|
||||
uni.setClipboardData({
|
||||
data: url,
|
||||
success(res) {
|
||||
@@ -949,7 +949,7 @@
|
||||
this.submitPay(type)
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -1117,7 +1117,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1144,7 +1144,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
BfgyqOmGub(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/course/courseDet?id=' + e
|
||||
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -369,7 +369,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -439,7 +439,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
// #endif
|
||||
// app直接去app注册页面
|
||||
// #ifdef APP
|
||||
this.erweima = config.APIHOST2 + '/pages/login/registerApp/?invitation=' + this
|
||||
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp/?invitation=' + this
|
||||
.invitationCode + '&qdCode=' + this.qdCode
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
// #endif
|
||||
// app直接去app注册页面
|
||||
// #ifdef APP
|
||||
this.erweima = config.APIHOST2 + '/pages/login/registerApp/?invitation=' + this
|
||||
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp/?invitation=' + this
|
||||
.invitationCode + '&qdCode=' + this.qdCode
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
// #endif
|
||||
// app直接去app注册页面
|
||||
// #ifdef APP
|
||||
this.erweima = config.APIHOST2 + '/pages/login/registerApp?invitation=' + this
|
||||
this.erweima = config.APIHOST2 + '/pages/ghtwwlkXYG/WVEtZeeghKApp?invitation=' + this
|
||||
.invitationCode + '&qdCode=' + this.qdCode
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
|
||||
202
me/setting/bind.vue
Normal file
202
me/setting/bind.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="cu-form-group"
|
||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
||||
<view class="title">手机号</view>
|
||||
<input type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
|
||||
@input="inputChange" />
|
||||
</view>
|
||||
<view class="cu-form-group"
|
||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
||||
<text class="title">验证码</text>
|
||||
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
|
||||
@confirm="toLogin" />
|
||||
<button class="send-msg" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
|
||||
</view>
|
||||
|
||||
<button class="confirm-btn" @click="toLogin" :disabled="logining">立即换绑
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import listCell from '@/components/com-input';
|
||||
export default {
|
||||
components: {
|
||||
// listCell
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mobile: '',
|
||||
code: '',
|
||||
logining: false,
|
||||
sending: false,
|
||||
sendTime: '获取验证码',
|
||||
count: 60,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
inputChange(e) {
|
||||
const key = e.currentTarget.dataset.key;
|
||||
this[key] = e.detail.value;
|
||||
},
|
||||
navBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
countDown() {
|
||||
const {
|
||||
count
|
||||
} = this;
|
||||
if (count === 1) {
|
||||
this.count = 60;
|
||||
this.sending = false;
|
||||
this.sendTime = '获取验证码'
|
||||
} else {
|
||||
this.count = count - 1;
|
||||
this.sending = true;
|
||||
this.sendTime = count - 1 + '秒后重新获取';
|
||||
setTimeout(this.countDown.bind(this), 1000);
|
||||
}
|
||||
},
|
||||
sendMsg() {
|
||||
const {
|
||||
mobile
|
||||
} = this;
|
||||
if (!mobile) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
} else if (mobile.length !== 11) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '正在发送验证码...'
|
||||
})
|
||||
this.$u.get('/app/Login/sendMsg/' + mobile + '/login').then(res => {
|
||||
if (res.code === 0) {
|
||||
this.sending = true;
|
||||
uni.showToast({
|
||||
title: '验证码发送成功请注意查收',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
this.countDown();
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
title: '短信发送失败',
|
||||
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
toLogin() {
|
||||
const {
|
||||
mobile,
|
||||
code,
|
||||
} = this;
|
||||
if (!mobile) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
} else if (code.length == 0) {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
} else {
|
||||
this.logining = true;
|
||||
uni.showLoading({
|
||||
title: '更换中...'
|
||||
})
|
||||
this.$u.post('/app/user/updatePhone?phone=' + mobile + '&msg=' + code).then(res => {
|
||||
if (res.code === 0) {
|
||||
// this.$queue.remove('invitation');
|
||||
// uni.setStorageSync('token', res.token)
|
||||
// uni.setStorageSync('userId', res.userId)
|
||||
// uni.setStorageSync('mobile', res.mobile)
|
||||
|
||||
uni.showToast({
|
||||
title: '更换成功',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
title: '更换失败',
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
page {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.send-msg {
|
||||
border-radius: 30px;
|
||||
color: white;
|
||||
height: 30px;
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
background: #ff7581;
|
||||
}
|
||||
|
||||
.container {
|
||||
top: 0;
|
||||
padding-top: 32upx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
position: relative;
|
||||
z-index: 90;
|
||||
background: #ffffff;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.confirm-btn {
|
||||
width: 300px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
border-radius: 30px;
|
||||
margin-top: 70px;
|
||||
background: #ff7581;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
|
||||
&:after {
|
||||
border-radius: 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -104,7 +104,7 @@
|
||||
uni.removeStorageSync('isVIP')
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: '/pages/me/index'
|
||||
url: '/pages/iSiAnfghCC/abKTySghjA'
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
1304
me/wallet/wallet.vue
Normal file
1304
me/wallet/wallet.vue
Normal file
File diff suppressed because it is too large
Load Diff
129
me/wallet/wallet_detail.vue
Normal file
129
me/wallet/wallet_detail.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view style="padding-bottom: 20rpx;">
|
||||
<view v-for="(item,index) in list" :key="index" class="list flex align-center justify-center">
|
||||
<view class="list-box">
|
||||
<view class="list-box-title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="list-box-content">
|
||||
{{item.content}}
|
||||
</view>
|
||||
<view class="list-box-time flex align-center justify-between">
|
||||
{{item.createTime}}
|
||||
<text>{{item.type===1?'+':'-'}}{{item.money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length > 3" class="loadMore">
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
<empty v-if="list.length===0" title="暂无明细" />
|
||||
<!-- 抖音im客服 -->
|
||||
<ttMsg />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ttMsg from '../../components/ttMsg/ttMsg.vue'
|
||||
import empty from '../../components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty,
|
||||
ttMsg
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: 'loadmore',
|
||||
list: [], //余额明细
|
||||
page: 1,
|
||||
pages: 1,
|
||||
limit: 10,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
//加载更多
|
||||
onReachBottom() {
|
||||
if (this.page < this.pages) {
|
||||
this.page += 1
|
||||
this.status = 'loading'
|
||||
this.getList()
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}
|
||||
this.$Request.getT('/app/moneyDetails/queryUserMoneyDetails', data).then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code === 0) {
|
||||
this.pages = res.data.pages
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loadmore'
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
if (this.page === 1) {
|
||||
this.list = res.data.records
|
||||
} else {
|
||||
this.list = [...this.list, ...res.data.records]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.list {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.list-box {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
border-radius: 24rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.list-box-title {
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.list-box-content {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.list-box-time {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
color: #999999;
|
||||
|
||||
text {
|
||||
color: #000;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loadMore {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
</style>
|
||||
1264
me/wallet/wallets.vue
Normal file
1264
me/wallet/wallets.vue
Normal file
File diff suppressed because it is too large
Load Diff
111
me/wallpaper/wallpaper.vue
Normal file
111
me/wallpaper/wallpaper.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="videoImg flex align-center justify-center">
|
||||
<view class="videoImg-box flex justify-between align-center flex-wrap">
|
||||
<view class="videoImg-box-item" v-for="(item,index) in wallpaperList" :key="index">
|
||||
<image @click="priveImg(item.imageUrl)" :src="item.imageUrl" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="wallpaperList.length == 0" />
|
||||
<u-loadmore v-if="wallpaperList.length >= 4" :status="status" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import empty from '../../components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
wallpaperList: [], //壁纸列表
|
||||
page: 1,
|
||||
limit: 10,
|
||||
pages: 1,
|
||||
status: 'loadmore',
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getWallpaperList() //壁纸
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.pages) {
|
||||
this.page += 1
|
||||
this.status = 'loading'
|
||||
this.getWallpaperList()
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.getWallpaperList()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @param {Object} url 图片链接
|
||||
* 预览图片
|
||||
*/
|
||||
priveImg(url) {
|
||||
console.log(url)
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current: 0
|
||||
})
|
||||
},
|
||||
//获取壁纸列表
|
||||
getWallpaperList() {
|
||||
let data = {
|
||||
classify: 10,
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
}
|
||||
// selectBannerPage
|
||||
this.$u.api.selectBannerPage(data).then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code == 0) {
|
||||
this.pages = res.data.totalPage
|
||||
if (this.page < this.pages) {
|
||||
this.status = 'loadmore'
|
||||
} else {
|
||||
this.status = 'nomore'
|
||||
}
|
||||
if (this.page == 1) {
|
||||
this.wallpaperList = res.data.list
|
||||
} else {
|
||||
this.wallpaperList = [...this.wallpaperList, ...res.data.list]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.videoImg {
|
||||
width: 100%;
|
||||
padding-top: 20rpx;
|
||||
height: auto;
|
||||
|
||||
.videoImg-box {
|
||||
width: 686rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.videoImg-box-item {
|
||||
width: 49%;
|
||||
height: 500rpx;
|
||||
border-radius: 18rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user