dmLoginNotice.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <dmDialog ref='popView' :isShowTitle="true" title="登录提醒" :isShowClose="true" :isShowConfirm="false" >
  3. <view class="content">
  4. <text class="desc">您还未进行登录,点此登录\n查看及使用完整功能</text>
  5. <view class="confirm" @click="toLogin">
  6. 去登录
  7. </view>
  8. </view>
  9. </dmDialog>
  10. </template>
  11. <script>
  12. import dmDialog from "./dmDialog.vue"
  13. export default{
  14. data(){
  15. return {
  16. }
  17. },
  18. methods:{
  19. show() {
  20. this.$refs.popView.show()
  21. },
  22. knowAction(){
  23. this.$refs.popView.hide()
  24. },
  25. hide(){
  26. this.knowAction();
  27. },
  28. toLogin(){
  29. this.$refs.popView.hide()
  30. uni.$emit('login');
  31. }
  32. },
  33. mounted() {
  34. uni.$on('unLogin',()=>{
  35. this.show();
  36. })
  37. uni.$on('request',()=>{
  38. this.hide();
  39. })
  40. },
  41. components:{
  42. dmDialog
  43. }
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .content{
  48. width: 100%;
  49. height: 270rpx;
  50. display: flex;
  51. flex-direction: column;
  52. align-items: center;
  53. .desc{
  54. font-size: 28rpx;
  55. font-family: Verdana, Verdana-Regular;
  56. font-weight: 400;
  57. text-align: center;
  58. color: #666666;
  59. margin-top: 30rpx;
  60. }
  61. .confirm{
  62. width: 410rpx;
  63. height: 80rpx;
  64. line-height: 80rpx;
  65. background: #f07423;
  66. border-radius: 40rpx;
  67. box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(240,116,35,0.37);
  68. font-size: 28rpx;
  69. font-family: Verdana, Verdana-Bold;
  70. font-weight: 700;
  71. text-align: center;
  72. color: #ffffff;
  73. margin-top: 50rpx;
  74. }
  75. }
  76. </style>