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

79 lines
1.3 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="$store.commit('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. uni.redirectTo({
  38. url: '/pages/index/index'
  39. })
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .toast{
  46. width: 500rpx;
  47. .title{
  48. min-height: 70rpx;
  49. display: flex;
  50. justify-content: center;
  51. align-items: center;
  52. font-size: 32rpx;
  53. }
  54. .content{
  55. font-size: 28rpx;
  56. min-height: 300rpx;
  57. display: flex;
  58. flex-direction: column;
  59. justify-content: center;
  60. align-items: center;
  61. }
  62. .btnstwo{
  63. display: flex;
  64. .btn{
  65. flex: 1;
  66. // background: $uni-linear-gradient-btn-color;
  67. color: #fff;
  68. padding: 20rpx 0;
  69. text-align: center;
  70. }
  71. .c{
  72. background: #fff;
  73. border-top: 1px solid #999;
  74. color: #333;
  75. }
  76. }
  77. }
  78. </style>