Browse Source

上传

master
前端-胡立永 2 months ago
parent
commit
cf1efb4f84
5 changed files with 24 additions and 24 deletions
  1. +3
    -3
      api/api.js
  2. +16
    -16
      api/http.js
  3. +3
    -3
      config.js
  4. +1
    -1
      manifest.json
  5. +1
    -1
      pages_order/auth/wxLogin.vue

+ 3
- 3
api/api.js View File

@ -48,9 +48,9 @@ export function api(key, data, callback, loadingTitle) {
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
// utils.toLogin()
// console.error('需要登录')
// return
utils.toLogin()
console.error('需要登录')
return
}
}


+ 16
- 16
api/http.js View File

@ -25,23 +25,23 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.hideLoading();
}
// if(res.statusCode == 401 ||
// res.data.message == '操作失败,token非法无效!' ||
// res.data.message == '操作失败,用户不存在!'){
// uni.removeStorageSync('token')
// console.error('登录过期');
// utils.toLogin()
// }
if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){
uni.removeStorageSync('token')
console.error('登录过期');
utils.toLogin()
}
// if(res.statusCode == 200 && res.data.code != 200
// && res.data.code != 902){
// uni.showToast({
// mask: true,
// duration: 1000,
// title: res.data.message,
// icon:'none'
// });
// }
if(res.statusCode == 200 && res.data.code != 200
&& res.data.code != 902){
uni.showToast({
mask: true,
duration: 1000,
title: res.data.message,
icon:'none'
});
}
callback(res.data)
},


+ 3
- 3
config.js View File

@ -7,16 +7,16 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
const type = 'dev'
// 环境配置
const config = {
dev : {
baseUrl : 'http://h5.xzaiyp.top/rice-admin',
baseUrl : 'http://h5.xzaiyp.top/jewelry-admin',
},
prod : {
baseUrl : 'https://admin.szqwdgidm.com/rice-admin',
baseUrl : 'https://jewelry-admin.hhlm1688.com/jewelry-admin',
}
}


+ 1
- 1
manifest.json View File

@ -52,7 +52,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxf7152f59d366236b",
"appid" : "wx28679cb649907e7e",
"setting" : {
"urlCheck" : false
},


+ 1
- 1
pages_order/auth/wxLogin.vue View File

@ -35,7 +35,7 @@
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#A3D250"
activeColor="#E3441A"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="$refs.popup.open('user_xy')">用户协议</text>


Loading…
Cancel
Save