card.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <template>
  2. <view class="center">
  3. <view class="bg"><image class="imgBox" src="../../static/img/sharebase.png" mode="widthFix"></image></view>
  4. <!-- <view class="top flex">
  5. <image src="../../static/img/top_bg.png" mode="aspectFill"></image>
  6. <view class="china-font">温岭市红十字会</view>
  7. <view class="english-font">Red Cross Society of Wenling Branch</view>
  8. <view class="fgx"></view>
  9. </view> -->
  10. <view class="buttom flex">
  11. <view class="item flex">
  12. <image class="home_img" src="../../static/img/test_home.png" mode="aspectFill"></image>
  13. <view class="text"><text>温岭市人民东路258号<br/>市行政中心5楼</text></view>
  14. </view>
  15. <view class="item flex">
  16. <image class="home_img" src="../../static/img/test_phone.png" mode="aspectFill"></image>
  17. <!-- #ifdef H5 -->
  18. <view class="text"><text class="text1">0576-86128533</text></view>
  19. <!-- #endif -->
  20. <!-- #ifndef H5 -->
  21. <view class="text" @click="uni.makePhoneCall({phoneNumber: '0576-86128533'})"><text>0576-86128533</text></view>
  22. <!-- #endif -->
  23. </view>
  24. <view class="item flex">
  25. <image class="home_img" src="../../static/img/test_mail.png" mode="aspectFill"></image>
  26. <view class="text"><text>wlhszh@163.com</text></view>
  27. </view>
  28. <view class="map">
  29. <!-- <image class="map-box" src="../../static/icon/erweima.jpg"></image> -->
  30. <map class="map-box" id="map" :markers="markers" :scale="scale" :latitude="latitude"
  31. :longitude="longitude" ref="map" :show-location="false"></map>
  32. <view class="map-font flex">
  33. <view class="font-left">温岭市红十字会</view>
  34. <view @click="navigation()" class="font-right"><image src="../../static/img/btn.png" mode="aspectFill"></image></view>
  35. </view>
  36. </view>
  37. </view>
  38. <uni-popup ref="popup2" type="bottom" @click="close">
  39. <view class="popup_row">
  40. <view class="rows">
  41. <view class="rows-item" @click="toGaodeMap()">高德地图</view>
  42. <view class="rows-item" @click="toBaiduMap()">百度地图</view>
  43. <view class="rows-item" @click="toTengxunMap()">腾讯地图</view>
  44. </view>
  45. </view>
  46. </uni-popup>
  47. </view>
  48. </template>
  49. <script>
  50. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  51. import {
  52. weixindata,
  53. weixinlocation
  54. } from '@/utils/wxAuthorized.js';
  55. import {
  56. mapState,
  57. mapMutations
  58. } from 'vuex';
  59. export default {
  60. components: {
  61. uniPopup
  62. },
  63. data() {
  64. return {
  65. scale: '12',
  66. longitude: '121.385297', //神农架林区经度,,
  67. latitude: '28.373233', //神农架林区纬度
  68. addr: '温岭市红十字会',
  69. markers: [{
  70. id: '226',
  71. title: '温岭市红十字会',
  72. iconPath: '/static/img/img10.png',
  73. width: '28',
  74. height: '28',
  75. longitude: '121.385297', //神农架林区经度,,
  76. latitude: '28.373233', //神农架林区纬度
  77. }]
  78. };
  79. },
  80. computed: {
  81. ...mapState(['baseURL'])
  82. },
  83. onLoad() {
  84. let obj = this;
  85. this.IndexShare();
  86. },
  87. methods: {
  88. navigation() {
  89. this.$refs.popup2.open();
  90. },
  91. toGaodeMap() {
  92. let latitude = this.latitude
  93. let longitude = this.longitude
  94. let address = this.addr
  95. console.log(latitude,longitude,address);
  96. window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`
  97. },
  98. toTengxunMap() {
  99. let latitude = this.latitude
  100. let longitude = this.longitude
  101. let address = this.addr
  102. let title = '温岭市红十字会'
  103. window.location.href = `http://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude};title:${address};addr:${address}`;
  104. },
  105. toBaiduMap() {
  106. window.location.href=
  107. `http://api.map.baidu.com/marker?location=28.378884,121.391886&title=温岭市红红十字会&content=温岭市红红十字会&output=html&src=webapp.baidu.openAPIdemo `
  108. },
  109. //分享
  110. IndexShare() {
  111. let obj = this;
  112. let item = {
  113. link: obj.baseURL + '/index/#/pages/share/card',// 分享链接
  114. imgUrl: obj.baseURL + '/index/static/img/002.png',
  115. desc: '电子名片分享',
  116. title: '温岭市红十字会',
  117. };
  118. console.log('分享加',item)
  119. weixindata(item);
  120. },
  121. }
  122. };
  123. </script>
  124. <style lang="scss">
  125. .center {
  126. border: 20rpx solid #e01a1c;
  127. min-height: 100%;
  128. background-color: #fff;
  129. // min-height: 600px;
  130. }
  131. .flex {
  132. display: flex;
  133. justify-content: space-between;
  134. align-items: center;
  135. }
  136. page {
  137. width: 100%;
  138. height: 100%;
  139. margin: 0;
  140. padding: 0;
  141. }
  142. .bg {
  143. border: 20rpx solid #e01a1c;
  144. background-color: #fff;
  145. width: 750rpx;
  146. height: 100%;
  147. position: absolute;
  148. left: 0;
  149. top: 0;
  150. // padding: 20rpx;
  151. .imgBox {
  152. width: 100%;
  153. }
  154. }
  155. .top {
  156. flex-direction: column;
  157. width: 100%;
  158. image {
  159. width: 312rpx;
  160. height: 312rpx;
  161. border-color: linear-gradient(0deg, #e01a1c, #e01a1c);
  162. border-radius: 50%;
  163. margin-top: 85rpx;
  164. }
  165. .china-font {
  166. z-index: 0;
  167. width: 100%;
  168. font-size: 62rpx;
  169. padding-left: 20rpx;
  170. letter-spacing: 20rpx;
  171. font-family: Swei Fist Leg CJK SC;
  172. font-weight: bold;
  173. color: #e01a1c;
  174. line-height: 1;
  175. margin-top: 19rpx;
  176. text-align: center;
  177. }
  178. .english-font {
  179. margin-top: 14rpx;
  180. z-index: 0;
  181. letter-spacing: -1.9rpx;
  182. width: 100%;
  183. font-size: 20rpx;
  184. font-weight: bold;
  185. color: #e01a1c;
  186. text-align: center;
  187. }
  188. .fgx {
  189. margin-top: 25rpx;
  190. margin-bottom: 25rpx;
  191. z-index: 0;
  192. width: 625rpx;
  193. border-bottom: 1rpx dashed #e01a1c;
  194. }
  195. }
  196. .buttom {
  197. flex-direction: column;
  198. padding-top: 600rpx;
  199. .item {
  200. z-index: 0;
  201. margin: 0 auto;
  202. margin-top: 20rpx;
  203. width: 532rpx;
  204. border: 1rpx solid #e01a1c;
  205. border-radius: 38rpx;
  206. justify-content: flex-start;
  207. .home_img {
  208. height: 58rpx;
  209. width: 58rpx;
  210. margin: 8rpx 13rpx;
  211. }
  212. .text {
  213. width: 405rpx;
  214. // display: inline-block;
  215. // padding-left: 75rpx;
  216. letter-spacing: 1.2rpx;
  217. font-size: 25rpx;
  218. font-weight: bold;
  219. text-align: center;
  220. // background-color: red;
  221. // .text1 {
  222. // padding-left: 60rpx;
  223. // }
  224. }
  225. }
  226. .map {
  227. margin-top: 25rpx;
  228. margin-bottom: 25rpx;
  229. background-color: #ffffff;
  230. z-index: 0;
  231. width: 517rpx;
  232. border: 2rpx solid #ea3638;
  233. line-height: 0;
  234. .map-box {
  235. width: 513rpx;
  236. height: 513rpx;
  237. background: #ffffff;
  238. }
  239. .map-font {
  240. height: 90rpx;
  241. padding: 0 20rpx;
  242. justify-content: space-between;
  243. .font-left {
  244. font-family: PingFang SC;
  245. font-weight: bold;
  246. font-size: 29rpx;
  247. color: #333333;
  248. line-height: 1;
  249. }
  250. .font-right {
  251. border-radius: 10rpx;
  252. overflow: hidden;
  253. background-color: #1593ff;
  254. image {
  255. width: 120rpx;
  256. height: 45rpx;
  257. }
  258. }
  259. }
  260. }
  261. .qrcode {
  262. width: 517rpx;
  263. image {
  264. width: 517rpx;
  265. margin: 20rpx 0 36rpx;
  266. }
  267. }
  268. }
  269. .popup_row {
  270. width: 100%;
  271. height: 500rpx;
  272. background-color: #FFFFFF;
  273. border-radius: 20rpx 20rpx 0 0;
  274. display: flex;
  275. justify-content: center;
  276. align-items: center;
  277. .rows {
  278. width: 100%;
  279. padding: 0 24rpx;
  280. .rows-item {
  281. height: 80rpx;
  282. line-height: 80rpx;
  283. text-align: center;
  284. width: 100%;
  285. font-size: 32rpx;
  286. color: #303133;
  287. }
  288. }
  289. }
  290. </style>