qzc-dev
parent
c97abae226
commit
6476c0846e
2
main.js
2
main.js
|
|
@ -10,7 +10,7 @@ import {
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
uni.$http = $http
|
uni.$http = $http
|
||||||
// $http.baseUrl = 'http://36.139.207.50:18083'
|
// $http.baseUrl = 'http://36.139.207.50:18083'
|
||||||
$http.baseUrl = 'http://223.75.53.124:8002/chibirsvr/sys'
|
$http.baseUrl = 'http://223.75.53.124:8002/chibirsvr'
|
||||||
// 请求拦截器
|
// 请求拦截器
|
||||||
$http.beforeRequest = function(options) {
|
$http.beforeRequest = function(options) {
|
||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async getSwiperList() {
|
async getSwiperList() {
|
||||||
try {
|
try {
|
||||||
const res = await uni.$http.get("/getLoginInfo");
|
const res = await uni.$http.get("/sys/getLoginInfo");
|
||||||
console.log("--c-", res.data);
|
console.log("--c-", res.data);
|
||||||
|
|
||||||
this.userList = res.data;
|
this.userList = res.data;
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async getSwiperList() {
|
async getSwiperList() {
|
||||||
try {
|
try {
|
||||||
const res = await uni.$http.get("/getLoginInfo");
|
const res = await uni.$http.get("/sys/getLoginInfo");
|
||||||
console.log("--1-", res.data);
|
console.log("--1-", res.data);
|
||||||
this.userList = res.data;
|
this.userList = res.data;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,14 +156,14 @@ export default {
|
||||||
|
|
||||||
//提交表单
|
//提交表单
|
||||||
|
|
||||||
uni.$http.post('/doLogin', postForm).then(res => {
|
uni.$http.post('/sys/doLogin', postForm).then(res => {
|
||||||
uni.showLoading({ title: '努力登录中...', mask: true })
|
uni.showLoading({ title: '努力登录中...', mask: true })
|
||||||
|
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
//localStorage保存token
|
//localStorage保存token
|
||||||
if (res.data.data) {
|
if (res.data.data) {
|
||||||
uni.setStorageSync('Gs-Token', res.data.data)
|
uni.setStorageSync('Gs-Token', res.data.data)
|
||||||
uni.$http.get('/getLoginInfo').then(res => {
|
uni.$http.get('/sys/getLoginInfo').then(res => {
|
||||||
console.log('sss', res.data.data)
|
console.log('sss', res.data.data)
|
||||||
uni.setStorageSync('value', res.data.data)
|
uni.setStorageSync('value', res.data.data)
|
||||||
console.log('-----value------', res.data.data)
|
console.log('-----value------', res.data.data)
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
new_params.userId = uni.getStorageSync('value').userId
|
new_params.userId = uni.getStorageSync('value').userId
|
||||||
// console.log(formData)
|
// console.log(formData)
|
||||||
|
|
||||||
uni.$http.post('/user/updateSecretKey',new_params).then(res=>{
|
uni.$http.post('/sys/user/updateSecretKey',new_params).then(res=>{
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue