Bläddra i källkod

Merge branch 'main' of http://git.wdklian.com/allen/uni_mattress

dayu 2 år sedan
förälder
incheckning
dab50ce721
4 ändrade filer med 17 tillägg och 13 borttagningar
  1. 3 0
      .gitignore
  2. 4 0
      sleep/pages/home/index.vue
  3. 3 0
      sleep/pages/report/report.vue
  4. 7 13
      sleep/utils/request.js

+ 3 - 0
.gitignore

@@ -1,6 +1,9 @@
 .DS_Store
 node_modules/
 */unpackage
+**/unpackage
+/unpackage
+/sleep/unpackage
 dist/
 build/
 /node_modules

+ 4 - 0
sleep/pages/home/index.vue

@@ -617,6 +617,10 @@ export default {
         series: [
           {
             type: 'line',
+            lineStyle: {
+              width: 0.8
+            },
+            smooth: true, // 折线曲线
             showSymbol: false,
             hoverAnimation: false,
             data: [],

+ 3 - 0
sleep/pages/report/report.vue

@@ -774,6 +774,9 @@
           series: [
             {
               type: 'line',
+              lineStyle: {
+                width: 0.8
+              },
               showSymbol: false,
               hoverAnimation: false,
               data: yData,

+ 7 - 13
sleep/utils/request.js

@@ -17,7 +17,7 @@ export const API = {
 
 const config = {
 	timeout: 15000,
-	baseURL: api_mode === 'prod' ? API.buyer : API.base,
+	baseURL: API.buyer,
 	headers: {
 		'Content-Type':'application/x-www-form-urlencoded'
 	}
@@ -46,8 +46,7 @@ function service(options) {
 	if (options.config.loading){
 		uni.showLoading()
 	}
-	console.log('this.api_mode===', api_mode)
-	if (options.config.needToken && api_mode === 'prod'){
+	if (options.config.needToken){
 		let accessToken = Storage.getItem('access_token')
 		if (!accessToken) {
 			uni.reLaunch({
@@ -119,16 +118,11 @@ function service(options) {
 }
 
 export default function request(options){
-	if (api_mode === 'prod') {
-		if(/passport\/mini-program\/*|passport\/login-binder\/wap\/*|passport\/login\/*/.test(options.url)){
-			return service(options)
-		}else{
-			return checkToken(options).then(()=>{
-				return service(options)
-			})
-		}
-	} else {
+	if(/passport\/mini-program\/*|passport\/login-binder\/wap\/*|passport\/login\/*/.test(options.url)){
 		return service(options)
+	}else{
+		return checkToken(options).then(()=>{
+			return service(options)
+		})
 	}
-
 }