limingtao 11 months ago
parent 21d60ea748
commit 63fcdd2a69
  1. 923
      common/globalJs/request.js
  2. 4
      components/no-data.vue
  3. 2
      pages/index/detail.vue
  4. 6
      pages/index/index.vue
  5. 17
      pages/investigation/index.vue
  6. 644
      pages/logIn/logIn.vue
  7. 24
      pages/mine/index.vue
  8. 355
      pages/mine/password.vue

@ -1,459 +1,464 @@
/** /**
* 请求封装 * 请求封装
*/ */
import $ from "./globalJs"; import $ from "./globalJs";
const tokenKey = "token"; const tokenKey = "token";
const tokenKeyValue = ""; const tokenKeyValue = "";
class Request { class Request {
constructor(config = {}) { constructor(config = {}) {
this.config = {}; this.config = {};
this.config.baseUrl = config.baseUrl ? config.baseUrl : ""; this.config.baseUrl = config.baseUrl ? config.baseUrl : "";
this.config.dataType = config.dataType ? config.dataType : "json"; this.config.dataType = config.dataType ? config.dataType : "json";
this.config.responseType = config.responseType this.config.responseType = config.responseType ?
? config.responseType config.responseType :
: "text"; "text";
this.config.header = config.header ? config.header : {}; this.config.header = config.header ? config.header : {};
this.reqInterceptors = null; this.reqInterceptors = null;
this.resInterceptors = null; this.resInterceptors = null;
this.interceptors = { this.interceptors = {
request: (fn) => { request: (fn) => {
this.reqInterceptors = fn; this.reqInterceptors = fn;
}, },
response: (fn) => { response: (fn) => {
this.resInterceptors = fn; this.resInterceptors = fn;
}, },
}; };
} }
setConfig(config = {}) { setConfig(config = {}) {
this.config = this._deepCopy(this._merge(this.config, config)); this.config = this._deepCopy(this._merge(this.config, config));
} }
// 请求封装 // 请求封装
globalRequest(url, config, method, isForm = "") { globalRequest(url, config, method, isForm = "") {
const _this = this; const _this = this;
let newConfig = this._deepCopy(this._merge(this.config, config)); let newConfig = this._deepCopy(this._merge(this.config, config));
let lastConfig = {}; let lastConfig = {};
if (this.reqInterceptors && typeof this.reqInterceptors === "function") { if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
let reqInterceptors = this.reqInterceptors(newConfig); let reqInterceptors = this.reqInterceptors(newConfig);
if (!reqInterceptors && process.env.NODE_ENV === "development") { if (!reqInterceptors && process.env.NODE_ENV === "development") {
console.log("请求被拦截,此消息仅在开发环境显示。"); console.log("请求被拦截,此消息仅在开发环境显示。");
return false; return false;
} else if ( } else if (
Object.prototype.toString.call(reqInterceptors) === "[object Promise]" Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
) { ) {
return reqInterceptors; return reqInterceptors;
} }
lastConfig = this._deepCopy(reqInterceptors); lastConfig = this._deepCopy(reqInterceptors);
} else { } else {
lastConfig = this._deepCopy(newConfig); lastConfig = this._deepCopy(newConfig);
} }
let header = {}; let header = {};
let tokenData = $.getData("token"); let tokenData = $.getData("token");
if (tokenData) { if (tokenData) {
header[tokenKey] = tokenKeyValue + tokenData; header[tokenKey] = tokenKeyValue + tokenData;
} }
if (isForm) { if (isForm) {
header["content-type"] = "application/x-www-form-urlencoded"; header["content-type"] = "application/x-www-form-urlencoded";
} }
let fullUrl = this._formatUrl(lastConfig.baseUrl, url); let fullUrl = this._formatUrl(lastConfig.baseUrl, url);
if (url.indexOf("http") != -1) { if (url.indexOf("http") != -1) {
fullUrl = url; fullUrl = url;
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
url: fullUrl, url: fullUrl,
method: method, method: method,
data: config, data: config,
header: header, header: header,
async complete(response) { async complete(response) {
let res = response; let res = response;
if (response.statusCode == 404) { if ((response.errMsg == 'request:ok')) {
$.toast("请求地址不存在");
} else if (response.statusCode == 500) { if (response.statusCode == 404) {
$.toast("服务器内部错误"); $.toast("请求地址不存在");
} else { } else if (response.statusCode == 500) {
console.log("response", response.statusCode); $.toast("服务器内部错误");
let res = response; } else {
if ( // console.log("response", response.statusCode);
_this.resInterceptors && let res = response;
typeof _this.resInterceptors === "function" if (
) { _this.resInterceptors &&
let resInterceptors = _this.resInterceptors(res); typeof _this.resInterceptors === "function"
// console.log('resInterceptors-----------------',resInterceptors) ) {
if ( let resInterceptors = _this.resInterceptors(res);
resInterceptors.statusCode == 401 || // console.log('resInterceptors-----------------',resInterceptors)
resInterceptors.data.code == 403 if (
) { resInterceptors.statusCode == 401 ||
$.toast("登录信息已过期,请重新登录"); resInterceptors.data.code == 403
$.removeData("token"); ) {
setTimeout(() => { $.toast("登录信息已过期,请重新登录");
$.openNew("/pages/logIn/logIn"); $.removeData("token");
}, 1500); setTimeout(() => {
return; $.openNew("/pages/logIn/logIn");
} else if (resInterceptors.statusCode != 200) { }, 1500);
$.toast(resInterceptors.data.message); return;
} } else if (resInterceptors.statusCode != 200) {
if (!resInterceptors && resInterceptors != "") { $.toast(resInterceptors.data.message);
reject("返回值已被您拦截!"); }
return; if (!resInterceptors && resInterceptors != "") {
} else if ( reject("返回值已被您拦截!");
Object.prototype.toString.call(resInterceptors) === return;
"[object Promise]" } else if (
) { Object.prototype.toString.call(resInterceptors) ===
try { "[object Promise]"
let promiseRes = await resInterceptors; ) {
resolve(promiseRes); try {
} catch (error) { let promiseRes = await resInterceptors;
reject(error); resolve(promiseRes);
} } catch (error) {
} else { reject(error);
res = resInterceptors; }
} } else {
} res = resInterceptors;
} }
resolve(res.data); }
}, }
}); resolve(res.data);
}); }else{
} reject()
}
addFile(file, success, progress) {
const _this = this; },
let newConfig = this._deepCopy(this._merge(this.config, {})); });
let lastConfig = {}; });
if (this.reqInterceptors && typeof this.reqInterceptors === "function") { }
let reqInterceptors = this.reqInterceptors(newConfig);
if (!reqInterceptors && process.env.NODE_ENV === "development") { addFile(file, success, progress) {
console.log("请求被拦截,此消息仅在开发环境显示。"); const _this = this;
return false; let newConfig = this._deepCopy(this._merge(this.config, {}));
} else if ( let lastConfig = {};
Object.prototype.toString.call(reqInterceptors) === "[object Promise]" if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
) { let reqInterceptors = this.reqInterceptors(newConfig);
return reqInterceptors; if (!reqInterceptors && process.env.NODE_ENV === "development") {
} console.log("请求被拦截,此消息仅在开发环境显示。");
lastConfig = this._deepCopy(reqInterceptors); return false;
} else { } else if (
lastConfig = this._deepCopy(newConfig); Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
} ) {
let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl); return reqInterceptors;
let header = { }
// 'content-Type':'multipart/form-data' lastConfig = this._deepCopy(reqInterceptors);
}; } else {
return new Promise((resolve, reject) => { lastConfig = this._deepCopy(newConfig);
const UploadTask = uni.uploadFile({ }
url: fullUrl, let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
filePath: file[0].path, let header = {
header: header, // 'content-Type':'multipart/form-data'
name: $.fileImgKey, };
formData: {}, return new Promise((resolve, reject) => {
async complete(response) { const UploadTask = uni.uploadFile({
let res = response; url: fullUrl,
if ( filePath: file[0].path,
_this.resInterceptors && header: header,
typeof _this.resInterceptors === "function" name: $.fileImgKey,
) { formData: {},
let resInterceptors = _this.resInterceptors(res); async complete(response) {
if (!resInterceptors && resInterceptors != "") { let res = response;
reject("返回值已被您拦截!"); if (
return; _this.resInterceptors &&
} else if ( typeof _this.resInterceptors === "function"
Object.prototype.toString.call(resInterceptors) === ) {
"[object Promise]" let resInterceptors = _this.resInterceptors(res);
) { if (!resInterceptors && resInterceptors != "") {
try { reject("返回值已被您拦截!");
let promiseRes = await resInterceptors; return;
resolve(promiseRes); } else if (
} catch (error) { Object.prototype.toString.call(resInterceptors) ===
reject(error); "[object Promise]"
} ) {
} else { try {
res = resInterceptors; let promiseRes = await resInterceptors;
} resolve(promiseRes);
} } catch (error) {
success(JSON.parse(res.data)); reject(error);
}, }
}); } else {
// 监听上传进度 res = resInterceptors;
if (progress) { }
UploadTask.onProgressUpdate((res) => { }
progress(res.progress); success(JSON.parse(res.data));
}); },
} });
}); // 监听上传进度
} if (progress) {
UploadTask.onProgressUpdate((res) => {
// 上传图片 progress(res.progress);
addImg(length = 1, success, progress, type = 1) { });
// 获取本地图片的路径 }
uni.chooseImage({ });
count: length, }
// original原图compressed压缩图
sizeType: ["compressed"], // 可以指定是原图还是压缩图,默认二者都有 // 上传图片
// camera相机album相册 addImg(length = 1, success, progress, type = 1) {
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有 // 获取本地图片的路径
success: (res) => { uni.chooseImage({
// 显示上传动画 count: length,
$.showLoading("图片上传中..."); // original原图compressed压缩图
var imgs; sizeType: ["compressed"], // 可以指定是原图还是压缩图,默认二者都有
imgs = res.tempFilePaths; // camera相机album相册
// #ifdef H5 sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
// 调用上传图片的函数 success: (res) => {
// 处理多选 // 显示上传动画
// if (imgs.length > length) { $.showLoading("图片上传中...");
// imgs = imgs.slice(0, length); var imgs;
// } imgs = res.tempFilePaths;
this.fileImg(imgs, 0, success, progress, type); // #ifdef H5
// #endif // 调用上传图片的函数
// #ifdef APP // 处理多选
console.log("imgs", imgs); // if (imgs.length > length) {
// 将新添加的图片添加到imgs_arr中 // imgs = imgs.slice(0, length);
uni.compressImage({ // }
src: imgs[0], this.fileImg(imgs, 0, success, progress, type);
quality: 60, // 仅对jpg有效 // #endif
success: (ress) => { // #ifdef APP
this.fileImg([ress.tempFilePath], 0, success, progress, type); console.log("imgs", imgs);
}, // 将新添加的图片添加到imgs_arr中
fail: (err) => { uni.compressImage({
$.hideLoading("图片上传中..."); src: imgs[0],
}, quality: 60, // 仅对jpg有效
complete: (msg) => {}, success: (ress) => {
}); this.fileImg([ress.tempFilePath], 0, success, progress, type);
// #endif },
}, fail: (err) => {
complete: (err) => {}, $.hideLoading("图片上传中...");
}); },
} complete: (msg) => {},
fileImg(imgs, index, success, progress, type) { });
const _this = this; // #endif
let newConfig = this._deepCopy(this._merge(this.config, {})); },
let lastConfig = {}; complete: (err) => {},
if (this.reqInterceptors && typeof this.reqInterceptors === "function") { });
let reqInterceptors = this.reqInterceptors(newConfig); }
if (!reqInterceptors && process.env.NODE_ENV === "development") { fileImg(imgs, index, success, progress, type) {
console.log("请求被拦截,此消息仅在开发环境显示。"); const _this = this;
return false; let newConfig = this._deepCopy(this._merge(this.config, {}));
} else if ( let lastConfig = {};
Object.prototype.toString.call(reqInterceptors) === "[object Promise]" if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
) { let reqInterceptors = this.reqInterceptors(newConfig);
return reqInterceptors; if (!reqInterceptors && process.env.NODE_ENV === "development") {
} console.log("请求被拦截,此消息仅在开发环境显示。");
lastConfig = this._deepCopy(reqInterceptors); return false;
} else { } else if (
lastConfig = this._deepCopy(newConfig); Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
} ) {
let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl); return reqInterceptors;
if (type == 2) { }
fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUserIdUrl); lastConfig = this._deepCopy(reqInterceptors);
} } else {
let header = { lastConfig = this._deepCopy(newConfig);
token: $.getData("token"), }
}; let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
// 如果数组长度大于下标,说明没有上传完 if (type == 2) {
if (imgs.length > index) { fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUserIdUrl);
var src = imgs[index]; }
return new Promise((resolve, reject) => { let header = {
const UploadTask = uni.uploadFile({ token: $.getData("token"),
url: fullUrl, };
filePath: src, // 如果数组长度大于下标,说明没有上传完
header: header, if (imgs.length > index) {
name: $.fileImgKey, var src = imgs[index];
formData: {}, return new Promise((resolve, reject) => {
async complete(response) { const UploadTask = uni.uploadFile({
let res = response; url: fullUrl,
if ( filePath: src,
_this.resInterceptors && header: header,
typeof _this.resInterceptors === "function" name: $.fileImgKey,
) { formData: {},
let resInterceptors = _this.resInterceptors(res); async complete(response) {
// console.log('resInterceptors',resInterceptors) let res = response;
let datasJSON = JSON.parse(resInterceptors.data); if (
if (datasJSON.code == 1101) { _this.resInterceptors &&
} typeof _this.resInterceptors === "function"
if (!resInterceptors && resInterceptors != "") { ) {
reject("返回值已被您拦截!"); let resInterceptors = _this.resInterceptors(res);
return; // console.log('resInterceptors',resInterceptors)
} else if ( let datasJSON = JSON.parse(resInterceptors.data);
Object.prototype.toString.call(resInterceptors) === if (datasJSON.code == 1101) {}
"[object Promise]" if (!resInterceptors && resInterceptors != "") {
) { reject("返回值已被您拦截!");
try { return;
let promiseRes = await resInterceptors; } else if (
resolve(promiseRes); Object.prototype.toString.call(resInterceptors) ===
} catch (error) { "[object Promise]"
reject(error); ) {
} try {
} else { let promiseRes = await resInterceptors;
res = resInterceptors; resolve(promiseRes);
} } catch (error) {
} reject(error);
success(JSON.parse(res.data)); }
_this.fileImg(imgs, index + 1, progress); } else {
}, res = resInterceptors;
}); }
// 监听上传进度 }
if (progress) { success(JSON.parse(res.data));
UploadTask.onProgressUpdate((res) => { _this.fileImg(imgs, index + 1, progress);
progress(res.progress); },
}); });
} // 监听上传进度
}); if (progress) {
// #ifdef H5 UploadTask.onProgressUpdate((res) => {
// 压缩 progress(res.progress);
// lrz(src, { });
// quality: 0.7, }
// }).then((rst) => { // fieldName 为 formData 中多媒体的字段名 });
// #ifdef H5
// }) // 压缩
// #endif // lrz(src, {
// #ifdef APP-PLUS // quality: 0.7,
// #endif // }).then((rst) => { // fieldName 为 formData 中多媒体的字段名
} else {
$.hideLoading(); // })
} // #endif
} // #ifdef APP-PLUS
// #endif
// 上传视频 } else {
addVideo(url, success, progress) { $.hideLoading();
// 获取本地视频的路径 }
uni.chooseVideo({ }
sourceType: ["album", "camera"], // 选择方式
success: (res) => { // 上传视频
if (res.size > $.videoSize) { addVideo(url, success, progress) {
let size = parseInt($.videoSize / 1024000); // 获取本地视频的路径
$.toast("上传视频过大,大小请不要超过" + size + "M"); uni.chooseVideo({
} else { sourceType: ["album", "camera"], // 选择方式
// 显示上传动画 success: (res) => {
$.showLoading("视频上传中..."); if (res.size > $.videoSize) {
// 调用上传视频的函数 let size = parseInt($.videoSize / 1024000);
this.fileVideo(res.tempFilePath, url, success, progress); $.toast("上传视频过大,大小请不要超过" + size + "M");
} } else {
}, // 显示上传动画
fail: (res) => { $.showLoading("视频上传中...");
console.log(JSON.stringify(res)); // 调用上传视频的函数
}, this.fileVideo(res.tempFilePath, url, success, progress);
}); }
} },
fileVideo(src, url, success, progress) { fail: (res) => {
const _this = this; console.log(JSON.stringify(res));
let newConfig = this._deepCopy(this._merge(this.config, {})); },
let lastConfig = {}; });
if (this.reqInterceptors && typeof this.reqInterceptors === "function") { }
let reqInterceptors = this.reqInterceptors(newConfig); fileVideo(src, url, success, progress) {
if (!reqInterceptors && process.env.NODE_ENV === "development") { const _this = this;
console.log("请求被拦截,此消息仅在开发环境显示。"); let newConfig = this._deepCopy(this._merge(this.config, {}));
return false; let lastConfig = {};
} else if ( if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
Object.prototype.toString.call(reqInterceptors) === "[object Promise]" let reqInterceptors = this.reqInterceptors(newConfig);
) { if (!reqInterceptors && process.env.NODE_ENV === "development") {
return reqInterceptors; console.log("请求被拦截,此消息仅在开发环境显示。");
} return false;
lastConfig = this._deepCopy(reqInterceptors); } else if (
} else { Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
lastConfig = this._deepCopy(newConfig); ) {
} return reqInterceptors;
let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl); }
//上传视频 lastConfig = this._deepCopy(reqInterceptors);
return new Promise((resolve, reject) => { } else {
const UploadTask = uni.uploadFile({ lastConfig = this._deepCopy(newConfig);
url: fullUrl, }
filePath: src, let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
name: $.fileVideoKey, //上传视频
async complete(response) { return new Promise((resolve, reject) => {
let res = response; const UploadTask = uni.uploadFile({
if ( url: fullUrl,
_this.resInterceptors && filePath: src,
typeof _this.resInterceptors === "function" name: $.fileVideoKey,
) { async complete(response) {
let resInterceptors = _this.resInterceptors(res); let res = response;
// console.log('resInterceptors',resInterceptors) if (
if (!resInterceptors && resInterceptors != "") { _this.resInterceptors &&
reject("返回值已被您拦截!"); typeof _this.resInterceptors === "function"
return; ) {
} else if ( let resInterceptors = _this.resInterceptors(res);
Object.prototype.toString.call(resInterceptors) === // console.log('resInterceptors',resInterceptors)
"[object Promise]" if (!resInterceptors && resInterceptors != "") {
) { reject("返回值已被您拦截!");
try { return;
let promiseRes = await resInterceptors; } else if (
resolve(promiseRes); Object.prototype.toString.call(resInterceptors) ===
} catch (error) { "[object Promise]"
reject(error); ) {
} try {
} else { let promiseRes = await resInterceptors;
res = resInterceptors; resolve(promiseRes);
} } catch (error) {
} reject(error);
success(JSON.parse(res.data)); }
$.hideLoading(); } else {
}, res = resInterceptors;
success: (res) => { }
success(JSON.parse(res.data)); }
// 关闭上传动画 success(JSON.parse(res.data));
}, $.hideLoading();
fail: (e) => { },
// 关闭上传动画 success: (res) => {
$.hideLoading(); success(JSON.parse(res.data));
$.toast("上传超时!"); // 关闭上传动画
}, },
}); fail: (e) => {
// 监听上传进度 // 关闭上传动画
if (progress) { $.hideLoading();
UploadTask.onProgressUpdate((res) => { $.toast("上传超时!");
progress(res.progress); },
}); });
} // 监听上传进度
}); if (progress) {
} UploadTask.onProgressUpdate((res) => {
progress(res.progress);
_formatUrl(baseUrl, url) { });
if (!baseUrl) return url; }
let formatUrl = ""; });
const baseUrlEndsWithSlash = baseUrl.endsWith("/"); }
const urlStartsWithSlash = url.startsWith("/");
if (baseUrlEndsWithSlash && urlStartsWithSlash) { _formatUrl(baseUrl, url) {
formatUrl = baseUrl + url.substring(1); if (!baseUrl) return url;
} else if (baseUrlEndsWithSlash || urlStartsWithSlash) { let formatUrl = "";
formatUrl = baseUrl + url; const baseUrlEndsWithSlash = baseUrl.endsWith("/");
} else { const urlStartsWithSlash = url.startsWith("/");
formatUrl = baseUrl + "/" + url; if (baseUrlEndsWithSlash && urlStartsWithSlash) {
} formatUrl = baseUrl + url.substring(1);
return formatUrl; } else if (baseUrlEndsWithSlash || urlStartsWithSlash) {
} formatUrl = baseUrl + url;
_merge(oldConfig, newConfig) { } else {
let mergeConfig = this._deepCopy(oldConfig); formatUrl = baseUrl + "/" + url;
if (!newConfig || !Object.keys(newConfig).length) return mergeConfig; }
for (let key in newConfig) { return formatUrl;
if (key !== "header") { }
mergeConfig[key] = newConfig[key]; _merge(oldConfig, newConfig) {
} else { let mergeConfig = this._deepCopy(oldConfig);
if ( if (!newConfig || !Object.keys(newConfig).length) return mergeConfig;
Object.prototype.toString.call(newConfig[key]) === "[object Object]" for (let key in newConfig) {
) { if (key !== "header") {
for (let headerKey in newConfig[key]) { mergeConfig[key] = newConfig[key];
mergeConfig[key][headerKey] = newConfig[key][headerKey]; } else {
} if (
} Object.prototype.toString.call(newConfig[key]) === "[object Object]"
} ) {
} for (let headerKey in newConfig[key]) {
return mergeConfig; mergeConfig[key][headerKey] = newConfig[key][headerKey];
} }
_deepCopy(obj) { }
let result = Array.isArray(obj) ? [] : {}; }
for (let key in obj) { }
if (obj.hasOwnProperty(key)) { return mergeConfig;
if (typeof obj[key] === "object") { }
result[key] = this._deepCopy(obj[key]); _deepCopy(obj) {
} else { let result = Array.isArray(obj) ? [] : {};
result[key] = obj[key]; for (let key in obj) {
} if (obj.hasOwnProperty(key)) {
} if (typeof obj[key] === "object") {
} result[key] = this._deepCopy(obj[key]);
return result; } else {
} result[key] = obj[key];
} }
}
if (!global.$request) { }
global.$request = new Request(); return result;
} }
}
export default global.$request;
if (!global.$request) {
global.$request = new Request();
}
export default global.$request;

