From 2ae75d60bdefa88f70d775f728353215c9f36308 Mon Sep 17 00:00:00 2001
From: chen <2659004835@qq.com>
Date: Mon, 25 Jul 2022 18:26:45 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 2 +-
commons/flying-monkey.css | 2 +-
package-lock.json | 17 +++-
package.json | 7 +-
pages.json | 5 ++
pages/guide-page/guide-page.vue | 59 +++++++++----
pages/login/agreement.vue | 19 ++++-
pages/tabbar/my/my.vue | 24 +++++-
pages/tabbar/pagehome/pagehome.vue | 60 +++++++++----
pagesA/peopleManagement/peopleManagement.vue | 40 ++++++---
pagesA/workOrder/details.vue | 42 ++++-----
pagesA/workOrder/workOrder.vue | 22 ++---
pagesA/workOrder/workOrderAudit.vue | 37 ++++----
pagesA/workOrder/workOrderLlsit.vue | 89 +++++++++++++++++---
pagesA/workOrder/workOrderThree.vue | 11 ++-
pagesA/workOrder/workorderTwo.vue | 28 +++---
pagesB/my-account/my-account.vue | 48 +++++------
pagesB/set-up/set-up.vue | 86 +++++++++++--------
18 files changed, 399 insertions(+), 199 deletions(-)
diff --git a/App.vue b/App.vue
index 6f30caf..38cf6f6 100644
--- a/App.vue
+++ b/App.vue
@@ -1,4 +1,4 @@
-
diff --git a/pages/tabbar/pagehome/pagehome.vue b/pages/tabbar/pagehome/pagehome.vue
index 65a1ba4..c095df1 100644
--- a/pages/tabbar/pagehome/pagehome.vue
+++ b/pages/tabbar/pagehome/pagehome.vue
@@ -239,6 +239,10 @@
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import {getPlanType} from '@/jsFile/public-api.js';
+ // import io from '@hyoga/uni-socket.io';
+ // const socket = io('http://7and5.cn:2120', {
+ // transports: [ 'websocket']
+ // });
export default {
components:{
pitera,
@@ -294,7 +298,7 @@
workOrderList:[
{imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0,id:100},
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101},
- {imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
+ // {imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:0,id:0},
],
// 结算情况
@@ -357,21 +361,40 @@
this.project_count = homeObj.project_count;//项目数量
this.project_error_count = homeObj.project_error_count;//实时工单数量
- this.projectRepairList[0].num = homeObj.pending_order_count; //待接单数量
- this.projectRepairList[1].num = homeObj.pending_count; //待执行数量
- this.projectRepairList[2].num = homeObj.under_repair_count; //维修中数量
-
- this.workOrderList[0].num = homeObj.abnormal_order_count; //异常单数量
- this.workOrderList[1].num = homeObj.overdue_order_count; //逾期单数量
- this.workOrderList[2].num = homeObj.time_out_order_count; //超时单数量
- this.workOrderList[3].num = homeObj.work_order_count; //工单池数量
-
- this.settlementList[0].num = homeObj.pending_payment_count; //待收款数量
- this.settlementList[1].num = homeObj.paid_for_count; //已收款数量
-
- this.stayEventList[0].num = homeObj.approval_count; //待审批数量
- this.stayEventList[1].num = homeObj.pending_payment_count; //待收款数量
-
+ switch (this.role){
+ // 业务员 || 客户
+ case 1 || 2:
+ this.repairList[1].num = homeObj.upcoming_count;
+ break;
+ // 客服
+ case 3:
+ // 待办工单
+ this.stayWorkOrderList[1].num = homeObj.pending_designate_count;
+ this.stayWorkOrderList[2].num = homeObj.pending_repair_count;
+ this.stayWorkOrderList[3].num = homeObj.pending_return_visit_count;
+ // 待办事件
+ this.stayEventList[0].num = homeObj.approval_count;
+ this.stayEventList[1].num = homeObj.pending_payment_count;
+ // 工单数据
+ this.workOrderList[0].num = homeObj.abnormal_order_count;
+ this.workOrderList[1].num = homeObj.overdue_order_count;
+ this.workOrderList[2].num = homeObj.work_order_count;
+ break;
+ // 工程师
+ case 4:
+ // 项目维保
+ this.projectRepairList[0].num = homeObj.pending_order_count; //待接单数量
+ this.projectRepairList[1].num = homeObj.pending_count; //待执行数量
+ this.projectRepairList[2].num = homeObj.under_repair_count; //维修中数量
+ // 工单数据
+ this.workOrderList[0].num = homeObj.abnormal_order_count; //异常单数量
+ this.workOrderList[1].num = homeObj.overdue_order_count; //逾期单数量
+ this.workOrderList[2].num = homeObj.work_order_count; //工单池数量
+ // 结算情况
+ this.settlementList[0].num = homeObj.pending_payment_count; //待收款数量
+ this.settlementList[1].num = homeObj.paid_for_count; //已收款数量
+ break;
+ }
// 重构公告列表
// if(homeObj.notice.length) {
// homeObj.notice.forEach(item=>{
@@ -439,7 +462,10 @@
url:faultRepairUrls[index]
})
} else {
- this.$toolAll.tools.showToast('已催单成功')
+ // this.$toolAll.tools.showToast('已催单成功')
+ uni.navigateTo({
+ url:`/pagesA/workOrder/workOrderLlsit`
+ })
}
},
// 查询解决方案的推荐方案
diff --git a/pagesA/peopleManagement/peopleManagement.vue b/pagesA/peopleManagement/peopleManagement.vue
index 3fe46b9..c8fd46c 100644
--- a/pagesA/peopleManagement/peopleManagement.vue
+++ b/pagesA/peopleManagement/peopleManagement.vue
@@ -11,11 +11,13 @@
-
-
-
-
-
+
+
+
+
+
+
+
{{item.name}}({{item.isJob ? '正在作业' : '空闲中'}})
@@ -23,13 +25,13 @@
{{['未审核','已审核'][item.is_check]}}
-
+
编号: {{item.number}}
-
+
@@ -53,7 +55,7 @@
-
+
@@ -80,7 +82,8 @@
page:1,
list_rows:20,
total:0,
- tianxuan:''
+ tianxuan:'',
+ order_id:'',//工单id
}
},
onReachBottom() {
@@ -89,7 +92,10 @@
this.checkList();
}
},
- onLoad() {
+ onLoad(op) {
+ if(op.orderId){
+ this.order_id = op.orderId;
+ }
this.checkList();
},
methods: {
@@ -128,6 +134,19 @@
}
})
},
+ // 派发工单事件
+ sellEv(){
+ this.$requst.post('/universal/api.order/dispatch',{order_id:this.order_id,uid:this.tianxuan}).then(res=>{
+ if(res.code){
+ this.$toolAll.tools.showToast('派单成功');
+ setTimeout(()=>{
+ uni.navigateBack({
+ delta:1
+ })
+ },1000)
+ }
+ })
+ },
// 调用查询事件
callEv() {
this.page = 1;
@@ -138,7 +157,6 @@
this.dataList.forEach(item1=>{item1.state = false})
item.state = !item.state;
item.state ? this.tianxuan = item.id : '';
- console.log(this.tianxuan);
}
}
}
diff --git a/pagesA/workOrder/details.vue b/pagesA/workOrder/details.vue
index 4a875de..c2b9f8b 100644
--- a/pagesA/workOrder/details.vue
+++ b/pagesA/workOrder/details.vue
@@ -17,34 +17,34 @@
状态:{{statusText}}
-
+
工单编号:
-
+
项目编号:
-
+
项目名称:
-
+
产品类型:
-
+
安装位置:
-
+
维保类型:
-
+
紧急程度:
@@ -62,20 +62,20 @@
-
+
报 单 人:
-
+
报单时间:
-
+
服务方式:
-
+
定位地址:
@@ -91,35 +91,35 @@
状态:{{statusText}}
-
+
开始时间:
-
+
结束时间:
-
+
维保用时:
-
+
维保费用:
-
+
等待时长:
-
+
主维保人:
-
+
更换配件:
@@ -151,12 +151,12 @@
-
+
维保原因:
-
+
维保人员:
@@ -307,6 +307,8 @@
this.$requst.get('/universal/api.order/order_info', params).then(res => {
console.log(res.data,'工单详情')
if (res.code) {
+ this.statusText = res.data.btn.attributes.text;
+ this.statusColor = res.data.btn.attributes.color;
switch (type) {
case 1:
this.detailObj = res.data;
diff --git a/pagesA/workOrder/workOrder.vue b/pagesA/workOrder/workOrder.vue
index 1a1565d..4111d3c 100644
--- a/pagesA/workOrder/workOrder.vue
+++ b/pagesA/workOrder/workOrder.vue
@@ -18,37 +18,37 @@
-
+
工单编号:
-
+
项目编号:
-
+
项目名称:
-
+
产品类型:
{{productTypeList[productIndex].name}}
-
+
安装位置:
-
+
维保类型:
{{faultTypeList[faultIndex].name}}
-
+
紧急程度:
@@ -69,22 +69,22 @@
-
+
报 单 人:
-
+
报单时间:
-
+
服务方式:
{{serviceModeList[serviceModeIndex].name}}
-
+
定位地址:
diff --git a/pagesA/workOrder/workOrderAudit.vue b/pagesA/workOrder/workOrderAudit.vue
index 339dc47..79c0c5f 100644
--- a/pagesA/workOrder/workOrderAudit.vue
+++ b/pagesA/workOrder/workOrderAudit.vue
@@ -4,24 +4,24 @@
-
+
工单编号:
-
+
项目名称:
-
+
客户名称:
-
+
结算方式:
-
+
支付方式:
@@ -29,19 +29,19 @@
-
+
上门费
-
+
税金
-
+
材料费
-
+
其他费用
@@ -82,7 +82,7 @@
- 提交时间:
+ 提交时间:
@@ -116,11 +116,6 @@
},
data() {
return {
- swiperCurrent: 0,
- swiHeight: 0,
- statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40,
- ifInvoicing:false, //是否开票
- ifCollection:false, //是否收款
remarksMsg:'', //备注信息
auditData:[], //工单展示数据
setTime:'', //提交时间
@@ -128,10 +123,7 @@
}
},
mounted() {
- const query = uni.createSelectorQuery().in(this);
- query.select('#swi1').boundingClientRect(data => {
- this.swiHeight = data.height - 100
- }).exec();
+
},
onLoad(op) {
if (op.orderId != undefined) {
@@ -180,9 +172,12 @@
if (res.code == 0) {
this.$toolAll.tools.showToast('提交成功');
setTimeout(()=>{
- uni.navigateTo({
- url:`/pagesA/workOrder/workOrderLlsit?status='待审批'&statusId=6`
+ uni.navigateBack({
+ delta:1
})
+ // uni.navigateTo({
+ // url:`/pagesA/workOrder/workOrderLlsit?status='待审批'&statusId=6`
+ // })
},500)
}
})
diff --git a/pagesA/workOrder/workOrderLlsit.vue b/pagesA/workOrder/workOrderLlsit.vue
index 7c636c7..41df2bb 100644
--- a/pagesA/workOrder/workOrderLlsit.vue
+++ b/pagesA/workOrder/workOrderLlsit.vue
@@ -60,8 +60,10 @@
{{item.address}}
-
- 催一催
+
+
+ 催一催
+
@@ -102,16 +104,17 @@
page:1,
order_status:"",
order_times:"",
- keyword:""
+ keyword:"",
+ is_evaluate:0//0:未评价,1:已评价
},
total:0,
dataList:[],
statusId:0,
- ifLoading:true
+ ifLoading:true,
+ orderType:[],//工单状态值
}
},
onReachBottom() {
- console.log(this.total,this.dataList.length,114);
if(this.total!=this.dataList.length) {
this.dataPage.page++;
this.getDatalist();
@@ -123,15 +126,48 @@
},
onLoad(op) {
if(op.statusId!=undefined) this.statusId = op.statusId;
+ if(op.is_evaluate){this.dataPage.is_evaluate = op.is_evaluate} else {delete this.dataPage.is_evaluate}
+ switch (uni.getStorageSync('type_id')*1){
+ case 1:
+ case 2:
+ // 业务员、客户
+ this.orderType = ['待指派','待接单','待维修','维修中','待付款','待评价'];
+ break;
+ case 3:
+ // 客服
+ this.orderType = ['待指派','待接单','待维修','维修中','待收款','待审批','已收款','待回访','异常单','逾期单'];
+ break;
+ case 4:
+ // 工程师
+ this.orderType = ['待接单','待维修','维修中','待收款','待审批','异常单','逾期单'];
+ break;
+ case 5:
+ // 财务
+ this.orderType = [];
+ break;
+ }
},
methods: {
// 获取工单状态
getType(){
+ this.array = [];
this.$requst.get('/universal/api.order/order_type').then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code) {
- this.array=[...res.data];
-
+ if(uni.getStorageSync('type_id')!=5){
+ if(res.data.length){
+ this.orderType.forEach(item=>{
+ res.data.forEach(item1=>{
+ if(item==item1.name){
+ this.array.push(item1);
+ }
+ })
+ })
+ }
+ } else {
+ this.array=[...res.data];
+ }
+ console.log(this.array,777777);
if(this.statusId){
this.workeOrderStatusIndex = this.array.findIndex(item=>item.id==this.statusId);
if(this.workeOrderStatusIndex!=-1) {
@@ -139,6 +175,7 @@
this.dataPage.order_status = this.array[this.workeOrderStatusIndex].id;
}
}
+
// 如果页数等于1
if(this.dataPage.page==1) {
// 调用获取工单列表事件
@@ -154,7 +191,6 @@
title:'加载中...'
})
this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => {
- console.log(res,'工单列表')
if (res.code==1) {
this.total = res.data.total;
if(this.dataPage.page==1) this.dataList = [];
@@ -168,7 +204,11 @@
},
// 催一催事件
hurryUpEv(id) {
- this.$toolAll.tools.showToast(`已催单成功`);
+ this.$requst.post('/universal/api.order/urge',{order_id:id}).then(res=>{
+ if(res.code){
+ this.$toolAll.tools.showToast(`已催单成功`);
+ }
+ })
},
// 查看工单详情和进入接单页面
projectDetailsFun(status,id,statusText,statusColor) {
@@ -196,10 +236,30 @@
}
})
}else if(uni.getStorageSync('type_id')==5){
- // 财务点击审核工单
- uni.navigateTo({
- url: `/pagesA/workOrder/workOrderAudit?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
- })
+ if(status==6){
+ // 财务点击审核工单
+ uni.navigateTo({
+ url: `/pagesA/workOrder/workOrderAudit?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
+ })
+ } else {
+ // 去详情
+ uni.navigateTo({
+ url: `/pagesA/workOrder/details?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
+ })
+ }
+ } else if(uni.getStorageSync('type_id')==3){
+ if(status==1){
+ // 客服点击待指派工单
+ uni.navigateTo({
+ url: `/pagesA/peopleManagement/peopleManagement?orderId=${id}`
+ })
+ }
+ if(status==8){
+ // 客服点击待指派工单
+ uni.navigateTo({
+ url: `/pagesA/workOrder/payReturnVisit?order_id=${id}`
+ })
+ }
} else {
// 客户、客服、业务员、工程师点击查看详情
uni.navigateTo({
@@ -212,7 +272,7 @@
this.workeOrderStatus = '';
this.workeOrderStatusIndex = data.detail.value;
this.dataPage.order_status=this.array[data.detail.value].id-0
- console.log( this.dataPage.order_status,123)
+ this.statusId = this.dataPage.order_status;
this.getDatalist()
},
@@ -282,6 +342,7 @@
right: 43rpx;
top: 50%;
margin-top: -14rpx;
+ z-index: 10;
}
.screen {
diff --git a/pagesA/workOrder/workOrderThree.vue b/pagesA/workOrder/workOrderThree.vue
index 030d817..6a1e6d8 100644
--- a/pagesA/workOrder/workOrderThree.vue
+++ b/pagesA/workOrder/workOrderThree.vue
@@ -238,6 +238,7 @@
// 调用税金换算事件
// this.conversionEv();
if(op.id!=undefined) {
+ console.log(op,7777);
this.orderId = op.id;
// 调用查询结算审核信息事件
this.handleWorkOrderGet(this.orderId);
@@ -302,11 +303,14 @@
}
handleWorkOrderSubmit(params).then(res=>{
if(res.code) {
- this.$toolAll.tools.showToast('提交成功,即将返回工单列表');
+ this.$toolAll.tools.showToast('提交审核成功');
setTimeout(()=>{
- uni.navigateTo({
- url: `/pagesA/workOrder/workOrderLlsit`
+ uni.navigateBack({
+ delta:3
})
+ // uni.navigateTo({
+ // url: `/pagesA/workOrder/workOrderLlsit`
+ // })
},2000)
} else {
this.$toolAll.tools.showToast(res.msg);
@@ -439,7 +443,6 @@
uni.canvasToTempFilePath({
canvasId: 'firstCanvas',
success:(res)=> {
- // base64转图片路径
// #ifdef APP-PLUS
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
diff --git a/pagesA/workOrder/workorderTwo.vue b/pagesA/workOrder/workorderTwo.vue
index 005d84f..c55d012 100644
--- a/pagesA/workOrder/workorderTwo.vue
+++ b/pagesA/workOrder/workorderTwo.vue
@@ -18,31 +18,31 @@
-
+
工单编号:
-
+
项目编号:
-
+
项目名称:
-
+
产品类型:
-
+
安装位置:
-
+
维保类型:
-
+
服务方式:
@@ -61,28 +61,28 @@
-->
-
+
开始时间:
-
+
结束时间:
-
+
维保用时:
-
+
维保费用:
-
+
等待时长:
-
+
主维保人:
@@ -125,7 +125,7 @@
维保原因:
-
+
维保人员:
diff --git a/pagesB/my-account/my-account.vue b/pagesB/my-account/my-account.vue
index ce8361c..0a36d52 100644
--- a/pagesB/my-account/my-account.vue
+++ b/pagesB/my-account/my-account.vue
@@ -47,10 +47,10 @@
工单日期
- -¥{{item.prices}}
- {{item.workOrderNum}}
- {{item.way}}
- {{item.date}}
+ {{item.amount}}
+ {{item.order_number}}
+ {{item.amount_type}}
+ {{item.order_time}}
@@ -85,7 +85,7 @@
{{item.address}}
- 去结算
+ 查看详情
@@ -114,12 +114,9 @@
technicalCommission:'0.00' // 技术佣金
},
// 收支明细列表
- incomeExpensesList:[
- // {prices:'1088',workOrderNum:'GD20220112-1001',way:'现金',date:'2019-7-24'},
- ],
- 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'},
- ],
+ incomeExpensesList:[],
+ // 未结算工单
+ unsettledList:[],
ifDetail:false,
size:10,
page:1,
@@ -141,12 +138,26 @@
if(this.current) {
// 调用查询我的账户信息
this.getMyAccountInfo();
+ // 调用查询收支明细
+ this.checkSZDetail();
} else {
// 查询未结算工单列表事件
this.workWordEv();
}
},
methods: {
+ // 查询收支明显
+ checkSZDetail(){
+ let params = {
+ list_rows:this.size,
+ page:this.page
+ }
+ this.$requst.get('/universal/api.account/income_expenditure_info',params).then(res=>{
+ if(res.code){
+ this.incomeExpensesList = res.data.data;
+ }
+ })
+ },
// 查询未结算工单列表事件
workWordEv(){
uni.showLoading({
@@ -160,7 +171,7 @@
if(res.data.data.length) {
res.data.data.forEach(item=>{
let obj = {
- id:item.project_id,//项目id
+ id:item.order_id,//项目id
title:item.project_name,//项目名称
name:item.username,//负责人
number:item.order_number,//工单编号
@@ -181,7 +192,7 @@
// 去结算事件
goSettlementEv(id) {
uni.navigateTo({
- url:`/pagesA/workOrder/workOrderThree?id=${id}`
+ url:`/pagesA/workOrder/details?orderId=${id}`
})
},
// 查询我的账户信息
@@ -191,17 +202,6 @@
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);
}
diff --git a/pagesB/set-up/set-up.vue b/pagesB/set-up/set-up.vue
index adb9a2b..8af71b3 100644
--- a/pagesB/set-up/set-up.vue
+++ b/pagesB/set-up/set-up.vue
@@ -3,16 +3,14 @@
-
-
- 开启语音提醒
-
-
-
- 接受新消息通知
-
-
-
+
+ 开启语音提醒
+
+
+
+ 接受新消息通知
+
+
修改登录密码
@@ -25,32 +23,32 @@
上门服务条款
-
- V3.0
+
+ {{agreementArr[0].version}}
用户服务协议
-
- V1.1
+
+ {{agreementArr[1].version}}
飞猴云服务隐私政策
-
- V1.2
+
+ {{agreementArr[2].version}}
技术服务合作协议
-
- V1.1
+
+ {{agreementArr[3].version}}
关于飞猴云服务
-
- V1.1
+
+ {{agreementArr[4].version}}
@@ -75,12 +73,14 @@
voiceStatus:false,//是否开启语音提醒
newsStatus:false,//是否开启接受新消息通知
cacheSize:'754.72 KB',//缓存数据大小
+ agreementArr:[],//协议对象
}
},
onLoad() {
// 调用获取缓存数据的大小
this.getStorageDataNum();
- this.getSettings()
+ // 调用获取设置信息
+ this.getSettings();
},
methods: {
// 获取缓存数据的大小
@@ -99,13 +99,18 @@
});
// #endif
},
- // 语音提醒事件
- voiceEv(status){
- console.log(status);
- },
- // 新消息通知事件
- newsEv(status){
- console.log(status);
+ // 语音提醒事件\新消息通知事件
+ voiceNewsEv(status,num=0){
+ num ? this.voiceStatus = status : this.newsStatus = status;
+ let params = {
+ voice_reminder:this.voiceStatus?1:0,
+ receive_message:this.newsStatus?1:0
+ }
+ this.$requst.post('/universal/api.settings/settings',params).then(res=>{
+ if(res.code){
+ // uni.navigateBack({delta:1})
+ }
+ })
},
// 修改登录密码
updatePassword(){
@@ -113,14 +118,27 @@
url:'/pages/forget/forget'
})
},
- // 设置
+ // 获取设置信息
getSettings(){
- this.$requst.post('/universal/api.settings/settings').then(res=>{
- console.log(res,'调用成功')
+ let params = {
+ voice_reminder:'',
+ receive_message:''
+ }
+ this.$requst.get('/universal/api.settings/settings',params).then(res=>{
if(res.code){
-
+ this.voiceStatus = [false,true][res.data.voice_reminder];
+ this.newsStatus = [false,true][res.data.receive_message];
+ for (let key in res.data) {
+ if(res.data[key]!=1&&res.data[key]!=0){
+ let obj = {
+ ...res.data[key],
+ title:key
+ }
+ this.agreementArr.push(obj)
+ }
+ }
+ console.log(this.agreementArr,77777);
// uni.navigateBack({delta:1})
-
}
})
},
@@ -202,7 +220,7 @@
// 去服务协议、服务条款、隐私政策、合作协议、飞猴云服务页面
gopageEv(index) {
uni.navigateTo({
- url:'/pages/login/agreement'
+ url:`/pages/login/agreement?title=${this.agreementArr[index].title}&id=${this.agreementArr[index].id}`
})
}
}