index2.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <view class="page">
  3. <view class="wd">
  4. <view class="qw">28°</view>
  5. <view class="xs">
  6. <view>中雨 东风2级</view>
  7. <view>空气优23</view>
  8. </view>
  9. </view>
  10. <view class="ms">
  11. <text class="icon">&#xe64a;</text>
  12. <text>谢通门县欢迎您</text>
  13. <navigator url="/pages/index/index" class="jb">旧版首页</navigator>
  14. </view>
  15. <view class="top"><image src="../../static/bjt.jpg" mode="widthFix"></image></view>
  16. <view class="flex menu">
  17. <view class="f" @click="tab('/pages/travel/index')">
  18. <view class="icon" style="background-color: #0f0b51;">&#xe605;</view>
  19. <view class="title">景区介绍</view>
  20. </view>
  21. <view class="f" @click="navigate('/pages/travel/introduction')">
  22. <view class="icon" style="background-color: #2cc937;">&#xe647;</view>
  23. <view class="title">旅游攻略</view>
  24. </view>
  25. <view class="f" @click="navigate('/pages/government/activity')">
  26. <view class="icon" style="background-color: #e23e33;">&#xe645;</view>
  27. <view class="title">热门活动</view>
  28. </view>
  29. <view class="f" @click="tab('/pages/government/index')">
  30. <view class="icon" style="background-color: #e23e33;">&#xe695;</view>
  31. <view class="title">党政服务</view>
  32. </view>
  33. </view>
  34. <view class="flex" style="margin-top: 10px;">
  35. <view class="f a1"><image src="../../static/img11.jpg" style="height: 170px;width: 93%;"></image></view>
  36. <view class="f a1">
  37. <image src="../../static/aa2.jpg" style="height: 80px;width: 100%;"></image>
  38. <image src="../../static/aa3.jpg" style="height: 80px;width: 100%;margin-top: 5px;position: relative;">
  39. <button class="feedback" open-type="feedback">我要投诉</button>
  40. </image>
  41. </view>
  42. </view>
  43. <view class="it">
  44. <view class="title">
  45. <image src="../../static/lo.png" class="lo" mode="widthFix"></image>
  46. <view class="hd">热门景区</view>
  47. <view class="more">更多 <text class="arrow icon">&#xe62d;</text></view>
  48. <view class="clear"></view>
  49. </view>
  50. <view class="item">
  51. <image src="../../static/a15.jpg" class="bmg"></image>
  52. <view class="tit">2021年谢通门“文化旅游节”开幕</view>
  53. <view class="desc omit">
  54. 谢通门是藏族独具特色的传统节日,至今已有600多年的历史。 “达玛文化旅游节”是谢通门县一年一度的传统节日,是历史民族文化的传承,该活动的举办将实现民族、经贸的交往交
  55. 流交融,为期五天的“达玛节”,除进行群众文艺演出、物交会外,还将进行赛马、赛牦牛、跑马射箭、抱石头等传统 民族体育活动。
  56. </view>
  57. </view>
  58. </view>
  59. <view class="it">
  60. <view class="title">
  61. <image src="../../static/lo.png" class="lo" mode="widthFix"></image>
  62. <view class="hd">攻略指南</view>
  63. <view class="more">更多 <text class="arrow icon">&#xe62d;</text></view>
  64. <view class="clear"></view>
  65. </view>
  66. <view class="item flex">
  67. <view class="f" style="overflow: hidden;"><image src="../../static/img2.jpg" class="img"></image></view>
  68. <view class="f" style="padding: 10px;">
  69. <view class="tit">日喀则的绝色风光</view>
  70. <view class="str-summery">日喀则绝美的自然风光,历史悠久的古城古韵、青山绿水、蓝天白云......如此震撼人心的独特景致!</view>
  71. <view class="lx">浏览</view>
  72. </view>
  73. </view>
  74. </view>
  75. <u-back-top :scroll-top="scrollTop"></u-back-top>
  76. </view>
  77. </template>
  78. <script>
  79. export default {
  80. data() {
  81. return {
  82. ip: this.$http.urls.ip,
  83. scrollTop: 0,
  84. item: { showPictures: [] }
  85. };
  86. },
  87. onPageScroll(e) {
  88. this.scrollTop = e.scrollTop;
  89. },
  90. onLoad(e) {
  91. //this.init();
  92. //uni.setStorageSync("user",{"searchValue":null,"createBy":null,"createTime":null,"updateBy":null,"updateTime":null,"remark":null,"params":{},"memberId":2,"name":"wx_5259072147","mobile":"13097850972","email":null,"registerTime":"2021-09-30","lastLoginTime":"2021-11-04","lastLoginIp":"127.0.0.1","loginNum":2,"unionid":null,"openid":"oHYRz5QirxH4-tmZWP0D84HDCv1Q","nickName":"西域男孩","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJCNYUsTpmibmbGAJa6icVT1RZ5uNmusrtibIBgFu112ibe4f0jEvicZlWf0DkeS3l0YlnYkq178W2h8fw/132","gender":"1","province":"广西","city":"玉林","country":"中国","language":"zh_CN","lastLat":null,"lastLng":null,"isShop":2,"apiToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwiaWF0IjoxNjM2NjE4Mjc2LCJleHAiOjE2MzcyMjMwNzZ9.c4reK2ce_SfKOaWuaK8CdWv2kLQl4xl92-HLfWuvLySaRNp1oBrW51KToxggbvOcFgRS0bBpl7UCSOMKIkff5A"})
  93. },
  94. methods: {
  95. init() {
  96. this.$http.request({
  97. url: this.$http.urls.getAboutUs,
  98. success: res => {
  99. this.item = res.data.data.aboutUs;
  100. if (this.item.showPictures) {
  101. this.item.showPictures = this.item.showPictures.split(',');
  102. }
  103. uni.setStorageSync('aboutUs', this.item);
  104. }
  105. });
  106. },
  107. //拨打sos
  108. call() {
  109. if (!this.$hasLogin()) {
  110. uni.showModal({ content: '登陆才能使用该功能', showCancel: false });
  111. return;
  112. }
  113. //获取拨打人位置
  114. uni.authorize({
  115. scope: 'scope.userLocation',
  116. success: s => {
  117. uni.getLocation({
  118. type: 'wgs84',
  119. success: res => {
  120. uni.showModal({
  121. title: '提示',
  122. content: '是否拨打' + this.item.helpPhone + '求援电话?',
  123. success: c => {
  124. if (c.confirm) {
  125. //上传拨打救援记录
  126. this.$http.request({
  127. method: 'POST',
  128. url: this.$http.urls.pushHelp,
  129. data: {
  130. memberId: this.$getUser().memberId,
  131. lat: res.latitude,
  132. lng: res.longitude,
  133. phone: this.item.helpPhone,
  134. memberPhone: this.$getUser().mobile
  135. },
  136. success: r => {
  137. uni.makePhoneCall({
  138. phoneNumber: this.item.helpPhone
  139. });
  140. }
  141. });
  142. }
  143. }
  144. });
  145. }
  146. });
  147. },
  148. fail(res) {
  149. //1.2 拒绝授权
  150. console.log(JSON.stringify(res));
  151. }
  152. });
  153. },
  154. tab(url) {
  155. uni.switchTab({
  156. url: url
  157. });
  158. },
  159. navigate(url) {
  160. uni.navigateTo({ url: url });
  161. }
  162. }
  163. };
  164. </script>
  165. <style lang="scss">
  166. .page {
  167. padding: 10px;
  168. }
  169. .wd {
  170. margin-top: 25px;
  171. z-index: 111111;
  172. .qw {
  173. font-size: 25px;
  174. float: left;
  175. font-weight: bold;
  176. }
  177. .xs {
  178. margin-left: 45px;
  179. width: 100%;
  180. margin-top: 6px;
  181. font-size: 13px;
  182. }
  183. }
  184. .ms {
  185. font-size: 22px;
  186. font-weight: bold;
  187. margin-bottom: 15px;
  188. margin-top: 10px;
  189. .jb {
  190. float: right;
  191. font-size: 13px;
  192. font-weight: normal;
  193. margin-top: 6px;
  194. }
  195. }
  196. .top {
  197. image {
  198. width: 100%;
  199. border-radius: 5px;
  200. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  201. }
  202. }
  203. .a1 {
  204. padding: 5px 0px 5px 0px;
  205. image {
  206. border-radius: 5px;
  207. }
  208. }
  209. .it {
  210. margin-top: 15px;
  211. .title {
  212. font-size: 20px;
  213. margin-bottom: -15px;
  214. font-weight: bold;
  215. color: #333;
  216. .lo {
  217. width: 150px;
  218. }
  219. .hd {
  220. position: absolute;
  221. left: 20px;
  222. margin-top: -35px;
  223. }
  224. }
  225. .item {
  226. margin-top: 10px;
  227. padding: 10px;
  228. .bmg {
  229. width: 100%;
  230. height: 150px;
  231. }
  232. .tit {
  233. font-size: 17px;
  234. font-weight: bold;
  235. }
  236. .desc {
  237. font-size: 13px;
  238. color: $dar;
  239. padding-top: 3px;
  240. }
  241. .img {
  242. height: 200px;
  243. border-radius: 5px;
  244. }
  245. .str-summery {
  246. font-size: 13px;
  247. color: $dar;
  248. padding-top: 10px;
  249. text-align: left;
  250. line-height: 20px;
  251. }
  252. .lx {
  253. width: 150px;
  254. color: #fff;
  255. background: #d72424;
  256. border-radius: 20px;
  257. padding: 5px 12px;
  258. font-size: 13px;
  259. color: white;
  260. font-weight: bold;
  261. line-height: 23px;
  262. margin-top: 20px;
  263. .icon {
  264. padding-right: 5px;
  265. font-size: 20px;
  266. }
  267. }
  268. }
  269. }
  270. </style>