公共基础路径封装
// config.js
module.exports = {
// 测试
BASE_URL: 'https://cloud.chejj.cn',
// 正式
// BASE_URL: 'https://cloud.mycjj.com'
};
请求封装
// request.js
import config from '../config/baseUrl'
// 请求未返回时的loading
const showLoading = () => wx.showLoading({
title: '加载中...'
});
const hideLoading = () => wx.hideLoading(