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>
|
||||
import {
|
||||
onLaunch,
|
||||
onExit
|
||||
} from '@dcloudio/uni-app'
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
//
|
||||
import api from '@/api/index.js'
|
||||
// vuex
|
||||
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()
|
||||
import {
|
||||
onLaunch,
|
||||
onExit
|
||||
} from '@dcloudio/uni-app'
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
//
|
||||
import api from '@/api/index.js'
|
||||
// vuex
|
||||
import store from '@/store/index.js'
|
||||
// #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
|
||||
})
|
||||
|
||||
onExit(() => {
|
||||
// #ifdef APP
|
||||
unregisterRequestPermissionTipsListener(null)
|
||||
// #endif
|
||||
})
|
||||
|
||||
/**
|
||||
* 处理用户在app端申请的权限
|
||||
* 文档地址:https://ext.dcloud.net.cn/plugin?name=uni-registerRequestPermissionTips
|
||||
*/
|
||||
function init() {
|
||||
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: "权限已经被拒绝,请前往设置中开启"
|
||||
})
|
||||
}
|
||||
}
|
||||
onLaunch(() => {
|
||||
// 获取用户信息
|
||||
getUserinfo()
|
||||
// 获取系统配置
|
||||
getConfig()
|
||||
// #ifdef APP
|
||||
// 处理用户在app端提交的权限
|
||||
init()
|
||||
// 获取APP版本
|
||||
util.getAppVersion()
|
||||
// #endif
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
function getUserinfo() {
|
||||
// 登录令牌
|
||||
const token = uni.getStorageSync('token')
|
||||
// 用户信息
|
||||
const userinfo = uni.getStorageSync('userinfo')
|
||||
onExit(() => {
|
||||
// #ifdef APP
|
||||
unregisterRequestPermissionTipsListener(null)
|
||||
// #endif
|
||||
})
|
||||
|
||||
// 如果登录保活
|
||||
if (token) {
|
||||
// 用户信息
|
||||
if (userinfo) store.commit('setState', {
|
||||
key: 'userinfo',
|
||||
value: userinfo
|
||||
})
|
||||
|
||||
//
|
||||
util.getUserinfo().then(rs => {
|
||||
if (userinfo.isRealName) {
|
||||
// 腾讯im登录
|
||||
util.loginTencent(userinfo)
|
||||
/**
|
||||
* 处理用户在app端申请的权限
|
||||
* 文档地址:https://ext.dcloud.net.cn/plugin?name=uni-registerRequestPermissionTips
|
||||
*/
|
||||
function init() {
|
||||
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: "权限已经被拒绝,请前往设置中开启"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 获取系统配置
|
||||
function getConfig() {
|
||||
api.getConfig().then(rs => {
|
||||
if (rs.code == 200) {
|
||||
store.commit('setState', {
|
||||
key: 'config',
|
||||
value: rs.data
|
||||
// 获取用户信息
|
||||
function getUserinfo() {
|
||||
// 登录令牌
|
||||
const token = uni.getStorageSync('token')
|
||||
// 用户信息
|
||||
const userinfo = uni.getStorageSync('userinfo')
|
||||
|
||||
// 如果登录保活
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
/*每个页面公共css */
|
||||
@import "./common/css/style.scss";
|
||||
/*每个页面公共css */
|
||||
@import "./common/css/style.scss";
|
||||
</style>
|
|
@ -123,6 +123,7 @@ const mine = {
|
|||
url: '/coreplay/app/durian/getUserDataByAccount',
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -6,9 +6,11 @@ const config = {
|
|||
// host: 'h5api',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
// host: 'http://91f.xyz:8080',
|
||||
host: 'http://3f609e6a.r24.cpolar.top',
|
||||
host: 'http://91f.xyz:8080',
|
||||
// host: 'http://3dd3096c.r24.cpolar.top',
|
||||
// #endif
|
||||
// 是否vivo显示
|
||||
showVivo: true,
|
||||
// 支付方式配置
|
||||
payType: {
|
||||
score: {
|
||||
|
|
|
@ -213,7 +213,7 @@ const util = {
|
|||
responseType: params.responseType || 'text',
|
||||
// 请求成功返回
|
||||
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) {
|
||||
uni.hideLoading()
|
||||
|
@ -623,7 +623,8 @@ const util = {
|
|||
obj.success && obj.success({
|
||||
value: result,
|
||||
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
|
|
@ -10,6 +10,7 @@
|
|||
getCurrentInstance,
|
||||
computed,
|
||||
nextTick,
|
||||
onMounted,
|
||||
} from 'vue'
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
|
@ -19,28 +20,25 @@
|
|||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
// 云端版本信息
|
||||
const versionCloud = reactive({})
|
||||
// 程序版本信息
|
||||
const versionkApp = reactive({})
|
||||
// 云端app版本信息
|
||||
const versionCloud = computed(() => uni.$store.state.versionCloud)
|
||||
|
||||
onMounted(() => {
|
||||
let system = uni.getSystemInfoSync()
|
||||
Object.assign(versionkApp, system)
|
||||
})
|
||||
|
||||
// 初始化
|
||||
function init() {
|
||||
// 获取最新版本信息
|
||||
api.getAppVersion().then(rs => {
|
||||
if (rs.code == 200) {
|
||||
console.log('getAppVersion', rs)
|
||||
// 结果
|
||||
const result = rs.data
|
||||
let system = uni.getSystemInfoSync()
|
||||
Object.assign(versionCloud, result)
|
||||
Object.assign(versionkApp, system)
|
||||
console.log('if', system.appVersionCode, result.versionCode)
|
||||
// 如果需要更新 则打开手机浏览器
|
||||
if (system.appVersionCode < result.versionCode || true) open()
|
||||
return
|
||||
}
|
||||
})
|
||||
console.log('versionCloud', versionCloud.value)
|
||||
return
|
||||
Object.assign(versionkApp, system)
|
||||
// status 1更新 0未开启
|
||||
if (result.status != 1) return
|
||||
// 手机版本号 < 设定版本号
|
||||
if (system.appVersionCode < result.versionCode) open()
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
|
@ -56,13 +54,19 @@
|
|||
// 更新弹窗点击确认
|
||||
function handleConfirm() {
|
||||
// 下载地址
|
||||
// let downloadUrl = 'https://www.doubao.com/chat/'
|
||||
let downloadUrl = versionCloud.downloadUrl
|
||||
let downloadUrl = versionCloud.value.downloadUrl
|
||||
plus.runtime.openURL(downloadUrl, function(res) {
|
||||
console.log('打开浏览器结果:', res);
|
||||
}, function(err) {
|
||||
console.log('打开浏览器失败:', err);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
// 取消
|
||||
function handleCancel() {
|
||||
// 判断是否强制更新
|
||||
if (versionCloud.value.isforce == 1) plus.runtime.quit()
|
||||
else close()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
@ -73,10 +77,10 @@
|
|||
</script>
|
||||
|
||||
<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="header">
|
||||
<view class="df aic">
|
||||
<view class="header df fdc">
|
||||
<view class="df fdc aic">
|
||||
<image src="/static/logo.png" mode="aspectFit" class="wh120 br10" />
|
||||
</view>
|
||||
<text class="mt30 f48">九亿有新版本啦~</text>
|
||||
|
@ -90,8 +94,14 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn focus bar mlr50">
|
||||
<text class="tac cfff f28" @click="handleConfirm">更新</text>
|
||||
<view class="btns df fdr jcsb mlr30">
|
||||
<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>
|
||||
</uni-popup>
|
||||
|
|
|
@ -1,98 +1,99 @@
|
|||
<script setup>
|
||||
/**
|
||||
* 视频左侧菜单弹窗
|
||||
*/
|
||||
import {
|
||||
onMounted,
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
watch,
|
||||
defineExpose,
|
||||
} from 'vue';
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
import videoApi from '@/api/video.js';
|
||||
// 顶部状态栏
|
||||
import statusBar from '@/components/header/statusBar.vue'
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
/**
|
||||
* 视频左侧菜单弹窗
|
||||
*/
|
||||
import {
|
||||
onMounted,
|
||||
ref,
|
||||
reactive,
|
||||
getCurrentInstance,
|
||||
watch,
|
||||
defineExpose,
|
||||
} from 'vue';
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
import videoApi from '@/api/video.js';
|
||||
// 顶部状态栏
|
||||
import statusBar from '@/components/header/statusBar.vue'
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
onMounted(() => {
|
||||
// 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
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
// open()
|
||||
})
|
||||
|
||||
}
|
||||
// 打开弹窗
|
||||
function open() {
|
||||
proxy.$refs.leftMenu.open()
|
||||
}
|
||||
|
||||
function scanQRCode() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
console.log('扫描结果:' + res.result);
|
||||
// 关闭弹窗
|
||||
function close() {
|
||||
proxy.$refs.leftMenu.close()
|
||||
}
|
||||
|
||||
let result = JSON.parse(res.result)
|
||||
|
||||
if (result.type == 'ADDFRIEND') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/news/addFriend?account=${result.account}`
|
||||
});
|
||||
return
|
||||
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
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
getUserInfos(res.result)
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('扫描失败:' + err);
|
||||
uni.showToast({
|
||||
title: '扫描失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 实名跳转
|
||||
function link(url) {
|
||||
// 验证
|
||||
util.isAuth({
|
||||
success: rs => {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
},
|
||||
function scanQRCode() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
console.log('扫描结果:' + res.result);
|
||||
|
||||
let result = JSON.parse(res.result)
|
||||
|
||||
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>
|
||||
|
||||
<template>
|
||||
|
@ -117,22 +118,25 @@ defineExpose({
|
|||
<text class="text f1 c333 f28">我的钱包</text>
|
||||
</navigator>
|
||||
|
||||
<navigator url="/pages/index/integralMall" class="item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
||||
hover-class="none">
|
||||
<image class="wh80 mr25" src="/static/leftMenu2.png" mode="aspectFit" />
|
||||
<text class="text f1 c333 f28">卷轴积分</text>
|
||||
</navigator>
|
||||
<template v-if="util.config.showVivo">
|
||||
<navigator url="/pages/index/integralMall"
|
||||
class="item df fdr aic mtb15 ptb40 plr30 bfff br20" hover-class="none">
|
||||
<image class="wh80 mr25" src="/static/leftMenu2.png" mode="aspectFit" />
|
||||
<text class="text f1 c333 f28">卷轴积分</text>
|
||||
</navigator>
|
||||
|
||||
<navigator url="/pages/index/durian" class="item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
||||
hover-class="none">
|
||||
<image class="wh80 mr25" src="/static/leftMenu3.png" mode="aspectFit" />
|
||||
<text class="text f1 c333 f28">榴莲果树</text>
|
||||
</navigator>
|
||||
<navigator url="/pages/index/durian" class="item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
||||
hover-class="none">
|
||||
<image class="wh80 mr25" src="/static/leftMenu3.png" mode="aspectFit" />
|
||||
<text class="text f1 c333 f28">榴莲果树</text>
|
||||
</navigator>
|
||||
|
||||
<view @click="link('/pages/index/myTeam')" class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
||||
<image class="wh80 mr25" src="/static/leftMenu5.png" mode="aspectFit" />
|
||||
<text class="text f1 c333 f28">我的团队</text>
|
||||
</view>
|
||||
<view @click="link('/pages/index/myTeam')"
|
||||
class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
||||
<image class="wh80 mr25" src="/static/leftMenu5.png" mode="aspectFit" />
|
||||
<text class="text f1 c333 f28">我的团队</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view @click="link('/pages/index/myQrCode')"
|
||||
class="item df fdr aic mtb15 ptb40 plr30 bfff br20">
|
||||
|
@ -163,9 +167,9 @@ defineExpose({
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 左侧菜单弹窗
|
||||
.leftMenuAlt {
|
||||
width: 600rpx;
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
// 左侧菜单弹窗
|
||||
.leftMenuAlt {
|
||||
width: 600rpx;
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
</style>
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "九亿",
|
||||
"appid" : "__UNI__08B31BC",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.12",
|
||||
"versionCode" : 1012,
|
||||
"versionName" : "1.0.13",
|
||||
"versionCode" : 1013,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
@ -779,6 +779,13 @@
|
|||
{
|
||||
"navigationBarTitleText" : "流量点明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/mine/setting/about",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "关于九亿"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -866,11 +873,15 @@
|
|||
}
|
||||
},
|
||||
"condition": {
|
||||
"current": 0,
|
||||
"current": 1,
|
||||
"list": [
|
||||
{
|
||||
"name": "test",
|
||||
"path": "pages/mine/homepage"
|
||||
},
|
||||
{
|
||||
"name": "test",
|
||||
"path": "pages/mine/setting/about"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -801,9 +801,11 @@
|
|||
</view>
|
||||
|
||||
<!-- 有效读秒唱片 -->
|
||||
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.id">
|
||||
<disc ref="discRef" />
|
||||
</view>
|
||||
<template v-if="util.config.showVivo">
|
||||
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.id">
|
||||
<disc ref="discRef" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-for="(item, index) in tab" :key="index">
|
||||
<view class="container f1" v-if="tabIndex == index" ref="containerRef">
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
})
|
||||
|
||||
onReady(() => {
|
||||
proxy.$refs.orderDetail.open()
|
||||
// proxy.$refs.orderDetail.open()
|
||||
})
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
|
|
|
@ -13,10 +13,15 @@
|
|||
onReachBottom,
|
||||
onPullDownRefresh
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
//
|
||||
import api from '@/api/index.js'
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
//
|
||||
const store = useStore()
|
||||
// 列表
|
||||
const list = reactive({
|
||||
pageSize: 10,
|
||||
|
@ -48,6 +53,8 @@
|
|||
])
|
||||
// 类型索引
|
||||
const typeIndex = ref(0)
|
||||
// 用户信息
|
||||
const userinfo = computed(() => store.state.userinfo)
|
||||
|
||||
onLoad(() => {
|
||||
// 获取列表
|
||||
|
@ -83,7 +90,8 @@
|
|||
query: {
|
||||
pageSize: list.pageSize,
|
||||
pageNum: list.pageNum,
|
||||
type: typeList[typeIndex.value].id,
|
||||
type: util.config.showVivo ? typeList[typeIndex.value].id : 'balance',
|
||||
userId: userinfo.value.id,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
|
@ -120,15 +128,17 @@
|
|||
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="typeList df bfff shadow">
|
||||
<view class="item f1 fmid fdc" v-for="(item,index) in typeList" :class="{active: index == typeIndex}"
|
||||
@click="handleTypeIndex(index)">
|
||||
<view class="txt">{{item.name}}</view>
|
||||
<view class="line"></view>
|
||||
<template v-if="util.config.showVivo">
|
||||
<view class="typeList df bfff shadow">
|
||||
<view class="item f1 fmid fdc" v-for="(item,index) in typeList" :class="{active: index == typeIndex}"
|
||||
@click="handleTypeIndex(index)">
|
||||
<view class="txt">{{item.name}}</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="ghost"></view>
|
||||
<view class="ghost"></view>
|
||||
</template>
|
||||
|
||||
<view class="listBox mtb30 mlr30">
|
||||
<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 class="mtb10">可用积分 {{wallet.score || 0}}</view>
|
||||
</view>
|
||||
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.released.open()">
|
||||
<text>待入账列表</text>
|
||||
<uni-icons type="right" color="" />
|
||||
<template v-if="util.config.showVivo">
|
||||
<view class="mtb10">可用积分 {{wallet.score || 0}}</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<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="" />
|
||||
</view>
|
||||
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1">
|
||||
<text>商家明细</text>
|
||||
<uni-icons type="right" c1olor="" />
|
||||
</view>
|
||||
<template v-if="util.config.showVivo">
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.released.open()">
|
||||
<text>待入账列表</text>
|
||||
<uni-icons type="right" color="" />
|
||||
</view>
|
||||
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="$refs.get.open()">
|
||||
<text>我的收益</text>
|
||||
<uni-icons type="right" color="" />
|
||||
</view>
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1">
|
||||
<text>商家明细</text>
|
||||
<uni-icons type="right" c1olor="" />
|
||||
</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">
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<view class="f24">账号:{{userinfo.account}}</view>
|
||||
</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" />
|
||||
<view class="f24">我的产品</view>
|
||||
</view>
|
||||
|
@ -395,12 +395,14 @@
|
|||
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
||||
<view class="txt ml20 f1">我的客服</view>
|
||||
</view> -->
|
||||
<view @click="isAuth('/pages/index/myQrCode')">
|
||||
<view class="item rows ptb20">
|
||||
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
||||
<view class="txt ml20 f1">我的分享</view>
|
||||
<template v-if="util.config.showVivo">
|
||||
<view @click="isAuth('/pages/index/myQrCode')">
|
||||
<view class="item rows ptb20">
|
||||
<image class="wh50" src="/static/userMenu.png" mode="aspectFit" />
|
||||
<view class="txt ml20 f1">我的分享</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view @click="menuLink('/pages/mine/userinfo')">
|
||||
<view class="item rows ptb20">
|
||||
<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>
|
||||
|
||||
<!-- #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="c999 f28">{{ appVersion }}</view>
|
||||
</view>
|
||||
|
|
|
@ -29,9 +29,18 @@ export default createStore({
|
|||
"DAY_POINTS_RELEASE": 0.3, //每日积分释放
|
||||
"TASK_READING_SECOND": 300, //任务读秒
|
||||
"EFFECTIVE_SECONDS": 300, //有效读秒
|
||||
"EFFECTIVE_VIDEO_TIME": 20 ,//有效视频时间
|
||||
"EFFECTIVE_VIDEO_TIME": 20, //有效视频时间
|
||||
"UNLOCK_FLOW_STATISTICS": 30, //解锁流量统计
|
||||
},
|
||||
// 云端最新版本信息
|
||||
versionCloud: {
|
||||
"status": "0",
|
||||
"versionCode": 100,
|
||||
"versionName": "1.0.0",
|
||||
"downloadUrl": "",
|
||||
"updateContent": "",
|
||||
"isForce": 0
|
||||
},
|
||||
},
|
||||
|
||||
mutations: {
|
||||
|
|
|
@ -3,8 +3,8 @@ import {
|
|||
} from 'vite';
|
||||
import uni from '@dcloudio/vite-plugin-uni';
|
||||
|
||||
// let target = 'http://91f.xyz:8080'
|
||||
let target = 'http://3f609e6a.r24.cpolar.top'
|
||||
let target = 'http://91f.xyz:8080'
|
||||
// let target = 'http://3dd3096c.r24.cpolar.tops'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
|
|
Loading…
Reference in New Issue