parent
e5384d3995
commit
bcd5428f82
|
@ -103,9 +103,9 @@ const api = {
|
||||||
* 获取未读消息数量
|
* 获取未读消息数量
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
getNoReadNum() {
|
getAppVersion() {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: '/shopify/region/all',
|
url: '/system/appversion/latest',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,8 @@ 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',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
<script setup>
|
||||||
|
/**
|
||||||
|
* app版本更新弹窗
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
defineExpose,
|
||||||
|
ref,
|
||||||
|
reactive,
|
||||||
|
getCurrentInstance,
|
||||||
|
computed,
|
||||||
|
nextTick,
|
||||||
|
} from 'vue'
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util';
|
||||||
|
// api
|
||||||
|
import api from '@/api/index.js'
|
||||||
|
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
// 云端版本信息
|
||||||
|
const versionCloud = reactive({})
|
||||||
|
// 程序版本信息
|
||||||
|
const versionkApp = reactive({})
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开弹窗
|
||||||
|
function open() {
|
||||||
|
proxy.$refs.update.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
function close() {
|
||||||
|
proxy.$refs.update.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新弹窗点击确认
|
||||||
|
function handleConfirm() {
|
||||||
|
// 下载地址
|
||||||
|
// let downloadUrl = 'https://www.doubao.com/chat/'
|
||||||
|
let downloadUrl = versionCloud.downloadUrl
|
||||||
|
plus.runtime.openURL(downloadUrl, function(res) {
|
||||||
|
console.log('打开浏览器结果:', res);
|
||||||
|
}, function(err) {
|
||||||
|
console.log('打开浏览器失败:', err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
init,
|
||||||
|
open,
|
||||||
|
close,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<uni-popup ref="update" type="center">
|
||||||
|
<view class="updateAlt popMid ptb30 plr30 bfff">
|
||||||
|
<view class="header">
|
||||||
|
<view class="df aic">
|
||||||
|
<image src="/static/logo.png" mode="aspectFit" class="wh120 br10" />
|
||||||
|
</view>
|
||||||
|
<text class="mt30 f48">九亿有新版本啦~</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="main mtb50 mlr20">
|
||||||
|
<text class="f32 c333">最新版本为{{versionCloud.versionName}}</text>
|
||||||
|
<view class="content mt20 ptb30 plr20">
|
||||||
|
<text class="f30 c333">更新说明:</text>
|
||||||
|
<text class="mt10 f26 c666">{{versionCloud.updateContent}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btn focus bar mlr50">
|
||||||
|
<text class="tac cfff f28" @click="handleConfirm">更新</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 更新弹窗
|
||||||
|
.updateAlt {
|
||||||
|
width: 600rpx;
|
||||||
|
|
||||||
|
// 内容
|
||||||
|
.content {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -36,6 +36,10 @@
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
Object.assign(wrap, rs.data)
|
Object.assign(wrap, rs.data)
|
||||||
|
// 设置标题
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: rs.data.agreementType
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
util.alert({
|
util.alert({
|
||||||
|
|
|
@ -317,6 +317,11 @@
|
||||||
<view class="btn plus black mt60 mlr60" @click="link('/pages/index/dataCenter/push')">置换流量</view>
|
<view class="btn plus black mt60 mlr60" @click="link('/pages/index/dataCenter/push')">置换流量</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<navigator hover-class="nonwe" :url="'/pages/index/article' + '?id=7'" class="c999 f30 mtb30 fmid">
|
||||||
|
<uni-icons type="info" color="#333" class="mr10" />
|
||||||
|
<text>玩法规则说明</text>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
<view class="fill" style="height: 60rpx;"></view>
|
<view class="fill" style="height: 60rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
// api
|
// api
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
|
|
||||||
|
// 版本更新弹窗
|
||||||
|
import appVerUpdateAlt from '@/components/index/appVerUpdate.vue';
|
||||||
// 顶部状态栏
|
// 顶部状态栏
|
||||||
import statusBar from '@/components/header/statusBar.vue'
|
import statusBar from '@/components/header/statusBar.vue'
|
||||||
// 引入视频
|
// 引入视频
|
||||||
|
@ -216,6 +218,10 @@
|
||||||
// handleProBuy({
|
// handleProBuy({
|
||||||
// productId: 42,
|
// productId: 42,
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
proxy.$refs.appVerUpdateRef.init()
|
||||||
|
}, 1000)
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
@ -830,6 +836,8 @@
|
||||||
<footerMenu ref="footerMenuRef" page="index" subject="dark" />
|
<footerMenu ref="footerMenuRef" page="index" subject="dark" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- app版本更新弹窗 -->
|
||||||
|
<appVerUpdateAlt ref="appVerUpdateRef" />
|
||||||
<!-- 快捷收藏 -->
|
<!-- 快捷收藏 -->
|
||||||
<fastCollect ref="fastCollectRef" />
|
<fastCollect ref="fastCollectRef" />
|
||||||
<!-- 青少年模式 -->
|
<!-- 青少年模式 -->
|
||||||
|
|
|
@ -113,9 +113,13 @@
|
||||||
<view class="btn black f1 ml45" @click="handleItem(item)">{{item.price}}购买</view>
|
<view class="btn black f1 ml45" @click="handleItem(item)">{{item.price}}购买</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<navigator hover-class="nonwe" :url="'/pages/index/article' + '?id=7'" class="c999 f30 mtb30 fmid">
|
||||||
|
<uni-icons type="info" color="#333" class="mr10" />
|
||||||
|
<text>玩法规则说明</text>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
<view class="fill" style="height: 60rpx;"></view>
|
<view class="fill" style="height: 60rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<navigator hover-class="nonwe" :url="'/pages/index/article' + '?id=7'" class="c999 f30 mtb30 fmid">
|
||||||
|
<uni-icons type="info" color="#333" class="mr10" />
|
||||||
|
<text>玩法规则说明</text>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
<view class="fill"></view>
|
<view class="fill"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,7 +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'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue