task.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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(item)">
  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(data){
  100. if (data.type == 1) {
  101. uni.navigateTo({
  102. url: "/pages/extension/invite_friend/index"
  103. })
  104. } else {
  105. uni.switchTab({
  106. url: '/pages/index/index'
  107. })
  108. }
  109. }
  110. },
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. /deep/uni-radio .uni-radio-input {
  115. margin-right: 0;
  116. }
  117. .popup {
  118. position: fixed;
  119. bottom: 0;
  120. left: 0;
  121. z-index: 9;
  122. width: 100%;
  123. border-top-left-radius: 16rpx;
  124. border-top-right-radius: 16rpx;
  125. background-color: #fff;
  126. transform: translateY(100%);
  127. transition: 0.3s;
  128. }
  129. .popup.on {
  130. transform: translateY(0);
  131. }
  132. .popup-hd {
  133. position: relative;
  134. height: 129rpx;
  135. font-size: 32rpx;
  136. line-height: 129rpx;
  137. text-align: center;
  138. color: #000000;
  139. .iconfont {
  140. position: absolute;
  141. top: 50%;
  142. right: 30rpx;
  143. transform: translateY(-50%);
  144. font-size: 32rpx;
  145. color: #707070;
  146. }
  147. }
  148. .popup-bd {
  149. max-height: 600rpx;
  150. min-height: 300rpx;
  151. box-sizing: border-box;
  152. .section-bd {
  153. padding: 30rpx;
  154. .item {
  155. width: 100%;
  156. padding: 10px 25rpx;
  157. background-color: #fff;
  158. .img{
  159. width: 90rpx;
  160. height: 90rpx;
  161. margin-right: 24rpx;
  162. img{
  163. width: 100%;
  164. height: 100%;
  165. }
  166. }
  167. .name {
  168. font-size: 28rpx;
  169. }
  170. ~.item {
  171. margin-top: 24rpx;
  172. }
  173. .jump{
  174. background-color: #E93323;
  175. color: #fff;
  176. border-radius: 30rpx;
  177. font-size: 24rpx;
  178. padding: 10rpx 20rpx;
  179. margin-left: 50rpx;
  180. }
  181. }
  182. .text {
  183. flex: 1;
  184. }
  185. .title {
  186. font-weight: bold;
  187. font-size: 28rpx;
  188. color: #282828;
  189. display: flex;
  190. justify-content: space-between;
  191. .icon-wenti {
  192. color: #999;
  193. margin-left: 10rpx;
  194. }
  195. .mark {
  196. text-align: right;
  197. margin-left: 20rpx;
  198. font-weight: normal;
  199. font-size: 24rpx;
  200. color: #999999;
  201. white-space: nowrap;
  202. }
  203. }
  204. .process {
  205. height: 12rpx;
  206. border-radius: 6rpx;
  207. margin: 14rpx 0;
  208. background-color: #EEEEEE;
  209. .fill {
  210. height: 100%;
  211. border-radius: 6rpx;
  212. background-color: #E7B667;
  213. }
  214. }
  215. .info-box {
  216. display: flex;
  217. justify-content: space-between;
  218. align-items: center;
  219. }
  220. .info {
  221. font-size: 22rpx;
  222. color: #999999;
  223. }
  224. .link {
  225. font-size: 26rpx;
  226. color: #999999;
  227. .new-number {
  228. color: #C6985C;
  229. }
  230. }
  231. }
  232. }
  233. .popup-ft {
  234. padding: 14rpx 30rpx 44rpx;
  235. .navigator {
  236. height: 86rpx;
  237. border-radius: 43rpx;
  238. background-color: var(--view-theme);
  239. font-size: 30rpx;
  240. line-height: 86rpx;
  241. text-align: center;
  242. color: #FFFFFF;
  243. .iconfont {
  244. margin-right: 14rpx;
  245. font-size: 30rpx;
  246. }
  247. }
  248. .button {
  249. height: 86rpx;
  250. border: 1rpx solid var(--view-theme);
  251. border-radius: 43rpx;
  252. margin-top: 26rpx;
  253. font-size: 30rpx;
  254. line-height: 84rpx;
  255. color: var(--view-theme);
  256. }
  257. }
  258. .empty {
  259. padding-top: 58rpx;
  260. font-size: 26rpx;
  261. text-align: center;
  262. color: #999999;
  263. .image {
  264. width: 400rpx;
  265. height: 260rpx;
  266. margin-bottom: 20rpx;
  267. }
  268. }
  269. .growthValue {
  270. background-color: #fff;
  271. border-radius: 16rpx;
  272. position: fixed;
  273. top: 266rpx;
  274. left: 50%;
  275. width: 560rpx;
  276. min-height: 440rpx;
  277. margin-left: -280rpx;
  278. z-index: 999;
  279. transform: translate3d(0, -200%, 0);
  280. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  281. }
  282. .growthValue.on {
  283. transform: translate3d(0, 0, 0);
  284. }
  285. .growthValue .pictrue {
  286. width: 100%;
  287. height: 257rpx;
  288. position: relative;
  289. }
  290. .growthValue .pictrue image {
  291. width: 100%;
  292. height: 100%;
  293. border-radius: 16rpx 16rpx 0 0;
  294. }
  295. .growthValue .conter {
  296. padding: 0 35rpx;
  297. font-size: 30rpx;
  298. color: #333;
  299. margin-top: 58rpx;
  300. line-height: 1.5;
  301. height: 350rpx;
  302. overflow: auto;
  303. }
  304. .growthValue .iconfont {
  305. position: absolute;
  306. font-size: 65rpx;
  307. color: #fff;
  308. bottom: -90rpx;
  309. left: 50%;
  310. transform: translateX(-50%);
  311. }
  312. </style>