NoLoginTip.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <!--
  3. show-cancel-button
  4. confirm-color="#ffffff"
  5. confirm-text="立即登录"
  6. cancel-text="暂不登录"
  7. @confirm="confirm"
  8. @cancel="cancel"
  9. -->
  10. <u-modal :show-confirm-button="false" v-model="show" title="您还未登录">
  11. <view style="text-align: center;">
  12. <view style="font-size: 24rpx; color: #666;padding: 20rpx; 0">请先登录之后再进行操作</view>
  13. <image style="width: 200rpx; height: 200rpx;margin-bottom: 20rpx;" src="https://onlineimg.qianniao.vip/login-tip.jpg" mode="aspectFit"></image>
  14. <view class="m-btn-ul">
  15. <view class="m-btn-li" @click="cancel">暂不登录</view>
  16. <view class="m-btn-li confirm-btn primary-bg" >
  17. <Login @loginSuccess="loginSuccess"><view slot="lBtn" style="color: #fff;">立即登录</view></Login>
  18. </view>
  19. </view>
  20. </view>
  21. </u-modal>
  22. </template>
  23. <script>
  24. import Login from '@/components/Login.vue';
  25. export default {
  26. components: {
  27. Login
  28. },
  29. props: {
  30. show: {
  31. type: Boolean,
  32. default: false
  33. }
  34. },
  35. data() {},
  36. methods: {
  37. loginSuccess() {
  38. this.cancel();
  39. },
  40. confirm() {
  41. // #ifdef APP-PLUS
  42. uni.reLaunch({
  43. url: '/pagesT/public/wxLogin'
  44. });
  45. // #endif
  46. // #ifdef MP-WEIXIN || MP-TOUTIAO
  47. uni.reLaunch({
  48. url: '/pages/binding/bindInfo'
  49. });
  50. //#endif
  51. // #ifdef H5
  52. uni.reLaunch({
  53. url: '/pagesT/public/wxLogin?loginType=2'
  54. });
  55. // #endif
  56. },
  57. cancel() {
  58. console.log(123)
  59. this.$emit('cancel');
  60. }
  61. }
  62. };
  63. </script>
  64. <style lang="scss">
  65. .m-btn-ul {
  66. display: flex;
  67. border-top: 1px solid #f4f4f4;
  68. .m-btn-li {
  69. flex: 2;
  70. font-size: 28upx;
  71. line-height: 88upx;
  72. }
  73. .confirm-btn {
  74. color: #ffffff;
  75. }
  76. }
  77. </style>