uniapp | 基础


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



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 | 基础)