index2.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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="navigate('/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 @click="tab('/pages/travel/index')" src="../../static/img11.jpg" style="height: 170px;width: 93%;"></image></view>
  36. <view class="f a1">
  37. <image @click="tab('/pages/shop/hotel/index')" 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" @click="tab('/pages/travel/index')">
  48. 更多
  49. <text class="arrow icon">&#xe62d;</text>
  50. </view>
  51. <view class="clear"></view>
  52. </view>
  53. <view class="item">
  54. <image src="../../static/a15.jpg" class="bmg"></image>
  55. <view class="tit">2021年谢通门“文化旅游节”开幕</view>
  56. <view class="desc omit">
  57. 谢通门是藏族独具特色的传统节日,至今已有600多年的历史。 “达玛文化旅游节”是谢通门县一年一度的传统节日,是历史民族文化的传承,该活动的举办将实现民族、经贸的交往交
  58. 流交融,为期五天的“达玛节”,除进行群众文艺演出、物交会外,还将进行赛马、赛牦牛、跑马射箭、抱石头等传统 民族体育活动。
  59. </view>
  60. </view>
  61. </view>
  62. <view class="it">
  63. <view class="title">
  64. <image src="../../static/lo.png" class="lo" mode="widthFix"></image>
  65. <view class="hd">攻略指南</view>
  66. <view class="more" @click="navigate('/pages/travel/introduction')">
  67. 更多
  68. <text class="arrow icon">&#xe62d;</text>
  69. </view>
  70. <view class="clear"></view>
  71. </view>
  72. <view class="item flex">
  73. <view class="f" style="overflow: hidden;"><image src="../../static/img2.jpg" class="img"></image></view>
  74. <view class="f" style="padding: 10px;">
  75. <view class="tit">日喀则的绝色风光</view>
  76. <view class="str-summery">日喀则绝美的自然风光,历史悠久的古城古韵、青山绿水、蓝天白云......如此震撼人心的独特景致!</view>
  77. <view class="lx">浏览</view>
  78. </view>
  79. </view>
  80. </view>
  81. <u-back-top :scroll-top="scrollTop"></u-back-top>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. data() {
  87. return {
  88. ip: this.$http.urls.ip,
  89. scrollTop: 0,
  90. item: { showPictures: [] }
  91. };
  92. },
  93. onPageScroll(e) {
  94. this.scrollTop = e.scrollTop;
  95. },
  96. onLoad(e) {
  97. //this.init();
  98. //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"})
  99. },
  100. methods: {
  101. init() {
  102. this.$http.request({
  103. url: this.$http.urls.getAboutUs,
  104. success: res => {
  105. this.item = res.data.data.aboutUs;
  106. if (this.item.showPictures) {
  107. this.item.showPictures = this.item.showPictures.split(',');
  108. }
  109. uni.setStorageSync('aboutUs', this.item);
  110. }
  111. });
  112. },
  113. //拨打sos
  114. call() {
  115. if (!this.$hasLogin()) {
  116. uni.showModal({ content: '登陆才能使用该功能', showCancel: false });
  117. return;
  118. }
  119. //获取拨打人位置
  120. uni.authorize({
  121. scope: 'scope.userLocation',
  122. success: s => {
  123. uni.getLocation({
  124. type: 'wgs84',
  125. success: res => {
  126. uni.showModal({
  127. title: '提示',
  128. content: '是否拨打' + this.item.helpPhone + '求援电话?',
  129. success: c => {
  130. if (c.confirm) {
  131. //上传拨打救援记录
  132. this.$http.request({
  133. method: 'POST',
  134. url: this.$http.urls.pushHelp,
  135. data: {
  136. memberId: this.$getUser().memberId,
  137. lat: res.latitude,
  138. lng: res.longitude,
  139. phone: this.item.helpPhone,
  140. memberPhone: this.$getUser().mobile
  141. },
  142. success: r => {
  143. uni.makePhoneCall({
  144. phoneNumber: this.item.helpPhone
  145. });
  146. }
  147. });
  148. }
  149. }
  150. });
  151. }
  152. });
  153. },
  154. fail(res) {
  155. //1.2 拒绝授权
  156. console.log(JSON.stringify(res));
  157. }
  158. });
  159. },
  160. tab(url) {
  161. console.log('zxx');
  162. uni.switchTab({
  163. url: url
  164. });
  165. },
  166. navigate(url) {
  167. uni.navigateTo({ url: url });
  168. }
  169. }
  170. };
  171. </script>
  172. <style lang="scss">
  173. .page {
  174. padding: 10px;
  175. }
  176. .wd {
  177. margin-top: 25px;
  178. z-index: 111111;
  179. .qw {
  180. font-size: 25px;
  181. float: left;
  182. font-weight: bold;
  183. }
  184. .xs {
  185. margin-left: 45px;
  186. width: 100%;
  187. margin-top: 6px;
  188. font-size: 13px;
  189. }
  190. }
  191. .ms {
  192. font-size: 22px;
  193. font-weight: bold;
  194. margin-bottom: 15px;
  195. margin-top: 10px;
  196. .jb {
  197. float: right;
  198. font-size: 13px;
  199. font-weight: normal;
  200. margin-top: 6px;
  201. }
  202. }
  203. .top {
  204. image {
  205. width: 100%;
  206. border-radius: 5px;
  207. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  208. }
  209. }
  210. .a1 {
  211. padding: 5px 0px 5px 0px;
  212. image {
  213. border-radius: 5px;
  214. }
  215. }
  216. .it {
  217. margin-top: 15px;
  218. .title {
  219. font-size: 20px;
  220. margin-bottom: -15px;
  221. font-weight: bold;
  222. color: #333;
  223. .lo {
  224. width: 150px;
  225. }
  226. .hd {
  227. position: absolute;
  228. left: 20px;
  229. margin-top: -35px;
  230. }
  231. }
  232. .item {
  233. margin-top: 10px;
  234. padding: 10px;
  235. .bmg {
  236. width: 100%;
  237. height: 150px;
  238. }
  239. .tit {
  240. font-size: 17px;
  241. font-weight: bold;
  242. }
  243. .desc {
  244. font-size: 13px;
  245. color: $dar;
  246. padding-top: 3px;
  247. }
  248. .img {
  249. height: 200px;
  250. border-radius: 5px;
  251. }
  252. .str-summery {
  253. font-size: 13px;
  254. color: $dar;
  255. padding-top: 10px;
  256. text-align: left;
  257. line-height: 20px;
  258. }
  259. .lx {
  260. width: 150px;
  261. color: #fff;
  262. background: #d72424;
  263. border-radius: 20px;
  264. padding: 5px 12px;
  265. font-size: 13px;
  266. color: white;
  267. font-weight: bold;
  268. line-height: 23px;
  269. margin-top: 20px;
  270. .icon {
  271. padding-right: 5px;
  272. font-size: 20px;
  273. }
  274. }
  275. }
  276. }
  277. </style>