加油站付款小程序,打印小票
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.

99 lines
1.6 KiB

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