@ -51,8 +51,8 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.Img{ .Img{
width: 360rpx; width: 320rpx;
height: 300rpx; height: 280rpx;
margin: 0 auto; margin: 0 auto;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }

@ -601,7 +601,7 @@ console.log({
uni.chooseImage({ uni.chooseImage({
count: 6, //9 count: 6, //9
sizeType: ["original", "compressed"], // sizeType: ["original", "compressed"], //
sourceType: ["album"], // sourceType: ["album",'camera'], //
success: async (res) => { success: async (res) => {
console.log(res); console.log(res);
if (res.tempFilePaths && res.tempFilePaths.length) { if (res.tempFilePaths && res.tempFilePaths.length) {

@ -60,11 +60,11 @@
<view v-else class="List Width100 BorderBox"> <view v-else class="List Width100 BorderBox">
<view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="item in list" <view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="item in list"
:key='item.id' @click='handleClick(item)'> :key='item.id' @click='handleClick(item)'>
<image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> <!-- <image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> -->
<view class="right"> <view class="right">
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
<view class="type"> <view class="type">
<text>排查</text> <text>{{ item.enumname || '--' }}</text>
<text>{{ item.deadlineStatus || '--' }}</text> <text>{{ item.deadlineStatus || '--' }}</text>
</view> </view>
</view> </view>
@ -410,7 +410,7 @@
} }
.Unit { .Unit {
padding: 12rpx; padding: 24rpx 12rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;

@ -53,12 +53,13 @@
<view v-else class="List Width100 BorderBox"> <view v-else class="List Width100 BorderBox">
<view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="(item,index) in list" <view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="(item,index) in list"
:key='item.businessId+index' @click='handleClick(item)'> :key='item.businessId+index' @click='handleClick(item)'>
<image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> <!-- <image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> -->
<view class="right"> <view class="right">
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
<view class="type"> <view class="type">
<text v-if="tab === 1">排查</text> <!-- <text v-if="tab === 1">排查</text>
<text v-if="tab === 3">治理</text> <text v-if="tab === 3">治理</text> -->
<text>{{ item.enumname || '--' }}</text>
<text>{{ item.deadlineStatus || '--' }}</text> <text>{{ item.deadlineStatus || '--' }}</text>
</view> </view>
</view> </view>
@ -223,6 +224,12 @@
} else { } else {
this.$.toast(res.message) this.$.toast(res.message)
} }
if(this.status==10){
this.$set(this.totalData,'UnderInvestigation',res.result.total)
}
if(this.status==20){
this.$set(this.totalData,'InGovernance',res.result.total)
}
}).catch((err) => { }).catch((err) => {
this.loadmorestatus = 'nomore' this.loadmorestatus = 'nomore'
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@ -431,7 +438,7 @@
} }
.Unit { .Unit {
padding: 12rpx; padding:20rpx 12rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -459,7 +466,7 @@
.title { .title {
font-size: 16px; font-size: 16px;
width: 380rpx; width: 380rpx;
min-height: 80rpx; min-height: 60rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;

@ -1,307 +1,337 @@
<template> <template>
<view id="page"> <view id="page">
<view class="Width100 Box" :style="bgUrl1"> <view class="Width100 Box" :style="bgUrl1">
<view class="Content MarginAuto"> <view class="Content MarginAuto">
<image :src="$.imgSrc + '/scimg/logo1.png'" mode="aspectFit" class="Block Logo"></image> <image :src="$.imgSrc + '/scimg/logo1.png'" mode="aspectFit" class="Block Logo"></image>
<view class="NavBox Width100 MarginT_60rpx"> <view class="NavBox Width100 MarginT_60rpx">
<view class="Unit FloatL PositionR" v-for="(item,index) in navList" @click="chooseNav(item.type)"> <view class="Unit FloatL PositionR" v-for="(item,index) in navList" @click="chooseNav(item.type)">
<text class="Block" :class="currNav == item.type ? 'FontS_46rpx Color_1A1F39 FontBold':'FontS_42rpx Color_B4BAC9'"> <text class="Block"
{{ item.label }}</text> :class="currNav == item.type ? 'FontS_46rpx Color_1A1F39 FontBold':'FontS_42rpx Color_B4BAC9'">
<view class="Line BG_0064FF PositionA" v-show="currNav == item.type"></view> {{ item.label }}</text>
</view> <view class="Line BG_0064FF PositionA" v-show="currNav == item.type"></view>
<view class="ClearB"></view> </view>
</view> <view class="ClearB"></view>
<!-- <view class="TypeBox MarginT_60rpx" v-if="currNav == 1"> </view>
<view class="Unit FloatL" v-for="(item,index) in typeList" @click="chooseType(item.type)"> <!-- <view class="TypeBox MarginT_60rpx" v-if="currNav == 1">
<view class="Point FloatL" v-show="currType == item.type"> <view class="Unit FloatL" v-for="(item,index) in typeList" @click="chooseType(item.type)">
<image :src="$.imgSrc + '/scimg/choose_y1.png'" mode="aspectFit" class="Block Width100 Height100"></image> <view class="Point FloatL" v-show="currType == item.type">
</view> <image :src="$.imgSrc + '/scimg/choose_y1.png'" mode="aspectFit" class="Block Width100 Height100"></image>
<view class="Point Border FloatL BorderR_50 InsideB" v-show="currType != item.type"></view> </view>
<text class="Block MarginL_20rpx FontS_32rpx FloatL">{{item.label}}</text> <view class="Point Border FloatL BorderR_50 InsideB" v-show="currType != item.type"></view>
<view class="ClearB"></view> <text class="Block MarginL_20rpx FontS_32rpx FloatL">{{item.label}}</text>
</view> <view class="ClearB"></view>
<view class="ClearB"></view> </view>
</view> --> <view class="ClearB"></view>
<view class="InputBox" :class="currNav == 1 ? 'MarginT_40rpx' : 'MarginT_80rpx'"> </view> -->
<view class="Input MarginT_40rpx BG_F6F7FB"> <view class="InputBox" :class="currNav == 1 ? 'MarginT_40rpx' : 'MarginT_80rpx'">
<!-- <view class="Num FloatL TextLeft MarginL_60rpx">--> <view class="Input MarginT_40rpx BG_F6F7FB">
<!-- <text class="InlineBlock FontS_34rpx Color_1A1F39 FontBold">+86</text>--> <!-- <view class="Num FloatL TextLeft MarginL_60rpx">-->
<!-- </view>--> <!-- <text class="InlineBlock FontS_34rpx Color_1A1F39 FontBold">+86</text>-->
<input type="text" placeholder="请输入用户名" v-model="logInData.phone" class="Height100 Input1 FloatL MarginL_60rpx FontS_32rpx"> <!-- </view>-->
<view class="ClearB"></view> <input type="text" placeholder="请输入用户名" v-model="logInData.phone"
</view> class="Height100 Input1 FloatL MarginL_60rpx FontS_32rpx">
<view class="Input MarginT_40rpx BG_F6F7FB" v-if="currNav == 1"> <view class="ClearB"></view>
<input type="text" v-model="logInData.validateCode" placeholder="请输入验证码" class="Height100 Input1 FloatL MarginL_60rpx FontS_32rpx"> </view>
<view class="CodeBox FloatR MarginR_60rpx" @click="getCode"> <view class="Input MarginT_40rpx BG_F6F7FB" v-if="currNav == 1">
<text class="Block FontS_28rpx" :class="isCodeDisabled ? 'Color_B4BAC9':'Color_0064FF'">{{ btnText }}</text> <input type="text" v-model="logInData.validateCode" placeholder="请输入验证码"
</view> class="Height100 Input1 FloatL MarginL_60rpx FontS_32rpx">
<view class="ClearB"></view> <view class="CodeBox FloatR MarginR_60rpx" @click="getCode">
</view> <text class="Block FontS_28rpx"
<view class="Input MarginT_40rpx BG_F6F7FB"> :class="isCodeDisabled ? 'Color_B4BAC9':'Color_0064FF'">{{ btnText }}</text>
<input type="password" v-model="logInData.password" placeholder="请输入您的密码" class="Height100 Input2 FloatL MarginL_60rpx FontS_32rpx"> </view>
<view class="ClearB"></view> <view class="ClearB"></view>
</view> </view>
</view> <view class="Input MarginT_40rpx BG_F6F7FB">
<!-- <view class="Agree Width100 MarginT_60rpx" @click="chooseAgree"> <input type="password" v-model="logInData.password" placeholder="请输入您的密码"
<view class="Point FloatL" v-if="isAgree"> class="Height100 Input2 FloatL MarginL_60rpx FontS_32rpx">
<image :src="$.imgSrc + '/scimg/choose_y1.png'" mode="aspectFit" class="Block Width100 Height100"></image> <view class="ClearB"></view>
</view> </view>
<view class="Point Border FloatL BorderR_50 InsideB" v-else></view> </view>
<text class="Block FloatL MarginL_20rpx Color_605F72 FontS_26rpx">本人已同意</text> <!-- <view class="Agree Width100 MarginT_60rpx" @click="chooseAgree">
<text class="Block FloatL Color_0064FF FontS_26rpx" @click.stop="checkAgree(2)">用户协议</text> <view class="Point FloatL" v-if="isAgree">
<text class="Block FloatL Color_605F72 FontS_26rpx"></text> <image :src="$.imgSrc + '/scimg/choose_y1.png'" mode="aspectFit" class="Block Width100 Height100"></image>
<text class="Block FloatL Color_0064FF FontS_26rpx" @click.stop="checkAgree(3)">隐私协议</text> </view>
<view class="ClearB"></view> <view class="Point Border FloatL BorderR_50 InsideB" v-else></view>
</view> --> <text class="Block FloatL MarginL_20rpx Color_605F72 FontS_26rpx">本人已同意</text>
<button type="button" :disabled="isDisabled" class="Btn Block Width100 Color_FFFFFF FontS_36rpx FontBold" @click="confirmSub">{{ currNav == 1 ? '注册':'登录' }}</button> <text class="Block FloatL Color_0064FF FontS_26rpx" @click.stop="checkAgree(2)">用户协议</text>
<text @click="findPsw" class="Block MarginT_40rpx TextCenter FontS_26rpx Color_0064FF" v-if="currNav == 2">找回密码</text> <text class="Block FloatL Color_605F72 FontS_26rpx"></text>
</view> <text class="Block FloatL Color_0064FF FontS_26rpx" @click.stop="checkAgree(3)">隐私协议</text>
</view> <view class="ClearB"></view>
</view> </view> -->
</template> <button type="button" :disabled="isDisabled"
class="Btn Block Width100 Color_FFFFFF FontS_36rpx FontBold"
<script> @click="confirmSub">{{ currNav == 1 ? '注册':'登录' }}</button>
export default { <text @click="findPsw" class="Block MarginT_40rpx TextCenter FontS_26rpx Color_0064FF"
// v-if="currNav == 2">找回密码</text>
components: {}, </view>
data() { </view>
return { </view>
// js </template>
$: this.$,
bgUrl1:'', // <script>
isAgree:false, export default {
navList:[ //
// {type:1,label:''}, components: {},
{type:2,label:'登录'}, data() {
], return {
currNav:2, // js
currType:1, $: this.$,
isDisabled:false, bgUrl1: '', //
logInData:{ isAgree: false,
phone:'', // navList: [
validateCode:'', // // {type:1,label:''},
password:'', // {
}, // type: 2,
btnText:'获取验证码', label: '登录'
times:null, },
seconds:60, ],
isCodeDisabled:false, currNav: 2,
} currType: 1,
}, isDisabled: false,
// logInData: {
onLoad(e) { phone: '', //
if(typeof(e.type) != 'undefined'){ validateCode: '', //
this.currNav = e.type password: '', //
} }, //
}, btnText: '获取验证码',
// times: null,
onShow() { seconds: 60,
// isCodeDisabled: false,
this.bgUrl1 = "background-image:url('" + this.$.imgSrc + "/scimg/bg1.png');background-repeat: no-repeat;background-position: center top;background-size:100% 472rpx;" }
}, },
// //
computed: {}, onLoad(e) {
// if (typeof(e.type) != 'undefined') {
methods: { this.currNav = e.type
checkAgree(type){ }
let urlKey = 'portalTextType' },
this.$.open('/pages/logIn/agree?type=' + type) //
}, onShow() {
getCode(){ //
if(!this.$.isEmpty(this.logInData.phone)){ this.bgUrl1 = "background-image:url('" + this.$.imgSrc +
this.$.toast('请输入手机号') "/scimg/bg1.png');background-repeat: no-repeat;background-position: center top;background-size:100% 472rpx;"
return },
} //
let datas = { computed: {},
phone:this.logInData.phone, //
type:2 methods: {
} checkAgree(type) {
this.isCodeDisabled = true let urlKey = 'portalTextType'
this.$request.globalRequest('/hyjg-admin/mapi/account/sendSmsCode', datas, 'POST').then(res => { this.$.open('/pages/logIn/agree?type=' + type)
if(res.code == 0){ },
this.timeDown() getCode() {
}else{ if (!this.$.isEmpty(this.logInData.phone)) {
this.$.toast(res.msg) this.$.toast('请输入手机号')
this.isCodeDisabled = false return
} }
}) let datas = {
}, phone: this.logInData.phone,
timeDown(){ type: 2
this.times = setInterval(() => { }
if(this.seconds > 0){ this.isCodeDisabled = true
this.seconds -- this.$request.globalRequest('/hyjg-admin/mapi/account/sendSmsCode', datas, 'POST').then(res => {
this.btnText = this.seconds + 'S' if (res.code == 0) {
}else { this.timeDown()
this.seconds = 60 } else {
this.isCodeDisabled = false this.$.toast(res.msg)
this.btnText = '获取验证码' this.isCodeDisabled = false
clearInterval(this.times) }
} })
},1000) },
}, timeDown() {
// this.times = setInterval(() => {
confirmSub(){ if (this.seconds > 0) {
// this.$.setData('token','1') this.seconds--
// this.$.openTab('/pages/index/index') this.btnText = this.seconds + 'S'
// return } else {
// this.$.open('/pages/logIn/userInfo') this.seconds = 60
let url = '/hyjg-admin/mapi/account/register' this.isCodeDisabled = false
if(!this.$.isEmpty(this.logInData.phone)){ this.btnText = '获取验证码'
this.$.toast('请填写用户名') clearInterval(this.times)
return }
} }, 1000)
if(!this.$.isEmpty(this.logInData.password)){ },
this.$.toast('请填写密码') //
return confirmSub() {
} // this.$.setData('token','1')
// if(!this.isAgree){ // this.$.openTab('/pages/index/index')
// this.$.toast('') // return
// return // this.$.open('/pages/logIn/userInfo')
// } let url = '/hyjg-admin/mapi/account/register'
let datas = { if (!this.$.isEmpty(this.logInData.phone)) {
nuserid: this.logInData.phone, this.$.toast('请填写用户名')
cuserpwd: this.logInData.password, return
} }
url = '/hiddenDanger/auth/login' if (!this.$.isEmpty(this.logInData.password)) {
this.$.showLoading('登录中...') this.$.toast('请填写密码')
this.isDisabled = true return
this.$request.globalRequest(url, datas, 'POST').then(res => { }
if(res.code === 200){ // if(!this.isAgree){
this.$.toast('登录成功') // this.$.toast('')
this.$.setData('token',res.result.nuserid) // return
this.$.setData('userInfo', { username: res.result.nuserid,role:res.result.role }) // }
setTimeout(() => { let datas = {
this.$.hideLoading('登录中...') nuserid: this.logInData.phone,
this.isDisabled = false cuserpwd: this.logInData.password,
this.$.openTab('/pages/index/index') }
},1500) url = '/hiddenDanger/auth/login'
}else{ this.$.showLoading('登录中...')
this.$.toast(res.message) this.isDisabled = true
this.isDisabled = false this.$request.globalRequest(url, datas, 'POST').then(res => {
} if (res.code === 200) {
}) this.$.toast('登录成功')
}, this.$.setData('token', res.result.nuserid)
// this.$.setData('userInfo', {
findPsw(){ username: res.result.nuserid,
this.$.open('/pages/logIn/findPsw') role: res.result.role
}, })
chooseAgree(){ setTimeout(() => {
this.isAgree = !this.isAgree this.$.hideLoading('登录中...')
}, this.isDisabled = false
chooseNav(type){ this.$.openTab('/pages/index/index')
this.currNav = type }, 1500)
}, } else {
chooseType(type){ this.$.toast(res.message)
this.currType = type this.isDisabled = false
}, }
// }).catch(() => {
skipPage(even){ this.isDisabled = false
this.$.open(even) this.$.toast('连接服务器失败')
}, })
}, },
onReady() { //
}, findPsw() {
// this.$.open('/pages/logIn/findPsw')
onUnload() { },
chooseAgree() {
}, this.isAgree = !this.isAgree
// },
onPullDownRefresh() { chooseNav(type) {
// this.currNav = type
setTimeout(() => { },
uni.stopPullDownRefresh(); chooseType(type) {
}, 1500); this.currType = type
}, },
// //
onReachBottom() { skipPage(even) {
}, this.$.open(even)
} },
</script> },
onReady() {},
<style> //
page { onUnload() {
background:#FFFFFF;
} },
</style> //
<style lang="scss" scoped> onPullDownRefresh() {
//
.Box{ setTimeout(() => {
padding-top:var(--status-bar-height); uni.stopPullDownRefresh();
.Content{ }, 1500);
width: calc(100% - 176rpx); },
padding: 132rpx 0rpx 180rpx 0rpx; //
.Logo{ onReachBottom() {},
width: 150rpx; }
height: 150rpx; </script>
}
.NavBox{ <style>
.Unit{ page {
margin-right: 110rpx; background: #FFFFFF;
.Line{ }
left: 50%; </style>
transform: translateX(-50%); <style lang="scss" scoped>
bottom: -26rpx; .Box {
width: 74rpx; padding-top: var(--status-bar-height);
height: 10rpx;
border-radius: 6rpx; .Content {
} width: calc(100% - 176rpx);
} padding: 132rpx 0rpx 180rpx 0rpx;
}
.TypeBox{ .Logo {
.Unit{ width: 150rpx;
margin-right: 108rpx; height: 150rpx;
.Point{ }
width: 46rpx;
height: 46rpx; .NavBox {
} .Unit {
.Border{ margin-right: 110rpx;
width: 46rpx;
height: 46rpx; .Line {
border: 4rpx solid #B3BACB; left: 50%;
} transform: translateX(-50%);
} bottom: -26rpx;
} width: 74rpx;
.InputBox{ height: 10rpx;
.Input{ border-radius: 6rpx;
height: 110rpx; }
border-radius: 56rpx; }
.CodeBox{ }
text{
line-height: 110rpx; .TypeBox {
} .Unit {
} margin-right: 108rpx;
.Num{
width: 110rpx; .Point {
border-right: 4rpx solid #DADADA; width: 46rpx;
margin-top: 34rpx; height: 46rpx;
} }
.Input1{
width: calc(100% - 260rpx); .Border {
} width: 46rpx;
.Input2{ height: 46rpx;
width: calc(100% - 120rpx); border: 4rpx solid #B3BACB;
} }
} }
} }
.Agree{
.Point{ .InputBox {
width: 34rpx; .Input {
height: 34rpx; height: 110rpx;
} border-radius: 56rpx;
.Border{
width: 34rpx; .CodeBox {
height: 34rpx; text {
border: 2rpx solid #B3BACB; line-height: 110rpx;
} }
} }
.Btn{
margin-top: 196rpx; .Num {
height: 108rpx; width: 110rpx;
background: linear-gradient(90deg, #0064FF 0%, #2D99FD 100%); border-right: 4rpx solid #DADADA;
box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(194,218,255,1); margin-top: 34rpx;
border-radius: 54rpx; }
line-height: 108rpx;
} .Input1 {
} width: calc(100% - 260rpx);
} }
</style>
.Input2 {
width: calc(100% - 120rpx);
}
}
}
.Agree {
.Point {
width: 34rpx;
height: 34rpx;
}
.Border {
width: 34rpx;
height: 34rpx;
border: 2rpx solid #B3BACB;
}
}
.Btn {
margin-top: 196rpx;
height: 108rpx;
background: linear-gradient(90deg, #0064FF 0%, #2D99FD 100%);
box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(194, 218, 255, 1);
border-radius: 54rpx;
line-height: 108rpx;
}
}
}
</style>

@ -6,7 +6,7 @@
<view class="name FontS_50rpx FontBold MarginL_15rpx" <view class="name FontS_50rpx FontBold MarginL_15rpx"
@click="checkObjEmpty(userInfo) ? $.open('/pages/logIn/userInfo'):$.open('/pages/logIn/logIn')"> @click="checkObjEmpty(userInfo) ? $.open('/pages/logIn/userInfo'):$.open('/pages/logIn/logIn')">
{{ userInfo.realName || userInfo.username || '请登录'}} {{ dataInfo.cusername || userInfo.username || '请登录'}}
</view> </view>
<!-- <u-row justify="space-between" gutter="12" class="static-box"> <!-- <u-row justify="space-between" gutter="12" class="static-box">
@ -43,9 +43,10 @@
</u-row> --> </u-row> -->
</view> </view>
<u-cell-group class="margin-top"> <u-cell-group class="margin-top">
<u-cell icon="order" title="警号" :value="dataInfo.policeid" isLink></u-cell> <u-cell icon="order" title="警号" :value="dataInfo.policeid"></u-cell>
<u-cell icon="account" title="身份证号" :value="dataInfo.cdescription" isLink> </u-cell> <u-cell icon="account" title="身份证号" :value="dataInfo.cdescription"> </u-cell>
<u-cell icon="phone" title="联系方式" :value="dataInfo.phone" isLink></u-cell> <u-cell icon="phone" title="联系方式" :value="dataInfo.phone"></u-cell>
<u-cell icon="coupon" title="所属部门" :value="dataInfo.cdepartmentname"></u-cell>
</u-cell-group> </u-cell-group>
<u-cell-group style="margin-top:20rpx;padding:10rpx 20rpx"> <u-cell-group style="margin-top:20rpx;padding:10rpx 20rpx">
<u-cell icon="lock" title="修改密码" isLink @click='possword'></u-cell> <u-cell icon="lock" title="修改密码" isLink @click='possword'></u-cell>
@ -59,9 +60,9 @@
<script> <script>
import tabFun from '@/libs/function/tabbar.js' import tabFun from '@/libs/function/tabbar.js'
const base64Avatar = // const base64Avatar =
"data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlk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XoVeqFENt4b64rnfOiRI9zDT/RAt7ckSGXJMypYHwRzRMS4AUHaoVcwry6rXoi0RwYN6N5QvTjXFPdWPJiQ4UdQpEtZt4E/9G4QNU+RMyaSs7y7q4HTcg1RLsK9D8FtVZEbCwVYl5Id7Co2IlcBgpTKagdQ+6iD9DAZ5VnPoh3XjWregYsio7LE9rP9zw2+PeQjfqk9ZIR2d0T969xvtD889oN5XoXBG/PQ+vyXDxtrQ8R6+Y62zbrIz493Lu6vfdWFoqP4f+nLoyraTihhQCNO91+4gTka6ZplxzhaMfwKikpZurX5zveaNwwqdNQXMJTN1I+xAbOhHK6ezyz8Z22ypMXxnSRpJYMwumT7KgvtZcYNN5N1YY564yPjBxHhNG6pua2yjM948myGMRlKLzB8UQz4dqUzQfOFkemz5HSUGt0nr8+pRyemM34/eKYZvfWKgsKUSvsEYJ+84HO4nN9k4oE2x2PzMeOsMVoTIHrM9BMfGM+9tdwloJ1tih9bj1zM5uJM3+RZjDIaA1xVLlYLsvEkC9ribexFDLTRCd69opZq5CTS8SMOSr/L50juoR1Q/wXezDsV4mIn4fYenJF3v/l3i2DR/4Y0rZfMmkGTDMZ4UIj8hR6+i1KJUUuznkWCMuMVxqtA9JtBrJf7+Yag7Px0fJYjvcmy0F4+TZl90igyCCnoSKanvGSyLgpmYSGrJVBX5PFJSMIPAS5WDBHSwUgEwkYdMoA2J2g8u1/VfDG2hxN2McuuBuk9kWTStS7+BXwZioBnkugBrzF7iWoDbUfUJFmUgOAtxO1ofg07l4BqFIkhPzUF+lo3N2WGwKeYVudfOuEUbbVeRTlAOnuwSZrDlMRtpNyc/hfAQYAFFwdv9Iba+4AAAAASUVORK5CYII='
import TopTitle from "../../components/top-title"; import TopTitle from "../../components/top-title";
import Tabbar from "../../components/tabbar.vue"; import Tabbar from "../../components/tabbar.vue";
export default { export default {
@ -146,11 +147,20 @@
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.dataInfo = res.result; this.dataInfo = res.result;
this.$set(this.dataInfo,'cdescription',this.processIDCard(res.result.cdescription))
} else { } else {
this.$.toast(res.message) this.$.toast(res.message)
} }
}); });
}, },
processIDCard(idCard) {
if (idCard.length !== 18) {
return idCard
}
// 使'********'144
return '********' + idCard.slice(-4);
},
// //
possword() { possword() {
// this.$.openNew('/pages/mine/password') // this.$.openNew('/pages/mine/password')

@ -1,161 +1,196 @@
<template> <template>
<view id="page" class="password-box"> <view id="page" class="password-box">
<view class="Width100 Box BorderBox"> <view class="Width100 Box BorderBox">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" class="form" labelWidth="100"> <u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" class="form" labelWidth="100">
<!-- <u-form-item label="原密码" prop="password" borderBottom> <!-- <u-form-item label="原密码" prop="password" borderBottom>
<u--input v-model="form.password" border="none"></u--input> <u--input v-model="form.password" border="none"></u--input>
</u-form-item> --> </u-form-item> -->
<u-form-item label="新密码" prop="password" borderBottom> <u-form-item label="新密码" prop="password" borderBottom>
<u--input v-model="form.password" border="none"></u--input> <u--input v-model="form.password" border="none" :password="isPassword">
</u-form-item> <template slot="suffix">
<u-form-item label="确认密码" prop="confirmPassword" borderBottom> <u-icon name="eye-off" v-if="isPassword" @click="isPassword=!isPassword"></u-icon>
<u--input v-model="form.confirmPassword" border="none"></u--input> <u-icon name="eye-fill" v-else @click="isPassword=!isPassword"></u-icon>
</u-form-item> </template>
</u--form> </u--input>
<view @click="submit" class="Unit FontBold BorderBox TextCenter Width100 MarginT_30rpx BorderR_30rpx submit"> </u-form-item>
提交 <u-form-item label="确认密码" prop="confirmPassword" borderBottom>
</view> <u--input v-model="form.confirmPassword" border="none" :password="isPassword">
<!-- <uni-forms :modelValue="formData" border> <template slot="suffix">
<uni-forms-item label="道路类型"> <u-icon name="eye-off" v-if="isPassword" @click="isPassword=!isPassword"></u-icon>
<input v-if="isEdit" type="text" class="BorderNone Height100" v-model="formData.roadType" <u-icon name="eye-fill" v-else @click="isPassword=!isPassword"></u-icon>
placeholder="请输入道路类型" /> </template>
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ </u--input>
formData.roadType </u-form-item>
}}</text> <text class="tip"> 密码需要包含数字大小写字母特殊符号中3种以上组合</text>
</uni-forms-item> </u--form>
</uni-forms > -->
</view> <view @click="submit"
</view> class="Unit FontBold BorderBox TextCenter Width100 MarginT_30rpx BorderR_30rpx submit">
</template> 提交
</view>
<script> <!-- <uni-forms :modelValue="formData" border>
export default { <uni-forms-item label="道路类型">
data() { <input v-if="isEdit" type="text" class="BorderNone Height100" v-model="formData.roadType"
return { placeholder="请输入道路类型" />
// js <text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{
$: this.$, formData.roadType
rules: { }}</text>
// 'password': { </uni-forms-item>
// type: 'string', </uni-forms > -->
// required: true, </view>
// message: '', </view>
// trigger: ['blur', 'change'] </template>
// },
<script>
}, export default {
form: { data() {
confirmPassword: "", return {
password: "" // js
}, $: this.$,
} rules: {
}, // 'password': {
// // type: 'string',
onLoad(e) { // required: true,
// message: '',
}, // trigger: ['blur', 'change']
// // },
onShow() {
}, },
// form: {
computed: {}, confirmPassword: "",
// password: ""
methods: { },
// sexSelect(e) { isPassword: true
// this.model1.userInfo.sex = e.name }
// this.$refs.uForm.validateField('userInfo.sex') },
// }, //
}, onLoad(e) {
onReady() {
//setRules },
this.$refs.uForm.setRules(this.rules) //
}, onShow() {},
// //
onUnload() { computed: {},
//
}, methods: {
methods: { // sexSelect(e) {
// // this.model1.userInfo.sex = e.name
submit() { // this.$refs.uForm.validateField('userInfo.sex')
if (!this.form.password) { // },
this.$.toast('请输入密码') },
} onReady() {
else if (this.form.password != this.form.confirmPassword) { //setRules
this.$.toast('两次密码不一致') this.$refs.uForm.setRules(this.rules)
} else { },
this.$request //
.globalRequest( onUnload() {
"/hiddenDanger/auth/updatePwd",
{ },
cusername: this.$.getData('userInfo').username, methods: {
nuserid: this.$.getData("token"), isValidPassword(password) {
nuserpwd: this.form.password, //
}, const hasDigit = /\d/.test(password);
"POST", const hasUpper = /[A-Z]/.test(password);
true const hasLower = /[a-z]/.test(password);
) const hasSpecial = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(password); //
.then((res) => {
//
if (res.code === 200) { let count = 0;
this.$.toast('密码修改成功~') if (hasDigit) count++;
setTimeout(() => { if (hasUpper) count++;
uni.navigateBack({ if (hasLower) count++;
delta: 1, if (hasSpecial) count++;
});
}, 2000); // 3
} else { return count >= 3;
this.$.toast(res.message) },
} //
submit() {
}); if (!this.form.password) {
} this.$.toast('请输入密码')
} else if(!this.isValidPassword(this.form.password)){
}, this.$.toast('密码格式不正确')
}, } else if (this.form.password != this.form.confirmPassword) {
// this.$.toast('两次密码不一致')
onPullDownRefresh() { } else {
this.$request
}, .globalRequest(
// "/hiddenDanger/auth/updatePwd", {
onReachBottom() { cusername: this.$.getData('userInfo').username,
}, nuserid: this.$.getData("token"),
} nuserpwd: this.form.password,
</script> },
"POST",
<style> true
</style> )
<style lang="scss" scoped> .then((res) => {
page {
background: #F6F8FA; if (res.code === 200) {
} this.$.toast('密码修改成功~')
setTimeout(() => {
.password-box { uni.navigateBack({
position: fixed; delta: 1,
width: 100%; });
height: 100%; }, 2000);
background-color: #F6F8FA; } else {
padding: 10rpx 30rpx; this.$.toast(res.message)
}
.form {
width: 690rpx; });
} }
/deep/ .u-form-item__body { },
padding: 30rpx 10rpx; },
} //
onPullDownRefresh() {
.submit {
/* background: #E1EDFF; */ },
background: linear-gradient(90deg, #0064FF 0%, #2D99FD 100%); //
color: #ffffff; onReachBottom() {},
width: 690rpx !important; }
height: 94rpx; </script>
line-height: 94rpx;
border-radius: 13rpx; <style>
margin-top: 70rpx; </style>
font-weight: 500; <style lang="scss" scoped>
margin-left: 0; page {
font-size: 32rpx; background: #F6F8FA;
letter-spacing: 4rpx; }
}
} .password-box {
position: fixed;
width: 100%;
height: 100%;
background-color: #F6F8FA;
padding: 10rpx 30rpx;
.form {
width: 690rpx;
}
.tip{
font-size:24rpx;
top:10rpx;
position:relative;
color:#e01515;
}
/deep/ .u-form-item__body {
padding: 30rpx 10rpx;
}
.submit {
/* background: #E1EDFF; */
background: linear-gradient(90deg, #0064FF 0%, #2D99FD 100%);
color: #ffffff;
width: 690rpx !important;
height: 94rpx;
line-height: 94rpx;
border-radius: 13rpx;
margin-top: 70rpx;
font-weight: 500;
margin-left: 0;
font-size: 32rpx;
letter-spacing: 4rpx;
}
}
</style> </style>
Loading…
Cancel
Save