Commit 63d2c875 authored by zhanglw's avatar zhanglw

1安装包打开提示框处理2折线图颜色区分3首次登录json报错问题处理

parent e1da9a8f
...@@ -2,19 +2,20 @@ import Vue from 'vue' ...@@ -2,19 +2,20 @@ import Vue from 'vue'
import { resErrorDeal } from './util.js' import { resErrorDeal } from './util.js'
import msgTip from "./msgTip.js" import msgTip from "./msgTip.js"
const BASEURL = 'http://192.168.3.23:8086' // 研发环境url // const BASEURL = 'http://192.168.3.23:8086' // 研发环境url
console.log(resErrorDeal) const BASEURL = 'http://117.34.103.191:8086' // 生产环境url
export default { export default {
/** /**
* 封装请求(async await 封装uni.request) * 封装请求(async await 封装uni.request)
*/ */
async call(paramObj) { async call(paramObj) {
let resultObj = false, cb = paramObj.cb; let resultObj = false, cb = paramObj.cb;
const header = { let header = {
'Accept':'application/json, text/plain, */*', 'Accept':'application/json, text/plain, */*',
'Authorization':'Bearer ' + JSON.parse(uni.getStorageSync('userInfo')).token
} }
if(uni.getStorageSync('userInfo')){
header['Authorization'] = 'Bearer ' + JSON.parse(uni.getStorageSync('userInfo')).token
}
let opt = { let opt = {
url: BASEURL + paramObj.url, // 域名+接口地址 url: BASEURL + paramObj.url, // 域名+接口地址
data: paramObj.data, data: paramObj.data,
......
{ {
"name" : "shenmu", "name" : "shenmu",
"appid" : "__UNI__093C827", "appid" : "__UNI__093C827",
"description" : "uni-app 框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机扫码快速体验 uni-app 的强大功能", "description" : "神木农业APP",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
"Speech" : {}, "Speech" : {},
"VideoPlayer" : {} "VideoPlayer" : {}
}, },
"compatible" : { "compatible" : {
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
}, },
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute" : {
/* android打包配置 */ /* android打包配置 */
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
export default { export default {
data() { data() {
return { return {
baseUrl: "http://192.168.3.23:8086", // baseUrl: "http://192.168.3.23:8086",
form: { form: {
username: 'shenmu', username: 'shenmu',
password: 'shenmu123' password: 'shenmu123'
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
} }
}, },
methods: { methods: {
async onLogin() { onLogin() {
const res = await this.$API.call({ this.$API.call({
url: '/auth/login2', url: '/auth/login2',
data: this.form, data: this.form,
method: 'POST', method: 'POST',
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
} }
}) })
}, },
async getProList() { getProList() {
const res = await this.$API.call({ this.$API.call({
url: '/api/static', url: '/api/static',
cb: (res) => { cb: (res) => {
if (res.data) { if (res.data) {
......
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
$this: _self, //指针 $this: _self, //指针
canvasId: canvasId, //id canvasId: canvasId, //id
type: 'line', //类型 type: 'line', //类型
colors: ['#1e90ff'], //每一条的颜色 // colors: ['#1e90ff'], //每一条的颜色
fontSize: 11, //字体大小 fontSize: 11, //字体大小
padding: [10, 10, 0, 10], //空白区域值 padding: [10, 10, 0, 10], //空白区域值
legend: { //图例相关配置 legend: { //图例相关配置
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment