对接评价接口

master
chen 2022-05-13 17:39:50 +08:00
parent cdd36d31b1
commit 467d0d8ea0
25 changed files with 998 additions and 373 deletions

View File

@ -10,8 +10,8 @@
onLaunch: function() { onLaunch: function() {
// //
// #ifdef H5 // #ifdef H5
this.globalData.hostapi = 'https://7and5.cn'; // this.globalData.hostapi = 'https://7and5.cn';
// this.globalData.hostapi = '/web'; this.globalData.hostapi = '/web';
// #endif // #endif
}, },
onShow: function() { onShow: function() {

View File

@ -75,7 +75,7 @@ button:after{content: none!important;}
.bbot{border-bottom: 2rpx solid #EEEEEE;} .bbot{border-bottom: 2rpx solid #EEEEEE;}
.borbot-df{border: 2rpx solid #DFDFDF;} .borbot-df{border: 2rpx solid #DFDFDF;}
.borbot-cc{border: 2rpx solid #CCCCCC;} .borbot-cc{border: 2rpx solid #CCCCCC;}
.bleft {border-left: 1rpx solid #EEEEEE;} .bleft {border-left: 2rpx solid #EEEEEE;}
/* 行高 */ /* 行高 */
.line-h30{line-height: 30rpx;} .line-h30{line-height: 30rpx;}
@ -149,7 +149,7 @@ button:after{content: none!important;}
/* 字体颜色 */ /* 字体颜色 */
.colf{color: #FFFFFF;} .colf{color: #FFFFFF;}
.colf6{color: #f6f6f6;} .colf6{color: #f6f6f6;}
.colb{color: #000000;} .col0{color: #000000;}
.colc{color: #CCCCCC;} .colc{color: #CCCCCC;}
.col3{color: #333333;} .col3{color: #333333;}
.col34{color: #343434;} .col34{color: #343434;}
@ -165,6 +165,16 @@ button:after{content: none!important;}
.colpeili{color: #868695;} .colpeili{color: #868695;}
/* 背景颜色 */
.pbackc{background-color: #3875F6;}
.bacf{background-color: #FFFFFF;}
.bac0{background-color: #000000;}
.bcdb{background-color: #DBDBDB;}
.bcf8{background: #F85050;}
.bacf5{background: #F5F5F5;}
.bacf6{background-color: #f6f6f6;}
/* 字体位置 */ /* 字体位置 */
.tright{text-align: right;} .tright{text-align: right;}
.tcenter{text-align: center;} .tcenter{text-align: center;}
@ -195,16 +205,6 @@ button:after{content: none!important;}
.bold500{font-weight: 500;} .bold500{font-weight: 500;}
/* 背景颜色 */
.pbackc{background-color: #3875F6;}
.bacf{background-color: #FFFFFF;}
.bac0{background-color: #000000;}
.bcdb{background-color: #DBDBDB;}
.bcf8{background: #F85050;}
.bacf5{background: #F5F5F5;}
.bacf6{background-color: #f6f6f6;}
/* 圆角 */ /* 圆角 */
.radius10{border-radius: 10rpx;} .radius10{border-radius: 10rpx;}

View File

@ -236,18 +236,21 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;}
border: 4rpx solid #818181; border: 4rpx solid #818181;
border-radius: 100%; border-radius: 100%;
margin-right: 10rpx; margin-right: 10rpx;
display: flex;
justify-content: center;
align-items: center;
} }
.gender-box view::before { .gender-box view::before {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
content: ''; content: '';
display: block; display: block;
/* position: absolute;
top: 50%;
left: 50%;
tran */sform: translate(-50%,-50%);
width: 14rpx; width: 14rpx;
height: 14rpx; height: 14rpx;
background-color: #818181; background-color: #818181;
border-radius: 100%; border-radius: 50%;
} }
.gender-active view{ .gender-active view{
border: 4rpx solid #d81e06!important; border: 4rpx solid #d81e06!important;
@ -314,7 +317,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;}
background-color: #03affb; background-color: #03affb;
} }
.account-btn { .account-btn {
border: 1rpx solid #00a2e9; border: 2rpx solid #00a2e9;
color: #00a2e9; color: #00a2e9;
border-radius: 16rpx; border-radius: 16rpx;
padding: 8rpx 10rpx; padding: 8rpx 10rpx;

View File

@ -125,7 +125,7 @@
uni.reLaunch({url:'/pagesA/project/projectList'}) uni.reLaunch({url:'/pagesA/project/projectList'})
break; break;
case 2: case 2:
// #ifdef APP-PLUS, MP-WEIXIN // #ifdef APP-PLUS || MP-WEIXIN
uni.scanCode({ uni.scanCode({
onlyFromCamera:false, // onlyFromCamera:false, //
scanType: ['qrCode'], // barCode qrCode datamatrixData Matrix pdf417PDF417 scanType: ['qrCode'], // barCode qrCode datamatrixData Matrix pdf417PDF417
@ -184,6 +184,8 @@
// console.log(res1) // console.log(res1)
// } // }
// } // }
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}); });
}, },

View File

@ -1,4 +1,5 @@
import { renewLocation } from './public-api.js'; import { renewLocation } from './public-api.js';
import permision from "@/js_sdk/wa-permission/permission.js"
// 解决微信小程序 // 解决微信小程序
var QQMapWX = require('./map/qqmap-wx-jssdk.min.js'); var QQMapWX = require('./map/qqmap-wx-jssdk.min.js');
var qqmapsdk = new QQMapWX({ var qqmapsdk = new QQMapWX({
@ -37,6 +38,135 @@ const jsonp = function(url, data) {
} }
const tools = { const tools = {
// 检测是否授权了
checkQx(num){
// #ifdef APP-PLUS
let system = uni.getSystemInfoSync(); // 获取系统信息
let current = '-1';
let errArr = ['相机','读取相册']
if (system.platform === 'android') { // 判断平台
if(num==2) {
if(!permision.requestAndroidPermission('android.permission.CAMERA')) {
// 如果相机没有授权
current = 0;
}
}
if(num==8) {
if(!permision.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE')) {
// 如果外部存储(含相册)读取权限没有授权
current = 1;
}
}
} else if (system.platform === 'ios') {
if(num==2) {
if(!permision.judgeIosPermission('camera')) {
// 如果相机没有授权
current = 0;
}
}
if(num==8) {
if(!permision.judgeIosPermission('photoLibrary')) {
// 如果外部存储(含相册)读取权限没有授权
current = 1;
}
}
}
if(current!='-1') {
uni.showModal({
content: `${errArr[current]}权限未获得授权`,
confirmText:'去设置',
cancelText:'取消',
success: (qx) => {
if(qx.confirm) {
permision.gotoAppPermissionSetting()
}
}
});
}
// #endif
// #ifdef MP-WEIXIN
wx.getSetting({
success(res) {
if (!res.authSetting['scope.camera']) { //获取摄像头权限
wx.authorize({
scope:'scope.camera',
success() {
console.log('授权成功')
}, fail() {
wx.showModal({
title: '提示',
content: '尚未进行授权,部分功能将无法使用',
showCancel: false,
success(res) {
if (res.confirm) {
console.log('用户点击确定')
wx.openSetting({ //这里的方法是调到一个添加权限的页面,可以自己尝试
success: (res) => {
if (!res.authSetting['scope.camera']) {
wx.authorize({
scope: 'scope.camera',
success() {
console.log('授权成功')
}, fail() {
console.log('用户点击取消')
}
})
}
},
fail: function () {
console.log("授权设置录音失败");
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
})
}
if (!res.authSetting['scope.writePhotosAlbum']) { //获取摄像头权限
wx.authorize({
scope:'scope.writePhotosAlbum',
success() {
console.log('授权成功')
}, fail() {
wx.showModal({
title: '提示',
content: '尚未进行授权,部分功能将无法使用',
showCancel: false,
success(res) {
if (res.confirm) {
console.log('用户点击确定')
wx.openSetting({ //这里的方法是调到一个添加权限的页面,可以自己尝试
success: (res) => {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success() {
console.log('授权成功')
}, fail() {
console.log('用户点击取消')
}
})
}
},
fail: function () {
console.log("授权设置录音失败");
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
})
}
}
})
// #endif
},
checkOpenGPSServiceByAndroidIOS() { checkOpenGPSServiceByAndroidIOS() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
let system = uni.getSystemInfoSync(); // 获取系统信息 let system = uni.getSystemInfoSync(); // 获取系统信息
@ -97,7 +227,6 @@ const tools = {
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.getSetting({ wx.getSetting({
success: (res) => { success: (res) => {
console.log(res,99);
if (!res.authSetting['scope.userLocation']) { if (!res.authSetting['scope.userLocation']) {
//打开提示框,提示前往设置页面 //打开提示框,提示前往设置页面
uni.showModal({ uni.showModal({
@ -410,9 +539,10 @@ const tools = {
}, },
// 整数添加.00,小数就不添加 // 整数添加.00,小数就不添加
addXiaoShu(num){ addXiaoShu(num){
console.log(num,120); console.log(num,'添加小数的方法start');
let str = num.toString(); let str = '0.00'
if(str.length > 9){ if(num) {
str = str = num.toString();
str = str*1; str = str*1;
str = str.toFixed(2); str = str.toFixed(2);
str = str+''; str = str+'';
@ -521,7 +651,7 @@ const tools = {
}, },
// 日期===>时间戳 // 日期===>时间戳
timeToTimestamp(time){ timeToTimestamp(time){
var date = new Date(time); var date = new Date(time.replace(/-/g,'/'));
var timestamp = date.getTime();//精确到毫秒 var timestamp = date.getTime();//精确到毫秒
return timestamp return timestamp
// var date = new Date('2014-04-23 18:55:49:123'); // var date = new Date('2014-04-23 18:55:49:123');
@ -843,13 +973,6 @@ const tools = {
// 拨打电话 // 拨打电话
countCustomer(phone){ countCustomer(phone){
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
if(res.platform=='ios'){
uni.makePhoneCall({
phoneNumber:phone*1,
success: () => {},
fail: () => {}
})
} else {
uni.showActionSheet({ uni.showActionSheet({
itemList:[phone,'立即呼叫'], itemList:[phone,'立即呼叫'],
itemColor:'#3875F6', itemColor:'#3875F6',
@ -861,7 +984,6 @@ const tools = {
} }
} }
}) })
}
}, },
/** /**
* @description 自动返回上一页事件 * @description 自动返回上一页事件

View File

@ -0,0 +1,272 @@
/**
* 本模块封装了AndroidiOS的应用权限判断打开应用权限设置界面以及位置系统服务是否开启
*/
var isIos
// #ifdef APP-PLUS
isIos = (plus.os.name == "iOS")
// #endif
// 判断推送权限是否开启
function judgeIosPermissionPush() {
var result = false;
var UIApplication = plus.ios.import("UIApplication");
var app = UIApplication.sharedApplication();
var enabledTypes = 0;
if (app.currentUserNotificationSettings) {
var settings = app.currentUserNotificationSettings();
enabledTypes = settings.plusGetAttribute("types");
console.log("enabledTypes1:" + enabledTypes);
if (enabledTypes == 0) {
console.log("推送权限没有开启");
} else {
result = true;
console.log("已经开启推送功能!")
}
plus.ios.deleteObject(settings);
} else {
enabledTypes = app.enabledRemoteNotificationTypes();
if (enabledTypes == 0) {
console.log("推送权限没有开启!");
} else {
result = true;
console.log("已经开启推送功能!")
}
console.log("enabledTypes2:" + enabledTypes);
}
plus.ios.deleteObject(app);
plus.ios.deleteObject(UIApplication);
return result;
}
// 判断定位权限是否开启
function judgeIosPermissionLocation() {
var result = false;
var cllocationManger = plus.ios.import("CLLocationManager");
var status = cllocationManger.authorizationStatus();
result = (status != 2)
console.log("定位权限开启:" + result);
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
/* var enable = cllocationManger.locationServicesEnabled();
var status = cllocationManger.authorizationStatus();
console.log("enable:" + enable);
console.log("status:" + status);
if (enable && status != 2) {
result = true;
console.log("手机定位服务已开启且已授予定位权限");
} else {
console.log("手机系统的定位没有打开或未给予定位权限");
} */
plus.ios.deleteObject(cllocationManger);
return result;
}
// 判断麦克风权限是否开启
function judgeIosPermissionRecord() {
var result = false;
var avaudiosession = plus.ios.import("AVAudioSession");
var avaudio = avaudiosession.sharedInstance();
var permissionStatus = avaudio.recordPermission();
console.log("permissionStatus:" + permissionStatus);
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
console.log("麦克风权限没有开启");
} else {
result = true;
console.log("麦克风权限已经开启");
}
plus.ios.deleteObject(avaudiosession);
return result;
}
// 判断相机权限是否开启
function judgeIosPermissionCamera() {
var result = false;
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
console.log("authStatus:" + authStatus);
if (authStatus == 3) {
result = true;
console.log("相机权限已经开启");
} else {
console.log("相机权限没有开启");
}
plus.ios.deleteObject(AVCaptureDevice);
return result;
}
// 判断相册权限是否开启
function judgeIosPermissionPhotoLibrary() {
var result = false;
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
var authStatus = PHPhotoLibrary.authorizationStatus();
console.log("authStatus:" + authStatus);
if (authStatus == 3) {
result = true;
console.log("相册权限已经开启");
} else {
console.log("相册权限没有开启");
}
plus.ios.deleteObject(PHPhotoLibrary);
return result;
}
// 判断通讯录权限是否开启
function judgeIosPermissionContact() {
var result = false;
var CNContactStore = plus.ios.import("CNContactStore");
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
if (cnAuthStatus == 3) {
result = true;
console.log("通讯录权限已经开启");
} else {
console.log("通讯录权限没有开启");
}
plus.ios.deleteObject(CNContactStore);
return result;
}
// 判断日历权限是否开启
function judgeIosPermissionCalendar() {
var result = false;
var EKEventStore = plus.ios.import("EKEventStore");
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
if (ekAuthStatus == 3) {
result = true;
console.log("日历权限已经开启");
} else {
console.log("日历权限没有开启");
}
plus.ios.deleteObject(EKEventStore);
return result;
}
// 判断备忘录权限是否开启
function judgeIosPermissionMemo() {
var result = false;
var EKEventStore = plus.ios.import("EKEventStore");
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
if (ekAuthStatus == 3) {
result = true;
console.log("备忘录权限已经开启");
} else {
console.log("备忘录权限没有开启");
}
plus.ios.deleteObject(EKEventStore);
return result;
}
// Android权限查询
function requestAndroidPermission(permissionID) {
return new Promise((resolve, reject) => {
plus.android.requestPermissions(
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
function(resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
}
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
var deniedPresentPermission = resultObj.deniedPresent[i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
resolve(result);
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
// if (result != 1) {
// gotoAppPermissionSetting()
// }
},
function(error) {
console.log('申请权限错误:' + error.code + " = " + error.message);
resolve({
code: error.code,
message: error.message
});
}
);
});
}
// 使用一个方法,根据参数判断权限
function judgeIosPermission(permissionID) {
if (permissionID == "location") {
return judgeIosPermissionLocation()
} else if (permissionID == "camera") {
return judgeIosPermissionCamera()
} else if (permissionID == "photoLibrary") {
return judgeIosPermissionPhotoLibrary()
} else if (permissionID == "record") {
return judgeIosPermissionRecord()
} else if (permissionID == "push") {
return judgeIosPermissionPush()
} else if (permissionID == "contact") {
return judgeIosPermissionContact()
} else if (permissionID == "calendar") {
return judgeIosPermissionCalendar()
} else if (permissionID == "memo") {
return judgeIosPermissionMemo()
}
return false;
}
// 跳转到**应用**的权限页面
function gotoAppPermissionSetting() {
if (isIos) {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
var setting2 = NSURL2.URLWithString("app-settings:");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
} else {
// console.log(plus.device.vendor);
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var Uri = plus.android.importClass("android.net.Uri");
var mainActivity = plus.android.runtimeMainActivity();
var intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
intent.setData(uri);
mainActivity.startActivity(intent);
}
}
// 检查系统的设备服务是否开启
// var checkSystemEnableLocation = async function () {
function checkSystemEnableLocation() {
if (isIos) {
var result = false;
var cllocationManger = plus.ios.import("CLLocationManager");
var result = cllocationManger.locationServicesEnabled();
console.log("系统定位开启:" + result);
plus.ios.deleteObject(cllocationManger);
return result;
} else {
var context = plus.android.importClass("android.content.Context");
var locationManager = plus.android.importClass("android.location.LocationManager");
var main = plus.android.runtimeMainActivity();
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
console.log("系统定位开启:" + result);
return result
}
}
module.exports = {
judgeIosPermission: judgeIosPermission,
requestAndroidPermission: requestAndroidPermission,
checkSystemEnableLocation: checkSystemEnableLocation,
gotoAppPermissionSetting: gotoAppPermissionSetting
}

View File

@ -32,10 +32,12 @@
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },

View File

@ -76,8 +76,9 @@
} }
this.$requst.post('/universal/api.login/password_find',params).then(res=>{ this.$requst.post('/universal/api.login/password_find',params).then(res=>{
if(res.code==1) { if(res.code==1) {
this.$toolAll.tools.showToast('找回成功'); this.$toolAll.tools.showToast('修改成功,请重新登录');
setTimeout(()=>{uni.navigateTo({url:'/pages/login/login'})},1000) uni.clearStorageSync();
uni.reLaunch({url:'/pages/login/login'});
} else { } else {
this.$toolAll.tools.showToast(res.msg); this.$toolAll.tools.showToast(res.msg);
} }

View File

@ -15,58 +15,37 @@
this.checkContext(); this.checkContext();
}, },
methods: { methods: {
//
checkContext(){ checkContext(){
if(uni.getStorageSync('token')) { if(uni.getStorageSync('password')) {
setTimeout(()=>{ // token
uni.reLaunch({ let params = {
url:'/pages/tabbar/pagehome/pagehome' login_type: 'account', // mobileaccount
}) phone: '', // login_type mobile
},3000) password: uni.getStorageSync('password'), // login_type account
} else { sms_code: '', // login_type mobile
setTimeout(()=>{ username: uni.getStorageSync('phone'), //login_type account
uni.reLaunch({ affiliation: uni.getStorageSync('unitName') //
url:'/pages/login/login'
})
},3000)
} }
// #ifdef APP-PLUS this.$requst.post('/universal/api.login/login',params).then(res=>{
// if(uni.getSystemInfoSync().platform != "devtools"){//devtools iosandroidmac3.1.10+windows3.1.10+linux3.1.10+ if(res.code==1) {
// console.log = () =>{} // token
// } uni.setStorageSync('token',res.data.token);
// setTimeout(()=>{ } else {
// uni.reLaunch({ this.$toolAll.tools.showToast(res.msg);
// url:'/pages/login/login' }
// }) })
// },3000) this.goPage(1);
// #endif } else {
// #ifdef H5 this.goPage(0);
// if(uni.getSystemInfoSync().platform != "development"){//devtools iosandroidmac3.1.10+windows3.1.10+linux3.1.10+ }
// console.log = () =>{} },
// } //
// setTimeout(()=>{ goPage(index) {
// uni.reLaunch({ let arr = [
// url:'/pages/login/login' '/pages/login/login',
// }) '/pages/tabbar/pagehome/pagehome'
// },3000) ]
// #endif setTimeout(()=>{uni.reLaunch({url:arr[index]})},3000)
// API
// #ifdef MP-WEIXIN
// let hInfo = wx.getAccountInfoSync();
// // console.log(hInfo.envVersion);//develop: trial release
// if(hInfo.miniProgram.envVersion == "develop" || hInfo.miniProgram.envVersion == "trial"){
// // (,)-
// } else {
// //
// console.log = () =>{};
// // -
// }
// setTimeout(()=>{
// uni.reLaunch({
// url:'/pages/tabbar/pagehome/pagehome'
// })
// },3000)
// #endif
} }
} }
} }

View File

@ -103,6 +103,11 @@
url:'/pages/tabbar/pagehome/pagehome' url:'/pages/tabbar/pagehome/pagehome'
}) })
},2000) },2000)
if(this.login_password) {
uni.setStorageSync('password',this.login_password), // login_type account
uni.setStorageSync('phone',this.login_phone), //login_type account
uni.setStorageSync('unitName',this.login_unitName) //
}
} else { } else {
this.$toolAll.tools.showToast(res.msg); this.$toolAll.tools.showToast(res.msg);
} }

View File

@ -18,13 +18,11 @@
<view slot="rightContent" style="width: 30rpx;"></view> <view slot="rightContent" style="width: 30rpx;"></view>
<!-- #endif --> <!-- #endif -->
</status-nav-slot> </status-nav-slot>
<view class="posir" <view class="posir my-content-box"
style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;"
:style="{paddingTop: newHeight + 'px'}"> :style="{paddingTop: newHeight + 'px'}">
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> --> <!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
<view class="mar-zy40"> <view class="mar-zy40">
<view <view class="my-head-box">
style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;">
<view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;"> <view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;">
<view class="disac"> <view class="disac">
<!-- 用户头像 --> <!-- 用户头像 -->
@ -70,9 +68,11 @@
v-for="(item,index) in gridList" :key="index" v-for="(item,index) in gridList" :key="index"
:class="[`${(index%2!=0) ? 'bleft' : ''} ${(index < gridList.length-2) ? 'bbot' : ''}`]" :class="[`${(index%2!=0) ? 'bleft' : ''} ${(index < gridList.length-2) ? 'bbot' : ''}`]"
style="box-sizing: border-box;"> style="box-sizing: border-box;">
<view class="" style="height: 53rpx;">
<image :src="item.imgsrc" mode="widthFix" lazy-load <image :src="item.imgsrc" mode="widthFix" lazy-load
:style="{width: [52,52,46,50,46,52][index] + 'rpx',height: [48,45,52,52,53,52][index] + 'rpx'}"> :style="{width: [52,52,46,50,46,52][index] + 'rpx',height: [48,45,52,52,53,52][index] + 'rpx'}">
</image> </image>
</view>
<view class="fon26 col3 mar-s20">{{item.title}}</view> <view class="fon26 col3 mar-s20">{{item.title}}</view>
</view> </view>
</view> </view>
@ -161,7 +161,7 @@
], ],
userInfo: {}, userInfo: {},
ifAuthentication:0,// ifAuthentication:0,//
userHeadImg:''// userHeadImg:'',//
} }
}, },
onShow() { onShow() {
@ -191,19 +191,25 @@
sourceType:['album','camera'], sourceType:['album','camera'],
success: (res) => { success: (res) => {
this.userHeadImg = res.tempFilePaths[0]; this.userHeadImg = res.tempFilePaths[0];
// this.$requst.upload('/universal/api.user/avatar',{path:this.userHeadImg}).then(res=>{ uploadImg({path:this.userHeadImg}).then(res=>{
// if(res.code) { if(res.code) {
// // this.$toolAll.tools.showToast('修改成功');
// this.checkInfo(); // this.temporaryImg[index] = res.data.id;
// } this.$requst.post('/universal/api.user/avatar',{avatar:res.data.id}).then(res=>{
// }) if(res.code) {
//
this.checkInfo();
}
})
}
})
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },
// 退 // 退
logOutEv() { logOutEv() {
this.$requst.post('/universal/api.login/signout').then(res => {
if (res.code == 1) {
this.$toolAll.tools.showToast('退出成功'); this.$toolAll.tools.showToast('退出成功');
// //
uni.clearStorageSync(); uni.clearStorageSync();
@ -212,8 +218,7 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
}, 1000) }, 1000)
} this.$requst.post('/universal/api.login/signout').then(res => {})
})
}, },
// //
tel(tel="0000000000") { tel(tel="0000000000") {
@ -265,4 +270,6 @@
page { page {
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.my-content-box{background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;}
.my-head-box{background: url(/static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;}
</style> </style>

View File

@ -10,20 +10,14 @@
<view slot="centerContent" class="disjcac"> <view slot="centerContent" class="disjcac">
<image style="width: 156rpx;height: 38rpx;" src="/static/public/icom-home-logo.png" mode="widthFix"></image> <image style="width: 156rpx;height: 38rpx;" src="/static/public/icom-home-logo.png" mode="widthFix"></image>
</view> </view>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS || H5 -->
<view slot="rightContent" class="disac" @tap="callEv">
<image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
<view class="fon26 col3">拨打电话</view>
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view slot="rightContent" class="disac" @tap="callEv"> <view slot="rightContent" class="disac" @tap="callEv">
<image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image> <image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
<view class="fon26 col3">拨打电话</view> <view class="fon26 col3">拨打电话</view>
</view> </view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view slot="rightContent" @tap="goMessage" style="width: 70px;"></view> <view slot="rightContent" style="width: 70px;"></view>
<!-- #endif --> <!-- #endif -->
</status-nav-slot> </status-nav-slot>
<!-- <view :style="{paddingTop: statusHeight +'px'}"> --> <!-- <view :style="{paddingTop: statusHeight +'px'}"> -->
@ -164,7 +158,7 @@
<view class="disac mar-s40"> <view class="disac mar-s40">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index"> <view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index">
<view class="posir" style="height: 58rpx;"> <view class="posir" style="height: 58rpx;">
<image :style="{width: [58,50,58][index]+'rpx',height:[54,58,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image> <image :style="{width: [58,50,58][index]+'rpx',height:[54,58,58][index] + 'rpx'}" style="width: 58rpx;" :src="item.imgsrc" mode="widthFix"></image>
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view> <view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
</view> </view>
<view class="fon24 col3 mar-s10">{{item.title}}</view> <view class="fon24 col3 mar-s10">{{item.title}}</view>
@ -175,9 +169,11 @@
<!-- 其他 --> <!-- 其他 -->
<view class="home-fun-box"> <view class="home-fun-box">
<view class="fun-title col3 fon28 disac bold">其他</view> <view class="fun-title col3 fon28 disac bold">其他</view>
<view class="disac mar-s60 mar-x20" style="height: 58rpx;"> <view class="disac mar-s60 mar-x20">
<view @tap="otherEv(index)" class="disjcac fc width25" v-for="(item,index) in otherList" :key="index"> <view @tap="otherEv(index)" class="disjcac fc width25" v-for="(item,index) in otherList" :key="index">
<image :style="{width: [58,49,58][index]+'rpx',height:[51,58,55][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image> <view class="posir" style="height: 58rpx;">
<image :style="{width: [58,49,58][index]+'rpx',height:[51,58,55][index] + 'rpx'}" style="width: 58rpx;" :src="item.imgsrc" mode="widthFix"></image>
</view>
<view class="fon24 col3 mar-s10">{{item.title}}</view> <view class="fon24 col3 mar-s10">{{item.title}}</view>
</view> </view>
</view> </view>
@ -478,7 +474,8 @@
}, },
// //
callEv(){ callEv(){
this.$toolAll.tools.countCustomer('15616330510'); // this.$toolAll.tools.countCustomer('15616330510');
this.$toolAll.tools.countCustomer('17366921088');
} }
} }
} }

View File

@ -57,13 +57,13 @@
<view class=""> <view class="">
<text class="cor">*</text>联系电话 <text class="cor">*</text>联系电话
</view> </view>
<input type="text" v-model="data.contact_phone" class="input" placeholder="请填写联系电话" /> <input type="number" v-model="data.contact_phone" maxlength="11" class="input" placeholder="请填写联系电话" />
</view> </view>
<view class="li"> <view class="li">
<view class=""> <view class="">
<text class="cor">*</text>预约时间 <text class="cor">*</text>预约时间
</view> </view>
<input type="text" v-model="data.appointment_time" class="input" @tap="openDatetimePicker" <input type="text" disabled v-model="appointment_time" class="input" @tap="openDatetimePicker"
placeholder="请选择预约时间" /> placeholder="请选择预约时间" />
</view> </view>
@ -97,6 +97,7 @@
</template> </template>
<script> <script>
import permision from "@/js_sdk/wa-permission/permission.js"
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue'; import statusNav from '../../components/status-nav.vue';
import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue'; import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue';
@ -124,6 +125,7 @@
addres: "", addres: "",
pictures:'' pictures:''
}, },
appointment_time:'',
pictures: [], pictures: [],
imgsrcArr: [], imgsrcArr: [],
typeIndex: 0, typeIndex: 0,
@ -163,14 +165,13 @@
// //
handleSubmit(e) { handleSubmit(e) {
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"} // {year: "2019", month: "07", day: "17", hour: "15", minute: "21"}
this.data.appointment_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`; this.appointment_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
this.data.appointment_time = this.$toolAll.tools.timeToTimestamp(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)/1000;
}, },
// //
chooseImg() { chooseImg() {
uni.chooseImage({ uni.chooseImage({
count: 2, count: 1,
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
let imgsrc = res.tempFilePaths; let imgsrc = res.tempFilePaths;
@ -187,13 +188,14 @@
} }
}) })
} }
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },
// //
submitData() { submitData() {
this.data.pictures = this.pictures.join(','); this.data.pictures = this.pictures.join(',');
console.log(this.data.pictures);
if (!this.data.title) { if (!this.data.title) {
this.$toolAll.tools.showToast("请填写产品名称"); this.$toolAll.tools.showToast("请填写产品名称");
return return
@ -202,8 +204,7 @@
this.$toolAll.tools.showToast("请填写联系人名称"); this.$toolAll.tools.showToast("请填写联系人名称");
return return
} }
var reg_tel = var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11
if (!reg_tel.test(this.data.contact_phone)) { if (!reg_tel.test(this.data.contact_phone)) {
this.$toolAll.tools.showToast("请正确填写联系人电话"); this.$toolAll.tools.showToast("请正确填写联系人电话");
@ -221,7 +222,6 @@
this.$toolAll.tools.showToast("请选择现场图片"); this.$toolAll.tools.showToast("请选择现场图片");
return return
} }
this.data.appointment_time = new Date(this.data.appointment_time).getTime()/1000;
this.data.pictures = this.pictures.join(','); this.data.pictures = this.pictures.join(',');
this.$requst.post('/universal/api.vas/vas', this.data).then(res => { this.$requst.post('/universal/api.vas/vas', this.data).then(res => {
if (res.code) { if (res.code) {
@ -230,7 +230,7 @@
uni.navigateBack({delta:1}) uni.navigateBack({delta:1})
},1000) },1000)
} else { } else {
this.$toolAll.tools.showToast(res.msg);
} }
}) })
} }

View File

@ -130,6 +130,8 @@
this.$toolAll.tools.showToast('上传成功'); this.$toolAll.tools.showToast('上传成功');
} }
}) })
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}); });

View File

@ -65,10 +65,8 @@
</view> </view>
</view> </view>
<view class="record-nav"> <view class="record-nav">
<view class="li" @click="recordNav(index)" :class="item.state?'on':''" <view class="li" @click="recordNav(index)" :class="item.state ? 'on' : 'mo'"
v-for="(item,index) in recordState"> v-for="(item,index) in recordState" :key="index">{{item.title}}</view>
{{item.title}}
</view>
</view> </view>
<view class="record-content"> <view class="record-content">
<view class="title">维保追踪</view> <view class="title">维保追踪</view>
@ -264,8 +262,8 @@
} }
.last-date { .last-date {
width: 100%; /* width: 100%; */
padding: 10rpx 13rpx 10rpx; padding: 10rpx 13rpx;
/* border-bottom: 6rpx solid #E7E7E7; */ /* border-bottom: 6rpx solid #E7E7E7; */
} }
@ -274,6 +272,7 @@
height: 57rpx; height: 57rpx;
display: flex; display: flex;
padding-left: 20rpx; padding-left: 20rpx;
box-sizing: border-box;
align-items: center; align-items: center;
border-radius: 10rpx; border-radius: 10rpx;
@ -363,27 +362,35 @@
} }
.record-nav .li { .record-nav .li {
font-size: 24rpx; position: relative;
width: 128rpx; width: 128rpx;
font-size: 24rpx;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
position: relative;
} }
.record-nav .on { .record-nav .on {
color: #00b1ff; color: #00B1FF;
} }
.record-nav .mo {
.record-nav .on::after { color: #000000;
}
.record-nav .on::after,.record-nav .mo::after {
content: ""; content: "";
display: block;
width: 100%; width: 100%;
height: 4rpx; height: 4rpx;
position: absolute; position: absolute;
background-color: #00B1FF; /* #ifdef APP-PLUS || MP-WEIXIN */
top: 68rpx;
/* #endif */
/* #ifdef H5 */
top: 65rpx; top: 65rpx;
/* #endif */
left: 0rpx; left: 0rpx;
} }
.record-nav .on::after{
background-color: #00B1FF;
}
.record-content { .record-content {
padding: 0 52rpx; padding: 0 52rpx;

View File

@ -4,9 +4,9 @@
<container-subgroup> <container-subgroup>
<view slot="content" style="margin: 0 -30rpx;"> <view slot="content" style="margin: 0 -30rpx;">
<view class="repairs-nav" style="margin-top: -30rpx;"> <view class="repairs-nav" style="margin-top: -30rpx;">
<view :key="index" class="li" @click="repairsNavFun(index)" :class="item.state?'on':''" <view class="li" @click="repairsNavFun(index)" :class="current==index ?'on':''"
v-for="(item,index) in navDataState"> v-for="(item,index) in navDataState" :key="index">
{{item.title}} {{item}}
</view> </view>
</view> </view>
<view class="repairs-hint padding"> <view class="repairs-hint padding">
@ -23,14 +23,13 @@
</view> </view>
</view> </view>
<view class="padding"> <view class="padding">
<view class="devicename" v-if="navDataState[0].state"> <view class="devicename" v-if="current==0">
<input type="text" class="fon28 width100" v-model="data.device_name" placeholder="请填写设备名称和型号或扫描二维码" /> <input type="text" class="fon28 width100 col3" v-model="data.project_number" placeholder="请填写设备编号或扫描二维码" />
<image @click="scanCodeFun()" class="sm flexs" src="../../static/iocn/sm.png" lazy-load mode=""></image> <image @click="scanCodeFun" class="sm flexs" src="../../static/iocn/sm.png" lazy-load mode=""></image>
</view> </view>
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号(例:华为LED" v-else /> <input v-else v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号(例:华为LED" />
<view class="fault-pictures radius10" @click="chooseImg"> <view class="fault-pictures radius10" @click="chooseImg">
<image class="fault-pictures-img" v-if="imgsrcArr.length>=1" :src="imgsrcArr[0]" <image class="fault-pictures-img" v-if="imgsrcArr.length>=1" :src="imgsrcArr[0]" mode="aspectFill"></image>
mode="aspectFill"></image>
<view class="fault-pictures-con" v-else> <view class="fault-pictures-con" v-else>
<image class="img" src="../../static/iocn/gz.png" lazy-load mode="aspectFill"></image> <image class="img" src="../../static/iocn/gz.png" lazy-load mode="aspectFill"></image>
<view class="text">添加维保图片</view> <view class="text">添加维保图片</view>
@ -39,19 +38,13 @@
<textarea v-model="data.fault_describe" class="fault-description radius10" placeholder="维保情况描述" <textarea v-model="data.fault_describe" class="fault-description radius10" placeholder="维保情况描述"
placeholder-class="fault-description-text" /> placeholder-class="fault-description-text" />
<view class="detailed-address inputCss"> <view class="detailed-address inputCss">
<input type="text" v-model="data.service_address" class="fon26 width100" <input type="text" v-model="data.service_address" class="fon26 width100 mar-y20" placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" />
placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" /> <image @click="mapFun" src="../../static/iocn/map.png" class="map flexs" mode="aspectFill"></image>
<image @click="mapFun()" src="../../static/iocn/map.png" class="map flexs" mode="aspectFill">
</image>
</view> </view>
<input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名" <input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名" placeholder-class="inputCss-input" />
placeholder-class="inputCss-input" /> <input type="number" maxlength="11" class="inputCss" v-model="data.phone" placeholder="请填写联系电话" placeholder-class="inputCss-input" />
<input type="text" class="inputCss" v-model="data.phone" placeholder="请填写联系电话" <input type="text" class="inputCss" @tap="openDatetimePicker" disabled v-model="data.visit_time" placeholder="请选择上门时间" placeholder-class="inputCss-input" />
placeholder-class="inputCss-input" /> <yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122"></yy-mm-dd-hh-ss>
<input type="text" class="inputCss" @tap="openDatetimePicker" disabled v-model="data.visit_time"
placeholder="请选择上门时间" placeholder-class="inputCss-input" />
<yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122">
</yy-mm-dd-hh-ss>
<button class="submit-button" @click="submitButton()" type="default">提交维保申报</button> <button class="submit-button" @click="submitButton()" type="default">提交维保申报</button>
</view> </view>
</view> </view>
@ -65,6 +58,8 @@
import { import {
uploadImg uploadImg
} from '@/jsFile/public-api.js'; } from '@/jsFile/public-api.js';
// qrcode.js qrcode.js
var qrcode = require('@/jsFile/qrcode.js');
export default { export default {
components: { components: {
yyMmDdHhSs yyMmDdHhSs
@ -86,17 +81,8 @@
}, },
imgsrcArr: [], imgsrcArr: [],
indexType: 0, indexType: 0,
navDataState: [{ navDataState: ["有设备","无设备"],
title: "有设备", current:0,
state: false,
is_device: 1
},
{
title: "无设备",
state: true,
is_device: 0
}
],
faultTypeData: [] faultTypeData: []
} }
}, },
@ -105,6 +91,39 @@
}, },
methods: { methods: {
submitButton() {
this.data.fault_type = this.faultTypeData[this.indexType].id
if(this.current) {
if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号");
return
}
} else {
if (!this.data.project_number) {
this.$toolAll.tools.showToast("请填写设备编号");
return
}
}
if (!this.data.username) {
this.$toolAll.tools.showToast("请填写您的姓名");
return
}
if (this.$toolAll.tools.isPhone(this.data.phone)) {
this.$toolAll.tools.showToast("请正确填写您的电话");
return
}
this.data.is_device = this.current ? 0 : 1;//0: 1
this.$requst.post('/universal/api.order/repair', this.data).then(res => {
if (res.code) {
this.$toolAll.tools.showToast('提交成功');
setTimeout(()=>{
uni.navigateBack({delta:1})
},1000)
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
// //
getType() { getType() {
getFaultType().then(res=>{ getFaultType().then(res=>{
@ -119,15 +138,7 @@
this.$refs.myPicker.show(); this.$refs.myPicker.show();
}, },
handleSubmit(e) { handleSubmit(e) {
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"} this.data.visit_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:00`;
console.log(e)
this.data.visit_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
},
change(e) {
this.single = e;
console.log("-change事件:", e);
}, },
// //
chooseImg() { chooseImg() {
@ -140,73 +151,123 @@
imgsrc.forEach(item => { imgsrc.forEach(item => {
this.imgsrcArr.push(item); this.imgsrcArr.push(item);
}) })
uploadImg({path: res.tempFilePaths[0]}).then(res => {
uploadImg({
path: res.tempFilePaths[0]
}).then(res => {
if (res.code) { if (res.code) {
console.log(res.data.id)
this.$toolAll.tools.showToast('上传成功'); this.$toolAll.tools.showToast('上传成功');
this.data.fault_picture = res.data.id this.data.fault_picture = res.data.id
} }
}) })
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },
//
dateFun(data) {
},
timeFun() {},
scanCodeFun() { scanCodeFun() {
// #ifdef APP-PLUS || MP-WEIXIN
uni.scanCode({ uni.scanCode({
onlyFromCamera:false, //
scanType: ['qrCode'], // barCode qrCode datamatrixData Matrix pdf417PDF417
autoDecodeCharset:true, //
success: function (res) { success: function (res) {
console.log('条码类型:' + res.scanType); console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result); console.log('条码内容:' + res.result);
} }
}); });
// #endif
// #ifdef H5
this.scanCode();
// #endif
}, },
submitButton() { scanCode() {
this.data.fault_type = this.faultTypeData[this.indexType].id let that = this
// if (this.data.is_device == 0) { // uniapi
// if (!this.data.device_name) { uni.chooseImage({
// this.$toolAll.tools.showToast(""); sizeType: ['original'],
// return count: 1,
// } success: (res)=> {
// } else { qrcode.decode(this.getObjectURL(res.tempFiles[0]))
// if (!this.data.project_number) { qrcode.callback = (codeRes) => {
// this.$toolAll.tools.showToast(""); if (codeRes.indexOf('error') >= 0) {
// return //
// } console.log('不合法二维码:' + codeRes);
// }
if (!this.data.device_name) {
this.$toolAll.tools.showToast("请填写设备名称或型号");
return
}
if (!this.data.username) {
this.$toolAll.tools.showToast("请填写您的姓名");
return
}
if (this.$toolAll.tools.isPhone(this.data.phone)) {
this.$toolAll.tools.showToast("请正确填写您的电话");
return
}
this.$requst.post('/universal/api.order/repair', this.data).then(res => {
if (res.code) {
this.$toolAll.tools.showToast('提交成功');
setTimeout(()=>{
uni.navigateBack({delta:1})
},1000)
} else { } else {
this.$toolAll.tools.showToast(res.msg); //
let r = this.decodeStr(codeRes)
// this.qrCodeRes = r
console.log(r);
} }
}) }
// const tempFilePaths = res.tempFilePaths[0] //
// qrcode.decode(tempFilePaths); //
// qrcode.callback = function(res1) {
// // error decoding QR Code
// if (res1 == "error decoding QR Code") {
// uni.showToast({
// title: "",
// duration: 2000,
// icon: 'none'
// })
// } else {
// //
// console.log(res1)
// }
// }
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
}
});
},
//
getObjectURL(file) {
var url = null
if (window.createObjectURL !== undefined) { // basic
url = window.createObjectURL(file)
} else if (window.URL !== undefined) { // mozilla(firefox)
url = window.URL.createObjectURL(file)
} else if (window.webkitURL !== undefined) { // webkit or chrome
url = window.webkitURL.createObjectURL(file)
}
return url
},
//
decodeStr(str) {
var out, i, len, c;
var char2, char3;
out = "";
len = str.length;
i = 0;
while (i < len) {
c = str.charCodeAt(i++);
switch (c >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
// 0xxxxxxx
out += str.charAt(i - 1);
break;
case 12:
case 13:
// 110x xxxx 10xx xxxx
char2 = str.charCodeAt(i++);
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2 = str.charCodeAt(i++);
char3 = str.charCodeAt(i++);
out += String.fromCharCode(((c & 0x0F) << 12) |
((char2 & 0x3F) << 6) |
((char3 & 0x3F) << 0));
break;
}
}
return out;
}, },
mapFun() { mapFun() {
const that = this const that = this
uni.getLocation({ uni.getLocation({
@ -230,17 +291,11 @@
}); });
}, },
repairsNavFun(index) { repairsNavFun(index) {
for (var i = 0; i < this.navDataState.length; i++) { this.current = index;
this.navDataState[i].state = false
}
this.navDataState[index].state = true
console.log(this.navDataState[index].is_device)
this.data.is_device = this.navDataState[index].is_device
}, },
repairsTypeFun(index) { repairsTypeFun(index) {
this.indexType = index this.indexType = index
}, }
} }
} }
</script> </script>
@ -303,7 +358,7 @@
.fault-type-title { .fault-type-title {
margin-top: 14rpx; margin-top: 14rpx;
width: 100%; /* width: 100%; */
line-height: 80rpx; line-height: 80rpx;
margin-bottom: 13rpx; margin-bottom: 13rpx;
border-top: 2rpx solid #e7e7e7; border-top: 2rpx solid #e7e7e7;

View File

@ -367,6 +367,8 @@
this.targetObj.faultImgList.push(imgsrc); this.targetObj.faultImgList.push(imgsrc);
} }
}) })
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },

View File

@ -231,6 +231,8 @@
} }
}) })
}) })
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },

View File

@ -6,15 +6,15 @@
<view class="mar-s20 mar-zy10" style="box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.3);"> <view class="mar-s20 mar-zy10" style="box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.3);">
<view class="bacf" style="padding: 4rpx;border-radius: 30rpx;"> <view class="bacf" style="padding: 4rpx;border-radius: 30rpx;">
<view class="electronic-head disjcac fc"> <view class="electronic-head disjcac fc">
<image :src="userImg" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image> <image src="/static/public/icon-electronic-logo.png" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">ID{{userId}}</view> <view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">ID{{userId}}</view>
<image class="mar-s10" src="/static/deleteImg/flying-img06.png" mode="aspectFill" style="width: 258rpx;height: 258rpx;border-radius: 100%;margin-bottom: -130rpx;border: 6rpx solid #edf1ff;background-color: #edf1ff;"></image> <image class="mar-s10 electronic-userImg" :src="userImg || '/static/deleteImg/flying-img06.png'" mode="aspectFill"></image>
</view> </view>
<view class="pad-s140 mar-s30 disjcac fc"> <view class="pad-s140 mar-s30 disjcac fc">
<view class="col3 fon68">{{userName}}</view> <view class="col3 fon68">{{userName}}</view>
<view class="fon32 col6 mar-sx30">{{userContent}}</view> <view class="fon32 col6 mar-sx30">{{userContent}}</view>
<view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;"> <view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;">
<view>+86 {{userPhone}}</view> <view v-if="userPhone">+86 {{userPhone}}</view>
<view>{{userEmail}}</view> <view>{{userEmail}}</view>
<view>{{website}}</view> <view>{{website}}</view>
</view> </view>
@ -30,13 +30,13 @@
export default { export default {
data() { data() {
return { return {
userImg:'/static/public/icon-electronic-logo.png', userImg:'',//
userId:'CW-0000', userId:'',//id
userName:'姓名', userName:'',//
userContent:'市场部门 | 技术支持', userContent:'',//
userPhone:'123 4567 8910', userPhone:'',//
userEmail:'12345678910qwer@890.com', userEmail:'',//
website:'WWW.12345678910.com' website:''//
} }
}, },
onLoad() { onLoad() {
@ -50,12 +50,12 @@
if(userData.avatar) { if(userData.avatar) {
this.userImg = userData.avatar; this.userImg = userData.avatar;
} }
this.userId = userData.id; this.userId = userData.id;//id
this.userName = userData.name; this.userName = userData.name;//
this.userContent = userData.affiliation; this.userContent = userData.affiliation;//
this.userPhone = userData.phone; this.userPhone = userData.phone;//
this.userEmail = userData.email; this.userEmail = userData.email;//
this.website = userData.website; this.website = userData.website;//
} }
}) })
@ -65,5 +65,5 @@
</script> </script>
<style> <style>
.electronic-userImg{width: 258rpx;height: 258rpx;border-radius: 100%;margin-bottom: -130rpx;border: 6rpx solid #edf1ff;background-color: #edf1ff;}
</style> </style>

View File

@ -11,7 +11,7 @@
<view class="mar-s10 mar-x30" style="color: #6b6a6a;">服务时间{{project_time}}</view> <view class="mar-s10 mar-x30" style="color: #6b6a6a;">服务时间{{project_time}}</view>
<view class="radius20 pad30 dis" style="border: 2rpx solid #dcdcdc;"> <view class="radius20 pad30 dis" style="border: 2rpx solid #dcdcdc;">
<image src="/static/public/icon-evaluate-pen.png" mode="widthFix" lazy-load style="width: 25rpx;height: 30rpx;"></image> <image src="/static/public/icon-evaluate-pen.png" mode="widthFix" lazy-load style="width: 25rpx;height: 30rpx;"></image>
<textarea v-model="serviceExperience" class="fon24 mar-z20 width100" style="height: 200rpx;" placeholder="写下您的服务体验,帮助我们更好的管理提升" placeholder-style="font-size:24rpx;color: #aaaaaa;" /> <textarea v-model="serviceExperience" maxlength="-1" class="fon24 mar-z20 width100" style="height: 200rpx;" placeholder="写下您的服务体验,帮助我们更好的管理提升" placeholder-style="font-size:24rpx;color: #aaaaaa;" />
</view> </view>
<view class="fon30 bold mar-sx30">上传图片</view> <view class="fon30 bold mar-sx30">上传图片</view>
<view class="disac"> <view class="disac">
@ -36,6 +36,7 @@
</template> </template>
<script> <script>
import { uploadImg } from '@/jsFile/public-api.js';
import rate from '@/components/rate.vue'; import rate from '@/components/rate.vue';
export default { export default {
components:{ components:{
@ -48,36 +49,54 @@
{imgsrc:''}, {imgsrc:''},
{imgsrc:''} {imgsrc:''}
], ],
project_id:'', tempImgId:[],
project_name:'长沙XXXXXXXXX项目名称', project_name:'长沙XXXXXXXXX项目名称',
project_number:'GD20220108-1002', project_number:'GD20220108-1002',
project_time:'2022-01-11 15 : 27', project_time:'2022-01-11 15 : 27',
rateNum:5,// rateNum:5,//
attitudeNum:5,// attitudeNum:5,//
serviceExperience:'',// serviceExperience:'',//
flag:true flag:true,
orderId:''//id
} }
}, },
onLoad(op) {
this.orderId = op.orderId;
//
this.getOrderInfo();
},
methods: { methods: {
//
getOrderInfo(){
this.$requst.get('/universal/api.order/evaluate_order',{order_id:this.orderId}).then(res=>{
if(res.code) {
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
// //
submitData(){ submitData(){
if(this.flag) { if(this.flag) {
this.flag = false; // this.flag = false;
let idArr = [];
idArr = this.tempImgId.filter(item => {return item!=''; });
let params = { let params = {
id:this.project_id, order_id:this.orderId,
a:this.serviceExperience, evaluate_content:this.serviceExperience,
b:this.imgList[0].imgsrc, evaluate_images:idArr.join(','),
c:this.imgList[1].imgsrc, technology_score:this.rateNum,
d:this.imgList[2].imgsrc, customer_service_attitude_score:this.attitudeNum
f:this.rateNum,
g:this.attitudeNum
} }
console.log(params,74); console.log(params,74);
// this.$requst.post('',params).then(res=>{ this.$requst.post('/universal/api.order/evaluate_order',params).then(res=>{
// if(res.code) { if(res.code) {
// uni.navigateBack({delta:1}) uni.navigateBack({delta:1})
// } } else {
// }) this.$toolAll.tools.showToast(res.msg);
}
})
} }
}, },
// //
@ -87,15 +106,12 @@
sourceType:['album','camera'], sourceType:['album','camera'],
sizeType:['compressed'], sizeType:['compressed'],
success: (res) => { success: (res) => {
let params = { uploadImg({path:res.tempFilePaths[0]}).then(resImg=>{
dir:'images',
from:res.tempFilePaths[0]
}
console.log(params,95);
this.$requst.post('/universal/api.upload/upload',params).then(res=>{
})
this.imgList[index].imgsrc = res.tempFilePaths[0]; this.imgList[index].imgsrc = res.tempFilePaths[0];
this.tempImgId[index] = resImg.data.id;
})
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },

View File

@ -3,13 +3,10 @@
<status-nav navBarTitle="我的账户" returnColor="#c2c2c2"></status-nav> <status-nav navBarTitle="我的账户" returnColor="#c2c2c2"></status-nav>
<container-subgroup> <container-subgroup>
<view slot="content" style="margin: -30rpx;"> <view slot="content" style="margin: -30rpx;">
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS || MP-WEIXIN -->
<view class="disja tcenter bbot fon32 position-sticky pad-s30" :style="{top: newTop +'px'}" style="background-color: #F5F5F5;"> <view class="disja tcenter bbot fon32 position-sticky pad-s30" :style="{top: newTop +'px'}" style="background-color: #F5F5F5;">
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<view class="disja tcenter bbot fon32 position-sticky pad-s30" style="background-color: #F5F5F5;">
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="disja tcenter bbot fon32 position-sticky pad-s30" :style="{top: newTop +'px'}" style="background-color: #F5F5F5;"> <view class="disja tcenter bbot fon32 position-sticky pad-s30" :style="{top: newTop +'px'}" style="background-color: #F5F5F5;">
<!-- #endif --> <!-- #endif -->
<view @tap="switchStatus(true)" class="width50 pad-x30" :class="current ? 'account-active' : ''">我的账户</view> <view @tap="switchStatus(true)" class="width50 pad-x30" :class="current ? 'account-active' : ''">我的账户</view>
@ -55,11 +52,15 @@
<view>{{item.way}}</view> <view>{{item.way}}</view>
<view class="clips1">{{item.date}}</view> <view class="clips1">{{item.date}}</view>
</view> </view>
<view class="mar-s180">
<pitera v-if="incomeExpensesList.length==0" textStr="暂无更多收支明细"></pitera>
</view>
</view> </view>
</view> </view>
<!-- 未结算工单 --> <!-- 未结算工单 -->
<view v-else class="mar-s30 pad-zy10"> <view v-else>
<view class="bacf pad-sx20 pad-zy30 radius10 mar-x10" v-for="(item,index) in unsettledList" :key="index"> <view class="pad-sx30 pad-zy10">
<view class="bacf pad-sx20 pad-zy30 radius10 mar-x10 animated fadeIn" v-for="(item,index) in unsettledList" :key="index">
<view class="fon28 disjbac"> <view class="fon28 disjbac">
<view class="col3">{{item.title}}</view> <view class="col3">{{item.title}}</view>
<view class="col9">{{item.name}}</view> <view class="col9">{{item.name}}</view>
@ -87,6 +88,9 @@
<view class="unsettled-btn" @tap="goSettlementEv(item.id)"></view> <view class="unsettled-btn" @tap="goSettlementEv(item.id)"></view>
</view> </view>
</view> </view>
<nothing-page v-if="!total && !ifLoading" content="暂无更多未结算工单数据"></nothing-page>
<pitera v-if="total==unsettledList.length && unsettledList.length" textStr="暂无更多未结算工单数据"></pitera>
</view>
</view> </view>
</view> </view>
</container-subgroup> </container-subgroup>
@ -94,7 +98,11 @@
</template> </template>
<script> <script>
import pitera from '@/components/nothing/pitera.vue';
export default { export default {
components:{
pitera
},
data() { data() {
return { return {
newTop: uni.getSystemInfoSync().statusBarHeight + 40, newTop: uni.getSystemInfoSync().statusBarHeight + 40,
@ -107,34 +115,108 @@
}, },
// //
incomeExpensesList:[ incomeExpensesList:[
{prices:'1088',workOrderNum:'GD20220112-1001',way:'现金',date:'2019-7-24'}, // {prices:'1088',workOrderNum:'GD20220112-1001',way:'',date:'2019-7-24'},
], ],
unsettledList:[ unsettledList:[
{id:1,title:'株洲市XXX项目名称',name:'林小雨',number:'GD20220112-1001',date:'2022-01-12 13:25:16',type:'模组维保',status:'维保已完成',address:'湖南省长沙市xx区1001栋6-12',priceo:'260.0'}, // {id:1,title:'XXX',name:'',number:'GD20220112-1001',date:'2022-01-12 13:25:16',type:'',status:'',address:'xx10016-12',priceo:'260.0'},
{id:2,title:'株洲市XXX项目名称',name:'林小雨',number:'GD20220112-1001',date:'2022-01-12 13:25:16',type:'模组维保',status:'维保已完成',address:'湖南省长沙市xx区1001栋6-12',priceo:'260.0'},
{id:3,title:'株洲市XXX项目名称',name:'林小雨',number:'GD20220112-1001',date:'2022-01-12 13:25:16',type:'模组维保',status:'维保已完成',address:'湖南省长沙市xx区1001栋6-12',priceo:'260.0'},
{id:4,title:'株洲市XXX项目名称',name:'林小雨',number:'GD20220112-1001',date:'2022-01-12 13:25:16',type:'模组维保',status:'维保已完成',address:'湖南省长沙市xx区1001栋6-12',priceo:'260.0'},
], ],
ifDetail:false ifDetail:false,
size:10,
page:1,
total:0,
ifLoading:true
}
},
onReachBottom() {
if(!this.current) {
if(this.total!=this.unsettledList.length) {
this.page++;
//
this.workWordEv();
}
} }
}, },
onLoad(op) { onLoad(op) {
op.index*1 ? this.current = false : this.current = true; op.index*1 ? this.current = false : this.current = true;
if(this.current) {
//
this.getMyAccountInfo();
} else {
//
this.workWordEv();
}
}, },
methods: { methods: {
//
workWordEv(){
uni.showLoading({
title:'加载中...',
mask:true
})
this.$requst.get('/universal/api.account/not_order',{list_rows:this.size,page:this.page}).then(res=>{
if(res.code) {
this.total = res.data.total;
if(this.page==1) this.unsettledList = [];
if(res.data.data.length) {
res.data.data.forEach(item=>{
let obj = {
id:item.project_id,//id
title:item.project_name,//
name:item.username,//
number:item.order_number,//
date:item.completion_time,//
type:item.fault_type,//
status:'维保已完成',
address:item.address,//
priceo:item.pay_price//
}
this.unsettledList.push(obj);
})
}
}
uni.hideLoading();
this.ifLoading = false;
})
},
// //
goSettlementEv(id) { goSettlementEv(id) {
uni.navigateTo({ uni.navigateTo({
url:`/pagesA/workOrder/workOrderThree?id=${id}` url:`/pagesA/workOrder/workOrderThree?id=${id}`
}) })
}, },
//
getMyAccountInfo(){
this.$requst.get('/universal/api.account/my_account').then(res=>{
if(res.code) {
this.capitalDetail.totalPrice = this.$toolAll.tools.addXiaoShu(res.data.total_amount) //
this.capitalDetail.workOrderCost = this.$toolAll.tools.addXiaoShu(res.data.order_price) //
this.capitalDetail.technicalCommission = this.$toolAll.tools.addXiaoShu(res.data.money) //
// if(res.data.amount_record.length) {
// res.data.amount_record.forEach(item=>{
// let obj = {
// prices:'1088',//
// workOrderNum:'GD20220112-1001',//
// way:'',//
// date:'2019-7-24',//
// }
// this.incomeExpensesList.push(obj);
// })
// }
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
// //
switchStatus(status){ switchStatus(status){
this.current = status; this.current = status;
this.page = 1;
this.size = 10;
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: 0, scrollTop: 0,
duration:0 duration:0
}) })
status ? this.getMyAccountInfo() : this.workWordEv();
}, },
// //
checkDetailedEv(){ checkDetailedEv(){

View File

@ -3,45 +3,86 @@
<status-nav navBarTitle="新产品" returnColor="#c2c2c2"></status-nav> <status-nav navBarTitle="新产品" returnColor="#c2c2c2"></status-nav>
<container-subgroup> <container-subgroup>
<view slot="content" style="margin: 0 -16rpx;" class="fon28"> <view slot="content" style="margin: 0 -16rpx;" class="fon28">
<view @tap="goDetail(index)" class="bacf radius10 pad-sx20 pad-zy10 disjbac mar-x20" style="box-shadow: 0rpx 3rpx 20rpx rgba(0,0,0,.3);" v-for="(item,index) in 20" :key="index"> <view @tap="goDetail(index)" class="bacf radius10 pad-sx20 pad-zy10 disjbac mar-x20 animated fadeIn" style="box-shadow: 0rpx 3rpx 20rpx rgba(0,0,0,.3);" v-for="(item,index) in dataList" :key="index">
<image src="/static/del/img001.png" mode="aspectFill" lazy-load class="flexs" style="width: 240rpx;height: 184rpx;"></image> <image :src="item.imgsrc" mode="aspectFill" lazy-load class="flexs" style="width: 240rpx;height: 184rpx;"></image>
<view style="height: 184rpx;" class="width100 disjb fc pad-zy20 fon24"> <view style="height: 184rpx;" class="width100 disjb fc pad-zy20 fon24">
<view class=" clips2">智能会议平板交互电子白板会议一体机视 频会议多媒体教学培训</view> <view class=" clips2">{{item.title}}</view>
<view style="display: flex;align-items: center;font-size: 26rpx;"> <view class="fon26 disac">
<view style="color: #00a2e9;border: 1rpx solid #00a2e9;border-radius: 6rpx;padding: 2rpx 10rpx;display: inline-flex;justify-content: center;align-items: center;font-size: 26rpx;">联系在线客服</view> <view class="contact-box" @tap.stop="contactEv">联系在线客服</view>
</view> </view>
<view class="disjbac"> <view class="disjbac">
<view class="col9">起订量1起批</view> <view class="col9">起订量{{item.num}}起批</view>
<view style="color: #0ac9ea;">1135想采购</view> <view style="color: #0ac9ea;">{{item.peopleNum}}想采购</view>
</view> </view>
</view> </view>
</view> </view>
<pitera v-if="total==dataList.length && dataList.length" textStr="暂无更多新产品列表数据"></pitera>
<nothing-page v-if="!dataList.length && !ifLoading" content="暂无更多新产品列表数据"></nothing-page>
</view> </view>
</container-subgroup> </container-subgroup>
</view> </view>
</template> </template>
<script> <script>
import pitera from '@/components/nothing/pitera.vue';
export default { export default {
components:{
pitera
},
data() { data() {
return { return {
dataList:[
{id:1,imgsrc:'/static/del/img001.png',title:'智能会议平板交互电子白板会议一体机视 频会议多媒体教学培训',num:'1台',peopleNum:'1135'},
],
page:1,
size:20,
total:0,
ifLoading:true
}
},
onReachBottom() {
if(this.total!=this.dataList.length) {
this.page++;
//
this.getProductEv();
} }
}, },
onLoad() { onLoad() {
//
this.getProductEv();
}, },
methods: { methods: {
//
getProductEv(){
uni.showLoading({
title:'加载中...',
mask:true
})
// this.$request.get('',{list_rows:this.size,page:this.page}).then(res=>{
// if(res.code) {
// this.total = res.data.total;
// if(this.page==1) this.dataList = [];
// } else {
// this.$toolAll.tools.showToast(res.msg);
// }
uni.hideLoading();
this.ifLoading = false;
// })
},
// //
goDetail(index){ goDetail(index){
uni.navigateTo({ uni.navigateTo({
url:'/pagesB/plan-fault-product-detail/detail?index=2' url:'/pagesB/plan-fault-product-detail/detail?index=2'
}) })
},
//
contactEv(){
this.$toolAll.tools.countCustomer('15616330510');
} }
} }
} }
</script> </script>
<style> <style>
.contact-box{color: #00a2e9;border: 1rpx solid #00a2e9;border-radius: 6rpx;padding: 2rpx 10rpx;display: inline-flex;justify-content: center;align-items: center;font-size: 26rpx;}
</style> </style>

View File

@ -32,7 +32,7 @@
<view class="bacf pad-sx30 pad-zy40 disac bbot"> <view class="bacf pad-sx30 pad-zy40 disac bbot">
<view class="bold width30 flexs">联系电话</view> <view class="bold width30 flexs">联系电话</view>
<view class="width100" style="color: #8b8b8b;"> <view class="width100" style="color: #8b8b8b;">
<input type="number" v-model="contact_number" placeholder="请输入联系电话" placeholder-style="font-size:28rpx;color:#8b8b8b;" /> <input type="number" v-model="contact_number" maxlength="11" placeholder="请输入联系电话" placeholder-style="font-size:28rpx;color:#8b8b8b;" />
</view> </view>
</view> </view>
<view class="bacf pad-sx30 pad-zy40 disac bbot"> <view class="bacf pad-sx30 pad-zy40 disac bbot">
@ -123,7 +123,7 @@
// //
this.full_name=res.data.name; this.full_name=res.data.name;
// res.data.sex ==> 2 1 0 // res.data.sex ==> 2 1 0
res.data.sex != 1 ? this.genderNum = 1 : this.genderNum = 2; res.data.sex != 2 ? this.genderNum = 1 : this.genderNum = 2;
// //
this.contact_number=res.data.phone; this.contact_number=res.data.phone;
// //
@ -140,6 +140,7 @@
this.imgList[3] = res.data.agreement_document; this.imgList[3] = res.data.agreement_document;
// //
this.imgList[4] = res.data.skills_certificate; this.imgList[4] = res.data.skills_certificate;
// this.temporaryImg = this.imgList[4];
} }
}) })
}, },
@ -204,9 +205,22 @@
} else { } else {
result = true; result = true;
} }
} else {
//
if(this.contact_number || this.e_mail || this.id_card_no) {
if(this.$toolAll.tools.isPhone(this.contact_number) && this.contact_number) {
this.$toolAll.tools.showToast('请正确输入联系电话');
} else if(this.$toolAll.tools.isEmail(this.e_mail) && this.e_mail) {
this.$toolAll.tools.showToast('请正确输入电子邮箱');
} else if(this.$toolAll.tools.isIdentity(this.id_card_no) && this.id_card_no) {
this.$toolAll.tools.showToast('请正确输入身份证号码');
} else { } else {
result = true; result = true;
} }
} else {
result = true;
}
}
return result; return result;
}, },
// //
@ -227,6 +241,8 @@
this.temporaryImg[index] = res.data.id; this.temporaryImg[index] = res.data.id;
} }
}) })
},fail:(err)=> {
this.$toolAll.tools.checkQx(err.code);
} }
}) })
}, },
@ -238,13 +254,17 @@
if(current==index) arr.push(item); if(current==index) arr.push(item);
}) })
if(arr.length) { if(arr.length) {
if(arr[0]) {
uni.previewImage({ uni.previewImage({
current:current, current:current,
urls: arr, urls: arr,
success() {} success() {}
}) })
} else { } else {
this.$toolAll.tools.showToast('无内容...') this.$toolAll.tools.showToast('请上传,再查看')
}
} else {
this.$toolAll.tools.showToast('请上传,再查看')
} }
} }
} }

