| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917 |
- <template>
- <view class="content">
- <view class="">
- <loading isFullScreen color="#2f7ff5" :active="isloading" text="开门中..."></loading>
- <u-navbar :is-back="false" title=" ">
- <view class="slot-wrap">
- <view v-if="$isEmpty(plot)" class="padding-left-20" @click="$u.toast('暂无小区信息')">
- <u-icon name="map-fill" color="#2f7ff5" size="34"></u-icon>
- <text class="padding-left-sm " style="font-size: 34rpx;">暂无小区信息</text>
- </view>
- <picker v-else @change="typeChange" :value="plotIndex" :range="plotArray">
- <view class="padding-left-20 ">
- <u-icon name="map-fill" color="#2f7ff5" size="34"></u-icon>
- <text class="padding-left-sm " style="font-size: 34rpx;">{{plot}}</text>
- </view>
- </picker>
- </view>
- </u-navbar>
- <!-- 头图 -->
- <swiper class="screen-swiper square-dot " :indicator-dots="true" :circular="true"
- :autoplay="true" interval="5000" duration="500">
- <swiper-item v-for="(item,index) in adList" :key="index">
- <image v-if="item.videoType==0" :src="item.videoUri" mode="aspectFill" ></image>
- <video v-if="item.videoType==1" :src="item.videoUri" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover"></video>
- </swiper-item>
- </swiper>
- <view class="">
- <view class="bg-white" style="height: 10rpx;"></view>
- <hotConsult @onTap="jump('../notice/notice')" @detailTap="goNoticeDetail" :swiperTexts="noticeList"></hotConsult>
- </view>
-
- <view style="background-color: #FFFFFF;">
- <view style="padding: 30rpx 30rpx 0 30rpx;">
- <text class="text-bold text-lg">智慧社区</text>
- </view>
- <view style="padding: 40rpx 10rpx 0rpx;" class="cu-list grid col-5 no-border" >
- <view class="cu-item" :class="item.index==5?'img1-lg':''" @click="top(item.index)" v-for="(item,index) in gridList" :key="index">
- <block v-if="item.index==5">
- <view class="grid-icon" >
- <image style="width: 88rpx;height: 88rpx;" :src="modalShow?'../../static/home/open4.png':'../../static/home/open4.png'"/>
- </view>
- <text style="color: #333333;font-size: 30rpx;font-weight: 800;" >{{item.title}}</text>
- </block>
- <block v-else>
- <view class="grid-icon" >
- <image style="width: 48rpx;height: 48rpx;" :src="item.icon"/>
- </view>
- <text style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
- </block>
- <view class="cu-tag bg-red badge" v-if="item.badge>0">{{item.badge}}</view>
- </view>
- </view>
-
- <!-- 设备列表 -->
- <view v-if="modalShow" class="flex justify-around margin-top-10" >
- <view @click="open(item.id)" v-for="(item,index) in device_list" :key="index" style="flex-direction: column;" class="flex justify-center align-center">
- <image style="width: 60rpx;height: 60rpx;" src="/static/kaimen.png"/>
- <view class="text-center padding-top-20 text-cut-1" style="font-size: 24rpx;">
- {{item.name}}
- </view>
- </view>
- </view>
-
- </view>
- <view class="nav-list bg-white padding-top-20" >
- <view hover-class="none"
- @click="top(item.index)"
- class="nav-li light" navigateTo :style="{backgroundColor:item.color}"
- v-for="(item,index) in elements" :key="index">
- <view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
- <view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
- <image :src="item.icon" mode=""></image>
- </view>
- </view>
- </view>
- <view class="bg-white">
- <image src="/static/common/banner.png" style="width: 100%;" mode="widthFix"></image>
- </view>
- <view v-if="!this.$isEmpty(goodsList)">
- <view class="tj-title">
- <view class="">
- <text class="text-lg text-bold">为您推荐</text>
- <text class="sub-title">有料</text>
- <text class="sub-title">好物</text>
- <text class="sub-title">有优惠</text>
- </view>
- <view class="sub-title" style="color: #969696;padding-top: 8rpx;font-size: 24rpx;" @click="jump('/pages/life/life','type')">
- <text >查看更多></text>
- </view>
- </view>
- <view>
- <goods :goodsList="goodsList"></goods>
- </view>
- </view>
- <view style="height: 80rpx;">
- <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
- </view>
-
- </view>
- </template>
- <script>
- import loading from "@/comps/loading/loading.vue"
- import hotConsult from "@/comps/hot-consult/hot-consult.vue"
- import goods from "@/comps/goods/goods.vue"
- var app = getApp();
- let that;
- export default {
- components:{
- goods,hotConsult,loading
- },
- data() {
- return {
- isloading:false,
- //开门设备列表
- device_list: [],
- background: {
- backgroundColor: '#e54d42',
- },
- noticeList:[],
-
- modalShow:false,
-
- userInfo:{},
- jsCode:'',
- openid:'',
- sessionKey:'',
- isFirst:false,
-
- goodsList:[],
- isIPX:false,
- //广告轮播图
- swiperIndex: 0,
- plot: null,
- plotArray: [],
- //小区名字
- plotIndex: 0,
- residentialIdList: [] ,//小区id
-
- adList: [
- {
- 'videoType': 0,
- 'videoUri': "http://139.9.103.171:1888/miniofile/app/banner.jpg"
- },
- ],
- elements: [{
- title: '防疫登记',
- name: '在线防疫登记',
- color: '#e3f5ff',
- icon: '../../static/home/fanyi1.png',
- index:6
- },
- {
- title: '健康码',
- name: '通行防疫码',
- color: '#e5eef9',
- icon: '../../static/home/health.png',
- index:9
- },
-
- {
- title: '物业报修',
- name: '在线物业报修',
- color: '#ffefef',
- icon: '../../static/home/baoxiu1.png',
- index:8
- },
- {
- title: '物业缴费',
- name: '在线物业缴费',
- color: '#e9f9f3',
- icon: '../../static/home/jiaofei.png',
- index:7
- },
- // {
- // title: '更多服务',
- // name: '更多智慧服务',
- // color: '#eeeeee',
- // icon: '../../static/home/more.png',
- // index:99
- // }
- ],
- gridList:[
- {
- icon:'../../static/home/fangwu.png',
- title:"我的房屋",
- badge:0,
- index:1
- },
- {
- icon:'../../static/home/renyuan.png',
- title:"家庭成员",
- badge:0,
- index:2
- },
- {
- icon:'../../static/home/open4.png',
- title:"开门",
- badge:0,
- index:5
- },
- {
- icon:'../../static/home/cheliang.png',
- title:"我的车辆",
- badge:0,
- index:3
- },
- {
- icon:'../../static/home/fangke1.png',
- title:"访客授权",
- badge:this.vuex_auth_audit_count,
- index:4
- },
-
- ]
- }
- },
- onShow() {
- // this.fetchNoticeList()
- //获取访客授权待审核的数量
- if (this.canReset) this.fetchAuthRecordNum()
- this.canReset=true
-
- //获取设备列表
- this.getAuthDevice()
-
- //处理进入小程序的不同场景
- this.execParam();
- this.loadData()
- //每次打开此页面都把商品数组打乱
- this.$u.randomArray(this.goodsList)
- if(this.isFirst){
- this.isFirst=false
- }else{
- this.getRoomByMemberId()
- }
- },
- onLoad(options) {
- that=this
- //处理进入小程序的场景
- this.handelShare(options)
- this.isFirst=true
- //拉取后台用户信息
- this.getOpenId();
- this.isIPX=uni.getStorageSync('isIPX')
- //获取轮播列表
- this.getAdList();
- //获取推荐商品列表
- this.fetchGoodsList()
- },
- methods: {
- fetchAuthRecordNum(){
- try{
- let memberId=app.globalData.member.id
- if (!this.$isEmpty(memberId)) {
- let params={
- member_id:memberId,
- size:99,
- auditStatus:0
- }
- let operation='guestRecord/getListByMemberId'
- getApp().globalData.postRequest(params,operation,function(res){
- let length=res.data.list.length
- that.$u.vuex('vuex_auth_audit_count',length)
- that.gridList.forEach(item=>{
- if (item.index==4) {
- item.badge=length
- }
- })
- })
- }
- }catch(e){
-
- }
- },
- open(id){
- //直接开门
- that.openDoor(id)
- //进度条加载模式开门
- // this.isloading=true
- // let that=this
- // setTimeout(()=>{
- // that.openDoor(id)
- // },500)
- },
- //立即开门
- openDoor: function (id) {
- let device_id=id
- let that = this;
- let params = {};
- params['member_id'] = app.globalData.member.id;
- params['device_id'] = device_id;
- let operation = 'member/openDoor';
- app.globalData.postRequest(params, operation, function (res) {
- that.isloading=false
- app.globalData.oneFailHint(res.data.result_msg,function(){
- });
- });
- },
- getAuthDevice: function () {
- let that = this;
- let params = {};
- params['member_id'] = app.globalData.member.id;
- let operation = 'member/getAuthDeviceByMemberId';
- app.globalData.postRequest(params, operation, function (res) {
- console.info("设备列表:" ,res.data); //获取成功
- if (res.data.result_code == 1) {
- let list = [];
- if (uni.getStorageSync('plotName')) {
- res.data.list.map(item => {
- if (item.residentialId.indexOf(uni.getStorageSync('residentialId'))>=0) {
- list.push(item);
- }
- });
- } else {
- console.log(res.data.list)
- list = res.data.list;
- }
- console.log(list)
- that.setData({
- device_list: list
- });
- app.globalData.device_list = list;
- }
- });
- },
- async loadData(options){
- //进入小程序时进行游客登陆,
- //以免直接进入商品详情时会提示用户未授权
- await this.$nextTick(function(){
- this.touristLogin()
- })
- },
- getParam(e){
- // 用来保存所有的属性名称和值
- let param = "";
- // 开始遍历
- for(let p in e){
- // 方法
- if(typeof(e[p])!="function" && p != 'type'){
- // p 为属性名称,e[p]为对应属性的值
- param += (param.length > 1 ? '&' : '') + p + "=" + e[p];
- }
- }
- // 最后显示所有的属性
- return param;
- },
- execParam(){
- let _this = this;
- if(this.e != null){
- setTimeout(function(){
- if(_this.e == null) return;
- if(_this.e.type == "share"){
- let path = _this.e.path == null || _this.e.path.length <= 0 ? 'pagesM/pages/goods_des' : '/' + _this.e.path;
- let param = _this.getParam(_this.e);
- let url = `${path}?${param}`;
- console.error("url = " + url);
- _this.e = null;
- uni.navigateTo({url: url});
- }
- }, 1000);
- }
- },
- handelShare(options){
- //二维码扫描链接 start
- if (!this.$isEmpty(options.scene)) {
- let scene=decodeURIComponent(options.scene).split(",")
- //从小程序二维码进入
- console.log(scene);
- let path="/pagesM/pages/goods_des"
- let params= "?id="+scene[0]+"&storeId="+scene[1]
- if (!this.$isEmpty(scene[2])) {
- params=params+"&inviteCode="+scene[2]
- }
- let url=path+params
- console.log(url);
- uni.redirectTo({
- url:url
- })
- }
- //二维码扫描链接 end
-
- //点击转发卡片进入的小程序
- this.execParam();
-
- wx.showShareMenu({
- withShareTicket: true
- })
- },
- tab(index){
- console.log(index);
- },
- jump(url,type){
- if(!this.$isEmpty(type)){
- uni.switchTab({
- url:url
- })
- }else{
- uni.navigateTo({
- url:url
- })
- }
- },
- /**
- * 获取商品推荐列表
- */
- async fetchGoodsList(){
- let indexProduct = await this.$api.storeHomeProducts();
- console.log(indexProduct,"/****");
- this.goodsList=indexProduct[0].products
- this.$u.randomArray(this.goodsList)
- },
- //轮播圆点
- bindchange(e) {
- this.setData({
- swiperIndex: e.detail.current
- });
- },
- //改变小区
- typeChange: function (e) {
- let _this = this;
- Promise.all([_this.getRoomByMemberId()]).then(result => {
- let value = _this.plotArray[e.detail.value];
- let residentialId = _this.residentialIdList[e.detail.value];
- _this.fetchNoticeList(residentialId);
- let residentialList= uni.getStorageSync('residentialList')
-
- uni.setStorageSync("personTel", residentialList[e.detail.value].personTel);
- uni.setStorageSync("plotName", value);
- uni.setStorageSync("residentialId", residentialId);
- uni.setStorageSync('doorNeedAudit',residentialList[e.detail.value].doorNeedAudit)
-
-
- _this.setData({
- plotIndex: e.detail.value,
- plot: value
- });
-
- //更新设备列表
- _this.getAuthDevice()
-
- }).catch(error => {
- console.log(error);
- });
- },
- //一键开门
- goOpen: function () {
- var that = this;
- var member = app.globalData.member;
- var anyHousePass = app.globalData.anyHousePass; //会员认证状态:{ 0:未认证,1:待审审核,2:已认证 }
- if (member == null) {
- //未注册
- app.globalData.footaddmore();
- return;
- } else if (member.state == 0 && !anyHousePass) {
- //未认证
- app.globalData.choosePlot();
- return;
- } else if (member.state == 1 && !anyHousePass) {
- //待审核
- that.pending();
- return;
- } else if (member.state == 2 || anyHousePass) {
- //已认证
- uni.navigateTo({
- url: '/pages/oneButton/oneButton'
- });
- }
- },
- /**
- * 获取轮播图列表
- */
- getAdList: function () {
- let that = this;
- let params = {};
- let operation = 'adPushApp/getList';
- app.globalData.postRequest(params, operation, function (res) {
- //获取成功
- if (res.data.result_code == 1) {
- let adList = res.data.list;
- if (adList && adList.length > 0) {
- that.setData({
- adList: adList
- });
- }
- }
- });
- },
- fetchNoticeList(id){
- let that=this
- let operation='notice/noticeList'
- let params = {}
- params.residentialId = id;
- app.globalData.postRequest(params, operation, function (res) {
- //获取成功
- that.noticeList=res.data.noticeList
- });
- },
- //获取openid
- getOpenId: function () {
- var that = this;
- uni.login({
- success: res => {
- let params = {};
- params['js_code'] = res.code;
- params['name'] = 'community';
- that.jsCode=res.code
- let operation = 'miniprogram/getOpenid'; //发起请求
- app.globalData.postRequest(params, operation, function (res) {
- //获取成功
- if (res.data.result_code == 1) {
- console.log("获取openid成功")
- //openid存入缓存
- uni.setStorageSync("openid", res.data.openid);
- uni.setStorageSync("appletType", res.data.appletType);
- that.$u.vuex('vuex_appletType',res.data.appletType)
- that.openid=res.data.openid
- that.sessionKey=res.data.sessionKey
- that.getMemberByOpenid(res.data.openid);
- } else {
- app.globalData.oneFailHint(res.data.result_msg);
- }
- });
- }
- });
- },
- //根据openid获取用户信息
- async getMemberByOpenid(openid) {
- let _this = this;
- let params = {};
- params['openid'] = openid;
- let operation = 'miniprogram/getMemberByOpenid';
- let res=await app.globalData.postRequestAsync(params, operation)
- if (res.data.result_code == 1) {
- app.globalData.member = res.data.member;
- uni.setStorageSync("myPhone", res.data.member.tel);
- that.$u.vuex('vuex_member',res.data.member)
- app.globalData.anyHousePass = res.data.anyHousePass; //获取房屋列表
- _this.getRoomByMemberId();
- _this.getAuthDevice()
- _this.fetchAuthRecordNum()
- }
- },
- /**
- * 游客登陆
- */
- async touristLogin() {
- // 检查是否登录
- this.isLogin = this.$auth.isAuth
- console.log(this.$auth.isAuth);
- if (!this.$auth.isAuth) { // 就算是游客,也重新登录
- console.log('需要使用游客身份,执行游客登录!')
- let resp = await this.$api.touristLogin()
- console.log("Resp",resp);
- let userType = this.$global.userType.tourist
- this.$auth.login(userType, resp.sessionId, resp.userId, resp)
- console.log('游客登录成功!', resp)
- } else {
- console.log(`已登录!`)
- }
- },
- //根据会员id获取我的房屋列表
- getRoomByMemberId: function () {
- let that = this;
- let params = {};
- params['member_id'] = app.globalData.member.id;
- let operation = 'estate/getRoomByMemberId';
- app.globalData.postRequest(params, operation, function (res) {
- console.info("获取成功" , res.data); //获取成功
- let list = [];
- let doorNeedAuditList=[]
- let residentialIdList = [];
- let personTelList=[]
-
- if (res.data.result_code == 1) {
- that.fetchNoticeList(res.data.list[0].residentialId);
- app.globalData.userId=res.data.list[0].userId
- res.data.list.map(item => {
- if (list.indexOf(item.residentialName) == -1) {
- list.push(item.residentialName);
- doorNeedAuditList.push(item.doorNeedAudit)
- residentialIdList.push(item.residentialId);
- personTelList.push(item.personTel)
- }
- });
- if (list.length < 1) {
- uni.removeStorageSync("personTel");
- uni.removeStorageSync("plotName");
- uni.removeStorageSync("residentialId");
- uni.removeStorageSync("doorNeedAudit");
- } else {
- //获取本地储存的当前所在小区
- let plot = that.plot;
- if (uni.getStorageSync('plotName')) {
- plot = uni.getStorageSync('plotName');
- that.setData({
- plot: plot
- });
- } else {
- uni.setStorageSync("personTel", personTelList[0]);
- uni.setStorageSync("doorNeedAudit", doorNeedAuditList[0]);
- uni.setStorageSync("plotName", list[0]);
- uni.setStorageSync("residentialId", residentialIdList[0]);
- that.setData({
- plot: list[0]
- });
- }
- }
- let residentialList=[]
- list.forEach((item,index)=>{
- let tmp={}
- tmp.residentialName=item
- tmp.personTel=personTelList[index]
- tmp.residentialId=residentialIdList[index]
- tmp.doorNeedAudit=doorNeedAuditList[index]
- tmp.estateTel=doorNeedAuditList[index]
- residentialList.push(tmp)
- })
- uni.setStorage({
- key:"residentialList",
- data:residentialList
- })
-
- //为 小区 picker 设置默认项
- let defaultPlotId=uni.getStorageSync("residentialId")
- if (!that.$isEmpty(defaultPlotId)) {
- that.plotIndex=residentialIdList.indexOf(defaultPlotId)
- }
-
- that.setData({
- plotArray: list,
- residentialIdList: residentialIdList
- });
- }
- });
- },
- /**
- * 跳转
- * @param {Object} index 当前项的index属性,而不是当前项的下标
- */
- top: function (index) {
- if (index==99) {
- //查看更多
- uni.navigateTo({
- url:"../tool-list/tool-list"
- })
- return
- }
- if (index==9) {
- uni.navigateToMiniProgram({
- appId:'wx2eec5fb00157a603',
- })
- return
- }
-
- var that = this;
- var member = app.globalData.member;
- var anyHousePass = app.globalData.anyHousePass; //会员认证状态:{ 0:未认证,1:待审审核,2:已认证 }
- if (this.$isEmpty(member)) {
- //去注册
- uni.navigateTo({
- url:"../empty/empty"
- })
- return
- } else if (member.state == 0 && !anyHousePass) {
- //去认证
- uni.navigateTo({
- url:"../empty/empty?type=2"
- })
- return
- } else if (member.state == 1 && !anyHousePass) {
- //待审核
- that.pending();
- } else if (member.state == 2 || anyHousePass) {
- //已认证
- //获取页面传过来的值
- var url;
- switch (index) {
- case 1:
- //我的家人
- url='/pages/myhome/myhome';
- break;
- case 2:
- //家庭成员
- url = '/pages/myFamily/myFamily';
- break;
- case 3:
- //我的车辆
- url = "/pages/myCar/myCar";
- break;
- case 4:
- //访客授权
- url = '/pages/authorize_record/authorize_record';
- break;
- case 5:
- if (this.$isEmpty(this.device_list)) {
- uni.showToast({
- title:"暂无设备",
- icon:"none"
- })
- return
- }
- if (this.device_list.length==1) {
- this.open(this.device_list[0].id)
- }else{
- this.modalShow=!this.modalShow
- }
- break;
- case 6:
- //防疫登记
- url = '/pages/tool-list/epidemic-pass/epidemic-pass';
- break;
- case 7:
- //物业缴费
- uni.showToast({
- title:"待开发",
- icon:"none"
- })
- break;
- case 8:
- //物业报修
- url = '/pages/services/property/property';
- break;
- case 9:
-
- // url = '/pages/healthCode/healthCode';
- break;
- default:
- url = "";
- break;
- }
- if (url != '') {
- uni.navigateTo({
- url: url,
- success: function (res) {
- that.setData({
- firstJump: false
- });
- }
- });
- }
- }
- },
- openBluetoothAdapter: function () {
- uni.openBluetoothAdapter({
- success: function (res) {
- uni.navigateTo({
- url: "/pages/bluetooth/bluetooth"
- });
- },
- fail: function (res) {
- uni.showModal({
- content: '请开启手机蓝牙后再试'
- });
- }
- });
- },
- //用户信息待审核中
- pending: function () {
- var openid = uni.getStorageSync("openid");
- let params = {};
- params['openid'] = openid;
- let operation = 'miniprogram/getMemberByOpenid';
- app.globalData.postRequest(params, operation, function (res) {
- //获取成功
- if (res.data.result_code == 1) {
- let member = res.data.member; //待审核
- if (member.state == 1 && !res.data.anyHousePass) {
- app.globalData.oneFailHint('亲,你的信息正在审核,请耐心等待');
- } else if (member.state == 2) {
- app.globalData.oneFailHint('亲,你的信息已审核通过');
- that.getRoomByMemberId()
- }
- app.globalData.member = member;
- app.globalData.anyHousePass = res.data.anyHousePass;
- } else {
- app.globalData.oneFailHint(res.data.result_msg);
- }
- });
- },
- goNoticeDetail(item){
- app.globalData.noticeDetail=item
- uni.navigateTo({
- url:"../notice/detail",
- })
- }
- }
- }
- </script>
- <style lang="scss">
-
- .img1-lg{
- margin-top: -80rpx;
- }
-
- .location_item{
- background-color: #FFFFFF;
- display: flex;
- padding: 30rpx;
- font-size: 32rpx;
- }
- .active {
- transform: none;
- transition: all 0.2s ease-in 0s;
- }
-
- .tj-title{
- display: flex;
- justify-content: space-between;
- padding: 30rpx;
- background-color: #FFFFFF;
- font-size: 32rpx;
- .sub-title{
- font-size: 26rpx;
- padding-left: 16rpx;
- color: #c7c7c7;
- }
- }
-
- .nav-list {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- }
- .nav-li {
- padding: 30upx 20rpx;
- border-radius: 12upx;
- width: 40%;
- margin: 20rpx 1% 10upx;
- // background-image: url(/static/unicorn-base/index/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
- background-size: cover;
- background-position: center;
- position: relative;
- z-index: 1;
- }
-
- .nav-li::after {
- content: "";
- position: absolute;
- z-index: -1;
- background-color: inherit;
- width: 100%;
- height: 100%;
- left: 0;
- bottom: -10%;
- border-radius: 10upx;
- opacity: 0.2;
- transform: scale(0.9, 0.9);
- }
-
- .nav-li.cur {
- color: #fff;
- background: rgb(94, 185, 94);
- box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
- }
-
- .nav-title {
- font-size: 32upx;
- font-weight: 300;
- }
-
- .nav-title::first-letter {
- font-size: 40upx;
- margin-right: 4upx;
- }
-
- .nav-name {
- font-size: 28upx;
- text-transform: Capitalize;
- margin-top: 20upx;
- position: relative;
- }
-
- .nav-name::before {
- content: "";
- position: absolute;
- display: block;
- width: 40upx;
- height: 6upx;
- background: #fff;
- bottom: 0;
- right: 0;
- opacity: 0.5;
- }
-
- .nav-name::after {
- content: "";
- position: absolute;
- display: block;
- width: 100upx;
- height: 1px;
- background: #fff;
- bottom: 0;
- right: 40upx;
- opacity: 0.3;
- }
-
- .nav-name::first-letter {
- font-weight: bold;
- font-size: 36upx;
- margin-right: 1px;
- }
-
- .nav-li image {
- position: absolute;
- right: 30upx;
- top: 30upx;
- font-size: 52upx;
- width: 70upx;
- height: 70upx;
- text-align: center;
- line-height: 60upx;
- }
-
- </style>
|