调整首页
This commit is contained in:
@@ -125,10 +125,10 @@
|
||||
"selectedIconPath": "static/tabBar/tabBar_show_00.png",
|
||||
"text": "首页"
|
||||
}, {
|
||||
"pagePath": "pages/circle/index",
|
||||
"pagePath": "pages/uricacid/index",
|
||||
"iconPath": "static/tabBar/tabBar_icon_01.png",
|
||||
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
|
||||
"text": "病友记"
|
||||
"text": "记录"
|
||||
}, {
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/tabBar/tabBar_icon_02.png",
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- 领取试用装 -->
|
||||
<view class="banner">
|
||||
<swiper class="banner-swiper" interval="3000" indicator-dots indicator-color="#ffffff" indicator-active-color="#6d79ec" autoplay>
|
||||
<swiper-item v-for="(item,index) in adverts" :key="index" @click="JumpUrl(item.url)">
|
||||
<image class="banner-img" :src="item.cover" mode="aspectFill"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 水宣传图 -->
|
||||
<image class="banner" src="@/static/imgs/banner.png" mode="widthFix"></image>
|
||||
<!-- 快捷入口 -->
|
||||
<view class="tools">
|
||||
<view class="tools-box tools-flex">
|
||||
@@ -18,10 +12,10 @@
|
||||
</view>
|
||||
<image class="item-icon" src="@/static/icons/tool_icon_00.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="item item-sm" @click="$Router.push({name: 'Circle'})">
|
||||
<view class="item item-sm" @click="$Router.push({name: 'Indexdetails'})">
|
||||
<view class="item-content">
|
||||
<view class="title">病友记录</view>
|
||||
<view class="submit">交流治疗经验</view>
|
||||
<view class="title">锶源昆仑</view>
|
||||
<view class="submit">天然矿泉水</view>
|
||||
</view>
|
||||
<image class="item-icon" src="@/static/icons/tool_icon_01.png" mode="widthFix"></image>
|
||||
</view>
|
||||
@@ -29,28 +23,52 @@
|
||||
<view class="tools-box">
|
||||
<view class="item item-lg" @click="hasClick">
|
||||
<view class="item-content">
|
||||
<view class="title">尿酸记录</view>
|
||||
<swiper
|
||||
class="swiper-content"
|
||||
easing-function="easeInOutCubic"
|
||||
indicator-active-color="#4490ff"
|
||||
indicator-color="rgba(68,144,255, .2)"
|
||||
:indicator-dots="true"
|
||||
:autoplay="true"
|
||||
:vertical="true"
|
||||
:circular="true"
|
||||
>
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<view class="title">血糖</view>
|
||||
<view class="submit">最近一次记录</view>
|
||||
<view class="value"><text>{{ caseData ? caseData.quantity : 0 }}</text>μmol/L</view>
|
||||
<view class="value">
|
||||
<text>{{ caseData ? caseData.quantity : 0 }}</text>mmol/L
|
||||
</view>
|
||||
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
|
||||
</view>
|
||||
<image class="item-icon" src="@/static/icons/tool_icon_02.png" mode="widthFix"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<view class="title">血脂</view>
|
||||
<view class="submit">最近一次记录</view>
|
||||
<view class="value">
|
||||
<text>{{ caseData ? caseData.quantity : 0 }}</text>mmol/L
|
||||
</view>
|
||||
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<view class="title">血压</view>
|
||||
<view class="submit">最近一次记录</view>
|
||||
<view class="value">
|
||||
<text>{{ caseData ? caseData.quantity : 0 }}</text>mmHg
|
||||
</view>
|
||||
<view class="time">{{ caseData ? caseData.created_at : '暂无记录时间' }}</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- <image class="item-icon" src="@/static/icons/tool_icon_02.png" mode="widthFix"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 竞选推荐 -->
|
||||
<view class="news-title">精选推荐</view>
|
||||
<view class="news-item" v-for="(item, index) in articlesArr" :key="index" @click="$Router.push({name: 'Receive', params: { id: item.article_id }})">
|
||||
<view class="item-title">{{ item.title }}</view>
|
||||
<view class="item-cover">
|
||||
<image :src="item.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="item-time">
|
||||
<text>{{ item.clicks }} 次浏览</text>
|
||||
<text>{{ item.created_at }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 创建名片前提条件 -->
|
||||
<view class="authBack" v-if="authState"></view>
|
||||
<view class="authPop" v-if="authState">
|
||||
@@ -72,7 +90,6 @@
|
||||
data() {
|
||||
return {
|
||||
adverts : [], //轮播
|
||||
articlesArr: [], //文章列表
|
||||
goodsData : '', //商品
|
||||
caseData : '', //今日尿酸量
|
||||
authState : false,
|
||||
@@ -87,7 +104,6 @@
|
||||
// 首页数据
|
||||
mallData() {
|
||||
index().then(res => {
|
||||
this.articlesArr = res.articles
|
||||
this.caseData = res.last_case_log
|
||||
this.goodsData = res.goods
|
||||
this.hasCase = res.hasCase
|
||||
@@ -144,35 +160,15 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
overflow: hidden;
|
||||
background: #f3f4f6;
|
||||
min-height: calc(100vh - 60px);
|
||||
background: #ecf4f6;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.banner{
|
||||
position: relative;
|
||||
background: white;
|
||||
margin: $margin;
|
||||
padding-top: 45%;
|
||||
border-radius: $radius;
|
||||
box-shadow: 0 0 5rpx 5rpx rgba($color: $border-color, $alpha: .5);
|
||||
overflow: hidden;
|
||||
.banner-swiper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.banner-img {
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
// 快速入口
|
||||
.tools{
|
||||
@@ -245,6 +241,11 @@
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
.swiper-content{
|
||||
height: calc(171px - 60rpx);
|
||||
box-sizing: border-box;
|
||||
z-index: 9;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 精选推荐
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
<view class="orders">
|
||||
<!-- <view class="orders">
|
||||
<view class="title">我的订单<text @click="$Router.push({name: 'OrderIndex', params: { listType: 'paid' }})">全部订单</text></view>
|
||||
<view class="orders-flex">
|
||||
<!-- <view class="order-item">
|
||||
<view class="order-item">
|
||||
<image src="@/static/icons/order_01.png" mode="widthFix"></image>
|
||||
<view class="text-text">待付款</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="order-item" @click="$Router.push({name: 'OrderIndex', params: { listType: 'paid' }})">
|
||||
<image src="@/static/icons/order_02.png" mode="widthFix"></image>
|
||||
<view class="text-text">待发货</view>
|
||||
@@ -44,7 +44,7 @@
|
||||
<view class="text-text">已签收</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 操作按钮 -->
|
||||
<view class="tools">
|
||||
<view class="tools-item" v-if="!userData.hasCase" @click="$Router.push({name: 'Attestation', params: { hasCase: userData.hasCase }})">添加档案<u-icon name="arrow-right" size="14" color="#9d9d9d"></u-icon></view>
|
||||
|
||||
@@ -10,7 +10,7 @@ $text-color: #2a2a2a;
|
||||
$text-gray: #9d9d9d;
|
||||
|
||||
// 主色调
|
||||
$mian-color: #6a7df3;
|
||||
$mian-color: #4490ff;
|
||||
|
||||
// 辅助色
|
||||
$assist-color-1: #5dc791;
|
||||
|
||||
BIN
static/imgs/banner.png
Normal file
BIN
static/imgs/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
Reference in New Issue
Block a user