aixin.vue 9.0 KB

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