12 Commits
wwz ... gh-ios

Author SHA1 Message Date
GaoHao
6d72021f87 更改随机名字 2024-12-23 19:38:39 +08:00
duan
b4be77303e 添加图片 2024-12-23 18:29:39 +08:00
duan
d2dbaa640d Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 18:21:26 +08:00
duan
942f93a77c 添加html内容 2024-12-23 18:21:17 +08:00
gyq
ecc0549cfc Merge branch 'ios' of e.coding.net:g-cphe0354/duanju/video_app into gyq 2024-12-23 18:19:05 +08:00
gyq
a78cc2ecf7 更改 2024-12-23 18:18:20 +08:00
duan
c8f7016f8d 添加图片 2024-12-23 18:17:54 +08:00
duan
9cbde62fd9 修改类名 2024-12-23 16:59:35 +08:00
GaoHao
54250730ce index文件夹修改 2024-12-23 16:38:42 +08:00
GaoHao
5a55632bc0 Merge branch 'ios' of https://e.coding.net/g-cphe0354/duanju/video_app into ios 2024-12-23 16:18:35 +08:00
GaoHao
267d1fcd9b index文件夹修改 2024-12-23 16:18:32 +08:00
GYJ
7b44d1f9fb pages 2024-12-23 15:50:21 +08:00
237 changed files with 14547 additions and 5744 deletions

272
App.vue
View File

