other.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view class="content">
  3. <view class="top flex">
  4. <image src="../../static/img/002.png" mode="aspectFill"></image>
  5. <view class="font">
  6. <view class="china-font">罗田县红十字会</view>
  7. <view class="english-font">Red Cross Society of China Luo Tian Branch</view>
  8. </view>
  9. </view>
  10. <view class="cross">社会捐款通道</view>
  11. <view class="box">
  12. <view class="title" style="margin-top: 0;">1.银行转账</view>
  13. <view class="detail" v-for="item in list" :key="item.id">
  14. <view class="detail-item">
  15. 开户名:{{ item.name }}
  16. <view class="copy" @click="copy(item.name)">复制开户名</view>
  17. </view>
  18. <view class="detail-item">
  19. 银行账户:{{ item.number }}
  20. <view class="copy" @click="copy(item.number)">复制账号</view>
  21. </view>
  22. <view class="detail-spe">
  23. 开户行:{{ item.count }}
  24. <view class="copyband" @click="copy(item.count)">复制开户行</view>
  25. </view>
  26. </view>
  27. <!-- <view class="image">
  28. <image src="../../static/images/other.png" mode=""></image>
  29. </view> -->
  30. <view class="title">2.捐赠二维码</view>
  31. <!-- <view class="zfb">支付宝扫码捐款</view>
  32. <view class="erweima"><image src="../../static/img/zfb.jpg" mode="widthFix"></image></view>
  33. <view class="weixin">微信扫码捐款</view>
  34. <view class="erweima" ><image src="../../static/img/weixin.png" mode="widthFix"></image></view> -->
  35. <view class="zfb" style="color: #ff0000;">
  36. 爱心捐款通道
  37. </view>
  38. <view class="erweima"><image src="../../static/img/lovetongdao.png" mode="widthFix"></image></view>
  39. <view class="title">3.现金捐款/捐物</view>
  40. <view class="detail">
  41. <view class="detail-item">单位:罗田县红十字会</view>
  42. <view class="detail-item">地点:湖北省黄冈市罗田县凤山镇东岳庙街1号</view>
  43. <view class="detail-item">联系方式:左申宏 18972710279 0713-5056528</view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import uniCopy from '../../components/js_sdk/xb-copy/uni-copy.js';
  50. export default {
  51. data() {
  52. return {
  53. list: [
  54. {
  55. id: 0,
  56. spread_url: 11,
  57. name: '罗田县红十字会',
  58. count: '工行罗田支行',
  59. number: '1814074109044004055'
  60. }
  61. ]
  62. };
  63. },
  64. methods: {
  65. tocontrilist() {
  66. uni.navigateTo({
  67. url: '/pages/applic/tocontrilist'
  68. });
  69. },
  70. copy(value) {
  71. let obj = this;
  72. let content = value; //需要复制的内容
  73. console.log('复制的内容:', content);
  74. // content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
  75. const result = uniCopy(content);
  76. if (result === false) {
  77. uni.showToast({
  78. title: '不支持'
  79. });
  80. } else {
  81. uni.showToast({
  82. title: '复制成功',
  83. icon: 'none'
  84. });
  85. }
  86. }
  87. }
  88. };
  89. </script>
  90. <style lang="scss">
  91. body,
  92. page {
  93. height: 100%;
  94. background-color: #fefefe;
  95. }
  96. .content {
  97. background-color: #fefefe;
  98. line-height: 1;
  99. padding-top: 25rpx;
  100. padding: 24rpx 24rpx 90rpx;
  101. .top {
  102. align-items: center;
  103. width: 100%;
  104. image {
  105. width: 64rpx;
  106. height: 64rpx;
  107. border-radius: 50%;
  108. }
  109. .font {
  110. margin-left: 20rpx;
  111. .china-font {
  112. font-size: 27rpx;
  113. font-family: PingFang SC;
  114. font-weight: bold;
  115. color: #101010;
  116. }
  117. .english-font {
  118. margin-top: 6rpx;
  119. font-size: 12rpx;
  120. font-family: PingFang SC;
  121. font-weight: bold;
  122. color: #101010;
  123. }
  124. }
  125. }
  126. .cross {
  127. margin-left: 6rpx;
  128. height: 76rpx;
  129. line-height: 76rpx;
  130. color: #444444;
  131. border-bottom: 1rpx solid #cccccc;
  132. }
  133. .image {
  134. margin-top: 44rpx;
  135. margin-bottom: 48rpx;
  136. height: 404rpx;
  137. width: 100%;
  138. image {
  139. width: 100%;
  140. height: 100%;
  141. }
  142. }
  143. .box {
  144. padding: 20rpx 0 24rpx;
  145. .title {
  146. margin-top: 60rpx;
  147. font-size: 28rpx;
  148. font-family: PingFang SC;
  149. font-weight: bold;
  150. color: #101010;
  151. }
  152. .detail {
  153. padding-top: 10rpx;
  154. font-size: 28rpx;
  155. line-height: 40rpx;
  156. .detail-spe {
  157. margin-top: 10rpx;
  158. line-height: 46rpx;
  159. overflow: hidden;
  160. text-overflow: ellipsis;
  161. display: -webkit-box; //必须结合的属性,将对象作为弹性伸缩盒子模型显示
  162. -webkit-line-clamp: 2; //控制文本的行数
  163. -webkit-box-orient: vertical; //必须结合的属性,设置或检索伸缩盒对象的子元素的排列方式
  164. .copyband {
  165. display: flex;
  166. float: right;
  167. // float: right;
  168. justify-content: center;
  169. background-color: #f1f1f1;
  170. border-radius: 10rpx;
  171. line-height: 34rpx;
  172. font-size: 24rpx;
  173. color: #333;
  174. // padding: 0 24rpx;
  175. width: 168rpx;
  176. height: 34rpx;
  177. margin-top: 8rpx;
  178. }
  179. }
  180. .detail-item {
  181. display: flex;
  182. justify-content: space-between;
  183. align-items: center;
  184. // height: 40rpx;
  185. line-height: 46rpx;
  186. color: #000;
  187. margin-top: 10rpx;
  188. .copy {
  189. width: 168rpx;
  190. display: flex;
  191. justify-content: center;
  192. background-color: #f1f1f1;
  193. border-radius: 10rpx;
  194. line-height: 34rpx;
  195. font-size: 24rpx;
  196. color: #333;
  197. padding: 0 24rpx;
  198. // width: 144rpx;
  199. height: 34rpx;
  200. }
  201. }
  202. .phone {
  203. margin-left: 138rpx;
  204. height: 40rpx;
  205. color: #000;
  206. }
  207. }
  208. .erweima {
  209. width: 362rpx;
  210. margin: 26rpx auto;
  211. image {
  212. width: 100%;
  213. }
  214. }
  215. .zfb {
  216. font-size: 30rpx;
  217. font-family: PingFang SC;
  218. font-weight: bold;
  219. color: #0b9edd;
  220. margin-top: 36rpx;
  221. text-align: center;
  222. }
  223. .weixin {
  224. font-size: 30rpx;
  225. font-family: PingFang SC;
  226. font-weight: bold;
  227. color: #02974a;
  228. margin-top: 36rpx;
  229. text-align: center;
  230. }
  231. }
  232. }
  233. </style>