瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.6 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="configPopup">
  3. <uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
  4. <view class="content">
  5. <view class="title">今日签到获取积分</view>
  6. <view class="un">{{ priceMap.sign_points }}</view>
  7. <view class="uni-color-btn"
  8. @click="submit">
  9. 签到
  10. </view>
  11. </view>
  12. </uv-popup>
  13. </view>
  14. </template>
  15. <script>
  16. import { mapState } from 'vuex'
  17. export default {
  18. data() {
  19. return {
  20. }
  21. },
  22. computed : {
  23. ...mapState(['headInfo', 'priceMap']),
  24. },
  25. mounted() {
  26. if(uni.getStorageSync('token')){
  27. this.getTodaySign()
  28. }
  29. },
  30. methods: {
  31. submit(){
  32. this.$api('sign', res => {
  33. if(res.code == 200){
  34. uni.showToast({
  35. title: '签到成功',
  36. icon: 'none'
  37. })
  38. this.$refs.popup.close()
  39. }
  40. })
  41. },
  42. getTodaySign(){
  43. this.$api('getTodaySign', res => {
  44. if(res.result){
  45. this.$refs.popup.open()
  46. }
  47. })
  48. },
  49. }
  50. }
  51. </script>
  52. <style scoped lang="scss">
  53. .configPopup {
  54. .content{
  55. padding: 30rpx 20rpx;
  56. text-align: center;
  57. overflow: scroll;
  58. height: 100%;
  59. width: 640rpx;
  60. box-sizing: border-box;
  61. display: flex;
  62. flex-direction: column;
  63. align-items: center;
  64. justify-content: center;
  65. .title{
  66. font-size: 30rpx;
  67. font-weight: 900;
  68. }
  69. .un{
  70. background-color: $uni-color;
  71. color: #fff;
  72. width: 200rpx;
  73. height: 200rpx;
  74. border-radius: 50%;
  75. display: flex;
  76. align-items: center;
  77. justify-content: center;
  78. font-size: 50rpx;
  79. font-weight: 900;
  80. margin-top: 50rpx;
  81. }
  82. .uni-color-btn{
  83. width: 80%;
  84. margin-top: 180rpx;
  85. }
  86. }
  87. }
  88. </style>