View File

@ -13,7 +13,9 @@
</view> </view>
<view class="disjbac col9"> <view class="disjbac col9">
<view class="disac"> <view class="disac">
热度<rate :size="32" :gutter="10" :readonly="true" v-model="item.hot*1"></rate> 热度
<!-- <rate :size="32" :gutter="10" :readonly="true" v-model="item.hot*1"></rate> -->
<image src="/static/iocn/6.png" v-for="(item1,index1) in item.hot*1" :key="index1" class="mar-y10" style="width: 32rpx;height: 32rpx;" mode="widthFix"></image>
</view> </view>
<view>{{item.reading}}人已查阅</view> <view>{{item.reading}}人已查阅</view>
</view> </view>

View File

@ -23,31 +23,31 @@
<view class="col9">{{cacheSize}}</view> <view class="col9">{{cacheSize}}</view>
</view> </view>
<!-- #endif --> <!-- #endif -->
<view class="bacf pad30 disjbac mar-s20 bbot"> <view @tap="gopageEv(0)" class="bacf pad30 disjbac mar-s20 bbot">
<view>上门服务条款</view> <view>上门服务条款</view>
<view class="disac col9"> <view class="disac col9">
V3.0<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i> V3.0<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i>
</view> </view>
</view> </view>
<view class="bacf pad30 disjbac bbot"> <view @tap="gopageEv(1)" class="bacf pad30 disjbac bbot">
<view>用户服务协议</view> <view>用户服务协议</view>
<view class="disac col9"> <view class="disac col9">
V1.1<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i> V1.1<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i>
</view> </view>
</view> </view>
<view class="bacf pad30 disjbac bbot"> <view @tap="gopageEv(2)" class="bacf pad30 disjbac bbot">
<view>飞猴云服务隐私政策</view> <view>飞猴云服务隐私政策</view>
<view class="disac col9"> <view class="disac col9">
V1.2<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i> V1.2<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i>
</view> </view>
</view> </view>
<view class="bacf pad30 disjbac bbot"> <view @tap="gopageEv(3)" class="bacf pad30 disjbac bbot">
<view>技术服务合作协议</view> <view>技术服务合作协议</view>
<view class="disac col9"> <view class="disac col9">
V1.1<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i> V1.1<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i>
</view> </view>
</view> </view>
<view class="bacf pad30 disjbac bbot"> <view @tap="gopageEv(4)" class="bacf pad30 disjbac bbot">
<view>关于飞猴云服务</view> <view>关于飞猴云服务</view>
<view class="disac col9"> <view class="disac col9">
V1.1<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i> V1.1<i class="icon icon-next col9 mar-z10" style="font-size: 26rpx;"></i>
@ -143,6 +143,12 @@
// //
checkEdition(){ checkEdition(){
console.log('检测版本事件'); console.log('检测版本事件');
},
//
gopageEv(index) {
uni.navigateTo({
url:'/pages/login/agreement'
})
} }
} }
} }