123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- <template>
- <view class="center">
- <view class="bg"><image class="imgBox" src="../../static/img/test_bg.png" mode="scaleToFill"></image></view>
- <view class="top flex">
- <image src="../../static/img/top_bg.png" mode="aspectFill"></image>
- <view class="china-font">武汉市江夏区<br>红十字会</view>
- <view class="english-font">RED CROSS SOCIETY OF JIANGXIA DISTRICT, WUHAN</view>
- <view class="fgx"></view>
- </view>
- <view class="buttom flex">
- <view class="item flex">
- <image class="home_img" src="../../static/img/test_home.png" mode="aspectFill"></image>
- <view class="text"><text>江夏区卫生健康局5楼<br>武汉市江夏区红十字会</text></view>
- </view>
- <view class="item flex">
- <image class="home_img" src="../../static/img/test_phone.png" mode="aspectFill"></image>
- <!-- #ifdef H5 -->
- <view class="text" @click="uni.makePhoneCall({phoneNumber: '027-87012677'})">027-87012677</view>
- <!-- #endif -->
- <!-- #ifndef H5 -->
- <view class="text" @click="uni.makePhoneCall({phoneNumber: '027-87012677'})"><text>87012677</text></view>
- <!-- #endif -->
- </view>
- <!-- <view class="item flex">
- <image class="home_img" src="../../static/img/test_mail.png" mode="aspectFill"></image>
- <view class="text"><text>jz_hszh@sina.com</text></view>
- </view> -->
- <view class="map">
- <image class="map-box" src="../../static/img/baseaddr.jpg"></image>
- <view class="map-font flex">
- <view class="font-left">武汉市江夏区红十字会</view>
- <view @click="navigation()" class="font-right"><image src="../../static/img/btn.png" mode="aspectFill"></image></view>
- </view>
- </view>
- <view class="qrcode">
- <image src="../../static/images/sharecard.jpg" mode="aspectFill"></image>
- </view>
- </view>
- <uni-popup ref="popup2" type="bottom" @click="close">
- <view class="popup_row">
- <view class="rows">
- <view class="rows-item" @click="toGaodeMap()">高德地图</view>
- <view class="rows-item" @click="toBaiduMap()">百度地图</view>
- <view class="rows-item" @click="toTengxunMap()">腾讯地图</view>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import uniPopup from '@/components/uni-popup/uni-popup.vue'
- import {
- weixindata,
- weixinlocation
- } from '@/utils/wxAuthorized.js';
- export default {
- components: {
- uniPopup
- },
- data() {
- return {
- longitude: '114.316738', //江夏市经度
- latitude: '30.353495', //江夏市纬度
- longitudeNew: '', //当前经度
- latitudeNew: '', //当前纬度
- addr: '江夏区红十字会'
- };
- },
- onLoad() {
- let obj = this;
- this.IndexShare();
- uni.getLocation({
- type: 'wgs84',
- success: res => {
- console.log('当前位置的经度:' + res.longitude);
- console.log('当前位置的纬度:' + res.latitude);
- obj.longitudeNew = res.longitude;
- obj.latitudeNew = res.latitude;
- },
- fail(e) {
- console.log('获取位置失败', e);
- }
- });
- },
- methods: {
- navigation() {
- this.$refs.popup2.open();
- // uni.openLocation({
- // latitude:+latitude,
- // longitude:+longitude,
- // address:address,
- // fail(e){
- // console.log(e);
- // }
- // })
-
- },
- toGaodeMap() {
- let latitude = this.latitude
- let longitude = this.longitude
- let address = this.addr
- console.log(latitude,longitude,address);
- window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`
- },
- toTengxunMap() {
- let latitude = this.latitude
- let longitude = this.longitude
- let address = this.addr
- window.location.href = `http://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude};addr:${address}`;
- },
- toBaiduMap() {
-
- window.location.href=
- `http://api.map.baidu.com/marker?location=30.35924,114.323157&title=江夏区红十字会&content=江夏区红十字会&output=html&src=webapp.baidu.openAPIdemo `
- },
- //分享
- IndexShare() {
- let obj = this;
- let item = {
- link: 'http://jxred.igxys.com/index/#/pages/share/card',// 分享链接
- imgUrl: '/index/static/img/002.png',
- desc: '电子名片分享',
- title: '江夏区红十字会',
- };
- console.log('分享加',item)
- weixindata(item);
- },
- }
- };
- </script>
- <style lang="scss">
- .center {
- border: 20rpx solid #e01a1c;
- // height: 100vh;
- min-height: 600px;
- }
- .flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- page {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- }
- .bg {
- width: 100%;
- height: 100%;
- position: absolute;
- left: 0;
- top: 0;
- padding: 20rpx;
- .imgBox {
- width: 100%;
- }
- }
- .top {
- flex-direction: column;
- width: 100%;
- image {
- width: 312rpx;
- height: 312rpx;
- border-color: linear-gradient(0deg, #e01a1c, #e01a1c);
- border-radius: 50%;
- margin-top: 85rpx;
- }
-
- .china-font {
- z-index: 0;
- width: 100%;
- font-size: 62rpx;
- padding-left: 20rpx;
- letter-spacing: 20rpx;
- font-family: Swei Fist Leg CJK SC;
- font-weight: bold;
- color: #e01a1c;
- line-height: 1;
- margin-top: 19rpx;
- text-align: center;
- }
- .english-font {
- margin-top: 14rpx;
- z-index: 0;
- letter-spacing: -1.9rpx;
- width: 100%;
- font-size: 20rpx;
- font-weight: bold;
- color: #e01a1c;
- text-align: center;
- }
- .fgx {
- margin-top: 25rpx;
- z-index: 0;
- width: 625rpx;
- border-bottom: 1rpx dashed #e01a1c;
- }
- }
- .buttom {
- flex-direction: column;
- .item {
- z-index: 0;
- margin: 0 auto;
- margin-top: 20rpx;
- width: 532rpx;
- border: 1rpx solid #e01a1c;
- border-radius: 38rpx;
- justify-content: flex-start;
-
- .home_img {
- height: 58rpx;
- width: 58rpx;
- margin: 8rpx 13rpx;
- flex-shrink: 0;
- }
-
- .text {
- display: inline-block;
- // padding-left: 75rpx;
- padding-right: 38rpx;
- letter-spacing: 1.2rpx;
- font-size: 25rpx;
- font-weight: bold;
- text-align: center;
- text-align: center;
- flex-grow: 1;
- .text1 {
- padding-left: 60rpx;
- }
- }
- }
- .map {
- margin-top: 25rpx;
- background-color: #ffffff;
- z-index: 0;
- width: 517rpx;
- border: 2rpx solid #ea3638;
- line-height: 0;
- .map-box {
- width: 513rpx;
- height: 286rpx;
- background: #ffffff;
- }
- .map-font {
- height: 90rpx;
- padding: 0 20rpx;
- justify-content: space-between;
- .font-left {
- font-family: PingFang SC;
- font-weight: bold;
- font-size: 29rpx;
- color: #333333;
- line-height: 1;
- }
- .font-right {
- border-radius: 10rpx;
- overflow: hidden;
- background-color: #1593ff;
- image {
- width: 120rpx;
- height: 45rpx;
- }
- }
- }
- }
- .qrcode {
- width: 517rpx;
- image {
- width: 517rpx;
- margin: 20rpx 0 36rpx;
- }
- }
- }
- .popup_row {
- width: 100%;
- height: 500rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx 20rpx 0 0;
- display: flex;
- justify-content: center;
- align-items: center;
-
- .rows {
- width: 100%;
- padding: 0 24rpx;
-
- .rows-item {
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- width: 100%;
- font-size: 32rpx;
- color: #303133;
- }
- }
- }
- </style>
|