jyt pirms 2 gadiem
vecāks
revīzija
e1b92ca262
22 mainītis faili ar 1027 papildinājumiem un 146 dzēšanām
  1. +60
    -15
      pages.json
  2. +6
    -0
      pages/center/Piabodata/Employeesstatistics.vue
  3. +13
    -0
      pages/center/Piabodata/Groupcontrast.vue
  4. +6
    -0
      pages/center/Piabodata/StaffAnalysis.vue
  5. +17
    -0
      pages/center/Piabodata/Theteamcompared.vue
  6. +6
    -0
      pages/center/Piabodata/TrendAnalysis.vue
  7. +6
    -0
      pages/center/Piabodata/Userinsightinto.vue
  8. +17
    -0
      pages/center/Piabodata/index.vue
  9. +81
    -9
      pages/center/consumer/index.vue
  10. +38
    -3
      pages/center/prohibited/index.vue
  11. +79
    -5
      pages/center/records/index.vue
  12. +39
    -0
      pages/index/index.vue
  13. +7
    -0
      pages/index/learning.vue
  14. +14
    -0
      pages/index/personal.vue
  15. +6
    -0
      pages/learning/Equinoctiallearning.vue
  16. +7
    -0
      pages/mine/consultanonduty/index.vue
  17. +113
    -112
      pages/mine/equipment/index.vue
  18. +102
    -0
      pages/mine/registerCode.vue
  19. +327
    -0
      pages/mine/registerForm.vue
  20. +45
    -0
      pages/mine/registerResult.vue
  21. +35
    -0
      sdk/WXBizDataCrypt.js
  22. +3
    -2
      utils/domain.js

+ 60
- 15
pages.json Parādīt failu

