index.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <view class="content">
  3. <view class="bg-img">
  4. <image src="../../static/img/ctbt.png" mode=""></image>
  5. </view>
  6. <view class="over-content">
  7. <view class="item-wrapper" style="height: 318rpx;padding: 70rpx 34rpx 0;">
  8. <view class="item-tit">
  9. 线上捐款
  10. </view>
  11. <view class="item-info">
  12. 孝感市红十字会现已开通线上捐款通道 ,点击下方按钮可直接进行线上捐款。
  13. </view>
  14. <view class="item-btn flex">
  15. <image src="../../static/img/wings-left.png" mode="" class="xcb"></image>
  16. <view class="item-btn-btn" @click="goto()">
  17. 立即捐款
  18. </view>
  19. <image src="../../static/img/wings-right.png" mode="" class="xcb"></image>
  20. </view>
  21. </view>
  22. <view class="item-wrapper" style="height: 259rpx;padding: 60rpx 34rpx;">
  23. <view class="item-tit">
  24. 银行转账
  25. </view>
  26. <view class="item-info">
  27. <view class="">户名:孝感市红十字会</view>
  28. <view class="">银行账户:42001688608050002590</view>
  29. <view class="">开户行:建行孝感直属支行</view>
  30. </view>
  31. </view>
  32. <view class="item-wrapper" style="height: 259rpx;padding: 40rpx 34rpx;">
  33. <view class="item-tit">
  34. 线下捐赠
  35. </view>
  36. <view class="item-info">
  37. <!-- <view class="">负责人:捐款杨敏,捐物宋欢</view> -->
  38. <view class="">咨询电话:捐款 0712-2875087</view>
  39. <view class="" style="padding-left: 160rpx;">捐物 0712-2851023</view>
  40. <view class="">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址:孝感市城站路75号</view>
  41. </view>
  42. </view>
  43. <view class="item-wrapper" style="height: 410rpx;">
  44. <view class="item-tit">
  45. 爱心榜
  46. </view>
  47. <scroll-view class="tab-wrap">
  48. <view class="empty"
  49. style="width: 100%;height: 100%;text-align: center;line-height: 220rpx;font-size: 32rpx;color: #ed4530;"
  50. v-if="loveList.length == 0">
  51. 暂无捐款数据
  52. </view>
  53. <view class="tab-item flex" v-for="item in loveList" v-if="loveList.length > 0">
  54. <view class="tab-item-name clamp" style="width: 200rpx;">{{item.donate_er || '佚名'}}</view>
  55. <view class="tab-item-time clamp" style="width: 180rpx;text-align: center;">
  56. {{item.pay_time | getTime}}</view>
  57. <view class="tab-item-num clamp" style="width: 180rpx;text-align: right;">¥{{item.money}}</view>
  58. </view>
  59. <!-- <uni-load-more :status="loadingType" v-if="loveList.length > 0"></uni-load-more> -->
  60. </scroll-view>
  61. <!-- <view class="tab-wrap">
  62. <view class="tab-item flex" v-for="item in 7">
  63. <view class="tab-item-name">强儿</view>
  64. <view class="tab-item-time">2021/11/20</view>
  65. <view class="tab-item-num">¥200</view>
  66. </view>
  67. </view> -->
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. import {
  74. loadIndexs,
  75. bannerlist,
  76. getListAED,
  77. getDistance,
  78. getListMechanism,
  79. getdis,
  80. tocall
  81. } from '@/api/index.js';
  82. import {
  83. saveUrl,
  84. interceptor
  85. } from '@/utils/loginUtils.js';
  86. import {
  87. mapState,
  88. mapMutations
  89. } from 'vuex';
  90. import {
  91. userinfo
  92. } from '@/api/user.js';
  93. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  94. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  95. import empty from '@/components/empty';
  96. import {
  97. getLoca
  98. } from '@/utils/wxAuthorized.js';
  99. import {
  100. getcomAddress
  101. } from '@/api/index.js';
  102. import topTitle from '../../components/top-title/top-title.vue';
  103. // import { getInfo,getWxconfig } from '@/api/wx.js'
  104. import store from '@/store/index.js';
  105. import {
  106. loveList
  107. } from '@/api/order.js'
  108. export default {
  109. components: {
  110. uniPopup,
  111. uniLoadMore,
  112. topTitle,
  113. empty
  114. },
  115. filters: {
  116. getTime(val) {
  117. let date = new Date(val * 1000);
  118. let Y = date.getFullYear();
  119. let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
  120. let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
  121. return Y + '/' + M + '/' + D;
  122. },
  123. },
  124. data() {
  125. return {
  126. carouselList: [], //轮播
  127. loveList: [], //
  128. loadingType: 'more',
  129. page: 1,
  130. limit: 30,
  131. timer: '',
  132. };
  133. },
  134. onShow() {
  135. saveUrl();
  136. console.log(11, this);
  137. if (!this.hasLogin) {
  138. // 登录拦截
  139. interceptor();
  140. }
  141. },
  142. onLoad() {
  143. uni.hideTabBar()
  144. saveUrl();
  145. this.getLoveList()
  146. },
  147. computed: {
  148. ...mapState('user', ['userInfo', 'baseURL', 'hasLogin'])
  149. },
  150. // 下拉加载
  151. methods: {
  152. goto() {
  153. // uni.showModal({
  154. // title: '提示',
  155. // content: '在线捐款渠道正在建设中'
  156. // })
  157. this.navto('/pages/applic/contribution')
  158. },
  159. gundong() {
  160. let obj = this;
  161. if (obj.timer) {
  162. clearTimeout(obj.timer)
  163. }
  164. obj.timer = setTimeout(() => {
  165. obj.loveList.push(obj.loveList.shift());
  166. // console.log(obj.moreJxList)
  167. obj.gundong();
  168. }, 2000);
  169. },
  170. navto(url) {
  171. uni.navigateTo({
  172. url,
  173. fail() {
  174. uni.switchTab({
  175. url
  176. })
  177. }
  178. })
  179. },
  180. // 获取爱心榜数据
  181. getLoveList() {
  182. let obj = this
  183. if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
  184. return
  185. }
  186. obj.loadingType = 'loading'
  187. loveList({
  188. page: obj.page,
  189. limit: obj.limit
  190. }).then(({
  191. data
  192. }) => {
  193. obj.loveList = obj.loveList.concat(data.list)
  194. obj.gundong()
  195. // obj.page++
  196. // if(data.list.length == obj.limit) {
  197. // obj.loadingType = 'more'
  198. // }else {
  199. // obj.loadingType = 'noMore'
  200. // }
  201. })
  202. }
  203. }
  204. };
  205. </script>
  206. <style lang="scss" scoped>
  207. .content {
  208. position: relative;
  209. }
  210. .bg-img {
  211. position: absolute;
  212. top: 0;
  213. left: 0;
  214. width: 750rpx;
  215. height: 2323rpx;
  216. image {
  217. width: 100%;
  218. height: 100%;
  219. }
  220. }
  221. .over-content {
  222. position: relative;
  223. top: 669rpx;
  224. }
  225. .item-wrapper {
  226. width: 636rpx;
  227. margin: 0 auto 76rpx;
  228. border: 1px solid #C9101B;
  229. // background: #fff;
  230. border-radius: 10px;
  231. position: relative;
  232. .item-tit {
  233. width: 199rpx;
  234. height: 55rpx;
  235. background: linear-gradient(0, #C9101B, #F24D33);
  236. border-radius: 10rpx;
  237. text-align: center;
  238. line-height: 55rpx;
  239. font-size: 34rpx;
  240. font-family: PingFang SC;
  241. font-weight: 500;
  242. color: #FFFFFF;
  243. position: absolute;
  244. top: -28rpx;
  245. left: 64rpx;
  246. }
  247. .item-info {
  248. font-size: 32rpx;
  249. font-family: PingFang SC;
  250. font-weight: 500;
  251. color: #ed4530;
  252. line-height: 49rpx;
  253. // background: linear-gradient(0deg, #C9101B 0%, #F24D33 99.267578125%);
  254. // -webkit-background-clip: text;
  255. // -webkit-text-fill-color: transparent;
  256. width: 100%;
  257. }
  258. .item-btn {
  259. justify-content: center;
  260. align-items: center;
  261. height: 72rpx;
  262. position: absolute;
  263. bottom: 50rpx;
  264. width: 568rpx;
  265. .xcb {
  266. width: 80rpx;
  267. height: 50rpx;
  268. }
  269. .item-btn-btn {
  270. width: 303rpx;
  271. height: 72rpx;
  272. margin: 0 10rpx;
  273. background: linear-gradient(0deg, #C9101B, #F24D33);
  274. border-radius: 36rpx;
  275. line-height: 72rpx;
  276. text-align: center;
  277. font-size: 34rpx;
  278. font-family: PingFang SC;
  279. font-weight: 500;
  280. color: #FFFFFF;
  281. }
  282. }
  283. .tab-wrap {
  284. padding: 53rpx 40rpx 28rpx 33rpx;
  285. height: 410rpx;
  286. .tab-item {
  287. line-height: 45rpx;
  288. height: 45rpx;
  289. align-items: center;
  290. justify-content: space-between;
  291. font-size: 30rpx;
  292. font-family: PingFang SC;
  293. font-weight: bold;
  294. color: #ed4530;
  295. // background: linear-gradient(0deg, #C9101B 0%, #F24D33 99.267578125%);
  296. // -webkit-background-clip: text;
  297. // -webkit-text-fill-color: transparent;
  298. }
  299. }
  300. }
  301. </style>