HuaTian.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="page">
  3. <view class="task-board">
  4. <view class="board-title">
  5. </view>
  6. <view class="bodyContent">
  7. <block v-for="(reward, index) in 20" :key="index">
  8. <view class="blank" v-if="index == 0 || index == 7 || index == 10"></view>
  9. <view class="item">
  10. <image src="../../static/island/huatian/suo.png" class="suo"></image>
  11. <image src="../../static/island/huatian/flower3.png" class="flower"></image>
  12. <image src="../../static/island/huatian/tian_suo.png" class="tian"></image>
  13. </view>
  14. <view class="blank" v-if="index == 2 || index == 9 || index == 12"></view>
  15. </block>
  16. </view>
  17. <view class="close">
  18. <image src="../../static/island/close.png" class="close"></image>
  19. </view>
  20. </view>
  21. <view class="guild">
  22. <view class="content">
  23. "欢迎来到花田!在这里,你将成为农场的主人,体验种植和经营农场的乐趣。首先,让我们来开垦一块土地吧。只需支付100金币即可解锁!"
  24. </view>
  25. <view class="title">
  26. 罗奇
  27. </view>
  28. <view class="npc">
  29. <image src="../../static/island/npc.png"></image>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. name: 'TaskDialog',
  37. components: {
  38. },
  39. props: {
  40. visible: {
  41. type: Boolean,
  42. default: false
  43. }
  44. },
  45. data() {
  46. return {
  47. tasks: [{
  48. title: '负债累累的冒险家',
  49. description: '终极目标就是偿还移民的债务,做一个无债一身轻的玩家',
  50. rewards: [{
  51. icon: '/static/icons/coin.png',
  52. text: '金币×3000'
  53. },
  54. {
  55. icon: '/static/icons/exp.png',
  56. text: '经验×3000'
  57. },
  58. {
  59. icon: '/static/icons/blueprint.png',
  60. text: '升级房屋图纸×1'
  61. }
  62. ],
  63. date: '2024/04/08',
  64. status: 'completed'
  65. },
  66. {
  67. title: '负债累累的冒险家',
  68. description: '终极目标就是偿还移民的债务,做一个无债一身轻的玩家',
  69. rewards: [{
  70. icon: '/static/icons/coin.png',
  71. text: '金币×3000'
  72. },
  73. {
  74. icon: '/static/icons/exp.png',
  75. text: '经验×3000'
  76. },
  77. {
  78. icon: '/static/icons/blueprint.png',
  79. text: '升级房屋图纸×1'
  80. }
  81. ],
  82. date: '2024/04/08',
  83. status: 'available'
  84. }
  85. ]
  86. }
  87. },
  88. methods: {
  89. onClose() {
  90. this.$emit('close')
  91. },
  92. handleTaskAction(task) {
  93. if (task.status === 'completed') {
  94. // 处理完成任务的逻辑
  95. uni.showToast({
  96. title: '任务已完成!',
  97. icon: 'success'
  98. })
  99. } else {
  100. // 处理领取任务的逻辑
  101. uni.showToast({
  102. title: '已领取任务',
  103. icon: 'success'
  104. })
  105. }
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="scss">
  111. @import './HuaTian.scss';
  112. </style>