Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xinrenli-admin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
xinrenli-admin
Commits
d0ca0110
Commit
d0ca0110
authored
Apr 21, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联系热线
parent
0bfde124
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
3 deletions
+104
-3
src/api/connect/index.js
+18
-0
src/components/ImageUpload/index.vue
+1
-1
src/views/connect/index.vue
+83
-0
src/views/feedback/index.vue
+1
-1
vue.config.js
+1
-1
No files found.
src/api/connect/index.js
0 → 100644
View file @
d0ca0110
import
request
from
'@/utils/request'
// 查询系统配置列表
export
function
getConnectList
(
query
)
{
return
request
({
url
:
'/xinrenli/config/list'
,
method
:
'get'
,
params
:
query
})
}
// 修改系统配置列表
export
function
editConnectConfig
(
data
)
{
return
request
({
url
:
'/xinrenli/config/edit'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/components/ImageUpload/index.vue
View file @
d0ca0110
...
...
@@ -62,7 +62,7 @@ export default {
dialogVisible
:
false
,
hideUpload
:
false
,
baseUrl
:
process
.
env
.
VUE_APP_BASE_API
,
uploadImgUrl
:
"http://xinrenli.nyinhong.com/api/xinrenli/file/upload"
,
// 上传的图片服务器地址
uploadImgUrl
:
"http
s
://xinrenli.nyinhong.com/api/xinrenli/file/upload"
,
// 上传的图片服务器地址
headers
:
{
Authorization
:
"Bearer "
+
getToken
(),
},
...
...
src/views/connect/index.vue
0 → 100644
View file @
d0ca0110
<
template
>
<div
class=
"app-container"
>
<div
class=
"thirty-percent"
>
<el-form
ref=
"form"
:rules=
"rules"
:model=
"form"
label-width=
"80px"
>
<el-form-item
label=
"客服热线"
prop=
"hotline"
>
<el-input
v-model=
"form.hotline"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleSave"
>
保存
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</
template
>
<
script
>
import
{
getConnectList
,
editConnectConfig
}
from
"@/api/connect/index"
;
export
default
{
data
()
{
var
checkPhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
""
)
{
callback
(
new
Error
(
"请输入客服热线"
));
}
else
if
(
!
/^1
[
3|4|5|7|8
][
0-9
]{9}
$/
.
test
(
value
))
{
callback
(
new
Error
(
"请输入正确的手机号码"
));
}
else
{
callback
();
}
};
return
{
form
:
{
hotline
:
""
,
id
:
""
,
},
rules
:
{
hotline
:
[{
validator
:
checkPhone
,
required
:
true
,
trigger
:
"blur"
}],
},
};
},
mounted
()
{
console
.
log
(
"金"
);
this
.
getConnect
();
},
methods
:
{
//获取联系电话列表
getConnect
()
{
let
that
=
this
;
getConnectList
().
then
((
res
)
=>
{
console
.
log
(
"列表"
,
res
);
const
{
code
,
rows
}
=
res
;
if
(
res
.
code
==
200
)
{
if
(
rows
.
length
)
{
that
.
form
=
rows
[
0
];
// that.$set(that.form,'hotline',rows[0].hotline)
// that.$set(that.form,'id',rows[0].id)
}
}
});
},
handleSave
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// alert('submit!');
editConnectConfig
(
this
.
form
).
then
((
res
)
=>
{
const
{
code
}
=
res
;
if
(
code
!=
200
)
return
this
.
$message
.
error
(
"修改失败!"
);
this
.
getConnect
();
this
.
$message
.
success
(
"修改成功!"
);
});
}
else
{
console
.
log
(
"error submit!!"
);
return
false
;
}
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.thirty-percent
{
width
:
30%
;
}
</
style
>
src/views/feedback/index.vue
View file @
d0ca0110
<
template
>
<div>
<div
class=
"app-container"
>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
>
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
align=
"center"
>
</el-table-column>
...
...
vue.config.js
View file @
d0ca0110
...
...
@@ -35,7 +35,7 @@ module.exports = {
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://xinrenli.nyinhong.com/api`
,
target
:
`http
s
://xinrenli.nyinhong.com/api`
,
// target: `http://192.168.0.175:7001`,
changeOrigin
:
true
,
pathRewrite
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment