update .gitignore
|
|
@ -10,4 +10,13 @@ export async function init() {
|
|||
uni.setStorageSync('moreSearch', res.data.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const commonType = (num) => {
|
||||
return http.request({
|
||||
url: `/common/type/${num}`,
|
||||
})
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ export const login = (data) => {
|
|||
return http.request({
|
||||
url: '/Login/registerCode',
|
||||
method: 'POST',
|
||||
data: data
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const env='test' //test , production,local
|
|||
|
||||
export const encryptKey='1234567890123456' // http数据加解密的key
|
||||
|
||||
export const apiUrl='/czg/app'
|
||||
export const apiUrl='/czg/'
|
||||
export const h5Config = {
|
||||
production: 'https://dj-h5.hnsiyao.cn',
|
||||
test: 'https://web-api.hnsiyao.cn',
|
||||
|
|
|
|||
12
http/http.js
|
|
@ -125,7 +125,7 @@ function req(uri, data, method = "GET", showLoading = true, extParams = {}) {
|
|||
|
||||
// 默认 显示loading(控制 xxs 内 不提示loading )
|
||||
function request(args) {
|
||||
const {
|
||||
let {
|
||||
url,
|
||||
data,
|
||||
params,
|
||||
|
|
@ -133,6 +133,16 @@ function request(args) {
|
|||
showLoading = true,
|
||||
extParams = {}
|
||||
} = args
|
||||
if (params) {
|
||||
let result = ''
|
||||
Object.keys(params).forEach((key) => {
|
||||
if (!Object.is(params[key], undefined) && !Object.is(params[key], null) && !Object.is(JSON.stringify(params[key]), '{}')) {
|
||||
result += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + "&"
|
||||
}
|
||||
})
|
||||
url = url+'?'+result
|
||||
params = null
|
||||
}
|
||||
let headerObject = {}
|
||||
return commonsProcess(showLoading, () => {
|
||||
return uni.request(
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
import { reactive } from 'vue';
|
||||
import { onLoad} from '@dcloudio/uni-app'
|
||||
import http from '@/http/http.js';
|
||||
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
||||
let data = reactive({
|
||||
code: '',
|
||||
mobile: '',
|
||||
|
|
@ -48,7 +49,7 @@
|
|||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
function sendMsg() {
|
||||
async function sendMsg() {
|
||||
if (!data.mobile) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
|
|
@ -65,27 +66,23 @@
|
|||
uni.showLoading({
|
||||
title: '正在发送验证码...'
|
||||
})
|
||||
http.request({
|
||||
url:'app/Login/sendMsg/' + data.mobile + '/forget',
|
||||
}).then(res => {
|
||||
if ( res.code == 0 ) {
|
||||
data.sending = true;
|
||||
uni.showToast({
|
||||
title: '验证码发送成功请注意查收',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
data.countDown();
|
||||
} else {
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
title: '短信发送失败',
|
||||
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
||||
});
|
||||
}
|
||||
|
||||
uni.hideLoading();
|
||||
})
|
||||
let res = await setSendMsg(data.mobile,'forget')
|
||||
if ( res.code == 0 ) {
|
||||
data.sending = true;
|
||||
uni.showToast({
|
||||
title: '验证码发送成功请注意查收',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
data.countDown();
|
||||
} else {
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
title: '短信发送失败',
|
||||
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
||||
});
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@
|
|||
import { reactive } from 'vue';
|
||||
import { onLoad} from '@dcloudio/uni-app'
|
||||
import http from '@/http/http.js';
|
||||
import {setSendMsg} from '@/api/login/login.js';
|
||||
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
||||
import {commonType} from '@/api/login/login.js';
|
||||
|
||||
|
||||
let data = reactive({
|
||||
code: '',
|
||||
mobile: '',
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"hash": "33e53a44",
|
||||
"configHash": "048dba77",
|
||||
"lockfileHash": "e8b32e83",
|
||||
"browserHash": "98657dc5",
|
||||
"optimized": {
|
||||
"uview-plus": {
|
||||
"src": "../../../../../node_modules/uview-plus/index.js",
|
||||
"file": "uview-plus.js",
|
||||
"fileHash": "3e411044",
|
||||
"needsInterop": false
|
||||
},
|
||||
"lodash": {
|
||||
"src": "../../../../../node_modules/lodash/lodash.js",
|
||||
"file": "lodash.js",
|
||||
"fileHash": "85fde04d",
|
||||
"needsInterop": true
|
||||
},
|
||||
"gm-crypto": {
|
||||
"src": "../../../../../node_modules/gm-crypto/dist/index.esm.js",
|
||||
"file": "gm-crypto.js",
|
||||
"fileHash": "e99227be",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-LQ2VYIYD": {
|
||||
"file": "chunk-LQ2VYIYD.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"type": "module"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 732 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |