task.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <template>
  2. <!-- 任务列表 -->
  3. <view>
  4. <view :class="{ mask: invShow }" @touchmove.stop.prevent @click="invClose"></view>
  5. <view class="popup" :class="{ on: invShow }">
  6. <view class="popup-hd">快速升级技巧<text class="iconfont icon-guanbi" @click="invClose"></text></view>
  7. <scroll-view class="popup-bd" scroll-y="true">
  8. <view class="section-bd acea-row">
  9. <view class="item acea-row row-middle" v-for="(item,index) in task" :key='item.id'>
  10. <view class="img">
  11. <img :src="item.image" alt="">
  12. </view>
  13. <view class="text">
  14. <view class="title">
  15. <view class="name line2">
  16. {{item.name}}
  17. <text class="iconfont icon-wenti" @click="opHelp(index)"></text>
  18. </view>
  19. <text class="mark">{{item.finish?'已完成':'未完成'}}</text>
  20. </view>
  21. <view class="process">
  22. <view
  23. :style="{width: `${Math.floor((item.new_number / item.number) > 1 ? 100 : item.new_number / item.number* 100)}%`}"
  24. class="fill"></view>
  25. </view>
  26. <view class="info-box">
  27. <view class="link" hover-class="none">
  28. <text class="new-number">{{item.new_number}}</text>
  29. /{{item.number}}
  30. </view>
  31. </view>
  32. </view>
  33. <view class="jump" @click="jumpIndex">
  34. {{item.finish?'已完成':'去完成'}}
  35. </view>
  36. </view>
  37. </view>
  38. </scroll-view>
  39. </view>
  40. <view class='growthValue' :class='growthValue==false?"on":""'>
  41. <text class='iconfont icon-guanbi3' @click='growthValue = true'></text>
  42. <view class='conter'>{{illustrate}}</view>
  43. </view>
  44. <view class='mask' :hidden='growthValue' @click='growthValueClose'></view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. invId: 0,
  52. growthValue: true,
  53. illustrate: ''
  54. }
  55. },
  56. props: {
  57. invShow: {
  58. type: Boolean,
  59. default: false
  60. },
  61. task: {
  62. type: Array,
  63. default () {
  64. return [];
  65. }
  66. },
  67. },
  68. methods: {
  69. invClose(state) {
  70. this.$emit('inv-close');
  71. },
  72. invChange(e) {
  73. if (this.isOrder) {
  74. this.invId = e.detail.value
  75. } else {
  76. this.$emit('inv-change', e.detail.value);
  77. }
  78. },
  79. /**
  80. * 关闭说明
  81. */
  82. growthValueClose() {
  83. this.growthValue = true;
  84. },
  85. /**
  86. * 打开说明
  87. */
  88. opHelp(index) {
  89. this.growthValue = false;
  90. this.$emit('inv-close');
  91. this.illustrate = this.task[index].desc;
  92. },
  93. invSub() {
  94. this.$emit('inv-change', this.invId || this.invChecked);
  95. },
  96. invCancel() {
  97. this.$emit('inv-cancel');
  98. },
  99. jumpIndex(){
  100. uni.switchTab({
  101. url:'/pages/index/index'
  102. })
  103. }
  104. },
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. /deep/uni-radio .uni-radio-input {
  109. margin-right: 0;
  110. }
  111. .popup {
  112. position: fixed;
  113. bottom: 0;
  114. left: 0;
  115. z-index: 9;
  116. width: 100%;
  117. border-top-left-radius: 16rpx;
  118. border-top-right-radius: 16rpx;
  119. background-color: #fff;
  120. transform: translateY(100%);
  121. transition: 0.3s;
  122. }
  123. .popup.on {
  124. transform: translateY(0);
  125. }
  126. .popup-hd {
  127. position: relative;
  128. height: 129rpx;
  129. font-size: 32rpx;
  130. line-height: 129rpx;
  131. text-align: center;
  132. color: #000000;
  133. .iconfont {
  134. position: absolute;
  135. top: 50%;
  136. right: 30rpx;
  137. transform: translateY(-50%);
  138. font-size: 32rpx;
  139. color: #707070;
  140. }
  141. }
  142. .popup-bd {
  143. height: 600rpx;
  144. box-sizing: border-box;
  145. .section-bd {
  146. padding: 30rpx;
  147. .item {
  148. width: 100%;
  149. padding: 10px 25rpx;
  150. background-color: #fff;
  151. .img{
  152. width: 90rpx;
  153. height: 90rpx;
  154. margin-right: 24rpx;
  155. img{
  156. width: 100%;
  157. height: 100%;
  158. }
  159. }
  160. .name {
  161. font-size: 28rpx;
  162. }
  163. ~.item {
  164. margin-top: 24rpx;
  165. }
  166. .jump{
  167. background-color: #E93323;
  168. color: #fff;
  169. border-radius: 30rpx;
  170. font-size: 24rpx;
  171. padding: 10rpx 20rpx;
  172. margin-left: 100rpx;
  173. }
  174. }
  175. .text {
  176. flex: 1;
  177. }
  178. .title {
  179. font-weight: bold;
  180. font-size: 28rpx;
  181. color: #282828;
  182. display: flex;
  183. justify-content: space-between;
  184. .icon-wenti {
  185. color: #999;
  186. margin-left: 10rpx;
  187. }
  188. .mark {
  189. text-align: right;
  190. margin-left: 20rpx;
  191. font-weight: normal;
  192. font-size: 24rpx;
  193. color: #999999;
  194. white-space: nowrap;
  195. }
  196. }
  197. .process {
  198. height: 12rpx;
  199. border-radius: 6rpx;
  200. margin: 14rpx 0;
  201. background-color: #EEEEEE;
  202. .fill {
  203. height: 100%;
  204. border-radius: 6rpx;
  205. background-color: #E7B667;
  206. }
  207. }
  208. .info-box {
  209. display: flex;
  210. justify-content: space-between;
  211. align-items: center;
  212. }
  213. .info {
  214. font-size: 22rpx;
  215. color: #999999;
  216. }
  217. .link {
  218. font-size: 26rpx;
  219. color: #999999;
  220. .new-number {
  221. color: #C6985C;
  222. }
  223. }
  224. }
  225. }
  226. .popup-ft {
  227. padding: 14rpx 30rpx 44rpx;
  228. .navigator {
  229. height: 86rpx;
  230. border-radius: 43rpx;
  231. background-color: var(--view-theme);
  232. font-size: 30rpx;
  233. line-height: 86rpx;
  234. text-align: center;
  235. color: #FFFFFF;
  236. .iconfont {
  237. margin-right: 14rpx;
  238. font-size: 30rpx;
  239. }
  240. }
  241. .button {
  242. height: 86rpx;
  243. border: 1rpx solid var(--view-theme);
  244. border-radius: 43rpx;
  245. margin-top: 26rpx;
  246. font-size: 30rpx;
  247. line-height: 84rpx;
  248. color: var(--view-theme);
  249. }
  250. }
  251. .empty {
  252. padding-top: 58rpx;
  253. font-size: 26rpx;
  254. text-align: center;
  255. color: #999999;
  256. .image {
  257. width: 400rpx;
  258. height: 260rpx;
  259. margin-bottom: 20rpx;
  260. }
  261. }
  262. .growthValue {
  263. background-color: #fff;
  264. border-radius: 16rpx;
  265. position: fixed;
  266. top: 266rpx;
  267. left: 50%;
  268. width: 560rpx;
  269. min-height: 440rpx;
  270. margin-left: -280rpx;
  271. z-index: 999;
  272. transform: translate3d(0, -200%, 0);
  273. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  274. }
  275. .growthValue.on {
  276. transform: translate3d(0, 0, 0);
  277. }
  278. .growthValue .pictrue {
  279. width: 100%;
  280. height: 257rpx;
  281. position: relative;
  282. }
  283. .growthValue .pictrue image {
  284. width: 100%;
  285. height: 100%;
  286. border-radius: 16rpx 16rpx 0 0;
  287. }
  288. .growthValue .conter {
  289. padding: 0 35rpx;
  290. font-size: 30rpx;
  291. color: #333;
  292. margin-top: 58rpx;
  293. line-height: 1.5;
  294. height: 350rpx;
  295. overflow: auto;
  296. }
  297. .growthValue .iconfont {
  298. position: absolute;
  299. font-size: 65rpx;
  300. color: #fff;
  301. bottom: -90rpx;
  302. left: 50%;
  303. transform: translateX(-50%);
  304. }
  305. </style>