From 476de6e2466729742048df8c83348839492032de Mon Sep 17 00:00:00 2001
From: chen <2659004835@qq.com>
Date: Sat, 2 Apr 2022 09:17:26 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=9F=9F=E5=90=8D=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=8F=96=E6=B6=88H5=E5=9F=9F=E5=90=8D?=
=?UTF-8?q?=E8=B7=A8=E5=9F=9F=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 6 ++----
jsFile/requst.js | 13 +++++++++----
manifest.json | 2 +-
pages/tabbar/my/my.vue | 16 ++++------------
4 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/App.vue b/App.vue
index cf970ac..faaa40c 100644
--- a/App.vue
+++ b/App.vue
@@ -10,12 +10,10 @@
onLaunch: function() {
// 配置全局域名
// #ifdef APP-PLUS
- // uni.setStorageSync('hostapi','http://maintain.7and5.cn');
- getApp().globalData.hostapi = 'http://maintain.7and5.cn';
+ getApp().globalData.hostapi = 'https://7and5.cn';
// #endif
// #ifdef MP-WEIXIN
- // uni.setStorageSync('hostapi','http://maintain.7and5.cn');
- this.globalData.hostapi = 'http://maintain.7and5.cn';
+ this.globalData.hostapi = 'https://7and5.cn';
// #endif
// #ifdef H5
// uni.setStorageSync('hostapi','/web');
diff --git a/jsFile/requst.js b/jsFile/requst.js
index ddbe154..00e0d18 100644
--- a/jsFile/requst.js
+++ b/jsFile/requst.js
@@ -3,13 +3,14 @@ const ENV = process.env.NODE_ENV;
console.log(ENV,'当前环境'); // development:开发环境 test:测试环境 production:生产环境
// 配置全局域名
// #ifdef APP-PLUS
- const hostapi = 'http://maintain.7and5.cn';
+ const hostapi = 'https://7and5.cn';
// #endif
// #ifdef MP-WEIXIN
- const hostapi = 'http://maintain.7and5.cn';
+ const hostapi = 'https://7and5.cn';
// #endif
// #ifdef H5
- const hostapi = '/web';
+ // const hostapi = '/web';
+ const hostapi = 'https://7and5.cn';
// #endif
// 清理所有缓存并前往授权页
const goLogin = () => {
@@ -88,11 +89,14 @@ const request = (method, url, options) => {
if(options!=undefined) params = options;
// params.token = uni.getStorageSync('token');
return new Promise((resolve, reject) => {
+ console.log(hostapi,91);
uni.request({
url: `${hostapi}${url}`,
method: methods,
data: params,
header: headers,
+ // sslVerify:false,//验证 ssl 证书 仅App安卓端支持
+ // withCredentials:true,//跨域请求时是否携带凭证(cookies)仅H5支持
success: res => {
console.log(`${url}返的结果===>`,res);
if (res.statusCode == 200) {
@@ -117,7 +121,6 @@ const request = (method, url, options) => {
// 上传文件 封装请求
const uploadFile = (url, options) => {
let tempData = options || {}
- console.log(tempData,108);
return new Promise((resolve, reject) => {
uni.uploadFile({
url: `${hostapi}${url}`,
@@ -125,6 +128,8 @@ const uploadFile = (url, options) => {
name: 'image',
fileType:'image',
formData: tempData,
+ // sslVerify:false,//验证 ssl 证书 仅App安卓端支持
+ // withCredentials:true,//跨域请求时是否携带凭证(cookies)仅H5支持
header: {
'Content-Type': 'multipart/form-data;charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || '',
diff --git a/manifest.json b/manifest.json
index a0ee592..4839c28 100644
--- a/manifest.json
+++ b/manifest.json
@@ -111,7 +111,7 @@
"https" : false,
"proxy" : {
"/web" : {
- "target" : "http://maintain.7and5.cn",
+ "target" : "https://7and5.cn",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
diff --git a/pages/tabbar/my/my.vue b/pages/tabbar/my/my.vue
index feb798c..e949c6a 100644
--- a/pages/tabbar/my/my.vue
+++ b/pages/tabbar/my/my.vue
@@ -59,8 +59,7 @@
{{item.num}}%
+ :duration="500" bgColor="transparent">{{item.num}}%
{{item.title}}
@@ -123,15 +122,15 @@
],
percentageList: [{
title: '预约及时率',
- num: 100
+ num: 0
},
{
title: '上门准时率',
- num: 60
+ num: 0
},
{
title: '项目报修率',
- num: 40
+ num: 0
},
],
gridList: [{
@@ -197,13 +196,6 @@
this.$toolAll.tools.showToast('退出成功');
// 清除所有缓存
uni.clearStorageSync();
- // 配置全局域名
- // #ifdef APP-PLUS
- uni.setStorageSync('hostapi', 'http://maintain.7and5.cn');
- // #endif
- // #ifdef H5
- uni.setStorageSync('hostapi', '/web');
- // #endif
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'