换上传二维码链接
This commit is contained in:
parent
b1b70396a3
commit
a4c13689de
31
01.html
Normal file
31
01.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Image Upload Example</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Image Upload Example</h1>
|
||||
|
||||
<form id="imageUploadForm" enctype="multipart/form-data">
|
||||
<input type="file" id="imageInput" name="image" accept="image/*">
|
||||
<button type="button" onclick="uploadImage()">Upload Image</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function uploadImage() {
|
||||
const form = document.getElementById('imageUploadForm');
|
||||
console.log(form);
|
||||
const formData = new FormData(form);
|
||||
|
||||
axios.post('http://example.com/upload', formData)
|
||||
.then(response => {
|
||||
console.log('Image uploaded successfully');
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error uploading image:', error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1,4 +1,4 @@
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"/><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.6d96b969.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.57cfedeb.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.dafb6d11.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display: none;"><script src="//v1.cnzz.com/z_stat.php?id=1281224882&web_id=1281224882"></script><script>var _hmt = _hmt || []
|
||||
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"/><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.6d96b969.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.beeec79c.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.dafb6d11.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display: none;"><script src="//v1.cnzz.com/z_stat.php?id=1281224882&web_id=1281224882"></script><script>var _hmt = _hmt || []
|
||||
;(function () {
|
||||
var hm = document.createElement("script")
|
||||
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746"
|
||||
|
File diff suppressed because one or more lines are too long
1
dist/js/edit.5857ee65.js
vendored
1
dist/js/edit.5857ee65.js
vendored
File diff suppressed because one or more lines are too long
1
dist/js/edit.9a2db7e2.js
vendored
Normal file
1
dist/js/edit.9a2db7e2.js
vendored
Normal file
File diff suppressed because one or more lines are too long
21
package-lock.json
generated
21
package-lock.json
generated
@ -18,7 +18,8 @@
|
||||
"vue-meta": "^3.0.0-alpha.2",
|
||||
"vue-router": "^4.0.3",
|
||||
"vue3-lazyload": "^0.3.6",
|
||||
"vuex": "^4.0.0"
|
||||
"vuex": "^4.0.0",
|
||||
"yarn": "^1.22.22"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
@ -10493,6 +10494,19 @@
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/yarn": {
|
||||
"version": "1.22.22",
|
||||
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.22.tgz",
|
||||
"integrity": "sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg==",
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
"yarn": "bin/yarn.js",
|
||||
"yarnpkg": "bin/yarn.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
@ -18178,6 +18192,11 @@
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
|
||||
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
|
||||
"dev": true
|
||||
},
|
||||
"yarn": {
|
||||
"version": "1.22.22",
|
||||
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.22.tgz",
|
||||
"integrity": "sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,8 @@
|
||||
"vue-meta": "^3.0.0-alpha.2",
|
||||
"vue-router": "^4.0.3",
|
||||
"vue3-lazyload": "^0.3.6",
|
||||
"vuex": "^4.0.0"
|
||||
"vuex": "^4.0.0",
|
||||
"yarn": "^1.22.22"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
|
@ -7,7 +7,7 @@ import store from "@/store/index"
|
||||
axios.defaults.baseURL = "https://app.gter.net"
|
||||
axios.defaults.emulateJSON = true
|
||||
axios.defaults.withCredentials = true
|
||||
|
||||
// content-type 为 multipart/form-data
|
||||
axios.interceptors.request.use(
|
||||
//响应拦截
|
||||
async config => {
|
||||
@ -20,7 +20,7 @@ axios.interceptors.request.use(
|
||||
if (config.url != "/tenement/pc/api/user/operation" && !noMask) showFullScreenLoading()
|
||||
// 开发时登录用的,可以直接替换小程序的 authorization
|
||||
// if (process.env.NODE_ENV == "development") config['headers']['authorization'] = "x2mmnl9grt51bpplj2k6ioiuummzhnw3"
|
||||
if (process.env.NODE_ENV == "development") config["headers"]["authorization"] = "b56e234d748d4203e3ce4caa0aedf70a"
|
||||
if (process.env.NODE_ENV == "development") config["headers"]["authorization"] = "95paemsnrr393p9vikpp16qo72"
|
||||
|
||||
// 当 noMask == true 和 confing.method == 'get' 时,删除 config.params['noMask']
|
||||
if (noMask && config.method == "get") delete config.params["noMask"]
|
||||
@ -100,6 +100,7 @@ const $post = (url, params) => {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//下面是vue3必须加的,vue2不需要,只需要暴露出去get,post方法就可以
|
||||
export default {
|
||||
get: $get,
|
||||
|
1235
src/views/edit.vue
1235
src/views/edit.vue
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user