Commit 0bf826ff by 何炳良

修改反馈的相关页面,增加快捷回复

parent 77bd66f8
......@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.deviceFetch = exports.operatorFetch = exports.baseFetch = exports.customerFetch = exports.statisticsFetch = exports.systemFetch = void 0;
var constants_1 = require("../config/constants");
var app = getApp();
......@@ -37,43 +37,48 @@ var fetch = function (req) {
if (res.header['Set-Cookie'])
return {
header: res.header,
data: otherkeys,
data: otherkeys
};
return otherkeys;
}
else if (code === constants_1.logoutode) {
app.resetUserinfo();
wx.reLaunch({
url: '/pages/index/index',
url: '/pages/index/index'
});
throw {
errMsg: res.data.msg || '网络异常',
errMsg: res.data.msg || '网络异常'
};
}
else {
throw {
errMsg: res.data.msg || '网络异常',
errMsg: res.data.msg || '网络异常'
};
}
});
};
exports.systemFetch = function (req) {
var systemFetch = function (req) {
return fetch(__assign(__assign({}, req), { url: constants_1.masterUrl.SYSTEM_SERVER_URL + req.url }));
};
exports.statisticsFetch = function (req) {
exports.systemFetch = systemFetch;
var statisticsFetch = function (req) {
return fetch(__assign(__assign({}, req), { url: constants_1.masterUrl.STATISTICS_SERVER_URL + req.url }));
};
exports.customerFetch = function (req) {
exports.statisticsFetch = statisticsFetch;
var customerFetch = function (req) {
return fetch(__assign(__assign({}, req), { url: constants_1.masterUrl.CUSTOMER_SERVER_URL + req.url }));
};
exports.baseFetch = function (req) {
exports.customerFetch = customerFetch;
var baseFetch = function (req) {
return fetch(__assign(__assign({}, req), { url: constants_1.masterUrl.BASE_SERVER_URL + req.url }));
};
exports.operatorFetch = function (req) {
exports.baseFetch = baseFetch;
var operatorFetch = function (req) {
return fetch(__assign(__assign({}, req), { url: constants_1.masterUrl.OPERATOR_SERVER_URL + req.url }));
};
exports.deviceFetch = function (req) {
exports.operatorFetch = operatorFetch;
var deviceFetch = function (req) {
return fetch(__assign(__assign({}, req), { url: constants_1.masterUrl.D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gICA/IHtcclxuICAgICAgICAgICAgdG9rZW4sXHJcbiAgICAgICAgICAgIC4uLnJlcS5oZWFkZXIsXHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgOiByZXEuaGVhZGVyLFxyXG5cclxuICAgICAgc3VjY2VzczogcmVzb2x2ZSxcclxuICAgICAgZmFpbDogcmVqZWN0LFxyXG4gICAgfSk7XHJcbiAgfSkudGhlbigocmVzOiB3eC5SZXF1ZXN0U3VjY2Vzc0NhbGxiYWNrUmVzdWx0KSA9PiB7XHJcbiAgICBjb25zdCB7IGNvZGUsIC4uLm90aGVya2V5cyB9ID0gcmVzLmRhdGE7XHJcbiAgICBpZiAoY29kZSA9PT0gc3VjY2Vzc0NvZGUpIHtcclxuICAgICAgY29uc29sZS5sb2cocmVzKTtcclxuICAgICAgaWYgKHJlcy5oZWFkZXJbJ1NldC1Db29raWUnXSlcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgaGVhZGVyOiByZXMuaGVhZGVyLFxyXG4gICAgICAgICAgZGF0YTogb3RoZXJrZXlzLFxyXG4gICAgICAgIH07XHJcbiAgICAgIHJldHVybiBvdGhlcmtleXM7XHJcbiAgICB9IGVsc2UgaWYgKGNvZGUgPT09IGxvZ291dG9kZSkge1xyXG4gICAgICBhcHAucmVzZXRVc2VyaW5mbygpO1xyXG4gICAgICB3eC5yZUxhdW5jaCh7XHJcbiAgICAgICAgdXJsOiAnL3BhZ2VzL2luZGV4L2luZGV4JyxcclxuICAgICAgfSk7XHJcbiAgICAgIHRocm93IHtcclxuICAgICAgICBlcnJNc2c6IHJlcy5kYXRhLm1zZyB8fCAn572R57uc5byC5bi4JyxcclxuICAgICAgfTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIHRocm93IHtcclxuICAgICAgICBlcnJNc2c6IHJlcy5kYXRhLm1zZyB8fCAn572R57uc5byC5bi4JyxcclxuICAgICAgfTtcclxuICAgIH1cclxuICB9KTtcclxuXHJcbmV4cG9ydCBjb25zdCBz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ports["default"] = fetch;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var initUserinfo = function () { return ({
cellphone: '',
comment: '',
......@@ -14,7 +14,7 @@ var initUserinfo = function () { return ({
operateId: 0,
operateName: '',
state: '',
updateAt: '',
updateAt: ''
}); };
App({
onLaunch: function () {
......@@ -30,7 +30,7 @@ App({
globalData: {
userInfo: initUserinfo(),
token: '',
userRoles: [],
userRoles: []
},
getToken: function () {
return this.globalData.token;
......@@ -43,6 +43,5 @@ App({
wx.setStorageSync('token', '');
}
catch (error) { }
},
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBYUEsSUFBTSxZQUFZLEdBQUcsY0FBTSxPQUFBLENBQUM7SUFDMUIsU0FBUyxFQUFFLEVBQUU7SUFDYixPQUFPLEVBQUUsRUFBRTtJQUNYLFFBQVEsRUFBRSxFQUFFO0lBQ1osRUFBRSxFQUFFLENBQUM7SUFDTCxhQUFhLEVBQUUsQ0FBQztJQUNoQixhQUFhLEVBQUUsQ0FBQztJQUNoQixhQUFhLEVBQUUsRUFBRTtJQUNqQixZQUFZLEVBQUUsRUFBRTtJQUNoQixVQUFVLEVBQUUsQ0FBQztJQUNiLElBQUksRUFBRSxFQUFFO0lBQ1IsU0FBUyxFQUFFLENBQUM7SUFDWixXQUFXLEVBQUUsRUFBRTtJQUNmLEtBQUssRUFBRSxFQUFFO0lBQ1QsUUFBUSxFQUFFLEVBQUU7Q0FDYixDQUFDLEVBZnlCLENBZXpCLENBQUM7QUFDSCxHQUFHLENBQVM7SUFDVixRQUFRO1FBQ04sT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUMzQixJQUFJO1lBQ0YsSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFDL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JcbiAgICB0aGlzLmdsb2JhbERhdGEudXNlckluZm8gPSBpbml0VXNlcmluZm8oKTtcclxuICAgIHRoaXMuZ2xvYmFsRGF0YS51c2VyUm9sZXMgPSBbXTtcclxuICAgIHRyeSB7XHJcbiAgICAgIHd4LnNldFN0b3JhZ2VTeW5jKCd0b2tlbicsICcnKTtcclxuICAgIH0gY2F0Y2ggKGVycm9yKSB7fVxyXG4gIH0sXHJcbn0pO1xyXG4iXX0=
\ No newline at end of file
var subData = function(str){
if(str){
return str.substring(0,16)
}else{
return ''
}
}
module.exports={
subStr:subData
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
exports.logoutode = exports.successCode = exports.masterUrl = exports.testUrl = exports.devUrl = void 0;
exports.devUrl = {
SYSTEM_SERVER_URL: 'https://ex-dev-dcxy-system-manage.168cad.top',
......@@ -7,7 +7,7 @@ exports.devUrl = {
CUSTOMER_SERVER_URL: 'https://ex-dev-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-dev-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://dev-op-man-serv.168cad.top',
DEVICE_SERVEL_URL: 'https://in-dev-device-management-api.168cad.top',
DEVICE_SERVEL_URL: 'https://in-dev-device-management-api.168cad.top'
};
exports.testUrl = {
SYSTEM_SERVER_URL: 'https://ex-test-dcxy-system-manage.168cad.top',
......@@ -15,7 +15,7 @@ exports.testUrl = {
CUSTOMER_SERVER_URL: 'https://ex-test-customer-manage.168cad.top',
BASE_SERVER_URL: 'https://ex-test-dcxy-base-manage.168cad.top',
OPERATOR_SERVER_URL: 'https://test-op-man-serv.168cad.top',
DEVICE_SERVEL_URL: 'https://in-test-device-management-api.168cad.top',
DEVICE_SERVEL_URL: 'https://in-test-device-management-api.168cad.top'
};
exports.masterUrl = {
SYSTEM_SERVER_URL: 'https://dcxy-system-manage.dcrym.com',
......@@ -23,8 +23,7 @@ exports.masterUrl = {
CUSTOMER_SERVER_URL: 'https://dcxy-customer-manage.dcrym.com',
BASE_SERVER_URL: 'https://dcxy-base-manage.dcrym.com',
OPERATOR_SERVER_URL: 'https://op-man-serv.dcrym.com',
DEVICE_SERVEL_URL: 'https://device-management-api.dcrym.com',
DEVICE_SERVEL_URL: 'https://device-management-api.dcrym.com'
};
exports.successCode = 1000;
exports.logoutode = -2;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFhLFFBQUEsTUFBTSxHQUFHO0lBQ3BCLGlCQUFpQixFQUFFLDhDQUE4QztJQUNqRSxxQkFBcUIsRUFBRSxrREFBa0Q7SUFDekUsbUJBQW1CLEVBQUUsMkNBQTJDO0lBQ2hFLGVBQWUsRUFBRSw0Q0FBNEM7SUFDN0QsbUJBQW1CLEVBQUUsb0NBQW9DO0lBQ3pELGlCQUFpQixFQUFFLGlEQUFpRDtDQUNyRSxDQUFDO0FBQ1csUUFBQSxPQUFPLEdBQUc7SUFDckIsaUJBQWlCLEVBQUUsK0NBQStDO0lBQ2xFLHFCQUFxQixFQUFFLG1EQUFtRDtJQUMxRSxtQkFBbUIsRUFBRSw0Q0FBNEM7SUFDakUsZUFBZSxFQUFFLDZDQUE2QztJQUM5RCxtQkFBbUIsRUFBRSxxQ0FBcUM7SUFDMUQsaUJBQWlCLEVBQUUsa0RBQWtEO0NBQ3RFLENBQUM7QUFDVyxRQUFBLFNBQVMsR0FBRztJQUN2QixpQkFBaUIsRUFBRSxzQ0FBc0M7SUFDekQscUJBQXFCLEVBQUUsMENBQTBDO0lBQ2pFLG1CQUFtQixFQUFFLHdDQUF3QztJQUM3RCxlQUFlLEVBQUUsb0NBQW9DO0lBQ3JELG1CQUFtQixFQUFFLCtCQUErQjtJQUNwRCxpQkFBaUIsRUFBRSx5Q0FBeUM7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lci1tYW5hZ2UuMTY4Y2FkLnRvcCcsXHJcbiAgQkFTRV9TRVJWRVJfVVJMOiAnaHR0cHM6Ly9leC10ZXN0LWRjeHktYmFzZS1tYW5hZ2UuMTY4Y2FkLnRvcCcsXHJcbiAgT1BFUkFUT1JfU0VSVkVSX1VSTDogJ2h0dHBzOi8vdGVzdC1vcC1tYW4tc2Vydi4xNjhjYWQudG9wJyxcclxuICBERVZJQ0VfU0VSVkVMX1VSTDogJ2h0dHBzOi8vaW4tdGVzdC1kZXZpY2UtbWFuYWdlbWVudC1hcGkuMTY4Y2FkLnRvcCcsXHJcbn07XHJcbmV4cG9ydCBjb25zdCBtYXN0ZXJVcmwgPSB7XHJcbiAgU1lTVEVNX1NFUlZFUl9VUkw6ICdodHRwczovL2RjeHktc3lzdGVtLW1hbmFnZS5kY3J5bS5jb20nLFxyXG4gIFNUQVRJU1RJQ1NfU0VSVkVSX1VSTDogJ2h0dHBzOi8vZGN4eS1zdGF0aXN0aWNzLW1hbmFnZS5kY3J5bS5jb20nLFxyXG4gIENVU1RPTUVSX1NFUlZFUl9VUkw6ICdodHRwczovL2RjeHktY3VzdG9tZXItbWFuYWdlLmRjcnltLmNvbScsXHJcbiAgQkFTRV9TRVJWRVJfVVJMOiAnaHR0cHM6Ly9kY3h5LWJhc2UtbWFuYWdlLmRjcnltLmNvbScsXHJcbiAgT1BFUkFUT1JfU0VSVkVSX1VSTDogJ2h0dHBzOi8vb3AtbWFuLXNlcnYuZGNyeW0uY29tJyxcclxuICBERVZJQ0VfU0VSVkVMX1VSTDogJ2h0dHBzOi8vZGV2aWNlLW1hbmFnZW1lbnQtYXBpLmRjcnltLmNvbScsXHJcbn07XHJcblxyXG5leHBvcnQgY29uc3Qgc3VjY2Vzc0NvZGUgPSAxMDAwO1xyXG5leHBvcnQgY29uc3QgbG9nb3V0b2RlID0gLTI7XHJcbiJdfQ==
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var fetch_1 = require("../../../api/fetch");
// pages/components/FeedbackItem/FeedbackItem.ts
Component({
/**
* 组件的属性列表
*/
properties: {
feedbackData: {
type: Object,
......@@ -14,13 +18,19 @@ Component({
customerSex: '',
feedbackContent: '',
id: 0,
state: '',
},
},
state: ''
}
}
},
/**
* 组件的初始数据
*/
data: {
inputValue: '',
inputValue: ''
},
/**
* 组件的方法列表
*/
methods: {
makePhoneCallHandle: function () {
console.log('in makePhoneCallHandle');
......@@ -31,48 +41,47 @@ Component({
},
fail: function () {
console.log('fail');
},
}
});
},
inputHandle: function (e) {
var val = e.detail.value;
this.setData({
inputValue: val,
inputValue: val
});
},
sendFeedback: function () {
var _this = this;
var val = this.data.inputValue;
fetch_1.customerFetch({
(0, fetch_1.customerFetch)({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: this.data.feedbackData.id,
replayContent: val,
state: '3',
},
state: '3'
}
})
.then(function (res) {
wx.showToast({
title: res.msg,
title: res.msg
});
_this.setData({
inputValue: '',
inputValue: ''
});
_this.triggerEvent('refresh', {});
})
.catch(function (err) {
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none',
icon: 'none'
});
});
},
goDetailPage: function () {
console.log(this.data.feedbackData);
wx.navigateTo({
url: "/pages/feedbackDetail/feedbackDetail?customerName=" + this.data.feedbackData.customerName + "&customerPhone=" + this.data.feedbackData.customerPhone + "&id=" + this.data.feedbackData.id,
url: "/pages/feedbackDetail/feedbackDetail?customerName=".concat(this.data.feedbackData.customerName, "&customerPhone=").concat(this.data.feedbackData.customerPhone, "&id=").concat(this.data.feedbackData.id, "&areaId=").concat(this.data.feedbackData.areaId)
});
},
},
}
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmVlZGJhY2tJdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiRmVlZGJhY2tJdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQW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aW4gbWFrZVBob25lQ2FsbEhhbmRsZScpO1xyXG4gICAgICB3eC5tYWtlUGhvbmVDYWxsKHtcclxuICAgICAgICBwaG9uZU51bWJlcjogdGhpcy5kYXRhLmZlZWRiYWNrRGF0YS5jdXN0b21lclBob25lLFxyXG4gICAgICAgIHN1Y2Nlc3M6ICgpID0+IHtcclxuICAgICAgICAgIGNvbnNvbGUubG9nKCdzdWNjZXNzJyk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBmYWlsOiAoKSA9PiB7XHJcbiAgICAgICAgICBjb25zb2xlLmxvZygnZmFpbCcpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgIH0pO1xyXG4gICAgfSxcclxuICAgIGlucHV0SGFuZGxlKGUpIHtcclxuICAgICAgY29uc3QgdmFsID0gZS5kZXRhaWwudmFsdWU7XHJcbiAgICAgIHRoaXMuc2V0RGF0YSh7XHJcbiAgICAgICAgaW5wdXRWYWx1ZTogdmFsLFxyXG4gICAgICB9KTtcclxuICAgIH0sXHJcblxyXG4gICAgc2VuZEZlZWRiYWNrKCkge1xyXG4gICAgICBjb25zdCB2YWwgPSB0aGlzLmRhdGEuaW5wdXRWYWx1ZTtcclxuXHJcbiAgICAgIGN1c3RvbWVyRmV0Y2goe1xyXG4gICAgICAgIHVybDogJy9mZWVkYmFjay9mZWVkYmFjaycsXHJcbiAgICAgICAgbWV0aG9kOiAnUFVUJyxcclxuICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICBpZDogdGhpcy5kYXRhLmZlZWRiYWNrRGF0YS5pZCxcclxuICAgICAgICAgIHJlcGxheUNvbnRlbnQ6IHZhbCxcclxuICAgICAgICAgIHN0YXRlOiAnMycsXHJcbiAgICAgICAgfSxcclxuICAgICAgfSlcclxuICAgICAgICAudGhlbihyZXMgPT4ge1xyXG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcclxuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2csXHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICAgIHRoaXMuc2V0RGF0YSh7XHJcbiAgICAgICAgICAgIGlucHV0VmFsdWU6ICcnLFxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudCgncmVmcmVzaCcsIHt9KTtcclxuICAgICAgICB9KVxyXG4gICAgICAgIC5jYXRjaCgoZXJyOiB3eC5HZW5lcmFsQ2FsbGJhY2tSZXN1bHQpID0+IHtcclxuICAgICAgICAgIHd4LnNob3dUb2FzdCh7XHJcbiAgICAgICAgICAgIHRpdGxlOiBlcnIuZXJyTXNnLFxyXG4gICAgICAgICAgICBpY29uOiAnbm9uZScsXHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH0sXHJcbiAgICBnb0RldGFpbFBhZ2UoKSB7XHJcbiAgICAgIHd4Lm5hdmlnYXRlVG8oe1xyXG4gICAgICAgIHVybDogYC9wYWdlcy9mZWVkYmFja0RldGFpbC9mZWVkYmFja0RldGFpbD9jdXN0b21lck5hbWU9JHt0aGlzLmRhdGEuZmVlZGJhY2tEYXRhLmN1c3RvbWVyTmFtZX0mY3VzdG9tZXJQaG9uZT0ke3RoaXMuZGF0YS5mZWVkYmFja0RhdGEuY3VzdG9tZXJQaG9uZX0maWQ9JHt0aGlzLmRhdGEuZmVlZGJhY2tEYXRhLmlkfWAsXHJcbiAgICAgIH0pO1xyXG4gICAgfSxcclxuICB9LFxyXG59KTtcclxuIl19
\ No newline at end of file
......@@ -82,7 +82,7 @@ Component({
},
goDetailPage() {
wx.navigateTo({
url: `/pages/feedbackDetail/feedbackDetail?customerName=${this.data.feedbackData.customerName}&customerPhone=${this.data.feedbackData.customerPhone}&id=${this.data.feedbackData.id}`,
url: `/pages/feedbackDetail/feedbackDetail?customerName=${this.data.feedbackData.customerName}&customerPhone=${this.data.feedbackData.customerPhone}&id=${this.data.feedbackData.id}&areaId=${this.data.feedbackData.areaId}`,
});
},
},
......
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var fetch_1 = require("../../../api/fetch");
// pages/components/feedbackDetailItem/feedbackDetailItem.js
Component({
/**
* 组件的属性列表
*/
properties: {
itemData: { type: Object, value: {} },
shortcuts: { type: Array, value: [] }
},
/**
* 组件的初始数据
*/
data: {
inputValue: '',
autoHeight: true,
r1: true,
cb: false,
index: -1,
isHidden: true
},
/**
* 组件的方法列表
*/
methods: {
inputHandle: function (e) {
var val = e.detail.value;
this.setData({
inputValue: val,
inputValue: val
});
},
setContent: function (e) {
var content = e.currentTarget.dataset.content;
this.setData({
inputValue: content,
isHidden: true
});
},
del: function (e) {
var _this = this;
var id = e.currentTarget.dataset.id;
wx.showModal({
title: '删除提示',
content: '您确定要删除该快捷回复吗?',
success: function (res) {
if (res.confirm) {
(0, fetch_1.customerFetch)({
url: "/feedback/shortcuts/".concat(id),
method: 'DELETE'
})
.then(function (res) {
wx.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
_this.triggerEvent("getShortCuts");
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none'
});
});
}
}
});
},
showModal: function () {
this.setData({
isHidden: false
});
},
setV1: function (e) {
this.setData({
cb: e.detail.value
});
},
subData: function (str) {
console.log(str, str.substring(0, 20));
return str.substring(0, 20);
},
cancel: function () {
this.setData({
isHidden: true
});
},
setV: function (e) {
console.log(e);
this.setData({
r1: JSON.parse(e.detail.value)
});
},
sendFeedback: function (e) {
......@@ -22,31 +99,72 @@ Component({
if (val.trim() == "")
val = "您的反馈客服已处理,谢谢!";
console.log(val, id);
fetch_1.customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
state: '3',
},
})
.then(function (res) {
wx.showToast({
title: res.msg,
});
_this.setData({
inputValue: '',
if (this.data.cb && this.properties.shortcuts.length >= 5) {
wx.showModal({
title: '添加提示',
content: '当前默认回复列表已经5条,若加入此条回复,将造成最早一条默认回复被删除,确定继续吗?',
success: function (res) {
if (res.confirm) {
(0, fetch_1.customerFetch)({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
isAddShortcut: _this.data.cb ? 1 : 0,
replayContent: val,
state: _this.data.r1 ? '3' : '2'
}
})
.then(function (res) {
wx.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
_this.setData({
inputValue: ''
});
// this.triggerEvent('refresh', {});
wx.navigateBack();
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none'
});
});
}
}
});
_this.triggerEvent('refresh', {});
})
.catch(function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none',
}
else {
(0, fetch_1.customerFetch)({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
isAddShortcut: this.data.cb ? 1 : 0,
state: this.data.r1 ? '3' : '2'
}
})
.then(function (res) {
wx.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
_this.setData({
inputValue: ''
});
// this.triggerEvent('refresh', {});
wx.navigateBack();
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none'
});
});
});
},
},
}
}
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2tEZXRhaWxJdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZmVlZGJhY2tEZXRhaWxJdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBQW1EO0FBR25ELFNBQVMsQ0FBQztJQUlSLFVBQVUsRUFBRTtRQUNWLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtLQUN0QztJQUtELElBQUksRUFBRTtRQUNKLFVBQVUsRUFBRSxFQUFFO0tBQ2Y7SUFLRCxPQUFPLEVBQUU7UUFDUCxXQUFXLEVBQVgsVUFBWSxDQUFDO1lBQ1gsSUFBTSxHQUFHLEdBQUcsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7WUFDM0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cIlwiKXZhbD1cIuaCqOeahOWPjemmiOWuouacjeW3suWkhOeQhu+8jOiwouiwou+8gVwiXHJcbiAgICAgIGNvbnNvbGUubG9nKHZhbCwgaWQpO1xyXG5cclxuICAgICAgY3VzdG9tZXJGZXRjaCh7XHJcbiAgICAgICAgdXJsOiAnL2ZlZWRiYWNrL2ZlZWRiYWNrJyxcclxuICAgICAgICBtZXRob2Q6ICdQVVQnLFxyXG4gICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgIGlkOiBpZCxcclxuICAgICAgICAgIHJlcGxheUNvbnRlbnQ6IHZhbCxcclxuICAgICAgICAgIHN0YXRlOiAnMycsXHJcbiAgICAgICAgfSxcclxuICAgICAgfSlcclxuICAgICAgICAudGhlbihyZXMgPT4ge1xyXG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcclxuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2csXHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICAgIHRoaXMuc2V0RGF0YSEoe1xyXG4gICAgICAgICAgICBpbnB1dFZhbHVlOiAnJyxcclxuICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoJ3JlZnJlc2gnLCB7fSk7XHJcbiAgICAgICAgfSlcclxuICAgICAgICAuY2F0Y2goKGVycjogd3guR2VuZXJhbENhbGxiYWNrUmVzdWx0KSA9PiB7XHJcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xyXG4gICAgICAgICAgICB0aXRsZTogZXJyLmVyck1zZyxcclxuICAgICAgICAgICAgaWNvbjogJ25vbmUnLFxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9LFxyXG4gIH0sXHJcbn0pO1xyXG4iXX0=
\ No newline at end of file
......@@ -8,55 +8,17 @@ Component({
properties: {
itemData: { type: Object, value: {} },
},
/**
* 组件的初始数据
*/
data: {
inputValue: '',
autoHeight: true,
},
/**
* 组件的方法列表
*/
methods: {
inputHandle(e) {
const val = e.detail.value;
this.setData!({
inputValue: val,
});
},
sendFeedback(e) {
const { id } = e.currentTarget.dataset;
let val = this.data.inputValue;
if(val.trim()=="")val="您的反馈客服已处理,谢谢!"
console.log(val, id);
customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
state: '3',
},
})
.then(res => {
wx.showToast({
title: res.msg,
});
this.setData!({
inputValue: '',
});
this.triggerEvent('refresh', {});
})
.catch((err: wx.GeneralCallbackResult) => {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
},
},
});
<!-- pages/components/feedbackDetailItem/feedbackDetailItem.wxml -->
<view class="feedbackDetail-item">
<view class="feedbackDetail-itemTitle">{{itemData.feedbackContent}}</view>
<view class="feedbackDetail-itemTime">{{itemData.createAt}}</view>
<view class="feedbackDetail-itemBox">
<view class="row_bet1">
<image style="width: 50px; height: 50px;" mode="scaleToFill" src="../../../images/user.png"></image>
<view style="margin-left:20rpx">
<view class="feedbackDetail-itemTitle">{{itemData.feedbackContent}}</view>
<view class="feedbackDetail-itemTime">{{itemData.createAt}}</view>
</view>
</view>
<!-- <view class="feedbackDetail-itemBox">
<input class="feedbackDetail-itemInput" type="text" placeholder="您的反馈客服已处理,谢谢!" value="{{inputValue}}" bindinput="inputHandle" />
<button class="feedbackDetail-itemBtn" bind:tap="sendFeedback" data-id="{{itemData.id}}">发送</button>
</view>
</view> -->
<!-- <view class="row_bet undeline">
<image style="width: 20px; height: 20px;" bindtap="showModal" mode="scaleToFill" src="../../../images/kuaijiehuifu.png"></image>
<modal title="快捷回复列表" hidden="{{isHidden}}" bindconfirm="cancel" bindcancel="cancel">
<view wx:for="{{shortcuts}}" class="ele" data-content="{{item.replyContent}}" catchtap="setContent">
<text>{{item.replyContent.length>16?tools.subStr(item.replyContent)+"...":item.replyContent}}</text>
<icon class="icon-small" data-id="{{item.id}}" catchtap="del" type="cancel" size="23"></icon>
</view>
</modal>
<view>
<checkbox-group bindchange="setV1">
<checkbox value="{{true}}" checked="{{false}}" color="#6A92FF"/>加入快捷回复
</checkbox-group>
</view>
<radio-group bindchange="setV">
<radio value="{{true}}" checked="{{true}}" color="#6A92FF"/>已处理
<radio value="{{false}}" checked="{{false}}" color="#6A92FF"/>进行中
</radio-group>
</view> -->
<view wx:for="{{itemData.replayList}}" class="right">
<view class="row_bet">
<view class="fuck1">{{item.replayContent}}</view>
<image style="width: 50px; height: 50px;" mode="scaleToFill" src="../../../images/customer.png"></image>
</view>
<view class="feedbackDetail-itemTime" style="margin-right: 70px;">{{itemData.createAt}}</view>
</view>
</view>
\ No newline at end of file
/* pages/components/feedbackDetailItem/feedbackDetailItem.wxss */
.feedbackDetail-item {
border-bottom: 8rpx solid #efefef;
padding: 40rpx;
/* border-bottom: 8rpx solid #efefef; */
padding: 10rpx 20rpx;
}
.feedbackDetail-itemTitle {
font-size: 32rpx;
color: #333;
margin-bottom: 24rpx;
margin-bottom: 6rpx;
}
.feedbackDetail-itemTime {
font-size: 24rpx;
......@@ -22,6 +22,34 @@
border-radius: 20rpx;
background-color: #f0f3fd;
}
.row_bet{
margin-top: 20px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.row_bet1{
margin-top: 20px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.fuck1{
max-width: 526rpx;
border-radius: 20rpx;
padding: 20rpx;
margin-right: 20px;
background-color: #f0f3fd;
}
.right{
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-around;
}
.feedbackDetail-itemBtn {
font-size: 32rpx;
border-radius: 20rpx;
......
......@@ -10,19 +10,43 @@ var __assign = (this && this.__assign) || function () {
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var fetch_1 = require("../../api/fetch");
// miniprogram/pages/equipmentReport/equipmentReport.js
Page({
/**
* 页面的初始数据
*/
data: {
areaId: null,
areaName: '',
type: 0,
timeType: 0,
totalAmount: [],
menuCode: false,
menuCode1: false,
menuCode2: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var _this = this;
console.log(options);
var app = getApp();
console.log(app.globalData.userRoles);
var roles1 = app.globalData.userRoles;
var roles = [];
this.handleArr(roles1, roles);
var menuCode = roles.filter(function (item) { return item.menuCode == "91060001"; }).length > 0;
var menuCode1 = roles.filter(function (item) { return item.menuCode == "91060002"; }).length > 0;
var menuCode2 = roles.filter(function (item) { return item.menuCode == "91060003"; }).length > 0;
this.setData({
menuCode: menuCode,
menuCode1: menuCode1,
menuCode2: menuCode2,
type: menuCode ? 0 : (menuCode1 ? 1 : 2)
});
var areaId = options.areaId, areaName = options.areaName;
var eventChannel = this.getOpenerEventChannel();
eventChannel.on('acceptDataFromOpenerPage', function (res) {
......@@ -36,22 +60,38 @@ Page({
? 4
: item.key === '洗浴'
? 5
: item.key })); }),
: item.key })); })
});
});
this.setData({
areaId: areaId,
areaName: areaName,
areaName: areaName
});
// this.fetchWarningLevel();
},
handleArr: function (param, arr) {
if (param.length) {
for (var i = 0; i < param.length; i++) {
arr.push(param[i]);
if (param[i].childs && param[i].childs.length > 0) {
this.handleArr(param[i].childs, arr);
}
}
}
else {
arr.push(param);
if (param.childs && param.childs.length > 0) {
this.handleArr(param.childs, arr);
}
}
},
fetchWarningLevel: function () {
fetch_1.deviceFetch({
url: '/device/warning/dict/warningLevel',
(0, fetch_1.deviceFetch)({
url: '/device/warning/dict/warningLevel'
})
.then(function (res) {
console.log(res);
})
.catch(function (err) {
})["catch"](function (err) {
console.log(err);
});
},
......@@ -61,7 +101,7 @@ Page({
if (type === this.data.type)
return;
this.setData({
type: type,
type: type
});
return false;
},
......@@ -71,25 +111,23 @@ Page({
if (timeType === this.data.timeType)
return;
this.setData({
timeType: timeType,
timeType: timeType
});
return false;
},
fetchData: function () {
fetch_1.statisticsFetch({
(0, fetch_1.statisticsFetch)({
url: '/boss/device/operation/data/summary',
method: 'POST',
data: {
areaId: this.data.areaId,
timeType: this.data.timeType,
},
timeType: this.data.timeType
}
})
.then(function (res) {
console.log(res);
})
.catch(function (err) {
})["catch"](function (err) {
console.log(err);
});
},
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXF1aXBtZW50UmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXF1aXBtZW50UmVwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7QUFBQSx5Q0FBK0Q7QUFHL0QsSUFBSSxDQUFDO0lBSUgsSUFBSSxFQUFFO1FBQ0osTUFBTSxFQUFFLElBQUk7UUFDWixRQUFRLEVBQUUsRUFBRTtRQUNaLElBQUksRUFBRSxDQUFDO1FBQ1AsUUFBUSxFQUFFLENBQUM7UUFDWCxXQUFXLEVBQUUsRUFBRTtLQUNoQjtJQUtELE1BQU0sRUFBRSxVQUFTLE9BQU87UUFBaEIsaUJBMkJQO1FBMUJDLE9BQU8sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDYixJQUFBLE1BQU0sR0FBZSxPQUFPLE9BQXRCLEVBQUUsUUFBUSxHQUFLLE9BQU8sU0FBWixDQUFhO1FBQ3JDLElBQU0sWUFBWSxHQUFHLElBQUksQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO1FBQ2xELFlBQVksQ0FBQyxFQUFFLENBQUMsMEJBQTBCLEVBQUUsVUFBQSxHQUFHO1lBQzdDLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDakIsS0FBSSxDQUFDLE9BQVEsQ0FBQztnQkFDWixXQUFXLEVBQUUsR0FBRyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLFVBQUEsSUFBSSxJQUFJLE9BQUEsdUJBQ3pDLElBQUksS0FDUCxJQUFJLEVBQ0YsSUFBSSxDQUFDLEdBQUcsS0FBSyxJQUFJO3dCQUNmLENBQUMsQ0FBQyxDQUFDO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ZXQ7XHJcbiAgICBjb25zb2xlLmxvZyh0aW1lVHlwZSk7XHJcbiAgICBpZiAodGltZVR5cGUgPT09IHRoaXMuZGF0YS50aW1lVHlwZSkgcmV0dXJuO1xyXG4gICAgdGhpcy5zZXREYXRhISh7XHJcbiAgICAgIHRpbWVUeXBlLFxyXG4gICAgfSk7XHJcbiAgICByZXR1cm4gZmFsc2U7XHJcbiAgfSxcclxuICBmZXRjaERhdGEoKSB7XHJcbiAgICBzdGF0aXN0aWNzRmV0Y2goe1xyXG4gICAgICB1cmw6ICcvYm9zcy9kZXZpY2Uvb3BlcmF0aW9uL2RhdGEvc3VtbWFyeScsXHJcbiAgICAgIG1ldGhvZDogJ1BPU1QnLFxyXG4gICAgICBkYXRhOiB7XHJcbiAgICAgICAgYXJlYUlkOiB0aGlzLmRhdGEuYXJlYUlkLFxyXG4gICAgICAgIHRpbWVUeXBlOiB0aGlzLmRhdGEudGltZVR5cGUsXHJcbiAgICAgIH0sXHJcbiAgICB9KVxyXG4gICAgICAudGhlbihyZXMgPT4ge1xyXG4gICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XHJcbiAgICAgIH0pXHJcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xyXG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XHJcbiAgICAgIH0pO1xyXG4gIH0sXHJcbn0pO1xyXG4iXX0=
\ No newline at end of file
......@@ -11,6 +11,9 @@ Page({
type: 0,
timeType: 0,
totalAmount: [],
menuCode:false,
menuCode1:false,
menuCode2:false,
},
/**
......@@ -18,6 +21,20 @@ Page({
*/
onLoad: function(options) {
console.log(options);
let app = getApp();
console.log(app.globalData.userRoles);
let roles1 = app.globalData.userRoles;
let roles = [];
this.handleArr(roles1,roles);
let menuCode = roles.filter(item=>item.menuCode=="91060001").length>0;
let menuCode1 = roles.filter(item=>item.menuCode=="91060002").length>0;
let menuCode2 = roles.filter(item=>item.menuCode=="91060003").length>0;
this.setData({
menuCode,
menuCode1,
menuCode2,
type:menuCode?0:(menuCode1?1:2)
});
const { areaId, areaName } = options;
const eventChannel = this.getOpenerEventChannel();
eventChannel.on('acceptDataFromOpenerPage', res => {
......@@ -44,6 +61,21 @@ Page({
});
// this.fetchWarningLevel();
},
handleArr(param,arr){
if(param.length){
for(let i = 0;i<param.length;i++){
arr.push(param[i]);
if(param[i].childs&&param[i].childs.length>0){
this.handleArr(param[i].childs,arr);
}
}
}else{
arr.push(param);
if(param.childs&&param.childs.length>0){
this.handleArr(param.childs,arr);
}
}
},
fetchWarningLevel() {
deviceFetch({
url: '/device/warning/dict/warningLevel',
......
......@@ -2,15 +2,16 @@
<view class="equipmentReport">
<view class="equipmentReport-title">{{areaName}}</view>
<view class="home-title-type">
<view class="title-type-item" data-type="{{0}}" bindtap="changeType">
<view class="title-type-item" data-type="{{0}}" bindtap="changeType"
wx:if="{{menuCode}}">
<view class="radio-box {{type === 0?'checked':''}}"></view>
运营明细
</view>
<view class="title-type-item" data-type="{{1}}" bindtap="changeType">
<view class="title-type-item" data-type="{{1}}" bindtap="changeType" wx:if="{{menuCode1}}">
<view class="radio-box {{type === 1?'checked':''}}"></view>
设备状态
</view>
<view class="title-type-item" data-type="{{2}}" bindtap="changeType">
<view class="title-type-item" data-type="{{2}}" bindtap="changeType" wx:if="{{menuCode2}}">
<view class="radio-box {{type === 2?'checked':''}}"></view>
设备告警
</view>
......
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var fetch_1 = require("../../api/fetch");
// miniprogram/pages/feedback/feedback.js
Page({
onLoad: function () {
this.initData();
this.fetchAreaList();
},
/**
* 页面的初始数据
*/
data: {
tabIndex: 1,
areaId: '',
......@@ -20,12 +26,15 @@ Page({
list2: [],
areaList: [],
list: [],
pageNum: [null, 0, 0],
pageNum: [null, 0, 0]
},
initData: function () {
this.fetchList(1);
this.fetchList(2);
},
onShow: function () {
this.initData();
},
toggleList: function (e) {
var _this = this;
var tabindex = e.currentTarget.dataset.tabindex;
......@@ -40,14 +49,14 @@ Page({
if (!state)
state = this.data.tabIndex;
wx.showLoading({ title: '' });
fetch_1.statisticsFetch({
(0, fetch_1.statisticsFetch)({
url: '/dcxy/reportInfo/queryFeedbackListV2',
data: this.data.areaId
? {
state: state,
areaId: this.data.areaId,
areaId: this.data.areaId
}
: { state: state },
: { state: state }
})
.then(function (res) {
var _a;
......@@ -56,19 +65,18 @@ Page({
var viewList = list.slice(0, 10);
if (state === _this.data.tabIndex) {
_this.setData({
list: viewList,
list: viewList
});
}
_this.setData((_a = {},
_a['list' + state] = list,
_a["pageNum[" + state + "]"] = 0,
_a["pageNum[".concat(state, "]")] = 0,
_a));
})
.catch(function (err) {
})["catch"](function (err) {
console.log(err);
wx.showToast({
title: err.errMsg,
icon: 'none',
icon: 'none'
});
});
},
......@@ -77,7 +85,7 @@ Page({
console.log(e);
var value = e.detail.value;
this.setData({
areaId: value,
areaId: value
}, function () {
_this.initData();
});
......@@ -87,22 +95,21 @@ Page({
},
fetchAreaList: function () {
var _this = this;
fetch_1.baseFetch({
url: '/dcxy/baseArea/queryAll',
(0, fetch_1.baseFetch)({
url: '/dcxy/baseArea/queryAll'
})
.then(function (res) {
if (res.data) {
_this.setData({
areaList: res.data,
areaList: res.data
});
}
else {
_this.setData({
areaList: [],
areaList: []
});
}
})
.catch(function (err) {
})["catch"](function (err) {
console.log(err);
});
},
......@@ -115,15 +122,14 @@ Page({
if (index >= max) {
wx.showToast({
title: '没有更多数据',
icon: 'none',
icon: 'none'
});
}
else {
this.setData((_a = {},
_a["pageNum[" + state + "]"] = index,
_a.list = __spreadArrays(this.data.list, this.data['list' + state].slice(index * 10, (index + 1) * 10)),
_a["pageNum[".concat(state, "]")] = index,
_a.list = __spreadArray(__spreadArray([], this.data.list, true), this.data['list' + state].slice(index * 10, (index + 1) * 10), true),
_a));
}
},
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZWVkYmFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQSx5Q0FBNkQ7QUFHN0QsSUFBSSxDQUFDO0lBQ0gsTUFBTTtRQUNKLElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQztRQUNoQixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7SUFDdkIsQ0FBQztJQUlELElBQUksRUFBRTtRQUNKLFFBQVEsRUFBRSxDQUFDO1FBQ1gsTUFBTSxFQUFFLEVBQUU7UUFDVixLQUFLLEVBQUUsRUFBRTtRQUNULEtBQUssRUFBRSxFQUFFO1FBQ1QsUUFBUSxFQUFFLEVBQUU7UUFDWixJQUFJLEVBQUUsRUFBRTtRQUNSLE9BQU8sRUFBRSxDQUFDLElBQUksRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0tBQ3RCO0lBQ0QsUUFBUTtRQUNOLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDbEIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNwQixDQUFDO0lBQ0QsVUFBVSxFQUFWLFVBQVcsQ0FBQztRQUFaLGlCQU9DO1FBTlMsSUFBQSxRQUFRLEdBQUssQ0FBQyxDQUFDLGFBQWEsQ0FBQyxPQUFPLFNBQTVCLENBQTZCO1FBQ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ske3N0YXRlfV1gXTogMCxcclxuICAgICAgICB9KTtcclxuICAgICAgfSlcclxuICAgICAgLmNhdGNoKGVyciA9PiB7XHJcbiAgICAgICAgY29uc29sZS5sb2coZXJyKTtcclxuICAgICAgICB3eC5zaG93VG9hc3Qoe1xyXG4gICAgICAgICAgdGl0bGU6IGVyci5lcnJNc2csXHJcbiAgICAgICAgICBpY29uOiAnbm9uZScsXHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH0pO1xyXG4gIH0sXHJcbiAgYmluZFBpY2tlckNoYW5nZShlKSB7XHJcbiAgICBjb25zb2xlLmxvZyhlKTtcclxuICAgIGNvbnN0IHsgdmFsdWUgfSA9IGUuZGV0YWlsO1xyXG4gICAgdGhpcy5zZXREYXRhIShcclxuICAgICAge1xyXG4gICAgICAgIGFyZWFJZDogdmFsdWUsXHJcbiAgICAgIH0sXHJcbiAgICAgICgpID0+IHtcclxuICAgICAgICB0aGlzLmluaXREYXRhKCk7XHJcbiAgICAgIH0sXHJcbiAgICApO1xyXG4gIH0sXHJcbiAgcmVmcmVzaEhhbmRsZShlKSB7XHJcbiAgICB0aGlzLmZldGNoTGlzdCgpO1xyXG4gIH0sXHJcbiAgZmV0Y2hBcmVhTGlzdCgpIHtcclxuICAgIGJhc2VGZXRjaCh7XHJcbiAgICAgIHVybDogJy9kY3h5L2Jhc2VBcmVhL3F1ZXJ5QWxsJyxcclxuICAgIH0pXHJcbiAgICAgIC50aGVuKHJlcyA9PiB7XHJcbiAgICAgICAgaWYgKHJlcy5kYXRhKSB7XHJcbiAgICAgICAgICB0aGlzLnNldERhdGEhKHtcclxuICAgICAgICAgICAgYXJlYUxpc3Q6IHJlcy5kYXRhLFxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgIHRoaXMuc2V0RGF0YSEoe1xyXG4gICAgICAgICAgICBhcmVhTGlzdDogW10sXHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICAgIH0pXHJcbiAgICAgIC5jYXRjaChlcnIgPT4ge1xyXG4gICAgICAgIGNvbnNvbGUubG9nKGVycik7XHJcbiAgICAgIH0pO1xyXG4gIH0sXHJcbiAgZ2V0TW9yZUxpc3RJdGVtKCkge1xyXG4gICAgbGV0IHN0YXRlID0gdGhpcy5kYXRhLnRhYkluZGV4O1xyXG4gICAgbGV0IGluZGV4ID0gdGhpcy5kYXRhLnBhZ2VOdW1bc3RhdGVdICsgMTtcclxuICAgIGxldCBtYXggPSBNYXRoLmNlaWwodGhpcy5kYXRhWydsaXN0JyArIHN0YXRlXS5sZW5ndGggLyAxMCk7XHJcbiAgICBjb25zb2xlLmxvZygnaW4gZ2V0TW9yZUxpc3RJdGVtJywgaW5kZXgsIG1heCk7XHJcbiAgICBpZiAoaW5kZXggPj0gbWF4KSB7XHJcbiAgICAgIHd4LnNob3dUb2FzdCh7XHJcbiAgICAgICAgdGl0bGU6ICfmsqHmnInmm7TlpJrmlbDmja4nLFxyXG4gICAgICAgIGljb246ICdub25lJyxcclxuICAgICAgfSk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICB0aGlzLnNldERhdGEoe1xyXG4gICAgICAgIFtgcGFnZU51bVske3N0YXRlfV1gXTogaW5kZXgsXHJcbiAgICAgICAgbGlzdDogW1xyXG4gICAgICAgICAgLi4udGhpcy5kYXRhLmxpc3QsXHJcbiAgICAgICAgICAuLi50aGlzLmRhdGFbJ2xpc3QnICsgc3RhdGVdLnNsaWNlKGluZGV4ICogMTAsIChpbmRleCArIDEpICogMTApLFxyXG4gICAgICAgIF0sXHJcbiAgICAgIH0pO1xyXG4gICAgfVxyXG4gIH0sXHJcbn0pO1xyXG4iXX0=
\ No newline at end of file
......@@ -22,6 +22,9 @@ Page({
this.fetchList(1);
this.fetchList(2);
},
onShow(){
this.initData();
},
toggleList(e) {
const { tabindex } = e.currentTarget.dataset;
if (tabindex !== this.data.tabIndex) {
......
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
var fetch_1 = require("../../api/fetch");
// miniprogram/pages/feedbackDetail/feedbackDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
customerName: '',
customerPhone: '',
id: '',
dataList: [],
shortCuts: [],
areaId: '',
r1: true,
cb: false,
index: -1,
isHidden: true,
inputValue: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var customerName = options.customerName, customerPhone = options.customerPhone, id = options.id;
console.log("options", options);
var customerName = options.customerName, customerPhone = options.customerPhone, id = options.id, areaId = options.areaId;
wx.setNavigationBarTitle({
title: customerName + "-" + customerPhone,
title: "".concat(customerName, "-").concat(customerPhone)
});
this.setData({
customerName: customerName,
customerPhone: customerPhone,
id: id,
areaId: areaId
});
wx.showLoading({
title: '加载中'
});
this.getShortcuts();
this.fetchList();
setTimeout(function () {
wx.pageScrollTo({
scrollTop: 2000
});
}, 1500);
},
fetchList: function () {
onPageScroll: function (e) {
console.log("eeeee", e);
},
inputHandle: function (e) {
var val = e.detail.value;
this.setData({
inputValue: val
});
},
setContent: function (e) {
var content = e.currentTarget.dataset.content;
this.setData({
inputValue: content,
isHidden: true
});
},
del: function (e) {
var _this = this;
wx.showLoading({
title: '加载中',
var id = e.currentTarget.dataset.id;
wx.showModal({
title: '删除提示',
content: '您确定要删除该快捷回复吗?',
success: function (res) {
if (res.confirm) {
(0, fetch_1.customerFetch)({
url: "/feedback/shortcuts/".concat(id),
method: 'DELETE'
})
.then(function (res) {
wx.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
_this.getShortcuts();
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none'
});
});
}
}
});
},
showModal: function () {
this.setData({
isHidden: false
});
},
setV1: function (e) {
this.setData({
cb: e.detail.value
});
},
subData: function (str) {
console.log(str, str.substring(0, 20));
return str.substring(0, 20);
},
cancel: function () {
this.setData({
isHidden: true
});
return fetch_1.customerFetch({
url: "/feedback/get/feedback/" + this.data.id,
},
setV: function (e) {
console.log(e);
this.setData({
r1: JSON.parse(e.detail.value)
});
},
sendFeedback: function (e) {
var _this = this;
if (this.data.dataList.length == 0) {
wx.showToast({
title: '当前无法发送消息',
icon: 'none',
duration: 2000
});
return;
}
var id = this.data.dataList[this.data.dataList.length - 1].id;
var val = this.data.inputValue;
if (val.trim() == "")
val = "您的反馈客服已处理,谢谢!";
console.log(val, id);
if (this.data.cb && this.data.shortCuts.length >= 5) {
wx.showModal({
title: '添加提示',
content: '当前默认回复列表已经5条,若加入此条回复,将造成最早一条默认回复被删除,确定继续吗?',
success: function (res) {
if (res.confirm) {
(0, fetch_1.customerFetch)({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
isAddShortcut: _this.data.cb ? 1 : 0,
replayContent: val,
state: _this.data.r1 ? '3' : '2'
}
})
.then(function (res) {
wx.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
_this.setData({
inputValue: ''
});
// this.triggerEvent('refresh', {});
wx.navigateBack();
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none'
});
});
}
}
});
}
else {
(0, fetch_1.customerFetch)({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
isAddShortcut: this.data.cb ? 1 : 0,
state: this.data.r1 ? '3' : '2'
}
})
.then(function (res) {
wx.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
_this.setData({
inputValue: ''
});
// this.triggerEvent('refresh', {});
wx.navigateBack();
})["catch"](function (err) {
wx.showToast({
title: err.errMsg,
icon: 'none'
});
});
}
},
getShortcuts: function () {
var _this = this;
//获取快捷回复列表
(0, fetch_1.customerFetch)({
url: "/feedback/shortcuts",
data: { areaId: this.data.areaId }
})
.then(function (res) {
var list = res.data;
_this.setData({
shortCuts: list
});
})["catch"](function (err) {
console.log(err);
});
},
fetchList: function () {
var _this = this;
return (0, fetch_1.customerFetch)({
url: "/feedback/get/feedback/".concat(this.data.id)
})
.then(function (res) {
wx.hideLoading();
var list = res.data.list;
_this.setData({
dataList: list,
dataList: list
});
})
.catch(function (err) {
})["catch"](function (err) {
wx.hideLoading();
console.log(err);
});
},
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2tEZXRhaWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZWVkYmFja0RldGFpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlDQUFnRDtBQUdoRCxJQUFJLENBQUM7SUFJSCxJQUFJLEVBQUU7UUFDSixZQUFZLEVBQUUsRUFBRTtRQUNoQixhQUFhLEVBQUUsRUFBRTtRQUNqQixFQUFFLEVBQUUsRUFBRTtRQUNOLFFBQVEsRUFBRSxFQUFFO0tBQ2I7SUFLRCxNQUFNLEVBQUUsVUFBUyxPQUFPO1FBQ2QsSUFBQSxZQUFZLEdBQXdCLE9BQU8sYUFBL0IsRUFBRSxhQUFhLEdBQVMsT0FBTyxjQUFoQixFQUFFLEVBQUUsR0FBSyxPQUFPLEdBQVosQ0FBYTtRQUNwRCxFQUFFLENBQUMscUJBQXFCLENBQUM7WUFDdkIsS0FBSyxFQUFLLFlBQVksU0FBSSxhQUFlO1NBQzFDLENBQUMsQ0FBQztRQUNILElBQUksQ0FBQyxPQUFRLENBQUM7WUFDWixZQUFZLGNBQUE7WUFDWixhQUFhLGVBQUE7WUFDYixFQUFFLElBQUE7U0FDSCxDQUFDLENBQUM7UUFDSCxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7SUFDbkIsQ0FBQztJQUVELFNBQVMsRUFBVDtRQUFBLGlCQWtCQztRQWpCQyxFQUFFLENBQUMsV0FBVyxDQUFDO1lBQ2IsS0FBSyxFQUFFLEtBQUs7U0FDYixDQUFDLENBQUM7UUFDSCxPQUFPLHFCQUFhLENBQUM7WUFDbkIsR0FBRyxFQUFFLDRCQUEwQixJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUk7U0FDOUMsQ0FBQzthQUNDLElBQUksQ0FBQyxVQUFBLEdBQUc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0sXHJcbiAgLy8gICAgICAgICAgIHBhZ2VOdW0sXHJcbiAgLy8gICAgICAgICB9KTtcclxuICAvLyAgICAgICB9XHJcbiAgLy8gICAgIH0pXHJcbiAgLy8gICAgIC5jYXRjaChlcnIgPT4ge1xyXG4gIC8vICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XHJcbiAgLy8gICAgICAgY29uc29sZS5sb2coZXJyKTtcclxuICAvLyAgICAgfSk7XHJcbiAgLy8gfSxcclxufSk7XHJcbiJdfQ==
\ No newline at end of file
......@@ -10,13 +10,21 @@ Page({
customerPhone: '',
id: '',
dataList: [],
shortCuts:[],
areaId:'',
r1: true,
cb: false,
index: -1,
isHidden:true,
inputValue:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
const { customerName, customerPhone, id } = options;
console.log("options",options)
const { customerName, customerPhone, id,areaId } = options;
wx.setNavigationBarTitle({
title: `${customerName}-${customerPhone}`,
});
......@@ -24,14 +32,187 @@ Page({
customerName,
customerPhone,
id,
areaId
});
this.fetchList();
},
fetchList() {
wx.showLoading({
title: '加载中',
});
this.getShortcuts();
this.fetchList();
setTimeout(()=>{
wx.pageScrollTo({
scrollTop: 2000
})
},1500)
},
onPageScroll(e){
console.log("eeeee",e)
},
inputHandle(e) {
const val = e.detail.value;
this.setData!({
inputValue: val,
});
},
setContent(e){
let {content} = e.currentTarget.dataset;
this.setData({
inputValue:content,
isHidden:true
})
},
del(e){
let {id} = e.currentTarget.dataset;
wx.showModal({
title:'删除提示',
content:'您确定要删除该快捷回复吗?',
success:res=>{
if(res.confirm){
customerFetch({
url: `/feedback/shortcuts/${id}`,
method: 'DELETE',
})
.then(res => {
wx.showToast({
title: res.msg,
icon:'none',
duration:2000
});
this.getShortcuts();
})
.catch((err: wx.GeneralCallbackResult) => {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
}
}
})
},
showModal(){
this.setData({
isHidden:false
})
},
setV1(e) {
this.setData({
cb: e.detail.value
});
},
subData(str){
console.log(str,str.substring(0,20))
return str.substring(0,20);
},
cancel(){
this.setData({
isHidden:true
})
},
setV(e) {
console.log(e)
this.setData({
r1: JSON.parse(e.detail.value)
})
},
sendFeedback(e) {
if(this.data.dataList.length==0){
wx.showToast({
title:'当前无法发送消息',
icon:'none',
duration:2000
})
return
}
const id = this.data.dataList[this.data.dataList.length-1].id;
let val = this.data.inputValue;
if (val.trim() == "") val = "您的反馈客服已处理,谢谢!"
console.log(val, id);
if (this.data.cb && this.data.shortCuts.length >= 5) {
wx.showModal({
title: '添加提示',
content: '当前默认回复列表已经5条,若加入此条回复,将造成最早一条默认回复被删除,确定继续吗?',
success: res => {
if(res.confirm){
customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
isAddShortcut: this.data.cb ? 1 : 0,
replayContent: val,
state: this.data.r1 ? '3' : '2',
},
})
.then(res => {
wx.showToast({
title: res.msg,
icon:'none',
duration:2000
});
this.setData!({
inputValue: '',
});
// this.triggerEvent('refresh', {});
wx.navigateBack();
})
.catch((err: wx.GeneralCallbackResult) => {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
}
}
});
}else {
customerFetch({
url: '/feedback/feedback',
method: 'PUT',
data: {
id: id,
replayContent: val,
isAddShortcut: this.data.cb ? 1 : 0,
state: this.data.r1 ? '3' : '2',
},
})
.then(res => {
wx.showToast({
title: res.msg,
icon:'none',
duration:2000
});
this.setData!({
inputValue: '',
});
// this.triggerEvent('refresh', {});
wx.navigateBack();
})
.catch((err: wx.GeneralCallbackResult) => {
wx.showToast({
title: err.errMsg,
icon: 'none',
});
});
}
},
getShortcuts(){
//获取快捷回复列表
customerFetch({
url: `/feedback/shortcuts`,
data:{areaId:this.data.areaId}
})
.then(res => {
const list = res.data;
this.setData!({
shortCuts: list,
});
})
.catch(err => {
console.log(err);
});
},
fetchList() {
return customerFetch({
url: `/feedback/get/feedback/${this.data.id}`,
})
......@@ -47,7 +228,6 @@ Page({
console.log(err);
});
},
// refreshList() {
// this.fetchList({
// pageNum: 1,
......
<!-- miniprogram/pages/feedbackDetail/feedbackDetail.wxml -->
<view class="feedbackDetail">
<wxs src="../../capture.wxs" module="tools"></wxs>
<scroll-view class="feedbackDetail" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:if="{{dataList&&dataList.length}}">
<feedback-detail-item wx:for="{{dataList}}" wx:key="id" item-data="{{item}}" bindrefresh="fetchList" />
<feedback-detail-item wx:for="{{dataList}}" shortcuts="{{shortCuts}}" wx:key="id" item-data="{{item}}" bindgetShortCuts="getShortcuts" bindrefresh="fetchList" />
</block>
<view wx:else style="padding:50rpx;text-align:center">暂无数据</view>
</view>
\ No newline at end of file
</scroll-view>
<view class="bottom">
<view class="row_bet">
<image style="width: 20px; height: 20px;" bindtap="showModal" mode="scaleToFill" src="../../images/kuaijiehuifu.png"></image>
<modal title="快捷回复列表" hidden="{{isHidden}}" bindconfirm="cancel" bindcancel="cancel">
<view wx:for="{{shortCuts}}" class="ele" data-content="{{item.replyContent}}" catchtap="setContent">
<text>{{item.replyContent.length>16?tools.subStr(item.replyContent)+"...":item.replyContent}}</text>
<icon class="icon-small" data-id="{{item.id}}" catchtap="del" type="cancel" size="23"></icon>
</view>
</modal>
<view>
<checkbox-group bindchange="setV1">
<checkbox value="{{true}}" checked="{{false}}" color="#6A92FF"/>加入快捷回复
</checkbox-group>
</view>
<radio-group bindchange="setV">
<radio value="{{true}}" checked="{{true}}" color="#6A92FF"/>已处理
<radio value="{{false}}" checked="{{false}}" color="#6A92FF"/>进行中
</radio-group>
</view>
<view class="feedbackDetail-itemBox">
<input class="feedbackDetail-itemInput" type="text" placeholder="您的反馈客服已处理,谢谢!" value="{{inputValue}}" bindinput="inputHandle" />
<button class="feedbackDetail-itemBtn" bind:tap="sendFeedback" data-id="{{itemData.id}}">发送</button>
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/feedbackDetail/feedbackDetail.wxss */
.feedbackDetail-itemBox {
display: flex;
margin-left: 50rpx;
}
.feedbackDetail{
/* height: calc(100vh - 110px); */
padding-bottom: 110px;
/* overflow: scroll; */
}
::-webkit-scrollbar{
width: 0px;
height: 0px;
color: transparent;
}
.feedbackDetail-itemInput {
width: 456rpx;
height: 76rpx;
border-radius: 20rpx;
background-color: #f0f3fd;
}
.feedbackDetail-itemBtn {
font-size: 32rpx;
border-radius: 20rpx;
margin-left: 10rpx;
background-color: #6a92ff;
color: #fff;
}
.bottom{
position: fixed;
bottom: 0px;
width: 100vw;
background-color: #fff;
border-top: solid 1px #eee;
height: 110px;
padding-bottom: 10px;
}
.row_bet{
width: 100vw;
display: flex;
box-sizing: border-box;
padding: 10px 20px;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.ele{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #f0f3fd;
margin-top: 20px;
border-radius: 5px;
height: 40px;
padding: 0px 20px;
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInVzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8vIHN0b3Jlcy91c2VyLmpzXHJcblxyXG5leHBvcnQgdHlwZSBVc2VyaW5mbyA9IHtcclxuICBjZWxscGhvbmU6IHN0cmluZztcclxuICBjb21tZW50OiBzdHJpbmc7XHJcbiAgY3JlYXRlQXQ6IHN0cmluZztcclxuICBpZDogbnVtYmVyO1xyXG4gIGlzT3Blbk9wZXJMb2c6IG51bWJlcjtcclxuICBpc1NldFBhc3N3b3JkOiBudW1iZXI7XHJcbiAgbGFzdExvZ2luRGF0ZTogc3RyaW5nO1xyXG4gIGxvZ2luQWNjb3VudDogc3RyaW5nO1xyXG4gIGxvZ2luQ291bnQ6IG51bWJlcjtcclxuICBuYW1lOiBzdHJpbmc7XHJcbiAgb3BlcmF0ZUlkOiBudW1iZXI7XHJcbiAgb3BlcmF0ZU5hbWU6IHN0cmluZztcclxuICBzdGF0ZTogc3RyaW5nO1xyXG4gIHVwZGF0ZUF0OiBzdHJpbmc7XHJcbn07XHJcblxyXG5leHBvcnQgdHlwZSBVc2VyUm9sZSA9IHtcclxuICBjaGlsZHM6IFVzZXJSb2xlW107XHJcbiAgaWQ6IG51bWJlcjtcclxuICBsaXN0TWVudUJ1dHRvblZvOiBbXTtcclxuICBtZW51Q29kZTogc3RyaW5nO1xyXG4gIG1lbnVMaW5rOiBzdHJpbmc7XHJcbiAgbWVudU5hbWU6IHN0cmluZztcclxuICBtZW51UGljU21hbGw6IHN0cmluZztcclxuICBwYXJlbnRJZDogbnVsbCB8IG51bWJlcjtcclxuICBwYXJlbnROYW1lOiBudWxsIHwgc3RyaW5nO1xyXG4gIHNvcnRJZDogbnVtYmVyO1xyXG59O1xyXG4iXX0=
\ No newline at end of file
// stores/user.js
exports.__esModule = true;
{
"description": "项目配置文件",
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": []
"ignore": [],
"include": []
},
"miniprogramRoot": "miniprogram/",
"compileType": "miniprogram",
......@@ -53,7 +54,8 @@
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true,
"minifyWXML": true
"minifyWXML": true,
"useStaticServer": true
},
"appid": "wx458799fcb933d34f",
"simulatorType": "wechat",
......@@ -147,5 +149,10 @@
}
]
}
},
"srcMiniprogramRoot": "miniprogram/",
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
\ No newline at end of file
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "home",
"pathName": "pages/homeAndReport/homeAndReport",
"query": "",
"scene": null
},
{
"id": -1,
"name": "report",
"pathName": "pages/report/report",
"query": "",
"scene": null
},
{
"id": -1,
"name": "feedback",
"pathName": "pages/feedback/feedback",
"query": "",
"scene": null
},
{
"id": -1,
"name": "monthOperator",
"pathName": "pages/monthOperator/monthOperator",
"query": "",
"scene": null
},
{
"id": -1,
"name": "userGrowth",
"pathName": "pages/userGrowth/userGrowth",
"query": "",
"scene": null
},
{
"id": -1,
"name": "platformFee",
"pathName": "pages/platformFee/platformFee",
"query": "",
"scene": null
},
{
"id": -1,
"name": "platformFeeRecord",
"pathName": "pages/platformFeeRecord/platformFeeRecord",
"query": "",
"scene": null
},
{
"id": -1,
"name": "equipment",
"pathName": "pages/equipment/equipment",
"query": "",
"scene": null
},
{
"id": 8,
"name": "equipmentReport",
"pathName": "pages/equipmentReport/equipmentReport",
"query": "areaId=15&areaName=多彩温江校区",
"scene": null
},
{
"id": 9,
"name": "feedbackDetail",
"pathName": "pages/feedbackDetail/feedbackDetail",
"query": "customerName=姜雷&customerPhone=18108096099&id=800069",
......@@ -93,10 +74,11 @@
"name": "设备明细",
"pathName": "pages/deviceDetail/deviceDetail",
"query": "",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
}
]
}
}
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment