notice.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="">
  3. <view class="sort">
  4. <view
  5. class="sortItem"
  6. :style="{ color: current == 1 ? '#A5CF49' : '#333333' }"
  7. @click="sort(1)"
  8. >
  9. <text>平台资讯</text>
  10. </view>
  11. <view
  12. class="sortItem"
  13. @click="sort(2)"
  14. :style="{ color: current == 2 ? '#A5CF49' : '#333333' }"
  15. >
  16. <text>平台规则</text>
  17. </view>
  18. </view>
  19. <view class="notice">
  20. <u-notice-bar
  21. v-if="text1"
  22. :text="text1"
  23. color="#fff"
  24. bgColor="#A5CF49"
  25. fontSize="16"
  26. ></u-notice-bar>
  27. </view>
  28. <view class="content">
  29. <u-parse v-if="current == 1" :content="platform_information"></u-parse>
  30. <u-parse v-else :content="platform_rules"></u-parse>
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import { onLoad, onShow, onPullDownRefresh } from "@dcloudio/uni-app";
  36. import zpTooltip from "../../uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue";
  37. import { ref } from "vue";
  38. import {
  39. getplatformeditor,
  40. getnoticelist,
  41. getplatformmeun,
  42. } from "@/utils/api.js";
  43. let platform_information = ref("");
  44. let platform_rules = ref("");
  45. onLoad(() => {
  46. getplatformmeun().then((res) => {
  47. uni.setNavigationBarTitle({
  48. title: res.data.name,
  49. });
  50. text1.value = res.data.infomation_notice || "";
  51. });
  52. getplatformeditor().then((res) => {
  53. platform_information.value = res.data.platform_information;
  54. platform_rules.value = res.data.platform_rules;
  55. });
  56. // getnoticelist(3).then(res=>{
  57. // let data=res.data
  58. // data.forEach(item=>{
  59. // text1.value=text1.value+' '+item.content
  60. // })
  61. // })
  62. // text1.value=getApp().globalData.config.infomation_notice
  63. });
  64. onShow(() => {});
  65. let text1 = ref("");
  66. let current = ref(1);
  67. let sort = (type) => {
  68. if (current.value != type) {
  69. current.value = type;
  70. }
  71. };
  72. onPullDownRefresh(() => {
  73. setTimeout(function () {
  74. uni.stopPullDownRefresh();
  75. }, 1000);
  76. });
  77. </script>
  78. <style lang="scss">
  79. .content {
  80. background-color: #fff;
  81. padding: 40rpx 28rpx;
  82. }
  83. .accountList {
  84. background-color: #ffffff;
  85. .accountItem {
  86. border-bottom: 1rpx solid #f5f5f5;
  87. display: flex;
  88. padding: 24rpx;
  89. align-items: center;
  90. image {
  91. width: 188rpx;
  92. max-height: 188rpx;
  93. border-radius: 10rpx;
  94. margin-right: 26rpx;
  95. }
  96. .introduction {
  97. flex: 1;
  98. .title {
  99. color: #666666;
  100. font-size: 28rpx;
  101. }
  102. .u-fade-enter-active {
  103. margin-top: 0;
  104. padding: 10rpx;
  105. }
  106. .price {
  107. color: #ff2828;
  108. font-size: 24rpx;
  109. text {
  110. font-size: 40rpx;
  111. font-weight: bold;
  112. }
  113. }
  114. }
  115. }
  116. }
  117. .btnBox {
  118. margin-top: 100rpx;
  119. display: flex;
  120. justify-content: right;
  121. button {
  122. margin: 0;
  123. margin-left: 40rpx;
  124. padding: 0;
  125. width: 206rpx;
  126. height: 80rpx;
  127. line-height: 80rpx;
  128. background: #f5f5f5;
  129. border-radius: 40rpx;
  130. font-size: 24rpx;
  131. }
  132. .btn1 {
  133. background: #f5f5f5;
  134. }
  135. .btn2 {
  136. background: #a5cf49;
  137. color: #fff;
  138. }
  139. }
  140. .labelItem {
  141. .label {
  142. font-size: 24rpx;
  143. font-weight: bold;
  144. margin: 24rpx 0 10rpx;
  145. }
  146. .value {
  147. .codeInput {
  148. font-size: 24rpx;
  149. width: 562rpx;
  150. height: 68rpx;
  151. line-height: 68rpx;
  152. background: #f5f5f5;
  153. border-radius: 20rpx;
  154. padding: 0 24rpx;
  155. }
  156. }
  157. .value1 {
  158. display: flex;
  159. align-items: center;
  160. justify-content: space-between;
  161. input {
  162. font-size: 24rpx;
  163. text-align: center;
  164. width: 231rpx;
  165. height: 68rpx;
  166. line-height: 68rpx;
  167. background: #f5f5f5;
  168. border-radius: 20rpx;
  169. padding: 0 24rpx;
  170. }
  171. }
  172. }
  173. .popup {
  174. padding: 0 40rpx;
  175. font-size: 24rpx;
  176. .item {
  177. line-height: 90rpx;
  178. border-bottom: 1rpx solid #f5f5f5;
  179. }
  180. }
  181. .popup1 {
  182. padding: 0 40rpx 40rpx;
  183. }
  184. ::v-deep .u-checkbox {
  185. span {
  186. font-size: 24rpx !important;
  187. }
  188. margin-right: 20rpx;
  189. }
  190. ::v-deep .u-radio {
  191. span {
  192. font-size: 24rpx !important;
  193. }
  194. margin-right: 20rpx;
  195. }
  196. ::v-deep .u-fade-enter-active {
  197. margin-top: 89px;
  198. }
  199. ::v-deep .u-slide-down-enter-to {
  200. top: 89px !important;
  201. }
  202. .select {
  203. transform: rotate(180deg);
  204. }
  205. page {
  206. .sort {
  207. border-top: 1rpx solid #f2f2f2;
  208. // width: 750rpx;
  209. width: 100%;
  210. height: 88rpx;
  211. line-height: 88rpx;
  212. background: #ffffff;
  213. box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
  214. display: flex;
  215. .sortItem {
  216. flex: 1;
  217. display: flex;
  218. justify-content: center;
  219. text {
  220. margin-right: 16rpx;
  221. }
  222. }
  223. }
  224. }
  225. </style>