uniapp | 基础

作者: __书山有路__ | 来源:发表于2020-07-16 11:19 被阅读0次
    
    function setHeader()
    {
        // 公共响应头
        header('Content-Type: Application/json');
    
        // 如果需要跨域,写在这里
        header('Access-Control-Allow-Origin: *');
        header('Access-Control-Allow-Headers: Authorization,Referer, token-type,Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With,sign');
        header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE,OPTIONS');
    }
    
    
    export default {
        data() {
                return {
                }
            },
            onLoad(options) {
                
            },
            onShow() {
                
            },
            // 下拉刷新
            onPullDownRefresh() {
                setTimeout(function() {
                    uni.stopPullDownRefresh();
                }, 500);
            },
            onShareAppMessage(res) {
                
            },
            onShareTimeline() {
                return {
                    title: '',
                    query:'',
                    imageUrl: ''
                }
            },
            methods: {
                
            }
        }
    

    1.radio

    <radio class="wrapperFooterBoxRadio" :checked="is_agreement" @click="onCheckRadioApi"></radio>
    
    data() {
        return {
            is_agreement:false,
        }
    },
    onLoad(options) {   
    },
    methods: {
        onCheckRadioApi() {
            this.is_agreement = this.is_agreement == true?false:true
        },
    }
    
    {
                "path": "pages/home/my",
                "style": {
                    "navigationBarTitleText": "我的",
                    "enablePullDownRefresh": true
                }
            },
    // 下拉刷新
            onPullDownRefresh() {
                console.log('下拉刷新')
                setTimeout(function() {
                    uni.stopPullDownRefresh();
                }, 1000);
                //  接口整合一个
                this.getUserFindApi()
    
                this.getStatusApi()
    
            },
    
    
    

    相关文章

      网友评论

        本文标题:uniapp | 基础

        本文链接:https://www.haomeiwen.com/subject/vpcphktx.html