finish.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view>
  3. <view class="top_color"></view>
  4. <view class="content">
  5. <view class="title">{{name}}</view>
  6. <view class="game_box">
  7. <image :src="picture" mode="aspectFill"></image>
  8. <view class="tip">
  9. <view class="left">
  10. <view class="icon">
  11. <image src="./icon/icon.png" mode=""></image>
  12. </view>
  13. <view class="text">我的最快纪录</view>
  14. </view>
  15. <view class="right">{{completion_time}} 秒</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="btn_box">
  20. <view class="left">
  21. <view class="btn btn_1" @click="go_detail()"></view>
  22. <view class="btn btn_2" @click="again_btn()"></view>
  23. </view>
  24. <view class="right" @click="go_personal_rank()">
  25. <view class="btn">{{rank}}</view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. title: "",
  35. picture:"",
  36. name:"",
  37. completion_time:"",
  38. page_id:"",
  39. mine_code:"",
  40. // 排名
  41. rank:""
  42. };
  43. },
  44. onLoad(option) {
  45. uni.setNavigationBarTitle({
  46. title: option.title
  47. })
  48. this.name = option.name
  49. this.picture = option.picture
  50. this.title = option.title
  51. this.picture_id = option.picture_id
  52. this.$api.jigsawPuzzle_getPictureDetail({
  53. picture_id: this.picture_id,
  54. staff_num: uni.getStorageSync('user').staff_num
  55. }).then((res)=>{
  56. console.log(res.data.data)
  57. this.mine_code = res.data.data.mine_code
  58. this.completion_time = res.data.data.completion_time
  59. this.page_id = res.data.data.page_id
  60. this.rank = res.data.data.rank
  61. })
  62. },
  63. methods: {
  64. go_personal_rank() {
  65. uni.navigateTo({
  66. url: "../personal_rank/personal_rank?title="+this.name+"&picture_id="+this.picture_id
  67. })
  68. },
  69. // 再来一次
  70. again_btn() {
  71. uni.redirectTo({
  72. url: "../game_play/game_play?title="+this.title+"&picture_id="+this.picture_id+"&name="+this.name+"&picture="+this.picture,
  73. })
  74. },
  75. // 查看详情 关联二维码
  76. go_detail(){
  77. uni.navigateTo({
  78. url:"../../../../../index/record/record?pageId="+this.page_id+"&mine_code="+this.mine_code
  79. })
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="scss">
  85. page {
  86. background-color: #F3F8F7;
  87. }
  88. .top_color {
  89. z-index: 1;
  90. width: 750rpx;
  91. height: 100rpx;
  92. background-color: #009fe8;
  93. position: fixed;
  94. top: 1;
  95. left: 0;
  96. }
  97. .content {
  98. position: relative;
  99. top: 20rpx;
  100. z-index: 2;
  101. width: 750rpx;
  102. background-color: #FFFFFF;
  103. border-radius: 50rpx;
  104. padding-bottom: 40rpx;
  105. .title {
  106. text-align: center;
  107. font-size: 36rpx;
  108. font-weight: 700;
  109. height: 100rpx;
  110. line-height: 100rpx;
  111. }
  112. .game_box {
  113. box-sizing: border-box;
  114. padding: 0 35rpx;
  115. image {
  116. width: 680rpx;
  117. height: 680rpx;
  118. }
  119. .tip {
  120. margin-top: 20rpx;
  121. display: flex;
  122. justify-content: space-between;
  123. align-items: center;
  124. .left {
  125. display: flex;
  126. align-items: center;
  127. .icon {
  128. margin-right: 10rpx;
  129. image {
  130. width: 28rpx;
  131. height: 28rpx;
  132. }
  133. }
  134. .text {
  135. color: #4F4F4F;
  136. font-size: 26rpx;
  137. }
  138. }
  139. .right {
  140. font-size: 28rpx;
  141. }
  142. }
  143. }
  144. }
  145. .btn_box {
  146. margin-top: 30rpx;
  147. box-sizing: border-box;
  148. padding: 35rpx;
  149. height: 260rpx;
  150. display: flex;
  151. justify-content: space-between;
  152. .left {
  153. .btn {
  154. width: 400rpx;
  155. height: 125rpx;
  156. background-size: cover;
  157. background-repeat: no-repeat;
  158. }
  159. .btn_1 {
  160. margin-bottom: 8rpx;
  161. background-image: url(./icon/detail.png);
  162. }
  163. .btn_2 {
  164. background-image: url(./icon/again.png);
  165. }
  166. }
  167. .right {
  168. position: relative;
  169. width: 260rpx;
  170. height: 258rpx;
  171. background-image: url(./icon/rank.png);
  172. background-size: cover;
  173. background-repeat: no-repeat;
  174. .btn{
  175. position: absolute;
  176. top: 90rpx;
  177. left: 60rpx;
  178. font-size: 62rpx;
  179. color: #FFFFFF;
  180. }
  181. }
  182. }
  183. </style>