This commit is contained in:
小李 2026-03-24 15:20:11 +08:00
parent 6229949c1a
commit fb6942abbd
3 changed files with 143 additions and 143 deletions

View File

@ -27,7 +27,7 @@ export function createApp() {
const systemInfo = uni.getStorageSync('systemInfo') || {} const systemInfo = uni.getStorageSync('systemInfo') || {}
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android' app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
app.config.globalProperties.$systemInfo = systemInfo app.config.globalProperties.$systemInfo = systemInfo
uni.setStorageSync('version', '1.0.3.sp8') uni.setStorageSync('version', '1.0.3.sp9')
app.config.globalProperties.$version = uni.getStorageSync('version') app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods); app.use(globalMethods);

View File

@ -33,8 +33,6 @@
let callLogList = ref(); let callLogList = ref();
onLoad((option) => { onLoad((option) => {
data.type=option.type data.type=option.type
}) })
onReady(() => { onReady(() => {

View File

@ -17,22 +17,25 @@
</template> </template>
<script setup> <script setup>
import NavBar from '@/components/nav-bar/nav-bar.vue' import NavBar from '@/components/nav-bar/nav-bar.vue'
import { import {
ref, ref,
reactive, reactive,
getCurrentInstance getCurrentInstance
} from 'vue' } from 'vue'
import { import {
onLoad onLoad
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import { import {
util util
} from '@/utils/common.js'; } from '@/utils/common.js';
const { appContext, proxy } = getCurrentInstance(); const {
// appContext,
const source = ref([{ proxy
} = getCurrentInstance();
//
const source = ref([{
name: '苹果', name: '苹果',
color: { color: {
bgColor: '#F3EAFF', bgColor: '#F3EAFF',
@ -42,8 +45,8 @@ const source = ref([{
icon: 'iphone', icon: 'iphone',
messageUrl: "/pages/message/list-index?phone=iphone", messageUrl: "/pages/message/list-index?phone=iphone",
callUrl: "/pages/call-log/call?type=ios" callUrl: "/pages/call-log/call?type=ios"
}, },
{ {
name: '华为', name: '华为',
color: { color: {
bgColor: '#FFE9E9', bgColor: '#FFE9E9',
@ -53,8 +56,8 @@ const source = ref([{
icon: 'huawei', icon: 'huawei',
messageUrl: "/pages/message/list-index?phone=huawei", messageUrl: "/pages/message/list-index?phone=huawei",
callUrl: "/pages/call-log/call?type=huawei" callUrl: "/pages/call-log/call?type=huawei"
}, },
{ {
name: '小米', name: '小米',
color: { color: {
bgColor: '#FFF0DD', bgColor: '#FFF0DD',
@ -64,8 +67,8 @@ const source = ref([{
icon: 'mi', icon: 'mi',
messageUrl: "/pages/message/list-index?phone=mi", messageUrl: "/pages/message/list-index?phone=mi",
callUrl: "/pages/call-log/call?type=xiaomi" callUrl: "/pages/call-log/call?type=xiaomi"
}, },
{ {
name: 'oppo', name: 'oppo',
color: { color: {
bgColor: '#E0FFD9', bgColor: '#E0FFD9',
@ -75,7 +78,7 @@ const source = ref([{
icon: 'oppo', icon: 'oppo',
messageUrl: "/pages/message/list-index?phone=oppo", messageUrl: "/pages/message/list-index?phone=oppo",
callUrl: "/pages/call-log/call?type=oppo" callUrl: "/pages/call-log/call?type=oppo"
}, { }, {
name: 'vivo', name: 'vivo',
color: { color: {
bgColor: '#D4F4FF', bgColor: '#D4F4FF',
@ -85,32 +88,31 @@ const source = ref([{
icon: 'vivo', icon: 'vivo',
messageUrl: "/pages/message/list-index?phone=vivo", messageUrl: "/pages/message/list-index?phone=vivo",
callUrl: "/pages/call-log/call?type=vivo" callUrl: "/pages/call-log/call?type=vivo"
}, },
]) ])
const data = reactive({ const data = reactive({
navBar: { navBar: {
title: '选择机型', title: '选择机型',
bgColor: '#F0F4F9', bgColor: '#F0F4F9',
}, },
type: "message" type: "message"
}) })
onLoad((options) => { onLoad((options) => {
if (options.type) { if (options.type) {
data.type = options.type data.type = options.type
} }
})
function goPage(url) {
if (url) {
proxy.$apiUserEvent('all', { proxy.$apiUserEvent('all', {
type: 'event', type: 'event',
key: data.type=='message'?'message':'call-log', key: data.type == 'message' ? 'message' : 'call-log',
prefix: '.uni.other.', prefix: '.uni.other.',
value: data.type=='message'?'短信':"通话" value: data.type == 'message' ? '短信' : "通话"
}) })
})
function goPage(url) {
if (url) {
util.goPage(url) util.goPage(url)
} else { } else {
uni.showToast({ uni.showToast({
@ -118,19 +120,19 @@ function goPage(url) {
icon: 'none' icon: 'none'
}) })
} }
} }
</script> </script>
<style> <style>
@import '@/common/main.css'; @import '@/common/main.css';
</style> </style>
<style lang="less"> <style lang="less">
.list-container { .list-container {
background-color: #F0F4F9; background-color: #F0F4F9;
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
} }
.item { .item {
width: 100%; width: 100%;
height: 188rpx; height: 188rpx;
border-radius: 24rpx; border-radius: 24rpx;
@ -172,5 +174,5 @@ function goPage(url) {
opacity: 0.5; opacity: 0.5;
margin-top: 4rpx; margin-top: 4rpx;
} }
} }
</style> </style>