Commit c6974668 authored by xinzhedeai's avatar xinzhedeai

add:商户编辑页面,管理员token更新

parent c9a7c41d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* 请求拦截、相应拦截、错误统一处理 * 请求拦截、相应拦截、错误统一处理
*/ */
// 环境的切换 // 环境的切换
axios.defaults.baseURL = 'http://192.168.2.16:8080' axios.defaults.baseURL = 'http://192.168.2.37:8080'
axios.defaults.timeout = 50000 axios.defaults.timeout = 50000
// post请求头 // post请求头
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
......
...@@ -11,7 +11,7 @@ if (window.env == 'dev') { ...@@ -11,7 +11,7 @@ if (window.env == 'dev') {
// admin账号token // admin账号token
axios.defaults.headers.common['Authorization'] = axios.defaults.headers.common['Authorization'] =
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ' 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiNTljMWVhMTMtODNmYy00OWI2LWI5YzMtM2VkNzliODFhZjg4In0.XHl0IpagNwLJBqW_s2n6Kzhs9eY-TrMUBfAO8oeikYRUH72eshEXwMsTyTWgVnX_okY4tuB4U124AeF6EO_qiQ'
}else{ }else{
axios.defaults.baseURL = 'https://gqyjpt.weihai.cn/prod-api' axios.defaults.baseURL = 'https://gqyjpt.weihai.cn/prod-api'
...@@ -120,17 +120,8 @@ var http3 = { ...@@ -120,17 +120,8 @@ var http3 = {
}, },
put: function(url, params) { put: function(url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios({ axios
url, .put(url, params)
method: 'post',
data: params,
headers: {
// 'Content-Type': 'application/json', // 'multipart/form-data;',
'Authorization': localStorage.getItem('Authorization'),
'requestType': 'put'
},
})
.then(res => { .then(res => {
let response = res.data let response = res.data
console.log('res.statusCode', response) console.log('res.statusCode', response)
......
html,
body {
background-color: #fff;
}
.wrapper {
/* padding: 0.2rem; */
}
/* 添加以下样式 */
.van-cell {
padding: 12px 16px;
}
.van-field__label {
font-weight: bold;
color: #000;
font-size: .28rem;
}
.van-field__control {
color: #737373;
}
.container {
text-align: center;
margin-top: .3rem;
}
.qr-card {
margin-bottom: 10px;
}
.save-btn {
width: 98%;
background: #1890ff;
color: #fff;
border: none;
padding: 7px 20px;
border-radius: 3px;
font-size: 16px;
cursor: pointer;
margin-bottom: .4rem;
}
.hideEle {
/* visibility: hidden; */
display: none;
}
.textStyleWrapper{
display: flex;
align-items: center;
padding-top: 0.12rem;
padding-bottom: 0.12rem;
}
.textStyleLabel{
display: inline-block;
width: 1.72rem;
min-width: 1.72rem;
padding: .2rem;
padding-left: .3rem;
color: #9b9fab;
font-size: .28rem;
font-weight: bold;
}
.textStyleText{
display: inline-block;
/* width: 1.72rem; */
padding: .2rem;
padding-left: 0;
color: #c8c9cc;
font-size: .28rem;
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>高区“码”上</title>
<script type="text/javascript" src="../sdk/includeHead.js"></script>
<script type="text/javascript" src="../sdk/axios_http3.js"></script>
<style>
/* 基础重置样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
/* 去除移动端点击高亮 */
}
body {
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
font-size: 16px;
background-color: #f8f9fa;
}
/* 表单容器 */
.form-container {
max-width: 750px;
/* 移动端最大宽度 */
margin: 20px auto;
padding: 0 15px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
/* 表单单项 */
.form-item {
display: flex;
align-items: center;
/* 垂直居中 */
height: 50px;
padding: 0 12px;
border-bottom: 1px solid #f0f2f5;
}
/* 最后一项去除下边框 */
.form-item:last-child {
border-bottom: none;
}
/* 表单标题 */
.form-label {
flex-shrink: 0;
/* 防止标题被压缩 */
width: 80px;
/* 标题固定宽度,可根据需求调整 */
color: #333;
font-size: 15px;
text-align: left;
/* 标题左对齐 */
}
/* 输入框容器 */
.form-input-wrap {
flex: 1;
/* 占据剩余空间 */
height: 100%;
display: flex;
align-items: center;
}
/* 输入框样式 */
.form-input {
width: 100%;
height: 32px;
/* 输入框高度小于容器,留出垂直空间 */
border: none;
outline: none;
font-size: 15px;
color: #666;
}
/* 输入框placeholder样式 */
.form-input::placeholder {
color: #999;
font-size: 14px;
}
/* 输入框聚焦效果 */
.form-input:focus {
color: #262626;
}
.imager-item-title {
height: 50px;
line-height: 50px;
padding: 0 12px;
font-size: 14px;
border-bottom: 1px solid #f0f2f5;
margin-bottom: 10px;
font-weight: 400;
}
</style>
</head>
<body>
<div id="app">
<div class="wrapper" v-cloak>
<div class="form-container">
<div class="form-item">
<span class="form-label">商家名称</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.unitName" class="form-input" placeholder="请输入姓名">
</div>
</div>
<div class="form-item">
<span class="form-label">负责人</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.owner" class="form-input" placeholder="请输入11位手机号"
pattern="[0-9]{11}">
</div>
</div>
<div class="form-item">
<span class="form-label">电话</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.merchantPhone" class="form-input"
placeholder="请输入联系地址">
</div>
</div>
<div class="form-item">
<span class="form-label">地址</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.businessAddress" v-model="formData.merchantPhone"
class="form-input" placeholder="请输入联系地址">
</div>
</div>
<div class="form-item">
<span class="form-label">场所类型</span>
<div class="form-input-wrap">
<select style="width: 4rem;height:.4rem;" name="" v-model="formData.smallPlaceTypeName"
@change="handlesmallPlaceTypeNameConfirm($event, item)">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>请上传门头图片</span>
<span></span>
</h5>
<div>
<van-uploader v-model="formData.storefrontPhotosH5" :max-count="4"
:after-read="handleFileUpload" class="uploader-wrapper" />
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>请上传营业执照图片</span>
<span></span>
</h5>
<div>
<van-uploader v-model="formData.businessLicensePhotosH5" :max-count="1"
:after-read="handleFileUpload" class="uploader-wrapper" />
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>请上传平面图片</span>
<span></span>
</h5>
<div>
<van-uploader v-model="formData.floorPlanPhotosH5" :max-count="1"
:after-read="handleFileUpload" class="uploader-wrapper" />
</div>
</div>
<button class="save-btn" style="margin-left: 50%; transform: translateX(-50%);" @click="save"
v-if="formData.qrCodeUrl">保存</button>
<div>
<h5 class="imager-item-title" style="border: none;">
<span>安全二维码</span>
<span></span>
</h5>
<div>
<img :src="formData.qrCodeUrl" style="margin-left: 50%; transform: translateX(-50%);" />
</div>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment