update .gitignore
@@ -10,4 +10,13 @@ export async function init() {
|
|||||||
uni.setStorageSync('moreSearch', res.data.value)
|
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({
|
return http.request({
|
||||||
url: '/Login/registerCode',
|
url: '/Login/registerCode',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const env='test' //test , production,local
|
|||||||
|
|
||||||
export const encryptKey='1234567890123456' // http数据加解密的key
|
export const encryptKey='1234567890123456' // http数据加解密的key
|
||||||
|
|
||||||
export const apiUrl='/czg/app'
|
export const apiUrl='/czg/'
|
||||||
export const h5Config = {
|
export const h5Config = {
|
||||||
production: 'https://dj-h5.hnsiyao.cn',
|
production: 'https://dj-h5.hnsiyao.cn',
|
||||||
test: 'https://web-api.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 )
|
// 默认 显示loading(控制 xxs 内 不提示loading )
|
||||||
function request(args) {
|
function request(args) {
|
||||||
const {
|
let {
|
||||||
url,
|
url,
|
||||||
data,
|
data,
|
||||||
params,
|
params,
|
||||||
@@ -133,6 +133,16 @@ function request(args) {
|
|||||||
showLoading = true,
|
showLoading = true,
|
||||||
extParams = {}
|
extParams = {}
|
||||||
} = args
|
} = 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 = {}
|
let headerObject = {}
|
||||||
return commonsProcess(showLoading, () => {
|
return commonsProcess(showLoading, () => {
|
||||||
return uni.request(
|
return uni.request(
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import http from '@/http/http.js';
|
import http from '@/http/http.js';
|
||||||
|
import {setSendMsg,registerCode} from '@/api/login/login.js';
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
code: '',
|
code: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
/**
|
/**
|
||||||
* 发送验证码
|
* 发送验证码
|
||||||
*/
|
*/
|
||||||
function sendMsg() {
|
async function sendMsg() {
|
||||||
if (!data.mobile) {
|
if (!data.mobile) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入手机号',
|
title: '请输入手机号',
|
||||||
@@ -65,27 +66,23 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在发送验证码...'
|
title: '正在发送验证码...'
|
||||||
})
|
})
|
||||||
http.request({
|
let res = await setSendMsg(data.mobile,'forget')
|
||||||
url:'app/Login/sendMsg/' + data.mobile + '/forget',
|
if ( res.code == 0 ) {
|
||||||
}).then(res => {
|
data.sending = true;
|
||||||
if ( res.code == 0 ) {
|
uni.showToast({
|
||||||
data.sending = true;
|
title: '验证码发送成功请注意查收',
|
||||||
uni.showToast({
|
icon: 'none',
|
||||||
title: '验证码发送成功请注意查收',
|
duration: 1000
|
||||||
icon: 'none',
|
})
|
||||||
duration: 1000
|
data.countDown();
|
||||||
})
|
} else {
|
||||||
data.countDown();
|
uni.showModal({
|
||||||
} else {
|
showCancel: false,
|
||||||
uni.showModal({
|
title: '短信发送失败',
|
||||||
showCancel: false,
|
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
||||||
title: '短信发送失败',
|
});
|
||||||
content: res.msg ? res.msg : '请一分钟后再获取验证码'
|
}
|
||||||
});
|
uni.hideLoading();
|
||||||
}
|
|
||||||
|
|
||||||
uni.hideLoading();
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,10 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
import { onLoad} from '@dcloudio/uni-app'
|
||||||
import http from '@/http/http.js';
|
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({
|
let data = reactive({
|
||||||
code: '',
|
code: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
|
|||||||
31
unpackage/dist/cache/.vite/deps/_metadata.json
vendored
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
3
unpackage/dist/cache/.vite/deps/package.json
vendored
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "module"
|
|
||||||
}
|
|
||||||
3689
unpackage/dist/cache/.vite/deps/uview-plus.js
vendored
|
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 |