真实进度条+手机号校验

This commit is contained in:
2024-03-14 13:04:07 +08:00
parent e9e5edb52f
commit d38bb5f604
5 changed files with 2244 additions and 286 deletions

View File

@@ -1,10 +1,12 @@
<script type="text/javascript">
const baseUrl = 'http://59.110.212.44:9100/pb'
// function commonFun() {
// console.log("公共方法")
// }
export default {
baseUrl
//commonFun
}
const baseUrl = "http://192.168.110.100:9200/pb"//张川川后端
// const baseUrl = 'http://59.110.212.44:9100/pb'
// const baseUrl = 'https://testapi.nuttyreading.com'
// function commonFun() {
// console.log("公共方法")
// }
export default {
baseUrl,
//commonFun
};
</script>

View File

@@ -1,9 +1,23 @@
<template>
<div class="mod-config-wmzg">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item label="分类">
<el-select v-model="dataForm.dictType" placeholder="请选择分类" clearable @clear="clearValue">
<el-option v-for="(item,index) in typeList" :key="index" :label="item.dictValue" :value="item.dictType">
<el-select
v-model="dataForm.dictType"
placeholder="请选择分类"
clearable
@clear="clearValue"
>
<el-option
v-for="(item, index) in typeList"
:key="index"
:label="item.dictValue"
:value="item.dictType"
>
</el-option>
</el-select>
</el-form-item>
@@ -11,11 +25,27 @@
<el-input v-model="dataForm.ligthname" placeholder="请输入名称" clearable></el-input>
</el-form-item> -->
<el-form-item>
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
<el-button v-if="isAuth('book:shopproduct:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<el-button
@click="
pageIndex = 1;
getDataList();
"
>查询</el-button
>
<el-button
v-if="isAuth('book:shopproduct:save')"
type="primary"
@click="addOrUpdateHandle()"
>新增</el-button
>
</el-form-item>
</el-form>
<el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%"
>
<el-table-column header-align="center" align="center" label="分类">
<template slot-scope="scope">
{{ filterAA(scope.row.type) }}
@@ -23,16 +53,24 @@
</el-table-column>
<el-table-column label="名称" align="center">
<template slot-scope="scope">
<div v-if="scope.row.type == 1 || scope.row.type == 2">{{ scope.row.name }}</div>
<div v-if="scope.row.type == 1 || scope.row.type == 2">
{{ scope.row.name }}
</div>
<div v-if="scope.row.type == 3">{{ scope.row.name }}</div>
<!-- <img v-if="scope.row.type == 3" :src="scope.row.url" alt="" style="width:70px;height:100px" /> -->
</template>
</el-table-column>
<el-table-column label="资源url" align="center">
<template slot-scope="scope">
<a v-if="scope.row.type == 1 || scope.row.type == 2" :href="scope.row.url"
target="_blank">{{ scope.row.url }}</a>
<a v-if="scope.row.type == 3" :href="scope.row.url" target="_blank">{{ scope.row.url }}</a>
<a
v-if="scope.row.type == 1 || scope.row.type == 2"
:href="scope.row.url"
target="_blank"
>{{ scope.row.url }}</a
>
<a v-if="scope.row.type == 3" :href="scope.row.url" target="_blank">{{
scope.row.url
}}</a>
</template>
</el-table-column>
<el-table-column label="排序" align="center" width="50">
@@ -40,32 +78,75 @@
{{ scope.row.sort }}
</template>
</el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="editOrUpdateHandle(scope.row)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
<el-button
type="text"
size="small"
@click="editOrUpdateHandle(scope.row)"
>修改</el-button
>
<el-button
type="text"
size="small"
@click="deleteHandle(scope.row.id)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog :visible.sync="addOrUpdateVisible" :close-on-click-modal="false" :append-to-body="true" :title="titlesub"
width="50%" @close="cancleClose">
<el-form :inline="true" :model="addForm" ref="addFormRef" :rules="addFormRule" class="dialog-wmzg">
<el-dialog
:visible.sync="addOrUpdateVisible"
:close-on-click-modal="false"
:append-to-body="true"
:title="titlesub"
width="50%"
@close="cancleClose"
>
<el-form
:inline="true"
:model="addForm"
ref="addFormRef"
:rules="addFormRule"
class="dialog-wmzg"
>
<el-row type="flex" justify="center">
<el-form-item label="分类" prop="type" label-width="100px">
<el-select v-model="addForm.type" placeholder="请选择分类" style="width: 500px;">
<el-option v-for="(item,index) in typeList" :key="index" :label="item.dictValue" :value="item.dictType">
<el-select
v-model="addForm.type"
placeholder="请选择分类"
style="width: 500px"
>
<el-option
v-for="(item, index) in typeList"
:key="index"
:label="item.dictValue"
:value="item.dictType"
>
</el-option>
</el-select>
</el-form-item>
</el-row>
<el-row type="flex" justify="center">
<el-form-item label="名称" prop="name" label-width="100px">
<el-input style="width:500px" v-model="addForm.name"></el-input>
<el-input style="width: 500px" v-model="addForm.name"></el-input>
</el-form-item>
</el-row>
<!-- <el-row type="flex" justify="center">
@@ -75,11 +156,35 @@
</el-row> -->
<el-row type="flex" justify="center">
<el-form-item label="资源文件" label-width="100px">
<el-upload :limit="1" class="el-uploadfeng " ref="files" :action="baseUrl + '/oss/fileoss'"
:on-preview="handlePictureCardPreview" :file-list="fileList" :on-success="handlePicSuccess"
accept=".mp3,.mp4,.gif,.png,.jpg,.mpeg,.mpg" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
<el-upload
:limit="1"
:on-preview="handlePictureCardPreview"
class="el-uploadfeng"
ref="files"
action="#"
:file-list="fileList"
:before-upload="beforeAvatarUpload"
:on-change="changeData"
accept=".mp3,.mp4,.gif,.png,.jpg,.mpeg,.mpg"
:http-request="handleRequest"
:before-remove="handleBeforeRemove"
:on-remove="handleRemove"
>
<!-- <el-button class="btn upload-btn">上传附件</el-button> -->
<i
class="el-icon-plus"
v-if="fileList.length == 0 && !isUpload"
></i>
</el-upload>
<div class="newpro">
<el-progress
v-if="isUpload"
:stroke-width="10"
:percentage="progressPercent"
style="width: 100%"
></el-progress>
</div>
<!-- <el-dialog :visible.sync="dialogVisible" :append-to-body="true">
<video width="100%" :src="addForm.url" alt="">
<video controls width="250" v-if="dataForm.video != ''">
@@ -88,9 +193,45 @@
</el-dialog> -->
</el-form-item>
</el-row>
<!-- <el-row type="flex" justify="center">
<el-form-item label="资源文件" label-width="100px">
<el-upload
:limit="1"
class="el-uploadfeng"
ref="files"
:action="baseUrl + '/oss/fileoss'"
:on-preview="handlePictureCardPreview"
:file-list="fileList"
:on-success="handlePicSuccess"
accept=".mp3,.mp4,.gif,.png,.jpg,.mpeg,.mpg"
:on-remove="handleRemove"
:on-progress="onProgress"
>
<i class="el-icon-plus"></i>
</el-upload>
<div v-if="isShowJinDuTiao" class="bacc">
<div class="jindutiao">
<el-progress
type="circle"
:percentage="curPercentage"
:width="80"
class="progressCircle"
></el-progress>
</div>
</div>
</el-form-item>
</el-row> -->
<!-- <el-dialog :visible.sync="dialogVisible" :append-to-body="true">
<video width="100%" :src="addForm.url" alt="">
<video controls width="250" v-if="dataForm.video != ''">
<source :src="dataForm.video" type="video/mp4" />
</video>
</el-dialog> -->
<el-row type="flex" justify="center">
<el-form-item label="排序" label-width="48px">
<el-input style="width:500px" v-model="addForm.sort"></el-input>
<el-input style="width: 500px" v-model="addForm.sort"></el-input>
</el-form-item>
</el-row>
</el-form>
@@ -105,270 +246,447 @@
</div>
</template>
<script>
import global from '../../common/common.vue' //引入共用组间
export default {
data() {
return {
baseUrl: global.baseUrl,
typeList: [{
dictValue: '吴门之歌',
dictType: '1',
}, {
dictValue: '巴山夜语',
dictType: '2',
}, {
dictValue: '吴门之徽',
dictType: '3',
}], //类型列表
booknameList: [],
dataForm: {
dictType: '', //分类
// ligthname: '',//书名
import global from "../../common/common.vue"; //引入共用组间
import axios from "axios";
export default {
data() {
return {
uploadTimer: null,
isUpload: false,
isShowJinDuTiao: false,
progressPercent: 0,
curPercentage: 0,
baseUrl: global.baseUrl,
typeList: [
{
dictValue: "吴门之歌",
dictType: "1",
},
addForm: {
"id": '', //新增不传
"name": '',
"type": '',
"url": '',
"sort": 0
{
dictValue: "巴山夜语",
dictType: "2",
},
editId: '',
addFormRule: {
typeId: [{
{
dictValue: "吴门之徽",
dictType: "3",
},
], //类型列表
booknameList: [],
dataForm: {
dictType: "", //分类
// ligthname: '',//书名
},
addForm: {
id: "", //新增不传
name: "",
type: "",
url: "",
sort: 0,
},
editId: "",
addFormRule: {
typeId: [
{
required: true,
message: "请选择分类"
}],
bookId: [{
message: "请选择分类",
},
],
bookId: [
{
required: true,
message: "请选择书名"
}]
},
dataList: [],
// publishStatus: false,
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false,
bookIds: [],
titlesub: '新增',
fileList: [],
message: "请选择书名",
},
],
},
dataList: [],
// publishStatus: false,
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false,
bookIds: [],
titlesub: "新增",
fileList: [],
requestCancelQueue: [], // 请求方法队列(调用取消上传
currentFile: {},
};
},
watch: {
isUpload: {
handler(val, oldVal) {
if (this.isUpload) {
this.uploadTimer = setInterval(async () => {
//需要定时执行的代码
this.progressPercent = await this.getProgress(this.currentFile);
}, 1000);
} else {
//this.uploadTimer = null;
clearInterval(this.uploadTimer);
this.currentFile = {};
}
// this.getGoodsTypeList()
},
deep: true,
},
},
components: {
// AddOrUpdate,
// chooseBook
},
activated() {
// this.gettypeList()
this.getDataList();
},
methods: {
beforeAvatarUpload(file, fileList) {
console.log(file, 99999999999999);
// this.fileList = fileList;
},
changeData(file, fileList) {
// 数据小于0.1M的时候按KB显示
const size =
file.size / 1024 / 1024 > 0.1
? `(${(file.size / 1024 / 1024).toFixed(1)}M)`
: `(${(file.size / 1024).toFixed(1)}KB)`;
file.name.indexOf("M") > -1 || file.name.indexOf("KB") > -1
? file.name
: (file.name += size);
},
async getProgress(file) {
var that = this;
console.log("🚀 ~ handleRequest ~ data222:", file.uid);
var progress = 0;
// const config = {
// onUploadProgress: (progressEvent) => {
// // progressEvent.loaded:已上传文件大小
// // progressEvent.total:被上传文件的总大小
// this.progressPercent = Number(
// ((progressEvent.loaded / progressEvent.total) * 100).toFixed(2)
// );
// },
// };
await axios
.get(this.$http.adornUrl(`/oss/fileoss/getSchedule?uid=${file.uid}`))
.then(async (res) => {
console.log("🚀 ~ this.$axios.post ~ res999:", res.data.percent);
progress = Number(res.data.percent);
if (progress == 100) {
this.isUpload = false;
clearInterval(this.uploadTimer);
that.uploadTimer = null;
await that.handlePicSuccess(res.data, file);
this.currentFile = {};
this.$forceUpdate();
}
});
console.log("🚀 ~ .then ~ progress888:", progress);
return progress;
},
handleRequest(option) {
var that = this;
const { onProgress, onSuccess, onError } = option;
this.progressPercent = 0;
this.currentFile = option.file;
let formdata = new FormData();
formdata.append("file", option.file);
formdata.append("fileName", option.file.fileNamee);
formdata.append("uid", option.file.uid);
console.log("🚀 ~ handleRequest ~ formdata:", formdata);
this.isUpload = true;
axios
.post(this.baseUrl + "/oss/fileoss/uploadFileSchedule", formdata)
.then((res) => {
console.log("🚀 ~ this.$axios.post ~ res111:", res);
if (res.data.code == 0) {
that.fileList[that.fileList.length - 1].status = "done";
// clearInterval(that.uploadTimer);
// that.isUpload = false;
// that.currentFile = {};
// await that.handlePicSuccess(res.data, data.file);
onSuccess();
} else {
that.fileList[that.fileList.length - 1].ststus = "error";
onError();
}
});
// var prom = new Promise((resolve, reject) => {});
// prom.abort = () => {};
// return prom;
},
// 文件上传时的钩子函数,获取上传进度
onProgress(event, file, fileList) {
console.log("🚀 ~ onProgress ~ event:", event);
let num = ((event.loaded / event.total) * 100) | 0; //百分比
this.curPercentage = num;
if (this.curPercentage == 100) {
//当文件上传完成后,关闭进度条
this.isShowJinDuTiao = false;
this.curPercentage = 0;
}
},
components: {
// AddOrUpdate,
// chooseBook
clearValue(val) {
this.dataForm.dictType = "";
},
activated() {
// this.gettypeList()
this.getDataList()
// 获取数据列表
getDataList() {
this.dataListLoading = true;
this.$http({
url: this.$http.adornUrl("/book/medicaldes/lightListByPage"),
method: "post",
data: this.$http.adornData({
type: this.dataForm.dictType,
name: this.dataForm.ligthname,
current: this.pageIndex,
limit: this.pageSize,
}),
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.result.records;
this.totalPage = data.result.total;
} else {
this.dataList = [];
this.totalPage = 0;
}
this.dataListLoading = false;
});
},
methods: {
clearValue(val) {
this.dataForm.dictType = '';
},
getbookname() {
// 获取数据列表
getDataList() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/book/medicaldes/lightListByPage'),
method: 'post',
data: this.$http.adornData({
"type": this.dataForm.dictType,
"name": this.dataForm.ligthname,
"current": this.pageIndex,
"limit": this.pageSize
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dataList = data.result.records
this.totalPage = data.result.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
getbookname() {
// 获取数据列表
this.$http({
url: this.$http.adornUrl('/book/book/list'),
method: 'get',
params: this.$http.adornParams({
'page': 1,
'limit': 1000000,
'bookName': '',
'publisherName': '',
'authorName': ''
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.booknameList = data.page.list
} else {
this.booknameList = []
}
})
},
filterAA(val) {
if (val == 1) {
return '吴门之歌'
} else if (val == 2) {
return '巴山夜语'
this.$http({
url: this.$http.adornUrl("/book/book/list"),
method: "get",
params: this.$http.adornParams({
page: 1,
limit: 1000000,
bookName: "",
publisherName: "",
authorName: "",
}),
}).then(({ data }) => {
if (data && data.code === 0) {
this.booknameList = data.page.list;
} else {
return '吴门之徽'
}
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val
},
// 新增 / 修改
editOrUpdateHandle(row) {
console.log(row)
this.titlesub = '修改'
// this.getbookname()
this.editId = row.id
this.addForm.name = row.name
this.addForm.type = row.type.toString()
this.addForm.url = row.url
this.addForm.sort = row.sort
this.fileList = []
var img = {
name: row.url,
url: row.url
}
var attr = []
attr.push(img)
if (attr[0].url != '') {
this.fileList = attr
this.booknameList = [];
}
});
},
filterAA(val) {
if (val == 1) {
return "吴门之歌";
} else if (val == 2) {
return "巴山夜语";
} else {
return "吴门之徽";
}
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val;
this.pageIndex = 1;
this.getDataList();
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val;
this.getDataList();
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val;
},
// 新增 / 修改
editOrUpdateHandle(row) {
console.log(row);
this.titlesub = "修改";
// this.getbookname()
this.editId = row.id;
this.addForm.name = row.name;
this.addForm.type = row.type.toString();
this.addForm.url = row.url;
this.addForm.sort = row.sort;
this.fileList = [];
var img = {
name: row.url,
url: row.url,
};
var attr = [];
attr.push(img);
if (attr[0].url != "") {
this.fileList = attr;
}
console.log('this.fileList', this.fileList);
this.addOrUpdateVisible = true
console.log("this.fileList", this.fileList);
this.addOrUpdateVisible = true;
},
addOrUpdateHandle() {
// this.getbookname()
this.editId = "";
this.titlesub = "新增";
this.addOrUpdateVisible = true;
},
cancleClose() {
this.addOrUpdateVisible = false;
this.isUpload = false;
this.currentFile = {};
//this.uploadTimer = null;
clearInterval(this.uploadTimer);
this.$forceUpdate();
this.$refs["addFormRef"].resetFields();
this.addForm = {
id: "", //新增不传
name: "",
type: "",
url: "",
sort: 0,
};
},
addOrUpdateHandle() {
// this.getbookname()
this.editId = ''
this.titlesub = '新增'
this.addOrUpdateVisible = true
},
cancleClose() {
this.addOrUpdateVisible = false
this.$refs["addFormRef"].resetFields();
this.addForm = {
"id": '', //新增不传
"name": '',
"type": '',
"url": '',
"sort": 0
}
this.fileList = []
},
// 删除
deleteHandle(id) {
this.$confirm('请确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.fileList = [];
},
// 删除
deleteHandle(id) {
this.$confirm("请确认是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$http({
url: this.$http.adornUrl(`/book/medicaldes/delLight?id=${id}`),
method: "post",
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
},
});
} else {
this.$message.error(data.msg);
}
});
});
},
addOreEditCate() {
this.$refs["addFormRef"].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/book/medicaldes/delLight?id=${id}`),
method: 'post',
}).then(({
data
}) => {
url: this.$http.adornUrl("/book/medicaldes/saveOrUpdateLight"),
method: "post",
data: this.$http.adornData({
id: this.editId, //新增不传
name: this.addForm.name,
type: this.addForm.type,
url: this.addForm.url,
sort: this.addForm.sort,
}),
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
this.$message.success("成功");
this.addOrUpdateVisible = false;
this.getDataList();
} else {
this.$message.error(data.msg)
this.$message.error("失败");
}
})
})
},
addOreEditCate() {
this.$refs["addFormRef"].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl('/book/medicaldes/saveOrUpdateLight'),
method: 'post',
data: this.$http.adornData({
"id": this.editId, //新增不传
"name": this.addForm.name,
"type": this.addForm.type,
"url": this.addForm.url,
"sort": this.addForm.sort
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message.success("成功");
this.addOrUpdateVisible = false
this.getDataList()
} else {
this.$message.error("失败");
}
})
}
})
},
handlePictureCardPreview(file) {
this.addForm.url = file.url;
this.dialogVisible = true;
},
handlePicSuccess(res, file) {
if (res.msg == "success") {
this.addForm.url = res.url;
this.fileList.push({
name: file.name,
url: res.url
})
this.$message.success("上传成功");
} else {
this.$message.error("上传失败");
});
}
},
handleRemove(file, fileList) {
this.addForm.url = '';
this.fileList = fileList
// this.addForm.noneBtnImg = fileList.length >= this.addForm.limitCountImg;
},
}
}
});
},
handlePictureCardPreview(file) {
this.addForm.url = file.url;
this.dialogVisible = true;
},
handlePicSuccess(res, file) {
console.log(res, file, "999999999");
if (res.msg == "success") {
this.addForm.url = res.url;
this.fileList.push({
name: file.name,
url: res.url,
});
this.$message.success("上传成功");
this.isUpload = false;
} else {
this.$message.error("上传失败");
}
},
handleBeforeRemove(file, fileList) {
console.log(file, fileList, "file, fileListfile, fileListfile, fileList");
this.$refs.files.clearFiles();
clearInterval(this.uploadTimer);
this.isUpload = false;
this.currentFile = {};
this.$forceUpdate();
},
handleRemove(file, fileList) {
this.addForm.url = "";
this.fileList = fileList;
//this.uploadTimer = null;
clearInterval(this.uploadTimer);
this.isUpload = false;
this.currentFile = {};
this.$forceUpdate();
// this.addForm.noneBtnImg = fileList.length >= this.addForm.limitCountImg;
},
},
beforeDestroy() {
clearInterval(this.uploadTimer);
},
};
</script>
<style lang="less">
.dialog-wmzg {
.el-upload-list__item-name {
max-width: 450px;
}
.dialog-wmzg {
.el-upload-list__item-name {
max-width: 450px;
}
}
.newpro .el-progress-bar__inner:before {
content: "";
width: 100%;
height: 100%;
display: block;
background-image: repeating-linear-gradient(
-45deg,
hsla(0, 0%, 100%, 0.15) 25%,
transparent 0,
transparent 50%,
hsla(0, 0%, 100%, 0.15) 0,
hsla(0, 0%, 100%, 0.15) 75%,
transparent 0,
transparent
);
background-size: 40px 40px;
animation: mymove 2s linear infinite;
}
@keyframes mymove {
0% {
background-position: 0;
}
25% {
background-position: 50px;
}
50% {
background-position: 100px;
}
75% {
background-position: 150px;
}
100% {
background-position: 200px;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -251,7 +251,7 @@
}
if (this.dataForm.tel) {
if (/^1[34578]\d{9}$/.test(this.dataForm.tel) == false) {
if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) {
this.$message.error("手机格式错误!")
return
}

View File

@@ -1,20 +1,20 @@
/**
* 开发环境
*/
;(function () {
; (function () {
window.SITE_CONFIG = {};
// api接口请求地址
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';//张川川
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境
// window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境11
// window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名
window.SITE_CONFIG['domain'] = './'; // 域名
window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分)
window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
})();