index.vue 7.4 KB

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