| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view>
- <uni-nav-bar title="门店" backgroundColor='#03803B' color="#fff" fixed statusBar
- @clickRight="inSetting">
- <block slot="right">
- <view>
- <image class="nav-right" src="@/static/images/home/setting.png" />
- </view>
- </block>
- </uni-nav-bar>
- <view class="home-card">
- <view class="home-card-title">
- 保险
- </view>
- <uni-grid :column="4" :showBorder="false">
- <uni-grid-item>
- <view class="grid-item-box" @click="allClick('轮胎保注册')">
- <view class="grid-item-box-img">
- <image style="width: 45rpx;height: 45rpx;" src="@/static/images/home/home (15).png" />
- </view>
- <view class="grid-item-box-text">
- 轮胎保
- </view>
- </view>
- </uni-grid-item>
- </uni-grid>
- </view>
- </view>
- </template>
- <script>
- import {
- getAddress
- } from '@/api/home/index.js'
- export default {
- data() {
- return {
- }
- },
- onLoad() {
- if (uni.getStorageSync('accessToken')) {
- this.getAddressdata()
- }
- },
- methods: {
- inSetting() {
- uni.navigateTo({
- url: '/pages/home/setting'
- });
- },
- getAddressdata() {
- if (!uni.getStorageSync("addressData")) {
- getAddress().then(res => {
- uni.setStorageSync('addressData', JSON.stringify(res.data));
- })
- }
- },
- allClick(name) {
- if (name == '轮胎保注册') {
- uni.navigateTo({
- url: '/pages/home/insurance/index'
- });
- }
- if (name == '轮胎保理赔') {
- uni.navigateTo({
- url: '/pages/home/claim/index'
- });
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .nav-right {
- width: 32rpx;
- height: 30rpx;
- }
- .home-card {
- margin-top: 30rpx;
- background: #FFFFFF;
- padding: 40rpx 40rpx 10rpx 40rpx;
- .home-card-title {
- font-weight: 500;
- font-size: 34rpx;
- color: #0F0D0D;
- margin-left: 20rpx;
- margin-bottom: 10rpx;
- }
- .grid-item-box {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .uni-grid-item__box{
- justify-content: center;
- }
- .grid-item-box-img {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100rpx;
- height: 100rpx;
- }
- .grid-item-box-text {
- width: 100rpx;
- text-align: center;
- font-weight: 500;
- font-size: 26rpx;
- color: #6A6A6A;
- }
- }
- }
- </style>
|