diff --git a/jsFile/public-api.js b/jsFile/public-api.js index 19ffb20..5b79a2c 100644 --- a/jsFile/public-api.js +++ b/jsFile/public-api.js @@ -26,4 +26,19 @@ export function handleWorkOrderGet(data) { // 处理工单,提交 export function handleWorkOrderSubmit(data) { return request.post("/universal/api.order/process_order", data); +} + +// 获取产品类型 +export function getProductType() { + return request.get("/universal/api.project/project_type"); +} + +// 获取维保类型 +export function getFaultType() { + return request.get("/universal/api.order/fault_type"); +} + +// 获取服务方式 +export function getServiceMode() { + return request.get("/universal/api.order/fault_type"); } \ No newline at end of file diff --git a/jsFile/requst.js b/jsFile/requst.js index 3441928..d3abf9e 100644 --- a/jsFile/requst.js +++ b/jsFile/requst.js @@ -9,8 +9,8 @@ console.log(ENV,'当前环境'); // development:开发环境 test:测试环 const hostapi = 'https://7and5.cn'; // #endif // #ifdef H5 - // const hostapi = '/web'; - const hostapi = 'https://7and5.cn'; + const hostapi = '/web'; + // const hostapi = 'https://7and5.cn'; // #endif // 清理所有缓存并前往授权页 const goLogin = () => { diff --git a/jsFile/tools.js b/jsFile/tools.js index 0ef4d23..c967c3c 100644 --- a/jsFile/tools.js +++ b/jsFile/tools.js @@ -104,13 +104,15 @@ const tools = { }, // h5 getAddressH5(){ + uni.showLoading({ + title: '定位中...', + mask:true + }); uni.getLocation({ - type: 'wgs84', + type: 'gcj02', // wgs84 gcj02 + altitude: true, + // geocode: true, // wgs84 success: (res)=> { - uni.showLoading({ - title: '加载中', - mask:true - }); let str = `output=jsonp&key=QNHBZ-55RKF-OMFJJ-NPU7O-EPSDH-ACBAA&location=${res.latitude},${res.longitude}` jsonp('https://apis.map.qq.com/ws/geocoder/v1/?'+str,{}).then(res=>{ // console.log(res,'H5'); diff --git a/pages.json b/pages.json index 2f2910a..d8ab8d3 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,11 @@ { - "pages": [{ + "pages": [ { + "path": "pages/workOrder/punchCard", + "style": { + "navigationBarTitleText": "个人中心", + "navigationStyle": "custom" //禁用原生导航栏,微信小程序可用 + } + },{ "path": "pages/guide-page/guide-page", "style": { "navigationBarTitleText": "", diff --git a/pages/dataQuery/client.vue b/pages/dataQuery/client.vue index 8f923e5..d25d84b 100644 --- a/pages/dataQuery/client.vue +++ b/pages/dataQuery/client.vue @@ -79,11 +79,16 @@ address:"湖南省长沙市高新开发区谷园路109号像素大厦1205" }, ], + list_rows:20, + page:1, + total:0 } }, onLoad(op) { - // 调用查询客户列表事件 - this.queryFunEv(); + if(op.key_word!=undefined) { + // 调用查询客户列表事件 + this.queryFunEv(op.key_word); + } }, methods: { // 前往客户详情 @@ -93,8 +98,14 @@ }) }, // 查询客户列表事件 - queryFunEv(){ - queryFun({type_id:1}).then(res=>{ + queryFunEv(keyword){ + let params = { + type_id:1, + keyword, + list_rows:this.list_rows, + page:this.page + } + queryFun(params).then(res=>{ if(res.code) { } diff --git a/pages/dataQuery/dataQuery.vue b/pages/dataQuery/dataQuery.vue index 7f4f51e..9611ecf 100644 --- a/pages/dataQuery/dataQuery.vue +++ b/pages/dataQuery/dataQuery.vue @@ -128,17 +128,27 @@ }, data() { return { - + list_rows:20, + page:1, + total:0 } }, onLoad(op) { - // 调用查询客户列表事件 - this.queryFunEv(); + if(op.key_word!=undefined) { + // 调用查询(备品)列表事件 + this.queryFunEv(op.key_word); + } }, methods: { - // 查询客户列表事件 - queryFunEv(){ - queryFun({type_id:3}).then(res=>{ + // 查询(备品)列表事件 + queryFunEv(keyword){ + let params = { + type_id:3, + keyword, + list_rows:this.list_rows, + page:this.page + } + queryFun(params).then(res=>{ if(res.code) { } diff --git a/pages/dataQuery/projectQuery.vue b/pages/dataQuery/projectQuery.vue index 3391cd2..3e852ea 100644 --- a/pages/dataQuery/projectQuery.vue +++ b/pages/dataQuery/projectQuery.vue @@ -116,11 +116,16 @@ }, ], + list_rows:20, + page:1, + total:0 } }, onLoad(op) { - // 调用查询客户列表事件 - this.queryFunEv(); + if(op.key_word!=undefined) { + // 调用查询(项目)列表事件 + this.queryFunEv(op.key_word); + } }, methods: { projectDetailsFun(){ @@ -128,9 +133,15 @@ url:"/pages/dataQuery/projectDetails" }) }, - // 查询客户列表事件 + // 查询(项目)列表事件 queryFunEv(){ - queryFun({type_id:2}).then(res=>{ + let params = { + type_id:2, + keyword, + list_rows:this.list_rows, + page:this.page + } + queryFun(params).then(res=>{ if(res.code) { } diff --git a/pages/dataQuery/queryFunction.vue b/pages/dataQuery/queryFunction.vue index b541e53..0bcb990 100644 --- a/pages/dataQuery/queryFunction.vue +++ b/pages/dataQuery/queryFunction.vue @@ -190,7 +190,6 @@ '/pages/dataQuery/projectQuery', '/pages/dataQuery/dataQuery' ] - uni.navigateTo({ url: `${urls[index]}?key_word=${this.key_word}` }) diff --git a/pages/project/details.vue b/pages/project/details.vue index 6f620ab..d07cf4a 100644 --- a/pages/project/details.vue +++ b/pages/project/details.vue @@ -13,7 +13,7 @@ - {{index}}/{{projectObj.completed_img.length}} + {{index}}/{{imgNum}} {{projectObj.project_name}} {{projectObj.project_number}} @@ -117,6 +117,7 @@ }, ], projectObj:'', + imgNum:0,//图片数量 typeId:1,//记录类型 1:维修记录 2:保养记录 3: 巡检记录 list_rows:200, page:1, @@ -160,7 +161,7 @@ }).then(res => { if (res.code) { this.projectObj = res.data; - console.log(this.projectObj); + this.imgNum = this.projectObj.completed_img.length; } else { } diff --git a/pages/project/projectList.vue b/pages/project/projectList.vue index 1fbe415..f5a2e3b 100644 --- a/pages/project/projectList.vue +++ b/pages/project/projectList.vue @@ -6,9 +6,9 @@ - + - + @@ -71,6 +71,7 @@ import footTabOne from "../../components/foot-tabs/foot-tab-one.vue" import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue'; import pitera from '@/components/nothing/pitera.vue'; + import {getProductType} from '@/jsFile/public-api.js'; export default { components: { footTabOne, @@ -84,7 +85,7 @@ }) return { statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40, - inputData: "", + inputData: "",//关键字 date: currentDate, initial_value:'产品类型', array: [], @@ -113,6 +114,10 @@ this.getProjectType(); }, methods: { + // 关键字输入框监听事件 + keywordInput(){ + this.dataList.page = 1; + }, // 查询项目列表 getData() { if(this.dataList.page==1) this.dataList.data = []; @@ -120,7 +125,8 @@ product_type:this.productType, completion_time:this.completion_time, list_rows: this.dataList.list_rows, - page: this.dataList.page + page: this.dataList.page, + keyword:this.inputData }).then(res => { if (res.code) { // 设置项目总数 @@ -136,7 +142,7 @@ }, // 查询产品类型 getProjectType(){ - this.$requst.get('/universal/api.project/project_type').then(res=>{ + getProductType().then(res=>{ if(res.code) { this.array = res.data; } diff --git a/pages/repairsPage/repairsPage.vue b/pages/repairsPage/repairsPage.vue index 5bcdba2..052fb71 100644 --- a/pages/repairsPage/repairsPage.vue +++ b/pages/repairsPage/repairsPage.vue @@ -61,6 +61,7 @@