refactor(javascript):移除esm,es6语法

This commit is contained in:
zhengxinonly
2021-12-08 15:43:10 +08:00
parent 820ab9f5c6
commit 3453b01938
21 changed files with 75 additions and 193 deletions
+2 -4
View File
@@ -38,9 +38,7 @@
{% block models_script %}
<script type="module">
import { USER_API } from '/static/api/http.js'
<script>
layui.use(['jquery', 'layer', 'cropper', 'popup'], function () {
let $ = layui.jquery
let layer = layui.layer
@@ -79,7 +77,7 @@
// 修改 avatar 字段
$.ajax({
method: 'put',
url: USER_API.USER_AVATAR($('#user_id').val()),
url: '/api/v1/users/user/' + $('#user_id').val() + '/avatar',
data: JSON.stringify({ avatar: result.data }),
dataType: 'json',
contentType: 'application/json',