2024.03.05~2024.03.06 工作代码提交
This commit is contained in:
parent
bcd5428f82
commit
4c8f2050e8
216
jiuyi2/App.vue
216
jiuyi2/App.vue
|
@ -1,124 +1,126 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
onLaunch,
|
onLaunch,
|
||||||
onExit
|
onExit
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
//
|
//
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// vuex
|
// vuex
|
||||||
import store from '@/store/index.js'
|
import store from '@/store/index.js'
|
||||||
// #ifdef APP
|
|
||||||
// 引入各种权限配置
|
|
||||||
import {
|
|
||||||
registerRequestPermissionTipsListener,
|
|
||||||
unregisterRequestPermissionTipsListener,
|
|
||||||
setRequestPermissionTips
|
|
||||||
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
|
||||||
var PermissionTips = {
|
|
||||||
"android.permission.CAMERA": "<h4 style=\"font-size:40px;\">相机使用权限说明</h4><font color=#cccccc>用于在添加、上传、发布、图片和视频等场景中读取和写入相册和文件内容</font>",
|
|
||||||
"android.permission.WRITE_EXTERNAL_STORAGE": "<h4 style=\"font-size:40px;\">存储空间/照片权限说明</h4><font color=#cccccc>用于在添加、上传、发布、图片和视频等场景中读取和写入相册和文件内容</font>",
|
|
||||||
"android.permission.RECORD_AUDIO": "<h4 style=\"font-size:40px;\">录音权限说明</h4><font color=#cccccc>用于发送语音消息、语音通话功能</font>",
|
|
||||||
}
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
onLaunch(() => {
|
|
||||||
// 获取用户信息
|
|
||||||
getUserinfo()
|
|
||||||
// 获取系统配置
|
|
||||||
getConfig()
|
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
// 处理用户在app端提交的权限
|
// 引入各种权限配置
|
||||||
init()
|
import {
|
||||||
|
registerRequestPermissionTipsListener,
|
||||||
|
unregisterRequestPermissionTipsListener,
|
||||||
|
setRequestPermissionTips
|
||||||
|
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
||||||
|
var PermissionTips = {
|
||||||
|
"android.permission.CAMERA": "<h4 style=\"font-size:40px;\">相机使用权限说明</h4><font color=#cccccc>用于在添加、上传、发布、图片和视频等场景中读取和写入相册和文件内容</font>",
|
||||||
|
"android.permission.WRITE_EXTERNAL_STORAGE": "<h4 style=\"font-size:40px;\">存储空间/照片权限说明</h4><font color=#cccccc>用于在添加、上传、发布、图片和视频等场景中读取和写入相册和文件内容</font>",
|
||||||
|
"android.permission.RECORD_AUDIO": "<h4 style=\"font-size:40px;\">录音权限说明</h4><font color=#cccccc>用于发送语音消息、语音通话功能</font>",
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
})
|
|
||||||
|
|
||||||
onExit(() => {
|
onLaunch(() => {
|
||||||
// #ifdef APP
|
// 获取用户信息
|
||||||
unregisterRequestPermissionTipsListener(null)
|
getUserinfo()
|
||||||
// #endif
|
// 获取系统配置
|
||||||
})
|
getConfig()
|
||||||
|
// #ifdef APP
|
||||||
/**
|
// 处理用户在app端提交的权限
|
||||||
* 处理用户在app端申请的权限
|
init()
|
||||||
* 文档地址:https://ext.dcloud.net.cn/plugin?name=uni-registerRequestPermissionTips
|
// 获取APP版本
|
||||||
*/
|
util.getAppVersion()
|
||||||
function init() {
|
// #endif
|
||||||
var brand = uni.getSystemInfoSync().deviceBrand
|
|
||||||
setRequestPermissionTips(PermissionTips)
|
|
||||||
registerRequestPermissionTipsListener({
|
|
||||||
// 申请系统权限回调
|
|
||||||
onRequest: (e) => {
|
|
||||||
console.log(e)
|
|
||||||
},
|
|
||||||
// 弹出系统权限授权框回调
|
|
||||||
onConfirm: (e) => {
|
|
||||||
console.log(e)
|
|
||||||
},
|
|
||||||
// onComplete
|
|
||||||
onComplete: (e) => {
|
|
||||||
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
|
||||||
if (brand.toLowerCase() == "huawei") {
|
|
||||||
var tips = {}
|
|
||||||
var hasDeniedPermission = false
|
|
||||||
for (var k in PermissionTips) {
|
|
||||||
if (e[k] != "denied") {
|
|
||||||
tips[k] = PermissionTips[k]
|
|
||||||
} else {
|
|
||||||
hasDeniedPermission = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setRequestPermissionTips(tips) // 更新弹框提醒,防止华为手机不出现权限申请框时权限提醒框闪烁的情况
|
|
||||||
if (hasDeniedPermission)
|
|
||||||
uni.showModal({
|
|
||||||
content: "权限已经被拒绝,请前往设置中开启"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
// 获取用户信息
|
onExit(() => {
|
||||||
function getUserinfo() {
|
// #ifdef APP
|
||||||
// 登录令牌
|
unregisterRequestPermissionTipsListener(null)
|
||||||
const token = uni.getStorageSync('token')
|
// #endif
|
||||||
// 用户信息
|
})
|
||||||
const userinfo = uni.getStorageSync('userinfo')
|
|
||||||
|
|
||||||
// 如果登录保活
|
/**
|
||||||
if (token) {
|
* 处理用户在app端申请的权限
|
||||||
// 用户信息
|
* 文档地址:https://ext.dcloud.net.cn/plugin?name=uni-registerRequestPermissionTips
|
||||||
if (userinfo) store.commit('setState', {
|
*/
|
||||||
key: 'userinfo',
|
function init() {
|
||||||
value: userinfo
|
var brand = uni.getSystemInfoSync().deviceBrand
|
||||||
})
|
setRequestPermissionTips(PermissionTips)
|
||||||
|
registerRequestPermissionTipsListener({
|
||||||
//
|
// 申请系统权限回调
|
||||||
util.getUserinfo().then(rs => {
|
onRequest: (e) => {
|
||||||
if (userinfo.isRealName) {
|
console.log(e)
|
||||||
// 腾讯im登录
|
},
|
||||||
util.loginTencent(userinfo)
|
// 弹出系统权限授权框回调
|
||||||
|
onConfirm: (e) => {
|
||||||
|
console.log(e)
|
||||||
|
},
|
||||||
|
// onComplete
|
||||||
|
onComplete: (e) => {
|
||||||
|
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
||||||
|
if (brand.toLowerCase() == "huawei") {
|
||||||
|
var tips = {}
|
||||||
|
var hasDeniedPermission = false
|
||||||
|
for (var k in PermissionTips) {
|
||||||
|
if (e[k] != "denied") {
|
||||||
|
tips[k] = PermissionTips[k]
|
||||||
|
} else {
|
||||||
|
hasDeniedPermission = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setRequestPermissionTips(tips) // 更新弹框提醒,防止华为手机不出现权限申请框时权限提醒框闪烁的情况
|
||||||
|
if (hasDeniedPermission)
|
||||||
|
uni.showModal({
|
||||||
|
content: "权限已经被拒绝,请前往设置中开启"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 获取系统配置
|
// 获取用户信息
|
||||||
function getConfig() {
|
function getUserinfo() {
|
||||||
api.getConfig().then(rs => {
|
// 登录令牌
|
||||||
if (rs.code == 200) {
|
const token = uni.getStorageSync('token')
|
||||||
store.commit('setState', {
|
// 用户信息
|
||||||
key: 'config',
|
const userinfo = uni.getStorageSync('userinfo')
|
||||||
value: rs.data
|
|
||||||
|
// 如果登录保活
|
||||||
|
if (token) {
|
||||||
|
// 用户信息
|
||||||
|
if (userinfo) store.commit('setState', {
|
||||||
|
key: 'userinfo',
|
||||||
|
value: userinfo
|
||||||
|
})
|
||||||
|
|
||||||
|
//
|
||||||
|
util.getUserinfo().then(rs => {
|
||||||
|
if (userinfo.isRealName) {
|
||||||
|
// 腾讯im登录
|
||||||
|
util.loginTencent(userinfo)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
|
||||||
|
// 获取系统配置
|
||||||
|
function getConfig() {
|
||||||
|
api.getConfig().then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
store.commit('setState', {
|
||||||
|
key: 'config',
|
||||||
|
value: rs.data
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import "./common/css/style.scss";
|
@import "./common/css/style.scss";
|
||||||
</style>
|
</style>
|
|
@ -123,6 +123,7 @@ const mine = {
|
||||||
url: '/coreplay/app/durian/getUserDataByAccount',
|
url: '/coreplay/app/durian/getUserDataByAccount',
|
||||||
query: param.query,
|
query: param.query,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,11 @@ const config = {
|
||||||
// host: 'h5api',
|
// host: 'h5api',
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
host: 'http://3f609e6a.r24.cpolar.top',
|
// host: 'http://3dd3096c.r24.cpolar.top',
|
||||||
// #endif
|
// #endif
|
||||||
|
// 是否vivo显示
|
||||||
|
showVivo: true,
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
score: {
|
score: {
|
||||||
|
|
|
@ -213,7 +213,7 @@ const util = {
|
||||||
responseType: params.responseType || 'text',
|
responseType: params.responseType || 'text',
|
||||||
// 请求成功返回
|
// 请求成功返回
|
||||||
success: res => {
|
success: res => {
|
||||||
// console.log('request success', url, res, params.data ? params.data : '')
|
console.log('request success', url, res, params.data ? params.data : '')
|
||||||
// 关闭加载效果
|
// 关闭加载效果
|
||||||
if (params.load) {
|
if (params.load) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
@ -623,7 +623,8 @@ const util = {
|
||||||
obj.success && obj.success({
|
obj.success && obj.success({
|
||||||
value: result,
|
value: result,
|
||||||
width: imageInfo.width,
|
width: imageInfo.width,
|
||||||
height: imageInfo.height,
|
height: imageInfo
|
||||||
|
.height,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -1606,6 +1607,28 @@ const util = {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取app最新版本信息
|
||||||
|
* @param {Object} option
|
||||||
|
*/
|
||||||
|
getAppVersion(callback) {
|
||||||
|
// 获取最新版本信息
|
||||||
|
api.getAppVersion().then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
const result = rs.data
|
||||||
|
console.log('getAppVersion result', result)
|
||||||
|
// 同步修改云端数据
|
||||||
|
uni.$store.commit('setState', {
|
||||||
|
key: 'versionCloud',
|
||||||
|
value: result
|
||||||
|
})
|
||||||
|
|
||||||
|
if (callback) callback(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default util
|
export default util
|
|
@ -10,6 +10,7 @@
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
computed,
|
computed,
|
||||||
nextTick,
|
nextTick,
|
||||||
|
onMounted,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
|
@ -19,28 +20,25 @@
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
// 云端版本信息
|
|
||||||
const versionCloud = reactive({})
|
|
||||||
// 程序版本信息
|
// 程序版本信息
|
||||||
const versionkApp = reactive({})
|
const versionkApp = reactive({})
|
||||||
|
// 云端app版本信息
|
||||||
|
const versionCloud = computed(() => uni.$store.state.versionCloud)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
let system = uni.getSystemInfoSync()
|
||||||
|
Object.assign(versionkApp, system)
|
||||||
|
})
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
function init() {
|
function init() {
|
||||||
// 获取最新版本信息
|
console.log('versionCloud', versionCloud.value)
|
||||||
api.getAppVersion().then(rs => {
|
return
|
||||||
if (rs.code == 200) {
|
Object.assign(versionkApp, system)
|
||||||
console.log('getAppVersion', rs)
|
// status 1更新 0未开启
|
||||||
// 结果
|
if (result.status != 1) return
|
||||||
const result = rs.data
|
// 手机版本号 < 设定版本号
|
||||||
let system = uni.getSystemInfoSync()
|
if (system.appVersionCode < result.versionCode) open()
|
||||||
Object.assign(versionCloud, result)
|
|
||||||
Object.assign(versionkApp, system)
|
|
||||||
console.log('if', system.appVersionCode, result.versionCode)
|
|
||||||
// 如果需要更新 则打开手机浏览器
|
|
||||||
if (system.appVersionCode < result.versionCode || true) open()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
|
@ -56,13 +54,19 @@
|
||||||
// 更新弹窗点击确认
|
// 更新弹窗点击确认
|
||||||
function handleConfirm() {
|
function handleConfirm() {
|
||||||
// 下载地址
|
// 下载地址
|
||||||
// let downloadUrl = 'https://www.doubao.com/chat/'
|
let downloadUrl = versionCloud.value.downloadUrl
|
||||||
let downloadUrl = versionCloud.downloadUrl
|
|
||||||
plus.runtime.openURL(downloadUrl, function(res) {
|
plus.runtime.openURL(downloadUrl, function(res) {
|
||||||
console.log('打开浏览器结果:', res);
|
console.log('打开浏览器结果:', res);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
console.log('打开浏览器失败:', err);
|
console.log('打开浏览器失败:', err);
|
||||||
});
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消
|
||||||
|
function handleCancel() {
|
||||||
|
// 判断是否强制更新
|
||||||
|
if (versionCloud.value.isforce == 1) plus.runtime.quit()
|
||||||
|
else close()
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -73,10 +77,10 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<uni-popup ref="update" type="center">
|
<uni-popup ref="update" type="center" :is-mask-click="false">
|
||||||
<view class="updateAlt popMid ptb30 plr30 bfff">
|
<view class="updateAlt popMid ptb30 plr30 bfff">
|
||||||
<view class="header">
|
<view class="header df fdc">
|
||||||
<view class="df aic">
|
<view class="df fdc aic">
|
||||||
<image src="/static/logo.png" mode="aspectFit" class="wh120 br10" />
|
<image src="/static/logo.png" mode="aspectFit" class="wh120 br10" />
|
||||||
</view>
|
</view>
|
||||||
<text class="mt30 f48">九亿有新版本啦~</text>
|
<text class="mt30 f48">九亿有新版本啦~</text>
|
||||||
|
@ -90,8 +94,14 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btn focus bar mlr50">
|
<view class="btns df fdr jcsb mlr30">
|
||||||
<text class="tac cfff f28" @click="handleConfirm">更新</text>
|
<view class="btn focus bar f1">
|
||||||
|
<text class="tac cfff f28" @click="handleConfirm">更新</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btn cancel bar f1">
|
||||||
|
<text class="tac c333 f28" @click="handleCancel">取消</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
|
@ -1,98 +1,99 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 视频左侧菜单弹窗
|
* 视频左侧菜单弹窗
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
onMounted,
|
onMounted,
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
watch,
|
watch,
|
||||||
defineExpose,
|
defineExpose,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
import videoApi from '@/api/video.js';
|
import videoApi from '@/api/video.js';
|
||||||
// 顶部状态栏
|
// 顶部状态栏
|
||||||
import statusBar from '@/components/header/statusBar.vue'
|
import statusBar from '@/components/header/statusBar.vue'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// open()
|
// open()
|
||||||
})
|
|
||||||
|
|
||||||
// 打开弹窗
|
|
||||||
function open() {
|
|
||||||
proxy.$refs.leftMenu.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭弹窗
|
|
||||||
function close() {
|
|
||||||
proxy.$refs.leftMenu.close()
|
|
||||||
}
|
|
||||||
|
|
||||||
function getUserInfos(userRecommend) {
|
|
||||||
videoApi.getUserInfo({
|
|
||||||
query: {
|
|
||||||
userRecommend: userRecommend,
|
|
||||||
}
|
|
||||||
}).then(rs => {
|
|
||||||
console.log(rs)
|
|
||||||
if (rs.data !== null) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/index/beInvited?header=' + rs.data.userPortrait + '&userId=' + rs.data.userId + '&userNickname=' +
|
|
||||||
rs.data.userNickname
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
// 打开弹窗
|
||||||
|
function open() {
|
||||||
|
proxy.$refs.leftMenu.open()
|
||||||
|
}
|
||||||
|
|
||||||
function scanQRCode() {
|
// 关闭弹窗
|
||||||
uni.scanCode({
|
function close() {
|
||||||
success: (res) => {
|
proxy.$refs.leftMenu.close()
|
||||||
console.log('扫描结果:' + res.result);
|
}
|
||||||
|
|
||||||
let result = JSON.parse(res.result)
|
function getUserInfos(userRecommend) {
|
||||||
|
videoApi.getUserInfo({
|
||||||
if (result.type == 'ADDFRIEND') {
|
query: {
|
||||||
uni.navigateTo({
|
userRecommend: userRecommend,
|
||||||
url: `/pages/news/addFriend?account=${result.account}`
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
console.log(rs)
|
||||||
|
if (rs.data !== null) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/index/beInvited?header=' + rs.data.userPortrait + '&userId=' + rs.data
|
||||||
|
.userId + '&userNickname=' +
|
||||||
|
rs.data.userNickname
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
getUserInfos(res.result)
|
}
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
console.error('扫描失败:' + err);
|
|
||||||
uni.showToast({
|
|
||||||
title: '扫描失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 实名跳转
|
function scanQRCode() {
|
||||||
function link(url) {
|
uni.scanCode({
|
||||||
// 验证
|
success: (res) => {
|
||||||
util.isAuth({
|
console.log('扫描结果:' + res.result);
|
||||||
success: rs => {
|
|
||||||
uni.navigateTo({
|
let result = JSON.parse(res.result)
|
||||||
url,
|
|
||||||
})
|
if (result.type == 'ADDFRIEND') {
|
||||||
},
|
uni.navigateTo({
|
||||||
|
url: `/pages/news/addFriend?account=${result.account}`
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
getUserInfos(res.result)
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('扫描失败:' + err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '扫描失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实名跳转
|
||||||
|
function link(url) {
|
||||||
|
// 验证
|
||||||
|
util.isAuth({
|
||||||
|
success: rs => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close,
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
close,
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -117,22 +118,25 @@ defineExpose({
|
||||||
<text class="text f1 c333 f28">我的钱包</text>
|
<text class="text f1 c333 f28">我的钱包</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
<navigator url="/pages/index/integralMall" class="item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
<template v-if="util.config.showVivo">
|
||||||
hover-class="none">
|
<navigator url="/pages/index/integralMall"
|
||||||
<image class="wh80 mr25" src="/static/leftMenu2.png" mode="aspectFit" />
|
class="item df fdr aic mtb15 ptb40 plr30 bfff br20" hover-class="none">
|
||||||
<text class="text f1 c333 f28">卷轴积分</text>
|
<image class="wh80 mr25" src="/static/leftMenu2.png" mode="aspectFit" />
|
||||||
</navigator>
|
<text class="text f1 c333 f28">卷轴积分</text>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
<navigator url="/pages/index/durian" class="item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
<navigator url="/pages/index/durian" class="item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
||||||
hover-class="none">
|
hover-class="none">
|
||||||
<image class="wh80 mr25" src="/static/leftMenu3.png" mode="aspectFit" />
|
<image class="wh80 mr25" src="/static/leftMenu3.png" mode="aspectFit" />
|
||||||
<text class="text f1 c333 f28">榴莲果树</text>
|
<text class="text f1 c333 f28">榴莲果树</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
<view @click="link('/pages/index/myTeam')" class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
<view @click="link('/pages/index/myTeam')"
|
||||||
<image class="wh80 mr25" src="/static/leftMenu5.png" mode="aspectFit" />
|
class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
||||||
<text class="text f1 c333 f28">我的团队</text>
|
<image class="wh80 mr25" src="/static/leftMenu5.png" mode="aspectFit" />
|
||||||
</view>
|
<text class="text f1 c333 f28">我的团队</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<view @click="link('/pages/index/myQrCode')"
|
<view @click="link('/pages/index/myQrCode')"
|
||||||
class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
||||||
|
@ -163,9 +167,9 @@ defineExpose({
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 左侧菜单弹窗
|
// 左侧菜单弹窗
|
||||||
.leftMenuAlt {
|
.leftMenuAlt {
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "九亿",
|
"name" : "九亿",
|
||||||
"appid" : "__UNI__08B31BC",
|
"appid" : "__UNI__08B31BC",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.12",
|
"versionName" : "1.0.13",
|
||||||
"versionCode" : 1012,
|
"versionCode" : 1013,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
@ -779,6 +779,13 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "流量点明细"
|
"navigationBarTitleText" : "流量点明细"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/mine/setting/about",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "关于九亿"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -866,11 +873,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"condition": {
|
"condition": {
|
||||||
"current": 0,
|
"current": 1,
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"name": "test",
|
"name": "test",
|
||||||
"path": "pages/mine/homepage"
|
"path": "pages/mine/homepage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test",
|
||||||
|
"path": "pages/mine/setting/about"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -801,9 +801,11 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 有效读秒唱片 -->
|
<!-- 有效读秒唱片 -->
|
||||||
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.id">
|
<template v-if="util.config.showVivo">
|
||||||
<disc ref="discRef" />
|
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.id">
|
||||||
</view>
|
<disc ref="discRef" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-for="(item, index) in tab" :key="index">
|
<template v-for="(item, index) in tab" :key="index">
|
||||||
<view class="container f1" v-if="tabIndex == index" ref="containerRef">
|
<view class="container f1" v-if="tabIndex == index" ref="containerRef">
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
proxy.$refs.orderDetail.open()
|
// proxy.$refs.orderDetail.open()
|
||||||
})
|
})
|
||||||
|
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
|
|
|
@ -13,10 +13,15 @@
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onPullDownRefresh
|
onPullDownRefresh
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
useStore
|
||||||
|
} from 'vuex'
|
||||||
//
|
//
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
|
//
|
||||||
|
const store = useStore()
|
||||||
// 列表
|
// 列表
|
||||||
const list = reactive({
|
const list = reactive({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
@ -48,6 +53,8 @@
|
||||||
])
|
])
|
||||||
// 类型索引
|
// 类型索引
|
||||||
const typeIndex = ref(0)
|
const typeIndex = ref(0)
|
||||||
|
// 用户信息
|
||||||
|
const userinfo = computed(() => store.state.userinfo)
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// 获取列表
|
// 获取列表
|
||||||
|
@ -83,7 +90,8 @@
|
||||||
query: {
|
query: {
|
||||||
pageSize: list.pageSize,
|
pageSize: list.pageSize,
|
||||||
pageNum: list.pageNum,
|
pageNum: list.pageNum,
|
||||||
type: typeList[typeIndex.value].id,
|
type: util.config.showVivo ? typeList[typeIndex.value].id : 'balance',
|
||||||
|
userId: userinfo.value.id,
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
@ -120,15 +128,17 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="app">
|
||||||
<view class="typeList df bfff shadow">
|
<template v-if="util.config.showVivo">
|
||||||
<view class="item f1 fmid fdc" v-for="(item,index) in typeList" :class="{active: index == typeIndex}"
|
<view class="typeList df bfff shadow">
|
||||||
@click="handleTypeIndex(index)">
|
<view class="item f1 fmid fdc" v-for="(item,index) in typeList" :class="{active: index == typeIndex}"
|
||||||
<view class="txt">{{item.name}}</view>
|
@click="handleTypeIndex(index)">
|
||||||
<view class="line"></view>
|
<view class="txt">{{item.name}}</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="ghost"></view>
|
<view class="ghost"></view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<view class="listBox mtb30 mlr30">
|
<view class="listBox mtb30 mlr30">
|
||||||
<view class="list oh mtb30 plr30 bfff br20" v-for="(item,index) in list.data" :key="item.id">
|
<view class="list oh mtb30 plr30 bfff br20" v-for="(item,index) in list.data" :key="item.id">
|
||||||
|
|
|
@ -171,12 +171,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mtb10">可用积分 {{wallet.score || 0}}</view>
|
<template v-if="util.config.showVivo">
|
||||||
</view>
|
<view class="mtb10">可用积分 {{wallet.score || 0}}</view>
|
||||||
|
</template>
|
||||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.released.open()">
|
|
||||||
<text>待入账列表</text>
|
|
||||||
<uni-icons type="right" color="" />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="link('/pages/index/wallet/bill')">
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="link('/pages/index/wallet/bill')">
|
||||||
|
@ -184,15 +181,22 @@
|
||||||
<uni-icons type="right" color="" />
|
<uni-icons type="right" color="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1">
|
<template v-if="util.config.showVivo">
|
||||||
<text>商家明细</text>
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.released.open()">
|
||||||
<uni-icons type="right" c1olor="" />
|
<text>待入账列表</text>
|
||||||
</view>
|
<uni-icons type="right" color="" />
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1">
|
||||||
<text>我的收益</text>
|
<text>商家明细</text>
|
||||||
<uni-icons type="right" color="" />
|
<uni-icons type="right" c1olor="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
|
||||||
|
<text>我的收益</text>
|
||||||
|
<uni-icons type="right" color="" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 待释放 -->
|
<!-- 待释放 -->
|
||||||
<uni-popup ref="released" type="center">
|
<uni-popup ref="released" type="center">
|
||||||
|
|
|
@ -276,7 +276,7 @@
|
||||||
<view class="f24">账号:{{userinfo.account}}</view>
|
<view class="f24">账号:{{userinfo.account}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
<view class="tac" v-if="userinfo.isShop == 1">
|
<view class="tac" v-if="userinfo.isShop == 1" @click="link(util.setUrl('/pages/shop/store/index',{storeId:userinfo.merId}))">
|
||||||
<uni-icons type="shop" color="" size="60rpx" />
|
<uni-icons type="shop" color="" size="60rpx" />
|
||||||
<view class="f24">我的产品</view>
|
<view class="f24">我的产品</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -395,12 +395,14 @@
|
||||||
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
||||||
<view class="txt ml20 f1">我的客服</view>
|
<view class="txt ml20 f1">我的客服</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view @click="isAuth('/pages/index/myQrCode')">
|
<template v-if="util.config.showVivo">
|
||||||
<view class="item rows ptb20">
|
<view @click="isAuth('/pages/index/myQrCode')">
|
||||||
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
<view class="item rows ptb20">
|
||||||
<view class="txt ml20 f1">我的分享</view>
|
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
||||||
|
<view class="txt ml20 f1">我的分享</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
<view @click="menuLink('/pages/mine/userinfo')">
|
<view @click="menuLink('/pages/mine/userinfo')">
|
||||||
<view class="item rows ptb20">
|
<view class="item rows ptb20">
|
||||||
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
<script setup>
|
||||||
|
// 关于九亿
|
||||||
|
// 设置
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
reactive,
|
||||||
|
computed,
|
||||||
|
getCurrentInstance
|
||||||
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
useStore
|
||||||
|
} from 'vuex'
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util.js'
|
||||||
|
// 版本更新弹窗
|
||||||
|
import appVerUpdateAlt from '@/components/index/appVerUpdate.vue';
|
||||||
|
|
||||||
|
// app版本号
|
||||||
|
const appVersion = reactive({})
|
||||||
|
//
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
// #ifdef APP
|
||||||
|
let system = uni.getSystemInfoSync()
|
||||||
|
Object.assign(appVersion, system)
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
function handleUpdate() {
|
||||||
|
util.getAppVersion((result) => {
|
||||||
|
console.log('handleUpdate', result, appVersion)
|
||||||
|
if (appVersion.appVersionCode < result.versionCode) {
|
||||||
|
proxy.$refs.appVerUpdateRef.open()
|
||||||
|
} else util.alert('当前已是最新版本')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转
|
||||||
|
function link(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<!-- 顶部 -->
|
||||||
|
<view class="header ver mt50">
|
||||||
|
<view class="logo">
|
||||||
|
<image class="logo wh200 br15" src="/static/logo.png" mode="aspectFit" />
|
||||||
|
</view>
|
||||||
|
<view class="version mt20 tac c999 f34">{{appVersion.appVersion}}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 容器 -->
|
||||||
|
<view class="container mt50 mlr50 plr20 bfff br10">
|
||||||
|
<view class="line rows ptb30 plr10" @click="handleUpdate">
|
||||||
|
<view class="key">检查更新</view>
|
||||||
|
<view class="value">
|
||||||
|
<uni-icons type="right" color="#999" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="line rows ptb30 plr10" @click="link(util.setUrl('/pages/index/article', { id: 2, }))">
|
||||||
|
<view class="key">关于我们</view>
|
||||||
|
<view class="value">
|
||||||
|
<uni-icons type="right" color="#999" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- app版本更新弹窗 -->
|
||||||
|
<appVerUpdateAlt ref="appVerUpdateRef" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 容器
|
||||||
|
.container {
|
||||||
|
.line+.line {
|
||||||
|
border-top: 2rpx solid #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -269,7 +269,7 @@ function logOff() {
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- #ifdef APP -->
|
<!-- #ifdef APP -->
|
||||||
<view class="line rows ptb20 plr10">
|
<view class="line rows ptb20 plr10"@click="link(util.setUrl('/pages/mine/setting/about'))">
|
||||||
<view class="">版本号</view>
|
<view class="">版本号</view>
|
||||||
<view class="c999 f28">{{ appVersion }}</view>
|
<view class="c999 f28">{{ appVersion }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -29,9 +29,18 @@ export default createStore({
|
||||||
"DAY_POINTS_RELEASE": 0.3, //每日积分释放
|
"DAY_POINTS_RELEASE": 0.3, //每日积分释放
|
||||||
"TASK_READING_SECOND": 300, //任务读秒
|
"TASK_READING_SECOND": 300, //任务读秒
|
||||||
"EFFECTIVE_SECONDS": 300, //有效读秒
|
"EFFECTIVE_SECONDS": 300, //有效读秒
|
||||||
"EFFECTIVE_VIDEO_TIME": 20 ,//有效视频时间
|
"EFFECTIVE_VIDEO_TIME": 20, //有效视频时间
|
||||||
"UNLOCK_FLOW_STATISTICS": 30, //解锁流量统计
|
"UNLOCK_FLOW_STATISTICS": 30, //解锁流量统计
|
||||||
},
|
},
|
||||||
|
// 云端最新版本信息
|
||||||
|
versionCloud: {
|
||||||
|
"status": "0",
|
||||||
|
"versionCode": 100,
|
||||||
|
"versionName": "1.0.0",
|
||||||
|
"downloadUrl": "",
|
||||||
|
"updateContent": "",
|
||||||
|
"isForce": 0
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
|
@ -3,8 +3,8 @@ import {
|
||||||
} from 'vite';
|
} from 'vite';
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
// let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
let target = 'http://3f609e6a.r24.cpolar.top'
|
// let target = 'http://3dd3096c.r24.cpolar.tops'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue