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

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