123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <template name="nologin">
- <view class="model-warp">
- <view class="model-alert">
- <view class="alert-content">
- <view class="t-h1">{{text}}</view>
- <view class="t-p">请联系客服获取邀请码后再登录,联系电话:{{telPhones}}</view>
- </view>
- <view class="alert-btn">
- <view class="btn btn-cancel" @click="hideModel">取消</view>
- <view class="btn btn-confirm" @click="goLogin">去登录</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default{
- name:'nologin',
- data(){
- return{
- text:'',
- telPhones:this.telPhone,
- productids:this.productid,
- type:this.alertType,
- tabPath:this.path
- }
- },
- props:{
- productid:Number,
- telPhone:String,
- alertType:String,
- path:Boolean
- },
- created(){
- this.getProductid()
- },
- methods:{
- getProductid(){
- this.$parent.tel
- switch(this.alertType){
- case '1':
- this.text ='需要登录之后才能加入购物车哟~'
- break;
- case '2':
- this.text ='需要登录之后才能购买哟~'
- break;
- case '3':
- this.text ='需要登录之后查看购物车哟~'
- break;
- case '4':
- this.text ='需要登录才能查看个人中心哟~'
- break;
- }
- },
- hideModel(){
- if(this.tabPath){
- uni.switchTab({
- url: '/pages/tabBar/home/home'
- });
- }else{
- this.$parent.isShowNoLogin=false;
- }
- },
- goLogin(){
- let self = this
- let url;
- if(self.alertType =='3'){
- url =`/pages/user-module/login-accont?type=1`
- }else if(self.alertType =='4'){
- url =`/pages/user-module/login-accont?type=2`
- }else{
- url=`/pages/user-module/login-accont?type=detilType&id=${self.productids}`
- }
- this.$parent.isShowNoLogin=false;
- uni.navigateTo ({
- url
- })
- },
- }
- }
- </script>
- <style>
-
- </style>
|