|
|
- <template>
- <view class="container">
- <!-- 顶部标题 -->
-
- <view class="header">
- <view class="header_info">
- <text class="header_text" :title="title">{{title}}</text>
- <text style="margin-right: 10rpx; font-size: 40rpx;">|</text>
- <view @click="change_text" class="header_change">
- <text >切换</text>
- <uni-icons type="right" size="30" color="#c2d4de" :size="1"></uni-icons>
- </view>
- </view>
- </view>
-
- <!-- 轮播图 -->
- <swiper class="swiper" indicator-dots autoplay interval="3000" duration="500" indicator-color="#ffffff" indicator-active-color="#707070">
- <swiper-item>
- <image class="swiper-image" src="/static/logo.png" mode="scaleToFill"></image>
- </swiper-item>
- <swiper-item>
- <image class="swiper-image" src="/static/logo.png" mode="scaleToFill"></image>
- </swiper-item>
- <swiper-item>
- <image class="swiper-image" src="/static/logo.png" mode="scaleToFill"></image>
- </swiper-item>
- </swiper>
- <!-- 公告 -->
- <view class = "swiper_ac_container">
- <uni-icons custom-prefix="iconfont" type="qungonggao"></uni-icons>
- <swiper class="swiper_ac" autoplay circular vertical='true'>
- <swiper-item v-for="(item, index) in announcements" :key="index">
- <view class="announcement-item">
- <text class="announcement-text" style="color: #397496;">{{ item.title }}</text>
- </view>
- </swiper-item>
- </swiper>
- </view>
-
- <view class="order_Entry_container" @click="orderEntry">
- <uni-icons ></uni-icons>
- <text style="color: #115881;font-weight: bold;margin-left: 20rpx;" >录入订单</text>
- <uni-icons class="order_Entry_end" type="right" :size="25" color="#306e91"></uni-icons>
- </view>
-
- <view v-if="isshow" class="show_container">
- <view class="isshow-header">
- <uni-icons class=" isshow-header-content-icon" type="search" :size="20"></uni-icons>
- <uni-easyinput class=" isshow-header-content-input" v-model="ServiceName" placeholder="请输入服务名称" focus="true" />
- <text class="isshow-header-content-text" @click="searchName">搜索</text>
- </view>
- <view class="isshow-content" >
- <text class="isshow-content-text" v-for="(item, index) in textcontent" :key="index" >{{item}}</text>
- </view>
- </view>
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- ServiceName:'',
- title:"北京汽车有限公司",
- isshow:false,
- announcements: [
- '公告1:欢迎使用车辆合同生成系统!',
- '公告2:请及时查看最新用户协议。',
- '公告3:隐私政策已更新,请知悉。'
- ],
- textcontent: [
- '公告1:欢迎使用车辆合同生成系统!',
- '公告2:请及时查看最新用户协议。',
- '公告3:隐私政策已更新,请知悉。',
- '公告1:欢迎使用车辆合同生成系统!',
- '公告2:请及时查看最新用户协议。',
- '公告3:隐私政策已更新,请知悉。'
- ],
- };
- },
- onLoad() {
- uni.request({
- url: 'https://gpt.aiym.run/contract/miniapp/notice/list', //仅为示例,并非真实接口地址。
- method:'GET',
- data: {
- },
- header: {
- 'X-Access-Token': 'hello' //自定义请求头信息
- },
- success: (res) => {
- console.log(res.data.result);
- this.announcements = res.data.result;
- }
- });
- },
- methods: {
- change_text(){
-
- if(this.isshow){
- this.isshow=false;
- }else{
- this.isshow=true;
- console.log('111')
- }
- },
- orderEntry(){
- console.log('111')
- },
- // 搜索城市名字
- searchName(){
-
- }
- }
- };
- </script>
-
- <style>
-
- .container {
- display: flex;
- flex-direction: column;
- height: 100vh;
- background-color: #f5f5f5;
- }
- /* 头部 */
- .header {
- padding: 20px;
- width: 100%;
- height: 15%;
- background-color: #044f7a;
- color: #fff;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .header_info{
- width: 100%;
- display: flex;
- flex-direction: row;
- align-items: center;
- color: #e0e9ef;
- }
-
- .header_text{
- width: 45%;
- white-space: nowrap;/*设置不换行*/
- overflow: hidden; /*设置隐藏*/
- text-overflow: ellipsis; /*设置隐藏部分为省略号*/
- }
- .header_change{
- width: 100%;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- /* 订单录入 */
- .order_Entry_container{
- width: 90%;
- height: 8%;
- background-color: #d9e5eb;
- border-radius: 10rpx;
- left:5%;
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-top: 10%;
- }
- .order_Entry_end{
- margin-left: auto;
- margin-right: 7%;
- }
- /* 轮播图 */
- .swiper {
- height: 30%;
- width: 100%;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
-
- .swiper-image {
- width: 100%;
- height: 100%;
- margin: 0 auto;
-
- }
-
- .form {
- flex: 1;
- padding: 20px;
- }
-
-
- .submit-button {
- width: 100%;
- height: 40px;
- background-color: #007aff;
- color: #fff;
- border: none;
- border-radius: 4px;
- font-size: 16px;
- }
-
- .footer {
- display: flex;
- justify-content: space-around;
- padding: 10px;
- background-color: #fff;
- border-top: 1px solid #ccc;
- }
-
- .nav-item {
- text-align: center;
- }
-
- .nav-item text {
- font-size: 14px;
- }
-
- .icon-image{
- width: 30%;
- height: 140px;
- margin: 0 auto;
- margin-top: 20px;
- }
-
- /* 轮播公告 */
- .swiper_ac_container{
- width: 100%;
- height: 6%;
- background-color: #e7eef2;
- display: flex;
- flex-direction: row;
- }
- .swiper_ac {
- width: 70%;
- height: 100%;
- }
-
- /* 轮播项 */
- .announcement-item {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- }
-
- /* 公告文字 */
- .announcement-text {
- font-size: 15px;
- color: #6996af;
- }
-
- /* 遮罩层 */
- .show_container{
- width: 60%;
- height: 36%;
- background-color: #ffffff;
- position: absolute;
- border-radius: 20rpx;
- /* border: 1px solid; */
- box-shadow: 0px 3rpx 0px #e4e4e4;
- left:5%;
- top: 13%;
- z-index:999;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .isshow-header{
- width: 90%;
- height: 30%;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: row;
- color: #3c7697;
- }
- .isshow-header-content-icon{
- width: 10%;
- height: 30%;
- }
- .isshow-header-content-input{
- width: 80%;
- height: 40%;
- margin: 0 20rpx 0 20rpx;
- border:none;
- outline:none;
- }
- .isshow-content{
- height: 70%;
- display: flex;
- flex-direction: column;
- align-items: center;
- overflow-y:scroll;
- }
- .isshow-content-text{
- color: #414141;
- height: 30rpx;
- width: 100%;
- line-height: 30rpx;
- margin: 20rpx 0 20rpx 0;
- font-size: 30rpx;
- }
- .isshow-content::-webkit-scrollbar {
- display: none;
- }
- </style>
|