12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <script>
- const uat_URL = 'https://carwash.test.zyucgj.com/cw-wechat/' // 预发布
- // const uat_URL = 'http://192.168.16.103:8103/cw-wechat/' // 本地
- const pro_URL = 'https://carwash.zyucgj.com/cw-wechat/' // 生产
- const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
- const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url
- const envText = ['预发布环境','生产环境']
- const envTips = process.env.NODE_ENV == 'development' ? envText[0] : envText[buildType]
- export default {
- globalData: {
- baseUrl: process.env.NODE_ENV == 'development' ? uat_URL : buildURL,
- token: '',
- version: '', // 当前版本号
- buildType: buildType,
- envTips: envTips
- },
- mounted() {
- // 非V3模式
- if(this.$scope){
- this.$scope.globalData.token = this.$store.state.vuex_token
- }else{
- // V3模式
- getApp({allowDefault: true}).globalData.token = this.$store.state.vuex_token
- }
- },
- onLaunch: function() {
- console.log('App onLaunch')
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- },
- }
- </script>
- <style lang="scss">
- @import "uview-ui/index.scss";
- /*每个页面公共css */
- page {
- min-height: 100%;
- display: flex;
- background: #fff;
- }
-
- /* #ifdef MP-BAIDU */
- page {
- width: 100%;
- height: 100%;
- display: block;
- }
- /* #endif */
-
- /* #ifdef MP-ALIPAY */
- page {
- min-height: 100vh;
- }
-
- /* #endif */
-
- /* 原生组件模式下需要注意组件外部样式 */
- m-input {
- width: 100%;
- min-height: 100%;
- display: flex;
- }
-
- .content {
- display: flex;
- flex: 1;
- flex-direction: column;
- background-color: #fff;
- padding: 20upx;
- }
- </style>
|