1 Commits

Author SHA1 Message Date
GaoHao
14486e14d1 配置更新 2025-02-06 11:11:23 +08:00
39 changed files with 3636 additions and 4312 deletions

View File

@@ -1,7 +1,7 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch 11111');
console.log('App Launch ');
uni.setStorageSync('adRewardedNum',0)
},

View File

@@ -5,9 +5,6 @@ export async function init() {
//热搜词
http.request({
url: 'common/type/249',
data: {
type: 249
}
}).then(res => {
if (res.code == 0) {
uni.setStorageSync('moreSearch', res.data.value)
@@ -21,9 +18,6 @@ export async function init() {
export const commonType = (num) => {
return http.request({
url: `/common/type/${num}`,
data:{
type: num
}
})
}

View File

@@ -14,13 +14,9 @@ export const login = (data) => {
/**
* 发送验证码
*/
export const setSendMsg = (mobile, type) => {
export const setSendMsg = (mobile,type) => {
return http.request({
url: '/Login/sendMsg/' + mobile + '/' + type,
data: {
phone: mobile,
event: type
}
url: '/Login/sendMsg/' + mobile + '/'+type
})
}
@@ -58,22 +54,3 @@ export const bind = (data) => {
}
/**
* 绑定微信
*/
export const $bindWx = (data) => {
return http.request({
url: 'Login/bindWx',
method: 'POST',
data: data
})
}
// 绑定微信状态
export const $bindStatus = (data) => {
return http.request({
url: 'Login/bindStatus',
method: 'GET',
data: data
})
}

View File

@@ -17,10 +17,7 @@ export const selectByUserId = (data) => {
export const commonType = (type) => {
return http.request({
url: `/common/type/${type}`,
method: 'GET',
data: {
type: type
}
method: 'GET'
})
}
@@ -45,12 +42,7 @@ export const sendMessage = (data) => {
data: data
})
}
export const deleteUserByUserId = (data) => {
return http.request({
url: '/user/deleteUser',
method: 'post',
})
}
/**
* 帮助中心
*/
@@ -71,7 +63,6 @@ export const collectVideoSummary = () => {
method: 'GET'
})
}
// 注销账号
/**
* 金币

View File

@@ -35,8 +35,7 @@ export const queryUserMoneyDetails = (data) => {
*/
export const updateUser = (data) => {
return http.request({
url: '/user/bindAlipay',
method: 'POST',
url: '/user/updateUser',
params: data
})
}

View File

@@ -8,16 +8,15 @@ export const selectNewApp = (data) => {
return http.request({
url: '/user/selectNewApp',
data: data,
method: 'POST',
})
}
/**
* 获取用户信息
*/
export const selectUserById = (data) => {
return http.request({
url: '/user/selectUserById',
method: 'get',
data: data
})
}

View File

@@ -56,10 +56,7 @@ export function insertHistory(data) {
export function getJinbiBili(data) {
return http.request({
url: 'common/type/914',
data: {
...data,
type: 914
}
data
})
}
@@ -100,16 +97,14 @@ export function payOrder(data) {
// #endif
return http.request({
url: 'wuyou/payOrder/' + data.orderId + '?payType=' + payType,
method: 'GET',
data:data
method: 'GET'
})
}
//获取订单支付状态
export function getOrderInfo(data) {
return http.request({
url: 'wuyou/queryOrder/' + data.orderId,
method: 'GET',
data:data
method: 'GET'
})
}
//金币解锁
@@ -145,11 +140,11 @@ export function playStatus(data) {
}
// 获取支付次数提示
export function getPayTips(data) {
export function getPayTips(data){
return http.request({
url: 'course/getRedEnvelopeTips',
method: 'GET',
data
})
}
}

View File

@@ -1,60 +1,46 @@
//打包时修改env的值即可
const env = 'php_production' //test,production,local
const env='production' //test , production,local
export const encryptKey = '1234567890123456' // http数据加解密的key
export const encryptKey='1234567890123456' // http数据加解密的key
export const apiUrl = '/czg/app/'
// export const apiUrl = '/api/'
export const apiUrl='/czg/'
export const h5Config = {
production: 'https://web.hnsiyao.cn',
test: 'https://web-api.hnsiyao.cn',
// local: 'http://192.168.1.21:8100',
local: 'http://192.168.1.43:1333',
zhangsong_local:'http://192.168.1.54:1024',
hong:'http://192.168.1.31:8080',
php_production:'https://ph.hnsiyao.cn',
php_test:'https://playlet.test.sxczgkj.com',
local: 'http://192.168.1.41:8100'
}
export const AppConfig = {
production: 'https://dj-api.hnsiyao.cn',
test: 'https://web-api.hnsiyao.cn',
// local: 'http://192.168.1.21:8100',
local: 'http://192.168.1.43:1333',
zhangsong_local:'http://192.168.1.54:1024',
hong:'http://192.168.1.31:8080',
php_production:'https://ph.hnsiyao.cn',
php_test:'https://playlet.test.sxczgkj.com'
local: 'http://192.168.1.41:8100'
}
export function returnShareUrl() {
if (env === 'test') {
export function returnShareUrl(){
if(env==='test'){
return 'https://video-h5.hnsiyao.cn'
}
if (env === 'production') {
if(env==='production'){
return 'https://dj-h5.hnsiyao.cn'
}
if (env === 'php_production') {
return 'https://ph-h5.hnsiyao.cn'
}
if (env === 'local') {
if(env==='local'){
return AppConfig[env]
}
}
// #ifdef H5
export default {
baseUrl: h5Config[env],
baseApiUrl: h5Config[env] + apiUrl,
shareUrl: returnShareUrl()
export default{
baseUrl:h5Config[env],
baseApiUrl:h5Config[env]+apiUrl,
shareUrl:returnShareUrl()
}
// #endif
// #ifdef APP
export default {
baseUrl: AppConfig[env],
baseApiUrl: AppConfig[env] + apiUrl,
shareUrl: returnShareUrl()
export default{
baseUrl:AppConfig[env],
baseApiUrl:AppConfig[env]+apiUrl,
shareUrl:returnShareUrl()
}
// #endif

View File

@@ -1,69 +0,0 @@
<template>
<view class="container">
<view class="dialog">
<view class="title">
<text class="t">风险提示</text>
</view>
<view class="content">
<text class="t">您的账号暂不可用详情请联系客服</text>
</view>
<view class="footer">
<navigator class="btn" url="/pages/me/contact" style="height: 40px">
<text class="t">去联系客服</text>
</navigator>
</view>
</view>
</view>
</template>
<script></script>
<style scoped lang="scss">
.container {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 99999999;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(3px);
display: flex;
align-items: center;
justify-content: center;
.dialog {
width: 90%;
background-color: #fff;
border-radius: 20upx;
.title {
height: 100upx;
display: flex;
align-items: center;
justify-content: center;
.t {
font-size: 32upx;
font-weight: bold;
}
}
.content {
padding: 0 50upx;
}
.footer {
padding: 80upx 28upx 28upx;
display: flex;
.btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
background-color: #dd8591;
color: #fff;
border-radius: 12upx;
.t {
font-size: 28upx;
}
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -7,10 +7,8 @@ import {
reject
} from "lodash";
import config from "@/commons/config.js";
// 测试服
// let baseUrl = config.baseApiUrl + "app";
let baseUrl = config.baseApiUrl;
let baseUrl = config.baseApiUrl + "app";
const loadingShowTime = 200;
function getHeader(data) {
@@ -23,7 +21,7 @@ function getHeader(data) {
}
// 通用处理逻辑
function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
function commonsProcess(showLoading, httpReqCallback, isreturm) {
// 判断是否请求完成(用作 是否loading
// 包括: 'ing', 'ingLoading', 'finish'
let reqState = "ing";
@@ -50,9 +48,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
return httpReqCallback()
.then((httpData) => {
// console.log(url);
// console.log('httpData');
// console.log(httpData);
reqFinishFunc(); // 请求完毕的动作
// 从http响应数据中解构响应数据 [ 响应码、 bodyData ]
let {
@@ -64,7 +60,6 @@ function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
if (isreturm) {
return Promise.resolve(bodyData);
}
if (statusCode == 500) {
isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数
@@ -78,7 +73,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
// http响应码不正确
if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
isShowErrorToast = true;
infoBox.showToast(data.message || data.msg || "服务器异常");
infoBox.showToast(data.message || "服务器异常");
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 401) {
@@ -86,44 +81,16 @@ function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 701) {
uni.clearStorageSync()
uni.reLaunch({
url: '/pages/login/login'
})
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 702) {
return Promise.reject(bodyData); // 跳转到catch函数
}
if (bodyData.code == 500) {
// 提示信息
isShowErrorToast = true;
return Promise.reject(bodyData); // 跳转到catch函数
}
let result = null;
if (bodyData.hasOwnProperty('data')) {
result = bodyData.data
} else if (bodyData.hasOwnProperty('page')) {
result = bodyData.page
} else {
result = bodyData
}
//未绑定微信
if (bodyData.code == 407) {
return Promise.resolve(result);
}
if (bodyData.code != 0) {
infoBox.showToast(data.message || data.msg);
infoBox.showToast(data.message);
return;
}
// 加密数据
if (!bodyData.data && bodyData.encryptData) {
return Promise.resolve({
@@ -131,14 +98,21 @@ function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
code: bodyData.code,
});
}
let result=null;
if(bodyData.hasOwnProperty('data')){
result=bodyData.data
}
else if(bodyData.hasOwnProperty('page')){
result=bodyData.page
}
else{
result=bodyData
}
// 构造请求成功的响应数据
return Promise.resolve(result);
})
.catch((res) => {
console.log('catch res');
console.log(res);
if (res.status == 404) {
infoBox.showToast("接口404").then(() => {});
reject();
@@ -146,18 +120,17 @@ function commonsProcess(showLoading, httpReqCallback, isreturm, url) {
}
if (res.code == 401) {
uni.clearStorageSync()
uni.redirectTo({
url: "/pages/login/login",
});
reject();
}
if (res.code != 0 && res.code != 401) {
infoBox.showToast(res.message || res.msg).then(() => {});
if (res.code != 0&&res.code != 401) {
infoBox.showToast(res.msg).then(() => {});
reject();
}
if (res.code == 500) {
infoBox.showToast(res.message || res.msg || "服务器异常").then(() => {});
infoBox.showToast(res.msg || "服务器异常").then(() => {});
reject();
}
reqFinishFunc(); // 请求完毕的动作
@@ -212,10 +185,8 @@ function request(args) {
url = url + '?' + (result.slice(0, result.length - 1))
params = null
}
let headerObject = {}
return commonsProcess(showLoading, () => {
return uni.request(
Object.assign({
url: slash(baseUrl, url),
@@ -225,7 +196,7 @@ function request(args) {
}, extParams)
)
}, isreturm, url)
}, isreturm)
}
// 处理/
function slash(baseUrl, url) {

View File

@@ -2,20 +2,11 @@
"name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1",
"description" : "",
"versionName" : "1.3.2",
"versionCode" : 132,
"versionName" : "1.2.5",
"versionCode" : 125,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"app" : {
"name" : "斯耀短剧1",
"pkgName" : "com.hnsiyao.duanju" // 安卓包名
},
"ios" : {
"name" : "顺享短剧2",
"app-category" : "public.app-category.utilities",
"bundleID" : "com.hnsiyao.duanju" // iOS bundle ID
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
@@ -30,8 +21,7 @@
"Camera" : {},
"Push" : {},
"VideoPlayer" : {},
"Canvas" : "nvue canvas", //使用Canvas模块
"OAuth" : {}
"Canvas" : "nvue canvas" //使用Canvas模块
},
/* */
"distribute" : {
@@ -75,12 +65,6 @@
},
"ad" : {
"ks" : {}
},
"oauth" : {
"weixin" : {
"appid" : "wx5001ff1af6c4781f",
"UniversalLinks" : ""
}
}
},
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
@@ -150,8 +134,7 @@
"title" : "斯耀短剧",
"template" : "template.html",
"router" : {
"mode" : "history",
"base" : ""
"mode" : "history"
}
}
}

301
package-lock.json generated
View File

@@ -1,110 +1,295 @@
{
"name": "抽奖转盘非固定图片可自定义传入奖项列表v2 v3兼容",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "抽奖转盘非固定图片可自定义传入奖项列表v2 v3兼容",
"version": "1.0.0",
"dependencies": {
"lodash": "^4.17.21",
"uview-plus": "^3.3.62"
},
"devDependencies": {
"pinia-plugin-unistorage": "^0.1.2"
"lockfileVersion": 1,
"dependencies": {
"@babel/runtime": {
"version": "7.26.0",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.26.0.tgz",
"integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==",
"requires": {
"regenerator-runtime": "^0.14.0"
}
},
"node_modules/clipboard": {
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
},
"clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"dependencies": {
"requires": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/dayjs": {
"concat-stream": {
"version": "1.6.2",
"resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-1.6.2.tgz",
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^2.2.2",
"typedarray": "^0.0.6"
}
},
"copy-text-to-clipboard": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz",
"integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q=="
},
"core-js": {
"version": "3.40.0",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.40.0.tgz",
"integrity": "sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ=="
},
"core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==",
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
"node_modules/delegate": {
"delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/good-listener": {
"gm-crypto": {
"version": "0.1.12",
"resolved": "https://registry.npmmirror.com/gm-crypto/-/gm-crypto-0.1.12.tgz",
"integrity": "sha512-ercd9ionBqxR+/FCXICr0eo+jzC8BvSK0j9L7/eB0uwbyjgeMPTdBNrcQTqIuRXOtOAKSGsTNvtLYFnIxNEoFg==",
"requires": {
"buffer": "^5.7.0",
"jsbn": "^1.1.0",
"to-arraybuffer": "^1.0.1"
}
},
"good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"dependencies": {
"requires": {
"delegate": "^3.1.2"
}
},
"node_modules/lodash": {
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
},
"jsbn": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/node_modules/pinia-plugin-unistorage": {
"version": "0.1.2",
"integrity": "sha512-WXit2cGnm5rG6CDTcLSLehNWhyJS/Yq7WEeeXAapZbCnqoPJxlszqg7rT8S+OP47az0h5nlajGo+LuyMxUQ2uw==",
"extraneous": true,
"devDependencies": {
"@types/node": "^18.19.8",
"bumpp": "^9.3.0",
"pinia-plugin-persistedstate": "^3.2.1",
"unbuild": "^2.0.0"
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"node_modules/node_modules/pre-commit": {
"version": "1.2.2",
"integrity": "sha512-qokTiqxD6GjODy5ETAIgzsRgnBWWQHQH2ghy86PU7mIn/wuWeTwF3otyNQZxWBwVn8XNr8Tdzj/QfUXpH+gRZA==",
"extraneous": true,
"hasInstallScript": true,
"dependencies": {
"cross-spawn": "^5.0.1",
"spawn-sync": "^1.0.15",
"which": "1.2.x"
},
"devDependencies": {
"assume": "1.4.x",
"istanbul": "0.4.x",
"mocha": "~3.2.0",
"pre-commit": "git://github.com/observing/pre-commit.git"
}
"mutation-observer": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz",
"integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA=="
},
"os-shim": {
"version": "0.1.3",
"resolved": "https://registry.npmmirror.com/os-shim/-/os-shim-0.1.3.tgz",
"integrity": "sha512-jd0cvB8qQ5uVt0lvCIexBaROw1KyKm5sbulg2fWOHjETisuCzWyt+eTZKEMs8v6HwzoGs8xik26jg7eCM6pS+A=="
},
"node_modules/pinia-plugin-unistorage": {
"version": "0.1.2",
"resolved": "https://registry.npmmirror.com/pinia-plugin-unistorage/-/pinia-plugin-unistorage-0.1.2.tgz",
"integrity": "sha512-WXit2cGnm5rG6CDTcLSLehNWhyJS/Yq7WEeeXAapZbCnqoPJxlszqg7rT8S+OP47az0h5nlajGo+LuyMxUQ2uw==",
"dev": true
"dev": true,
"license": "MIT"
},
"node_modules/select": {
"node_modules/pre-commit": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/pre-commit/-/pre-commit-1.2.2.tgz",
"integrity": "sha512-qokTiqxD6GjODy5ETAIgzsRgnBWWQHQH2ghy86PU7mIn/wuWeTwF3otyNQZxWBwVn8XNr8Tdzj/QfUXpH+gRZA==",
"requires": {
"cross-spawn": "^5.0.1",
"spawn-sync": "^1.0.15",
"which": "1.2.x"
}
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
},
"readable-stream": {
"version": "2.3.8",
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz",
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"regenerator-runtime": {
"version": "0.14.1",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"node_modules/tiny-emitter": {
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ=="
},
"spawn-sync": {
"version": "1.0.15",
"resolved": "https://registry.npmmirror.com/spawn-sync/-/spawn-sync-1.0.15.tgz",
"integrity": "sha512-9DWBgrgYZzNghseho0JOuh+5fg9u6QWhAWa51QC7+U5rCheZ/j1DrEZnyE0RBBRqZ9uEXGPgSSM0nky6burpVw==",
"requires": {
"concat-stream": "^1.4.7",
"os-shim": "^0.1.2"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"node_modules/uview-plus": {
"version": "3.5.10",
"resolved": "https://registry.npmmirror.com/uview-plus/-/uview-plus-3.5.10.tgz",
"integrity": "sha512-sn92VKgfFqoBEpWrIULIZbd2z5Rf9iM8U/fKSCVVrU2kCFqcGp68IPr+gttQ7I+KZUVwdGLFECplQQJWytEZYA==",
"dependencies": {
"to-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
"integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA=="
},
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"uview-plus": {
"version": "3.3.61",
"resolved": "https://registry.npmmirror.com/uview-plus/-/uview-plus-3.3.61.tgz",
"integrity": "sha512-1IdZMYd7KuByW+bfBseEuSaKcYB6F4q8bGqAru1UDKIkRVTxkPlqvsTE8Q0+I0+jk6q1ov1KbGFDuyXxVzXcCg==",
"requires": {
"clipboard": "^2.0.11",
"dayjs": "^1.11.3"
},
"engines": {
"HBuilderX": "^3.1.0",
"uni-app": "^4.66",
"uni-app-x": ""
}
},
"vconsole": {
"version": "3.15.1",
"resolved": "https://registry.npmmirror.com/vconsole/-/vconsole-3.15.1.tgz",
"integrity": "sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==",
"requires": {
"@babel/runtime": "^7.17.2",
"copy-text-to-clipboard": "^3.0.1",
"core-js": "^3.11.0",
"mutation-observer": "^1.0.3"
}
},
"which": {
"version": "1.2.14",
"resolved": "https://registry.npmmirror.com/which/-/which-1.2.14.tgz",
"integrity": "sha512-16uPglFkRPzgiUXYMi1Jf8Z5EzN1iB4V0ZtMXcHZnwsBtQhhHeCqoWw7tsUY42hJGNDWtUsVLTjakIa5BgAxCw==",
"requires": {
"isexe": "^2.0.0"
}
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
}
}
}

View File

@@ -210,13 +210,6 @@
{
"navigationBarTitleText" : "兑换"
}
},
{
"path" : "pages/login/bindWx",
"style" :
{
"navigationBarTitleText" : "绑定微信"
}
}
],
"globalStyle": {

View File

@@ -52,17 +52,14 @@
<emprty-card v-if="!data.list2.length" />
</view>
</view>
<disable-mask v-if="disableShow"></disable-mask>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { reactive } from 'vue';
import { selectByUserId } from '@/api/me/me.js';
import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
import { linkTo } from '@/utils/app.js';
const disableShow = ref(false);
// 获取数据
async function selectByUserIdAjax() {
try {
@@ -72,11 +69,6 @@ async function selectByUserIdAjax() {
data.list2 = res2.records;
} catch (error) {
console.log(error);
if (error.code == 702) {
disableShow.value = true;
} else {
disableShow.value = false;
}
}
setTimeout(() => {
uni.stopPullDownRefresh();

View File

@@ -1,6 +1,7 @@
<template>
<view class="indexStyle">
<image src="@/static/index/indexbh.png" mode=""></image>
<image src="@/static/index/indexbh.png" mode="">
</image>
<view class="indexStyleTwo">
<image src="@/static/logo.png" mode=""></image>
<!-- <view @tap="moreVideo">
@@ -11,428 +12,391 @@
<template v-if="datas.isExamine">
<view class="gongao">
<view class="gongaoicon">公告</view>
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false" class="swiperstyle">
<view class="gongaoicon">
公告
</view>
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
class="swiperstyle">
<swiper-item v-for="(item, index) in datas.noticeList" :key="index">
<view style="height: 80rpx; line-height: 80rpx; font-size: 14px">{{ item.title }}</view>
<view style="height: 80rpx;line-height: 80rpx;">{{ item.title }}</view>
</swiper-item>
</swiper>
</view>
</template>
</view>
<view class="navTop">
<view :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">最新</view>
<view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)">排行</view>
<view :class="datas.active == 3 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 3)">最热</view>
<view :class="datas.active == 4 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 4)">剧情</view>
<view :class="datas.active == 5 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 5)">飙升</view>
<view :class="datas.active == 1 ? 'navTop-active' : ''" @tap="getrecomVideo('', 1)">
最新
</view>
<view :class="datas.active == 2 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 2)">
排行
</view>
<view :class="datas.active == 3 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 3)">
最热
</view>
<view :class="datas.active == 4 ? 'navTop-active' : ''" @tap="getrecomVideo('1', 4)">
剧情
</view>
<view :class="datas.active == 5 ? 'navTop-active' : ''" @tap="getrecomVideo('2', 5)">
飙升
</view>
</view>
<contentlist :list="datas.list"></contentlist>
<image
v-if="datas.isExamine"
@click="goMsg()"
src="@/static/index/red-pack-new.gif"
style="width: 200rpx; height: 200rpx; position: fixed; right: 10rpx; bottom: 180rpx"
mode=""
></image>
<up-modal
:show="datas.version.show"
:confirm-text="datas.version.confirmText"
:showCancelButton="datas.version.cancelText != ''"
@cancel="cancelUpdateVersion"
@confirm="confirmUpdateVersion"
:title="datas.version.title"
:title-style="{ fontWeight: '700' }"
confirm-color="rgb(255, 117, 129)"
>
<view class="" style="padding-top: 30rpx; text-align: left">
<scroll-view scroll-y="true" style="max-height: 50vh">
<contentlist :list='datas.list'></contentlist>
<image v-if="datas.isExamine" @click="goMsg()" src="@/static/index/red-pack-new.gif"
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
<up-modal :show="datas.version.show" :confirm-text="datas.version.confirmText"
:showCancelButton="datas.version.cancelText!=''" @cancel="cancelUpdateVersion" @confirm='confirmUpdateVersion'
:title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
<view class="" style="padding-top: 30rpx;text-align: left;">
<scroll-view scroll-y="true" style="max-height: 50vh;">
<!-- <rich-text style="color:#666" :nodes="datas.version.content"></rich-text> -->
<view style="text-align: justify; font-size: 18px; color: #666" v-html="datas.version.content"></view>
<view style="text-align: justify;font-size: 18px;color: #666;" v-html="datas.version.content"></view>
</scroll-view>
</view>
</up-modal>
<!-- h5关闭通知 -->
<!-- #ifdef H5 -->
<up-modal
:show="datas.stopShow"
cancel-text="知道了"
show-cancel-button
confirm-text="去下载"
title="重要通知"
@cancel="stopCancel"
:title="datas.rule_title"
:title-style="{ fontWeight: '700' }"
@confirm="stopConfirm"
confirm-color="rgb(255, 117, 129)"
>
<up-modal :show="datas.stopShow"
cancel-text="知道了"
show-cancel-button
confirm-text="去下载" title="重要通知"
@cancel="stopCancel"
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm"
confirm-color="rgb(255, 117, 129)">
<view class="color-red u-text-left">
<text>2025年2月8日将关闭网页访问请及时下载最新APP</text>
</view>
</up-modal>
<!-- #endif -->
<!-- 公告弹窗 -->
<up-modal :show="datas.stopShows && datas.isExamine" :showConfirmButton="true" title="公告" @confirm="confirmEvent">
<view class="color-red u-text-left">
<view style="text-align: justify; font-size: 18px; color: #666" v-html="datas.noticeList[datas.cloneNum].title"></view>
</view>
</up-modal>
<!-- #ifdef APP -->
<!-- #endif -->
<disable-mask v-if="disableMaskVisable"></disable-mask>
</template>
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js';
import { onLoad, onReady, onReachBottom, onShow } from '@dcloudio/uni-app';
import contentlist from './components/contentlist.vue';
import { selectNewApp } from '@/api/user/user.js';
import config from '@/commons/config.js';
import { linkTo } from '@/utils/app.js';
import { useCommonStore } from '@/store/common.js';
const $common = useCommonStore();
onShow(() => {
// console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
// 判断ios是否审核
$common.init();
// #ifdef H5
datas.isExamine = $common.isIosExamine;
// #endif
// let sysInfo = uni.getSystemInfoSync()
// let isIos = sysInfo.platform == 'ios'
// if (isIos) {
// datas.setindexdata = $common.setversion
// console.log(datas.setindexdata,'seaeasdas')
// }
getrecomVideo();
});
import {
reactive,
nextTick
} from 'vue';
import {
announcement,
messageselectMessage,
courseselectCourse
} from '@/api/index/index.js'
import {
onLoad,
onReady,
onReachBottom,
onShow
} from '@dcloudio/uni-app'
import contentlist from './components/contentlist.vue'
import {
selectNewApp
} from '@/api/user/user.js';
import config from '@/commons/config.js';
import {
linkTo
} from '@/utils/app.js';
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
onShow(() => {
// console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug')
// 判断ios是否审核
$common.init()
// #ifdef H5
datas.isExamine = $common.isIosExamine
// #endif
// let sysInfo = uni.getSystemInfoSync()
// let isIos = sysInfo.platform == 'ios'
// if (isIos) {
// datas.setindexdata = $common.setversion
// console.log(datas.setindexdata,'seaeasdas')
// }
})
let datas = reactive({
noticeList: [], //公告列表
const disableMaskVisable = ref(false);
active: 1, // 最新、最热。。。切换顶部导航栏
let datas = reactive({
noticeList: [], //公告列表
list: [], // 底部短剧内容
page: 1, // 首页推荐分页
stopShow:true,//h5关闭弹窗
ruleShow: false,
rule_title: '', // 首页弹窗标题
rule_content: '', // 首页弹窗内容
ruleIndex: 0,
ruleList: [],
active: 1, // 最新、最热。。。切换顶部导航栏
list: [], // 底部短剧内容
page: 1, // 首页推荐分页
stopShow: true, //h5关闭弹窗
ruleShow: false,
rule_title: '', // 首页弹窗标题
rule_content: '', // 首页弹窗内容
ruleIndex: 0,
ruleList: [],
stopShows: false,
version: {
show: false,
title: '',
content: '',
confirmText: '',
cancelText: '',
downloadLink: ''
},
setindexdata: false,
cloneNum: 0
});
onLoad(() => {
versionUpdate();
getMsg();
});
onReady(() => {
if (!uni.getStorageSync('ruleShow')) {
announcement({
type: 0
})
.then((res) => {
version: {
show: false,
title: "",
content: "",
confirmText: "",
cancelText: "",
downloadLink: ""
},
setindexdata: false
})
onLoad(() => {
versionUpdate()
getMsg()
getrecomVideo()
})
onReady(() => {
if (!uni.getStorageSync('ruleShow')) {
announcement({
type: 0
}).then(res => {
if (res) {
datas.ruleShow = true;
datas.ruleList = res;
ruleInit();
datas.ruleShow = true
datas.ruleList = res
ruleInit()
}
})
.catch((err) => {
console.log(err);
}
})
onReachBottom(() => {
++datas.page
getrecomVideo()
})
function stopConfirm(){
datas.stopShow=false
uni.navigateTo({
url:'/pages/login/download'
})
}
function stopCancel(){
datas.stopShow=false
}
function versionUpdate() {
//#ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
//获取当前系统版本信息
plus.runtime.getProperty(plus.runtime.appid, widgetInfo => {
//请求后台接口 解析数据 对比版本
selectNewApp().then(async res => {
res = res[0];
console.log(uni.getSystemInfoSync().platform == 'ios', 1101)
let version;
if (uni.getSystemInfoSync().platform == 'android') {
version = res.version
}
if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion
}
let isVersion = await $common.setversion(widgetInfo.version, version)
datas.isExamine = $common.isIosExamine
console.log(isVersion, '')
if (isVersion == 1) {
datas.version.downloadLink = res.androidWgtUrl;
datas.version.show = true;
datas.version.title = "发现新版本";
datas.version.content = res.des;
uni.hideTabBar()
if (res.method == "true") {
datas.version.confirmText = "立即更新"
} else {
datas.version.confirmText = "立即更新"
datas.version.cancelText = "下次更新"
}
}
});
}
});
onReachBottom(() => {
++datas.page;
getrecomVideo();
});
// 公告
async function getMsg() {
let res = await messageselectMessage();
let arr = [];
let ids = uni.getStorageSync('ids');
res.list.forEach((ele) => {
if (ids.length) {
if (ids.indexOf(ele.id) == -1) {
arr.push(ele);
}
} else {
uni.setStorageSync('ids', [res.list[0].id]);
arr.push(ele);
}
});
datas.noticeList = arr;
if (arr.length) {
if (ids.length) {
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
}
datas.stopShows = true;
}
}
function confirmEvent() {
datas.stopShows = false;
if (datas.cloneNum < datas.noticeList.length - 1) {
++datas.cloneNum;
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
datas.stopShows = true;
}
}
function stopConfirm() {
datas.stopShow = false;
uni.navigateTo({
url: '/pages/login/download'
});
}
function stopCancel() {
datas.stopShow = false;
}
function versionUpdate() {
//#ifdef APP-PLUS
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
//获取当前系统版本信息
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
//请求后台接口 解析数据 对比版本
selectNewApp().then(async (res) => {
res = res[0];
console.log(uni.getSystemInfoSync().platform == 'ios', 1101);
let version;
if (uni.getSystemInfoSync().platform == 'android') {
version = res.version;
}
if (uni.getSystemInfoSync().platform == 'ios') {
version = res.iosVersion;
}
let isVersion = await $common.setversion(widgetInfo.version, version);
datas.isExamine = $common.isIosExamine;
console.log(isVersion, '');
if (isVersion == 1) {
datas.version.downloadLink = res.androidWgtUrl;
datas.version.show = true;
datas.version.title = '发现新版本';
datas.version.content = res.des;
uni.hideTabBar();
if (res.method == 'true') {
datas.version.confirmText = '立即更新';
} else {
datas.version.confirmText = '立即更新';
datas.version.cancelText = '下次更新';
}
}
});
});
//#endif
}
//#endif
}
function cancelUpdateVersion() {
uni.showTabBar();
datas.version.show = false;
}
function cancelUpdateVersion() {
uni.showTabBar()
datas.version.show = false
}
function confirmUpdateVersion() {
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
linkTo('/pages/login/download');
return;
uni.showLoading({
title: '下载中...',
mask: true
});
if (uni.getSystemInfoSync().platform == 'android') {
uni.downloadFile({
url: datas.version.downloadLink,
success: (downloadResult) => {
console.log(downloadResult);
if (downloadResult.statusCode === 200) {
plus.runtime.install(
downloadResult.tempFilePath,
{
force: false
},
(d) => {
console.log('install success...');
plus.runtime.restart();
},
(e) => {
console.log(e);
console.error('install fail...');
}
);
function confirmUpdateVersion() {
// plus.runtime.openURL(config.baseUrl + '/pages/login/appEq')
linkTo('/pages/login/download')
return
uni.showLoading({
title: '下载中...',
mask: true
});
if (uni.getSystemInfoSync().platform == 'android') {
uni.downloadFile({
url: datas.version.downloadLink,
success: downloadResult => {
console.log(downloadResult)
if (downloadResult.statusCode === 200) {
plus.runtime.install(
downloadResult.tempFilePath, {
force: false
},
d => {
console.log('install success...');
plus.runtime
.restart();
},
e => {
console.log(e)
console.error('install fail...');
}
);
}
}
}
});
}
if (uni.getSystemInfoSync().platform == 'ios') {
plus.runtime.openURL(datas.version.downloadLink, function(res) {});
}
}
function ruleInit() {
datas.rule_title = datas.ruleList[datas.ruleIndex].title
datas.rule_content = datas.ruleList[datas.ruleIndex].content
}
/**
* 规则确认
*/
function ruleConfirm() {
datas.ruleShow = false
datas.ruleIndex++
if (datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0
uni.setStorageSync('ruleShow', true)
return
}
setTimeout(res => {
ruleInit()
datas.ruleShow = true
}, 300)
}
// 跳转公告链接
function goMsg(url) {
uni.navigateTo({
url: '/pages/index/prizeDraw/kevy-luckydraw'
});
}
if (uni.getSystemInfoSync().platform == 'ios') {
plus.runtime.openURL(datas.version.downloadLink, function (res) {});
// 搜索跳转
function moreVideo() {
uni.navigateTo({
url: '/pages/index/search/index'
});
}
}
function ruleInit() {
datas.rule_title = datas.ruleList[datas.ruleIndex].title;
datas.rule_content = datas.ruleList[datas.ruleIndex].content;
}
/**
* 规则确认
*/
function ruleConfirm() {
datas.ruleShow = false;
datas.ruleIndex++;
if (datas.ruleIndex >= datas.ruleList.length) {
datas.ruleIndex = 0;
uni.setStorageSync('ruleShow', true);
return;
// 公告
async function getMsg() {
let res = await messageselectMessage()
datas.noticeList = res.list
}
setTimeout((res) => {
ruleInit();
datas.ruleShow = true;
}, 300);
}
// 跳转公告链接
function goMsg(url) {
uni.navigateTo({
url: '/pages/index/prizeDraw/kevy-luckydraw'
});
}
// 搜索跳转
function moreVideo() {
uni.navigateTo({
url: '/pages/index/search/index'
});
}
//获取推荐视频
async function getrecomVideo(sort, active = 1) {
try {
datas.active = active;
//获取推荐视频
async function getrecomVideo(sort, active = 1) {
datas.active = active
if (sort) {
datas.page = 1;
datas.page = 1
}
let res = await courseselectCourse({
page: datas.page,
limit: 12,
sort: sort,
classifyId: ''
});
console.log('getrecomVideo===', res);
})
if (datas.page == 1) {
datas.list = res.list;
datas.list = res.list
} else {
datas.list = [...datas.list, ...res.list];
}
} catch (error) {
console.log('getrecomVideo.error===', error);
if (error.code == 702) {
disableMaskVisable.value = true;
} else {
disableMaskVisable.value = false;
datas.list = [...datas.list, ...res.list]
}
}
}
</script>
<style lang="scss" scoped>
.indexStyle {
height: 350rpx;
position: relative;
.indexStyle {
height: 555rpx;
position: relative;
>image {
width: 100%;
height: 555rpx;
position: absolute;
}
.indexStyleTwo {
display: flex;
align-items: center;
justify-content: space-between;
padding: 88rpx 25rpx;
>image {
width: 187rpx;
height: 50rpx;
}
>view {
z-index: 50;
width: 236rpx;
line-height: 43rpx;
background: rgba(255, 255, 255, 0.29);
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-weight: 400;
font-size: 21rpx;
color: rgba(255, 255, 255, 0.85);
display: flex;
align-items: center;
}
}
.gongao {
position: absolute;
bottom: 75rpx;
left: 70rpx;
border-radius: 21rpx 21rpx 21rpx 21rpx;
width: 611rpx;
height: 78rpx;
background-color: rgba(255, 255, 255, .65);
display: flex;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
.gongaoicon {
color: #ffffff;
width: 98rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
font-size: 25rpx;
background-image: url('../../static/index/gonggaobg.png');
background-size: 98rpx 50rpx;
}
.swiperstyle {
height: 78rpx;
width: 80%;
}
}
> image {
width: 100%;
height: 100%;
position: absolute;
}
.indexStyleTwo {
.navTop-active {
color: #cb5d68;
}
.navTop {
display: flex;
align-items: center;
justify-content: space-between;
padding: 88rpx 25rpx;
padding: 0 20rpx;
> image {
width: 187rpx;
height: 50rpx;
}
> view {
z-index: 50;
width: 236rpx;
line-height: 43rpx;
background: rgba(255, 255, 255, 0.29);
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-weight: 400;
font-size: 21rpx;
color: rgba(255, 255, 255, 0.85);
display: flex;
align-items: center;
>view {
background-color: #f0f0f0;
margin-left: 20rpx;
padding: 6rpx 20rpx
}
}
.gongao {
position: absolute;
bottom: 85rpx;
left: 70rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
width: 611rpx;
height: 60rpx;
background-color: rgba(255, 255, 255, 0.65);
display: flex;
align-items: center;
padding: 12rpx;
box-sizing: border-box;
.gongaoicon {
color: #ffffff;
width: 98rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
font-size: 20rpx;
background-image: url('../../static/index/gonggaobg.png');
background-size: 98rpx 50rpx;
}
.swiperstyle {
height: 78rpx;
width: 80%;
}
}
}
.navTop-active {
color: #cb5d68;
}
.navTop {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx;
> view {
background-color: #f0f0f0;
margin-left: 20rpx;
padding: 6rpx 20rpx;
}
}
</style>
</style>

View File

@@ -79,22 +79,18 @@
}
if (datas.tabIndex == 1) {
if (datas.page == 1) {
datas.list = []
datas.list = res.records;
} else {
if (res.records.length) {
let arr = datas.list.concat(res.records)
datas.list = arr
datas.list.push(...datas.list, res.records)
}
}
} else {
if (datas.page == 1) {
datas.list = []
datas.list = res.list;
} else {
if (res.records.length) {
let arr = datas.list.concat(res.records)
datas.list = arr
datas.list.push(...datas.list, res.list)
}
}
// datas.total = res.page.totalCount;

View File

@@ -24,8 +24,7 @@
<view class="t-r-title t-flex-row">活动规则</view>
<view class="t-rule">
<text>1.抽奖细则每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
<text>2.抽奖机会仅当日可用次日作废凌晨24点自动清零</text>
<text>3.奖励说明红包奖励将自动发放到红包余额已绑定银行卡账号将会自动发起提现其余奖品则需联系客服领取</text>
<text>2.奖励说明红包奖励将自动发放到红包余额已绑定银行卡账号将会自动发起提现其余奖品则需联系客服领取</text>
</view>
</view>
</view>

View File

@@ -1,86 +0,0 @@
<template>
<view class="u-p-30 min-page u-flex u-flex-col u-row-center u-col-center">
<view class="u-relative w-full">
<view class="u-absolute u-flex u-row-center wx-box" >
<image src="@/static/images/wx.png" class="img" mode=""></image>
</view>
<up-button type="" class="" :custom-style="customStyl" @click="bindwx">绑定微信</up-button>
<up-button type="" @click="navback">取消</up-button>
</view>
</view>
</template>
<script setup>
import {
onShow,onHide,onUnload,onLoad
} from '@dcloudio/uni-app'
import {
$bindWx
} from '@/api/login/login.js'
import {
bindWx
} from '@/utils/wx.js'
import color from '@/commons/color.js'
import {
reactive
} from 'vue';
const customStyl = reactive({
backgroundColor: color.main,
color: '#fff'
})
function navback() {
uni.navigateBack()
}
function clear(){
clearTimeout(timer)
}
let timer=null
async function bindwx() {
const code =await bindWx()
const res = await $bindWx({
code
})
console.log(res);
if (res) {
uni.showToast({
title: '绑定微信成功',
icon: 'none'
})
clear()
timer=setTimeout(()=>{
uni.navigateBack()
},1500)
}else{
uni.showToast({
title: '绑定微失败',
icon: 'none'
})
}
}
onUnload(() => {
clear()
})
</script>
<style lang="scss" scoped>
.wx-box{
position: absolute;
left: 0;
right: 0;
bottom: 100%;
display: flex;
justify-content: center;
transform: translateY(-100rpx);
.img{
width: 200rpx;
height: 200rpx;
}
}
</style>

View File

@@ -1,407 +1,404 @@
<template>
<view class="container">
<view class="bg">
<image src="../../static/default/i_bg.png" style="width: 100%; height: 100%" mode="aspectFill"></image>
<view class="bg" >
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
</view>
<view class="wrapper u-relative" style="padding-top: 48rpx; box-sizing: border-box">
<view class="nav" style="width: 100%; height: 96rpx"></view>
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
<view class="nav" style="width: 100%;height: 96rpx;"></view>
<view class="input-content">
<view style="font-size: 58rpx; font-weight: bold; color: #333; margin-bottom: 48rpx">注册</view>
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
<view class="cu-form-group">
<view class="title">手机号</view>
<view class="input" style="padding-left: 20rpx">
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile" @input="inputChange" />
<view class="input" style="padding-left: 20rpx;">
<input class="input" type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
</view>
<view class="cu-form-group">
<text class="title">验证码</text>
<view class="input flex" style="padding-left: 20rpx; padding-right: 20rpx">
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange" @confirm="toRegister" />
<view class="input flex" style="padding-left: 20rpx;padding-right: 20rpx;">
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChange" @confirm="toRegister" />
<button class="send-msg" @click="sendMsg" :disabled="data.sending">{{ data.sendTime }}</button>
</view>
</view>
<view class="cu-form-group">
<text class="title">设置密码</text>
<view class="input" style="padding-left: 20rpx">
<input
class="input"
type="password"
:value="data.password"
placeholder="请设置新密码"
placeholder-class="input-empty"
maxlength="20"
minlength="6"
data-key="password"
@input="inputChange"
@confirm="toRegister"
/>
<view class="input" style="padding-left: 20rpx;">
<input class="input" type="password" :value="data.password" placeholder="请设置新密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toRegister" />
</view>
</view>
<button class="confirm-btn" @click="toRegister">注册</button>
<button class="confirm-btn" @click="toLogin">登录</button>
</view>
<view class="footerView">
<u-checkbox-group>
<u-checkbox v-model="data.checked" label-size="24upx" shape="circle" @change="radioChange"></u-checkbox>
<u-checkbox v-model="data.checked" label-size='24upx' shape="circle" @change="radioChange"></u-checkbox>
</u-checkbox-group>
<view>注册即同意</view>
<!-- 协议地址 -->
<view @click="linkTo('/pages/me/privacy')" style="color: #37a6ff">隐私政策</view>
<view @click="linkTo('/pages/me/privacy')" style="color: #37A6FF;">隐私政策</view>
<view @click="linkTo('/pages/me/agreement')" style="color: #37a6ff">用户服务协议</view>
<view @click="linkTo('/pages/me/agreement')" style="color: #37A6FF;">用户服务协议</view>
</view>
</view>
</view>
</template>
<script setup>
import { reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { setSendMsg, register } from '@/api/login/login.js';
import { commonType } from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
let data = reactive({
code: '',
mobile: '',
password: '',
sending: false,
sendTime: '获取验证码',
count: 60,
relation: '',
invitation: '',
isregisterCode: '',
qdCodeion: '', //渠道码
checked: false
});
onLoad(async (options) => {
let localQdCodeion = uni.getStorageSync('qdCodeion');
if (localQdCodeion && localQdCodeion != 'null') {
data.qdCodeion = localQdCodeion;
}
if (options.qdCode && options.qdCode != 'null') {
data.qdCodeion = options.qdCode;
}
if (options.invitation) {
data.invitation = options.invitation;
}
console.log('localQdCodeion===', localQdCodeion);
console.log('options.qdCode===', typeof options.qdCode);
let res = await commonType(3);
data.isregisterCode = res.value;
});
/**
* 发送验证码
*/
async function sendMsg() {
try {
import { reactive } from 'vue';
import { onLoad} from '@dcloudio/uni-app'
import {setSendMsg,register} from '@/api/login/login.js';
import {commonType} from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
let data = reactive({
code: '',
mobile: '',
password: '',
sending: false,
sendTime: '获取验证码',
count: 60,
relation: "",
invitation: '',
isregisterCode: '',
qdCodeion: '', //渠道码
checked: false,
})
onLoad(async ( options ) => {
if (uni.getStorageSync('qdCodeion')) { data.qdCodeion = uni.getStorageSync('qdCodeion') }
if (options.qdCode) { data.qdCodeion = options.qdCode }
if (options.invitation ) { data.invitation = options.invitation }
let res = await commonType(3)
data.isregisterCode = res.value
})
/**
* 发送验证码
*/
async function sendMsg () {
if (!data.mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
icon: 'none',
})
} else if (data.mobile.length !== 11) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
});
icon: 'none',
})
} else {
uni.showLoading({
title: '正在发送验证码...'
});
let res = await setSendMsg(data.mobile, 'login');
console.log(res);
})
let res = await setSendMsg(data.mobile,'login')
uni.hideLoading();
uni.hideToast();
if( res ){
data.sending = true;
uni.showToast({
title: '验证码发送成功请注意查收',
icon: 'none',
duration: 1000
})
countDown();
} else {
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: '请一分钟后再获取验证码'
});
}
}
}
/**
* 验证码倒计时
*/
function countDown() {
console.log(data.count)
if (data.count === 1) {
data.count = 60;
data.sending = false;
data.sendTime = '获取验证码';
} else {
data.count = data.count - 1;
data.sending = true;
data.sendTime = data.count - 1 + '秒后重新获取';
setTimeout(countDown.bind(this), 1000);
}
}
/**
* 获取注册值
* @param {Object} e
*/
function inputChange(e) {
const key = e.currentTarget.dataset.key;
data[key] = e.detail.value;
}
/**
* 是否同意协议
* @param {Object} e
*/
function radioChange(e) {
data.checked = e
}
/**
* 登录
*/
function toLogin() {
uni.reLaunch({
url: '/pages/login/login'
});
}
/**
* 注册
*/
async function toRegister() {
const {
mobile,
password,
code,
checked,
invitation,
isregisterCode,
qdCodeion
} = data;
if (!mobile) {
uni.showToast({
title: '验证码发送成功请注意查收',
title: '请输入账号',
icon: 'none',
duration: 1000
});
countDown();
})
return
}
} catch (error) {
console.log(error);
uni.showToast({
title: error.message,
icon: 'none',
duration: 1000
});
}
uni.hideLoading();
}
/**
* 验证码倒计时
*/
function countDown() {
console.log(data.count);
if (data.count === 1) {
data.count = 60;
data.sending = false;
data.sendTime = '获取验证码';
} else {
data.count = data.count - 1;
data.sending = true;
data.sendTime = data.count - 1 + '秒后重新获取';
setTimeout(countDown.bind(this), 1000);
}
}
/**
* 获取注册值
* @param {Object} e
*/
function inputChange(e) {
const key = e.currentTarget.dataset.key;
data[key] = e.detail.value;
}
/**
* 是否同意协议
* @param {Object} e
*/
function radioChange(e) {
data.checked = e;
}
/**
* 登录
*/
function toLogin() {
uni.reLaunch({
url: '/pages/login/login'
});
}
/**
* 注册
*/
async function toRegister() {
const { mobile, password, code, checked, invitation, isregisterCode, qdCodeion } = data;
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 && isregisterCode == '是') {
uni.showToast({
title: '请输入邀请码',
icon: 'none',
duration: 1000
});
return;
}
if (!checked) {
uni.showToast({
title: '请先同意《隐私政策》和《用户协议》',
icon: 'none',
duration: 1000
});
return;
}
data.logining = true;
uni.showLoading({
title: '注册中...'
});
let platform = '';
// #ifdef APP
platform = 'app';
// #endif
// #ifdef H5
platform = 'h5';
// #endif
let res = await register({
password: password,
phone: mobile,
msg: code,
inviterCode: invitation,
platform: platform,
qdCode: qdCodeion
});
if (res.code === 0) {
uni.setStorageSync('token', res.token);
uni.setStorageSync('userInfo', res.user);
uni.showToast({
title: '注册成功',
icon: 'none'
});
setTimeout(function () {
uni.switchTab({
url: '/pages/index/index'
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 && isregisterCode == '是') {
uni.showToast({
title: '请输入邀请码',
icon: 'none',
duration: 1000
})
return
}
if (!checked) {
uni.showToast({
title: '请先同意《隐私政策》和《用户协议》',
icon: 'none',
duration: 1000
})
return
}
data.logining = true;
uni.showLoading({
title: '注册中...'
})
let platform = ''
// #ifdef APP
platform = 'app'
// #endif
// #ifdef H5
platform = 'h5'
// #endif
let res = await register({
password: password,
phone: mobile,
msg: code,
inviterCode: invitation,
platform: platform,
qdCode: qdCodeion,
})
if (res.code === 0) {
uni.setStorageSync('token', res.token)
uni.setStorageSync('userInfo', res.user)
uni.showToast({
title: '注册成功',
icon: 'none'
})
setTimeout(function() {
uni.switchTab({
url: '/pages/index/index'
});
}, 1000)
} else {
uni.showModal({
showCancel: false,
title: '注册失败',
content: res.msg
});
}, 1000);
} else {
uni.showModal({
showCancel: false,
title: '注册失败',
content: res.msg
});
}
uni.hideLoading();
}
uni.hideLoading();
}
</script>
<style lang="scss" scoped>
page {
background: #ffffff;
}
* {
box-sizing: border-box;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
}
.wrapper {
position: relative;
padding-top: 48rpx;
box-sizing: border-box;
}
.flex {
display: flex;
}
.footerView {
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #333333;
margin-top: 50rpx;
}
.cuIcon::before {
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
}
.cuIcon-round::before {
content: '\e6d7';
}
.cuIcon-radiobox:before {
content: '\e75b';
color: #37a6ff;
}
.send-msg {
flex-shrink: 0;
line-height: initial;
font-weight: 400;
font-size: 28rpx;
color: #ec6f48;
border: none;
background-color: transparent;
margin: 0;
padding: 0;
white-space: nowrap;
}
.send-msg::after {
border: none;
background-color: transparent;
}
.container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
box-sizing: border-box;
}
.wrapper {
min-height: 100vh;
position: relative;
z-index: 90;
}
.input-content {
padding: 0 56rpx;
}
.cu-form-group {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-bottom: 48rpx;
background-color: transparent;
padding: 0;
.title {
margin-bottom: 32rpx;
page {
background: #ffffff;
}
*{
box-sizing: border-box;
}
.bg{
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
}
.wrapper{
position: relative;
padding-top: 48rpx;
box-sizing: border-box;
}
.flex{
display: flex;
}
.footerView {
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #333333;
margin-top: 50rpx;
}
.cuIcon::before{
width: 30rpx;
height: 30rpx;
margin-right: 12rpx;
}
.cuIcon-round::before {
content: "\e6d7";
}
.cuIcon-radiobox:before {
content: "\e75b";
color: #37A6FF;
}
.send-msg {
line-height: initial;
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;
display: flex;
align-items: center;
justify-content: space-between;
input {
height: 84rpx !important;
}
v-deep .uni-input-input {
height: 84rpx !important;
}
}
}
.confirm-btn {
width: 100%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
border-radius: 16rpx;
margin-top: 40rpx;
background: #ec6f48;
font-size: 32rpx;
color: #ffffff;
&:after {
color: #EC6F48;
border: none;
background-color: transparent;
margin: 0;
padding: 0;
}
}
</style>
.send-msg::after{
border: none;
background-color: transparent;
}
.container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
box-sizing: border-box;
}
.wrapper {
min-height: 100vh;
position: relative;
z-index: 90;
}
.input-content {
padding: 0 56rpx;
}
.cu-form-group{
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;
display: flex;
align-items: center;
justify-content: space-between;
input{
height: 84rpx!important;
}
v-deep .uni-input-input{
height: 84rpx!important;
}
}
}
.confirm-btn {
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,37 +1,30 @@
<template>
<view class="container">
<view class="bg">
<image src="../../static/default/i_bg.png" style="width: 100%; height: 100%" mode="aspectFill"></image>
<view class="bg" >
<image src="../../static/default/i_bg.png" style="width: 100%;height:100%" mode="aspectFill"></image>
</view>
<view class="wrapper u-relative" style="padding-top: 48rpx; box-sizing: border-box">
<view class="wrapper u-relative" style="padding-top: 48rpx;box-sizing: border-box;">
<view class="input-content">
<view style="font-size: 58rpx; font-weight: bold; color: #333; margin-bottom: 48rpx">注册</view>
<view class="cu-form-group">
<view style="font-size: 58rpx;font-weight: bold;color: #333;margin-bottom: 48rpx;">注册</view>
<view class="cu-form-group" >
<view class="title">手机号</view>
<input class="input" type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile" @input="inputChange" />
<input class="input" type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
<view class="cu-form-group">
<view class="cu-form-group" >
<text class="title">验证码</text>
<view class="input flex">
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange" @confirm="toLogin" />
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code"
@input="inputChange" @confirm="toLogin" />
<button class="send-msg" @click="sendMsg" :disabled="sending">{{ sendTime }}</button>
</view>
</view>
<view class="cu-form-group">
<view class="cu-form-group" >
<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"
/>
<input class="input" type="password" :value="password" placeholder="请设置新密码" placeholder-class="input-empty"
maxlength="20" minlength="6" data-key="password" @input="inputChange" @confirm="toLogin" />
</view>
<!-- <view class="cu-form-group"
style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
@@ -46,350 +39,363 @@
</view>
<view class="footerView">
<u-checkbox-group>
<u-checkbox v-model="checked" label-size="24upx" shape="circle" @change="radioChange"></u-checkbox>
<u-checkbox v-model="checked" label-size='24upx' shape="circle" @change="radioChange"></u-checkbox>
</u-checkbox-group>
<view>同意</view>
<!-- 协议地址 -->
<navigator url="/me/setting/mimi" open-type="navigate" style="color: #37a6ff">隐私政策</navigator>
<navigator url="/me/setting/mimi" open-type="navigate" style="color: #37A6FF;">隐私政策</navigator>
<navigator url="/me/setting/xieyi" open-type="navigate" style="color: #37a6ff">用户协议</navigator>
<navigator url="/me/setting/xieyi" open-type="navigate" style="color: #37A6FF;">用户协议</navigator>
</view>
</view>
</view>
</template>
<script setup>
import { reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import http from '@/http/http.js';
let data = reactive({
code: '',
mobile: '',
password: '',
sending: false,
sendTime: '获取验证码',
count: 60,
relation: '',
invitation: '',
registerCode: '',
qdCodeion: '', //渠道码
checked: false
});
onLoad((options) => {
let relation = e.invitation;
if (relation) {
this.relation = relation;
this.invitation = relation;
}
if (e.qdCode) {
this.qdCodeion = e.qdCode;
}
http.request({
url: 'app/common/type/3',
data: {
type: 3
import { reactive } from 'vue';
import { onLoad} from '@dcloudio/uni-app'
import http from '@/http/http.js';
let data = reactive({
code: '',
mobile: '',
password: '',
sending: false,
sendTime: '获取验证码',
count: 60,
relation: "",
invitation: '',
registerCode: '',
qdCodeion: '', //渠道码
checked: false,
})
onLoad(( options ) => {
let relation = e.invitation
if (relation) {
this.relation = relation;
this.invitation = relation;
}
}).then((res) => {
if (res.code == 0) {
this.registerCode = res.data.value;
if (e.qdCode) {
this.qdCodeion = e.qdCode
}
});
});
/**
* 是否同意协议
* @param {Object} e
*/
function radioChange(e) {
this.checked = e;
}
function showMa() {
//查询官方邀请码
this.$Request.getT('/common/type/88', { type: 88 }).then((res) => {
if (res.code == 0) {
this.invitation = res.data.value;
}
});
}
function 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: '正在发送验证码...'
});
http.request({
url: 'app/Login/sendMsg/' + mobile + '/login'
}).then((res) => {
url:'app/common/type/3',
}).then(res => {
if (res.code == 0) {
this.registerCode = res.data.value
}
});
})
/**
* 是否同意协议
* @param {Object} e
*/
function radioChange(e) {
this.checked = e
}
function showMa() {
//查询官方邀请码
this.$Request.getT('/common/type/88').then(res => {
if (res.code == 0) {
this.invitation = res.data.value;
}
});
}
function 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: '正在发送验证码...'
})
http.request({
url:'app/Login/sendMsg/' + mobile + '/login',
}).then(res => {
if (res.code === 0) {
this.sending = true;
uni.showToast({
title: '验证码发送成功请注意查收',
icon: 'none',
duration: 1000
})
this.countDown();
} else {
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
});
}
uni.hideLoading();
})
}
}
function 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);
}
}
function inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
}
function toLogin() {
console.log("123");
uni.reLaunch({
url: '/pages/login/login'
});
}
function toRegister() {
const {
mobile,
password,
code,
checked,
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 (!checked) {
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
http.request({
url: 'app/Login/registerCode?password=' + password + '&phone=' + mobile + '&msg=' + code +
'&inviterCode=' + invitation + '&platform=' + platform + '&qdCode=' + qdCodeion,
method: 'post'
}).then(res => {
if (res.code === 0) {
this.sending = true;
// 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',
duration: 1000
});
this.countDown();
title: '注册成功',
icon: 'none'
})
setTimeout(function() {
uni.navigateTo({
url: '/pages/login/appEq'
})
}, 1000)
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
title: '注册失败',
content: res.msg
});
}
uni.hideLoading();
});
}
}
function 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);
}
}
function inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
}
function toLogin() {
console.log('123');
uni.reLaunch({
url: '/pages/login/login'
});
}
function toRegister() {
const { mobile, password, code, checked, 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 (!checked) {
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
http.request({
url: 'app/Login/registerCode?password=' + password + '&phone=' + mobile + '&msg=' + code + '&inviterCode=' + invitation + '&platform=' + platform + '&qdCode=' + qdCodeion,
method: 'post'
}).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/login/appEq'
});
}, 1000);
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '注册失败',
content: res.msg
});
}
});
}
</script>
<style lang="scss" scoped>
page {
background: #fff;
}
* {
box-sizing: border-box;
}
.flex {
display: flex;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
}
.wrapper {
position: relative;
padding-top: 48rpx;
box-sizing: border-box;
}
.footerView {
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;
page {
background: #fff;
}
.cuIcon-round::before {
content: '\e6d7';
*{
box-sizing: border-box;
}
.cuIcon-radiobox:before {
content: '\e75b';
color: #37a6ff;
}
}
.send-msg {
line-height: initial;
font-weight: 400;
font-size: 28rpx;
color: #ec6f48;
border: none;
background-color: transparent !important;
}
.send-msg::after {
border: none;
background-color: transparent;
}
.container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.wrapper {
position: relative;
z-index: 90;
min-height: 100vh;
}
.input-content {
padding: 0 56rpx;
.cu-form-group {
.flex{
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;
}
.bg{
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
}
.wrapper{
position: relative;
padding-top: 48rpx;
box-sizing: border-box;
}
.footerView {
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;
}
.input {
width: 100%;
height: 84rpx;
line-height: 84rpx;
background-color: #fff;
align-items: center;
padding: 22rpx 32rpx 22rpx 24rpx;
.cuIcon-round::before {
content: "\e6d7";
}
.cuIcon-radiobox:before {
content: "\e75b";
color: #37A6FF;
}
}
}
.confirm-btn {
width: 100%;
height: 100rpx;
text-align: center;
line-height: 100rpx;
border-radius: 16rpx;
margin-top: 40rpx;
background: #ec6f48;
font-size: 32rpx;
color: #ffffff;
&:after {
.send-msg {
line-height: initial;
font-weight: 400;
font-size: 28rpx;
color: #EC6F48;
border: none;
background-color: transparent!important;
}
}
</style>
.send-msg::after{
border: none;
background-color: transparent;
}
.container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.wrapper {
position: relative;
z-index: 90;
min-height: 100vh;
}
.input-content {
padding: 0 56rpx;
.cu-form-group{
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-btn {
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

@@ -14,7 +14,7 @@
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit" @click="linkTo('/pages/me/contact', true)"></image>
</view>
</view>
<view class="top" @click="linkTo(userInfo.phone ? '/pages/me/userInfo' : '/pages/login/login')">
<view class="top" @click="linkTo(userInfo.phone?'/pages/me/userInfo':'/pages/login/login')">
<image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"></image>
<view class="info-wrap">
<view class="name">{{ userInfo.phone || '请登录' }}</view>
@@ -29,7 +29,7 @@
<view class="title">我的追剧</view>
<view class="num">{{ likeData.collectCount }}</view>
</navigator>
<view class="item" v-if="$common.isIosExamine" @click="linkTo('/pages/me/withdraw/index', true)">
<view class="item" v-if="$common.isIosExamine" @click="linkTo('/pages/me/withdraw/index',true)">
<view class="title">我的红包</view>
<view class="num">{{ amount || 0 }}</view>
</view>
@@ -44,6 +44,7 @@
<div @click="linkTo('/pages/me/gold_record', true)">
<view class="btn">金币明细</view>
</div>
</view>
<div class="title-wrap" @click="linkTo('/pages/watching_history/watching_history?type=3', true)">
<view class="a">
@@ -51,7 +52,7 @@
<up-icon name="arrow-right"></up-icon>
</view>
</div>
<view class="history-list">
<view
class="item"
@@ -71,8 +72,8 @@
<view class="card-wrap">
<view class="menu-list">
<view class="item" @click="toTask">
<image class="icon" src="/static/me/Frame.png" mode="aspectFit"></image>
<view class="name">邀请好友</view>
<image class="icon" src="/static/me/menu_icon1.png" mode="aspectFit"></image>
<view class="name">任务中心</view>
</view>
<view class="item" @click="linkTo('/pages/me/setting')">
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
@@ -98,13 +99,6 @@
<image class="icon" src="/static/me/menu_icon7.png" mode="aspectFit"></image>
<view class="name">关于我们</view>
</view> -->
<!-- #ifndef H5 -->
<view class="item" @click="bindwx" v-if="!isBindWx">
<image class="icon" src="/static/me/bind_wx.png" mode="aspectFit"></image>
<view class="name">绑定微信</view>
</view>
<!-- #endif -->
<view class="item" @click="linkTo('/pages/me/privacy')">
<image class="icon" src="/static/me/menu_icon8.png" mode="aspectFit"></image>
<view class="name">隐私政策</view>
@@ -113,64 +107,30 @@
</view>
</view>
</view>
<disable-mask v-if="disableShow"></disable-mask>
</template>
<script setup>
import { ref, reactive } from 'vue';
import { onLoad, onShow, onPullDownRefresh } from '@dcloudio/uni-app';
import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app';
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
import { linkTo } from '@/utils/app.js';
import { useCommonStore } from '@/store/common.js';
import { toBindWx, bindStatus } from '@/utils/wx.js';
const disableShow = ref(false);
const $common = useCommonStore();
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
const userInfo = ref({});
let isBindWx = ref(false);
async function bindwx() {
if (isBindWx.value) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
});
return;
}
isBindWx.value = await bindStatus();
console.log(isBindWx.value);
if (isBindWx.value) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
});
return;
} else {
toBindWx();
}
}
// 获取最近的三条观看历史
const recordThree = ref([]);
onShow(() => {
onShow(()=>{
// 判断ios是否审核
$common.init();
});
$common.init()
})
async function selectByUserIdAjax() {
try {
const res = await selectByUserId({
page: 1,
limit: 3,
classify: 3
});
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
recordThree.value = res.records;
} catch (error) {
if (error.code == 702) {
disableShow.value = true;
} else {
disableShow.value = false;
}
console.log(error);
}
}
@@ -204,7 +164,9 @@ async function selectUserMoneyAjax() {
// 跳转任务中心
function toTask() {
linkTo('/pages/share/index');
uni.switchTab({
url: '/pages/task/index'
});
}
onPullDownRefresh(async () => {
@@ -218,12 +180,13 @@ onPullDownRefresh(async () => {
});
onShow(() => {
if (uni.getStorageSync('token')) {
if(uni.getStorageSync('token')){
selectByUserIdAjax();
collectVideoSummaryAjax();
selectUserMoneyAjax();
userInfo.value = uni.getStorageSync('userInfo');
}
});
</script>
@@ -239,7 +202,6 @@ $bgColor: #f5f7ff;
font-size: 28upx;
color: #333;
}
.top-bg {
width: 100%;
height: 50%;
@@ -247,7 +209,6 @@ $bgColor: #f5f7ff;
top: 0;
left: 0;
background: linear-gradient(90deg, #ffe5ea 0, #e4f5fb 49%, #fff0ee);
&::after {
content: '';
height: 50%;
@@ -258,30 +219,24 @@ $bgColor: #f5f7ff;
left: 0;
}
}
.content {
padding: 28upx;
position: relative;
.user-info {
.logo-wrap {
display: flex;
align-items: center;
justify-content: space-between;
.logo {
width: 160upx;
.img {
width: 100%;
display: block;
}
}
.quick-menu {
display: flex;
gap: 20upx;
.icon {
$size: 60upx;
width: $size;
@@ -289,12 +244,10 @@ $bgColor: #f5f7ff;
}
}
}
.top {
display: flex;
align-items: center;
padding-top: 40upx;
.avatar {
$size: 94upx;
width: $size;
@@ -302,7 +255,6 @@ $bgColor: #f5f7ff;
border-radius: 50%;
margin-right: 12upx;
}
.info-wrap {
flex: 1;
display: flex;
@@ -310,22 +262,18 @@ $bgColor: #f5f7ff;
font-size: 32upx;
}
}
.btm {
display: flex;
padding: 40upx 0;
.item {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.title {
font-size: 28upx;
}
.num {
font-weight: bold;
display: flex;
@@ -335,20 +283,17 @@ $bgColor: #f5f7ff;
}
}
}
.card-wrap {
background: #fff;
border-radius: 16upx;
overflow: hidden;
margin-bottom: 28upx;
.gold-wrap {
background: #f2b5b5;
display: flex;
justify-content: space-between;
padding: 20upx 28upx;
position: relative;
// &::after {
// $size: 40upx;
// content: '';
@@ -365,20 +310,17 @@ $bgColor: #f5f7ff;
.left {
display: flex;
align-items: center;
.icon {
$size: 52upx;
width: $size;
height: $size;
margin-right: 20upx;
}
.num {
color: #fff;
font-size: 32upx;
}
}
.btn {
color: #977641;
background: linear-gradient(90deg, #fee7bc 0%, #fdcc89 100%);
@@ -391,21 +333,17 @@ $bgColor: #f5f7ff;
font-size: 24upx;
}
}
.title-wrap {
padding: 28upx;
.a {
display: flex;
align-items: center;
justify-content: space-between;
.t {
font-size: 28upx;
}
}
}
.history-list {
padding: 0 28upx 28upx;
display: grid;
@@ -413,14 +351,12 @@ $bgColor: #f5f7ff;
grid-template-rows: 1fr;
grid-column-gap: 28upx;
grid-row-gap: 28upx;
.item {
.cover {
width: 100%;
height: 280upx;
border-radius: 20upx;
}
.name {
font-size: 28upx;
width: 160upx;
@@ -428,19 +364,16 @@ $bgColor: #f5f7ff;
text-overflow: ellipsis;
white-space: nowrap;
}
.t {
color: #999;
font-size: 24upx;
}
}
}
.menu-list {
display: flex;
flex-wrap: wrap;
padding: 28upx 0 0;
.item {
flex: 0 0 25%;
display: flex;
@@ -448,13 +381,11 @@ $bgColor: #f5f7ff;
align-items: center;
justify-content: center;
margin-bottom: 32upx;
.icon {
$size: 56upx;
width: $size;
height: $size;
}
.name {
font-size: 24upx;
margin-top: 8upx;

View File

@@ -21,10 +21,6 @@
<view class="title">隐私协议</view>
<up-icon name="arrow-right" />
</view>
<view class="item" @click="outuser" v-if="token&&!isExamine">
<view class="title">注销账号</view>
<up-icon name="arrow-right" />
</view>
<view class="item" @click="logout" v-if="token">
<view class="title">退出登录</view>
<up-icon name="arrow-right" />
@@ -35,98 +31,64 @@
</template>
<script setup>
import {
ref
} from 'vue';
import {
linkTo
} from '@/utils/app.js';
import {
onLoad
} from '@dcloudio/uni-app';
import {
deleteUserByUserId
} from '@/api/me/me.js'
import {
useCommonStore
} from '@/store/common.js'
const version = ref('');
const token = ref('');
let isExamine = ref(false)
// 注销账号
function outuser() {
uni.showModal({
title: '注意',
content: '确定要注销账号吗?',
success: async (res) => {
if (res.confirm) {
let userInfo = uni.getStorageSync('userInfo')
let res = await deleteUserByUserId(userInfo.userId)
if (res.code == 0) {
uni.reLaunch({
url: '/pages/login/login'
});
}
}
import { ref } from 'vue';
import { linkTo } from '@/utils/app.js';
import { onLoad } from '@dcloudio/uni-app';
const version = ref('');
const token = ref('');
// 退出登录
function logout() {
uni.showModal({
title: '注意',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
uni.clearStorageSync();
uni.reLaunch({
url: '/pages/login/login'
});
}
});
}
// 退出登录
function logout() {
uni.showModal({
title: '注意',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
uni.clearStorageSync();
uni.reLaunch({
url: '/pages/login/login'
});
}
}
});
}
const $common = useCommonStore()
onLoad(() => {
token.value = uni.getStorageSync('token');
const systemInfo = uni.getSystemInfoSync();
//#ifdef APP-PLUS
version.value = systemInfo.appWgtVersion;
//#endif
// #ifdef H5
version.value = systemInfo.appVersion;
// #endif
$common.init()
isExamine.value = $common.isIosExamine
}
});
}
onLoad(() => {
token.value = uni.getStorageSync('token');
const systemInfo = uni.getSystemInfoSync();
//#ifdef APP-PLUS
version.value = systemInfo.appWgtVersion;
//#endif
// #ifdef H5
version.value = systemInfo.appVersion;
// #endif
});
</script>
<style scoped lang="scss">
.container {
font-size: 28upx;
color: #555;
}
.list {
padding-bottom: 120upx;
.item {
padding: 32upx 28upx;
border-bottom: 1upx solid #efefef;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.version {
width: 100%;
height: 120upx;
.container {
font-size: 28upx;
color: #555;
}
.list {
padding-bottom: 120upx;
.item {
padding: 32upx 28upx;
border-bottom: 1upx solid #efefef;
display: flex;
justify-content: center;
position: fixed;
bottom: 0;
left: 0;
color: #999;
align-items: center;
justify-content: space-between;
}
</style>
}
.version {
width: 100%;
height: 120upx;
display: flex;
justify-content: center;
position: fixed;
bottom: 0;
left: 0;
color: #999;
}
</style>

View File

@@ -8,13 +8,10 @@
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
</up-cell>
</up-cell-group>
<view class="u-flex u-row-center">
<button class="confirm-btn" @click="toLogin"
:disabled="data.logining">绑定账户</button>
</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;text-align: center;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;text-align: center;">否则将无法正常收款请须知</view>
<button class="confirm-btn" @click="toLogin"
:disabled="data.logining">绑定账户</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view>
</template>
@@ -55,42 +52,11 @@
})
} else {
data.logining = true
// this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&certName=' + zhiFuBaoName + '&certNum=' + certNum).then(
// res => {
// console.log(res);
// if (res.code === 0) {
// uni.setStorageSync('zhiFuBao', zhiFuBao)
// uni.setStorageSync('zhiFuBaoName', zhiFuBaoName)
// uni.setStorageSync('certNum', certNum)
// uni.showToast({
// title: '修改成功',
// icon: 'none',
// complete() {
// setTimeout(function () {
// uni.navigateBack();
// }, 1000)
// }
// })
// } else {
// uni.showToast({
// title: res.msg || '修改失败',
// icon: 'none'
// })
// }
// });
let res = await updateUser({
zhiFuBao: data.zhiFuBao,
certName: data.zhiFuBaoName,
})
if(res) {
if( res) {
data.logining = false
let userInfo = uni.getStorageSync('userInfo')
userInfo.zhiFuBao = data.zhiFuBao

File diff suppressed because it is too large Load Diff

View File

@@ -65,7 +65,6 @@
})
}
onReachBottom(() => {
console.log(1)
if (data.page*data.limit < data.totalCount) {
data.page = data.page + 1;
getMoney();

View File

@@ -2,140 +2,74 @@
<view class="containerView">
<up-cell-group label-width="80" :border="false">
<up-cell>
<template #title>
<view style="width: 90px;">姓名</view>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.certName"
placeholder="请输入姓名"></up-input>
</template>
<template #title> <view style="width: 90px;">姓名</view></template>
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">身份证号码</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.certNum" :disabled="setinput()"
placeholder="请输入身份证号码"></up-input>
</template>
<template #title> <view style="width: 90px;">身份证号码</view></template>
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">银行卡号码</view>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.accountNo"
placeholder="请输入银行卡号码"></up-input> </template>
<template #title> <view style="width: 90px;">银行卡号码</view></template>
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">手机号</view>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.mobile"
placeholder="请输入银行预留号码"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">开户省份</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.province"
placeholder="请输入银行开户省份"></up-input> </template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">开户市区</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.city" placeholder="请输入银行开户市区"></up-input>
</template>
</up-cell>
<up-cell>
<template #title>
<view style="width: 90px;">开户行</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.bankBranch"
placeholder="请输入银行开户行"></up-input> </template>
<template #title> <view style="width: 90px;">手机号</view></template>
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
</up-cell>
</up-cell-group>
<button v-if="data.isAccountNo" class="confirm-btn" @click="toLogin" :disabled="data.logining">认证</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">
请正确填写收款人的银行卡号和真实的收款人姓名</view>
<button v-if="!data.isAccountNo" class="confirm-btn" @click="toLogin" :disabled="data.logining">认证</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的银行卡号和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">手机号需是银行卡银行卡预留手机号</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view>
</template>
<script setup>
import {
reactive,
nextTick,
ref
} from 'vue';
import {
onReady,
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
realNameAuth
} from '@/api/me/withdraw.js';
import {
selectUserById
} from '@/api/user/user.js';
import {
commonType
} from '@/api/init.js';
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { realNameAuth } from '@/api/me/withdraw.js';
import { selectUserById } from '@/api/user/user.js';
import { commonType } from '@/api/init.js';
let data = reactive({
certName: null,
mobile: null,
certNum: null,
accountNo: null,
isAccountNo: true,
logining: false,
province: null,
city: null,
bankBranch: null
isAccountNo: null,
logining: false
})
let inputdata = ref()
onLoad(() => {
getUserInfo()
})
function setinput() {
if (data.accountNo) {
return data.accountNo.indexOf('****') != -1
} else {
return false
}
}
function getUserInfo() {
selectUserById().then(res => {
if (res) {
function getUserInfo () {
selectUserById().then(res=>{
if(res){
data.certName = res.certName;
data.mobile = res.mobile;
if (res.accountNo) {
inputdata.value = res
if ( res.accountNo ) {
data.accountNo = res.accountNo;
data.certNum = res.certNo;
}
if (res.accountNo && res.province && res.city && res.bankBranch) {
data.province = res.province;
data.city = res.city;
data.bankBranch = res.bankBranch;
data.isAccountNo = false
}
data.isAccountNo = res.accountNo;
}
})
}
function inputChange(e) {
const key = e.currentTarget.dataset.key;
data[key] = e.detail.value;
}
async function toLogin() {
if (!data.certName) {
uni.showToast({
title: '请设置收款人姓名',
@@ -163,11 +97,8 @@
mobile: data.mobile,
certNum: data.certNum,
accountNo: data.accountNo.replace(/\s+/g, ''),
province: data.province,
city: data.city,
bankBranch: data.bankBranch
})
if (res) {
if( res) {
data.logining = false
let userInfo = uni.getStorageSync('userInfo')
userInfo.mobile = data.mobile
@@ -187,10 +118,10 @@
} else {
data.logining = false
}
}
}
</script>
@@ -198,13 +129,11 @@
page {
background: #FFFFFF;
}
.u-cell__body__content {
flex: 0 !important;
.u-cell__body__content{
flex: 0!important;
}
.containerView {
padding: 30rpx;
padding:30rpx;
position: relative;
width: 100%;
height: 100%;
@@ -240,7 +169,6 @@
color: #ffffff;
font-size: 32rpx;
border: none;
&:after {
border: none;
}

View File

@@ -9,10 +9,7 @@
reactive
} from 'vue'
import {
onShow,
onHide,
onUnload,
onLoad
onShow,onHide,onUnload,onLoad
} from '@dcloudio/uni-app'
import {
getOrderInfo
@@ -21,6 +18,7 @@
orderId: '',
timer: null,
timer1: null,
maxAjaxNum: 5,
ajaxNum: 0,
url: null, //要打开的外部链接
viewerUrl: '/hybrid/html/web/viewer.html',
@@ -34,92 +32,64 @@
getOrderInfo({
orderId: state.orderId
}).then(res => {
state.ajaxNum+=1
console.log(res);
if (res == 1) {
uni.hideLoading()
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
uni.showToast({
title: '支付成功',
icon: 'none'
})
if (isIos) {
uni.navigateBack()
uni.showToast({
title: '支付成功',
icon: 'none'
})
setTimeout(() => {
uni.navigateBack()
}, 1500)
} else {
uni.showToast({
title: '支付成功',
icon: 'none'
})
state.timer1 = setTimeout(() => {
cleartimer()
uni.navigateBack()
}, 500)
}
} else {
}
if (executionCount >= maxExecutions) {
console.log(`已达到最大执行次数(${maxExecutions}),定时器停止`);
if(state.ajaxNum>=state.maxAjaxNum){
uni.navigateBack()
cleartimer()
}
});
}
function cleartimer() {
function cleartimer(){
console.log('cleartimer');
uni.hideLoading()
clearTimeout(state.timer)
clearInterval(state.timer)
clearTimeout(state.timer1)
state.timer = null
state.timer1 = null
state.timer=null
state.timer1=null
state.ajaxNum=0
}
let runOnetime = 2000; // 初始间隔2秒
let executionCount = 0; // 执行计数
const maxExecutions = 5; // 最大执行次数
function startDynamicTimer() {
let lastExecutionTime = Date.now();
function executeAndReschedule() {
// 检查是否达到最大执行次数
if (executionCount >= maxExecutions) {
console.log(`已达到最大执行次数(${maxExecutions}),定时器停止`);
uni.navigateBack()
cleartimer()
return;
}
const currentTime = Date.now();
const elapsed = currentTime - lastExecutionTime;
lastExecutionTime = currentTime;
getOrder();
// 增加计数
executionCount++;
console.log('executionCount',executionCount);
// 计算新的间隔在上一次间隔基础上增加2秒
runOnetime += 2000;
// 如果未达到最大次数,安排下一次执行
console.log('executionCount < maxExecutions',executionCount < maxExecutions);
console.log(executionCount , maxExecutions);
if (executionCount < maxExecutions) {
state.timer = setTimeout(executeAndReschedule, runOnetime);
}
}
// 启动第一个定时器
state.timer = setTimeout(executeAndReschedule, runOnetime);
}
onShow(() => {
executionCount=0;
// #ifdef APP
uni.showLoading({
title: '支付中'
})
// #endif
runOnetime = 2000;
state.ajaxNum=0;
getOrder()
clearTimeout(state.timer)
// 启动动态定时器
startDynamicTimer();
clearInterval(state.timer)
state.timer=setInterval(()=>{
getOrder()
},2000)
})
onHide(() => {
console.log('onHide');

File diff suppressed because it is too large Load Diff

View File

@@ -40,25 +40,20 @@
title: ''
})
const refVideoList = ref(null)
async function getDetail(){
const res = await Api.getVideoDetail(options)
isFirstLoad = false
Object.assign(state, res)
state.list = res.list
}
async function init() {
/**
* 如果是安卓則不做操作如果是ios判斷是否審核不審核不套裝
*/
// 是否审核,是否ios
if ($common.isIosExamine) {
getDetail()
const res = await Api.getVideoDetail(options)
isFirstLoad = false
Object.assign(state, res)
state.list = res.list
} else {
// ios是否登錄
console.log(uni.getStorageSync('tokenTwo'),'提送hi')
if (uni.getStorageSync('tokenTwo')) {
console.log('--------')
const res = await Api.getVideoDetail({...options,token:uni.getStorageSync('tokenTwo')})
isFirstLoad = false
Object.assign(state, res)
@@ -69,7 +64,7 @@
phone: '18681817128'
})
uni.setStorageSync('tokenTwo', res.token)
getDetail()
init()
}
@@ -113,22 +108,19 @@
}) {}
onShow(async () => {
console.log(isFirstLoad)
if (!isFirstLoad) {
await getDetail()
await init()
refVideoList.value.videoListUpdata()
const drawRes = await Api.getDrawCount()
console.log(drawRes);
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
const item = state.list.find(v => v.courseDetailsId == nobuyCourseId)
console.log(item)
const item = state.list.find(v => v.courseId == nobuyCourseId)
uni.removeStorageSync('nobuyCourseId')
if (item) {
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
.videoUrl) {
console.log('跳转抽奖')
uni.navigateTo({
url: '/pages/index/prizeDraw/kevy-luckydraw'
url: '/pages/me/prizeDraw'
})
}
}

View File

@@ -1,168 +1,93 @@
<template>
<view class="min-page">
<view class="min-page " >
<!-- <up-button @click="toDetail">toDetail</up-button> -->
<my-video-list
isCommand
isTabbar
v-if="state.list.length"
@swiperChange="swiperChange"
:list="state.list"
@update="update"
<my-video-list isCommand isTabbar v-if="state.list.length" @swiperChange="swiperChange" :list="state.list" @update="update"
:info="state"
@errorHandle="errorHandle"
></my-video-list>
</view>
<view class="mask" v-if="maskShow">
<view class="content">
<view class="title">
<text class="t">风险提示</text>
</view>
<view class="text">
<text>您的账号暂不可用,详情请联系客服</text>
</view>
<div class="btn-wrap">
<text class="btn" @click="toContact">去联系客服</text>
</div>
</view>
></my-video-list>
</view>
</template>
<script setup>
import { onLoad, onShow } from '@dcloudio/uni-app';
import * as Api from '@/api/video/index.js';
import { computed, reactive, ref } from 'vue';
import { slice } from 'lodash';
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import * as Api from '@/api/video/index.js'
import {
computed,
reactive,
ref
} from 'vue'
import {
slice
} from 'lodash'
const maskShow = ref(false);
function toContact() {
uni.navigateTo({
url: '/pages/me/contact'
});
}
function toDetail() {
uni.navigateTo({
url: '/pages/video/detail?courseId=1208'
});
}
let options = {};
const state = reactive({
collect: 0,
current: {},
list: [],
price: 0,
title: ''
});
// 接收错误信息
const errorHandle = (error) => {
console.log('errorHandle.60===', error);
if (error.code == 702) {
maskShow.value = true;
} else {
maskShow.value = false;
function toDetail() {
uni.navigateTo({
url: '/pages/video/detail?courseId=1208'
})
}
};
async function init() {
try {
const res = await Api.tuijianVideo(options);
state.current = res.list[0];
Object.assign(state, res);
state.list = res.list;
} catch (error) {
console.log(error);
if (error.code == 702) {
maskShow.value = true;
} else {
maskShow.value = false;
}
let options = {}
const state = reactive({
collect: 0,
current: {},
list: [],
price: 0,
title: ''
})
async function init() {
const res = await Api.tuijianVideo(options)
state.current = res.list[0]
Object.assign(state, res)
state.list = res.list
}
}
function update({ index, item }) {
state.list[index] = item;
}
onLoad((opt) => {
Object.assign(options, opt);
init();
});
function update({
index,
item
}) {
state.list[index] = item
}
onLoad((opt) => {
Object.assign(options, opt)
init()
})
function swiperChange({ current, direction, data }) {}
function swiperChange({
current,
direction,
data
}) {}
onShow(() => {});
onShow(() => {
})
</script>
<style>
page {
height: calc(100vh - 50px);
overflow: hidden;
}
page{
height: calc(100vh - 50px);
overflow: hidden;
}
</style>
<style lang="scss" scoped>
.min-page {
/* #ifdef H5 */
height: calc(100vh - 50px);
/* #endif */
/* #ifdef APP */
height: 100vh;
/* #endif */
background-color: #000;
overflow: hidden;
flex: 1;
}
.u-popup {
position: fixed;
}
.mask {
width: 750upx;
height: 1700upx;
background-color: rgba(0, 0, 0, 0.6);
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
z-index: 99999;
.content {
width: 680upx;
height: 420upx;
background-color: #fff;
border-radius: 20upx;
.title {
display: flex;
align-items: center;
justify-content: center;
height: 100upx;
.t {
font-size: 32upx;
font-weight: bold;
}
}
.text {
padding: 50upx 28upx;
display: flex;
align-items: center;
}
.btn-wrap {
display: flex;
padding: 50upx 28upx 28upx;
.btn {
flex: 1;
height: 80upx;
display: flex;
align-items: center;
justify-content: center;
background-color: #dd8591;
color: #fff;
border-radius: 12upx;
text-align: center;
line-height: 80upx;
}
}
.min-page {
/* #ifdef H5 */
height: calc(100vh - 50px);
/* #endif */
/* #ifdef APP */
height: 100vh;
/* #endif */
background-color: #000;
overflow: hidden;
flex: 1;
}
}
</style>
.u-popup {
position: fixed;
}
</style>

View File

@@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1745978289560" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7345" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M510.864642 313.983087c-62.33879 0-112.889093 50.54928-112.889093 112.887047 0 62.340837 50.54928 112.89114 112.889093 112.89114 62.339814 0 112.890117-50.550303 112.890117-112.89114C623.755782 364.532367 573.204455 313.983087 510.864642 313.983087z" fill="#FF723B" p-id="7346"></path><path d="M511.999488 64.021106c-247.27171 0-447.724091 200.452381-447.724091 447.724091s200.452381 447.724091 447.724091 447.724091 447.724091-200.453405 447.724091-447.724091S759.271198 64.021106 511.999488 64.021106zM510.864642 798.860357c0 0-217.552851-168.727843-217.552851-379.73972 0-113.02724 97.376795-196.535165 217.552851-196.535165 120.175033 0 217.553874 83.507926 217.553874 196.535165C728.418516 630.132514 510.864642 798.860357 510.864642 798.860357z" fill="#FF723B" p-id="7347"></path></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,45 +0,0 @@
import {
$bindWx,
$bindStatus
} from '@/api/login/login.js'
// 绑定状态
export async function bindStatus() {
const res = await $bindStatus()
return res.wxBind ? true : false;
}
export function toBindWx() {
uni.navigateTo({
url: '/pages/login/bindWx'
})
}
//绑定微信
export async function bindWx() {
console.log('bindWx');
const isBind = await bindStatus()
if (isBind) {
uni.showToast({
title: '已绑定微信,请勿重复绑定',
icon: 'none'
})
return
}
return new Promise((reslove, reject) => {
uni.login({
"provider": "weixin",
"onlyAuthorize": true, // 微信登录仅请求授权认证
success: function(loginRes) {
console.log(loginRes);
reslove(loginRes.code)
},
fail: function(err) {
// 登录授权失败
// err.code是错误码
console.log(err);
reject()
}
});
})
}