优化代码
This commit is contained in:
parent
72633579e0
commit
ed01d833b9
File diff suppressed because it is too large
Load Diff
@ -2000,7 +2000,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-p: 32rpx;
|
font-size: 30rpx;
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@ -2463,7 +2463,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text-right-answer-val {
|
.text-right-answer-val {
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
color: #1A73E8;
|
color: #1A73E8;
|
||||||
padding: 8rpx 0rpx;
|
padding: 8rpx 0rpx;
|
||||||
border-radius: 15rpx 15rpx 15rpx 0;
|
border-radius: 15rpx 15rpx 15rpx 0;
|
||||||
|
@ -110,15 +110,15 @@
|
|||||||
path: '/pages/index/index'
|
path: '/pages/index/index'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '模拟考试',
|
name: '平台题库',
|
||||||
icon: 'tn-icon-edit-form',
|
icon: 'tn-icon-edit-form',
|
||||||
path: '/pages/paper/index',
|
path: '/pages/train/index',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '关于我们',
|
|
||||||
icon: 'tn-icon-inventory',
|
|
||||||
path: '/pages/index/news-list',
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: '关于我们',
|
||||||
|
// icon: 'tn-icon-inventory',
|
||||||
|
// path: '/pages/index/news-list',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: '考试公示',
|
name: '考试公示',
|
||||||
icon: 'tn-icon-menu-list',
|
icon: 'tn-icon-menu-list',
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
//tabs 文字大小
|
//tabs 文字大小
|
||||||
size: {
|
size: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 28
|
default: 30
|
||||||
},
|
},
|
||||||
//tabs 文字颜色
|
//tabs 文字颜色
|
||||||
color: {
|
color: {
|
||||||
@ -180,7 +180,7 @@
|
|||||||
//item text字体大小
|
//item text字体大小
|
||||||
textSize: {
|
textSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 28
|
default: 30
|
||||||
},
|
},
|
||||||
//text 是否不换行
|
//text 是否不换行
|
||||||
nowrap: {
|
nowrap: {
|
||||||
@ -195,7 +195,7 @@
|
|||||||
//item subText字体大小
|
//item subText字体大小
|
||||||
subTextSize: {
|
subTextSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 24
|
default: 30
|
||||||
},
|
},
|
||||||
// item padding
|
// item padding
|
||||||
padding: {
|
padding: {
|
||||||
@ -546,6 +546,7 @@
|
|||||||
|
|
||||||
.tui-cell-title {
|
.tui-cell-title {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tui-flex-shrink {
|
.tui-flex-shrink {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,19 +2,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view>
|
<view>
|
||||||
<view style="background-color: #FFFFFF;padding: 30rpx 30rpx 30rpx 30rpx;">
|
<view style="background-color: #FFFFFF;padding: 30rpx 30rpx 80rpx 30rpx;">
|
||||||
<view class="titleBox text-xl text-black text-bold">{{ newsData.name }}</view>
|
<view class="contentBox text-lg text-black">
|
||||||
|
|
||||||
<view class="flex justify-between text-df text-gray margin-top-sm margin-bottom-sm">
|
|
||||||
<text>{{ newsData.create_time_text }}</text>
|
|
||||||
<!-- <text>{{newsData.type | typeF}}</text> -->
|
|
||||||
</view>
|
|
||||||
<!-- <image mode="widthFix" :src="newsData.cover_image" @click="previewImage(0)"></image> -->
|
|
||||||
|
|
||||||
<!-- 中间文章区域 -->
|
|
||||||
<view class="contentBox text-lg text-black margin-top-sm margin-tb-lg">
|
|
||||||
<mp-html :tag-style="tagStyle" :scroll-table="true" :content="newsData.contents" />
|
<mp-html :tag-style="tagStyle" :scroll-table="true" :content="newsData.contents" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 地图区域 -->
|
||||||
|
<view class="mapSection margin-top-lg">
|
||||||
|
<view class="mapTitle text-xl text-black text-bold margin-bottom-sm">
|
||||||
|
<text class="cuIcon-locationfill text-blue margin-right-xs"></text>
|
||||||
|
我们的位置
|
||||||
|
</view>
|
||||||
|
<view class="mapContainer">
|
||||||
|
<map
|
||||||
|
:latitude="mapData.latitude"
|
||||||
|
:longitude="mapData.longitude"
|
||||||
|
:markers="mapData.markers"
|
||||||
|
:scale="mapData.scale"
|
||||||
|
:show-location="true"
|
||||||
|
@markertap="handleMarkerTap"
|
||||||
|
@callouttap="handleCalloutTap"
|
||||||
|
class="map"
|
||||||
|
></map>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="cu-bar justify-left bg-white margin-top-sm">
|
<!-- <view class="cu-bar justify-left bg-white margin-top-sm">
|
||||||
@ -68,6 +79,29 @@
|
|||||||
table: 'border: 1px solid gray;border-collapse:collapse',
|
table: 'border: 1px solid gray;border-collapse:collapse',
|
||||||
th: 'border: 1px solid gray;',
|
th: 'border: 1px solid gray;',
|
||||||
td: 'border: 1px solid gray;'
|
td: 'border: 1px solid gray;'
|
||||||
|
},
|
||||||
|
// 地图数据
|
||||||
|
mapData: {
|
||||||
|
latitude: 34.621881, // 纬度
|
||||||
|
longitude: 112.436631, // 经度
|
||||||
|
scale: 17, // 地图缩放级别
|
||||||
|
markers: [{
|
||||||
|
id: 1,
|
||||||
|
latitude: 34.621881,
|
||||||
|
longitude: 112.436631,
|
||||||
|
title: '名扬体育学院',
|
||||||
|
width:15,
|
||||||
|
height:20,
|
||||||
|
callout: {
|
||||||
|
content: '名扬体育学院',
|
||||||
|
color: '#000000',
|
||||||
|
fontSize: 14,
|
||||||
|
borderRadius: 8,
|
||||||
|
bgColor: '#ffffff',
|
||||||
|
padding: 8,
|
||||||
|
display: 'ALWAYS'
|
||||||
|
}
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -88,6 +122,36 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 打开导航
|
||||||
|
openNavigation() {
|
||||||
|
uni.openLocation({
|
||||||
|
latitude: this.mapData.latitude,
|
||||||
|
longitude: this.mapData.longitude,
|
||||||
|
name: '名扬体育学院',
|
||||||
|
address: '名扬体育学院',
|
||||||
|
scale: 18,
|
||||||
|
success: () => {
|
||||||
|
console.log('成功打开地图导航');
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('打开地图导航失败', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '打开地图失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 处理地图标记点击事件
|
||||||
|
handleMarkerTap(e) {
|
||||||
|
console.log('标记点被点击', e);
|
||||||
|
this.openNavigation();
|
||||||
|
},
|
||||||
|
// 处理callout点击事件
|
||||||
|
handleCalloutTap(e) {
|
||||||
|
console.log('callout被点击', e);
|
||||||
|
this.openNavigation();
|
||||||
|
},
|
||||||
handleBack() {
|
handleBack() {
|
||||||
this.utils.goto('news-list')
|
this.utils.goto('news-list')
|
||||||
},
|
},
|
||||||
@ -121,8 +185,6 @@
|
|||||||
|
|
||||||
.container {
|
.container {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
width: 750rpx;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.solid {
|
.solid {
|
||||||
@ -140,4 +202,30 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 地图相关样式 */
|
||||||
|
.mapSection {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapTitle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapContainer {
|
||||||
|
width: 100%;
|
||||||
|
height: 400rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.map {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -42,7 +42,7 @@
|
|||||||
<view class="tn-tabbar-height"></view>
|
<view class="tn-tabbar-height"></view>
|
||||||
|
|
||||||
<!-- 底部导航栏组件 -->
|
<!-- 底部导航栏组件 -->
|
||||||
<tabbar :theme="tabbarStyle"></tabbar>
|
<!-- <tabbar :theme="tabbarStyle"></tabbar> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
:confirmCateContent="confirmCateContent" v-on:paySuccess="goTrain()" v-on:codeSuccess="goTrain()"
|
:confirmCateContent="confirmCateContent" v-on:paySuccess="goTrain()" v-on:codeSuccess="goTrain()"
|
||||||
v-on:cancel="closeDialog">
|
v-on:cancel="closeDialog">
|
||||||
</kz-cate-pay>
|
</kz-cate-pay>
|
||||||
|
<tabbar :theme="tabbarStyle"></tabbar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ const store = new Vuex.Store({
|
|||||||
state: {
|
state: {
|
||||||
// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
|
// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
|
||||||
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
||||||
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {name: '图鸟'},
|
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {name: '灵睿'},
|
||||||
|
|
||||||
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
|
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
|
||||||
// app版本
|
// app版本
|
||||||
|
Loading…
x
Reference in New Issue
Block a user