123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <style lang='less' scoped>
- .footer {
- position: absolute;
- bottom: 68rpx;
- left: 50%;
- transform: translate(-50%);
- .footer-content {
- display: flex;
- justify-content: center;
- align-items: center;
- .text {
- font-family: PingFang SC;
- font-size: 28rpx;
- font-weight: 400;
- line-height: 44rpx;
- color: #8b949e;
- padding: 0 16rpx;
- }
- .footer-line {
- width: 40rpx;
- border: 2rpx;
- border: 2rpx solid #c4c9cf;
- }
- }
- .btn-box {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 272rpx;
- height: 88rpx;
- border-radius: 40px;
- background: #ffffff;
- .text {
- margin-left: 16rpx;
- font-family: PingFang SC;
- font-size: 28rpx;
- font-weight: 400;
- line-height: 44rpx;
- color: #626c78;
- }
- .imgSt {
- width: 48rpx;
- height: 48rpx;
- }
- }
- }
- </style>
- <!-- 个人中心 -->
- <template>
- <div class="footer">
- <div
- class="btn-box"
- v-if="IsShowPhone && !justText"
- @click="callPhone"
- >
- <image
- class="imgSt"
- src="{{ h5StaticPath }}/icon-phone.svg"
- />
- <span class="text">客服电话</span>
- </div>
- <div
- class="footer-content"
- v-else
- >
- <div class="footer-line"></div>
- <div class="text">小飒智控</div>
- <div class="footer-line"></div>
- </div>
- </div>
- </template>
- <script>
- import wepy from '@wepy/core'
- import config from '@/config'
- import { customerservice } from '../../api/common.js'
- wepy.component({
- name: 'Footer',
- props: {
- justText: {
- type: Boolean,
- default: false
- }
- },
- data: {
- h5StaticPath: config.h5StaticPath + '/page-personalCenter',
- IsShowPhone: true,
- phone: null
- },
- computed: {},
- ready() {
- this.getPhone()
- },
- methods: {
- callPhone() {
- this.$emit('callPhone', this.phone)
- },
- getPhone() {
- if (!this.justText) return
- customerservice().then(res => {
- let phone = null
- if (res.count) {
- phone = res.content[0].phone
- this.IsShowPhone = true
- } else {
- this.IsShowPhone = false
- }
- this.phone = phone
- this.$emit('custome-phone-show', phone)
- })
- }
- }
- })
- </script>
|