@@ -16,7 +16,8 @@
"style": {
"navigationBarTitleText": "智控管家",
"navigationBarBackgroundColor": "#2671E2",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh":true
}
},
{
@@ -31,7 +32,8 @@
"style": {
"navigationBarTitleText": "学习",
"navigationBarBackgroundColor": "#2671E2",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh":true
}
},{
"path": "pages/index/personal",
@@ -196,7 +198,8 @@
"style": {
"navigationBarTitleText": "值班顾问",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -204,7 +207,8 @@
"style": {
"navigationBarTitleText": "设备管理",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -226,6 +230,36 @@
}
}
,{
"path" : "registerCode",
"style" :
{
"navigationBarTitleText": "访客登记码",
"navigationBarBackgroundColor": "#2671E2",
"navigationBarTextStyle": "white"
}
}
,{
"path" : "registerForm",
"style" :
{
"navigationBarTitleText": "访客登记表",
"navigationBarBackgroundColor": "#2671E2",
"navigationBarTextStyle": "white"
}
},
{
"path" : "registerResult",
"style" :
{
"navigationBarTitleText": "访客登记表",
"navigationBarBackgroundColor": "#2671E2",
"navigationBarTextStyle": "white"
}
}
]
},
{
@@ -269,7 +303,8 @@
"style": {
"navigationBarTitleText": "分点学习",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -301,7 +336,8 @@
"style": {
"navigationBarTitleText": "销讲数据",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -309,7 +345,8 @@
"style": {
"navigationBarTitleText": "集团对比",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -317,7 +354,8 @@
"style": {
"navigationBarTitleText": "团队对比",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -341,7 +379,8 @@
"style": {
"navigationBarTitleText": "客户画像",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -349,7 +388,8 @@
"style": {
"navigationBarTitleText": "趋势分析",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -357,7 +397,8 @@
"style": {
"navigationBarTitleText": "员工分析",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
@@ -390,7 +431,8 @@
"style": {
"navigationBarTitleText": "顾问排名",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
@@ -399,7 +441,8 @@
"style": {
"navigationBarTitleText": "接待记录",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -415,7 +458,8 @@
"style": {
"navigationBarTitleText": "违禁记录",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{
@@ -423,7 +467,8 @@
"style": {
"navigationBarTitleText": "客户管理",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"enablePullDownRefresh":true
}
},
{


+ 6
- 0
pages/center/Piabodata/Employeesstatistics.vue Parādīt failu

@@ -201,6 +201,12 @@
this.houseId = uni.getStorageSync('buildingID').id;
this.init()
},
onPullDownRefresh() {
this.init()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
init(){
this.newlisttabinfo1={


+ 13
- 0
pages/center/Piabodata/Groupcontrast.vue Parādīt failu

@@ -300,6 +300,19 @@
this.getSectionList()
},
onPullDownRefresh(){
let that=this
uni.$on('updateGroup',function(data){
console.log(data)
that.houseId=data.arr.join(',')
// 获取销奖能力
that.getPowerList()
})
this.getSectionList()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
// 获取部门列表


+ 6
- 0
pages/center/Piabodata/StaffAnalysis.vue Parādīt failu

@@ -242,6 +242,12 @@
// 请求接口获取所有置业顾问员工的列表
this.getStaffList()
},
onPullDownRefresh() {
this.getStaffList()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
//是否对比
checkboxChange(){


+ 17
- 0
pages/center/Piabodata/Theteamcompared.vue Parādīt failu

@@ -471,6 +471,23 @@
this.getSectionList()

},
onPullDownRefresh() {
let that=this
uni.$on('update',function(data){
// console.log(data)
that.deptids=data.arr.join(',')
// 获取销奖能力
that.getPowerList()
})
// 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
// this.buildingname = uni.getStorageSync('buildingID').name;
// 请求接口获取所有置业顾问员工的列表
this.getSectionList()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
//是否对比
checkboxChange(){


+ 6
- 0
pages/center/Piabodata/TrendAnalysis.vue Parādīt failu

@@ -322,6 +322,12 @@
this.pamect.houseId = uni.getStorageSync('buildingID').id;
this.init()
},
onPullDownRefresh() {
this.init()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
watch: {
Showhiddenunits(newValue, oldValue) {
this.showCanvas = !newValue


+ 6
- 0
pages/center/Piabodata/Userinsightinto.vue Parādīt failu

@@ -106,6 +106,12 @@
this.buildingID=uni.getStorageSync('buildingID').id;
this.gitinit()
},
onPullDownRefresh() {
this.gitinit()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
anclick(i){
console.log(i)


+ 17
- 0
pages/center/Piabodata/index.vue Parādīt failu

@@ -336,6 +336,23 @@
// 获取维度
this.getindexZxl()
},
onPullDownRefresh(){
// 获取员工
this.getStaffList()
// 获取团队
this.getSectionList()
// 获取团队是否显示权限
// 获取简报
this.getReport()
// 获取接待趋势
this.getRtrent()
// 获取维度
this.getindexZxl()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
queryHaveDept() {
return new Promise((resolve, reject) => {


+ 81
- 9
pages/center/consumer/index.vue Parādīt failu

@@ -26,7 +26,9 @@
更多筛选<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
</view>
</view>

<view class="count" v-if="recordList.length > 0">
筛选结果:<text>{{totalRecords}} </text>条
</view>
<view class="content">
<view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
<view style="width: 100%;padding-top: 200rpx;background: #FFFFFF;">
@@ -148,7 +150,13 @@
到访次数
</view>
<view class="screen-record-tab">
<view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(1)">
<block v-for="(item,index) in visitList" :key="index">
<view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
@click="choice(index,item.value)">
{{item.label}}
</view>
</block>
<!-- <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(1)">
首次到访
</view>
<view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(2)">
@@ -159,7 +167,7 @@
</view>
<view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(4)">
3次以上
</view>
</view> -->
</view>
</view>
<view class="screen-foot">
@@ -225,7 +233,7 @@
screen:{
agentId:'',
agentIdtext:'',
visitRecord:'',
visitRecord:[],
record:null,
cunsumerTips:'',
cunsumerTipsid:'',
@@ -249,7 +257,26 @@
soltishow:false,
staTime:'',
endtime:'',
orderBy:''
orderBy:'',
totalRecords:'',
visitList: [{
label: '首次到访',
value: 1,
isShow: false,
}, {
label: '2次到访',
value: 2,
isShow: false,
}, {
label: '3次到访',
value: 3,
isShow: false,
}, {
label: '3次以上',
value: 4,
isShow: false,
}, ],
isRefresh:false
}
},
onLoad(options) {
@@ -260,6 +287,7 @@
this.buildingID = uni.getStorageSync('buildingID').id;
this.nextPage=1;
this.recordList=[]
this.isRefresh = false;
this.getMyCustom()
this.getFreeList()
this.getfindKeywordsList()
@@ -267,6 +295,14 @@
this.isnorefresh='';
}
},
onPullDownRefresh(){
this.isRefresh = true;
this.nextPage = 1;
this.getMyCustom()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000)
},
onReachBottom() {
if(this.totalRecord==this.nextPage){
uni.showToast({
@@ -277,10 +313,24 @@
return
}else{
this.nextPage+=1;
this.isRefresh = false;
this.getMyCustom();
}
},
methods:{
choice(index,e) {
if (this.visitList[index].isShow == true) {
this.visitList[index].isShow = false;
for (var i = 0; i < this.screen.visitRecord.length; i++) {
if (this.screen.visitRecord[i] === e) {
this.screen.visitRecord.splice(i, 1);
}
}
} else {
this.visitList[index].isShow = true;
this.screen.visitRecord.push(e)
}
},
tapsoltishow(){
this.soltishow=true;
},
@@ -295,6 +345,7 @@
this.orderBy=e[0].value;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
//选择录音时长
@@ -303,6 +354,7 @@
this.activeTotal2=index;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
//时间选择
@@ -316,6 +368,7 @@
this.endtime='';
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
}
},
@@ -326,6 +379,7 @@
this.activeTotal=4;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
recordclick(i){
@@ -387,8 +441,8 @@
orderBy:orderBy
}
};
if (this.screen.visitRecord > 0) {
parames.query.visitRecord = this.screen.visitRecord;
if (this.screen.visitRecord.length > 0) {
parames.query.visitRecords = this.screen.visitRecord.join(',');
}
if(this.screen.record==0){
parames.query.levels= ["1"]
@@ -421,8 +475,13 @@
})
}
})
this.recordList = [...this.recordList, ...list];
if(this.isRefresh){
this.recordList = list;
}else{
this.recordList = [...this.recordList, ...list];
}
this.totalRecord=data.totalPage;
this.totalRecords = data.totalRecord;
})
},
//获取顾问列表
@@ -498,6 +557,7 @@
this.nextPage=1;
this.recordList=[];
this.screenShow=false;
this.isRefresh = false;
this.getMyCustom();
},
//筛选确认
@@ -505,6 +565,7 @@
this.nextPage=1;
this.recordList=[];
this.screenShow=false;
this.isRefresh = false;
this.getMyCustom();
},
goSearch(){
@@ -527,7 +588,18 @@
height: 100%;
background: #F8F8F8;
}
.count {
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #FBE4E4;
text {
color: #F71616;
}
}
.timeview{
height: 80rpx;
line-height: 80rpx;


+ 38
- 3
pages/center/prohibited/index.vue Parādīt failu

@@ -14,6 +14,9 @@
顾问<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
</view>
</view>
<view class="count" v-if="recordList.length > 0">
筛选结果:<text>{{totalRecords}} </text>条
</view>
<view class="content">
<view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;background: #FFFFFF;">
<view style="width: 100%;padding-top: 200rpx;">
@@ -93,8 +96,9 @@
timeshow:false,
soltishow:false,
orderBy:'',
userInfo:{}
userInfo:{},
totalRecords:'',
isRefresh:false
}
},
onLoad(options) {
@@ -113,6 +117,7 @@
this.buildingID = uni.getStorageSync('buildingID').id;
this.recordList=[];
this.nextPage=1;
this.isRefresh = false;
this.getMyCustom()
this.getFreeList();
this.isnorefresh='';
@@ -121,6 +126,14 @@
pages[0].$vm.path='/pages/index/index'
console.log(pages[0].$vm.path)
},
onPullDownRefresh(){
this.nextPage=1;
this.isRefresh = true;
this.getMyCustom()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
onReachBottom() {
if(this.totalRecord==this.nextPage){
uni.showToast({
@@ -131,6 +144,7 @@
return
}else{
this.nextPage+=1;
this.isRefresh = false;
this.getMyCustom();
}
},
@@ -147,6 +161,7 @@
this.orderBy=e[0].value;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
//时间选择
@@ -160,6 +175,7 @@
this.endtime='';
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
}
},
@@ -170,6 +186,7 @@
this.activeTotal=4;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
tapThevisiting(item) {
@@ -254,8 +271,13 @@
this.$u.post("/customer/findbypage", parames).then(data => {
var list = data.results || [];
this.recordList = [...this.recordList, ...list];
if(this.isRefresh){
this.recordList = list;
}else{
this.recordList = [...this.recordList, ...list];
}
this.totalRecord=data.totalPage;
this.totalRecords = data.totalRecord;
})
},
//获取顾问列表
@@ -274,6 +296,7 @@
this.recordList=[];
this.nextPage=1;
this.selectshow=false;
this.isRefresh = false;
this.getMyCustom();
},
@@ -291,6 +314,18 @@
height: 100%;
background: #F8F8F8;
}
.count {
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #FBE4E4;
text {
color: #F71616;
}
}
.timeview{
height: 80rpx;
line-height: 80rpx;


+ 79
- 5
pages/center/records/index.vue Parādīt failu

@@ -27,6 +27,9 @@
更多筛选<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
</view>
</view>
<view class="count" v-if="recordList.length > 0">
筛选结果:<text>{{totalRecords}} </text>条
</view>
<view class="content">
<view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;background: #FFFFFF;">
<view style="width: 100%;padding-top: 200rpx;">
@@ -131,7 +134,13 @@
到访次数
</view>
<view class="screen-record-tab">
<view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="recordclick(1)">
<block v-for="(item,index) in visitList" :key="index">
<view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
@click="choice(index,item.value)">
{{item.label}}
</view>
</block>
<!-- <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="recordclick(1)">
首次到访
</view>
<view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']" @click="recordclick(2)">
@@ -142,7 +151,7 @@
</view>
<view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']" @click="recordclick(4)">
3次以上
</view>
</view> -->
</view>
</view>
<view class="screen-foot">
@@ -208,7 +217,7 @@
agentId:'',//顾问id
record:'0',
markAdvisor:null,
visitRecord:null,
visitRecord:[],
validInvalid:null,
clientStage:'',
clientStageName:''
@@ -228,6 +237,25 @@
orderBy:'',
methodsisshow:false,
userInfo:{},
visitList: [{
label: '首次到访',
value: 1,
isShow: false,
}, {
label: '2次到访',
value: 2,
isShow: false,
}, {
label: '3次到访',
value: 3,
isShow: false,
}, {
label: '3次以上',
value: 4,
isShow: false,
}, ],
totalRecords: '',
isRefresh:false
}
},
onLoad(options) {
@@ -260,6 +288,7 @@
this.buildingID = uni.getStorageSync('buildingID').id;
this.recordList=[];
this.nextPage=1;
this.isRefresh = false;
this.getMyCustom()
this.getFreeList();
this.isnorefresh='';
@@ -267,6 +296,14 @@
this.getCustomPhase()
},
onPullDownRefresh(){
this.isRefresh = true;
this.nextPage = 1;
this.getMyCustom()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
onReachBottom() {
if(this.totalRecord==this.nextPage){
uni.showToast({
@@ -278,9 +315,23 @@
}else{
this.nextPage+=1;
this.getMyCustom();
this.isRefresh = false;
}
},
methods:{
choice(index,e) {
if (this.visitList[index].isShow == true) {
this.visitList[index].isShow = false;
for (var i = 0; i < this.screen.visitRecord.length; i++) {
if (this.screen.visitRecord[i] === e) {
this.screen.visitRecord.splice(i, 1);
}
}
} else {
this.visitList[index].isShow = true;
this.screen.visitRecord.push(e)
}
},
getCustomPhase(){
this.phaseList=[]
this.$u.post("/customer/lifeTrackDefineList",{houseId:this.buildingID}).then(res => {
@@ -312,6 +363,7 @@
this.orderBy=e[0].value;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
//选择录音时长
@@ -320,6 +372,7 @@
this.activeTotal2=index;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
//时间选择
@@ -333,6 +386,7 @@
this.endtime='';
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
}
},
@@ -343,6 +397,7 @@
this.activeTotal=4;
this.nextPage=1;
this.recordList=[];
this.isRefresh = false;
this.getMyCustom();
},
tapThevisiting(item) {
@@ -433,7 +488,7 @@
time:1,
staTime:this.staTime,
endtime:this.endtime,
visitRecord:this.screen.visitRecord,
visitRecords:this.screen.visitRecord.join(','),
markAdvisor:this.screen.markAdvisor,
dateType:dateType,
recDurationInterval:recDurationInterval,
@@ -449,8 +504,13 @@
this.$u.post("/customer/findbypage", parames).then(data => {
var list = data.results || [];
this.recordList = [...this.recordList, ...list];
if(this.isRefresh){
this.recordList = list;
}else{
this.recordList = [...this.recordList, ...list];
}
this.totalRecord=data.totalPage;
this.totalRecords = data.totalRecord;
})
},
//获取顾问列表
@@ -472,6 +532,7 @@
this.screenShow=false;
this.recordList=[];
this.nextPage=1;
this.isRefresh = false;
this.getMyCustom();
},
reset(){
@@ -515,6 +576,7 @@
this.screenShow=false;
this.recordList=[];
this.nextPage=1;
this.isRefresh = false;
this.getMyCustom();
},
goSearch(){
@@ -532,6 +594,18 @@
height: 100%;
background: #F8F8F8;
}
.count {
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #FBE4E4;
text {
color: #F71616;
}
}
.timeview{
height: 80rpx;
line-height: 80rpx;


+ 39
- 0
pages/index/index.vue Parādīt failu

@@ -306,6 +306,45 @@
this.initworkThisWeek()
this.initrealTimeStatistics()
},
onPullDownRefresh() {
this.getMenu()
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
this.methodsisshow = false;
} else {
this.methodsisshow = true;
}
if (this.userInfo.zkProperties.length == 1) {
this.buildingID = uni.getStorageSync('buildingID').id;
this.buildingname = uni.getStorageSync('buildingID').name;
this.buildingishow = false;
} else {
this.buildingishow = true;
this.buildingname = uni.getStorageSync('buildingID').name;
this.buildingID = uni.getStorageSync('buildingID').id;
this.userInfo.zkProperties.forEach(item => {
item.label = item.propertyName;
item.value = item.id
})
this.lpanlist = this.userInfo.zkProperties
}
if (this.userInfo.dataCode == 6) {
// this.Myworkcard = true;
this.equipmentisshow = false;
this.iniodianloang()
} else {
this.equipmentisshow = true;
// this.Myworkcard = false;
this.initequipment()
// this.waitForOperation()
}
this.initworkThisWeek()
this.initrealTimeStatistics()
setTimeout(() => {
uni.stopPullDownRefresh()
}, 3000)
},
methods: {
//获取权限
getMenu(){


+ 7
- 0
pages/index/learning.vue Parādīt failu

@@ -76,6 +76,13 @@
this.buildingID=uni.getStorageSync('buildingID').id;
this.clocktab(i)
},
onPullDownRefresh() {
var i=uni.getStorageSync('fendianindex')
this.clocktab(i)
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
//全部学习跳转
quclick(item){


+ 14
- 0
pages/index/personal.vue Parādīt failu

@@ -50,6 +50,15 @@
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
</view>
</view>
<view class="line" @click="scan">
<view class="title" style="width: 220rpx;">
<image src="/static/images/Customer.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
访客登记码
</view>
<view class="right">
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
</view>
</view>
<view class="line" @click="Changehepassword">
<view class="title">
<image src="/static/images/password.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
@@ -101,6 +110,11 @@
this.mobile = userInfos.loginName
},
methods: {
scan(){
uni.navigateTo({
url:"../mine/registerCode"
})
},
//拨打电话
phone() {
wx.makePhoneCall({


+ 6
- 0
pages/learning/Equinoctiallearning.vue Parādīt failu

@@ -38,6 +38,12 @@
this.biaoqian=options.biaoqian
this.ceninit()
},
onPullDownRefresh() {
this.ceninit()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
quclick(item) {
uni.showLoading({


+ 7
- 0
pages/mine/consultanonduty/index.vue Parādīt failu

@@ -67,6 +67,13 @@
this.changeAgentListShow()
this.changePausedAgentListShow()
},
onPullDownRefresh() {
this.changeAgentListShow()
this.changePausedAgentListShow()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
computed: {
activeAgentList() {
return this.activeTotal == 1 ? this.agentList : this.pausedAgentList


+ 113
- 112
pages/mine/equipment/index.vue Parādīt failu

@@ -1,9 +1,9 @@
<template>
<view class="cented">
<view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;">
<u-search @search='shecs()' :show-action='false' placeholder="请输入设备编号或领用人进行搜索" v-model="imei"></u-search>
<u-search @search='shecs()' :show-action='false' placeholder="请输入设备编号或领用人进行搜索" v-model="imei"></u-search>
</view>
<view class="tab-box">
<!-- <view class="tab-item-wrap">
<view v-for="(item, index) in tablist" :key="index" :class="activeClass == index ? 'bottom' : ''" @tap="clocktab(index)">
@@ -11,12 +11,12 @@
<view class="bottomLine" v-if="activeClass == index"></view>
</view>
</view> -->
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="700" :current="activeClass"
@change="clocktab()" inactive-color="#b1b1b1" active-color="#008ef2" :list="tablist" :is-scroll="true">
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="700" :current="activeClass" @change="clocktab()"
inactive-color="#b1b1b1" active-color="#008ef2" :list="tablist" :is-scroll="true">
</u-tabs-swiper>
</view>
<view class="infoet">
<view class="infoviewbox" v-for="(item,index) in newListdata" :key="index">
<view class="infobox1">
@@ -28,29 +28,23 @@
<view class="you11" v-if="item.electricity<20">
<view class="youimg" :style="{ height: item.electricity + '%' }"></view>
</view>
<view class="you2">电量:
<view class="you2">电量:
<text v-if="item.electricity>20">{{item.electricity}}%</text>
<text v-if="item.electricity<20" style="color: red;">{{item.electricity}}%</text>
</view>
<view class="you3">
<image v-if="item.signalDevice==''" class="youimg"
src="../../../static/images/newimg/xinhao0.png" mode=""></image>
<image v-if="item.signalDevice<20 && item.signalDevice>0" class="youimg"
src="../../../static/images/newimg/xinhao1.png" mode=""></image>
<image v-if="item.signalDevice<50 && item.signalDevice>20" class="youimg"
src="../../../static/images/newimg/xinhao2.png" mode=""></image>
<image v-if="item.signalDevice<70 && item.signalDevice>50" class="youimg"
src="../../../static/images/newimg/xinhao3.png" mode=""></image>
<image v-if="item.signalDevice<90 && item.signalDevice>70" class="youimg"
src="../../../static/images/newimg/xinhao4.png" mode=""></image>
<image v-if="item.signalDevice<=100 && item.signalDevice>90" class="youimg"
src="../../../static/images/newimg/xinhao5.png" mode=""></image>
<image v-if="item.signalDevice==''" class="youimg" src="../../../static/images/newimg/xinhao0.png" mode=""></image>
<image v-if="item.signalDevice<20 && item.signalDevice>0" class="youimg" src="../../../static/images/newimg/xinhao1.png" mode=""></image>
<image v-if="item.signalDevice<50 && item.signalDevice>20" class="youimg" src="../../../static/images/newimg/xinhao2.png" mode=""></image>
<image v-if="item.signalDevice<70 && item.signalDevice>50" class="youimg" src="../../../static/images/newimg/xinhao3.png" mode=""></image>
<image v-if="item.signalDevice<90 && item.signalDevice>70" class="youimg" src="../../../static/images/newimg/xinhao4.png" mode=""></image>
<image v-if="item.signalDevice<=100 && item.signalDevice>90" class="youimg" src="../../../static/images/newimg/xinhao5.png" mode=""></image>
</view>
<view class="you4" v-if="item.signalDevice=='' ">信号:0</view>
<view class="you4" v-else>信号:{{item.signalDevice}}</view>
</view>
</view>
<view class="infobox2">
<view class="box2-zuo">设备编号</view>
@@ -59,12 +53,15 @@
<view class="infobox2">
<view class="box2-zuo">录音状态</view>
<view class="box2-you" v-if="item.audioStatus=='false'">关闭</view>
<view class="box2-you" v-if="item.audioStatus=='true'">开启</view>
<view class="box2-you" v-if="!item.audioStatus">关闭</view>
<view class="box2-you" v-if="item.audioStatus=='true'">开启</view>
<view class="box2-you" v-if="item.audioStatus=='' ">关闭</view>
</view>
<view class="infobox2">
<view class="box2-zuo">待上传</view>
<view class="box2-you">
<view class="box2-you"><!--
<template v-if="item.audioUploadStatus=='false'">无上传</template>
<template v-if="item.audioUploadStatus=='true'">上传中</template>
<template v-if="item.audioUploadStatus=='' ">无上传</template> -->
<template v-if="item.fileCount && item.fileCount > 0">
<text class="stayupload">{{ item.fileCount }}条</text>
</template>
@@ -94,7 +91,8 @@
export default {
data() {
return {
tablist: [{
tablist: [
{
name: "全部(0)",
},
{
@@ -111,29 +109,35 @@
}
],
activeClass: 0,
pageNum: 1,
pageSize: 20,
imei: "",
orgcode: "",
newListdata: [],
buildingID: '',
jump: ''
pageNum:1,
pageSize:20,
imei:"",
orgcode:"",
newListdata:[],
buildingID:'',
jump:''
};
},
onReachBottom() {
this.pageNum += 1;
this.pageNum +=1;
this.init()
},
onPullDownRefresh(){
this.init()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
onLoad(options) {
if (options.active) {
this.activeClass = options.active
} else {
this.activeClass = 0
if(options.active){
this.activeClass=options.active
}else{
this.activeClass=0
}
this.newListdata = []
this.pageNum = 1;
this.pageSize = 20;
this.init()
this.newListdata=[]
this.pageNum=1;
this.pageSize=20;
this.init()
},
filters: {
formatDate: (dateTimeStamp) => {
@@ -143,114 +147,113 @@
var day = hour * 24;
var halfamonth = day * 15;
var month = day * 30;
var now = new Date().getTime();
var now = new Date().getTime();
var diffValue = now - newDate;
if (diffValue < 0) {
return;
}
var monthC = diffValue / month;
var weekC = diffValue / (7 * day);
var dayC = diffValue / day;
var hourC = diffValue / hour;
var minC = diffValue / minute;
if(diffValue < 0){return;}
var monthC =diffValue/month;
var weekC =diffValue/(7*day);
var dayC =diffValue/day;
var hourC =diffValue/hour;
var minC =diffValue/minute;
var result = '';
if (weekC >= 1) {
result = "1周前";
} else if (dayC >= 1) {
result = "" + parseInt(dayC) + "天前";
} else if (hourC >= 1) {
result = "" + parseInt(hourC) + "小时前";
} else if (minC >= 1) {
result = "" + parseInt(minC) + "分钟前";
} else {
result = "刚刚";
if(weekC>=1){
result= "1周前";
}else if(dayC>=1){
result=""+ parseInt(dayC) +"天前";
} else if(hourC>=1){
result=""+ parseInt(hourC) +"小时前";
}
else if(minC>=1){
result=""+ parseInt(minC) +"分钟前";
}else{
result="刚刚";
}
return result;
}
},
methods: {
shecs() {
this.newListdata = []
this.pageNum = 1;
this.pageSize = 20;
this.init()
shecs(){
this.newListdata=[]
this.pageNum=1;
this.pageSize=20;
this.init()
},
// tab
clocktab(index) {
this.activeClass = index;
this.newListdata = []
this.pageNum = 1;
this.pageSize = 20;
this.activeClass=index;
this.newListdata=[]
this.pageNum=1;
this.pageSize=20;
this.init()
},
init() {
this.buildingID = uni.getStorageSync('buildingID').id;
init(){
this.buildingID=uni.getStorageSync('buildingID').id;
const parames = {
pageNum: this.pageNum,
pageSize: this.pageSize,
query: {
imei: this.imei,
onLine: this.activeClass,
propertyId: this.buildingID,
orderType: 1
query:{
imei:this.imei,
onLine:this.activeClass,
propertyId:this.buildingID,
orderType:1
}
}
if (this.activeClass == 0) {
parames.query.onLine = null
if(this.activeClass==0){
parames.query.onLine=null
}
this.$u.post("/equipment/apiFindByPage", parames).then(res => {
this.tablist[0].name = "全部(" + res.allCount + ")";
this.tablist[1].name = "在线(" + res.eqOnLineCount + ")";
this.tablist[2].name = "低电量(" + res.lowElectricityCount + ")";
this.tablist[3].name = "今日活跃(" + res.activeCount + ")";
this.tablist[4].name = "离线(" + res.eqOffLineCount + ")";
if (res.obj.list.results == null) {
if (this.pageNum == 1) {
this.tablist[0].name="全部("+res.allCount+")";
this.tablist[1].name="在线("+res.eqOnLineCount+")";
this.tablist[2].name="低电量("+res.lowElectricityCount+")";
this.tablist[3].name="今日活跃("+res.activeCount+")";
this.tablist[4].name="离线("+res.eqOffLineCount+")";
if(res.obj.list.results==null){
if (this.pageNum == 1){
return
} else {
}else{
uni.showToast({
title: '已经到底了!',
duration: 2000
title: '已经到底了!',
duration: 2000
});
}
} else {
res.obj.list.results.forEach(item => {
if (item.onLine == 0) {
item.signalDevice = 0
}else{
res.obj.list.results.forEach(item=>{
if(item.onLine==0){
item.signalDevice=0
}
if (item.electricity == '') {
item.electricity = 0
if(item.electricity==''){
item.electricity=0
}
if (item.electricity > 100) {
item.electricity = 100
if(item.electricity>100){
item.electricity=100
}
let num = this.ascformatDate(item.updateTime)
if (num > 12) {
item.electricity = 0
let num=this.ascformatDate(item.updateTime)
if(num>12){
item.electricity=0
}
})
if (this.pageNum == 1) {
this.newListdata = res.obj.list.results
this.newListdata=res.obj.list.results
} else {
this.newListdata = [...this.newListdata, ...res.obj.list.results];
this.newListdata = [...this.newListdata, ...res.obj.list.results];
}
}
})
},
ascformatDate(dateTimeStamp) {
ascformatDate(dateTimeStamp){
let newDate = new Date(dateTimeStamp.replace(/-/g, '/')).getTime();
let minute = 1000 * 60;
let hour = minute * 60;
let day = hour * 24;
let halfamonth = day * 15;
let month = day * 30;
let now = new Date().getTime();
let now = new Date().getTime();
let diffValue = now - newDate;
let result = diffValue / hour;
let result =diffValue/hour;
return result;
}
},
@@ -375,7 +378,6 @@
background-color: #333333;
}
}

.you11 {
width: 20rpx;
height: 28rpx;
@@ -384,7 +386,7 @@
background-size: 100% 100%;
display: flex;
flex-direction: column-reverse;
.youimg {
width: 100%;
background-color: red;
@@ -399,7 +401,6 @@
color: #333333;
margin-left: 6rpx;
}

.you22 {
width: 114rpx;
height: 30rpx;
@@ -456,7 +457,7 @@
font-size: 24rpx;
color: #333333;
text-indent: 30rpx;
.stayupload {
color: #F41313;
}


+ 102
- 0
pages/mine/registerCode.vue Parādīt failu

@@ -0,0 +1,102 @@
<template>
<view class="registerCode">
<view class="registerImg">
<image :src="qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene=556'" mode=""></image>
</view>
<view class="registerBtn" @click="down">
保存图片到手机
</view>
</view>
</template>
<script>
let domain = require("@/utils/domain")
export default {
data() {
return {
qrCodeUrl: ""
};
},
methods: {
down() {
let url = this.qrCodeUrl + '/customer/getQrCode?pageUrl=pages/index/index'
console.log(url)
uni.downloadFile({
url,
success: (res) => {
console.log(res)
uni.downloadFile({
url, //图片地址
success: (res) => {
console.log('downloadFile success', res)
if (res.statusCode === 200) {
console.log('downloadFile res.statusCode === 200', res)
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function() {
uni.showToast({
title: "保存成功",
icon: "none"
})
},
fail: function() {
uni.showToast({
title: "保存失败",
icon: "none"
})
}
})
} else {
console.log('downloadFile res.statusCode !== 200', res)
}
}
})
}
});
}
},
onLoad() {
this.qrCodeUrl = domain.baseUrl
// let urlData = {
// page:'pages/mine/registerForm',
// scene:'556',
// width:300
// }
// uni.request({
// url:this.qrCodeUrl + '/customer/getQrCode',
// method:"POST",
// data:urlData,
// success(res) {
// console.log(res)
// }
// })
}
}
</script>
<style lang="scss">
.registerCode {
.registerImg {
width: 300rpx;
height: 300rpx;
margin: 130rpx auto;
image {
width: 100%;
height: 100%;
}
}
.registerBtn {
width: 80%;
height: 80rpx;
background: #3384fd;
color: #FFFFFF;
border-radius: 10rpx;
line-height: 80rpx;
text-align: center;
font-size: 30rpx;
margin: 50rpx auto;
}
}
</style>

+ 327
- 0
pages/mine/registerForm.vue Parādīt failu

@@ -0,0 +1,327 @@
<template>
<view class="cented-box">
<view class="chented" style="margin-bottom: 26rpx;">
<view class="title" style="border: none;">
<view class="titletext">姓名</view>
<view class="titletext2">
<input maxlength="10" class="titletext-input" style="color: #333333;" v-model="parames.name"
placeholder-class="titletext-input" placeholder-style="color:#B2B2B2;" type="text"
placeholder="请输入客户姓名(必填)" />
</view>
<view class="titleimg">
<!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> -->
</view>
</view>
</view>
<view class="chented">
<view class="title">
<view class="titletext">性别</view>
<view class="titletext2 displayclick" style="display: flex;align-items: center;padding-left: 10rpx;">
<view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view>
<view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view>
</view>
</view>

<view class="title">
<view class="titletext">到访人数</view>
<view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;">
<view class="num" v-for="i in 6" :key="i" :class="{active:parames.howMany == i+1}"
@click="changeHowMany(i+1)">
{{i + 1}}
</view>
</view>
</view>

<view class="title" @click="Buildingselection()">
<view class="titletext">到访途径</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
<!-- {{parames.sourceName||'请选择客户来源'}} -->
<text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
<text v-else>请选择客户来源</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
</view>
</view>
<!-- <view class="title" style="border: none;" @click="Buildingselection()">
<view class="titletext">咨询业务</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 110rpx;padding-left: 10rpx;">
<text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text>
<text v-else>请选择咨询业务</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../static/images/arrow.png" mode=""></image>
</view>
</view> -->
</view>
<button class="clive" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="verifyPass">提交2</button>
<view class="clive" @click="save" v-else>提交1</view>
<view v-if="Showhiddenunits">
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list"
@cancel="cancel" @confirm="confirm"></u-select>
</view>
</view>
</template>

<script>
var app = getApp();
var config = require("@/config");
let domain = require("@/utils/domain")
let WXBizDataCrypt = require("@/sdk/WXBizDataCrypt")
export default {
data() {
return {
Showhiddenunits: false,
list: [{
label: '自然到访',
value: '自然到访'
},
{
label: '渠道推荐',
value: '渠道推荐'
},
],
parames: {
name: '',
sex: 1,
sourceName: null,
howMany: 1,
agentId: null,
projectId: '',
phone:''
},
daitiReceptionobj: {},
verifyPass:false,
qrCodeUrl:''
};
},
onShow() {
this.parames.projectId = uni.getStorageSync('buildingID').id;
},
watch:{
parames:{
deep:true,
handler(newV){
if (newV.name.length == 0) {
this.verifyPass = false;
}else{
this.verifyPass = true;
}
}
}
},
methods: {
save() {
if (this.parames.name.length == 0) {
uni.showToast({
icon: "none",
title: "姓名不能为空"
})
return;
}
},
getPhoneNumber(e){
this.qrCodeUrl = domain.baseUrl
uni.login({
success:(login_res)=> {
if(e.detail.errMsg=="getPhoneNumber:ok"){
let data = {
code:login_res.code,
}
uni.request({
url:this.qrCodeUrl + '/code/loginSessionKey',
method:"GET",
data,
success:(SessionKey_res)=> {
let pc = new WXBizDataCrypt('wx8f883dca5ecc5510',SessionKey_res.data.data.session_key);
let data = pc.decryptData(e.detail.encryptedData,e.detail.iv)
console.log(data)
this.parames.phone = data.phoneNumber
if(this.parames.phone!=null && this.parames.phone!=""){
uni.request({
url:this.qrCodeUrl + '/customer/add',
method:"POST",
data:this.parames,
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (addres) => {
if(addres.data.code == 10000){
uni.navigateTo({
url:'/pages/mine/registerResult'
})
}
}
})
}else{
console.log("fail")
uni.showToast({
title: "获取手机号失败,重新提交",
icon: "none"
})
}
}
})
}else{
return;
}
}
})
},
changeSex(sex) {
this.parames.sex = sex;
},
changeHowMany(num) {
this.parames.howMany = num;
},
Buildingselection() {
this.Showhiddenunits = true;
},
cancel() {
this.Showhiddenunits = false;
},
confirm(e) {
this.parames.sourceName = e[0].value;
this.Showhiddenunits = false;
},
}
};
</script>
<style lang="scss" scoped>
.sexRadio {
color: #BFBFBF;
border: 1rpx solid #BFBFBF;
font-size: 24upx;
width: 120rpx;
height: 60rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;

&:last-child {
margin-left: 20rpx;
}

&.active {
background: #2B6FFF;
color: #fff;
border-color: #2B6FFF;
}
}

.num {
width: 50rpx;
height: 50rpx;
background: rgba(43, 110, 253, 0.1);
color: #2B6EFD;
font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;

&.active {
background: #2B6EFD;
color: #FFFFFF;
}
}

.cented-box {
background: #F8F8F8;
width: 100%;
height: 100vh;
}

.Pinspeak {
width: 100%;
height: 92rpx;
border-bottom: 1rpx solid #E0E0E0;
font-size: 32rpx;
font-weight: bold;
color: #333333;
text-indent: 30rpx;
line-height: 92rpx;
background: #FFFFFF;
margin-top: 20rpx;
padding-left: 10rpx;
}

.chented {
width: 100%;
padding-left: 30rpx;
padding-right: 30rpx;
background-color: #FFFFFF;

.title {
width: 100%;
height: 110rpx;
border-bottom: 1rpx solid #E0E0E0;
display: flex;
align-items: center;

.titletext {
width: 21%;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
color: #333333;
line-height: 110rpx;
text-indent: 10rpx;
}

.titletext2 {
width: 71%;
height: 110rpx;
}

.titletext-input {
width: 100%;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
color: #B2B2B2;
line-height: 110rpx;
padding-left: 10rpx;
}

.titleimg {
width: 8%;
text-align: right;

.titleimg1 {
width: 16rpx;
height: 36rpx;
}
}
}
}

.clive {
position: absolute;
bottom: 32rpx;
left: 30rpx;
right: 30rpx;
width: 690rpx;
height: 88rpx;
background: #2671E2;
text-align: center;
line-height: 88rpx;
color: #FFFFFF;
border-radius: 8rpx;
font-size: 32rpx;
}
</style>

+ 45
- 0
pages/mine/registerResult.vue Parādīt failu

@@ -0,0 +1,45 @@
<template>
<view class="registerCode">
<view class="registerImg">
<image src="../../static/images/allimg.png" mode=""></image>
</view>
<view class="registerBtn">
提交成功
</view>
</view>
</template>

<script>
export default {
data() {
return {
};
}
}
</script>

<style lang="scss">
.registerCode{
.registerImg{
width: 300rpx;
height: 300rpx;
margin: 130rpx auto;
image{
width: 100%;
height: 100%;
}
}
.registerBtn{
width: 80%;
height: 80rpx;
background: #3384fd;
color: #FFFFFF;
border-radius: 10rpx;
line-height: 80rpx;
text-align: center;
font-size: 30rpx;
margin: 50rpx auto;
}
}
</style>

+ 35
- 0
sdk/WXBizDataCrypt.js Parādīt failu

@@ -0,0 +1,35 @@
var crypto = require('crypto')
function WXBizDataCrypt(appId, sessionKey) {
this.appId = appId
this.sessionKey = sessionKey
}
WXBizDataCrypt.prototype.decryptData = function (encryptedData, iv) {
// base64 decode
var sessionKey = new Buffer(this.sessionKey, 'base64')
encryptedData = new Buffer(encryptedData, 'base64')
iv = new Buffer(iv, 'base64')
try {
// 解密
var decipher = crypto.createDecipheriv('aes-128-cbc', sessionKey, iv)
// 设置自动 padding 为 true,删除填充补位
decipher.setAutoPadding(true)
var decoded = decipher.update(encryptedData, 'binary', 'utf8')
decoded += decipher.final('utf8')
decoded = JSON.parse(decoded)
} catch (err) {
throw new Error('Illegal Buffer')
}
if (decoded.watermark.appid !== this.appId) {
throw new Error('Illegal Buffer')
}
return decoded
}
module.exports = WXBizDataCrypt

+ 3
- 2
utils/domain.js Parādīt failu

@@ -1,11 +1,12 @@
// http.js使用域名
// const baseUrl = 'http://192.168.31.57:8080/autoSR/api';// 本地
// const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站/
const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站/
// const baseUrl = 'http://192.168.31.92:8080/api';// sh
// const baseUrl = 'http://192.168.31.167:8080/autoSR/api'; // 长龙
// const baseUrl = 'http://192.168.31.134:8080/autoSR/api'; // 佳豪
// const baseUrl = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏
// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
const baseUrl = 'https://hfju.com/api'; // 数智正式
// const baseUrl = 'https://hfju.com/api'; // 数智正式


// config使用域名


Notiek ielāde…
Atcelt
Saglabāt