LUCAS 2 years ago
parent
commit
e2f7951c08
  1. 2
      api/utils/xlsxDownload.js
  2. 18
      weapp/src/config.js
  3. 4
      weapp/src/pages/user/index.jsx
  4. 2
      web/package.json

2
api/utils/xlsxDownload.js

@ -63,7 +63,7 @@ async function simpleExcelDown ({ data = [], header = [], fileName = moment().fo
let type = data[i][h.key]
if (type == 'road') {
cell.value = '道路'
} else if (type == 'birdge') {
} else if (type == 'bridge') {
cell.value = '桥梁'
} else if (type == 'culvert') {
cell.value = '涵洞'

18
weapp/src/config.js

@ -1,5 +1,5 @@
let DEV = false;
DEV = true; //使用测试环境
// DEV = true; //使用测试环境
const baseConfig = {
errorHandle: false, //是否启用全局异常处理‌‍‍‌‍​‌‌‍​‌‌‌‌‌​‌‌‍‌​‍‌‌‌‌​‍‍‍‍‌​‌‍‍‌‍​‌‌‍​‍‍‍‌‌​‍‌‌‌‌​‍‌‍‌​‍‌‌‌O
@ -8,20 +8,22 @@ const baseConfig = {
};
const development = {
// baseUrl: 'http://221.230.55.29:31919',
baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
baseUrl: 'http://221.230.55.29:31919',
// baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
// webUrl: 'https://smartwater.anxinyun.cn',
// pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',
imgUrl: 'http://rfkimpwbb.hn-bkt.clouddn.com/',
// imgUrl: 'http://rfkimpwbb.hn-bkt.clouddn.com/',
imgUrl: 'http://resources-test.anxinyun.cn/',
// requestCache: true, //开启异步请求缓存
...baseConfig
};
const production = {
baseUrl: 'https://wxapp.free-sun.vip/v1/api',
webUrl: 'http://218.3.150.105:8998',
pcode: 'b3718361-f7db-4058-98a6-071393d0420c',
imgUrl: 'http://test.resources.anxinyun.cn/',
baseUrl: 'https://sihao.anxinyun.cn/_api',
// baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
// webUrl: 'https://smartwater.anxinyun.cn',
// pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',
imgUrl: 'http://resources.anxinyun.cn/',
...baseConfig
};

4
weapp/src/pages/user/index.jsx

@ -4,6 +4,7 @@ import { View, Button, Image } from '@tarojs/components';
import { logout } from '@/actions/auth';
import { getLogoutUrl } from '@/services/api';
import cfg from '../../config';
import { getState } from '../../store/globalState';
import './index.scss';
import headImg from '../../static/img/my/head.png';
import moreImg from '../../static/img/my/more.svg';
@ -39,8 +40,9 @@ const Index = ({ ...props }) => {
title: '提示',
content: '确定退出登录吗',
success: function (res) {
let token = getState('token') || Taro.getStorageSync('token')
if (res.confirm) {
logout(getLogoutUrl()).then(() => {
logout(getLogoutUrl(), { token }).then(() => {
Taro.reLaunch({
url: '/pages/auth/login/login'
});

2
web/package.json

@ -6,7 +6,7 @@
"scripts": {
"test": "mocha",
"start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5000 -u http://localhost:4000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"start-params": "node server -p 5000 -u http://localhost:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"deploy": "export NODE_ENV=production&&npm run color && npm run build && node server",
"build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",

Loading…
Cancel
Save