mytask.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view style="height: 180rpx;width: 100%; position: fixed;background-color: #FFFFFF;top: 0;z-index: 8;">
  6. </view>
  7. <view class="menu">
  8. <view class="menu-item">
  9. <p class='lor'>全部</p>
  10. </view>
  11. <view class="menu-item" @click="toApply()">
  12. <p>已报名</p>
  13. </view>
  14. <view class="menu-item" @click="toexecute()">
  15. <p>执行中</p>
  16. </view>
  17. <view class="menu-item" @click="toEnd()">
  18. <p>已结束</p>
  19. </view>
  20. </view>
  21. <view class="home">
  22. <view class="task" v-for="item in allList">
  23. <view @click="toDetail(item)">
  24. <view class="task-head">
  25. <view class="task-head-account">
  26. <image :src="item.platform_icon_url" style="height: 50rpx;width: 50rpx;"></image>
  27. <p style="margin-left: 20rpx;">{{item.platform_nick_name}}</p>
  28. </view>
  29. <view class="task-head-status">
  30. <p>{{item.task_stage_txt}}</p>
  31. </view>
  32. </view>
  33. <view class="task-info">
  34. <image :src="item.product_img_url" style="height: 120rpx;width: 120rpx;"></image>
  35. <p style="margin-left: 50rpx;">{{item.project_name}}</p>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import mvBar from "@/components/mys_navBar/mysNavBar";
  44. export default {
  45. components: {
  46. mvBar,
  47. },
  48. data() {
  49. return {
  50. allList: [],
  51. applyList: [],
  52. goingList: [],
  53. endList: [],
  54. taskStageList: [],
  55. list: [{
  56. account: {
  57. platform: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_MsjI7CSK_6e62AG2AGOvh1HgAcA_35_35.png",
  58. nickname: "丸子在成都",
  59. },
  60. status: "待确认",
  61. mainphoto: "https://static1.paizi.com/uploadfile/2018/1013/20181013013207465.png",
  62. taskname: "醉码头火锅太古里店",
  63. }, {
  64. account: {
  65. platform: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/pingtai2.png",
  66. nickname: "成都的一颗丸子",
  67. },
  68. status: "待确认",
  69. mainphoto: "https://tse1-mm.cn.bing.net/th/id/R-C.978cb3a3b27875a0cc9d78a254b30b8f?rik=yrP2kNCtfQYEgQ&riu=http%3a%2f%2fnews.southcn.com%2fgd%2fcontent%2fimages%2fattachement%2fpng%2fsite4%2f20190917%2feca86b61fd551eeb23c507.png&ehk=xuWbgLrNmyhNJaByMZPJrX81PrzXrLHqHM%2fdYatFhrs%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1",
  70. taskname: "奥运吉祥物冰墩墩盲盒",
  71. }, ],
  72. mysNavConfig: {
  73. /* 开启单页显示首页图标 */
  74. isHome: true,
  75. /* 固定导航 */
  76. navFixed: true,
  77. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  78. navTitle: {
  79. text: "我的信息",
  80. color: "",
  81. fontSize: "32rpx", // px upx rpx
  82. fontWeight: "normal", // 100 - 700
  83. },
  84. btnType: "type2",
  85. onLeftClick: "/pages/mycenter/mycenter",
  86. /* type2 按钮 */
  87. type2Config: {
  88. // 左图标
  89. leftPath: "/static/img/png2.png",
  90. // 右图标
  91. rightPath: "/static/img/png4.png",
  92. // 圆角
  93. radius: "40rpx",
  94. },
  95. },
  96. }
  97. },
  98. onLoad() {
  99. uni.showLoading({
  100. title: '加载中'
  101. });
  102. this.getInfoTable();
  103. },
  104. methods: {
  105. getInfoTable() {
  106. this.$https.get('/youngee/c/g/get-info-tables')
  107. .then(res => {
  108. console.log(res)
  109. this.taskStageList = res.data.data.TaskStage
  110. this.getList()
  111. })
  112. },
  113. getList() {
  114. console.log("run func getList")
  115. this.$https.get('/youngee/c/t/g/get-task-brief-list').then(res => {
  116. console.log(res)
  117. this.allList = res.data.data.all_Task_info_list
  118. if (this.allList != null) {
  119. for (let i = 0; i < this.allList.length; ++i) {
  120. for (let j = 0; j < this.taskStageList.length; ++j) {
  121. if (this.allList[i].task_stage == this.taskStageList[j].task_stage_id)
  122. this.allList[i].task_stage_txt = this.taskStageList[j].task_stage
  123. }
  124. }
  125. }
  126. console.log(this.allList)
  127. uni.hideLoading();
  128. })
  129. },
  130. toApply() {
  131. uni.navigateTo({
  132. url: '/pages/mycenter/mytask/applytask'
  133. });
  134. },
  135. toexecute() {
  136. uni.navigateTo({
  137. url: '/pages/mycenter/mytask/executetask'
  138. });
  139. },
  140. toEnd() {
  141. uni.navigateTo({
  142. url: '/pages/mycenter/mytask/endtask'
  143. });
  144. },
  145. toDetail(item) {
  146. console.log("func toDetail running")
  147. uni.navigateTo({
  148. url: '/pages/workspace/taskdetail?taskId=' + item.task_id,
  149. success(res) {
  150. console.log(res);
  151. },
  152. fail(err) {
  153. console.log(err);
  154. }
  155. });
  156. console.log("func toDetail end")
  157. },
  158. }
  159. }
  160. </script>
  161. <style lang="scss" scoped>
  162. view {
  163. font-size: 14px;
  164. line-height: inherit;
  165. }
  166. .menu {
  167. position: fixed;
  168. top: 180rpx;
  169. border-bottom: #FCCF41;
  170. background-color: #FFFFFF;
  171. justify-content: space-around;
  172. height: 5%;
  173. width: 100%;
  174. display: flex;
  175. z-index: 10;
  176. }
  177. .menu-item p {
  178. font-weight: 600;
  179. &.lor {
  180. border-bottom: 5rpx solid #F0D232;
  181. color: #F0D232;
  182. padding-bottom: 15rpx;
  183. }
  184. }
  185. .home {
  186. margin-top: 100rpx;
  187. }
  188. .task {
  189. margin-bottom: 20rpx;
  190. border-bottom: 1rpx #d7d7d7 solid;
  191. .task-head {
  192. display: flex;
  193. justify-content: space-between;
  194. align-items: center;
  195. padding: 10rpx 20rpx;
  196. .task-head-account {
  197. display: flex;
  198. }
  199. .task-head-status {
  200. color: red;
  201. }
  202. }
  203. .task-info {
  204. display: flex;
  205. align-items: center;
  206. padding: 10rpx 20rpx;
  207. }
  208. }
  209. .line {
  210. border-bottom: 1rpx #AAAAAA solid;
  211. }
  212. </style>