@@ -1,36 +1,8 @@
<script>
import config from '@/common/config.js'
import {isH5Android} from '@/utils/app.js'
import {init} from '@/utils/init.js'
import {cacheClearAll} from '@/store/cashe.js'
import store from './store/index.js'
export default {
onLaunch: function() {
console.log('onLaunch')
cacheClearAll()
// #ifdef H5
//防止刷新过快
if(process.env.NODE_ENV === 'production'){
const prveTime=uni.getStorageSync('time')
const time=Date.now()
uni.setStorageSync('time',time)
if(prveTime&&time-prveTime<=2000){
uni.setStorageSync('isDisabledAll',true)
uni.request=()=>{
}
uni.removeStorageSync('prveTime')
return uni.showToast({
title:'休息一会儿吧,你刷新的太过频繁了!',
icon:'error'
})
}else{
uni.removeStorageSync('isDisabledAll')
}
}
// #endif
let that = this
// #ifdef MP-WEIXIN || MP-TOUTIAO
//是否开启小程序自动登录 881
@@ -301,6 +273,12 @@
// #endif
// setInterval(d => { //定时器,定时去调取聊天未读消息
// let userId = uni.getStorageSync('userId')
// if (userId) {
@@ -323,7 +301,36 @@
// }
// }, 3000);
//#ifdef H5
this.$u.get('/app/common/type/108').then(res => { //// 是否开启公众号自动登陆 108
if (res.code == 0 && res.data) {
if (res.data.value == '是') {
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
let openid = uni.getStorageSync('openId');
let userId = uni.getStorageSync('userId');
if (!userId) {
if (openid) {
that.$u.get('/app/Login/openid/login?openId=' + openid).then(
res => {
if (res.code == 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('userName', res.user.userName)
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user
.invitationCode)
}
});
}
}
}
}
}
});
//#endif
//#ifdef APP-PLUS
// APP检测更新 具体打包流程可以参考https://ask.dcloud.net.cn/article/35667
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
@@ -368,18 +375,8 @@
//请求后台接口 解析数据 对比版本
that.$Request.getT('/app/user/selectNewApp').then(res => {
res = res.data[0];
console.log(widgetInfo)
console.log(res)
let version;
if (uni.getSystemInfoSync().platform == 'android') {
version = res.version
}
if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion
}
version = res.version
// && uni.getSystemInfoSync().platform == 'android'
if (widgetInfo.version < version) {
if (widgetInfo.version < res.version) {
let downloadLink = '';
let androidLink = res.androidWgtUrl;
let iosLink = res.iosWgtUrl;
@@ -473,7 +470,7 @@
success: res => {
if (res.confirm) {
plus.runtime.openURL(config.APIHOST2 +
'/pages/login/appEq')
'/pages/ghtwwlkXYG/YEZelghNit')
return
uni.showLoading({
title: '下载中...',
@@ -547,7 +544,7 @@
success: res => {
if (res.confirm) {
plus.runtime.openURL(config.APIHOST2 +
'/pages/login/appEq')
'/pages/ghtwwlkXYG/YEZelghNit')
return
uni.showLoading({
title: '下载中...',
@@ -635,12 +632,6 @@
},
onShow: function() {
init()
// #ifdef H5
// isH5Android()
// #endif
console.log('App Show')
// #ifdef APP-PLUS
let userId = uni.getStorageSync('userId')
@@ -665,16 +656,191 @@
// uni.setStorageSync('kefu', res.data.value)
// }
// });
//微信小程序IOS系统支付功能开关 882
this.$u.get('/app/common/type/882').then(res => {
if (res.code == 0 && res.data) {
let value = res.data.value
const sysInfo = uni.getSystemInfoSync()
// #ifdef MP-WEIXIN
if (sysInfo.osName == 'ios') { //是ios系统
if (value == '是') { //开启
uni.setStorageSync('isWxIosPay', true)
} else { //关闭
uni.setStorageSync('isWxIosPay', false)
}
} else { //不是ios下直接打开
uni.setStorageSync('isWxIosPay', true)
}
// #endif
//不在微信小程序也直接打开
// #ifndef MP-WEIXIN
uni.setStorageSync('isWxIosPay', true)
// #endif
}
});
//是否开启苹果登录 833
this.$u.get('/app/common/type/833').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('checkIosLogin', res.data.value)
}
});
//是否开启苹果支付 834
this.$u.get('/app/common/type/834').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('checkIosPay', res.data.value)
}
});
//是否开启微信登录 835
this.$u.get('/app/common/type/835').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('checkWxLogin', res.data.value)
}
});
//是否开启手机号一键登录 836
this.$u.get('/app/common/type/836').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('checkPhoneLogin', res.data.value)
}
});
this.$u.get('/app/common/type/817').then(res => { //是否开启购买整部视频 817
if (res.code == 0 && res.data) {
uni.setStorageSync('zhengbu', res.data.value)
}
});
this.$u.get('/app/common/type/818').then(res => { //是否开启购买单集视频 818
if (res.code == 0 && res.data) {
uni.setStorageSync('danbu', res.data.value)
}
});
// 微信激励广告id 252
this.$u.get('/app/common/type/252').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('adUnitId', res.data.value)
}
});
// 播放类型 1:抖音云 2:三方云
this.$u.get('/app/common/type/821').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('playType', res.data.value)
}
});
// 是否开启看广告(微信) 251
this.$u.get('/app/common/type/251').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
uni.setStorageSync('isGuanggao', res.data.value)
}
}
});
// 是否开启看广告(抖音) 254
this.$u.get('/app/common/type/254').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
uni.setStorageSync('isGuanggaody', res.data.value)
}
}
});
this.$u.get('/app/common/type/202').then(res => { //客服配置 1 二维码客服 2 微信公众号客服 3电话客服
if (res.code == 0 && res.data) {
uni.setStorageSync('kefu', res.data.value)
}
});
this.$u.get('/app/common/type/206').then(res => { //客服电话
if (res.code == 0 && res.data) {
uni.setStorageSync('kefuPhone', res.data.value)
}
});
this.$u.get('/app/common/type/204').then(res => { //微信客服链接
if (res.code == 0 && res.data) {
uni.setStorageSync('kefuUrl', res.data.value)
}
});
this.$u.get('/app/common/type/203').then(res => { //微信客服appid
if (res.code == 0 && res.data) {
uni.setStorageSync('kefuAppId', res.data.value)
}
});
//会员开关
this.$u.get('/app/common/type/248').then(res => { //会员开关
if (res.code == 0 && res.data) {
uni.setStorageSync('isVips', res.data.value)
}
});
//热搜词 249
this.$u.get('/app/common/type/249').then(res => { //热搜词
if (res.code == 0 && res.data) {
uni.setStorageSync('moreSearch', res.data.value)
}
});
//安卓下载地址 49
this.$u.get('/app/common/type/49').then(res => { //热搜词
if (res.code == 0 && res.data) {
uni.setStorageSync('AppUrl', res.data.value)
}
});
//微信虚拟支付OfferID 823
this.$u.get('/app/common/type/823').then(res => { //热搜词
if (res.code == 0 && res.data) {
uni.setStorageSync('OfferID', res.data.value)
}
});
//微信虚拟支付环境0 米大师正式环境, 1 米大师沙箱环境) 824
this.$u.get('/app/common/type/824').then(res => { //热搜词
if (res.code == 0 && res.data) {
uni.setStorageSync('payEnv', res.data.value)
}
});
//充值提示 825
this.$u.get('/app/common/type/825').then(res => { //热搜词
if (res.code == 0 && res.data) {
uni.setStorageSync('moneyTips', res.data.value)
}
});
//是否开启卡密充值 855
this.$u.get('/app/common/type/855').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('kmPaySel', res.data.value)
}
});
//是否开启分类 849
this.$u.get('/app/common/type/849').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('homeTypeSel', res.data.value)
}
});
//是否开启收益充值余额 856
this.$u.get('/app/common/type/856').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('syPaySel', res.data.value)
}
});
//抖音im客服 857
this.$u.get('/app/common/type/857').then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('imId', res.data.value)
}
});
this.$u.get('/app/common/type/858').then(res => { //是否开启公众号充值
if (res.code == 0 && res.data) {
uni.setStorageSync('isAccountPay', res.data.value)
}
});
//抖音广告id
this.$u.get('/app/common/type/860').then(res => { //抖音广告
if (res.code == 0 && res.data) {
uni.setStorageSync('dyadUnitId', res.data.value)
}
});
// #ifdef H5
if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
//是否开启pc端使用 850
this.$u.get('/app/common/type/850').then(res => {
if (res.code == 0 && res.data && res.data.value === '否') {
if (window.location.href.indexOf('/pages/me/erweimaRegister') === -1) {
if (window.location.href.indexOf('/pages/iSiAnfghCC/ghhCPInfzi') === -1) {
uni.reLaunch({
url: '/pages/me/erweimaRegister'
url: '/pages/iSiAnfghCC/ghhCPInfzi'
})
}
}

View File

@@ -1,24 +1,14 @@
// APP
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg/"; //正式
// const ROOTPATH = "https://dj-api.hnsiyao.cn/czg/"; //后台服务域名
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/sqx_fast/"; //
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://video.hnsiyao.cn/czg/"; //测试
// const ROOTPATH = "https://video.hnsiyao.cn/czg/"; //后台服务域名
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
// h5
const ROOTPATH1 = "https://web.hnsiyao.cn/czg/"; //正式
const ROOTPATH = "https://web.hnsiyao.cn/czg/"; //后台服务域名
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg/"; //测试
// const ROOTPATH = "https://web-api.hnsiyao.cn/czg/"; //后台服务域名
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "http://192.168.1.41:8100/czg/"; //
// const ROOTPATH = "http://192.168.1.41:8100/czg/"; //后台服务域名
// const ROOTPATH2 = "http://192.168.1.41:8100"; //后台服务域名
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
// const ROOTPATH2 = "http://192.168.1.5:8100"; //后台服务域名
module.exports = {
APIHOST: ROOTPATH,

View File

@@ -63,7 +63,7 @@ const install = (Vue, vm) => {
let helpDet = (params = {}) => vm.$u.get('app/helpWord/selectHelpWordDetails', params); //帮助中心 详情
//获取视频
let selectCourseDetailsById = (params = {}) => vm.$u.get('app/course/courseSets', params);
let selectCourseDetailsById = (params = {}) => vm.$u.get('app/course/selectCourseDetailsById', params);
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下
vm.$u.api = {

View File

@@ -1,6 +1,5 @@
// 这里的vm就是我们在vue文件里面的this所以我们能在这里获取vuex的变量比如存放在里面的token变量
import {APIHOST} from './config.js'
import {cacheClearAll} from '@/store/cashe.js'
const install = (Vue, vm) => {
// 此为自定义配置参数,具体参数见上方说明
Vue.prototype.$u.http.setConfig({
@@ -27,8 +26,8 @@ const install = (Vue, vm) => {
// 所以哪怕您重新登录修改了Storage下一次的请求将会是最新值
const token = uni.getStorageSync('token');
config.header.token = token;
config.url=config.url.slice(0,1)==='/'?config.url.slice(1,config.url.length):config.url
// config.header.Token = 'xxxxxx';
// 可以对某个url进行特别处理此url参数为this.$u.get(url)中的url值
// if(config.url == '/user/login') config.header.noToken = true;
// 最后需要将config进行return
@@ -49,21 +48,10 @@ const install = (Vue, vm) => {
vm.$u.toast('验证失败,请重新登录');
setTimeout(() => {
// 此为uView的方法详见路由相关文档
vm.$u.route('/pages/login/login')
vm.$u.route('/pages/ghtwwlkXYG/wVghNzmqkQ')
}, 1500)
return false;
} else if (res.code == 401) {
// 获取当前页面实例
const pages = getCurrentPages();
// 获取当前页面的实例
const currentPage = pages[pages.length - 1];
// 获取页面路径
const pagePath = currentPage.route
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
// if ( pagePath == "pages/task/index") {
// return;
// }
// 假设201为token失效这里跳转登录
vm.$u.toast('验证失败,请重新登录');
uni.removeStorageSync("token")
@@ -76,9 +64,8 @@ const install = (Vue, vm) => {
uni.removeStorageSync("isInvitation")
uni.removeStorageSync("zhiFuBao")
uni.removeStorageSync("zhiFuBaoName")
cacheClearAll()
// 此为uView的方法详见路由相关文档
vm.$u.route('/pages/login/login')
vm.$u.route('/pages/ghtwwlkXYG/wVghNzmqkQ')
return false;
} else {
// 如果返回false则会调用Promise的reject回调

View File

@@ -1,17 +1,6 @@
import configdata from './config'
import cache from './cache'
import {
cacheClearAll,cacheClear
} from '@/store/cashe.js'
function successCallBack(url){
if(url.includes('app/courseCollect/insertCourseCollect')){
cacheClear('chasingDrama')
return
}
if(url.includes('app/user/updateUser') ){
cacheClear('renwu')
}
}
module.exports = {
config: function(name) {
var info = null;
@@ -45,9 +34,9 @@ module.exports = {
const pagePath = currentPage.route
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
// if ( pagePath == "pages/task/index") {
// return;
// }
if ( pagePath == "pages/task/index") {
return;
}
uni.removeStorageSync("token")
uni.removeStorageSync("userId")
uni.removeStorageSync("phone")
@@ -58,20 +47,19 @@ module.exports = {
uni.removeStorageSync("isInvitation")
uni.removeStorageSync("zhiFuBao")
uni.removeStorageSync("zhiFuBaoName")
cacheClearAll()
uni.showToast({
title: '用户信息失效,请重新登录!',
icon: 'none'
})
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
},
post: function(url, data, header) {
let that = this;
header = header || "application/x-www-form-urlencoded";
url = that.config("APIHOST") + url.replace(/^\//, "");
url = that.config("APIHOST") + url;
return new Promise((succ, error) => {
uni.request({
url: url,
@@ -83,8 +71,6 @@ module.exports = {
success: function(result) {
if (result.data.code == 401) {
that.logout();
}else{
successCallBack(url)
}
succ.call(self, result.data)
},
@@ -97,7 +83,7 @@ module.exports = {
postT: function(url, data, header) {
let that = this;
header = header || "application/x-www-form-urlencoded";
url = that.config("APIHOST1") + url.replace(/^\//, "");
url = that.config("APIHOST1") + url;
// let token = uni.getStorageSync("token");
let token = uni.getStorageSync("token");
if (token) {
@@ -146,7 +132,7 @@ module.exports = {
postJson: function(url, data, header) {
let that = this;
header = header || "application/json";
url = that.config("APIHOST1") + url.replace(/^\//, "");
url = that.config("APIHOST1") + url;
// let token = uni.getStorageSync("token");
let token = uni.getStorageSync("token");
if (token) {
@@ -162,11 +148,7 @@ module.exports = {
success: function(result) {
if (result.data.code == 401) {
that.logout();
}else{
successCallBack(url)
// cacheClear('chasingDrama')
}
succ.call(self, result.data)
},
fail: function(e) {
@@ -199,7 +181,7 @@ module.exports = {
getT: function(url, data, header) {
let that = this;
header = header || "application/x-www-form-urlencoded";
url = that.config("APIHOST1") + url.replace(/^\//, "");
url = that.config("APIHOST1") + url;
// let token = uni.getStorageSync("token");
let token = uni.getStorageSync("token");
if (token) {
@@ -319,8 +301,7 @@ module.exports = {
get: function(url, data, header) {
let that = this;
header = header || "application/x-www-form-urlencoded";
url = that.config("APIHOST") + url.replace(/^\//, "");
console.log(url);
url = that.config("APIHOST") + url;
return new Promise((succ, error) => {
uni.request({
url: url,
@@ -367,7 +348,7 @@ module.exports = {
get1: function(url, data, header) {
let that = this;
header = header || "application/json";
url = that.config("APIHOST") + url.replace(/^\//, "");
url = that.config("APIHOST") + url;
return new Promise((succ, error) => {
uni.request({
url: url,

View File

@@ -23,7 +23,7 @@
methods: {
goNav() {
uni.navigateTo({
url:'/pages/login/login'
url:'/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
}

View File

@@ -468,13 +468,35 @@
tipContent = `恭喜您,获得 ${name}${this.result.type==2?(this.result.number+'元'):''} `
}
const _this = this;
uni.showToast({
title: tipContent,
icon: 'none'
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
}
})
_this.getRedPack()
this.prizeing = false
},
// 抽奖转盘绘制完成
handleDrawFinish(res) {

View File

@@ -0,0 +1,175 @@
<template>
<view>
<u-popup v-model="show" mode="center" @close="close">
<view class="bg">
<view class="title">恭喜您获得</view>
<view class="goods">
<template v-if="result&&result.type==3">
<view class="u-flex u-col-center u-row-center">
<image style="height: 42px;" src="/static/red-pack.png" mode="heightFix"></image>
</view>
<view class="u-flex u-row-center">
<view class="type">物品</view>
</view>
</template>
<template v-if="result&&result.type==2">
<view class="u-flex color-money u-col-center u-row-center">
<view class="money">{{result.number}}</view>
<view class="font-bold" style="margin-top: 20rpx;"></view>
</view>
<view class="u-flex u-row-center">
<view class="type">现金红包</view>
</view>
</template>
</view>
<view class="u-flex u-row-center btn-box">
<view class="btn" @click="lingqu">立即领取</view>
</view>
</view>
<view class="u-flex u-row-center">
<u-icon name="close-circle" :size="54" @click="close" color="#fff"></u-icon>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
result: ''
}
},
methods: {
open(data) {
console.log(data);
this.result = data
this.show = true
},
lingqu() {
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.$emit('success')
this.close()
} else {
uni.showToast({
title: '领取失败',
icon: 'none'
})
}
})
},
close() {
this.show = false
if(!this.result){
return
}
const {
orderId,
id
} = this.result
this.$Request.postJson('app/discSpinning/receive', this.result).then(res => {
this.result = ''
console.log(res)
if (res.code == 0) {
this.$emit('success')
this.close()
} else {
}
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .u-mode-center-box {
background-color: transparent;
}
.color-money {
color: #E42F00;
}
.money {
font-weight: 700;
font-size: 72rpx;
letter-spacing: 2px;
}
.bg {
width: 628rpx;
height: 770rpx;
margin-right: 10rpx;
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-image: url("~static/images/zhuanpan/ling-qu.png");
position: relative;
@media (-webkit-min-device-pixel-ratio: 2),
(min-device-pixel-ratio: 2) {
background-image: url("~static/images/zhuanpan/ling-qu@2x.png");
}
.title {
position: absolute;
top: 238rpx;
text-align: center;
left: 0;
right: 0;
font-weight: 700;
font-size: 58rpx;
color: #AF6920;
letter-spacing: 4rpx;
}
.goods {
position: absolute;
top: 326rpx;
text-align: center;
left: 0;
right: 0;
text-align: center;
}
.type {
padding: 6rpx 28rpx;
border-radius: 100rpx;
background: #E25B41;
font-size: 28rpx;
color: #fff;
font-weight: bold;
}
.btn-box {
position: absolute;
top: 574rpx;
left: 0;
right: 0;
.btn {
padding: 10rpx 60rpx 10rpx 64rpx;
text-align: center;
font-weight: bold;
font-size: 44rpx;
color: #AF6920;
letter-spacing: 2px;
}
}
}
</style>

View File

@@ -6,7 +6,7 @@
<view class="goods">
<template v-if="result&&result.type==3">
<view class="u-flex u-col-center u-row-center">
<image style="height: 100px;" :src="result.img||result.url" mode="heightFix"></image>
<image style="height: 100px;" :src="result.img" mode="heightFix"></image>
</view>
<view class="u-flex u-row-center u-m-t-30">
<view class="type">{{result.name}}</view>
@@ -43,13 +43,35 @@
},
methods: {
open(data) {
console.log(data);
this.result = data
this.show = true
},
close() {
console.log('抽奖弹窗关闭');
this.show = false
this.$emit('close',key)
if(!this.result){
return
}
const {
orderId,
id
} = this.result
this.$Request.postJson('app/discSpinning/receive', this.result).then(res => {
this.result = ''
console.log(res)
if (res.code == 0) {
console.log('抽奖领取成功');
const key=res.data==0?'isBindAliPay':undefined
this.$emit('close',key)
if(key&&key=='isBindAliPay'){
uni.navigateTo({
url:'/me/invite/zhifubao'
})
}
} else {
}
})
}
}
}

View File

@@ -1,7 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<!-- <meta name="referrer" content="never"> -->
<script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script language="JavaScript" type="text/JavaScript">
/**

View File

@@ -237,13 +237,13 @@ export default {
{
icon: 'code',
title: '授权登录',
url: '/minePages/login',
url: '/minepages/ghtwwlkXYG',
author: '图鸟北北'
},
{
icon: 'code',
title: '消息通知',
url: '/minePages/message',
url: '/minepages/iSiAnfghCCssage',
author: '图鸟北北'
},
{

View File

@@ -2,8 +2,8 @@
"name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1",
"description" : "",
"versionName" : "1.2.2",
"versionCode" : 122,
"versionName" : "1.0.8",
"versionCode" : 108,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@@ -57,7 +57,7 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 26,
"minSdkVersion" : 28,
"targetSdkVersion" : 33,
"schemes" : "com.hnsiyao.duanju"
},
@@ -85,15 +85,14 @@
},
"oauth" : {
"apple" : {},
"univerify" : {},
"weixin" : {
"appid" : "wxeaffcaea958472d3",
"appsecret" : "32f6f3ce599abff2fa0191a36780c66c",
"UniversalLinks" : "https://maxiong.xianmxkj.com/"
},
"univerify" : {}
},
"ad" : {
"gdt" : {}
}
},
"ad" : {},
"push" : {
"unipush" : {}
}

1304
me/FrdwbsihPr/FrdwbsihPr.vue Normal file

File diff suppressed because it is too large Load Diff

View 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="zdwbUQKCny">
<view class="zdwbUQKCny-title">
{{item.title}}
</view>
<view class="zdwbUQKCny-content">
{{item.content}}
</view>
<view class="zdwbUQKCny-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="jwdSnCdwbd">
<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;
.zdwbUQKCny {
width: 686rpx;
height: 100%;
border-radius: 24rpx;
background-color: #ffffff;
padding: 20rpx;
}
.zdwbUQKCny-title {
width: 100%;
font-size: 32rpx;
font-weight: bold;
}
.zdwbUQKCny-content {
width: 100%;
margin-top: 20rpx;
}
.zdwbUQKCny-time {
width: 100%;
margin-top: 20rpx;
color: #999999;
text {
color: #000;
font-size: 32rpx;
font-weight: bold;
}
}
}
.jwdSnCdwbd {
margin: 20rpx 0;
}
</style>

1264
me/FrdwbsihPr/vkRFXBdwbe.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img wgrqgyqaGW" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img tgyqnoNIkz" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (2).jpg" mode="widthFix"></image>
<image class="img fKrjgyqjVb" src="/static/kigqHbgyqpImg/3_gya_65ae131b5480bb88f4e22e3ab3e3bdd242369bb3337eb-uAYvce_fw1200 (3).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,265 @@
<template>
<view>
<view class="dngyqWXoYJ flex align-center justify-between">
<view class="dngyqWXoYJ-l">
<view class="dngyqWXoYJ-l-t">
当前余额
</view>
<view class="dngyqWXoYJ-l-b">
{{amount || '0.00'}}
</view>
</view>
<view class="dngyqWXoYJ-r" @click="gyqNlYjIdi()">
提现
</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'
}
})
},
gyqNlYjIdi() {
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;
}
.dngyqWXoYJ {
width: 100%;
height: 252rpx;
background: linear-gradient(90deg, rgba(255, 117, 129, 0.6) 0%, #ff7581 100%);
padding: 0 40rpx;
.dngyqWXoYJ-l-t {
color: #ffffff;
font-size: 28rpx;
}
.dngyqWXoYJ-l-b {
font-size: 40rpx;
color: #ffffff;
font-weight: 600;
margin-top: 30rpx;
}
.dngyqWXoYJ-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>

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img gyqiDFJCLw" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img QiXUNgyqsr" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (1).png" mode="widthFix"></image>
<image class="img gzgyqstCwR" src="/static/kigqHbgyqpImg/4_gya_877066d6fe1d981fb2806fa73f8933c08fd096807d53-KjdBwJ_fw1200 (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,769 @@
<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>

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img aKuVgyqZld" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (2).jpg" mode="widthFix"></image>
<image class="img FzgyqnBCWa" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (2).png" mode="widthFix"></image>
<image class="img gyqKnjNYWl" src="/static/kigqHbgyqpImg/8_gyq_84aa5cdd4fcc7e45ab73f90340c21ddccea9c46aa862df-evUZAv_fw1200 (3).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,23 @@
<template>
<view class="gyqSxFeTGt">
<image class="img aKuVgyqZld" src="/static/kigqHbgyqpImg/7_gyq_u=3804008751,3868615245&fm=253&gp=0 (1).jpg" mode="widthFix"></image>
<image class="img xgyqUNWyDH" src="/static/kigqHbgyqpImg/7_gyq_u=3804008751,3868615245&fm=253&gp=0 (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

BIN
me/XxSqJQgyqr/IMG_6962.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
me/XxSqJQgyqr/IMG_6963.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

BIN
me/XxSqJQgyqr/IMG_6964.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
me/XxSqJQgyqr/IMG_6965.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
me/XxSqJQgyqr/IMG_7027.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img RgyqPLhzoI" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (1).jpg" mode="widthFix"></image>
<image class="img LnFPgyqajB" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (1).png" mode="widthFix"></image>
<image class="img rgyqGCwOzS" src="/static/kigqHbgyqpImg/9_gyq_008f8a862e4f38a61dba867fbeb5d46e57abc9771df0c-aEbMiF (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,301 @@
<template>
<view class="page-box koOgyqsjHP">
<view class="RIBgyqOkBe" v-if="courseList.length" v-for="(item, index) in courseList" :key="index"
@click="gyqyybWVhZ(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();
})
},
// 跳转资源详情
gyqyybWVhZ(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;
}
.RIBgyqOkBe {
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>

View File

@@ -0,0 +1,27 @@
<template>
<view class="gyqSxFeTGt">
<image class="img CBKwkqgyqg" src="./asz.JPG" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6962.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6963.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6964.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6965.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_7027.jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img CBKwkqgyqg" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (1).jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (1).png" mode="widthFix"></image>
<image class="img eZRgyqUbKP" src="/static/kigqHbgyqpImg/10_gyq_42b9ecd11b66a8b5f0bd02bc1b6858142b9732cb28873-pW7yzw (2).png" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -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

View File

@@ -34,7 +34,7 @@
<!-- <button @click="showLingPop">showLingPop</button> -->
<almost-lottery :lottery-size="lotteryConfig.lotterySize" :action-size="lotteryConfig.actionSize"
:selfTime="selfTime"
:ring-count="8" :duration="3.5" :self-rotaty="false" :img-circled="true" :canvasCached="true"
: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" />
@@ -440,23 +440,21 @@
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) {
this.prizeing = false
return uni.showToast({
title: res.msg||'请求抽奖失败',
icon:'none'
title: res.msg
})
}
this.freeNum--
this.result=res.data
let list = [...this.prizeList]
// 这里随机产生的 prizeId 是模拟后端返回的 prizeId
const arr=list.filter(v=>v.type==res.data.type&&res.data.name==v.name)
const arr=list.filter(v=>v.type==res.data.type)
let prizeId = arr[0].prizeId
this.result={...this.result,url:arr[0].url}
// 拿到后端返回的 prizeId 后,开始循环比对得出那个中奖的数据
for (let i = 0; i < list.length; i++) {
let item = list[i]
@@ -479,21 +477,43 @@
if (name.type ==1) {
tipContent = '很遗憾,没有中奖,请再接再厉!'
uni.showToast({
title: tipContent,
icon: "none"
})
} else {
tipContent = `恭喜您,获得 ${name}${this.result.type==2?(this.result.number+'元'):''} `
this.showLingPop({...this.result})
const cacheData={...this.result}
// setTimeout(()=>{
// this.$Request.postJson('app/discSpinning/receive',cacheData )
// },1000)
}
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) {
@@ -535,7 +555,6 @@
this.getRedPack()
},
showLingPop(data){
console.log(data);
this.$refs.refLingqu.open(data)
}
},
@@ -546,10 +565,8 @@
}
this.prizeList = []
this.getCount()
this.getPrizeList()
},
onShow() {
this.getRedPack()
this.getPrizeList()
},
onUnload() {
uni.hideLoading()
@@ -558,9 +575,6 @@
</script>
<style lang="scss" scoped>
.min-page{
min-height: 100vh;
}
.btn-group {
position: absolute;
left: 0;

View File

@@ -67,7 +67,7 @@
},
goDet(e) {
uni.navigateTo({
url: '/pages/index/course/courseDet?id=' + e
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
})
}
},

View File

@@ -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"
})
}

View File

@@ -1,7 +1,7 @@
<template>
<view class="detail">
<list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true"
:scrollable="true">
:scrollable="true">
<cell v-for="(item,i) in videoList" :key="i" :ref="'list'+item.courseDetailsId">
<view class="swipers-items" @longpress="openBs()" @disappear="disappear(item.courseDetailsId,i)"
@appear="appear(item.courseDetailsId,i)" :style="boxStyle">
@@ -133,7 +133,7 @@
</view>
</uni-popup>
<!-- 购买弹窗 -->
<uni-popup ref="popupPya" @change="popupPyaClose" :safe-area="false">
<uni-popup ref="popupPya" :safe-area="false">
<view class="pay">
<view class="list-title">
<view class="list-title-l">
@@ -150,18 +150,6 @@
{{getRedEnvelopeTips}}
</text>
<view class="pay-content">
<view class="pay-content-item" v-if="info&&info.price" @click="payVideo(2,'all')">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
{{info.price}}元解锁全剧
</text>
</view>
<view class="pay-content-item" v-if="info&&info.wholesalePrice" @click="payVideo(2,10)">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
{{info.wholesalePrice}}元解锁10集视频
</text>
</view>
<view class="pay-content-item" @click="payVideo(1)">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
@@ -173,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">
开通会员
@@ -323,7 +311,6 @@
</template>
<script>
let backTimer=null
const listDom = uni.requireNativePlugin('dom')
import config from '../../common/config.js'
import httpsRequest from '../../common/httpRequest.js'
@@ -372,7 +359,7 @@
num: 1, //当前播放的集数
showPay: false, //购买视频的弹窗
info: {}, //整部的信息
courseDetailsId: null, //详情id
courseDetailsId: '', //详情id
scrollIntoView: '', //当前播放视频的位置
scrollIntoViews: 'video0', //当前播放视频的位置
isVips: '否', //是否显示会员
@@ -407,11 +394,7 @@
getRedEnvelopeTips: '',
scale: 1,
// 防抖使用的变量
appearTimeout: null,
isOrder: true,
isGetDataList: false,
dianzanTimer:null,
zhuijuTimer:null
appearTimeout: null
};
},
onUnload() {
@@ -421,6 +404,7 @@
}
},
onShow() {
// console.log('onSHow video');
//当应用从后台进入前台时自动播放
if (this.videoContext) {
this.videoContext.play()
@@ -435,7 +419,7 @@
if (data.flag == true) {
that.showPay = false
that.getDataList(that.courseId, that.courseDetailsId, true);
// that.getMyLoveStatus()
that.getMyLoveStatus()
that.getMoneyList()
that.getMyMoney()
}
@@ -515,19 +499,7 @@
})
this.getScale()
},
onBackPress() {
console.log('onBackPress')
const {
courseId,
courseDetailsId,
videoUrl
} = this.videoList[this.current]
if (videoUrl) {
this.setHistor(courseId, courseDetailsId, true)
}
},
onLoad(e) {
this.courseDetailsId=e.courseDetailsId
//是开启整部购买
this.zhengbu = uni.getStorageSync('zhengbu') ? uni.getStorageSync('zhengbu') : '否'
//是否开启单集购买
@@ -550,17 +522,22 @@
// 记录跳转过来的视频总id跟单集id
if (e.id) {
this.courseId = e.id;
// this.getMyLoveStatus()
if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId)
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
} else {
console.log("allId=====" + e.allId)
console.log("allId====="+e.allId)
if (e.allId) {
const arr = e.allId.split('-')
this.courseId = arr[0];
// this.getMyLoveStatus()
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
@@ -572,10 +549,6 @@
}
},
onHide() {
console.log('onHide')
clearTimeout(backTimer)
},
methods: {
/**
* 获取金币比例
@@ -589,12 +562,10 @@
},
//播放时的回掉
videoPlay(videoId, courseDetailsId) {
console.log(courseDetailsId)
// this.courseDetailsId = courseDetailsId
if (!this.playFlag) {
this.playFlag = true
if (this.isGetDataList) {
this.getDataList(this.courseId, courseDetailsId, true);
}
this.isGetDataList = true;
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: courseDetailsId,
@@ -613,7 +584,7 @@
this.playFlag = false
httpsRequest.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.videoList[this.current].courseDetailsId,
courseDetailsId: this.courseDetailsId,
type: 'end'
}).then(res => {
console.log('播放结束')
@@ -623,37 +594,34 @@
},
appear(e, index) {
this.playFlag = false
this.courseDetailsId = e;
// 清除已经设置的定时器
clearTimeout(this.appearTimeout);
// 设置一个新的延迟执行的定时器
this.appearTimeout = setTimeout(() => {
// 实际要执行的操作
console.log('页面出现在视图中');
// 这里可以加入你需要执行的代码
console.log("appear===" + e)
console.log("appear===" + index)
console.log("appear==="+e)
console.log("appear==="+index)
// this.courseDetailsId = e
console.log(e)
this.current = index
this.showControls = true
this.isShowVideo = e
this.scrollIntoViews = 'video' + index
this.scrollIntoView = 'video' + index
console.log(this.scrollIntoViews, '当前位置')
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId);
//播放并更新video的上下文
this.startPlay(index)
this.startPlay(index)
//插入历史记录
this.setHistor(this.videoList[index].courseId, this.videoList[index].courseDetailsId);
this.$forceUpdate()
}, 500); // 延迟500毫秒执行
},
disappear(e, index) {
// if (this.videoContext) { //判断之前是否有视频的上下文
// this.videoContext.stop();
// this.videoContext = null;
@@ -827,22 +795,11 @@
// APP支付宝支付
console.log('nvue payType=' + paytype);
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
console.log(ret);
// plus.runtime.openURL(ret.data.h5Url)
if (ret.code == 0) {
uni.hideLoading()
uni.navigateTo({
url: '/pages/pays/pays?ordersId=' + this.ordersId + '&url=' + ret.data
.h5Url
});
} else {
uni.hideLoading()
uni.showToast({
icon: "none",
title: res.msg
});
}
uni.navigateTo({
url: '/pages/itkXJghyII/hLUkghGDXH?ordersId=' + this.ordersId + '&url=' + ret.data.h5Url
});
// uni.navigateTo({
// url: '/pages/index/webView?ordersId='+this.ordersId+'url=' + ret.data.h5Url
@@ -1039,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,
@@ -1058,80 +1015,47 @@
})
} else {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
},
popupPyaClose() {
this.isOrder = true
console.log(this.isOrder)
},
/**
* @param {Object} type 类型
* 1:购买整部视频
* 2:购买单集视频
*/
payVideo(type, num) {
console.log(this.isOrder)
if (!this.isOrder) {
return;
}
uni.showLoading({
title: '加载中'
})
this.isOrder = false
payVideo(type) {
if (uni.getStorageSync('token')) {
this.submitPay(type, num)
this.submitPay(type)
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
//使用金币购买
submitPay(type, num) {
submitPay(type) {
let data = {
courseId: this.courseId
}
if (!num) {
console.log('进入num');
//单集解锁
data.courseDetailsId = this.videoList[this.current].courseDetailsId
}
console.log(this.current)
console.log(data)
this.setHistor()
httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
'/app/order/insertCourseOrders', data).then(res => {
console.log(res)
data.courseDetailsId = this.videoList[this.current].courseDetailsId
httpsRequest.getT('/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
if (res.status && res.status == 1) {
uni.hideLoading()
this.showPay = false //关闭购买选择弹窗
this.isOrder = true
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
true);
return;
} else {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
if (type == 1) { //金币
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else if (type == 2) { //支付宝
uni.hideLoading()
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
}
if (type == 1) { //金币
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else if (type == 2) { //支付宝
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
}
console.log(this.isOrder)
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
this.isOrder = true
uni.showToast({
title: res.msg,
icon: 'none'
@@ -1145,7 +1069,6 @@
httpsRequest.postT("/app/order/payOrders", {
orderId: orderId,
}).then(res => {
console.log("orderIds==", res)
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
@@ -1173,7 +1096,6 @@
// this.payPrice = payMoney //需要支付的价格
// this.openPopusPay() //显示充值弹窗
}
this.isOrder = true
});
},
//打开购买弹窗
@@ -1187,12 +1109,11 @@
},
//关闭购买弹窗
closePay() {
console.log(1)
this.$refs.popupPya.close()
},
//选择播放
selectPlay(item, type) {
if (this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type) {
selectPlay(item,type) {
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
return;
}
@@ -1225,26 +1146,19 @@
//收藏
shoucang() {
if (uni.getStorageSync('token')) {
this.isCollect=!this.isCollect
let data = {
courseId: this.courseId,
classify: 1,
type: this.isCollect? 1 : 0
type: this.isCollect == false ? 1 : 0
}
clearTimeout(this.zhuijuTimer)
this.zhuijuTimer=setTimeout(()=>{
clearTimeout(this.zhuijuTimer)
this.zhuijuTimer=null;
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
// this.getMyLoveStatus()
}
})
},500)
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
this.getMyLoveStatus()
}
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@@ -1258,26 +1172,20 @@
classify: 2,
type: item.isGood == 0 ? 1 : 0
};
if (data.type == 1) {
item.isGood = 1;
item.goodNum += 1;
} else {
item.isGood = 0;
item.goodNum -= 1;
}
clearTimeout(this.dianzanTimer)
this.dianzanTimer = null
this.dianzanTimer = setTimeout(() => {
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
if (data.type == 1) {
item.isGood = 1;
item.goodNum += 1;
} else {
item.isGood = 0;
item.goodNum -= 1;
}
})
}, 500)
}
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@@ -1285,9 +1193,9 @@
//播放结束后播放下一集
ended() {
if (this.current < this.videoList.length - 1) {
// this.current += 1
this.$nextTick(() => {
this.current += 1
let courseDetailsId = this.videoList[this.current].courseDetailsId
let courseDetailsId = this.videoList[this.current + 1].courseDetailsId
console.log(courseDetailsId, '开始移动了')
const el = this.$refs['list' + courseDetailsId][0]
listDom.scrollToElement(el, {})
@@ -1334,7 +1242,7 @@
animated: false
})
_this.$forceUpdate()
console.log('移动结束', el)
console.log('移动结束', el)
// },1000)
})
},
@@ -1354,34 +1262,21 @@
*/
getDataList(courseId, courseDetailsId, type, t) {
let data = {
courseId: courseId,
id: courseId,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
};
httpsRequest.getT('/app/course/courseSets', data).then(res => {
console.log('getDataList')
console.log(res)
if(res.code==401){
// uni.showToast({
// title: '请先登录',
// icon: 'none'
// })
return
}
httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => {
if (res.code == 0) {
this.isCollect = res.data.collect ? true : false;
courseDetailsId=(courseDetailsId&&courseDetailsId!=='null')?courseDetailsId: res.data.current.courseDetailsId
this.courseDetailsId = courseDetailsId
if (res.data.list) {
if (res.data.listsDetail) {
this.info = res.data;
this.title = this.info.title;
const arr = res.data.list
const indexs = arr.findIndex(v => v.courseDetailsId == (courseDetailsId ?
courseDetailsId : res.data.current.courseDetailsId));
//如果未找到将current值改为0否则会导致选集无法弹窗弹窗后点击相对应集数也无反应
this.current = indexs === -1 ? 0 : indexs;
let arr = JSON.parse(JSON.stringify(res.data.listsDetail));
const indexs = arr.findIndex(menu => menu.courseDetailsId ===
Number(courseDetailsId));
this.current = indexs
this.scrollIntoViews = 'video' + indexs
this.scrollIntoView = 'video' + indexs
console.log(this.current)
// this.scrollIntoView = 'video' + indexs
arr.map((item, index) => {
item.num = index + 1;
@@ -1428,22 +1323,6 @@
this.videoContext.play();
}
})
} else {
console.log('播放')
this.$nextTick(() => {
console.log('myVideo' + courseDetailsIds)
this.videoContextId = 'myVideo' + courseDetailsIds;
this.videoContext = uni.createVideoContext(this
.videoContextId,
this);
if (this.videoList[this.current].videoUrl) {
this.videoContext.play();
} else {
console.log("播放失败")
this.getDataList(this.courseId, courseDetailsIds, true);
}
})
}
// console.log('this.noBuyVideoIndex', this.noBuyVideoIndex)
@@ -1489,8 +1368,8 @@
this.$forceUpdate();
})
}
if (t == 'select') {
this.selectPlay(this.videoList[this.current], true)
if ( t == 'select') {
this.selectPlay(this.videoList[this.current],true)
}
this.$forceUpdate();
}
@@ -1500,8 +1379,7 @@
title: '加载失败',
icon: 'none'
})
clearTimeout(backTimer)
backTimer= setTimeout(() => {
setTimeout(() => {
uni.navigateBack();
}, 1000)
}
@@ -1517,22 +1395,8 @@
})
},
//插入观看记录
setHistor(courseId, courseDetailsId, now) {
clearTimeout(this.timer)
setHistor(courseId, courseDetailsId) {
if (uni.getStorageSync('token')) {
clearTimeout(this.timer)
if (now) {
let data = {
courseId: courseId,
courseDetailsId: courseDetailsId,
classify: 3,
type: 1
};
console.log(data, '记录了')
httpsRequest.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {})
return
}
let data = {
courseId: courseId,
courseDetailsId: courseDetailsId,

View File

@@ -13,8 +13,8 @@
@waiting="waiting()" object-fit="cover" v-if="current === index && item.videoUrl"
:play-strategy="2" :show-loading="true" codec="software" :muted="false"
:show-center-play-btn="true" :loop="false" @ended="ended"
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)"
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
@play="videoPlay('myVideo'+item.courseDetailsId)" :enable-progress-gesture="false"
:poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :autoplay="item.autoPlay"
class="swipers-items-video"></video>
<!-- #endif -->
@@ -23,7 +23,7 @@
@controlstoggle="controlstoggles" @timeupdate="timeupdate" @waiting="waiting()"
object-fit="cover" v-if="current === index && item.videoUrl" :play-strategy="2"
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="false"
@ended="ended" @play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)"
@ended="ended" @play="videoPlay('myVideo'+item.courseDetailsId)"
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :autoplay="item.autoPlay"
class="swipers-items-video" @contextmenu.prevent="disableContextMenu"></video>
@@ -41,8 +41,8 @@
<!-- #endif -->
<!-- :autoplay="item.autoPlay" -->
<!-- 没有视频权限则显示封面图 -->
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true"
:src="item.titleImg" class="swipers-items-imgsbg" mode="aspectFill"></image>
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true" :src="item.titleImg"
class="swipers-items-imgsbg" mode="aspectFill"></image>
<!-- 返回图标 -->
<!-- #ifndef MP-TOUTIAO -->
<view @click.stop="goBack()" style="color: #ffffff;">
@@ -84,7 +84,7 @@
<image src="../../static/images/me/share.png" mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
分享
分享{{current}}
</view>
</view>
<!-- #endif -->
@@ -103,7 +103,7 @@
<image src="../../static/images/me/shuqian.png" style="height: 60rpx;" mode=""></image>
</view>
<view class="swipers-items-right-item-txt">
追剧
追剧{{index}}
</view>
</view>
</view>
@@ -188,8 +188,8 @@
<!-- 购买视频 -->
<u-popup :closeable="true" :custom-style="customStyle" :safe-area-inset-bottom="true" close-icon="close"
close-icon-size="30" @close="popupPyaClose" close-icon-color="#333333" :mask-custom-style="maskCustomStyle"
v-model="showPay" border-radius="24" mode="bottom">
close-icon-size="30" close-icon-color="#333333" :mask-custom-style="maskCustomStyle" v-model="showPay"
border-radius="24" mode="bottom">
<view class="list" :style="listStyle">
<view class="list-title flex align-center">
<!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> -->
@@ -199,31 +199,19 @@
{{getRedEnvelopeTips}}
</view>
<view class="list-item" v-if="info&&info.price">
<view class="list-item-box flex align-center justify-center" @click="payVideo(2,'all')">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{info.price}}元解锁全剧
</view>
</view>
<view class="list-item" v-if="info&&info.wholesalePrice">
<view class="list-item-box flex align-center justify-center" @click="payVideo(2,10)">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{info.wholesalePrice}}元解锁10集视频
</view>
</view>
<view class="list-item">
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{countPrice*scale}}金币解锁单集视频
</view>
</view>
<view class="list-item">
<view class="list-item" v-if="danbu === '是' && isWxIosPay == true">
<view class="list-item-box" @click="payVideo(2)">
{{countPrice}}元解锁单集视频
</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-->
@@ -321,9 +309,7 @@
import {
returnIsSafari
} from '@/utils/app.js'
import {
cacheClear
} from '@/store/cashe.js'
export default {
components: {
tkiQrcode,
@@ -331,7 +317,6 @@
},
data() {
return {
timer: null,
isSafari: returnIsSafari(),
//记录未购买视频索引
noBuyVideoIndex: null,
@@ -422,7 +407,7 @@
num: 1, //当前播放的集数
showPay: false, //购买视频的弹窗
info: {}, //整部的信息
courseDetailsId: null, //详情id
courseDetailsId: '', //详情id
scrollIntoView: '', //当前播放视频的位置
scrollIntoViews: 'video0', //当前播放视频的位置
isVips: '否', //是否显示会员
@@ -448,10 +433,6 @@
playFlag: false,
getRedEnvelopeTips: '',
scale: 1,
isOrder: true,
isGetDataList: false,
dianzanTimer: null,
zhuijuTimer:null
};
},
onShareAppMessage(res) {
@@ -537,8 +518,8 @@
// #endif
},
onLoad(e) {
this.courseDetailsId=e.courseDetailsId
//在苹果系统微信小程序是否开启支付
this.isWxIosPay = uni.getStorageSync('isWxIosPay')
//是开启整部购买
@@ -579,7 +560,7 @@
this.tt_episode_id = scene[5]
}
this.getDataList(this.courseId, this.courseDetailsId);
// this.getMyLoveStatus()
this.getMyLoveStatus()
}
this.isGuanggao = uni.getStorageSync('isGuanggao') //微信
this.isGuanggaody = uni.getStorageSync('isGuanggaody') //抖音
@@ -605,7 +586,11 @@
}
if (e.id) {
this.courseId = e.id
// this.getMyLoveStatus()
if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId, '跳转进来的id')
this.getMyLoveStatus()
}
if (e.tt_album_id) {
this.tt_album_id = e.tt_album_id
@@ -626,7 +611,7 @@
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
// this.getMyLoveStatus()
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
@@ -643,9 +628,6 @@
// });
},
onHide() {
//恢复录屏
// #ifdef MP-TOUTIAO
tt.enableUserScreenRecord({
@@ -671,7 +653,8 @@
// #endif
},
onShow() {
console.log('onSHow video');
//当应用从后台进入前台时自动播放
if (this.videoContext) {
this.videoContext.play()
@@ -680,9 +663,11 @@
if (noBuyVideoIndex !== null && noBuyVideoIndex !== undefined) {
this.noBuyVideoIndex = noBuyVideoIndex
}
try {
this.playType = Number(uni.getStorageSync('playType'))
} catch (e) {
//TODO handle the exception
this.playType = 1
}
let that = this
@@ -735,6 +720,7 @@
// #endif
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
if (this.courseId) {
console.log('has this.courseId getDataList()');
this.getDataList(this.courseId, this.courseDetailsId);
}
this.$Request.getT('app/course/getRedEnvelopeTips').then(res => {
@@ -762,7 +748,7 @@
this.meunTop = 37
// #endif
// const windowResizeCallback = (res) => {
// console.log('变化后的窗口宽度=' + res.size.windowWidth)
// console.log('变化后的窗口高度=' + res.size.windowHeight)
@@ -777,17 +763,6 @@
// #endif
},
onBackPress() {
console.log('onBackPress')
const {
courseId,
courseDetailsId,
videoUrl
} = this.videoList[this.current]
if (videoUrl) {
this.setHistor(courseId, courseDetailsId, true)
}
},
watch: {
//监听当前播放的集数
current() {
@@ -869,7 +844,7 @@
event.preventDefault();
},
//点击封面打开弹窗
openShowPay(val, inx, url) {
openShowPay(val,inx,url) {
console.log(val)
console.log(inx)
console.log(url)
@@ -1112,7 +1087,7 @@
let token = this.$queue.getData('token');
if (!token) {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
return;
}
@@ -1143,7 +1118,7 @@
this.playFlag = false
this.$Request.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.videoList[this.current].courseDetailsId,
courseDetailsId: this.courseDetailsId,
type: 'end'
}).then(res => {
console.log('播放结束')
@@ -1284,11 +1259,7 @@
* 1:购买整部视频
* 2:购买单集视频
*/
payVideo(type, num) {
if (!this.isOrder) {
return;
}
this.isOrder = false
payVideo(type) {
if (uni.getStorageSync('token')) {
// #ifdef MP-TOUTIAO
if (!this.checked) {
@@ -1299,10 +1270,10 @@
return
}
// #endif
this.submitPay(type, num)
this.submitPay(type)
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@@ -1310,68 +1281,47 @@
//子组件支付成功的回调
paySuccess(data) {
console.log(data)
this.setHistor(this.courseId, this.videoList[this.current].courseDetailsId, true)
// data.h5Url 跳转地址
this.showMoney = false //显示充值弹窗
uni.setStorageSync('noBuyVideoIndex', this.current)
// 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
window.location.href = data.h5Url
// #endif
cacheClear(['renwu', 'user'])
},
//自组件关闭的回调
closeMoney(data) {
this.showMoney = data
},
popupPyaClose() {
this.isOrder = true
console.log(this.isOrder)
},
//使用金币购买
submitPay(type, num) {
submitPay(type) {
let data = {
courseId: this.courseId
}
if (!num) {
console.log('进入num');
//单集解锁
data.courseDetailsId = this.videoList[this.current].courseDetailsId
}
this.$Request.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
'/app/order/insertCourseOrders', data).then(res => {
data.courseDetailsId = this.videoList[this.current].courseDetailsId
this.$Request.getT('/app/order/insertCourseOrders', data).then(res => {
if (res.code == 0) {
if (res.status && res.status == 1) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
console.log(type)
if (type == 1) { //金币
// this.showPay = false
// this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
} else if (type == 2) { //支付宝
this.showPay = false //关闭购买选择弹窗
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
true);
return;
} else {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
if (type == 1) { //金币
// this.showPay = false
// this.showMoney = false
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
} else if (type == 2) { //支付宝
this.showPay = false //关闭购买选择弹窗
this.isOrder = true
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.showMoney = true //显示充值弹窗
}
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.showMoney = true //显示充值弹窗
}
} else {
this.isOrder = true
uni.showToast({
title: res.msg,
icon: 'none'
@@ -1392,7 +1342,6 @@
icon: 'none'
})
that.showPay = false
this.isOrder = true
that.showMoney = false
that.noBuyVideoIndex = null
setTimeout(() => {
@@ -1421,7 +1370,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@@ -1429,26 +1378,19 @@
//收藏
shoucang() {
if (uni.getStorageSync('token')) {
this.isCollect=!this.isCollect
let data = {
courseId: this.courseId,
classify: 1,
type: this.isCollect == true ? 1 : 0
type: this.isCollect == false ? 1 : 0
}
clearTimeout(this.zhuijuTimer)
this.zhuijuTimer = setTimeout(() => {
clearTimeout(this.zhuijuTimer)
this.zhuijuTimer = null;
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
// this.getMyLoveStatus()
}
})
}, 500)
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
this.getMyLoveStatus()
}
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@@ -1462,27 +1404,20 @@
classify: 2,
type: item.isGood == 0 ? 1 : 0
}
if (data.type == 1) {
item.isGood = 1
item.goodNum += 1
} else {
item.isGood = 0
item.goodNum -= 1
}
clearTimeout(this.dianzanTimer)
this.dianzanTimer = null
this.dianzanTimer = setTimeout(() => {
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
if (res.code == 0) {
if (data.type == 1) {
item.isGood = 1
item.goodNum += 1
} else {
item.isGood = 0
item.goodNum -= 1
}
})
}, 500)
}
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
@@ -1495,7 +1430,6 @@
this.num = item.num
}
})
this.playFlag = false
},
//选择集数后在更新剩下的数据
setVideoList(index) {
@@ -1528,17 +1462,18 @@
this.$forceUpdate()
},
//选择播放
selectPlay(item, type) { //price //videoUrl
selectPlay(item,type) {//price //videoUrl
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
this.videoList = [this.meunList[index]]
this.current = 0
if (this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type) {
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
return;
}
//重新计算一下当前观看的是哪个视频
this.comNumVideo()
this.setWxUrl()
// 把选择的视频的自动播放设置为true
this.videoList[this.current].autoPlay = true
//让当前选择的视频播放
@@ -1568,26 +1503,24 @@
},
// 资源详情
getDataList(id, courseDetailsId, type, t) {
console.log('getDataList');
let data = {
courseId: id
id,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
}
// // #ifdef MP-WEIXIN
// data.courseDetailsId = courseDetailsId
// // #endif
this.$u.api.selectCourseDetailsById(data).then(res => {
if (res.code == 0) {
this.isCollect = res.data.collect ? true : false;
console.log(this.isCollect);
if (res.data && res.data.dyCourseId) {
this.dyCourseId = "" + res.data.dyCourseId;
console.log("dyCourseId__" + this.dyCourseId)
}
// if (res.data && res.data.courseDetailsId && !this.courseDetailsId && !courseDetailsId) {
// this.courseDetailsId = res.data.courseDetailsId
// courseDetailsId = res.data.courseDetailsId
// }
courseDetailsId=(courseDetailsId&&courseDetailsId!=='null')?courseDetailsId: res.data.current.courseDetailsId
this.courseDetailsId = courseDetailsId
if (res.data.list) {
if (res.data.listsDetail) {
this.info = res.data
this.title = this.info.title
let arr = res.data.list
let arr = res.data.listsDetail
arr.map((item, index) => {
item.num = index + 1
// #ifdef MP-TOUTIAO
@@ -1612,6 +1545,7 @@
this.videoList[this.current].videoUrl = item.videoUrl
//自动播放
this.startPlay(this.current)
this.setWxUrl()
return true
}
})
@@ -1623,31 +1557,27 @@
}
})
})
if (this.noBuyVideoIndex !== null && this.noBuyVideoIndex !==
undefined && this.noBuyVideoIndex !== '') {
console.log('获取转盘抽奖次数')
this.$Request.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数', res.count)
if (res.count >= 1) {
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
} else {}
})
uni.removeStorageSync('noBuyVideoIndex')
if (this.noBuyVideoIndex !== null) {
this.noBuyVideoIndex = null
return uni.navigateTo({
url: '/me/choujiang/choujiang'
})
}
} else { //直接跳转进来的
let indexs = -1
if (courseDetailsId) { //从记录进来的
console.log(courseDetailsId)
console.log(this.meunList)
this.meunList.map((item, index) => {
if (item.courseDetailsId ==courseDetailsId) {
if (item.courseDetailsId == courseDetailsId) {
indexs = index
}
})
console.log(indexs)
if (indexs != -1) { //找到了
if (Number(indexs + 1) === this.meunList.length) { //最后一条
console.log("最后一条")
if (this.meunList.length == 1) { //只有一条
this.videoList = this.meunList.slice(0,
3)
@@ -1666,7 +1596,7 @@
}
} else if (Number(indexs) === Number(this.meunList.length - 1)) { //倒数第二条
console.log("倒数第二条")
console.log("倒数第二条")
if (this.meunList.length == 1) { //只有一条
this.videoList = this.meunList.slice(0,
3)
@@ -1688,7 +1618,7 @@
} else {
console.log("如果不是最后一条,也不是倒数第二条")
//如果不是最后一条,也不是倒数第二条,则从找到的位置开始往后拿三条数据放入数组
if (indexs == 0) {
if ( indexs == 0 ) {
this.videoList = [
this.meunList[this.meunList
.length - 2],
@@ -1696,7 +1626,7 @@
.length - 1],
this.meunList[0],
]
} else if (indexs == 1) {
} else if ( indexs == 1) {
this.videoList = [
this.meunList[this.meunList
.length - 1],
@@ -1704,10 +1634,10 @@
this.meunList[1],
]
} else {
this.videoList = this.meunList.slice(indexs - 2,
indexs - 2 + 3)
this.videoList = this.meunList.slice(indexs-2,
indexs-2 + 3)
}
}
} else {
//没找到直接拿前三条数据即可
@@ -1715,14 +1645,17 @@
}
} else { //新的视频
// //视频数组//直接拿前三条
this.videoList = this.meunList.slice(0, 3)
indexs = 0
}
const currentIndex = this.videoList.findIndex(v => v.courseDetailsId == (
courseDetailsId ? courseDetailsId : res.data.current.courseDetailsId))
this.current = currentIndex == -1 ? 0 : currentIndex
console.log(this.videoList);
this.videoList.map((item, index) => {
if (item.courseDetailsId == courseDetailsId) {
this.current = index
}
})
//重新计算当前在播放哪个视频
this.comNumVideo()
if (indexs != -1 && this.meunList.length > 0) {
@@ -1757,6 +1690,7 @@
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current]
.courseDetailsId)
this.$nextTick(() => {
this.setWxUrl()
if (!this.videoList[this.current].videoUrl) { //不能播放的显示购买弹窗
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
@@ -1766,8 +1700,8 @@
})
if (t == 'select') {
this.selectPlay(this.videoList[this.current], true)
if ( t == 'select') {
this.selectPlay(this.videoList[this.current],true)
}
}
} else {
@@ -1780,27 +1714,32 @@
})
},
setHistor(courseId, courseDetailsId, now = false) {
let data = {
courseId: courseId,
courseDetailsId: courseDetailsId,
classify: 3,
type: 1
}
setWxUrl() {
// // #ifdef MP-WEIXIN
// if (!this.videoList[this.current].wxUrl) {
// let data = {
// wxCourseDetailsIds: this.videoList[this.current].wxCourseDetailsId
// }
// this.$Request.postJson('/app/course/selectWxVideoUrl', data).then(res => {
// if (res.code == 0 && res.data) {
// this.videoList[this.current].wxUrl = res.data[0].mp4_url
// }
// })
// }
// // #endif
},
setHistor(courseId, courseDetailsId) {
if (uni.getStorageSync('token')) {
clearTimeout(this.timer)
if (now) {
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
})
return
let data = {
courseId: courseId,
courseDetailsId: courseDetailsId,
classify: 3,
type: 1
}
this.timer = setTimeout(() => {
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {
})
}, 3000)
this.$Request.postJson('/app/courseCollect/insertCourseCollect', data).then(res => {})
}
},
//swiper上下切换事件
change(e) {
@@ -1862,17 +1801,10 @@
}
}
//考虑向下滑动
console.log(current + "---" + this.current)
if ((current == 0 && this.current == 2) || (current == 0 && this.current ==
0)) { //是否滑动到第一条虽然刚进入页面current为0但是首次不触发
//拿出当前的courseDetailsId
console.log(this.videoList)
let courseDetailsId = this.videoList[2].courseDetailsId
// if ( this.videoList.length > 1) {
// courseDetailsId = this.videoList[2].courseDetailsId
// } else {
// courseDetailsId = this.videoList[0].courseDetailsId
// }
indexs = this.meunList.findIndex(item => item.courseDetailsId === courseDetailsId);
//记录当前数据在meunList中的下标
if (indexs != -1) { //找到了indexs就是对应下标
@@ -1924,30 +1856,27 @@
}
this.$nextTick(() => {
//插入历史记录
clearTimeout(this.timer)
const {
courseId,
courseDetailsId,
videoUrl
} = this.videoList[this.current]
if (videoUrl) {
this.setHistor(courseId, courseDetailsId)
}
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current]
.courseDetailsId)
this.setWxUrl()
// #ifndef MP-TOUTIAO
// 把选择的视频的自动播放设置为true
this.videoList[this.current].autoPlay = true
//让当前选择的视频播放
this.startPlay(this.current)
// #endif
//更新视图
this.$forceUpdate()
})
},
startPlay(current) {
console.log(222222)
if (this.videoContext) { //判断之前是否有视频的上下文
this.videoContext.stop()
this.videoContext = null
}
console.log(this.videoList[current])
let numIdCurr = this.videoList[current].courseDetailsId
if (this.videoList[current].videoUrl) { //已经购买可直接播放
// 播放时记录当前播放的id
@@ -1959,6 +1888,7 @@
//播放当前的
this.videoContext.play()
this.$forceUpdate()
this.setWxUrl()
})
}
} else { //没有视频链接则表示没有权限,需要购买 弹出购买弹窗
@@ -1969,23 +1899,16 @@
}
},
//播放时的回掉
videoPlay(videoId, courseDetailsId) {
// this.courseDetailsId = courseDetailsId
if (!this.playFlag) {
if (this.isGetDataList) {
this.getDataList(this.courseId, courseDetailsId, true);
}
this.isGetDataList = true;
this.playFlag = true
this.$Request.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: courseDetailsId,
type: 'start'
}).then(res => {
console.log('播放开始')
})
}
videoPlay(videoId) {
this.$Request.getT('app/course/viewCourse', {
courseId: this.courseId,
courseDetailsId: this.courseDetailsId,
type: 'start'
}).then(res => {
this.playFlag = true
console.log('播放开始')
})
},
//监听视频播放完成
ended() {

View File

@@ -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"
})
}

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img gyqOMUsWCr" src="/static/kigqHbgyqpImg/gyq_0e6c28f35b182aecb579ef23de5439c507e521bb8a06-uzr0QA_fw1200.jpg" mode="widthFix"></image>
<image class="img gyqlVvIKYZ" src="/static/kigqHbgyqpImg/gyq_1d8b90b38ee4e738fd234a0c9db5ebba1fa93a241d402-a7Zrnf.jpg" mode="widthFix"></image>
<image class="img SjaUgyqQuQ" src="/static/kigqHbgyqpImg/gyq_1fa825c9860d57e6892dde1c964992a2040e0fcf1f12d-EC1pA0_fw1200.png" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img MaLngyqocj" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (2).jpg" mode="widthFix"></image>
<image class="img NvgGgyqTIL" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (3).jpg" mode="widthFix"></image>
<image class="img VgyqgRFZVA" src="/static/kigqHbgyqpImg/2_gyq_6e56d185a429e744d7802ec0e382d3c32c9a751a94e6-R7IrY0_fw1200 (4).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View 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="BfgyqOmGub(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="JrqPDigyqC">马上学习</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.scJRgyqScE()
},
methods: {
// 获取收藏信息
scJRgyqScE() {
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();
})
},
BfgyqOmGub(e) {
uni.navigateTo({
url: '/pages/index/mggghRAnkh/courseDet?id=' + e
})
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.scJRgyqScE();
},
onPullDownRefresh: function() {
this.page = 1;
this.scJRgyqScE();
},
}
</script>
<style>
.JrqPDigyqC {
width: 150upx;
height: 60upx;
background: #5074FF;
border-radius: 30upx;
color: #FFFFFF;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
</style>

View File

@@ -111,7 +111,7 @@
uni.showLoading({
title: '加载中...'
})
this.$u.post('app/message/sendMessage', {
this.$u.post('/app/message/insertMessage', {
title: this.sendDate.contact,
content: JSON.stringify(this.sendDate),
state: 2

View File

@@ -34,8 +34,8 @@
data() {
return {
query: {
foreignId: null,
foreignType: 'spinning',
discSpinningRecordId: null,
source: 1,
phone: "",
address: "",
remark: "",
@@ -45,10 +45,10 @@
onLoad(options) {
console.log(options)
if ( options.id ) {
this.query.foreignId = options.id
this.query.discSpinningRecordId = options.id
}
if ( options.foreignType ) {
this.query.foreignType = options.foreignType
if ( options.source ) {
this.query.source = options.source
}
},
@@ -66,7 +66,6 @@
this.$Request.postJson("app/userPrizeExchange/exchange", this.query).then(res => {
if (res.code == 0 ) {
uni.navigateBack()
uni.showToast({ title: '兑换成功', icon: 'none' });
} else {
uni.showToast({ title: res.msg, icon: 'none' });
}

View File

@@ -5,30 +5,30 @@
</view>
<view class="list">
<view class="tab">
<view class="tab_item" :class="{active: item.type == tabIndex}" @click="tabClick(item)"
v-for="(item,index) in tab" :key="index">{{item.label}}</view>
<view class="tab_item"
:class="{active: item.type == tabIndex}"
@click="tabClick(item)"
v-for="(item,index) in tab" :key="index"
>{{item.label}}</view>
</view>
<view class="item" v-for="(item,index) in list" :key="index">
<view class="color-666 u-font-24">{{tabIndex==1?'中奖时间':'兑换时间'}} {{item.createTime}}</view>
<view class="color-666 u-font-24">中奖时间 2024-09-11 10:20:11</view>
<view class="u-m-t-24 u-flex u-row-between">
<view class="u-flex-1 u-flex u-col-top">
<u-image width="128rpx" height="128rpx" v-if="item.type == 2 "
src="/static/red-pack.png"></u-image>
<u-image width="128rpx" height="128rpx" v-else :src="item.imgUrl"></u-image>
<u-image width="128rpx" height="128rpx" src="/static/red-pack.png"></u-image>
<view class="u-m-l-16">
<view v-if="tabIndex == 1">{{item.name}}</view>
<view v-else>{{item.prizeName}}</view>
<view v-if="tabIndex == 1" class="color-999 u-font-24 u-m-t-16">×{{item.number}}</view>
<view>大额红包</view>
<view class="color-999 u-font-24 u-m-t-16">×1</view>
</view>
</view>
<view class="" v-if="tabIndex==1&&!item.targetId&&item.type==3">
<view class="">
<view class="btn-circle duihuan" @click="toDuiHuan(item)">立即兑换</view>
<!-- <view class="btn-circle duihuan finish">已完成</view> -->
</view>
</view>
</view>
<view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!list.length">
<u-empty text="暂无记录" src="/static/icon-empty.svg"></u-empty>
<u-empty text="暂无记录" src="/static/icon-empty.svg"></u-empty>
</view>
</view>
<!-- <view class="u-p-30">
@@ -44,88 +44,69 @@
background: {
backgroundColor: 'transparent'
},
tab: [{
label: '抽奖记录',
type: 1
}, {
label: '兑换记录',
type: 2
}],
tab: [{label: '抽奖记录', type: 1},{label: '兑换记录', type: 2}],
tabIndex: 1,
query: {
page: 1,
limit: 10,
page: 10,
limit: 1,
source: 1,
},
total: 0,
status: 'nomore',
hasAjax: true,
list: [],
isLoading:false,
isEnd:false
hasAjax:true,
list:[]
}
},
onLoad(options) {
if ( options.source ) {
this.query.source = options.source
}
},
onShow() {
this.list = [];
this.getList()
},
// onReachBottom() {
// console.log('onReachBottom');
// if (this.isEnd || this.isLoading) {
// return
// }
// this.query.page+=1;
// this.getList()
// },
methods: {
toDuiHuan(item) {
toDuiHuan(item){
uni.navigateTo({
url: `/me/gift/duihuan?id=${item.id}`
url:`/me/gift/duihuan?source=${this.query.source}&id=${item.id}`
})
},
tabClick(item) {
tabClick(item){
this.list = [];
this.tabIndex = item.type;
this.query.page=1;
this.getList()
},
getList() {
getList(){
let url = ""
if (this.tabIndex == 1) {
if ( this.tabIndex == 1) {
url = "app/discSpinningRecord/selectDiscSpinningRecord"
} else {
url = "/app/userPrizeExchange/page"
}
this.isLoading=true
this.$Request.getT(url, this.query).then(res => {
this.isLoading=false
this.isEnd=this.query.page>=( this.tabIndex == 1?res.data.totalPage:res.page.totalPage)
if (res.code == 0) {
if (this.tabIndex == 1) {
this.list = [...this.list, ...res.data.records]
if (res.code == 0 ) {
if ( this.tabIndex == 1) {
this.list = res.data.records
this.total = res.data.total
} else {
this.list = [...this.list, ...res.page.list]
this.list = res.page.list
this.total = res.page.totalCount
}
}
})
},
onReachBottom: function() {
console.log(this.query.page)
console.log(this.query.limit)
if (!this.isEnd&&!this.isLoading) {
this.query.page = this.query.page + 1;
this.getList();
}
onReachBottom: function () {
if (this.page * this.limit < this.total) {
this.page = this.page + 1;
this.getList();
}
},
}
}
</script>
<style lang="scss" scoped>
.duihuan {
background: linear-gradient(87deg, #ED8087 0%, #ECA2AA 100%);
font-size: 24rpx;
@@ -156,8 +137,7 @@
}
}
.empty {
.empty{
// min-height: 50vh;
}
@@ -173,11 +153,9 @@
border-radius: 18rpx 18rpx 18rpx 18rpx;
overflow: hidden;
background-color: #fff;
.tab {
.tab{
display: flex;
.tab_item {
.tab_item{
height: 80rpx;
line-height: 80rpx;
width: 50%;
@@ -185,13 +163,11 @@
font-size: 32rpx;
color: #333;
}
.tab_item.active {
.tab_item.active{
background-color: #ECA2AA;
color: #fff;
}
}
.item {
padding: 32rpx 24rpx;
border-bottom: 1rpx solid #E5E5E5;

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -9,14 +9,15 @@
<view class="u-flex u-row-center">
<u-image src="/me/static/invite/title.png" alt="" width="544rpx" mode="widthFix"></u-image>
</view>
<!-- <view class="u-flex u-row-right" style="padding-right:70rpx;">
<view class="u-flex u-row-right" style="padding-right:70rpx;">
<u-image src="/me/static/invite/rule.png" alt="" width="400rpx" mode="widthFix"></u-image>
</view> -->
<view class="u-m-t-24 color-fff u-font-28 u-text-left text-shadow "
style=" padding-left: 248rpx;">
<view>新人首次签到成功送1元现金红包</view>
<view>满15个新人完成签到额外送9.9元红包</view>
</view>
<!-- <view class="u-m-t-24 color-fff u-font-28 u-text-left "
style=" padding-left: 248rpx;text-shadow: 0 0 10px #000;">
<view>好友首次签到成功送1元现金红包</view>
<view>满15人签到额外送9.9元红包</view>
<view>满99人签到额外送100元红包</view>
</view> -->
</view>
</view>
@@ -98,15 +99,11 @@
<view class="margin u-m-t-40 u-m-b-32 padding bg-white radius-16">
<view class="u-font-32 color-333 font-bold u-text-center">已邀请列表</view>
<view v-if="inviterList.length" class="u-m-t-20">
<view class="flex justify-between u-m-b-20" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
<view class="flex justify-between" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
:key='index'>
<view class="flex">
<!-- <u-image :src="item.avatar == null?avatar:item.avatar" width="40px" mode="widthFix"></u-image> -->
<view class="u-flex u-relative">
<image src="../static/invite/5.png" style="width: 80rpx;" mode="widthFix"></image>
<view class="tag-news" v-if="item.userTag==1">新人</view>
<text class="tag-no-real" v-if="item.userTag==0">未认证</text>
</view>
<image src="../static/invite/5.png" style="width: 80rpx;" mode="widthFix"></image>
<text class="margin-left-sm">{{item.userName}}</text>
</view>
<view style="width: 160rpx;" class="u-flex u-row-right font-bold">
@@ -118,9 +115,7 @@
<!-- <view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!inviterList.length">
<my-empty ></my-empty>
</view> -->
</view>
<view class="u-p-b-32">
<u-loadmore v-if="hasAjax" :status="comStatus" />
</view>
<!-- <view class="padding" style="position: relative;height: 250rpx;">
@@ -177,7 +172,6 @@
},
data() {
return {
loading:false,
earning: {
inviteMoney: 0,
inviteGoldMoney: 0,
@@ -206,7 +200,6 @@
},
page: 1,
limit: 10,
isEnd:false,
inviterName: '', //邀请码
cumulativeRevenue: '', //累计收益
inviterNumber: '', //邀请人数
@@ -221,21 +214,9 @@
h5SaveImg: '',
modalName: '',
haibaoImgH5: '',
inviteSignCount:0,
qdCode: '', //渠道码
}
},
computed:{
comStatus(){
if(this.isEnd){
return 'nomore'
}
if(this.loading){
return 'loading'
}
return 'loadmore'
}
},
onShareAppMessage(res) {
return {
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
@@ -264,14 +245,12 @@
}
// h5携带邀请码去首页
// #ifdef H5
// this.erweima = config.APIHOST2 + '/?invitation=' + this
// .invitationCode + '&qdCode=' + this.qdCode
this.erweima = config.APIHOST2 + '/pages/login/registerApp/?invitation=' + this
this.erweima = config.APIHOST2 + '/?invitation=' + this
.invitationCode + '&qdCode=' + this.qdCode
// #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
@@ -281,13 +260,6 @@
this.getTouTiao()
// #endif
},
onReachBottom() {
if(this.isEnd||this.loading){
return
}
this.page+=1
this.getInviter()
},
methods: {
toGold(){
uni.navigateTo({
@@ -462,18 +434,14 @@
this.erweimapath = path;
},
getInviter() {
let data = {
page: this.page,
limit: this.limit
}
this.loading=true;
this.$u.api.inviter(data).then(res => {
this.loading=false;
if (res.code == 0) {
this.inviterList =this.inviterList.concat(res.data.list)
this.inviterList = res.data.list
this.hasAjax = true;
this.isEnd=this.page>=res.data.totalPage?true:false;
} else {
uni.showToast({
title: res.msg,
@@ -801,32 +769,7 @@
.text-red {
color: $color1;
}
.tag-news{
position: absolute;
left: 0;
right: 0;
bottom: 0;
color: $color1;
background: #DDDCFF;
border-radius: 100rpx;
font-size: 20rpx;
line-height: 1;
padding: 4rpx;
text-align: center;
}
.tag-no-real{
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
border-radius: 50%;
font-size: 20rpx;
text-align: center;
font-weight: bold;
color:#fff;
background: rgba(51,51,51,0.44);
}
.gap {
width: 100%;
height: 0;
@@ -959,9 +902,7 @@
/* background-size: 100%; */
/* background-repeat: no-repeat; */
}
.text-shadow{
text-shadow: 4px 4px 4px #333;
}
.top-title {
left: 0;
right: 0;

View File

@@ -41,10 +41,11 @@
}
},
onLoad: function(e) {
console.log(e)
if (e.moneyType) {
this.moneyType = e.moneyType
uni.setNavigationBarTitle({
title: e.moneyType == 1 ? '红包明细' : '金币明细'
title: e.moneyType === 1 ? '红包明细' : '金币明细'
});
}
if (e.viewType) {

View File

@@ -1,177 +0,0 @@
<template>
<view class="containerView">
<list-cell title="姓名" type="text" placeholder="请输入姓名" v-model="certName"></list-cell>
<list-cell title="身份证号码" type="text" placeholder="请输入身份证号码" v-model="certNum"></list-cell>
<list-cell title="银行卡号码" type="text" placeholder="请输入银行卡号码" v-model="accountNo"></list-cell>
<list-cell title="手机号" type="text" placeholder="请输入银行预留号码" v-model="mobile"></list-cell>
<button v-if="!user.accountNo" class="confirm-btn" @click="toLogin"
:disabled="logining">认证</button>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的银行卡号和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">手机号需是银行卡预留手机号</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx">否则将无法正常收款请须知</view>
</view>
</template>
<script>
import listCell from '@/me/components/com-input';
export default {
components: {
listCell
},
data() {
return {
certName: '',
mobile: '',
certNum: '',
accountNo: '',
user: {},
logining: false
}
},
onLoad() {
let userId = uni.getStorageSync('userId');
if (userId) {
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
this.user = res.data
if (res.data.certName) {
this.certName = res.data.certName;
}
if (res.data.mobile) {
this.mobile = res.data.mobile;
}
if (res.data.accountNo) {
this.certNum = res.data.certNo;
this.accountNo = res.data.accountNo;
}
}
})
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
toLogin() {
if (!this.certName) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
} else if (!this.mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
})
} else if (!this.certNum) {
uni.showToast({
title: '请输入身份证账号',
icon: 'none'
})
} else if (!this.accountNo) {
uni.showToast({
title: '请请输入银行卡号',
icon: 'none'
})
} else {
this.logining = true
this.$u.post('app/user/realNameAuth?certName=' + this.certName + '&mobile=' + this.mobile + '&certNum=' + this.certNum + '&accountNo=' + this.accountNo.replace(/\s+/g, '')).then(
res => {
this.logining = false
console.log(res);
if(res.code===0){
uni.setStorageSync('certName', this.certName)
uni.setStorageSync('mobile', this.mobile)
uni.setStorageSync('certNum', this.certNum)
uni.setStorageSync('accountNo', this.accountNo)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
}else{
uni.showToast({
title:res.msg||'修改失败',
icon:'none'
})
}
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
}
.containerView {
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
/* background: whitesmoke; */
background: #ff7581;
color: #FFFFFF;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
</style>

View File

@@ -3,11 +3,11 @@
<list-cell title="收款人姓名" type="text" placeholder="请输入支付宝收款人姓名" v-model="zhiFuBaoName"></list-cell>
<list-cell title="支付宝账号" type="text" placeholder="请输入要绑定的支付宝手机号" v-model="zhiFuBao"></list-cell>
<button class="confirm-btn" @click="toLogin"
<button :class="zhiFuBao&&zhiFuBaoName?'confirm-btn':'confirm-btn1'" @click="toLogin"
:disabled="logining">绑定账户</button>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx">否则将无法正常收款请须知</view>
<view style="padding: 32upx 64upx;font-size: 24upx;color: #999999;">提示请正确填写收款人的支付宝账户和真实的收款人姓名否则将无法正常收款</view>
</view>
</template>
@@ -37,7 +37,8 @@
if (res.data.zhiFuBaoName) {
this.zhiFuBaoName = res.data.zhiFuBaoName;
}
// console.log(this.zhiFuBao )
// console.log(this.zhiFuBaoName )
}
})
}
@@ -53,9 +54,16 @@
},
toLogin() {
// console.log(this.zhiFuBao )
// console.log(this.zhiFuBaoName )
// const {
// zhiFuBao,
// zhiFuBaoName
// } = this;
let zhiFuBao = this.zhiFuBao
let zhiFuBaoName = this.zhiFuBaoName
console.log(zhiFuBao)
console.log(zhiFuBaoName)
if (!zhiFuBao) {
uni.showToast({
title: '请设置收款人姓名',
@@ -67,10 +75,8 @@
icon: 'none'
})
} else {
this.logining = true
this.$u.post('app/user/bindAlipay?zhiFuBao=' + zhiFuBao + '&certName=' + zhiFuBaoName).then(
this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&zhiFuBaoName=' + zhiFuBaoName).then(
res => {
this.logining = false
console.log(res);
if(res.code===0){
uni.setStorageSync('zhiFuBao', zhiFuBao)

View File

@@ -64,7 +64,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},

View File

@@ -0,0 +1,111 @@
<template>
<view>
<view class="mFYpdwbMdk flex align-center justify-center">
<view class="mFYpdwbMdk-box flex justify-between align-center flex-wrap">
<view class="mFYpdwbMdk-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">
.mFYpdwbMdk {
width: 100%;
padding-top: 20rpx;
height: auto;
.mFYpdwbMdk-box {
width: 686rpx;
height: 100%;
}
.mFYpdwbMdk-box-item {
width: 49%;
height: 500rpx;
border-radius: 18rpx;
margin-bottom: 20rpx;
image {
width: 100%;
height: 500rpx;
border-radius: 18rpx;
}
}
}
</style>

243
me/mFYpdwbMdk/slkj.html Normal file
View File

@@ -0,0 +1,243 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/common.css">
<style>
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.box {
position: relative;
width: 840px;
height: 525px;
margin: 100px auto;
overflow: hidden;
}
ul,
ol,
li {
padding: 0;
margin: 0;
list-style: none;
}
ul {
position: absolute;
}
ul li {
float: left;
width: 840px;
height: 525px;
}
ul img {
display: block;
width: 840px;
height: 525px;
}
ol {
position: absolute;
left: 50%;
bottom: 20px;
transform: translateX(-50%);
}
ol li {
float: left;
width: 15px;
height: 15px;
background-color: #fff;
border: 2px solid #ccc;
margin: 0 5px;
border-radius: 50%;
}
.active {
background-color: greenyellow;
}
.left,
.right {
display: none;
position: absolute;
width: 30px;
height: 60px;
line-height: 60px;
font-size: 24px;
font-weight: bold;
color: greenyellow;
background-color: rgba(129, 92, 148, 0.5);
top: 50%;
transform: translateY(-50%);
}
.right {
right: 0;
}
</style>
</head>
<body>
<!-- 搭建结构 -->
<div class="box">
<ul>
<li><img src="./images/1.jpg" alt=""></li>
</ul>
<ol></ol>
<span class="left iconfont">&#xe64a;</span>
<span class="right iconfont">&#xe637;</span>
</div>
<script src="./js/animate.js"></script>
<script>
// 1.获取元素
let box = document.querySelector('.box');
let ul = document.querySelector('ul');
let ol = document.querySelector('ol');
let left = document.querySelector('.left');
let right = document.querySelector('.right');
let flag = true; // 假设动画已经执行完成了
// 创建计数器
let num = 0;
// 将第一张图片克隆放到后面
ul.appendChild(ul.children[0].cloneNode(true));
// 计算ul的宽度
ul.style.width = ul.children.length * 840 + 'px';
// 更具图片的数量来创建小圆点
for (let i = 0; i < ul.children.length - 1; i++) {
// 创建节点
let li = document.createElement('li');
// 给每个li添加自定属性
li.dataset['index'] = i;
// 将节点添加到ol里面
ol.appendChild(li);
// 绑定事件
li.onclick = function () {
// 清除其他小圆点的类名
for (let i = 0; i < ol.children.length; i++) {
ol.children[i].classList.remove('active');
}
// 给被点击的元素添加类名
this.classList.add('active');
// 让ul移动到对应的位置
num = this.dataset['index'];
animate(ul, {
left: -num * box.offsetWidth
});
console.log(box.offsetWidth)
}
}
// 默认给第一个小圆点添加样式
ol.children[0].classList.add('active');
// 给右箭头添加事件
right.addEventListener('click', () => {
if (flag) {
flag = false;
// 判断是不是在最后一个元素
if (num == ul.children.length - 1) {
num = 0;
// 如果在最后一个元素,瞬间回到第一个元素
// 实现无缝切换
ul.style.left = 0;
}
num++;
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
animate(ul, {
left: -num * box.offsetWidth
},() => {
// 当动画执行完成后,执行回调函数
// 让flag变为true
flag = true;
})
// 让小圆点跟着图片走
for (let i = 0; i < ol.children.length; i++) {
ol.children[i].classList.remove('active');
}
// 给对应的小圆点添加上样式
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
if (num == ul.children.length - 1) {
ol.children[0].classList.add('active');
} else {
ol.children[num].classList.add('active');
}
}
})
// 给左箭头添加事件
left.addEventListener('click', () => {
if (flag) {
flag = false;
// 判断是不是第一个元素
if (num == 0) {
num = ul.children.length - 1;
// 如果是第一个元素,我们瞬间切换到最后一个元素
// 应为第一个元素和最后一个元素是一样的,所以可以实现
// 无缝切换
ul.style.left = -num * box.offsetWidth + 'px';
}
num--;
// 为了防止被多次点击速度越来越快,我们需要判断段动画是否完成了
animate(ul, {
left: -num * box.offsetWidth
},() => {
// 当动画执行完成后,执行回调函数
// 让flag变为true
flag = true;
})
// 让小圆点跟着图片走
for (let i = 0; i < ol.children.length; i++) {
ol.children[i].classList.remove('active');
}
// 给对应的小圆点添加上样式
// 应为我们做了无缝切换,只有五个小圆点,实际上有六张图片,我们还需要判断一下
if (num == ul.children.length - 1) {
ol.children[0].classList.add('active');
} else {
ol.children[num].classList.add('active');
}
}
})
// 让轮播图自动轮播
let timer = setInterval(function() {
right.click();
},2000)
// 鼠标移入,显示箭头,并且停止轮播
box.addEventListener('mouseenter',()=> {
right.style.display = 'block';
left.style.display = 'block';
// 清除定时器
clearInterval(timer);
})
// 鼠标移出,继续轮播
box.addEventListener('mouseleave',() => {
// 隐藏按钮
right.style.display = 'none';
left.style.display = 'none';
timer = setInterval(function() {
right.click();
},2000)
})
</script>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img gyqIAcrOXs" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img JoPEzFgyqW" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (1).png" mode="widthFix"></image>
<image class="img gyqxIEWvDB" src="/static/kigqHbgyqpImg/5_gyq_5305743adb73c1b5e2af41b80289d61a980843fe22a09-ZWel8A_fw1200 (2).png" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,815 @@
<template>
<view class="nngyqngmIx">
<!-- 背景图片 -->
<image src="../static/assist/zlBg.png" class="bg" mode="widthFix"></image>
<!-- 内容 -->
<view class="iRgyqeOdqI">
<!-- #ifdef H5 -->
<image v-if="isBack" src="/static/images/index/left.png" class="left_viewimage" @tap="goBack"></image>
<!-- #endif -->
<!-- 标题 -->
<view class="iRgyqeOdqI-title">
邀好友助力
</view>
<!-- 副标题 -->
<view class="iRgyqeOdqI-titles">
免费领会员
</view>
<!-- 邀请好友展示框 -->
<view class="iRgyqeOdqI-hy flex align-center justify-center">
<view class="iRgyqeOdqI-hy-box">
<view class="iRgyqeOdqI-hy-box-title1" v-if="rlueList[rlueIndex] && rlueList[rlueIndex].inviteMonth>0">
{{userName}},再邀请<span>{{getUserPeopNum}}</span>位好友,可再得{{rlueList[rlueIndex].inviteMonth}}个月会员
</view>
<view class="iRgyqeOdqI-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="iRgyqeOdqI-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="iRgyqeOdqI-hy-box-peop">
<view class="iRgyqeOdqI-hy-box-peop-my flex align-center justify-center">
<image :src="avatar?avatar:'../../static/images/logo.png'" mode=""></image>
</view>
<view class="iRgyqeOdqI-hy-box-peop-title">
您已注册成功还需邀请
</view>
<view class="iRgyqeOdqI-hy-box-peop-list flex align-center justify-between flex-wrap">
<view class="iRgyqeOdqI-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="iRgyqeOdqI-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="iRgyqeOdqI-hy-box-peop-list-it flex align-center justify-center">
{{getPeopList[index].userName}}
</view>
</block>
<block v-else>
<view @click="onSaveImg()"
class="iRgyqeOdqI-hy-box-peop-list-ia flex align-center justify-center">
<u-icon name="plus" color="#ffffff" size="28"></u-icon>
</view>
<view class="iRgyqeOdqI-hy-box-peop-list-it flex align-center justify-center">
待助力
</view>
</block>
</view>
<view class="iRgyqeOdqI-hy-box-peop-list-i flex align-center justify-center"
style="height: 0;">
</view>
</view>
</view>
<block v-if="getPeopList.length>0">
<!-- 进度条 -->
<view class="iRgyqeOdqI-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="iRgyqeOdqI-hy-box-schedulet">
距离领取会员仅差<span>{{getUserPeopNum}}</span>位好友
</view>
<view class="iRgyqeOdqI-hy-box-peops">
<swiper class="iRgyqeOdqI-hy-box-peopss" next-margin="80px" :circular="true"
:indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item class="iRgyqeOdqI-hy-box-peopssi" v-for="(item,index) in getPeopList"
:key="index">
<view class="iRgyqeOdqI-hy-box-peopssis flex align-center">
<image :src="item.avatar?item.avatar:'../../static/images/logo.png'" mode="">
</image>
<view class="iRgyqeOdqI-hy-box-peopssit">
{{item.userName}}已为您助力
</view>
</view>
</swiper-item>
</swiper>
</view>
</block>
</view>
</view>
<!-- 助力按钮 -->
<!-- #ifndef MP-KUAISHOU -->
<view class="iRgyqeOdqI-btn flex align-center justify-center" @click="onSaveImg()">
{{getPeopList.length==0?'开始助力':'继续助力'}}
</view>
<!-- #endif -->
<!-- #ifdef MP-KUAISHOU -->
<view class="iRgyqeOdqI-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="iRgyqeOdqI-lc">
<view class="iRgyqeOdqI-lc-title flex align-center justify-center">
活动流程
</view>
<view class="iRgyqeOdqI-lc-ls flex justify-between">
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as1.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
点击发起助力
</view>
</view>
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as2.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
邀请对应数量好友
</view>
</view>
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as3.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
每位好友注册成功
</view>
</view>
<image class="iRgyqeOdqI-lc-ls-ir" src="../static/assist/asr.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-i">
<image src="../static/assist/as4.png" mode=""></image>
<view class="iRgyqeOdqI-lc-ls-it">
领取对应时间会员
</view>
</view>
</view>
</view>
<!-- 活动规则 -->
<view class="iRgyqeOdqI-rule">
<view class="iRgyqeOdqI-rule-title flex align-center justify-center">
活动规则
</view>
<view class="iRgyqeOdqI-rule-list">
<view class="iRgyqeOdqI-rule-list-i flex align-center" v-for="(item,index) in rlueList" :key="index">
<image :src="item.inviteImg" mode=""></image>
<view class="iRgyqeOdqI-rule-list-i-r">
<view class="iRgyqeOdqI-rule-list-i-r-t" v-if="item.inviteMonth>0">
领取{{item.inviteMonth}}个月会员
</view>
<view class="iRgyqeOdqI-rule-list-i-r-t" v-else>
领取永久会员
</view>
<view class="iRgyqeOdqI-rule-list-i-r-b" v-if="item.inviteMonth>0">
邀请{{item.inviteCount}}位好友,您可以免费{{item.inviteMonth}}个月无限看短剧
</view>
<view class="iRgyqeOdqI-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">
.nngyqngmIx {
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;
}
.iRgyqeOdqI {
width: 100%;
position: absolute;
top: 0;
left: 0;
}
.iRgyqeOdqI-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;
}
.iRgyqeOdqI-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);
}
.iRgyqeOdqI-hy {
width: 100%;
height: auto;
margin-top: 40rpx;
.iRgyqeOdqI-hy-box {
padding: 40rpx 0;
width: 615rpx;
height: 100%;
background: linear-gradient(0deg, #FBEDCC 0%, #FFF7F0 98%);
border-radius: 48rpx 48rpx 24rpx 24rpx;
.iRgyqeOdqI-hy-box-title1 {
width: 90%;
margin: 0 auto;
text-align: center;
color: #F22947;
font-size: 30rpx;
font-weight: bold;
span {
font-size: 54rpx;
}
}
.iRgyqeOdqI-hy-box-title2 {
width: 100%;
text-align: center;
margin-top: 16rpx;
color: #F22947;
font-size: 26rpx;
}
.iRgyqeOdqI-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;
}
.iRgyqeOdqI-hy-box-peop-my {
width: 100%;
height: 90rpx;
image {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
}
}
.iRgyqeOdqI-hy-box-peop-title {
width: 100%;
text-align: center;
margin-top: 20rpx;
color: #ffffff;
font-weight: 500;
font-size: 24rpx;
}
.iRgyqeOdqI-hy-box-peop-list {
width: calc(100% - 60rpx);
margin: 0 auto;
margin-top: 30rpx;
}
.iRgyqeOdqI-hy-box-peop-list-i {
width: 32%;
flex-direction: column;
margin-bottom: 20rpx;
font-size: 24rpx;
.iRgyqeOdqI-hy-box-peop-list-ia {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
border: 1px dashed #ffffff;
}
.iRgyqeOdqI-hy-box-peop-list-it {
color: #ffffff;
margin-top: 14rpx;
}
}
.iRgyqeOdqI-hy-box-schedule {
width: 550rpx;
margin: 0 auto;
margin-top: 26rpx;
}
.iRgyqeOdqI-hy-box-schedulet {
width: 550rpx;
margin: 0 auto;
font-size: 22rpx;
span {
color: #F22A48;
font-size: 26rpx;
}
}
.iRgyqeOdqI-hy-box-peops {
width: 550rpx;
margin: 0 auto;
margin-top: 26rpx;
height: 50rpx;
}
.iRgyqeOdqI-hy-box-peopss {
width: 100%;
height: 100%;
.iRgyqeOdqI-hy-box-peopssi {
width: 100%;
height: 100%;
}
.iRgyqeOdqI-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%;
}
.iRgyqeOdqI-hy-box-peopssit {
width: 80%;
font-size: 24rpx;
margin-left: 10rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}
.iRgyqeOdqI-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;
}
.iRgyqeOdqI-lc {
width: 666rpx;
height: 344rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
margin: 0 auto;
margin-top: 50rpx;
.iRgyqeOdqI-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;
}
.iRgyqeOdqI-lc-ls {
width: calc(100% - 40rpx);
margin: 0 auto;
margin-top: 50rpx;
.iRgyqeOdqI-lc-ls-ir {
width: 26rpx;
height: 16rpx;
margin-top: 50rpx;
}
.iRgyqeOdqI-lc-ls-i {
width: 100rpx;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.iRgyqeOdqI-lc-ls-it {
width: 100%;
text-align: center;
font-size: 26rpx;
color: #9C2A2A;
font-weight: bold;
margin-top: 14rpx;
}
}
}
}
.iRgyqeOdqI-rule {
width: 666rpx;
height: auto;
background-color: #FFFFFF;
border-radius: 24rpx;
margin: 0 auto;
margin-top: 50rpx;
.iRgyqeOdqI-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;
}
.iRgyqeOdqI-rule-list {
width: 626rpx;
height: auto;
margin: 0 auto;
margin-top: 40rpx;
padding-bottom: 20rpx;
}
.iRgyqeOdqI-rule-list-i {
padding: 18rpx 12rpx;
background-color: #FFF8E6;
border-radius: 14rpx;
margin-bottom: 30rpx;
image {
width: 106rpx;
height: 82rpx;
}
.iRgyqeOdqI-rule-list-i-r {
margin-left: 18rpx;
.iRgyqeOdqI-rule-list-i-r-t {
color: #9C2A2A;
font-size: 30rpx;
font-weight: bold;
}
.iRgyqeOdqI-rule-list-i-r-b {
font-size: 24rpx;
color: #9C2A2A;
font-weight: 500;
}
}
}
}
</style>

View File

@@ -0,0 +1,24 @@
<template>
<view class="gyqSxFeTGt">
<image class="img ZgyqRCsasY" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (1).jpg" mode="widthFix"></image>
<image class="img Vgyqvunkwy" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (1).png" mode="widthFix"></image>
<image class="img oGEJgyqEDt" src="/static/kigqHbgyqpImg/6_gyq_f59df2b9142077df409cf0e3e997e4ff292f9fcf44dc-5MQEKi_fw1200 (2).jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

196
me/setting/FdwbsxoKnh.vue Normal file
View File

@@ -0,0 +1,196 @@
<template>
<view class="FdwbsxoKnh">
<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="dwbCkbEBqX" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
</view>
<button class="qKdwbBRntC" @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;
}
.dwbCkbEBqX {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #ff7581;
}
.FdwbsxoKnh {
top: 0;
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.qKdwbBRntC {
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>

View File

@@ -21,14 +21,10 @@
<view>隐私协议</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view>
<!-- <view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/setting/logOff')">
<view class="flex justify-between padding bg-white solid-bottom" @click="goNav('/me/setting/logOff')">
<view>注销账号</view>
<view><u-icon name="arrow-right"></u-icon></view>
</view> -->
<!-- <view class="flex justify-between padding bg-white solid-bottom" @click="clearCache">
<view>清除缓存</view>
<view>{{cacheSize}}</view>
</view> -->
</view>
<view class="flex justify-between padding bg-white solid-bottom" @click="loginOut">
<view>退出登录</view>
<view><u-icon name="arrow-right"></u-icon></view>
@@ -38,12 +34,10 @@
</template>
<script>
import {cacheClearAll} from '@/store/cashe.js'
export default {
data() {
return {
version: null,
cacheSize:'0M'
}
},
onLoad() {
@@ -59,30 +53,8 @@
// console.log(widgetInfo)
// this.version = widgetInfo.version
// })
const info= uni.getStorageInfoSync()
console.log(info);
const size=(info.currentSize/1024).toFixed(2)
this.cacheSize=size<1?(info.currentSize+'kb'):(size) +'M'
},
onShow() {
},
methods: {
clearCache(){
uni.showModal({
title:'提示',
content:`是否清除全部缓存
`,
success(res) {
if(res.confirm){
cacheClearAll()
const info= uni.getStorageInfoSync()
info.keys.map(v=>{
console.log(v);
})
}
}
})
},
goNav(e) {
uni.navigateTo({
url: e
@@ -111,7 +83,6 @@
uni.removeStorageSync('zhiFuBao')
uni.removeStorageSync('zhiFuBaoName')
uni.removeStorageSync('isVIP')
cacheClearAll()
uni.showToast({
icon: 'none',
title: '退出登录成功'

View File

@@ -104,7 +104,7 @@
uni.removeStorageSync('isVIP')
setTimeout(function() {
uni.switchTab({
url: '/pages/me/index'
url: '/pages/iSiAnfghCC/abKTySghjA'
})
}, 1500)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -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'
});
}
});

View File

@@ -32,7 +32,7 @@
<!-- 消息&数据 -->
<view class="blogger-tips-data">
<view class="blogger-tips-data__wrap tn-bg-white">
<view class="blogger-tips-data__message tn-flex tn-flex-row-center" @click="tn('/minePages/message')">
<view class="blogger-tips-data__message tn-flex tn-flex-row-center" @click="tn('/minepages/iSiAnfghCCssage')">
<view class="blogger-tips-data__message__container tn-flex tn-flex-row-center tn-flex-col-center tn-bg-gray--light">
<view class="blogger-tips-data__message__avatar">
<tn-avatar
@@ -507,7 +507,7 @@
userName: '斯耀短剧0647',
date: '2024年12月20日',
label: ['活跃','链接','转盘抽奖'],
desc: 'https://dj-h5.hnsiyao.cn/pages/login/appEq 红包抽奖,各种精美礼品等你来拿',
desc: 'https://dj-h5.hnsiyao.cn/pages/ghtwwlkXYG/YEZelghNit 红包抽奖,各种精美礼品等你来拿',
mainImage:[
'https://resource.tuniaokj.com/images/shop/watch1.jpg',
'https://resource.tuniaokj.com/images/shop/watch2.jpg',

View File

@@ -4,15 +4,6 @@
"^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
@@ -21,13 +12,21 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/task/prizeList",
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom"
}
},
{
@@ -35,11 +34,11 @@
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom"
}
},
{
"path": "pages/me/erweimaRegister",
"path": "pages/iSiAnfghCC/ghhCPInfzi",
"style": {
"navigationBarTitleText": "短剧",
"navigationStyle": "custom", //
@@ -52,7 +51,7 @@
}
},
{
"path": "pages/index/search/index",
"path": "pages/index/fghaQGjsSE/aghyvzmfVW",
"style": {
"navigationBarTitleText": "搜索",
"navigationBarBackgroundColor": "#FFFFFF",
@@ -60,14 +59,14 @@
}
},
{
"path": "pages/index/course/courseList",
"path": "pages/index/mggghRAnkh/yDNQghnrBV",
"style": {
"navigationBarTitleText": "资源列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/index/course/orderDet",
"path": "pages/index/mggghRAnkh/zaDDTghWrb",
"style": {
"navigationBarTitleText": "确认订单",
"navigationBarBackgroundColor": "#FFFFFF"
@@ -83,7 +82,7 @@
{
"path": "pages/learn/index",
"path": "pages/QopeXhghCn/index",
"style": {
"navigationBarTitleText": "学习",
"enablePullDownRefresh": true,
@@ -95,14 +94,14 @@
}
},
{
"path": "pages/me/index",
"path": "pages/iSiAnfghCC/abKTySghjA",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/me/userinfo",
"path": "pages/iSiAnfghCC/GqrTYehghi",
"style": {
"navigationBarTitleText": "个人资料",
"h5": {
@@ -115,7 +114,7 @@
{
"path": "pages/me/vip/index",
"path": "pages/iSiAnfghCC/vip/index",
"style": {
"navigationBarTitleText": "会员中心",
"h5": {
@@ -128,7 +127,7 @@
{
"path": "pages/login/login",
"path": "pages/ghtwwlkXYG/wVghNzmqkQ",
"style": {
"navigationBarTitleText": "登录",
"h5": {
@@ -139,7 +138,7 @@
}
},
{
"path": "pages/login/registerApp",
"path": "pages/ghtwwlkXYG/WVEtZeeghKApp",
"style": {
"navigationBarTitleText": "注册",
"navigationBarBackgroundColor": "#f1a48a",
@@ -154,18 +153,8 @@
// #endif
}
},
{
"path": "pages/login/loginPhone",
"style": {
"navigationBarTitleText": "登录",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
}, {
"path": "pages/login/bind",
{
"path": "pages/ghtwwlkXYG/MFkHiQghje",
"style": {
"navigationBarTitleText": "绑定手机号",
"h5": {
@@ -176,7 +165,7 @@
}
},
{
"path": "pages/login/register",
"path": "pages/ghtwwlkXYG/WVEtZeeghK",
"style": {
"navigationBarTitleText": "",
@@ -193,7 +182,7 @@
}
},
{
"path": "pages/login/forgetPwd",
"path": "pages/ghtwwlkXYG/EAkIghCGJS",
"style": {
"navigationBarTitleText": "重置密码",
"h5": {
@@ -234,7 +223,7 @@
},
{
"path": "pages/login/appEq",
"path": "pages/ghtwwlkXYG/YEZelghNit",
"style": {
"navigationBarTitleText": "注册成功",
"enablePullDownRefresh": false
@@ -244,25 +233,25 @@
// #endif
}
}, {
"path": "pages/login/iosmobile",
"path": "pages/ghtwwlkXYG/YWeghpHqfd",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/login/wxmobile",
"path": "pages/ghtwwlkXYG/AoOwHCZghW",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/login/phonebind",
"path": "pages/ghtwwlkXYG/bQpNDEIghp",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/pays/pays",
"path": "pages/itkXJghyII/hLUkghGDXH",
"style": {
"navigationBarTitleText": ""
}
@@ -746,41 +735,36 @@
}
},
{
"path" : "blogger/blogger",
"style" :
{
"navigationBarTitleText" : "",
"path": "blogger/blogger",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path" : "blogger/details",
"style" :
{
"navigationBarTitleText" : "",
"path": "blogger/details",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path" : "topic/topic",
"style" :
{
"navigationBarTitleText" : "话题"
"path": "topic/topic",
"style": {
"navigationBarTitleText": "话题"
}
},
{
"path" : "topic/reserve",
"style" :
{
"navigationBarTitleText" : "",
"path": "topic/reserve",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path" : "tools/tools",
"style" :
{
"navigationBarTitleText" : "",
"path": "tools/tools",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}
@@ -802,7 +786,18 @@
"backgroundColor": "#FFFFFF",
"borderStyle": "black",
"list": [
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar/index@2x.png",
"selectedIconPath": "static/tabbar/index_@2x.png",
"text": "小剧场"
},
{
"pagePath": "pages/video/video",
"iconPath": "static/tabbar/learn@2x.png",
"selectedIconPath": "static/tabbar/learn_@2x.png",
"text": "推荐"
},
{
"pagePath": "pages/task/index",
"iconPath": "static/tabbar/task@2x.png",
@@ -810,37 +805,17 @@
"text": "任务"
},
{
"pagePath": "pages/video/video",
"iconPath": "static/tabbar/index@2x.png",
"selectedIconPath": "static/tabbar/index_@2x.png",
"text": "剧"
"pagePath": "pages/chasingDrama/chasingDrama",
"iconPath": "static/tabbar/zhuiju.png",
"selectedIconPath": "static/tabbar/zhuiju_.png",
"text": "剧"
},
{
"pagePath": "pages/iSiAnfghCC/abKTySghjA",
"iconPath": "static/tabbar/me@2x.png",
"selectedIconPath": "static/tabbar/me_@2x.png",
"text": "我的"
}
// ,
// {
// "pagePath": "pages/index/index",
// "iconPath": "static/tabbar/index@2x.png",
// "selectedIconPath": "static/tabbar/index_@2x.png",
// "text": "刷剧"
// }
// {
// "pagePath": "pages/video/video",
// "iconPath": "static/tabbar/learn@2x.png",
// "selectedIconPath": "static/tabbar/learn_@2x.png",
// "text": "推荐"
// },
// {
// "pagePath": "pages/chasingDrama/chasingDrama",
// "iconPath": "static/tabbar/zhuiju.png",
// "selectedIconPath": "static/tabbar/zhuiju_.png",
// "text": "追剧"
// },
// {
// "pagePath": "pages/me/index",
// "iconPath": "static/tabbar/me@2x.png",
// "selectedIconPath": "static/tabbar/me_@2x.png",
// "text": "我的"
// }
]
},
"condition": { //

View File

@@ -4,6 +4,15 @@
"^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
@@ -12,23 +21,7 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/task/index",
"style": {
"navigationBarTitleText": "任务",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
"path": "pages/task/stayTuned",
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom"
}
},
{
"path": "pages/task/prizeList",
"style": {
@@ -42,11 +35,11 @@
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom"
}
},
{
"path": "pages/me/erweimaRegister",
"path": "pages/iSiAnfghCC/ghhCPInfzi",
"style": {
"navigationBarTitleText": "短剧",
"navigationStyle": "custom", // 隐藏系统导航栏
@@ -59,7 +52,7 @@
}
},
{
"path": "pages/index/search/index",
"path": "pages/index/fghaQGjsSE/aghyvzmfVW",
"style": {
"navigationBarTitleText": "搜索",
"navigationBarBackgroundColor": "#FFFFFF",
@@ -67,14 +60,14 @@
}
},
{
"path": "pages/index/course/courseList",
"path": "pages/index/mggghRAnkh/yDNQghnrBV",
"style": {
"navigationBarTitleText": "资源列表",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/index/course/orderDet",
"path": "pages/index/mggghRAnkh/zaDDTghWrb",
"style": {
"navigationBarTitleText": "确认订单",
"navigationBarBackgroundColor": "#FFFFFF"
@@ -90,7 +83,7 @@
{
"path": "pages/learn/index",
"path": "pages/QopeXhghCn/index",
"style": {
"navigationBarTitleText": "学习",
"enablePullDownRefresh": true,
@@ -102,23 +95,14 @@
}
},
{
"path": "pages/me/index",
"path": "pages/iSiAnfghCC/abKTySghjA",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
// #ifdef H5
,"enablePullDownRefresh": true
// #endif
}
},
{
"path": "pages/me/webview",
"style": {
"navigationBarTitleText": "客服"
}
},
{
"path": "pages/me/userinfo",
"path": "pages/iSiAnfghCC/GqrTYehghi",
"style": {
"navigationBarTitleText": "个人资料",
"h5": {
@@ -131,7 +115,7 @@
{
"path": "pages/me/vip/index",
"path": "pages/iSiAnfghCC/vip/index",
"style": {
"navigationBarTitleText": "会员中心",
"h5": {
@@ -144,7 +128,7 @@
{
"path": "pages/login/login",
"path": "pages/ghtwwlkXYG/wVghNzmqkQ",
"style": {
"navigationBarTitleText": "登录",
"h5": {
@@ -155,7 +139,7 @@
}
},
{
"path": "pages/login/registerApp",
"path": "pages/ghtwwlkXYG/WVEtZeeghKApp",
"style": {
"navigationBarTitleText": "注册",
"navigationBarBackgroundColor": "#f1a48a",
@@ -169,19 +153,8 @@
"navigationStyle": "custom"
// #endif
}
},
{
"path": "pages/login/loginPhone",
"style": {
"navigationBarTitleText": "登录",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
}, {
"path": "pages/login/bind",
"path": "pages/ghtwwlkXYG/MFkHiQghje",
"style": {
"navigationBarTitleText": "绑定手机号",
"h5": {
@@ -192,7 +165,7 @@
}
},
{
"path": "pages/login/register",
"path": "pages/ghtwwlkXYG/WVEtZeeghK",
"style": {
"navigationBarTitleText": "",
@@ -209,7 +182,7 @@
}
},
{
"path": "pages/login/forgetPwd",
"path": "pages/ghtwwlkXYG/EAkIghCGJS",
"style": {
"navigationBarTitleText": "重置密码",
"h5": {
@@ -222,7 +195,7 @@
"path": "pages/chasingDrama/chasingDrama",
"style": {
"navigationBarTitleText": "追剧",
"enablePullDownRefresh": true
"enablePullDownRefresh": false
// #ifdef H5
,
"navigationStyle": "custom"
@@ -250,7 +223,7 @@
},
{
"path": "pages/login/appEq",
"path": "pages/ghtwwlkXYG/YEZelghNit",
"style": {
"navigationBarTitleText": "注册成功",
"enablePullDownRefresh": false
@@ -260,25 +233,25 @@
// #endif
}
}, {
"path": "pages/login/iosmobile",
"path": "pages/ghtwwlkXYG/YWeghpHqfd",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/login/wxmobile",
"path": "pages/ghtwwlkXYG/AoOwHCZghW",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/login/phonebind",
"path": "pages/ghtwwlkXYG/bQpNDEIghp",
"style": {
"navigationBarTitleText": "手机号绑定"
}
},
{
"path": "pages/pays/pays",
"path": "pages/itkXJghyII/hLUkghGDXH",
"style": {
"navigationBarTitleText": ""
}
@@ -289,14 +262,6 @@
"navigationBarTitleText": "开屏广告",
"navigationStyle": "custom"
}
},
{
"path" : "pages/pause/pause",
"style" :
{
// "navigationBarTitleText" : "服务器维护中",
"navigationStyle": "custom"
}
}
],
"subPackages": [{
@@ -371,18 +336,6 @@
"path": "invite/cashDetail",
"style": {
"navigationBarTitleText": "申请提现",
"navigationStyle": "custom",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "invite/realName",
"style": {
"navigationBarTitleText": "实名认证",
"h5": {
"titleNView": {
"backgroundColor": "#FFFFFF"
@@ -782,36 +735,41 @@
}
},
{
"path": "blogger/blogger",
"style": {
"navigationBarTitleText": "",
"path" : "blogger/blogger",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path": "blogger/details",
"style": {
"navigationBarTitleText": "",
"path" : "blogger/details",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path": "topic/topic",
"style": {
"navigationBarTitleText": "话题"
"path" : "topic/topic",
"style" :
{
"navigationBarTitleText" : "话题"
}
},
{
"path": "topic/reserve",
"style": {
"navigationBarTitleText": "",
"path" : "topic/reserve",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
},
{
"path": "tools/tools",
"style": {
"navigationBarTitleText": "",
"path" : "tools/tools",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom"
}
}
@@ -833,18 +791,7 @@
"backgroundColor": "#FFFFFF",
"borderStyle": "black",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar/index@2x.png",
"selectedIconPath": "static/tabbar/index_@2x.png",
"text": "小剧场"
},
{
"pagePath": "pages/video/video",
"iconPath": "static/tabbar/learn@2x.png",
"selectedIconPath": "static/tabbar/learn_@2x.png",
"text": "推荐"
},
"list": [
{
"pagePath": "pages/task/index",
"iconPath": "static/tabbar/task@2x.png",
@@ -852,17 +799,37 @@
"text": "任务"
},
{
"pagePath": "pages/chasingDrama/chasingDrama",
"iconPath": "static/tabbar/zhuiju.png",
"selectedIconPath": "static/tabbar/zhuiju_.png",
"text": "剧"
},
{
"pagePath": "pages/me/index",
"iconPath": "static/tabbar/me@2x.png",
"selectedIconPath": "static/tabbar/me_@2x.png",
"text": "我的"
"pagePath": "pages/video/video",
"iconPath": "static/tabbar/index@2x.png",
"selectedIconPath": "static/tabbar/index_@2x.png",
"text": "剧"
}
// ,
// {
// "pagePath": "pages/index/index",
// "iconPath": "static/tabbar/index@2x.png",
// "selectedIconPath": "static/tabbar/index_@2x.png",
// "text": "刷剧"
// }
// {
// "pagePath": "pages/video/video",
// "iconPath": "static/tabbar/learn@2x.png",
// "selectedIconPath": "static/tabbar/learn_@2x.png",
// "text": "推荐"
// },
// {
// "pagePath": "pages/chasingDrama/chasingDrama",
// "iconPath": "static/tabbar/zhuiju.png",
// "selectedIconPath": "static/tabbar/zhuiju_.png",
// "text": "追剧"
// },
// {
// "pagePath": "pages/iSiAnfghCC/abKTySghjA",
// "iconPath": "static/tabbar/me@2x.png",
// "selectedIconPath": "static/tabbar/me_@2x.png",
// "text": "我的"
// }
]
},
"condition": { //模式配置,仅开发期间生效

View File

View File

@@ -0,0 +1,78 @@
<template>
<view class="u-relative bg-gray fixed yodwbsHlmJ-all">
<view class="jdwbHJCFxl ydwbzNqTbj" v-if="time<=0" @click="enter"><text>进入</text></view>
<view class="jdwbHJCFxl" v-else ><text>{{time}}</text></view>
<image src="./asz.JPG" v-if="false" mode=""></image>
<view class="w-full dumdwbwauP">
<image src="/static/images/share_bg2.png" class="img"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
time:3
}
},
onLoad() {
this.init()
},
methods: {
enter(){
uni.reLaunch({
url:'/pages/index/index'
})
},
init(){
this.timer=setInterval(()=>{
this.time--
if(this.time<=0){
clearInterval(this.timer)
}
},1000)
}
}
}
</script>
<style lang="scss" scoped>
.yodwbsHlmJ-all{
position: fixed;
inset: 0;
.jdwbHJCFxl{
position: absolute;
z-index: 10;
width: 50rpx;
height: 50rpx;
text-align: center;
display: flex;
justify-content: center;
font-size: 14px;
color: #555;
align-items: center;
right: 30rpx;
border-radius: 50%;
background-color: rgba(255, 255, 255, .5);
border: 1px solid rgba(255, 255, 255, .8);
top: calc(var(--status-bar-height) + 20rpx );
}
.ydwbzNqTbj{
border-radius: 100rpx;
white-space: nowrap;
width: auto;
height: auto;
padding: 4rpx 20rpx;
}
.dumdwbwauP{
position: absolute;
inset: 0;
.img{
width: 100%;
height: 100%;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 KiB

BIN
pages/BdwbOqUuVz/asz.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

View File

@@ -0,0 +1,27 @@
<template>
<view class="gyqSxFeTGt">
<image class="img CBKwkqgyqg" src="./asz.JPG" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6808.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6808.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6810.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6811.jpg" mode="widthFix"></image>
<image class="img QxmTgyqLtb" src="./IMG_6812.jpg" mode="widthFix"></image>
</view>
</template>
<script>
export default {
data() {
return {
list: []
};
}
};
</script>
<style scoped lang="scss">
.img {
width: 100%;
display: block;
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6770.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6771.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6768.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6769.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

542
pages/QopeXhghCn/index.vue Normal file
View File

@@ -0,0 +1,542 @@
<template>
<view>
<view class="wrap-DEghTTorsp">
<view class="headDEghTTorsp">
<scroll-view scroll-x class="bg nav bg-white u-border-bottom">
<view class="flex text-center">
<view class="cu-item flex-sub text-bold" :class="item.name===TabCur?' cur ':'text-black'"
v-for="(item,index) in tabList" :key="index" :data-id="item.name" @tap="tabSelectDEghTTorsp">
{{item.name}}
<view v-if="item.name===TabCur"
style="width: 64rpx;height: 8rpx;;background: #5074FF;margin: -20rpx auto;border-radius: 10rpx;">
</view>
</view>
</view>
</scroll-view>
</view>
<view class="headLenDEghTTorsp">
<view v-if="TabCur === tabList[0].name">
<view class="page-box-DEghTTorsp" v-if="latelyCourseList.length && userId">
<view class="orderView-DEghTTorsp" v-for="(item, index) in latelyCourseList" :key="index"
@click="goCourseDetDEghTTorsp(item)">
<view class="item">
<view class="left">
<image :src="item.titleImg" mode="aspectFill"
style="border-radius: 10rpx;width: 180rpx;height: 180rpx;"></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>
</view>
</view>
<!-- 空数据 -->
<empty v-else-if="!latelyCourseList.length && userId"></empty>
<noLogin v-if="userId === ''"></noLogin>
</view>
<view v-if="TabCur == tabList[1].name">
<view class="page-box-DEghTTorsp" v-if="selectCourseList.length && userId">
<view class="order" v-for="(item, index) in selectCourseList" :key="index"
@click="goCourseDetDEghTTorsp(item)">
<view class="item">
<view class="left">
<image :src="item.titleImg" mode="aspectFill"
style="border-radius: 10rpx;width: 180rpx;height: 180rpx;"></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>
</view>
</view>
<!-- 空数据 -->
<empty v-else-if="!selectCourseList.length && userId"></empty>
<noLogin v-if="userId === ''"></noLogin>
</view>
<view v-if="TabCur == tabList[2].name">
<view class="page-box-DEghTTorsp" v-if="collectList.length && userId">
<view class="orderView-DEghTTorsp" v-for="(item,index) in collectList" :key='index' @click="goCourseDetDEghTTorsp(item)">
<view class="item">
<view class="left">
<image :src="item.titleImg" mode="aspectFill"
style="border-radius: 10rpx;width: 180rpx;height: 180rpx;"></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>
</view>
</view>
<!-- 空数据 -->
<empty v-else-if="!collectList.length && userId" content="去添加"></empty>
<noLogin v-if="userId === ''"></noLogin>
</view>
</view>
</view>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
import noLogin from '@/components/noLogin.vue'
export default {
components: {
empty,
noLogin
},
data() {
return {
TabCur: '最近学习',
orderList: [
[],
[],
[]
],
tabList: [{
name: '最近学习'
},
{
name: '已购资源'
},
{
name: '收藏资源'
}
],
current: 0,
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore'],
userId: '',
limit: 10,
latelyCourseList: [], //最近学习
latelyCoursePage: 1,
selectCourseList: [], //已购资源
selectCoursePage: 1,
collectList: [], //收藏资源
collectPage: 1,
totalCount: 0
};
},
onLoad() {
},
onShow() {
console.log(this.latelyCourseList)
this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
if (this.userId) {
// this.latelyCourseList = []
// this.selectCourseList = []
// this.collectList = []
this.getLatelyCourseDEghTTorsp()
this.getSelectCourseDEghTTorsp()
this.getCollectListDEghTTorsp()
}
},
methods: {
tabSelectDEghTTorsp(e) {
// console.log(e.currentTarget.dataset)
this.TabCur = e.currentTarget.dataset.id;
this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
// console.log("this.userId____:" + this.userId)
if (this.userId) {
switch (this.TabCur) {
case '最近学习': //最近学习
this.latelyCoursePage = 1
this.getLatelyCourseDEghTTorsp()
break;
case '已购资源': //已购资源
this.selectCoursePage = 1
this.getSelectCourseDEghTTorsp()
break;
case '收藏资源': //已购资源
this.collectPage = 1;
this.getCollectListDEghTTorsp()
break;
}
}
},
// 最近学习
getLatelyCourseDEghTTorsp() {
uni.showLoading({
title: '加载中'
})
let data = {
userId: this.userId,
page: this.latelyCoursePage,
limit: this.limit,
}
this.$u.api.latelyCourse(data).then(res => {
uni.hideLoading()
uni.stopPullDownRefresh();
if (res.code == 0) {
res.data.list.forEach(ret => {
if (ret.avatar) {
ret.avatar = ret.avatar.split(',')
}
})
this.totalCount = res.data.totalCount
if (this.latelyCoursePage == 1) {
this.latelyCourseList = res.data.list;
} else {
this.latelyCourseList = [...this.latelyCourseList, ...res.data.list]
}
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
// 已购资源
getSelectCourseDEghTTorsp() {
uni.showLoading({
title: '加载中'
})
let data = {
userId: this.userId,
page: this.selectCoursePage,
limit: this.limit,
}
this.$u.api.selectCourse(data).then(res => {
uni.hideLoading()
uni.stopPullDownRefresh();
if (res.code == 0) {
res.data.list.forEach(ret => {
if (ret.avatar) {
ret.avatar = ret.avatar.split(',')
}
})
this.totalCount = res.data.totalCount
if (this.selectCoursePage == 1) {
this.selectCourseList = res.data.list;
} else {
this.selectCourseList = [...this.selectCourseList, ...res.data.list]
}
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
// 获取收藏信息
getCollectListDEghTTorsp() {
uni.showLoading({
title: '加载中'
})
let data = {
userId: this.userId,
page: this.collectPage,
limit: this.limit,
}
this.$u.api.collectList(data).then(res => {
uni.hideLoading()
uni.stopPullDownRefresh();
if (res.code == 0) {
this.totalCount = res.data.totalCount
if (this.collectPage == 1) {
this.collectList = res.data.records;
} else {
this.collectList = [...this.collectList, ...res.data.records]
}
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
// 查看资源详情
goCourseDetDEghTTorsp(e) {
let userId = uni.getStorageSync('userId')
if (userId) {
uni.navigateTo({
url: '/pages/index/mggghRAnkh/courseDet?id=' + e.courseId
});
} else {
uni.navigateTo({
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
},
computed: {
// 价格整数
priceInt() {
return val => {
// if (val !== parseInt(val)) return val.split('.')[0];
// else return val;
return val
};
}
},
onReachBottom: function() {
this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
if (this.userId) {
if (this.TabCur == '最近学习') { //最近学习
if (this.totalCount == this.latelyCourseList.length) {
uni.showToast({
title: '已经到底了~',
icon: 'none'
})
return
} else {
this.latelyCoursePage = this.latelyCoursePage + 1;
this.getLatelyCourseDEghTTorsp()
}
} else if (this.TabCur == '已购资源') { //已购资源
if (this.totalCount == this.selectCourseList.length) {
uni.showToast({
title: '已经到底了~',
icon: 'none'
})
return
} else {
this.selectCoursePage = this.selectCoursePage + 1;
this.getSelectCourseDEghTTorsp()
}
} else if (this.TabCur == '收藏资源') { //收藏资源
if (this.totalCount == this.collectList.length) {
uni.showToast({
title: '已经到底了~',
icon: 'none'
})
return
} else {
this.collectPage = this.collectPage + 1;
this.getCollectListDEghTTorsp()
}
}
// switch (this.TabCur) {
// case '最近学习': //最近学习
// this.latelyCoursePage = this.latelyCoursePage + 1;
// this.getLatelyCourseDEghTTorsp()
// break;
// case '已购资源': //已购资源
// this.selectCoursePage = this.selectCoursePage + 1;
// this.getSelectCourseDEghTTorsp()
// break;
// case '收藏资源': //评论
// this.collectPage = this.collectPage + 1;
// this.getCollectListDEghTTorsp()
// break;
// }
}
},
onPullDownRefresh: function() {
this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
if (this.userId) {
if (this.TabCur == '最近学习') { //最近学习
if (this.totalCount == this.latelyCourseList.length) {
uni.showToast({
title: '已经到底了~',
icon: 'none'
})
return
} else {
this.latelyCoursePage = 1
this.getLatelyCourseDEghTTorsp()
}
} else if (this.TabCur == '已购资源') { //已购资源
if (this.totalCount == this.selectCourseList.length) {
uni.showToast({
title: '已经到底了~',
icon: 'none'
})
return
} else {
this.selectCoursePage = 1
this.getSelectCourseDEghTTorsp()
}
} else if (this.TabCur == '收藏资源') { //收藏资源
if (this.totalCount == this.collectList.length) {
uni.showToast({
title: '已经到底了~',
icon: 'none'
})
return
} else {
this.collectPage = 1
this.getCollectListDEghTTorsp()
}
}
// switch (this.TabCur) {
// case '最近学习': //最近学习
// this.latelyCoursePage = 1
// // this.latelyCourseList = []
// this.getLatelyCourseDEghTTorsp()
// break;
// case '已购资源': //已购资源
// this.selectCoursePage = 1
// // this.selectCourseList = []
// this.getSelectCourseDEghTTorsp()
// break;
// case '收藏资源': //已购资源
// this.collectPage = 1;
// // this.collectList = []
// this.getCollectListDEghTTorsp()
// break;
// }
}
},
};
</script>
<style>
/* #ifndef H5 */
page {
height: 100%;
background-color: #f2f2f2;
}
/* #endif */
</style>
<style lang="scss" scoped>
.headDEghTTorsp {
position: fixed;
/* #ifdef H5 */
top: 0rpx;
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
left: 0;
right: 0;
z-index: 999;
}
.headLenDEghTTorsp {
/* #ifdef H5 */
margin-top: 80rpx;
/* #endif */
/* #ifndef H5 */
margin-top: 90rpx;
/* #endif */
}
.page-box-DEghTTorsp {
padding-bottom: 100px;
}
.orderView-DEghTTorsp {
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;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
.wrap-DEghTTorsp {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
}
.btn {
width: 150upx;
height: 60upx;
background: #5074FF;
border-radius: 30upx;
color: #FFFFFF;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
</style>

View File

@@ -113,17 +113,15 @@
</template>
<script>
import { isEmpty } from '../../utils/util';
import { $cache_chasingDrama} from '@/store/cashe.js'
export default {
data() {
return {
isErQd: $cache_chasingDrama.isErQd|| false, //昨天是否签到
isQd: $cache_chasingDrama.isQd||false, //今日是否已签到
day: $cache_chasingDrama.day|| 0, //签到天数
isErQd: false, //昨天是否签到
isQd: false, //今日是否已签到
day: 0, //签到天数
numList: this.getThisWeekDates(),
list: $cache_chasingDrama.list||[],
zhuiju: $cache_chasingDrama.zhuiju|| [],
list: [],
zhuiju: [],
};
},
onLoad() {
@@ -137,13 +135,6 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
this.myQianInfo()
}
},
onPullDownRefresh() {
$cache_chasingDrama.clear()
this.newLook()
this.myVideo()
this.myQianInfo()
uni.stopPullDownRefresh()
},
methods: {
// 跳转资源详情
goCourse(e, courseDetailsId) {
@@ -153,7 +144,7 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
})
} else {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
@@ -163,39 +154,30 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
let data = {
userId: uni.getStorageSync('userId')
}
if(!isEmpty($cache_chasingDrama.day)&&!isEmpty($cache_chasingDrama.isQd)&&!isEmpty($cache_chasingDrama.isErQd)){
this.day=$cache_chasingDrama.day
this.isQd=$cache_chasingDrama.isQd
this.isErQd=$cache_chasingDrama.isErQd
return
}
// this.$Request.getT('/app/integral/selectIntegralDay', data).then(res => {
// if (res.code == 0) {
// if (res.data.nowIntegral) { //判断今天是否签到
// this.day = res.data.nowIntegral.day
// this.isQd = true
// }
// if (res.data.yesterdayIntegral) { //判断昨天是否签到
// if (!this.day) {
// this.day = res.data.yesterdayIntegral.day
// }
// this.isErQd = true
// }
// if (res.data.nowIntegral == null && res.data.yesterdayIntegral == null) {
// this.day = 0
// this.isQd = false
// this.isErQd = false
// }
// $cache_chasingDrama.set('day',this.day)
// $cache_chasingDrama.set('isQd',this.isQd)
// $cache_chasingDrama.set('isErQd',this.isErQd)
// } else {
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
// }
// })
this.$Request.getT('/app/integral/selectIntegralDay', data).then(res => {
if (res.code == 0) {
if (res.data.nowIntegral) { //判断今天是否签到
this.day = res.data.nowIntegral.day
this.isQd = true
}
if (res.data.yesterdayIntegral) { //判断昨天是否签到
if (!this.day) {
this.day = res.data.yesterdayIntegral.day
}
this.isErQd = true
}
if (res.data.nowIntegral == null && res.data.yesterdayIntegral == null) {
this.day = 0
this.isQd = false
this.isErQd = false
}
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
//跳转
goNav(url) {
@@ -205,7 +187,7 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
})
} else {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
},
@@ -216,14 +198,9 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
limit: 6,
classify: 1, //1收藏 2点赞 3历史记录
}
if($cache_chasingDrama.zhuiju){
this.zhuiju = $cache_chasingDrama.zhuiju
return
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
if (res.code == 0) {
this.zhuiju = res.data.records
$cache_chasingDrama.set('zhuiju',this.zhuiju)
}
})
},
@@ -234,17 +211,12 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
limit: 6,
classify: 3, //1收藏 2点赞 3历史记录
}
if($cache_chasingDrama.list){
this.list=$cache_chasingDrama.list
return
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
if (res.code == 0) {
this.list = res.data.records
this.$nextTick(() => {
this.videPage = 1
})
$cache_chasingDrama.set('list',this.list)
}
})
},
@@ -266,7 +238,7 @@ import { $cache_chasingDrama} from '@/store/cashe.js'
})
} else {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}

View File

@@ -1,45 +1,45 @@
<template>
<view class="container">
<view class="wrapper">
<view class="input-content">
<view class="containerDEghTTorsp">
<view class="wrapperDEghTTorsp">
<view class="input-contentDEghTTorsp">
<view class="cu-form-group"
style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
<view class="title text-black">手机号</view>
<input type="number" :value="phone" placeholder="请输入手机号" maxlength="11" data-key="phone"
@input="inputChange" />
@input="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group padding-right-xs"
style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
<text class="title text-black">验证码</text>
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChange" @confirm="startReg" />
<button class="send-msg" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
@input="inputChangeDEghTTorsp" @confirm="startRegDEghTTorsp" />
<button class="send-msgDEghTTorsp" @click="sendMsgDEghTTorsp" :disabled="sending">{{ sendTime }}</button>
</view>
<view class="cu-form-group"
style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
<text class="title text-black">设置密码</text>
<input type="password" :value="password" placeholder="请设置密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="startReg" />
maxlength="20" minlength="6" data-key="password" @input="inputChangeDEghTTorsp" @confirm="startRegDEghTTorsp" />
</view>
<!-- <view class="cu-form-group"
style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;"
v-if="required == '是'">
<text class="title text-black">邀请码</text>
<input type="" maxlength="6" :value="invitation" placeholder="请填写邀请码(必填)" data-key="invitation"
@input="inputChange" @confirm="startReg" />
@input="inputChangeDEghTTorsp" @confirm="startRegDEghTTorsp" />
</view>
<view class="cu-form-group"
style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;"
v-if="required == '否'">
<text class="title text-black">邀请码</text>
<input type="" maxlength="6" :value="invitation" placeholder="请填写邀请码(选填)" data-key="invitation"
@input="inputChange" @confirm="startReg" />
@input="inputChangeDEghTTorsp" @confirm="startRegDEghTTorsp" />
</view> -->
</view>
<button class="confirm-btn" @click="startReg">立即注册</button>
<view class="footer">
<text @tap="isShowAgree" class="cuIcon"
<button class="confirm-btnDEghTTorsp" @click="startRegDEghTTorsp">立即注册</button>
<view class="footerDEghTTorsp">
<text @tap="isShowAgreeDEghTTorsp" class="cuIcon"
:class="showAgree ? 'cuIcon-radiobox' : 'cuIcon-round'">同意</text>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate">隐私政策</navigator>
@@ -77,7 +77,7 @@
if (a) {
this.isEnable = a;
}
this.invitationMa();
this.invitationMaDEghTTorsp();
// #ifdef APP-PLUS
switch (uni.getSystemInfoSync().platform) {
case 'android':
@@ -95,17 +95,8 @@
_this = this;
},
methods: {
showMa() {
//
this.$Request.getT('/app/common/type/4').then(res => {
if (res.code == 0) {
this.invitationCode = res.data.value;
}
});
},
//
invitationMa() {
invitationMaDEghTTorsp() {
this.$Request.getT('/app/common/type/3').then(res => {
if (res.code == 0) {
this.required = res.data.value;
@@ -113,13 +104,10 @@
}
});
},
inputChange(e) {
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
countDown() {
const {
count
@@ -135,7 +123,7 @@
setTimeout(this.countDown.bind(this), 1000);
}
},
sendMsg() {
sendMsgDEghTTorsp() {
const {
phone
} = this;
@@ -163,11 +151,11 @@
});
}
},
isShowAgree() {
isShowAgreeDEghTTorsp() {
//
_this.showAgree = !_this.showAgree;
},
startReg() {
startRegDEghTTorsp() {
if (this.phone.length != 11) {
uni.showToast({
icon: 'none',
@@ -236,37 +224,6 @@
});
}
});
},
getUserInfo(userId, token) {
this.$Request.get("/app/user/selectUserById").then(res => {
if (res.code == 0) {
uni.setStorageSync('token', token)
uni.setStorageSync('userId', res.data.userId)
uni.setStorageSync('avatar', res.data.avatar)
uni.setStorageSync('invitationCode', res.data.invitationCode)
uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)
uni.setStorageSync('certNum', res.data.certNum)
this.$Request.get("/app/UserVip/isUserVip").then(res => {
if (res.code == 0 && res.data && res.data.isVip == 2) {
uni.setStorageSync('isVIP', true)
} else {
uni.setStorageSync('isVIP', false)
}
});
uni.switchTab({
url: '/pages/index/index'
});
} else {
uni.showModal({
showCancel: false,
title: '登录失败',
content: res.msg
});
this.$queue.logout();
}
uni.hideLoading();
});
}
}
}
@@ -278,7 +235,7 @@
background: #FFFFFF !important;
}
.footer {
.footerDEghTTorsp {
padding-left: 140upx;
margin-top: 32upx;
text-align: center;
@@ -286,7 +243,7 @@
color: #333;
}
.send-msg {
.send-msgDEghTTorsp {
border-radius: 30px;
color: white;
height: 30px;
@@ -296,7 +253,7 @@
}
.container {
.containerDEghTTorsp {
padding-top: 32upx;
position: relative;
width: 100%;
@@ -304,7 +261,7 @@
overflow: hidden;
}
.wrapper {
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
background: #FFFFFF;
@@ -312,12 +269,12 @@
}
.input-content {
.input-contentDEghTTorsp {
padding: 32upx 80upx;
}
.confirm-btn {
.confirm-btnDEghTTorsp {
width: 600upx;
height: 80upx;
line-height: 80upx;

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6772.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6773.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,235 @@
<template>
<view class="containerDEghTTorsp">
<view class="wrapperDEghTTorsp">
<view class="input-contentDEghTTorsp">
<view class="cu-form-group"
style="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="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group"
style="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="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<button class="send-msgDEghTTorsp" @click="sendMsgDEghTTorsp" :disabled="sendIng">{{sendTime}}</button>
</view>
<view class="cu-form-group"
style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">设置密码</text>
<input type="password" :value="password" placeholder="请设置新密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view>
</view>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp">立即重置</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
code: '',
mobile: '',
password: '',
sendIng: false,
sendTime: '获取验证码',
count: 60,
loginIng: false
}
},
methods: {
sendMsgDEghTTorsp() {
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 + '/forget').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 : '请一分钟后再获取验证码'
});
}
});
}
},
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);
}
},
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBackDEghTTorsp() {
uni.navigateBack();
},
navToDEghTTorsp(url) {
uni.navigateTo({
url
})
},
toLoginDEghTTorsp() {
const {
mobile,
password,
code
} = this;
if (!mobile) {
// this.$queue.showToast("请输入手机号");
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (!code) {
// this.$queue.showToast("密码位数必须大于六位");
uni.showToast({
title: '请输入验证码',
icon: 'none',
duration: 1000
})
} else if (!password) {
// this.$queue.showToast("请设置密码");
uni.showToast({
title: '请输入密码',
icon: 'none',
duration: 1000
})
} else {
this.loginIng = true;
// this.$queue.showLoading("正在修改密码中...");
uni.showLoading({
title: '正在修改密码中...'
})
this.$u.post('/app/Login/forgetPwd?pwd=' + password + '&phone=' + mobile + '&msg=' + code).then(
res => {
// this.$Request.postJson("/appLogin/forgetPwd",{
// pwd: password,
// phone: mobile,
// msg: code
// }).then(res => {
uni.hideLoading();
if (res.code === 0) {
uni.showToast({
title: '密码找回成功',
icon: 'none'
});
setTimeout(function() {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
});
}, 1000)
} else {
uni.showModal({
showCancel: false,
title: '密码找回失败',
content: res.msg,
});
}
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #ffffff;
}
.send-msgDEghTTorsp {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #ff7581;
}
.containerDEghTTorsp {
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
background: #ffffff;
padding-bottom: 20px;
}
.input-contentDEghTTorsp {
padding: 0 20px;
}
.confirm-btnDEghTTorsp {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 40px;
background: #ff7581;
/* background: linear-gradient(to left, #3a55b9 0, #5074FF 100%); */
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
</style>

View File

@@ -0,0 +1,368 @@
<template>
<view class="containerDEghTTorsp">
<view class="bg u-absolute" style="width: 100%;height: 100%;overflow: hidden;top: 0;">
<u-image src="../../static/images/i_bg.png" style="width: 100%;height:100%" mode=""></u-image>
</view>
<view class="wrapperDEghTTorsp u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
<view class="input-contentDEghTTorsp">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
<view class="cu-form-groupDEghTTorsp" >
<view class="title">手机号</view>
<input class="input" type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-groupDEghTTorsp" >
<text class="title">验证码</text>
<view class="input flex">
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<button class="send-msgDEghTTorsp" @click="sendMsgDEghTTorsp" :disabled="sending">{{ sendTime }}</button>
</view>
</view>
<view class="cu-form-groupDEghTTorsp" >
<text class="title">设置密码</text>
<input class="input" type="password" :value="password" placeholder="请设置新密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view>
<!-- <view class="cu-form-groupDEghTTorsp"
style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">邀请码</text>
<input type="text" v-if="registerCode == '是'" :value="invitation" placeholder="请填写邀请码"
data-key="invitation" maxlength="20" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<input type="text" v-if="registerCode == '否'" :value="invitation" placeholder="请填写邀请码(选填)"
data-key="invitation" maxlength="20" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view> -->
<button class="confirm-btnDEghTTorsp" @click="toRegisterDEghTTorsp">注册</button>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp">登录</button>
</view>
<view class="footerViewDEghTTorsp">
<text @tap="isShowAgreeDEghTTorsp" class="cuIcon"
:class="showAgree ? 'cuIcon-radiobox' : 'cuIcon-round'">同意</text>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate" style="color: #37A6FF;">隐私政策</navigator>
<navigator url="/me/setting/xieyi" open-type="navigate" style="color: #37A6FF;">用户协议</navigator>
</view>
</view>
<!-- #ifdef H5 -->
<!-- <div v-if="isWeixin" style="width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"></div> -->
<!-- #endif -->
</view>
</template>
<script>
export default {
data() {
return {
showAgree: false,
code: '',
mobile: '',
password: '',
sending: false,
sendTime: '获取验证码',
count: 60,
relation: "",
invitation: '',
registerCode: '',
qdCodeion: '',
isWeixin: false,
};
},
onLoad(e) {
let relation = e.invitation
if (relation) {
this.relation = relation;
this.invitation = relation;
}
if (e.qdCode) {
this.qdCodeion = e.qdCode
}
this.$u.get('/app/common/type/3').then(res => {
if (res.code == 0) {
this.registerCode = res.data.value
}
});
let u = navigator.userAgent;
if ( u.toLowerCase().indexOf('micromessenger') !== -1) {
this.isWeixin = true
}
},
methods: {
isShowAgreeDEghTTorsp() {
//是否选择协议
this.showAgree = !this.showAgree;
},
sendMsgDEghTTorsp() {
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 : '请一分钟后再获取验证码'
});
}
});
}
},
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);
}
},
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
toLoginDEghTTorsp() {
console.log("123");
uni.reLaunch({
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
});
},
toRegisterDEghTTorsp() {
const {
mobile,
password,
code,
showAgree,
invitation,
registerCode,
qdCodeion
} = this;
if (!mobile) {
uni.showToast({
title: '请输入账号',
icon: 'none',
duration: 1000
})
return
}
if (!code) {
uni.showToast({
title: '请输入验证码',
icon: 'none',
duration: 1000
})
return
}
if (!password) {
uni.showToast({
title: '请设置密码',
icon: 'none',
duration: 1000
})
return
}
if (password.length < 6) {
uni.showToast({
title: '密码位数必须大于六位',
icon: 'none',
duration: 1000
})
return
}
if (invitation.length == 0 && registerCode == '是') {
uni.showToast({
title: '请输入邀请码',
icon: 'none',
duration: 1000
})
return
}
if (!showAgree) {
uni.showToast({
title: '请先同意《隐私政策》和《用户协议》',
icon: 'none',
duration: 1000
})
return
}
this.logining = true;
uni.showLoading({
title: '注册中...'
})
let platform = ''
// #ifdef APP
platform = 'app'
// #endif
// #ifdef H5
platform = 'h5'
// #endif
this.$u.post('/app/Login/registerCode?password=' + password + '&phone=' + mobile + '&msg=' + code +
'&inviterCode=' + invitation + '&platform=' + platform + '&qdCode=' + qdCodeion).then(res => {
if (res.code === 0) {
// this.$queue.remove('invitation');
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
//设置渠道码
if (res.user.qdCode) {
uni.setStorageSync('qdCode', res.user.qdCode)
}
uni.showToast({
title: '注册成功',
icon: 'none'
})
setTimeout(function() {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/YEZelghNit'
})
}, 1000)
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '注册失败',
content: res.msg
});
}
});
}
}
};
</script>
<style lang="scss">
page {
background: #fff;
}
.footerViewDEghTTorsp {
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #333333;
position: absolute;
left: 0;
right: 0;
bottom: 178rpx;
.cuIcon::before{
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
}
.cuIcon-round::before {
content: "\e6d7";
}
.cuIcon-radiobox:before {
content: "\e75b";
color: #37A6FF;
}
}
.send-msgDEghTTorsp {
line-height: initial;
font-weight: 400;
font-size: 28rpx;
color: #EC6F48;
border: none;
background-color: transparent!important;
}
.send-msgDEghTTorsp::after{
border: none;
background-color: transparent;
}
.containerDEghTTorsp {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
min-height: 100vh;
}
.input-contentDEghTTorsp {
padding: 0 56rpx;
.cu-form-groupDEghTTorsp{
display: flex;
flex-direction: column;
align-items: flex-start;
margin-bottom: 48rpx;
background-color: transparent;
padding: 0;
.title{
margin-bottom: 32rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.input{
width: 100%;
height: 84rpx;
line-height: 84rpx;
background-color: #fff;
align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx;
}
}
}
.confirm-btnDEghTTorsp {
width: 100%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
border-radius: 16rpx;
margin-top: 40rpx;
background: #EC6F48;
font-size: 32rpx;
color: #FFFFFF;
&:after {
border: none;
}
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6774.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6775.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,20 +1,20 @@
<template>
<view class="containerView">
<view class="containerViewDEghTTorsp">
<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" />
@input="inputChangeDEghTTorsp" />
</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>
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChangeDEghTTorsp"
@confirm="toLoginDEghTTorsp" />
<button class="send-msgDEghTTorsp" @click="sendMsgDEghTTorsp" :disabled="sendIng">{{ sendTime }}</button>
</view>
<button class="confirm-btn" @click="toLogin" :disabled="loginIng">立即绑定</button>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp" :disabled="loginIng">立即绑定</button>
</view>
</template>
@@ -41,11 +41,11 @@
}
},
methods: {
inputChange(e) {
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
navBackDEghTTorsp() {
uni.navigateBack();
},
countDown() {
@@ -63,7 +63,7 @@
setTimeout(this.countDown.bind(this), 1000);
}
},
sendMsg() {
sendMsgDEghTTorsp() {
const {
mobile
} = this;
@@ -90,7 +90,7 @@
});
}
},
toLogin() {
toLoginDEghTTorsp() {
const {
mobile,
code
@@ -152,7 +152,7 @@
background: #ffffff;
}
.send-msg {
.send-msgDEghTTorsp {
border-radius: 30px;
color: white;
height: 30px;
@@ -161,7 +161,7 @@
background: #557EFD;
}
.containerView {
.containerViewDEghTTorsp {
top: 0;
padding-top: 32upx;
position: relative;
@@ -174,7 +174,7 @@
.confirm-btn {
.confirm-btnDEghTTorsp {
width: 600upx;
height: 80upx;
line-height: 80upx;

View File

@@ -1,44 +1,44 @@
<template>
<view class="container">
<view class="containerDEghTTorsp">
<view class="bg u-absolute" style="width: 100%;height: 100%;overflow: hidden;top: 0;">
<u-image src="../../static/images/i_bg.png" style="width: 100%;height:100%" mode=""></u-image>
</view>
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
<view class="input-content">
<view class="wrapperDEghTTorsp u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
<view class="input-contentDEghTTorsp">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<view class="title">手机号</view>
<input class="input" type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
@input="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<text class="title">验证码</text>
<view class="input flex">
<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>
@input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<button class="send-msgDEghTTorsp" @click="sendMsgDEghTTorsp" :disabled="sending">{{ sendTime }}</button>
</view>
</view>
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<text class="title">设置密码</text>
<input class="input" type="password" :value="password" placeholder="请设置新密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
maxlength="20" minlength="6" data-key="password" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view>
<!-- <view class="cu-form-group"
<!-- <view class="cu-form-groupDEghTTorsp"
style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">邀请码</text>
<input type="text" v-if="registerCode == '是'" :value="invitation" placeholder="请填写邀请码"
data-key="invitation" maxlength="20" @input="inputChange" @confirm="toLogin" />
data-key="invitation" maxlength="20" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<input type="text" v-if="registerCode == '否'" :value="invitation" placeholder="请填写邀请码(选填)"
data-key="invitation" maxlength="20" @input="inputChange" @confirm="toLogin" />
data-key="invitation" maxlength="20" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view> -->
<button class="confirm-btn" @click="toRegister">注册</button>
<button class="confirm-btn" @click="toLogin">登录</button>
<button class="confirm-btnDEghTTorsp" @click="toRegisterDEghTTorsp">注册</button>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp">登录</button>
</view>
<view class="footerView">
<text @tap="isShowAgree" class="cuIcon"
<view class="footerViewDEghTTorsp">
<text @tap="isShowAgreeDEghTTorsp" class="cuIcon"
:class="showAgree ? 'cuIcon-radiobox' : 'cuIcon-round'">注册即同意</text>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate" style="color: #37A6FF;">隐私政策</navigator>
@@ -75,26 +75,18 @@
this.relation = relation;
this.invitation = relation;
}
// this.$u.get('/app/common/type/3').then(res => {
// if (res.code == 0) {
// this.registerCode = res.data.value
// }
// });
this.$u.get('/app/common/type/3').then(res => {
if (res.code == 0) {
this.registerCode = res.data.value
}
});
},
methods: {
isShowAgree() {
isShowAgreeDEghTTorsp() {
//
this.showAgree = !this.showAgree;
},
showMa() {
//
this.$Request.getT('/common/type/88').then(res => {
if (res.code === 0) {
this.invitation = res.data.value;
}
});
},
sendMsg() {
sendMsgDEghTTorsp() {
const {
mobile
} = this;
@@ -150,26 +142,18 @@
setTimeout(this.countDown.bind(this), 1000);
}
},
inputChange(e) {
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
navTo(url) {
uni.navigateTo({
url
});
},
toLogin() {
console.log("123");
toLoginDEghTTorsp() {
uni.reLaunch({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
});
},
toRegister() {
toRegisterDEghTTorsp() {
const {
mobile,
password,
@@ -260,7 +244,7 @@
url: '/pages/index/index'
});
}, 1000)
// this.getUserInfo(res.userId, res.token);
// this.getUserInfoDEghTTorsp(res.userId, res.token);
} else {
uni.hideLoading();
uni.showModal({
@@ -271,7 +255,7 @@
}
});
},
getUserInfo(userId, token) {
getUserInfoDEghTTorsp(userId, token) {
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
// #ifdef APP-PLUS
@@ -356,7 +340,7 @@
background: #ffffff;
}
.footerView {
.footerViewDEghTTorsp {
display: flex;
justify-content: center;
align-items: center;
@@ -381,7 +365,7 @@
}
}
.send-msg {
.send-msgDEghTTorsp {
line-height: initial;
font-weight: 400;
font-size: 28rpx;
@@ -389,12 +373,12 @@
border: none;
background-color: transparent;
}
.send-msg::after{
.send-msgDEghTTorsp::after{
border: none;
background-color: transparent;
}
.container {
.containerDEghTTorsp {
position: relative;
width: 100%;
height: 100%;
@@ -403,16 +387,16 @@
box-sizing: border-box;
}
.wrapper {
.wrapperDEghTTorsp {
min-height: 100vh;
position: relative;
z-index: 90;
}
.input-content {
.input-contentDEghTTorsp {
padding: 0 56rpx;
}
.cu-form-group{
.cu-form-groupDEghTTorsp{
display: flex;
flex-direction: column;
align-items: flex-start;
@@ -435,7 +419,7 @@
}
}
.confirm-btn {
.confirm-btnDEghTTorsp {
width: 100%;
height: 100rpx;
text-align: center;

View File

@@ -0,0 +1,437 @@
<template>
<view class="containerDEghTTorsp">
<view class="bg u-absolute" style="width: 100%;height: 100%;overflow: hidden;top: 0;">
<u-image src="../../static/images/i_bg.png" style="width: 100%;height:100%" mode=""></u-image>
</view>
<view class="wrapperDEghTTorsp u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
<view class="input-contentDEghTTorsp">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
<view class="cu-form-groupDEghTTorsp">
<view class="title">手机号</view>
<input class="input" type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-groupDEghTTorsp">
<text class="title">验证码</text>
<view class="input flex">
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<button class="send-msgDEghTTorsp" @click="sendMsgDEghTTorsp" :disabled="sending">{{ sendTime }}</button>
</view>
</view>
<view class="cu-form-groupDEghTTorsp">
<text class="title">设置密码</text>
<input class="input" type="password" :value="password" placeholder="请设置新密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view>
<!-- <view class="cu-form-groupDEghTTorsp"
style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">邀请码</text>
<input type="text" v-if="registerCode == '是'" :value="invitation" placeholder="请填写邀请码"
data-key="invitation" maxlength="20" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<input type="text" v-if="registerCode == '否'" :value="invitation" placeholder="请填写邀请码(选填)"
data-key="invitation" maxlength="20" @input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
</view> -->
<button class="confirm-btnDEghTTorsp" @click="toRegisterDEghTTorsp">注册</button>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp">登录</button>
</view>
<view class="footerViewDEghTTorsp">
<text @tap="isShowAgreeDEghTTorsp" class="cuIcon"
:class="showAgree ? 'cuIcon-radiobox' : 'cuIcon-round'">注册即同意</text>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate" style="color: #37A6FF;">隐私政策</navigator>
<navigator url="/me/setting/xieyi" open-type="navigate" style="color: #37A6FF;">用户协议</navigator>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showAgree: false,
code: '',
mobile: '',
password: '',
sending: false,
sendTime: '获取验证码',
count: 60,
relation: "",
invitation: '',
registerCode: '',
qdCodeion: '', //渠道码
};
},
onLoad() {
if (uni.getStorageSync('qdCodeion')) {
this.qdCodeion = uni.getStorageSync('qdCodeion')
}
let relation = uni.getStorageSync('invitation')
if (relation) {
this.relation = relation;
this.invitation = relation;
}
this.$u.get('/app/common/type/3').then(res => {
if (res.code == 0) {
this.registerCode = res.data.value
}
});
},
methods: {
isShowAgreeDEghTTorsp() {
//是否选择协议
this.showAgree = !this.showAgree;
},
sendMsgDEghTTorsp() {
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 : '请一分钟后再获取验证码'
});
}
});
}
},
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);
}
},
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
toLoginDEghTTorsp() {
uni.reLaunch({
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
});
},
toRegisterDEghTTorsp() {
const {
mobile,
password,
code,
showAgree,
invitation,
registerCode,
qdCodeion
} = this;
if (!mobile) {
uni.showToast({
title: '请输入账号',
icon: 'none',
duration: 1000
})
return
}
if (!code) {
uni.showToast({
title: '请输入验证码',
icon: 'none',
duration: 1000
})
return
}
if (!password) {
uni.showToast({
title: '请设置密码',
icon: 'none',
duration: 1000
})
return
}
if (password.length < 6) {
uni.showToast({
title: '密码位数必须大于六位',
icon: 'none',
duration: 1000
})
return
}
if (invitation.length === 0 && registerCode === '是') {
uni.showToast({
title: '请输入邀请码',
icon: 'none',
duration: 1000
})
return
}
if (!showAgree) {
uni.showToast({
title: '请先同意《隐私政策》和《用户协议》',
icon: 'none',
duration: 1000
})
return
}
this.logining = true;
uni.showLoading({
title: '注册中...'
})
let platform = ''
// #ifdef APP
platform = 'app'
// #endif
// #ifdef H5
platform = 'h5'
// #endif
this.$u.post('/app/Login/registerCode?password=' + password + '&phone=' + mobile + '&msg=' + code +
'&inviterCode=' + invitation + '&platform=' + platform + '&qdCode=' + qdCodeion).then(res => {
if (res.code === 0) {
// this.$queue.remove('invitation');
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
//设置渠道码
if (res.user.qdCod) {
uni.setStorageSync('qdCod', res.user.qdCod)
}
uni.showToast({
title: '注册成功',
icon: 'none'
})
setTimeout(function() {
uni.switchTab({
url: '/pages/index/index'
});
}, 1000)
// this.getUserInfoDEghTTorsp(res.userId, res.token);
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '注册失败',
content: res.msg
});
}
});
},
getUserInfoDEghTTorsp(userId, token) {
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
// #ifdef APP-PLUS
if (uni.getSystemInfoSync().platform == "android") {
let clientid = plus.push.getClientInfo().clientid;
this.$Request.postT('/appLogin/updateClientId?clientId=' + clientid + '&userId=' +
userId).then(res => {
});
}
// #endif
uni.setStorageSync('image_url', res.data.imageUrl ? res.data.imageUrl :
'/static/img/common/logo.jpg')
uni.setStorageSync('relation_id', res.data.relationId)
uni.setStorageSync('relation', res.data.invitationCode)
uni.setStorageSync('grade', res.data.grade)
uni.setStorageSync('phone', res.data.phone)
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.data.userId)
uni.setStorageSync('isInvitation', res.data.isInvitation)
uni.setStorageSync('userName', res.data.userName ? res.data.userName : res.data.phone)
// this.$queue.setData('image_url', res.data.imageUrl ? res.data.imageUrl : '/static/img/common/logo.jpg');
// this.$queue.setData('relation_id', res.data.relationId);
// this.$queue.setData('relation', res.data.invitationCode);
// this.$queue.setData('grade', res.data.grade);
// this.$queue.setData('mobile', res.data.mobile);
// this.$queue.setData('isInvitation', res.data.isInvitation);
// this.$queue.setData('nickName', res.data.nickName ? res.data.nickName : res.data.phone);
// this.$queue.setData('gender', parseInt(res.data.gender));
uni.switchTab({
url: '/pages/index/index'
});
} else {
uni.showModal({
showCancel: false,
title: '登录失败',
content: res.msg
});
this.$queue.logout();
}
uni.hideLoading();
})
// this.$Request.postJson('/app/selectUserById?userId=' + userId).then(res => {
// if (res.code === 0) {
// // #ifdef APP-PLUS
// if (uni.getSystemInfoSync().platform == "android") {
// let clientid = plus.push.getClientInfo().clientid;
// this.$Request.postT('/appLogin/updateClientId?clientId=' + clientid + '&userId=' + userId).then(res => {
// });
// }
// // #endif
// this.$queue.setData('image_url', res.data.imageUrl ? res.data.imageUrl : '/static/img/common/logo.jpg');
// this.$queue.setData('relation_id', res.data.relationId);
// this.$queue.setData('relation', res.data.invitationCode);
// this.$queue.setData('grade', res.data.grade);
// this.$queue.setData('mobile', res.data.mobile);
// this.$queue.setData('isInvitation', res.data.isInvitation);
// this.$queue.setData('nickName', res.data.nickName ? res.data.nickName : res.data.phone);
// this.$queue.setData('gender', parseInt(res.data.gender));
// uni.switchTab({
// url: '/pages/index/index'
// });
// } else {
// uni.showModal({
// showCancel: false,
// title: '登录失败',
// content: res.msg
// });
// this.$queue.logout();
// }
// uni.hideLoading();
// });
}
}
};
</script>
<style lang="scss" >
page {
background: #ffffff;
}
.footerViewDEghTTorsp {
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #333333;
position: absolute;
left: 0;
right: 0;
bottom: 78rpx;
.cuIcon::before{
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
}
.cuIcon-round::before {
content: "\e6d7";
}
.cuIcon-radiobox:before {
content: "\e75b";
color: #37A6FF;
}
}
.send-msgDEghTTorsp {
line-height: initial;
font-weight: 400;
font-size: 28rpx;
color: #EC6F48;
border: none;
background-color: transparent;
}
.send-msgDEghTTorsp::after{
border: none;
background-color: transparent;
}
.containerDEghTTorsp {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
box-sizing: border-box;
}
.wrapperDEghTTorsp {
min-height: 100vh;
position: relative;
z-index: 90;
}
.input-contentDEghTTorsp {
padding: 0 56rpx;
}
.cu-form-groupDEghTTorsp{
display: flex;
flex-direction: column;
align-items: flex-start;
margin-bottom: 48rpx;
background-color: transparent;
padding: 0;
.title{
margin-bottom: 32rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.input{
width: 100%;
height: 84rpx;
line-height: 84rpx;
background-color: #fff;
align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx;
}
}
.confirm-btnDEghTTorsp {
width: 100%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
border-radius: 16rpx;
margin-top: 40rpx;
background: #EC6F48;
font-size: 32rpx;
color: #FFFFFF;
&:after {
border: none;
}
}
</style>

View File

@@ -1,18 +1,18 @@
<template>
<view class="containersView">
<view class="containersViewDEghTTorsp">
<div style="width: 100%;height: 85%;position: absolute;background: url('../../static/images/appeq_bg.png') no-repeat center bottom / cover;"></div>
<view style="text-align: center;position: relative;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;">
<image style="width: 124rpx;height: 124rpx;margin-top: -920rpx;border-radius:20upx;" src="../../static/images/appLogo.png"></image>
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP</view>
<view style="font-size: 40rpx;margin-top: 22rpx;color: #FFFFFF;font-weight: bold;">斯耀短剧APP{{isWeixin}}</view>
<view style="font-size: 28rpx;margin-top: 16rpx;color: #FFFFFF;font-weight: bold;">海量电子榨菜 免费又过瘾</view>
<button class="confirm-btn" @click="taobaoLogin">{{confirmBtn}}</button>
<button class="confirm-btnDEghTTorsp" @click="taobaoLoginDEghTTorsp">{{confirmBtn}}</button>
</view>
<view id="shareit" v-if="show_share" @tap="closeShare">
<image class="arrow" src="https://renwu.xiansqx.com/img/20210813/9aa484db4c60458f86deb2a8ab6fe400.png">
<view id="shareitDEghTTorsp" v-if="show_share" @tap="closeShareDEghTTorsp">
<image class="arrowDEghTTorsp" src="https://renwu.xiansqx.com/img/20210813/9aa484db4c60458f86deb2a8ab6fe400.png">
</image>
<view id="follow">点击右上角按钮选择浏览器打开下载</view>
<view id="followDEghTTorsp">点击右上角按钮选择浏览器打开下载</view>
</view>
<!-- #ifdef H5 -->
<div v-if="isWeixin" style="width: 100%;height: 100%;position: absolute;top: 0;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;"></div>
@@ -49,10 +49,10 @@
},
methods: {
closeShare() {
closeShareDEghTTorsp() {
this.show_share = false;
},
taobaoLogin() {
taobaoLoginDEghTTorsp() {
var u = navigator.userAgent;
if (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1) {
@@ -151,11 +151,11 @@
width: 100%;
height: 100%;
}
.containersView {
.containersViewDEghTTorsp {
width: 100%;
height: 100%;
}
#shareit {
#shareitDEghTTorsp {
-webkit-user-select: none;
position: fixed;
/*width: 100%;*/
@@ -167,11 +167,11 @@
z-index: 999;
}
#shareit img {
#shareitDEghTTorsp img {
max-width: 100%;
}
.arrow {
.arrowDEghTTorsp {
width: 100px;
height: 150px;
position: absolute;
@@ -179,7 +179,7 @@
top: 1%;
}
#follow {
#followDEghTTorsp {
margin-right: 60px;
margin-left: 30px;
width: 90%;
@@ -193,99 +193,13 @@
margin-top: 160px;
}
.footer {
padding-left: 140upx;
margin-top: 32upx;
font-size: 24upx;
color: #666666;
text-align: center;
display: flex;
}
page {
background: #fff;
}
.send-msg {
border-radius: 30px;
color: black;
background: white;
height: 30px;
font-size: 14px;
line-height: 30px;
}
.container {
top: 0;
padding-top: 50px;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.wrapper {
position: relative;
z-index: 90;
background: #fff;
padding-bottom: 20px;
}
.right-top-sign {
position: absolute;
top: 40px;
right: -15px;
z-index: 95;
&:before,
&:after {
display: block;
content: '';
width: 20px;
height: 40px;
background: #e10a07;
}
&:before {
transform: rotate(50deg);
border-radius: 0 50px 0 0;
}
&:after {
position: absolute;
right: -198px;
top: 0;
transform: rotate(-50deg);
border-radius: 50px 0 0 0;
/* background: pink; */
}
}
.left-bottom-sign {
position: absolute;
left: -270px;
bottom: -320px;
/*border: 100upx solid #d0d1fd;*/
border-radius: 50%;
padding: 90px;
}
.welcome {
position: relative;
left: 30px;
top: -55px;
font-size: 28px;
color: #555;
text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
}
.input-content {
padding: 0 20px;
}
.confirm-btn {
.confirm-btnDEghTTorsp {
width: 416rpx;
height: 90rpx;
line-height: 90rpx;

View File

@@ -1,7 +1,7 @@
<template>
<view class="container">
<view class="wrapper">
<view class="input-content">
<view class="containerDEghTTorsp">
<view class="wrapperDEghTTorsp">
<view class="input-contentDEghTTorsp">
<view class="cu-form-group" style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
<view class="title text-black">手机号</view>
<input type="number" :value="phone" placeholder="请输入手机号" maxlength="11" data-key="phone"
@@ -12,7 +12,7 @@
<text class="title text-black">验证码</text>
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChange" @confirm="startReg" />
<button class="send-msg" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
<button class="send-msgDEghTTorsp" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
</view>
<view class="cu-form-group" style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
@@ -33,8 +33,8 @@
@input="inputChange" @confirm="startReg" />
</view> -->
</view>
<button class="confirm-btn" @click="startReg">立即注册</button>
<view class="footer">
<button class="confirm-btnDEghTTorsp" @click="startReg">立即注册</button>
<view class="footerDEghTTorsp">
<text @tap="isShowAgree" class="cuIcon"
:class="showAgree ? 'cuIcon-radiobox' : 'cuIcon-round'">同意</text>
<!-- 协议地址 -->
@@ -237,7 +237,6 @@
uni.setStorageSync('invitationCode', res.data.invitationCode)
uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)
uni.setStorageSync('certNum', res.data.certNum)
this.$Request.get("/app/UserVip/isUserVip").then(res => {
if (res.code == 0 && res.data && res.data.isVip == 2) {
uni.setStorageSync('isVIP', true)
@@ -269,7 +268,7 @@
background: #FFFFFF !important;
}
.footer {
.footerDEghTTorsp {
padding-left: 140upx;
margin-top: 32upx;
text-align: center;
@@ -277,7 +276,7 @@
color: #333;
}
.send-msg {
.send-msgDEghTTorsp {
border-radius: 30px;
color: white;
height: 30px;
@@ -287,7 +286,7 @@
}
.container {
.containerDEghTTorsp {
padding-top: 32upx;
position: relative;
width: 100%;
@@ -296,7 +295,7 @@
}
.wrapper {
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
background: #FFFFFF;
@@ -304,12 +303,12 @@
}
.input-content {
.input-contentDEghTTorsp {
padding: 32upx 80upx;
}
.confirm-btn {
.confirm-btnDEghTTorsp {
width: 600upx;
height: 80upx;
line-height: 80upx;

View File

@@ -1,26 +1,26 @@
<template>
<view class="register">
<view class="wrapper">
<view class="input-content">
<view class="wrapperDEghTTorsp">
<view class="input-contentDEghTTorsp">
<view class="cu-form-group" style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
<view class="title">手机号</view>
<input type="number" :disabled="true" :value="phone" placeholder="请输入手机号" maxlength="11" data-key="phone" @input="inputChange" />
<input type="number" :disabled="true" :value="phone" placeholder="请输入手机号" maxlength="11" data-key="phone" @input="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group" style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;">
<text class="title">设置密码</text>
<input type="password" :value="password" placeholder="请设置密码" placeholder-class="input-empty" maxlength="20"
minlength="6" data-key="password" @input="inputChange" />
minlength="6" data-key="password" @input="inputChangeDEghTTorsp" />
</view>
<!-- <view class="cu-form-group" style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;" v-if="required == '是'">
<text class="title">邀请码</text>
<input type="number" maxlength="6" :value="invitation" placeholder="请填写邀请码(必填)" data-key="invitation" @input="inputChange" />
<input type="number" maxlength="6" :value="invitation" placeholder="请填写邀请码(必填)" data-key="invitation" @input="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group" style="border-bottom: 2upx solid whitesmoke;margin-bottom: 20px;" v-if="required == '否'">
<text class="title">邀请码</text>
<input type="number" maxlength="6" :value="invitation" placeholder="请填写邀请码(选填)" data-key="invitation" @input="inputChange" />
<input type="number" maxlength="6" :value="invitation" placeholder="请填写邀请码(选填)" data-key="invitation" @input="inputChangeDEghTTorsp" />
</view> -->
</view>
<button class="confirm-btn" @click="startReg">绑定手机号</button>
<button class="confirm-btnDEghTTorsp" @click="startRegDEghTTorsp">绑定手机号</button>
</view>
</view>
</template>
@@ -51,7 +51,7 @@
if(d.phone){
this.phone = d.phone;
}
this.invitationMa();
this.invitationMaDEghTTorsp();
let a = this.$queue.getData("isEnable")
if (a) {
this.isEnable = a;
@@ -73,17 +73,9 @@
_this = this;
},
methods: {
showMa() {
//
this.$Request.getT('/app/common/type/4').then(res => {
if (res.code == 0) {
this.invitationCode = res.data.value;
}
});
},
//
invitationMa() {
invitationMaDEghTTorsp() {
this.$Request.getT('/app/common/type/3').then(res => {
if (res.code == 0) {
this.required = res.data.value;
@@ -91,61 +83,12 @@
}
});
},
inputChange(e) {
inputChangeDEghTTorsp(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 {
phone
} = this;
if (!phone) {
this.$queue.showToast("请输入手机号");
} else if (phone.length !== 11) {
this.$queue.showToast("请输入正确的手机号");
} else {
this.$queue.showLoading("正在发送验证码...");
this.$Request.getT("/msg/sendMsg/" + phone + "/weixin").then(res => {
if (res.code === 0) {
this.sending = true;
this.$queue.showToast('验证码发送成功请注意查收');
this.countDown();
uni.hideLoading();
} else {
console.log(JSON.stringify(res))
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码',
});
}
});
}
},
isShowAgree() {
//
_this.showAgree = !_this.showAgree;
},
startReg() {
startRegDEghTTorsp() {
if (this.phone.length != 11) {
uni.showToast({
icon: 'none',
@@ -201,37 +144,7 @@
}
});
},
getUserInfo(userId, token) {
this.$Request.get("/app/user/selectUserById").then(res => {
if (res.code == 0) {
uni.setStorageSync('token', token)
uni.setStorageSync('userId', res.data.userId)
uni.setStorageSync('avatar', res.data.avatar)
uni.setStorageSync('invitationCode', res.data.invitationCode)
uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)
uni.setStorageSync('certNum', res.data.certNum)
this.$Request.get("/app/UserVip/isUserVip").then(res => {
if (res.code == 0 && res.data && res.data.isVip == 2) {
uni.setStorageSync('isVIP', true)
} else {
uni.setStorageSync('isVIP', false)
}
});
uni.switchTab({
url: '/pages/index/index'
});
} else {
uni.showModal({
showCancel: false,
title: '登录失败',
content: res.msg
});
this.$queue.logout();
}
uni.hideLoading();
});
}
}
}
</script>
@@ -242,54 +155,21 @@
background: #ffffff;
}
.footer {
padding-left: 140upx;
margin-top: 32upx;
text-align: center;
display: flex;
}
.send-msg {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #5074FF;
}
.send-msgs {
border-radius: 30px;
color: #999999;
height: 30px;
font-size: 14px;
line-height: 30px;
background: white;
}
.container {
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.wrapper {
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
background: #ffffff;
padding-bottom: 20px;
}
.input-content {
.input-contentDEghTTorsp {
padding: 0 20px;
}
.confirm-btn {
.confirm-btnDEghTTorsp {
width: 300px;
height: 42px;
line-height: 42px;

View File

@@ -0,0 +1,491 @@
<template>
<view class="containerDEghTTorsp">
<!-- 小程序状态下登录 -->
<!-- #ifdef MP-WEIXIN -->
<view class="mp_wxBoxDEghTTorsp">
<view>
<view class="headersDEghTTorsp">
<image src="../../static/images/logo.png" style="border-radius: 50%;"></image>
</view>
<view class="content">
<view>申请获取以下权限</view>
<text>获得你的公开信息(昵称头像地区等)</text>
</view>
<button v-show="weixinPhone" style="background: #ff7581;color: #FFFFFF;" class="bottom"
open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
授权手机号
</button>
<button v-show="!weixinPhone" style="background: #ff7581;color: #FFFFFF;" class='bottom'
bindtap="getUserProfile" @tap="wxGetUserInfoDEghTTorsp">
授权登录
</button>
</view>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="wrapperDEghTTorsp">
<view class="input-contentDEghTTorsp">
<view class="cu-form-group"
style="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="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group" style="border: 2upx solid whitesmoke;border-radius: 30px">
<view class="title">
<text style="margin-left: 30rpx;"></text>
</view>
<input type="password" placeholder="请输入密码" maxlength="20" :value="code" data-key="code"
@input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<text class="send-msgDEghTTorsp" @click="forgetDEghTTorsp">忘记密码</text>
</view>
</view>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp">登录</button>
<view style="margin-top: 32px;text-align: center">
<view>
没有账号
<text style="color: #ff7581" @click="registerDEghTTorsp()">立即注册</text>
</view>
</view>
</view>
<!-- #endif -->
<!-- #ifdef MP -->
<view class="footerDEghTTorsp">
<u-checkbox-group>
<u-checkbox v-model="checked" label-size='24upx' shape="circle" @change="radioChangeDEghTTorsp"></u-checkbox>
</u-checkbox-group>
<view>同意</view>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate">隐私政策</navigator>
<navigator url="/me/setting/xieyi" open-type="navigate">用户服务协议</navigator>
</view>
<!-- #endif -->
</view>
</template>
<script>
export default {
data() {
return {
mobile: '',
code: '',
sessionkey: '',
flag: '1',
weixinPhone: false,
sending: false,
sendDataList: {},
phone: '',
sendTime: '获取验证码',
count: 60,
checked: false
};
},
methods: {
// 注册
registerDEghTTorsp() {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/WVEtZeeghK'
});
},
// 忘记密码
forgetDEghTTorsp() {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/EAkIghCGJS'
});
},
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
radioChangeDEghTTorsp(e) {
console.log(e);
},
//第一授权获取用户信息===》按钮触发
wxGetUserInfoDEghTTorsp(e) {
let that = this;
if (this.checked) {
wx.getUserProfile({
desc: '业务需要',
success: infoRes => {
console.log("infoRes.encryptedData__________:" + JSON.stringify(infoRes.userInfo))
let nickName = infoRes.userInfo.nickName; //昵称
let avatarUrl = infoRes.userInfo.avatarUrl; //头像
let sex = infoRes.userInfo.gender; //头像
try {
that.loginDEghTTorsp(nickName, avatarUrl, sex);
} catch (e) {}
}
})
} else {
uni.showToast({
title: '请同意隐私政策和用户服务协议',
icon: 'none'
})
}
},
//登录
loginDEghTTorsp(nickName, avatarUrl, sex) {
let that = this;
// 1.wx获取登录用户code
uni.login({
provider: 'weixin',
success: function(loginRes) {
let data = {
code: loginRes.code
}
that.$u.api.wxLogin(data).then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('openId', res.data.open_id)
uni.setStorageSync('unionId', res.data.unionId)
that.sessionkey = res.data.session_key;
let invitationCode = '';
if (uni.getStorageSync('invitation')) {
invitationCode = uni.getStorageSync('invitation')
}
let sendData = {
openId: uni.getStorageSync('openId'),
unionId: uni.getStorageSync('unionId'),
userName: nickName,
avatar: avatarUrl,
sex: sex, //性别
inviterCode: invitationCode //别人登录进来携带你的邀请码
};
that.sendDataList = sendData;
that.flag = res.data.flag;
if (that.flag == '1') {
that.weixinPhone = true;
} else {
that.getWeixinInfoDEghTTorsp(sendData);
}
} else {
uni.showToast({
icon: 'none',
title: res.msg,
duration: 2000
});
}
})
}
});
},
//小程序微信登录后获取手机号
getPhoneNumber: function(e) {
if (e.detail.errMsg == 'getPhoneNumber:fail user deny') {
console.log('用户拒绝提供手机号');
} else {
console.log('用户同意提供手机号');
this.setPhoneByInsertDEghTTorsp(e.detail.encryptedData, e.detail.iv);
}
},
//小程序微信登录后获取手机号
setPhoneByInsertDEghTTorsp(decryptData, iv) {
let data = {
decryptData: decryptData,
key: this.sessionkey,
iv: iv
};
this.$u.api.selectPhone(data).then(res => {
if (res.code == 0) {
this.phone = res.data.phoneNumber;
this.getWeixinInfoDEghTTorsp(this.sendDataList);
} else {
uni.showToast({
title: res.msg,
duration: 2000
});
}
})
},
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;
console.log(mobile)
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 => {
// this.$Request.getT('/appLogin/sendMsg/' + mobile + '/bind').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 : '请一分钟后再获取验证码'
});
}
});
}
},
toLoginDEghTTorsp() {
// this.$queue.loginClear();
// let openid = this.$queue.getData('openid');
let openid = uni.getStorageSync('openId')
const {
mobile,
code
} = this;
if (!mobile) {
// this.$queue.showToast('请输入手机号');
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (mobile.length != 11) {
// this.$queue.showToast('请输入手机号');
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 1000
})
} else if (!code) {
// this.$queue.showToast('请输入密码');
uni.showToast({
title: '请输入密码',
icon: 'none',
duration: 1000
})
} else {
uni.showLoading({
title: '正在登录中...',
})
this.$u.post('/app/Login/registerCode?password=' + code + '&phone=' + mobile).then(res => {
if (res.code === 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('userName', res.user.userName)
uni.setStorageSync('avatar', res.user.avatar ? res.user.avatar :
'../../static/images/logo.png')
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
uni.setStorageSync('sex', res.user.sex)
uni.setStorageSync('userId', res.user.userId)
//设置渠道码
if (res.user.qdCode) {
uni.setStorageSync('qdCode', res.user.qdCode)
}
// uni.setStorageSync('openId', res.user.openId)
// this.getWeixinInfoDEghTTorsp(this.sendDataList);
uni.showToast({
title: '登录成功',
icon: 'none'
})
uni.navigateBack({
delta: 2
})
} else {
uni.hideLoading();
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
}
});
}
},
//获取个人信息
getWeixinInfoDEghTTorsp(sendData) {
let that = this;
uni.showLoading({
title: '登录中...'
});
let postData = {
openId: sendData.openId, //小程序openId
unionId: sendData.unionId, //unionId
userName: sendData.userName, //微信名称
avatar: sendData.avatar, //头像
sex: sendData.sex, //性别
phone: that.phone,
inviterCode: sendData.inviterCode
};
that.$u.api.insertWxUser(postData).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userName', res.user.userName)
uni.setStorageSync('avatar', res.user.avatar)
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
uni.setStorageSync('sex', res.user.sex)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('openId', res.user.openId)
let data = {
userId: uni.getStorageSync('userId')
}
that.$u.api.userVip(data).then(res => {
if (res.code == 0 && res.data && res.data.isVip == 2) {
uni.setStorageSync('isVIP', true)
} else {
uni.setStorageSync('isVIP', false)
}
})
uni.navigateBack();
} else {
uni.showModal({
showCancel: false,
title: '登录失败',
content: res.msg,
});
}
})
},
}
};
</script>
<style lang="scss">
.headersDEghTTorsp {
text-align: center;
}
.headersDEghTTorsp>image {
width: 400upx;
height: 400upx;
}
.footerDEghTTorsp {
padding-left: 150rpx;
margin-top: 32upx;
font-size: 24upx;
color: #666666;
text-align: center;
display: flex;
}
page {
background: #ffffff;
}
.send-msgDEghTTorsp {
border-radius: 30px;
color: black;
background: white;
height: 30px;
font-size: 14px;
line-height: 30px;
}
.containerDEghTTorsp {
top: 0;
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
.mp_wxBoxDEghTTorsp {
.headersDEghTTorsp {
margin: 35% auto 50rpx;
text-align: center;
border-radius: 60rpx;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
image {
width: 300rpx;
height: 300rpx;
}
}
.content {
text-align: center;
}
text {
display: block;
color: #9d9d9d;
margin-top: 40rpx;
}
.bottom {
line-height: 80upx;
border-radius: 80upx;
margin: 70rpx 50rpx;
height: 80upx;
font-size: 35rpx;
}
}
}
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
background: #ffffff;
padding-bottom: 20px;
}
.input-contentDEghTTorsp {
padding: 0 20px;
}
.confirm-btnDEghTTorsp {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 40px;
// background: linear-gradient(to left, #3f5ecb 0, #5074FF 100%);
background: #ff7581;
color: #ffffff;
// font-size: $font-lg;
&:after {
border-radius: 60px;
}
}
</style>

View File

@@ -198,7 +198,7 @@
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/login/wxmobile'
url: '/pages/ghtwwlkXYG/AoOwHCZghW'
});
} else if (res.cancel) {
console.log('用户点击取消');
@@ -450,7 +450,7 @@
})
} else {
uni.navigateTo({
url: '/pages/login/bind'
url: '/pages/ghtwwlkXYG/MFkHiQghje'
});
}
});
@@ -502,7 +502,7 @@
})
} else {
uni.navigateTo({
url: '/pages/login/bind'
url: '/pages/ghtwwlkXYG/MFkHiQghje'
});
}
});
@@ -530,7 +530,7 @@
})
} else {
uni.navigateTo({
url: '/pages/login/bind'
url: '/pages/ghtwwlkXYG/MFkHiQghje'
});
}
});
@@ -547,7 +547,7 @@
register() {
if (this.checked) {
uni.navigateTo({
url: '/pages/login/loginPhone'
url: '/pages/ghtwwlkXYG/wVghNzmqkQPhone'
});
} else {
uni.showToast({
@@ -560,7 +560,7 @@
//
forget() {
uni.navigateTo({
url: '/pages/login/forgetPwd'
url: '/pages/ghtwwlkXYG/EAkIghCGJS'
});
},
inputChange(e) {

View File

@@ -0,0 +1,446 @@
<template>
<view class="containerDEghTTorsp">
<view class="wrapperDEghTTorsp">
<view class="input-contentDEghTTorsp">
<view class="cu-form-group"
style="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="inputChangeDEghTTorsp" />
</view>
<view class="cu-form-group" style="border: 2upx solid whitesmoke;border-radius: 30px">
<view class="title">
<text style="margin-left: 30rpx;"></text>
</view>
<input type="password" placeholder="请输入密码" maxlength="20" :value="code" data-key="code"
@input="inputChangeDEghTTorsp" @confirm="toLoginDEghTTorsp" />
<text class="send-msg" @click="forgetDEghTTorsp">忘记密码</text>
</view>
</view>
<button class="confirm-btnDEghTTorsp" @click="toLoginDEghTTorsp">登录</button>
<view style="margin-top: 32px;text-align: center">
<view>
没有账号
<text style="color: #ff7581" @click="registerDEghTTorsp()">立即注册</text>
</view>
</view>
</view>
<view class="footerDEghTTorsp">
<u-checkbox-group>
<u-checkbox v-model="checked" label-size='24upx' shape="circle" @change="radioChangeDEghTTorsp"></u-checkbox>
</u-checkbox-group>
<view>同意</view>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate">隐私政策</navigator>
<navigator url="/me/setting/xieyi" open-type="navigate">用户服务协议</navigator>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {
mobile: '',
code: '',
sessionkey: '',
flag: '1',
weixinPhone: false,
sending: false,
sendDataList: {},
phone: '',
sendTime: '获取验证码',
count: 60,
checked: false
};
},
onLoad() {
if (uni.getStorageSync('isSafeView')) {
uni.showModal({
title: '提示',
content: '您正在使用无痕浏览,可能导致登录状态失效,建议切换浏览模式',
})
uni.setStorageSync("isSafeView", null)
}
},
methods: {
// 注册
registerDEghTTorsp() {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/WVEtZeeghK'
});
},
// 忘记密码
forgetDEghTTorsp() {
uni.navigateTo({
url: '/pages/ghtwwlkXYG/EAkIghCGJS'
});
},
inputChangeDEghTTorsp(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
radioChangeDEghTTorsp(e) {
console.log(e);
},
//第一授权获取用户信息===》按钮触发
wxGetUserInfoDEghTTorsp(e) {
let that = this;
if (this.checked) {
wx.getUserProfile({
desc: '业务需要',
success: infoRes => {
console.log("infoRes.encryptedData__________:" + JSON.stringify(infoRes.userInfo))
let nickName = infoRes.userInfo.nickName; //昵称
let avatarUrl = infoRes.userInfo.avatarUrl; //头像
let sex = infoRes.userInfo.gender; //头像
try {
that.loginDEghTTorsp(nickName, avatarUrl, sex);
} catch (e) {}
}
})
} else {
uni.showToast({
title: '请同意隐私政策和用户服务协议',
icon: 'none'
})
}
},
//登录
loginDEghTTorsp(nickName, avatarUrl, sex) {
let that = this;
// 1.wx获取登录用户code
uni.login({
provider: 'weixin',
success: function(loginRes) {
let data = {
code: loginRes.code
}
that.$u.api.wxLogin(data).then(res => {
if (res.code == 0 && res.data) {
uni.setStorageSync('openId', res.data.open_id)
uni.setStorageSync('unionId', res.data.unionId)
that.sessionkey = res.data.session_key;
let invitationCode = '';
if (uni.getStorageSync('invitation')) {
invitationCode = uni.getStorageSync('invitation')
}
let sendData = {
openId: uni.getStorageSync('openId'),
unionId: uni.getStorageSync('unionId'),
userName: nickName,
avatar: avatarUrl,
sex: sex, //性别
inviterCode: invitationCode //别人登录进来携带你的邀请码
};
that.sendDataList = sendData;
that.flag = res.data.flag;
if (that.flag == '1') {
that.weixinPhone = true;
} else {
that.getWeixinInfoDEghTTorsp(sendData);
}
} else {
uni.showToast({
icon: 'none',
title: res.msg,
duration: 2000
});
}
})
}
});
},
//小程序微信登录后获取手机号
getPhoneNumber: function(e) {
if (e.detail.errMsg == 'getPhoneNumber:fail user deny') {
console.log('用户拒绝提供手机号');
} else {
console.log('用户同意提供手机号');
this.setPhoneByInsertDEghTTorsp(e.detail.encryptedData, e.detail.iv);
}
},
//小程序微信登录后获取手机号
setPhoneByInsertDEghTTorsp(decryptData, iv) {
let data = {
decryptData: decryptData,
key: this.sessionkey,
iv: iv
};
this.$u.api.selectPhone(data).then(res => {
if (res.code == 0) {
this.phone = res.data.phoneNumber;
this.getWeixinInfoDEghTTorsp(this.sendDataList);
} else {
uni.showToast({
title: res.msg,
duration: 2000
});
}
})
},
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);
}
},
sendMsgDEghTTorsp() {
const {
mobile
} = this;
console.log(mobile)
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 => {
// this.$Request.getT('/appLogin/sendMsg/' + mobile + '/bind').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 : '请一分钟后再获取验证码'
});
}
});
}
},
toLoginDEghTTorsp() {
// this.$queue.loginClear();
// let openid = this.$queue.getData('openid');
if (!this.checked) {
return this.$refs.uToast.show({
title: '请阅读并同意《隐私政策》和《用户服务协议》',
duration: 1500
})
}
let openid = uni.getStorageSync('openId')
const {
mobile,
code
} = this;
if (!mobile) {
// this.$queue.showToast('请输入手机号');
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (mobile.length != 11) {
// this.$queue.showToast('请输入手机号');
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 1000
})
} else if (!code) {
// this.$queue.showToast('请输入密码');
uni.showToast({
title: '请输入密码',
icon: 'none',
duration: 1000
})
} else {
uni.showLoading({
title: '正在登录中...',
})
this.$u.post('/app/Login/registerCode?password=' + code + '&phone=' + mobile).then(res => {
if (res.code === 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('userName', res.user.userName)
uni.setStorageSync('avatar', res.user.avatar ? res.user.avatar :
'../../static/images/logo.png')
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
uni.setStorageSync('sex', res.user.sex)
uni.setStorageSync('userId', res.user.userId)
//设置渠道码
if (res.user.qdCode) {
uni.setStorageSync('qdCode', res.user.qdCode)
}
// uni.setStorageSync('openId', res.user.openId)
// this.getWeixinInfoDEghTTorsp(this.sendDataList);
uni.showToast({
title: '登录成功',
icon: 'none'
})
const arr= getCurrentPages()
if(arr.length<=1){
return uni.reLaunch({
url:'/pages/index/index'
})
}
uni.navigateBack({
delta: arr.length<=2?1:2
})
} else {
uni.hideLoading();
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1000
})
}
});
}
},
//获取个人信息
getWeixinInfoDEghTTorsp(sendData) {
let that = this;
uni.showLoading({
title: '登录中...'
});
let postData = {
openId: sendData.openId, //小程序openId
unionId: sendData.unionId, //unionId
userName: sendData.userName, //微信名称
avatar: sendData.avatar, //头像
sex: sendData.sex, //性别
phone: that.phone,
inviterCode: sendData.inviterCode
};
that.$u.api.insertWxUser(postData).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userName', res.user.userName)
uni.setStorageSync('avatar', res.user.avatar)
uni.setStorageSync('phone', res.user.phone)
uni.setStorageSync('invitationCode', res.user.invitationCode)
uni.setStorageSync('sex', res.user.sex)
uni.setStorageSync('userId', res.user.userId)
uni.setStorageSync('openId', res.user.openId)
let data = {
userId: uni.getStorageSync('userId')
}
that.$u.api.userVip(data).then(res => {
if (res.code == 0 && res.data && res.data.isVip == 2) {
uni.setStorageSync('isVIP', true)
} else {
uni.setStorageSync('isVIP', false)
}
})
uni.navigateBack();
} else {
uni.showModal({
showCancel: false,
title: '登录失败',
content: res.msg,
});
}
})
},
}
};
</script>
<style lang="scss">
.footerDEghTTorsp {
padding-left: 150rpx;
margin-top: 32upx;
font-size: 24upx;
color: #666666;
text-align: center;
display: flex;
}
page {
background: #ffffff;
}
.send-msg {
border-radius: 30px;
color: black;
background: white;
height: 30px;
font-size: 14px;
line-height: 30px;
}
.containerDEghTTorsp {
top: 0;
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.wrapperDEghTTorsp {
position: relative;
z-index: 90;
background: #ffffff;
padding-bottom: 20px;
}
.input-contentDEghTTorsp {
padding: 0 20px;
}
.confirm-btnDEghTTorsp {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 40px;
// background: linear-gradient(to left, #3f5ecb 0, #5074FF 100%);
background: #ff7581;
color: #ffffff;
// font-size: $font-lg;
&:after {
border-radius: 60px;
}
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<view>
<view class="userMain">
<view class="userMain-item u-border-bottom">
<view class="userMainDEghTTorsp">
<view class="userMainDEghTTorsp-item u-border-bottom">
<view>头像</view>
<view>
<!-- #ifdef MP-WEIXIN -->
@@ -11,36 +11,36 @@
</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<image :src="headImg?headImg:'../../static/images/logo.png'" mode="" @click="uploadImg"
<image :src="headImg?headImg:'../../static/images/logo.png'" mode="" @click="uploadImgDEghTTorsp"
style="width: 111rpx;height: 111rpx;border-radius: 50%;"></image>
<!-- #endif -->
</view>
</view>
<view class="userMain-item item-padding u-border-bottom">
<view class="userMainDEghTTorsp-item item-padding u-border-bottom">
<view>用户名</view>
<view>
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<input type="nickname" v-model="userName" placeholder="请输入用户名" />
</view>
</view>
</view>
<!-- <view class="userMain-item item-padding">
<!-- <view class="userMainDEghTTorsp-item item-padding">
<view >姓名</view>
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<input v-model="realName" placeholder="请填写您的真实姓名" />
</view>
</view> -->
<view class="userMain-item item-padding u-border-bottom">
<view class="userMainDEghTTorsp-item item-padding u-border-bottom">
<view>手机</view>
<view>
<!-- #ifndef MP-WEIXIN -->
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<input v-if="phone" disabled v-model="phone" placeholder="请输入联系电话" />
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="cu-form-group">
<view class="cu-form-groupDEghTTorsp">
<input v-if="phone" disabled v-model="phone" placeholder="请输入联系电话" />
<button v-else
style="background-color: #ff7581 !important;color: #FFFFFF;font-size: 22rpx;padding: 10rpx 20rpx;"
@@ -52,18 +52,18 @@
</view>
</view>
<!-- <view class="userMain-item item-padding" @click="goMyAddress">
<!-- <view class="userMainDEghTTorsp-item item-padding" @click="goMyAddressDEghTTorsp">
<view >地址管理</view>
<view>
<view class="cu-form-group" >
<view class="cu-form-groupDEghTTorsp" >
<image src="../static/right.png" style="width: 12rpx; height: 19rpx;margin-left: 10rpx;" mode=""></image>
</view>
</view>
</view> -->
</view>
<view class="footer-btn">
<view class="userMain-btn" @click="messagebtn()">保存</view>
<view class="footer-btnDEghTTorsp">
<view class="userMainDEghTTorsp-btn" @click="messagebtnDEghTTorsp()">保存</view>
</view>
</view>
</template>
@@ -91,10 +91,10 @@
};
},
onLoad(e) {
this.getUserInfo()
this.getUserInfoDEghTTorsp()
},
methods: {
getMyPhone(code) {
getMyPhoneDEghTTorsp(code) {
let data = {
code: code
}
@@ -127,7 +127,7 @@
// #endif
// #ifdef MP-WEIXIN
if (e.detail.code) {
this.getMyPhone(e.detail.code)
this.getMyPhoneDEghTTorsp(e.detail.code)
} else {
uni.showToast({
title: '获取手机号失败',
@@ -146,7 +146,7 @@
// #endif
},
goMyAddress() {
goMyAddressDEghTTorsp() {
uni.navigateTo({
url: '../jifen/myaddress'
});
@@ -161,7 +161,7 @@
title: '上传中...'
});
uni.uploadFile({
url: configdata.APIHOST + 'alioss/upload',
url: configdata.APIHOST + '/alioss/upload',
// url: 'https://jiaoyu.xianmxkj.com/sqx_fast/alioss/upload', //
filePath: e.detail.avatarUrl,
// filePath: res.tempFilePaths[0],
@@ -178,7 +178,7 @@
});
},
uploadImg() {
uploadImgDEghTTorsp() {
let token = uni.getStorageSync('token')
if (!token) {
@@ -214,7 +214,7 @@
let token = uni.getStorageSync('token');
let userId = uni.getStorageSync('userId');
uni.uploadFile({
url: configdata.APIHOST + 'alioss/upload',
url: configdata.APIHOST + '/alioss/upload',
// url: 'https://jiaoyu.xianmxkj.com/sqx_fast/alioss/upload', //
filePath: res.tempFilePaths[0],
name: 'file',
@@ -232,7 +232,7 @@
// title: '',
// icon: "none"
// })
// that.getUserInfo();
// that.getUserInfoDEghTTorsp();
// })
// uni.request({
// url: 'https://jiaoyu.xianmxkj.com/sqx_fast/app/user/updateUsers',
@@ -258,7 +258,7 @@
// uni.hideLoading();
// if (res.status === 0) {
// that.$queue.showToast("");
// that.getUserInfo(userId);
// that.getUserInfoDEghTTorsp(userId);
// }
// });
}
@@ -269,7 +269,7 @@
}
})
},
config: function(name) {
configDEghTTorsp: function(name) {
var info = null;
if (name) {
var name2 = name.split("."); //
@@ -291,7 +291,7 @@
}
return info;
},
getUserInfo() {
getUserInfoDEghTTorsp() {
let userId = uni.getStorageSync('userId')
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
@@ -331,11 +331,11 @@
// });
},
//
checkPhone(phone) {
checkPhoneDEghTTorsp(phone) {
return /^1[3456789]\d{9}$/.test(phone);
},
//
messagebtn() {
messagebtnDEghTTorsp() {
if (!this.userName) {
uni.showToast({
title: "用户名不能为空",
@@ -351,7 +351,7 @@
})
return
}
if (this.checkPhone(this.phone) == false) {
if (this.checkPhoneDEghTTorsp(this.phone) == false) {
uni.showToast({
title: "手机号格式不正确",
icon: "none"
@@ -427,11 +427,11 @@
height: 100%;
}
.userMain {
.userMainDEghTTorsp {
background: #FFFFFF;
}
.userMain-item {
.userMainDEghTTorsp-item {
display: flex;
align-items: center;
margin-left: 40rpx;
@@ -440,28 +440,28 @@
/* border-bottom: 2rpx solid #f2f2f2; */
}
.userMain-item.item-padding {
.userMainDEghTTorsp-item.item-padding {
padding: 0 40rpx 0 0;
}
.cu-form-group {
.cu-form-groupDEghTTorsp {
padding: 0;
background: #FFFFFF;
text-align: right;
}
.cu-form-group input {
.cu-form-groupDEghTTorsp input {
background: #FFFFFF;
font-size: 28rpx;
color: #333333;
}
.footer-btn {
.footer-btnDEghTTorsp {
margin-top: 150rpx;
}
.footer-btn .userMain-btn {
.footer-btnDEghTTorsp .userMainDEghTTorsp-btn {
color: #FFFFFF;
background: #ff7581;
text-align: center;

View File

@@ -0,0 +1,907 @@
<template>
<view style="padding-bottom: 40rpx;">
<u-navbar :background="background" :is-back="isBack" :title="title" :border-bottom="false">
</u-navbar>
<!-- 登录信息 -->
<view class="infoDEghTTorsp flex align-center justify-center">
<view class="infoDEghTTorsp-box">
<view @click="token?goNavDEghTTorsp('/pages/iSiAnfghCC/GqrTYehghi'):goNavDEghTTorsp('/pages/ghtwwlkXYG/wVghNzmqkQ')"
class="infoDEghTTorsp-box-c flex align-center justify-between">
<view class="infoDEghTTorsp-box-c-l flex align-center">
<view class="infoDEghTTorsp-box-c-l-avatar">
<image :src="avatar?avatar:'../../static/images/me/default_avatar.png'" mode=""></image>
</view>
<view class="infoDEghTTorsp-box-c-l-name">
<view class="infoDEghTTorsp-box-c-l-name-t">
{{userName?userName:'未登录'}}
</view>
<view class="infoDEghTTorsp-box-c-l-name-b" v-if="invitationCode">
ID:{{invitationCode}}
</view>
</view>
</view>
<view class="infoDEghTTorsp-box-c-r">
<u-icon name="arrow-right" color="#F6F6F6" size="28"></u-icon>
</view>
</view>
</view>
</view>
<!-- 统计 -->
<view class="statisticsDEghTTorsp flex align-center justify-center">
<view class="statisticsDEghTTorsp-box flex align-center justify-between">
<view class="statisticsDEghTTorsp-box-item" @click="goNavDEghTTorsp('/me/jilu/myLove')">
<view class="statisticsDEghTTorsp-box-item-top">
{{myLoveNum}}
</view>
<view class="statisticsDEghTTorsp-box-item-btn">
我的喜欢
</view>
</view>
<view class="statisticsDEghTTorsp-box-item" @click="goNavDEghTTorsp('/me/jilu/histor')">
<view class="statisticsDEghTTorsp-box-item-top">
{{myZhui}}
</view>
<view class="statisticsDEghTTorsp-box-item-btn">
我的追剧
</view>
</view>
<!-- <view class="statisticsDEghTTorsp-box-item" @click="goNavDEghTTorsp('/me/jifen/jifen')">
<view class="statisticsDEghTTorsp-box-item-top">
{{jifen}}
</view>
<view class="statisticsDEghTTorsp-box-item-btn">
我的积分
</view>
</view> -->
<view v-if="isShowMoneyPay" class="statisticsDEghTTorsp-box-item" @click="goNavDEghTTorsp('/me/invite/cashDetail')">
<view class="statisticsDEghTTorsp-box-item-top">
{{userInfo.amount || '0.00'}}
</view>
<view class="statisticsDEghTTorsp-box-item-btn">
我的红包
</view>
</view>
</view>
</view>
<!-- <view v-if="isVips == '是' && isWxIosPay == true" class="vipDEghTTorsp flex align-center justify-center">
<view class="vipDEghTTorsp-box flex align-center justify-between">
<view class="vipDEghTTorsp-box-l">
<view class="vipDEghTTorsp-box-l-l flex align-center">
{{isVIP?'会员用户':'开通会员'}}
<image src="../../static/images/me/Vips.png" mode=""></image>
</view>
<view class="vipDEghTTorsp-box-l-r" v-if="isVIP">
{{endTime?endTime+'到期':'您是尊贵的永久会员'}}
</view>
<view class="vipDEghTTorsp-box-l-r" v-else>
{{endTime?endTime+'到期':'升级VIP省更多钱'}}
</view>
</view>
<view v-if="!isVIP" @click="goNavDEghTTorsp('/pages/iSiAnfghCC/vipDEghTTorsp/index')"
class="vipDEghTTorsp-box-r flex align-center justify-center">
立即开通
</view>
</view>
</view> -->
<!-- 钱包 -->
<view class="moneyDEghTTorsp flex align-center justify-center" v-if="isWxIosPay == true">
<view class="moneyDEghTTorsp-box flex align-center justify-between">
<view class="">
<view class="moneyDEghTTorsp-box-title flex align-center">
<view class="moneyDEghTTorsp-box-title-l">
金币余额
</view>
<!-- <view @click="isShoMoney = !isShoMoney" class="moneyDEghTTorsp-box-title-r" style="margin-left: 12rpx;">
<u-icon :name="isShoMoney?'eye':'eye-off'" color="#5A4A32" size="40"></u-icon>
</view> -->
</view>
<view class="moneyDEghTTorsp-box-price">
<block v-if="isShoMoney">
{{formatNumberDEghTTorsp(moneyNum)}}
</block>
<block v-else>
****
</block>
</view>
</view>
<view class="moneyDEghTTorsp-box-btn" @click="goNavDEghTTorsp('/me/invite/moneyList?moneyType=2&viewType=2')">
金币明细
</view>
<!-- <view class="moneyDEghTTorsp-box-btn" @click="goNavDEghTTorsp('/me/wallet/wallet')">
立即充值
</view> -->
</view>
</view>
<!-- 常用工具 -->
<view class="toolDEghTTorsp flex align-center justify-center">
<view class="toolDEghTTorsp-box">
<view class="toolDEghTTorsp-box-content flex align-center justify-between flex-wrap">
<!-- #ifdef MP-TOUTIAO -->
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/wallet/mingxi')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/mingxi.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
钱包明细
</view>
</view>
<!-- #endif -->
<!-- <view v-if="kmPaySel != '否'" @click="openKaMiShowDEghTTorsp()"
class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/kamiDEghTTorsp.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
卡密兑换
</view>
</view> -->
<!-- <view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/choujiang/choujiang')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/zhuanpan.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
转盘抽奖
</view>
</view> -->
<view v-if="isShowMoneyPay" class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/invite/index')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/vfx.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
分享好友
</view>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/message/index')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/messige.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
消息中心
</view>
<u-badge :offset="[0,20]" type="error" :count="numCount"></u-badge>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/pages/task/index','tabbar')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/task.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
任务中心
</view>
<u-badge :offset="[0,20]" type="error" :count="numCount"></u-badge>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/jilu/record')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/vlishi.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
观看历史
</view>
</view>
<view v-if="rate>0 && isShowMoneyPay" class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/invite/inviteDet')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/vtd.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
我的团队
</view>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap" @click="goMsgDEghTTorsp()">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/vkf.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
联系客服
</view>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/feedbackIndex/feedbackIndex')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/bangzhu.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
帮助中心
</view>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/feedback/index')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/yijian.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
意见反馈
</view>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap"
@click="goNavDEghTTorsp('/me/setting/index')">
<view class="toolDEghTTorsp-box-content-item-img">
<image src="../../static/images/me/setting.png" mode=""></image>
</view>
<view class="toolDEghTTorsp-box-content-item-txt">
设置中心
</view>
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap" style="height: 0;">
</view>
<view class="toolDEghTTorsp-box-content-item flex align-center justify-center flex-wrap" style="height: 0;">
</view>
</view>
</view>
</view>
<!-- 卡密兑换弹窗 -->
<u-popup @close="kamiDEghTTorsp = ''" v-model="showCard" mode="center" border-radius="14" :closeable="true">
<view class="kamiDEghTTorsp">
<view class="kamiDEghTTorsp-title">
卡密兑换
</view>
<view class="kamiDEghTTorsp-input">
<u-input v-model="kamiDEghTTorsp" placeholder="请输入卡密" type="text" :border="true" />
</view>
<view @click="exchangeKaMiDEghTTorsp()" class="kamiDEghTTorsp-btn flex align-center justify-center">
确认兑换
</view>
</view>
</u-popup>
<!-- 抖音im客服 -->
<ttMsg />
<other-xuanfu></other-xuanfu>
</view>
</template>
<script>
import ttMsg from '../../components/ttMsg/ttMsg.vue'
import httpsRequest from '../../common/httpRequest.js'
import otherXuanfu from '@/components/other-xuafu.vue'
export default {
components: {
ttMsg,otherXuanfu
},
data() {
return {
title: '',
isBack: false,
background: {
backgroundImage: 'linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%)'
},
kamiDEghTTorsp: '', //卡密
isShoMoney: true, //是否显示余额
avatar: '../../static/images/logo.png',
img: '../../static/images/me/huiyuan.png',
swiperList: [{
imageUrl: '../../static/images/me/banner.png',
}],
isLogin: false,
userName: '未登录',
isVIP: false,
invitationCode: '',
token: '',
endTime: '', //会员到期时间
moneyNum: 0, //余额
jifen: 0, //积分
isVips: '否', //是否显示会员
myLoveNum: 0, //我的喜欢个数
myZhui: 0, //我的追剧数量
showCard: false,
numCount: 0,
rate: 0,
twoRate:0,
kmPaySel: '否',
isWxIosPay: true, //微信下是否显示支付功能
userInfo: {},
isShowMoneyPay: true,
}
},
onLoad() {
this.getBannerListDEghTTorsp()
},
onShow() {
const systemInfo = uni.getSystemInfoSync();
const isIOS = /iOS/.test(systemInfo.platform);
if ( !isIOS ) {
this.isBack = true
}
this.isWxIosPay = uni.getStorageSync('isWxIosPay')
this.kmPaySel = this.$queue.getData('kmPaySel');
this.numCount = uni.getStorageSync('numCount')
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
this.token = uni.getStorageSync('token')
if (this.token) {
this.getMyMoneyDEghTTorsp()
this.getPointsDEghTTorsp()
this.$u.api.userinfo().then(res => {
if (res.code === 0 && res.data) {
uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)
uni.setStorageSync('userName', res.data.userName)
uni.setStorageSync('avatar', res.data.avatar)
this.userName = res.data.userName
this.avatar = res.data.avatar
this.invitationCode = res.data.invitationCode
this.rate = res.data.rate||0
this.twoRate = res.data.twoRate||0
}
})
let data = {
userId: uni.getStorageSync('userId')
}
this.$u.api.userVip(data).then(res => {
if (res.code === 0 && res.data && res.data.isVip === 2) {
this.isVIP = true;
this.endTime = res.data.endTime
uni.setStorageSync('isVIP', true)
} else {
this.isVIP = false;
this.endTime = ''
uni.setStorageSync('isVIP', false)
}
})
this.isLogin = true
this.userName = uni.getStorageSync('userName')
this.isVIP = uni.getStorageSync('isVIP')
this.getMyLoveNumDEghTTorsp()
this.getMyFansNumDEghTTorsp()
} else {
this.isLogin = false
this.isVIP = false
this.endTime = '' //会员到期时间
this.moneyNum = 0 //余额
this.jifen = 0 //积分
this.userName = '未登录'
this.invitationCode = ''
this.myLoveNum = 0
this.myZhui = 0
this.rate = 0
}
this.avatar = uni.getStorageSync('avatar') ? uni.getStorageSync('avatar') : '../../static/images/logo.png'
httpsRequest.getT("app/common/type/919", {}).then(res => {
console.log(res);
if (res.code === 0) {
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform === 'ios'
this.isShowMoneyPay = !(res.data.value === '1' && isIos)
}
});
},
methods: {
//兑换卡密
exchangeKaMiDEghTTorsp() {
if (!this.kamiDEghTTorsp) {
uni.showToast({
title: '请输入卡密',
icon: 'none'
})
return
}
let data = {
sdkContent: this.kamiDEghTTorsp
}
this.$Request.postT('/app/sdkInfo/sdkExchange', data).then(res => {
if (res.code === 0) {
uni.showToast({
title: '兑换成功'
})
this.showCard = false
let datas = {
userId: uni.getStorageSync('userId')
}
this.$u.api.userVip(datas).then(rest => {
if (rest.code === 0 && rest.data && rest.data.isVip === 2) {
this.isVIP = true;
this.endTime = rest.data.endTime
uni.setStorageSync('isVIP', true)
} else {
this.isVIP = false;
this.endTime = ''
uni.setStorageSync('isVIP', false)
}
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
openKaMiShowDEghTTorsp() {
if (uni.getStorageSync('token')) {
this.showCard = true
} else {
uni.navigateTo({
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
//获取我喜欢的数量
getMyLoveNumDEghTTorsp() {
let data = {
page: 1,
limit: 1,
classify: 2
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
if (res.code === 0) {
this.myLoveNum = res.data.total
} else {
this.myLoveNum = 0
}
})
},
//获取我追剧的数量
getMyFansNumDEghTTorsp() {
let data = {
page: 1,
limit: 1,
classify: 1
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
if (res.code === 0) {
this.myZhui = res.data.total
} else {
this.myZhui = 0
}
})
},
/**
* 获取积分
*/
getPointsDEghTTorsp() {
this.$Request.getT('/app/integral/selectByUserId').then(res => {
if (res.code === 0) {
this.jifen = res.data.integralNum
} else {
this.jifen = 0
}
})
},
/**
* @param {Number} num
* @param 保留两位小数
*/
formatNumberDEghTTorsp(num) {
// 判断是否为整数
if (Number.isInteger(num)) {
return num.toFixed(2);
} else {
return num.toFixed(2).replace(/\.?0+$/, '');
}
},
/**
* 获取余额
*/
getMyMoneyDEghTTorsp() {
this.$Request.getT('/app/moneyDetails/selectUserMoney').then(res => {
if (res.code === 0) {
this.moneyNum = res.data.moneyDEghTTorsp
this.userInfo = res.data
// this.$Request.getT('/app/invite/selectInviteMoney').then(ret => {
// if (ret.code == 0) {
// if (ret.data.inviteMoney && ret.data.inviteMoney.moneyDEghTTorsp) {
// this.moneyNum = Number(res.data.moneyDEghTTorsp) + Number(ret.data.inviteMoney
// .moneyDEghTTorsp)
// } else {
// this.moneyNum = Number(res.data.moneyDEghTTorsp)
// }
// }
// })
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
},
goPageDEghTTorsp(url) {
if (url) {
if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
}
},
goMsgDEghTTorsp() {
let kefu = uni.getStorageSync('kefu'); // 用户端联系方式 1 手机号 2企业微信
let kefuPhone = uni.getStorageSync('kefuPhone');
if (kefu === 1) {
uni.navigateTo({
url: '/me/setting/kefu'
})
} else if (kefu === 3) {
uni.makePhoneCall({
phoneNumber: kefuPhone //仅为示例
});
} else if (kefu === 2) {
// #ifdef MP-WEIXIN
let that = this
try {
wx.openCustomerServiceChat({
extInfo: {
url: uni.getStorageSync('kefuUrl')
},
corpId: uni.getStorageSync('kefuAppId'),
success(res) {},
fail(res) {
console.error(res)
}
})
} catch (error) {
console.error("catchcatch" + error)
uni.showToast({
title: '请更新至微信最新版本'
});
}
// #endif
// #ifndef MP-WEIXIN
let url = uni.getStorageSync('kefuUrl');
if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
// #endif
}
},
goNavDEghTTorsp(e,type) {
console.log(e)
let token = uni.getStorageSync('token')
if (token) {
if (type === 'tabbar') {
uni.switchTab({
url: e
})
} else {
uni.navigateTo({
url: e
})
}
} else {
uni.navigateTo({
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
// 获取轮播图列表
getBannerListDEghTTorsp() {
this.$u.api.bannerList({
classify: '3'
}).then(res => {
if (res.code === 0 && res.data) {
let arr = []
res.data.forEach(ret => {
if (ret.state === 1) {
arr.push(ret)
}
})
this.swiperList = arr
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
})
},
}
}
</script>
<style lang="scss">
page {
background-color: #F5F7FF;
}
/deep/.u-navbar-inner {
/* #ifdef H5 */
background: linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%);
/* #endif */
}
.kamiDEghTTorsp {
width: 500rpx;
height: auto;
background-color: #FFFFFF;
.kamiDEghTTorsp-title {
width: 100%;
text-align: center;
margin-top: 30rpx;
font-size: 30rpx;
font-weight: bold;
}
.kamiDEghTTorsp-input {
padding: 30rpx;
}
.kamiDEghTTorsp-btn {
width: calc(100% - 60rpx);
height: 80rpx;
margin: 0 auto;
background-color: #ff7581;
border-radius: 44rpx;
color: #FFFFFF;
margin-top: 10rpx;
margin-bottom: 40rpx;
}
}
.infoDEghTTorsp::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to right, #FFE5EA 0%, #E4F5FB 49%, #FFF0EE 100%);
z-index: 1;
/* 确保在垂直渐变之上 */
}
.infoDEghTTorsp::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to bottom, transparent, #F5F7FF);
/* 垂直渐变,结束颜色为透明 */
z-index: 2;
/* 确保在水平渐变之上 */
}
.infoDEghTTorsp {
width: 100%;
height: auto;
// height: 400rpx;
background: #F5F7FF;
position: relative;
border-radius: 0 0 80rpx 80rpx;
.infoDEghTTorsp-box {
width: 686rpx;
height: 100%;
position: relative;
z-index: 3;
}
.infoDEghTTorsp-box-c {
width: 100%;
height: 94rpx;
// margin-top: 60rpx;
margin-bottom: 140rpx;
}
.infoDEghTTorsp-box-c-l-avatar {
width: 94rpx;
height: 94rpx;
border-radius: 50%;
image {
width: 94rpx;
height: 94rpx;
border-radius: 50%;
}
}
.infoDEghTTorsp-box-c-l-name {
margin-left: 16rpx;
.infoDEghTTorsp-box-c-l-name-t {
color: #333333;
font-size: 32rpx;
font-weight: bold;
}
.infoDEghTTorsp-box-c-l-name-b {
color: #333333;
font-size: 24rpx;
font-weight: 400;
}
}
}
.statisticsDEghTTorsp {
width: 100%;
height: auto;
margin-top: -100rpx;
position: relative;
z-index: 3;
.statisticsDEghTTorsp-box {
width: 686rpx;
// height: 184rpx;
// background-color: #FFFFFF;
border-radius: 24rpx;
}
.statisticsDEghTTorsp-box-item {
// width: calc(100% / 3);
// height: 100%;
}
.statisticsDEghTTorsp-box-item-top {
width: 100%;
text-align: center;
color: #333333;
font-size: 38rpx;
font-weight: bold;
}
.statisticsDEghTTorsp-box-item-btn {
width: 100%;
text-align: center;
color: #999999;
font-size: 26rpx;
// margin-top: 20rpx
}
}
.vipDEghTTorsp {
width: 100%;
// height: 84rpx;
margin-top: 30rpx;
.vipDEghTTorsp-box {
width: 686rpx;
height: 100%;
background: linear-gradient(90deg, #FEF5E4 0%, #FBECD7 100%);
border-radius: 24rpx;
padding: 26rpx 30rpx;
}
.vipDEghTTorsp-box-l {
image {
width: 24rpx;
height: 22rpx;
margin-left: 6rpx;
}
}
.vipDEghTTorsp-box-l-l {
font-size: 32rpx;
font-weight: 800;
color: #5A4A32;
line-height: 32rpx;
}
.vipDEghTTorsp-box-l-r {
color: #817858;
font-size: 26rpx;
margin-top: 6rpx;
}
.vipDEghTTorsp-box-r {
width: 130rpx;
height: 50rpx;
background: #FFFFFF;
box-shadow: 0rpx -3rpx 9rpx 0rpx rgba(255, 255, 255, 0.46);
border-radius: 25rpx;
color: #5A4A32;
font-size: 22rpx;
}
}
.moneyDEghTTorsp {
width: 100%;
height: auto;
margin-top: 20rpx;
.moneyDEghTTorsp-box {
width: 686rpx;
height: 100%;
border-radius: 24rpx;
background: #ffffff;
padding: 30rpx;
}
.moneyDEghTTorsp-box-btn {
background: linear-gradient(90deg, #FF7581 0%, #F8A5AF 100%);
border-radius: 44rpx;
padding: 18rpx 30rpx;
font-size: 24rpx;
color: #ffffff;
font-weight: bold;
}
.moneyDEghTTorsp-box-title-l {
color: #333333;
font-size: 28rpx;
font-weight: normal;
}
.moneyDEghTTorsp-box-price {
color: #333333;
font-size: 48rpx;
font-weight: 800;
margin-top: 20rpx;
}
}
.toolDEghTTorsp {
width: 100%;
height: auto;
margin-top: 20rpx;
.toolDEghTTorsp-box {
width: 686rpx;
height: 100%;
background-color: #FFFFFF;
border-radius: 24rpx;
}
.toolDEghTTorsp-box-content {
width: 100%;
height: auto;
padding: 30rpx 30rpx 0 30rpx;
}
.toolDEghTTorsp-box-content-item {
width: 130rpx;
height: auto;
margin-bottom: 46rpx;
position: relative;
}
.toolDEghTTorsp-box-content-item-img {
width: 66rpx;
height: 66rpx;
image {
width: 66rpx;
height: 66rpx;
}
}
.toolDEghTTorsp-box-content-item-txt {
width: 100%;
text-align: center;
margin-top: 10rpx;
color: #333333;
font-size: 24rpx;
}
}
</style>

View File

@@ -50,14 +50,14 @@
},
onShow() {
//#ifdef H5
this.follow()
this.followDEghTTorsp()
//#endif
},
methods: {
follow() {
followDEghTTorsp() {
if (this.$queue.getData("openid")) {
this.$Request.get("/tao/wx/follow/" + this.$queue.getData("openid")).then(res => {
this.$Request.get("/tao/wx/followDEghTTorsp/" + this.$queue.getData("openid")).then(res => {
if (res) {
window.location.replace(this.$queue.publicYuMing());
}
@@ -65,7 +65,7 @@
}
},
rests() {
restsDEghTTorsp() {
uni.showToast({
title: "已刷新请再次长按识别",
mask: false,

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6778.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6779.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6776.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6777.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -30,17 +30,17 @@
</view>
</view>
<view>
<view class="btn-bg" @click="bugVIP(item.id)">购买</view>
<view class="btn-bgDEghTTorsp" @click="bugVIPDEghTTorsp(item.id)">购买</view>
</view>
</view>
</view>
<view class="illustrate flex align-center justify-center">
<view class="illustrate-box flex align-center">
<view class="illustrateDEghTTorsp flex align-center justify-center">
<view class="illustrateDEghTTorsp-box flex align-center">
<u-checkbox active-color="#ff7581" v-model="checked" shape="circle"></u-checkbox>
<text @click="checked = !checked">
我已经阅读并同意
</text>
<view @click="goXieyi()" class="illustrate-box-txt">
<view @click="goXieyiDEghTTorsp()" class="illustrateDEghTTorsp-box-txt">
付费须知说明
</view>
</view>
@@ -51,14 +51,14 @@
style="width: 100%;text-align: center;font-size:38rpx;font-weight: bold;margin-top:15rpx;margin-bottom: 80rpx;">
选择支付方式
</view>
<view @click="goMoney" class="flex align-center justify-end" style="margin-right: 20rpx;color: #ff7581;">
<view @click="goMoneyDEghTTorsp" class="flex align-center justify-end" style="margin-right: 20rpx;color: #ff7581;">
<view class="" style="color: #666666;">
金币不足
</view>
去充值
</view>
<view style="display: flex;height: 100upx;align-items: center;padding: 20upx 30rpx;"
v-for="(item,index) in openLists" :key='index' @tap='selectWay(item.id)'>
v-for="(item,index) in openLists" :key='index' @tap='selectWayDEghTTorsp(item.id)'>
<view style="display: flex;width:80%;align-items: center;">
<image :src="item.image" style="width: 55upx;height: 55upx;"></image>
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">{{item.text}}
@@ -74,25 +74,25 @@
</view>
<view
style="width: 690rpx;height: 80rpx;background:#ff7581;color:#FFFFFF;text-align: center;line-height: 80rpx;border-radius: 50rpx;margin: 30rpx;"
@tap="pay()">确认支付</view>
@tap="payDEghTTorsp()">确认支付</view>
</u-popup>
<!-- 会员助力 -->
<u-popup v-model="showjl" :closeable="true" close-icon-color="#ffffff" mode="center">
<view class="zl" @click="goZl()">
<image class="zl-bg"
<view class="zlDEghTTorsp" @click="goZlDEghTTorsp()">
<image class="zlDEghTTorsp-bg"
src="https://dj-api.hnsiyao.cn/file/uploadPath/2023/12/14/adf37beca97826d44970d20118f88e29.png"
mode=""></image>
<view class="zl-title">
<view class="zlDEghTTorsp-title">
会员免费领
</view>
<view class="zl-titlef">
<view class="zlDEghTTorsp-titlef">
免费领会员
</view>
<view class="zl-titlef2">
<view class="zlDEghTTorsp-titlef2">
助力中...
</view>
<view class="zl-titlebtn">
<view class="zlDEghTTorsp-titlebtn">
立即领取
</view>
</view>
@@ -254,30 +254,30 @@
this.$Request.get('/app/common/type/813').then(res => {
if (res.code == 0 && res.data.value) {
if (res.data.value == '是') {
this.getActivity()
this.getActivityDEghTTorsp()
}
}
})
}
this.userName = uni.getStorageSync('userName')
this.getVIPDet()
this.getvipdata()
this.getVIPDetDEghTTorsp()
this.getvipdataDEghTTorsp()
},
methods: {
//
goXieyi() {
goXieyiDEghTTorsp() {
uni.navigateTo({
url: '/me/setting/payXieYi'
})
},
goMoney() {
goMoneyDEghTTorsp() {
uni.navigateTo({
url: '/me/wallet/wallet'
})
},
//
getActivity() {
getActivityDEghTTorsp() {
this.$Request.getT('/app/invite/selectInviteAwardByUserId').then(res => {
if (res.code == 0) {
if (res.data) {
@@ -287,13 +287,13 @@
})
},
//
goZl() {
goZlDEghTTorsp() {
uni.navigateTo({
url: '/me/assistance/assistance'
})
this.showjl = false
},
getvipdata() {
getvipdataDEghTTorsp() {
let data = {
userId: uni.getStorageSync('userId')
}
@@ -307,10 +307,10 @@
}
})
},
selectWay: function(id) {
selectWayDEghTTorsp: function(id) {
this.openWay = id;
},
getVIPDet() {
getVIPDetDEghTTorsp() {
this.$u.api.vipDet().then(res => {
if (res.code == 0) {
res.data.forEach(ret => {
@@ -336,7 +336,7 @@
}
})
},
bugVIP(e) {
bugVIPDEghTTorsp(e) {
if (this.checked == false) {
this.$refs.uToast.show({
title: '请阅读并同意《付费须知说明》',
@@ -347,7 +347,7 @@
this.vipId = e
this.showPay = true
// // #ifdef MP-TOUTIAO
// this.toutiaoPay()
// this.toutiaoPayDEghTTorsp()
// // #endif
// // #ifndef MP-TOUTIAO
// this.showPay = true
@@ -355,7 +355,7 @@
},
//
toutiaoPay() {
toutiaoPayDEghTTorsp() {
let that = this
let data = {
vipDetailsId: this.vipId
@@ -462,10 +462,10 @@
}
})
},
pay() {
payDEghTTorsp() {
let that = this
if (that.openWay == 4) { //
that.toutiaoPay()
that.toutiaoPayDEghTTorsp()
} else if (that.openWay == 5) { //
uni.showLoading({
title: '支付中...'
@@ -591,7 +591,7 @@
if (ua.indexOf('micromessenger') !== -1) {
this.$u.post('/app/wxPay/wxPayMpOrder?orderId=' + res.data.ordersId).then(red => {
if (red.code === 0) {
this.callPay(red.data);
this.callPayDEghTTorsp(red.data);
} else {
uni.showToast({
icon: 'none',
@@ -604,7 +604,7 @@
// #ifdef APP
this.$u.post("/app/wxPay/payAppOrder?orderId=" + res.data.ordersId).then(red => {
if (red.code == 0) {
that.setPayment('wxpay', JSON.stringify(red
that.setPaymentDEghTTorsp('wxpay', JSON.stringify(red
.data));
} else {
uni.showToast({
@@ -636,7 +636,7 @@
red => {
if (red.code === 0) {
console.log('1111111')
that.setPayment('alipay', red.data);
that.setPaymentDEghTTorsp('alipay', red.data);
} else {
uni.showToast({
icon: 'none',
@@ -688,10 +688,10 @@
}
},
isCheckPay(code, name, order) {
isCheckPayDEghTTorsp(code, name, order) {
if (code == 0) {
console.log('999999999999')
this.setPayment(name, order);
this.setPaymentDEghTTorsp(name, order);
} else {
uni.hideLoading();
uni.showToast({
@@ -699,7 +699,7 @@
});
}
},
setPayment(name, order) {
setPaymentDEghTTorsp(name, order) {
let that = this
uni.requestPayment({
provider: name,
@@ -740,19 +740,19 @@
}
});
},
callPay: function(response) {
callPayDEghTTorsp: function(response) {
if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReadyDEghTTorsp(response), false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));
document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));
document.attachEvent('WeixinJSBridgeReady', this.onBridgeReadyDEghTTorsp(response));
document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReadyDEghTTorsp(response));
}
} else {
this.onBridgeReady(response);
this.onBridgeReadyDEghTTorsp(response);
}
},
onBridgeReady: function(response) {
onBridgeReadyDEghTTorsp: function(response) {
let that = this;
if (!response.package) {
return;
@@ -815,15 +815,15 @@
color: #604320;
}
.illustrate {
.illustrateDEghTTorsp {
width: 100%;
margin: 30rpx 0;
.illustrate-box {
.illustrateDEghTTorsp-box {
width: 686rpx;
}
.illustrate-box-txt {
.illustrateDEghTTorsp-box-txt {
color: #ff7581;
}
@@ -845,13 +845,13 @@
background-color: transparent !important;
}
.zl {
.zlDEghTTorsp {
width: 518rpx;
height: 556rpx;
position: relative;
background: transparent;
.zl-bg {
.zlDEghTTorsp-bg {
width: 518rpx;
height: 556rpx;
position: absolute;
@@ -859,7 +859,7 @@
left: 0;
}
.zl-title {
.zlDEghTTorsp-title {
position: absolute;
top: 15%;
left: 46%;
@@ -872,7 +872,7 @@
-webkit-text-fill-color: transparent;
}
.zl-titlef {
.zlDEghTTorsp-titlef {
font-size: 14rpx;
font-weight: bold;
color: #ffffff;
@@ -881,7 +881,7 @@
right: 35%;
}
.zl-titlef2 {
.zlDEghTTorsp-titlef2 {
font-size: 14rpx;
font-weight: bold;
color: #ffffff;
@@ -890,7 +890,7 @@
left: 22%;
}
.zl-titlebtn {
.zlDEghTTorsp-titlebtn {
font-size: 34rpx;
font-weight: bold;
background: linear-gradient(0deg, #FF5878 0.390625%, #F30931 100%);
@@ -903,7 +903,7 @@
}
}
.btn-bg {
.btn-bgDEghTTorsp {
width: 64px;
height: 28px;
background: linear-gradient(90deg, #DBC084 0%, #E9D4A6 100%);

View File

@@ -1,270 +0,0 @@
<template>
<view class="">
<u-sticky :enable="enable">
<view class="search-box">
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" v-model="keyword"
:show-action="false" :animation="true" @search="getCourseList()"></u-search>
</view>
</u-sticky>
<view class="swiper flex align-center justify-center">
<view class="swiper-box">
<swiper :indicator-dots="true" class="swiper " :autoplay="true" interval="5000" duration="500"
:circular="true" style="width: 100%;height: 350rpx;">
<swiper-item v-for="(item,index) in swiperList" :key='index' @tap="goPage(item.url)">
<image :src="item.imageUrl" mode="scaleToFill"
style="width: 100%;height: 100%;border-radius: 24rpx;"></image>
</swiper-item>
</swiper>
</view>
</view>
<view class="padding-lr">
<view class="" v-if="courseList.length">
<!-- <view class="vidoList flex align-center justify-between flex-wrap">
<view class="vidoList-item" @click="goCourse(item.courseId,item.courseDetailsId)"
v-for="(item, index) in courseList" :key="index">
<view class="vidoList-item-img">
<image :src="item.titleImg" mode="aspectFill"></image>
</view>
<view class="vidoList-item-title">
{{item.title}}
</view>
</view>
<view class="vidoList-item" style="height: 0;"></view>
<view class="vidoList-item" style="height: 0;"></view>
</view> -->
<videoList @success="posterSuccess" :list="courseList" />
</view>
<empty title="暂无视频" :isShow='false' v-else></empty>
<u-loadmore v-if="courseList.length > 0" :status="status" />
</view>
</view>
</template>
<script>
import videoList from '../../../components/videoList/videoList.vue'
import empty from '@/components/empty.vue'
export default {
components: {
empty,
videoList
},
data() {
return {
enable: true,
status: 'loadmore',
swiperList: [], //轮播图列表
courseList: [], //资源列表
page: 1,
limit: 10,
id: '',
datalist: [{
id: 1,
name: '综合'
}, {
id: 2,
name: '人气'
}, {
id: 3,
name: '价格',
label: '0'
}],
dataIndex: 0,
sort: '',
count: 0,
keyword: '',
isPrice: '', //是否免费 2:免费
}
},
onShow() {
this.page=1;
this.enable = true
this.getCourseList()
},
onHide() {
this.enable = false
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title
})
this.getBannerList()
if (option.sort) {
this.sort = option.sort
}
if (option.isPrice) {
this.isPrice = option.isPrice
}
},
methods: {
goPage(url) {
uni.navigateTo({
url: url
})
},
//点击回调
posterSuccess(item) {
uni.navigateTo({
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId
})
},
//最新热播
getCourseList() {
let data = {
limit: this.limit,
page: this.page,
sort: this.sort ? this.sort : '',
title: this.keyword,
}
// #ifdef MP-WEIXIN
data.wxShow = 1
// #endif
// #ifdef MP-TOUTIAO
data.dyShow = 1
// #endif
if (this.isPrice) {
data.isPrice = this.isPrice
}
this.$u.api.courseList(data).then(res => {
if (res.code == 0) {
this.pages = res.data.totalPage
if (this.page < this.pages) {
this.status = 'loadmore'
} else {
this.status = 'nomore'
}
// res.data.list.forEach(ret => {
// ret.courseLabel = ret.courseLabel ? ret.courseLabel.split(',') : []
// })
if (this.page == 1) {
this.courseList = res.data.list
} else {
this.courseList = [...this.courseList, ...res.data.list]
}
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
uni.stopPullDownRefresh();
})
},
// 获取轮播图列表
getBannerList() {
this.$u.api.bannerList({
classify: '1'
}).then(res => {
if (res.code == 0) {
res.data.forEach(d => {
if (d.state == 1) {
this.swiperList.push(d)
}
})
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
},
onReachBottom: function() {
if (this.page < this.pages) {
this.page += 1
this.status = 'loading'
this.getCourseList()
} else {
this.status = 'nomore'
}
},
onPullDownRefresh: function() {
this.page = 1;
this.getCourseList()
},
}
</script>
<style lang="scss" scoped>
.search-box {
width: 100%;
padding: 15upx 2.5%;
display: flex;
justify-content: space-between;
background-color: #ffffff;
}
.vidoList {
width: 100%;
height: auto;
margin-bottom: 20rpx;
.vidoList-item {
width: calc((100% - 40rpx) / 3);
height: 356rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
margin-bottom: 20rpx;
}
.vidoList-item-img {
width: 100%;
height: 280rpx;
border-radius: 24rpx 24rpx 0 0;
image {
width: 100%;
height: 100%;
border-radius: 24rpx 24rpx 0 0;
}
}
.vidoList-item-title {
width: 100%;
text-align: center;
background-color: #FFFFFF;
border-radius: 0 0 24rpx 24rpx;
padding: 20rpx;
overflow: hidden;
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; // 默认不换行;
}
}
.swiper {
width: 100%;
height: auto;
margin-bottom: 10rpx;
margin-top: 10rpx;
.swiper-box {
width: 686rpx;
height: 100%;
}
}
.active {
color: #5074FF;
}
.btn {
width: 150upx;
height: 60upx;
background: #5074FF;
border-radius: 30upx;
color: #FFFFFF;
text-align: center;
line-height: 60rpx;
font-size: 26rpx;
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6762.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6763.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,369 @@
<template>
<view class="content">
<u-sticky :enable="enable">
<view class="search-box-DEghTTorsp">
<u-search bg-color="#f2f2f2" style="width: 100%;" placeholder="搜索更多资源" :focus="true" v-model="keyword" :show-action="true"
:animation="true" action-text="取消" @custom="goBackDEghTTorsp()" @search="doSearchDEghTTorsp(false)"></u-search>
</view>
</u-sticky>
<view class="search-keyword-DEghTTorsp" v-if="isSearch">
<view class="keyword-block-DEghTTorsp" v-if="hotKeywordList.length !=0">
<view class="keyword-list-header">
<view>热搜</view>
<view>
<image @tap="hotToggleDEghTTorsp" :src="'/static/images/index/attention'+forbid+'.png'"></image>
</view>
</view>
<view class="keyword" v-if="forbid==''">
<view v-for="(keyword,index) in hotKeywordList" @tap="doSearchsDEghTTorsp(keyword)" :key="index"
v-if="keyword">
{{keyword}}
</view>
</view>
<view class="hide-hot-tis" v-else>
<view>当前搜热已隐藏</view>
</view>
</view>
<view class="keyword-block-DEghTTorsp" v-if="oldKeywordList.length>0">
<view class="keyword-list-header">
<view>历史记录</view>
<view>
<image @tap="oldDeleteDEghTTorsp" src="/static/images/index/delete.png"></image>
</view>
</view>
<view class="keyword">
<view v-for="(keyword,index) in oldKeywordList" @tap="doSearchDEghTTorsp(keyword)" :key="index"
v-if="keyword">
{{keyword}}
</view>
</view>
</view>
</view>
<view class="search-list-DEghTTorsp flex align-center justify-center" v-else>
<view class="search-list-box-DEghTTorsp flex align-center justify-between flex-wrap">
<swiper class="swiper" :indicator-dots="true" :autoplay="true" interval="5000" duration="500"
:circular="true" style="width: 100%;height: 350rpx;margin-bottom: 20rpx;">
<swiper-item v-for="(item,index) in swiperList" :key='index' @tap="goPage(item.url)">
<image :src="item.imageUrl" mode="scaleToFill"
style="width: 100%;height: 100%;border-radius: 24rpx;"></image>
</swiper-item>
</swiper>
<videoList @success="posterSuccessDEghTTorsp" :list="keywordList" />
</view>
</view>
<empty title="暂无视频" v-if="isSearch == false && keywordList.length==0" />
</view>
</template>
<script>
import videoList from '../../../components/videoList/videoList.vue'
import empty from '../../../components/empty.vue'
export default {
components: {
empty,
videoList
},
data() {
return {
swiperList: [], //轮播图列表
enable: true,
defaultKeyword: "",
keyword: "",
oldKeywordList: [], //历史记录
hotKeywordList: [], //热搜
keywordList: [], //搜索列表
forbid: '',
isShowKeywordList: false,
limit: 10,
page: 1,
noData: true,
count: 0,
isSearch: true,
}
},
onShow() {
this.enable = true
if (uni.getStorageSync('moreSearch')) {
this.hotKeywordList = (uni.getStorageSync('moreSearch')).split(',')
} else {
this.hotKeywordList = []
}
},
onHide() {
this.enable = false
},
onLoad() {
// this.init();
// this.getSearchListDEghTTorsp()
this.getBannerListDEghTTorsp()
},
methods: {
//点击回调
posterSuccessDEghTTorsp(item) {
let userId = uni.getStorageSync('userId')
if (userId) {
uni.navigateTo({
url: '/me/detail/detail?id=' + item.courseId + '&courseDetailsId=' + item.courseDetailsId +
'&tt_album_id=' + item.dyCourseId + '&tt_episode_id=' + item
.dyEpisodeId
})
} else {
uni.navigateTo({
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
doSearchsDEghTTorsp(keyWord) {
this.keyword = keyWord
this.doSearchDEghTTorsp(false)
},
getBannerListDEghTTorsp() {
this.$u.api.bannerList({
classify: '1'
}).then(res => {
if (res.code == 0) {
res.data.forEach(d => {
if (d.state == 1) {
this.swiperList.push(d)
}
})
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
// 获取搜索历史
getSearchListDEghTTorsp() {
this.$u.api.SearchList().then(res => {
if (res.code == 0) {
this.hotKeywordList = res.data.allSerchName
this.oldKeywordList = res.data.userSearchName
}
})
},
//清除历史搜索
oldDeleteDEghTTorsp() {
uni.showModal({
content: '确定清除历史搜索记录?',
success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
this.$u.api.SearchDet().then(res => {
if (res.code == 0) {
this.getSearchListDEghTTorsp()
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//执行搜索
doSearchDEghTTorsp(keyword) {
this.isSearch = false
this.isShowKeywordList = true;
this.noData = true
let data = {
title: this.keyword,
limit: this.limit,
page: this.page,
}
// #ifdef MP-WEIXIN
data.wxShow = 1
// #endif
// #ifdef MP-TOUTIAO
data.dyShow = 1
// #endif
let token = uni.getStorageSync('token')
if (token) {
this.$u.api.search(data).then(res => {
uni.stopPullDownRefresh()
if (res.code == 0) {
this.count = res.data.totalPage
if (this.page == 1) {
this.keywordList = res.data.list
} else {
this.keywordList = [...this.keywordList, ...res.data.list]
}
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
} else {
this.$u.api.searchs(data).then(res => {
if (res.code == 0) {
this.count = res.data.totalPage
if (this.page == 1) {
this.keywordList = res.data.list
} else {
this.keywordList = [...this.keywordList, ...res.data.list]
}
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
})
}
},
// 点击取消返回首页
goBackDEghTTorsp() {
uni.navigateBack()
},
//热门搜索开关
hotToggleDEghTTorsp() {
this.forbid = this.forbid ? '' : '_forbid';
},
},
onReachBottom: function() {
if (this.page < this.count) {
this.page += 1
this.doSearchDEghTTorsp();
}
},
onPullDownRefresh: function() {
this.page = 1;
this.doSearchDEghTTorsp();
},
}
</script>
<style lang="scss" scoped>
.search-box-DEghTTorsp {
width: 100%;
/* background-color: rgb(242, 242, 242); */
padding: 15upx 2.5%;
display: flex;
justify-content: space-between;
// position: sticky;
// top: 0;
background-color: #ffffff;
}
.search-box-DEghTTorsp .mSearch-input-box {
width: 100%;
}
.search-box-DEghTTorsp .input-box {
width: 85%;
flex-shrink: 1;
display: flex;
justify-content: center;
align-items: center;
}
.search-box-DEghTTorsp .search-btn {
width: 15%;
margin: 0 0 0 2%;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
font-size: 28upx;
color: #ffffff;
background: linear-gradient(to right, #ff9801, #ff570a);
border-radius: 60upx;
}
.search-box-DEghTTorsp .input-box>input {
width: 100%;
height: 60upx;
font-size: 32upx;
border: 0;
border-radius: 60upx;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: 0 3%;
margin: 0;
background-color: #ffffff;
}
.placeholder-class {
color: #9e9e9e;
}
.search-keyword-DEghTTorsp {
width: 100%;
}
.search-list-DEghTTorsp {
width: 100%;
margin-top: 20rpx;
.search-list-box-DEghTTorsp {
width: 686rpx;
height: 100%;
}
}
.keyword-block-DEghTTorsp {
padding: 10upx 0;
}
.keyword-block-DEghTTorsp .keyword-list-header {
width: 94%;
padding: 10upx 3%;
font-size: 27upx;
color: #333;
display: flex;
justify-content: space-between;
}
.keyword-block-DEghTTorsp .keyword-list-header image {
width: 40upx;
height: 40upx;
}
.keyword-block-DEghTTorsp .keyword {
width: 94%;
padding: 3px 3%;
display: flex;
flex-flow: wrap;
justify-content: flex-start;
}
.keyword-block-DEghTTorsp .hide-hot-tis {
display: flex;
justify-content: center;
font-size: 28upx;
color: #6b6b6b;
}
.keyword-block-DEghTTorsp .keyword>view {
display: flex;
justify-content: center;
align-items: center;
border-radius: 60upx;
padding: 0 20upx;
margin: 10upx 20upx 10upx 0;
height: 60upx;
font-size: 28upx;
// background-color: rgb(242, 242, 242);
background: #E6EBFF;
color: #6b6b6b;
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view class="">
<image src="../../../static/iosImg/DEghTTorspIMG_6764.JPG" mode="aspectFill"></image>
<image src="../../../static/iosImg/DEghTTorspIMG_6765.JPG" mode="aspectFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
onHide() {
},
onLoad(option) {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -452,7 +452,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
@@ -514,7 +514,7 @@
})
} else {
uni.navigateTo({
url: "/pages/login/login"
url: "/pages/ghtwwlkXYG/wVghNzmqkQ"
})
}
},
@@ -566,7 +566,7 @@
// 跳转搜索
goSearch() {
uni.navigateTo({
url: '/pages/index/search/index'
url: '/pages/index/fghaQGjsSE/aghyvzmfVW'
});
},
// 跳转公告链接
@@ -608,7 +608,7 @@
}
} else {
uni.navigateTo({
url: '/pages/login/login'
url: '/pages/ghtwwlkXYG/wVghNzmqkQ'
})
}
},

Some files were not shown because too many files have changed in this diff Show More