帧视界壹通告,付费看视频的微信小程序
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.

84 lines
1.4 KiB

11 months ago
  1. <template>
  2. <uv-popup
  3. round="40rpx"
  4. :safeAreaInsetBottom="false"
  5. :closeOnClickOverlay="false"
  6. ref="popup">
  7. <view class="toast">
  8. <view class="title">
  9. 提示
  10. </view>
  11. <view class="content">
  12. 本小程序需要登录之后才可以正常使用
  13. </view>
  14. <view class="btnstwo">
  15. <view class="btn c"
  16. @click="cancel">
  17. 取消
  18. </view>
  19. <view class="btn"
  20. @click="login">
  21. 登录
  22. </view>
  23. </view>
  24. </view>
  25. </uv-popup>
  26. </template>
  27. <script>
  28. export default {
  29. name : 'toast',
  30. methods : {
  31. checkLogin(){
  32. if(!uni.getStorageSync('token')){
  33. this.$refs.popup.open();
  34. }
  35. },
  36. cancel(){
  37. this.$refs.popup.close();
  38. uni.redirectTo({
  39. url: '/pages/index/index'
  40. })
  41. },
  42. login(){
  43. this.$store.commit('login')
  44. this.$refs.popup.close()
  45. },
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .toast{
  51. width: 500rpx;
  52. .title{
  53. min-height: 70rpx;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. font-size: 32rpx;
  58. }
  59. .content{
  60. font-size: 28rpx;
  61. min-height: 200rpx;
  62. display: flex;
  63. flex-direction: column;
  64. justify-content: center;
  65. align-items: center;
  66. }
  67. .btnstwo{
  68. display: flex;
  69. .btn{
  70. flex: 1;
  71. background: $uni-linear-gradient-btn-color;
  72. color: #fff;
  73. padding: 20rpx 0;
  74. text-align: center;
  75. }
  76. .c{
  77. background: #fff;
  78. border-top: 1px solid #999;
  79. color: #333;
  80. }
  81. }
  82. }
  83. </style>