<template>
|
<!-- 联系我们 -->
|
<!-- -->
|
<view class="contact-container">
|
<!-- todo 图片 -->
|
<!-- <image :src="env.httpBaseUri + '/schoolgo/images/contact.png'"></image> -->
|
<image src="../../../static/imgs/footer/footer-brand-icon.png" mode="aspectFit" class="top-image"></image>
|
<view class="container">
|
<image @longpress="bc_code"
|
:src="codeimg"
|
mode="widthFix" class="code"></image>
|
<view class="info">
|
<view class="desc">长按保存客服二维码</view>
|
<!-- <view class="main">
|
王老师 18767626544
|
</view> -->
|
<view class="main">
|
19709902289
|
</view>
|
<view class="desc">客服电话</view>
|
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import env from '@/environments/index.js'
|
|
export default {
|
data() {
|
return {
|
codeimg:'https://xy-go.oss-cn-beijing.aliyuncs.com/7b/7b1be37bb6904696b1c7bb46dcff4b88go-kf.jpg'
|
}
|
},
|
methods: {
|
bc_code() {
|
let that = this;
|
//console.log('保存二维码')
|
uni.downloadFile({ //获得二维码的临时地址
|
url: this.codeimg,
|
success: (res) => {
|
//console.log('获取url',res)
|
if (res.statusCode == 200) {
|
uni.saveImageToPhotosAlbum({
|
filePath: res.tempFilePath, //传入临时地址
|
success() {
|
that.$message.showToast('保存成功') //封装的提示
|
},
|
fail() {
|
that.$message.showToast('保存失败')
|
}
|
})
|
}
|
},
|
fail() {
|
that.$message.showToast('保存失败')
|
}
|
})
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.contact-container {
|
position: relative;
|
|
.container {
|
position: absolute;
|
top: 278rpx;
|
// width: 694rpx;
|
left: 30rpx;
|
right: 30rpx;
|
min-height: 712rpx;
|
background: #FFFFFF;
|
border-radius: 20rpx;
|
|
.code {
|
margin-left: auto;
|
margin-right: auto;
|
margin-top: 54rpx;
|
width: 592rpx;
|
// height: 292rpx;
|
margin-bottom: 32rpx;
|
display: block;
|
}
|
|
.info {
|
text-align: center;
|
|
.desc {
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #666666;
|
line-height: 40rpx;
|
font-style: normal;
|
margin-bottom: 20rpx;
|
}
|
|
.main {
|
font-weight: 600;
|
font-size: 36rpx;
|
color: #000000;
|
margin-bottom: 6rpx;
|
}
|
}
|
}
|
|
.top-image {
|
width: 418rpx;
|
height: 228rpx;
|
position: absolute;
|
top: 76rpx;
|
left: 50%;
|
transform: translateX(-50%);
|
|
}
|
}
|
</style>
|