Commit f4a8de1b by 姜雷

添加页面

parents
node_modules
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("../config/constants");
var app = getApp();
var fetch = function (req) {
return new Promise(function (resolve, reject) {
var token = app.globalData.token;
wx.request(__assign({}, req, { header: token
? __assign({ token: token }, req.header) : req.header, success: resolve, fail: reject }));
}).then(function (res) {
var _a = res.data, code = _a.code, otherkeys = __rest(_a, ["code"]);
if (code === constants_1.successCode) {
return otherkeys;
}
else {
throw {
errMsg: res.data.msg || '网络异常',
};
}
});
};
exports.systemFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.devUrl.SYSTEM_SERVER_URL + req.url }));
};
exports.statisticsFetch = function (req) {
return fetch(__assign({}, req, { url: constants_1.devUrl.STATISTICS_SERVER_URL + req.url }));
};
exports.default = fetch;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaURBQTBEO0FBRTFELElBQU0sR0FBRyxHQUFHLE1BQU0sRUFBVSxDQUFDO0FBRTdCLElBQU0sS0FBSyxHQUFHLFVBQUMsR0FBcUI7SUFDbEMsT0FBQSxJQUFJLE9BQU8sQ0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mVxdWVzdE9wdGlvbikgPT5cbiAgZmV0Y2goeyAuLi5yZXEsIHVybDogZGV2VXJsLlNZU1RFTV9TRVJWRVJfVVJMICsgcmVxLnVybCB9KTtcbmV4cG9ydCBjb25zdCBzdGF0aXN0aWNzRmV0Y2ggPSAocmVxOiB3eC5SZXF1ZXN0T3B0aW9uKSA9PlxuICBmZXRjaCh7IC4uLnJlcSwgdXJsOiBkZXZVcmwuU1RBVElTVElDU19TRVJWRVJfVVJMICsgcmVxLnVybCB9KTtcblxuZXhwb3J0IGRlZmF1bHQgZmV0Y2g7XG4iXX0=
\ No newline at end of file
import { devUrl, successCode } from '../config/constants';
import { IMyApp } from '../app';
const app = getApp<IMyApp>();
const fetch = (req: wx.RequestOption) =>
new Promise((resolve, reject) => {
const token = app.globalData.token;
wx.request({
...req,
header: token
? {
token,
...req.header,
}
: req.header,
success: resolve,
fail: reject,
});
}).then((res: wx.RequestSuccessCallbackResult) => {
const { code, ...otherkeys } = res.data;
if (code === successCode) {
return otherkeys;
} else {
throw {
errMsg: res.data.msg || '网络异常',
};
}
});
export const systemFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: devUrl.SYSTEM_SERVER_URL + req.url });
export const statisticsFetch = (req: wx.RequestOption) =>
fetch({ ...req, url: devUrl.STATISTICS_SERVER_URL + req.url });
export default fetch;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
App({
globalData: {
token: 'system:login:token:a1d0c6e83f027327d8461063f4ac58a61572317597980',
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBU0EsR0FBRyxDQUFTO0lBSVYsVUFBVSxFQUFFO1FBQ1YsS0FBSyxFQUFFLGtFQUFrRTtLQUMxRTtDQUNGLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vYXBwLnRzXG5leHBvcnQgaW50ZXJmYWNlIElNeUFwcCB7XG4gIHVzZXJJbmZvUmVhZHlDYWxsYmFjaz8ocmVzOiB3eC5Vc2VySW5mbyk6IHZvaWQ7XG4gIGdsb2JhbERhdGE6IHtcbiAgICB1c2VySW5mbz86IHd4LlVzZXJJbmZvO1xuICAgIHRva2VuOiBzdHJpbmc7XG4gIH07XG59XG5cbkFwcDxJTXlBcHA+KHtcbiAgLy8gb25MYXVuY2goKSB7XG4gIC8vICAgY29uc29sZS5sb2coJ2luIG9uTGF1bmNoJyk7XG4gIC8vIH0sXG4gIGdsb2JhbERhdGE6IHtcbiAgICB0b2tlbjogJ3N5c3RlbTpsb2dpbjp0b2tlbjphMWQwYzZlODNmMDI3MzI3ZDg0NjEwNjNmNGFjNThhNjE1NzIzMTc1OTc5ODAnLFxuICB9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"pages": [
"pages/index/index",
"pages/home/home",
"pages/report/report",
"pages/feedback/feedback",
"pages/monthOperator/monthOperator",
"pages/homeAndReport/homeAndReport"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
//app.ts
export interface IMyApp {
userInfoReadyCallback?(res: wx.UserInfo): void;
globalData: {
userInfo?: wx.UserInfo;
token: string;
};
}
App<IMyApp>({
// onLaunch() {
// console.log('in onLaunch');
// },
globalData: {
token: 'system:login:token:a1d0c6e83f027327d8461063f4ac58a61572317597980',
},
});
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
input, .input {
border: 1rpx solid #f8f8f8;
background-color: #f8f8f8;
padding: 0 40rpx;
border-radius: 96rpx;
height: 96rpx;
line-height: 96rpx;
font-size: 28rpx;
}
.input-placeholder {
color: #a9a9ad;
}
input:hover, input:focus {
border-color: #6895fe;
}
button {
border-radius: 96rpx;
background-color: #6895fe;
color: #fff;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.devUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
};
exports.testUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
};
exports.masterUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
};
exports.successCode = 1000;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQWEsUUFBQSxNQUFNLEdBQUc7SUFDcEIsaUJBQWlCLEVBQUUsNkNBQTZDO0lBQ2hFLHFCQUFxQixFQUFFLGlEQUFpRDtDQUN6RSxDQUFDO0FBQ1csUUFBQSxPQUFPLEdBQUc7SUFDckIsaUJBQWlCLEVBQUUsNkNBQTZDO0lBQ2hFLHFCQUFxQixFQUFFLGlEQUFpRDtDQUN6RSxDQUFDO0FBQ1csUUFBQSxTQUFTLEdBQUc7SUFDdkIsaUJBQWlCLEVBQUUsNkNBQTZDO0lBQ2hFLHFCQUFxQixFQUFFLGlEQUFpRDtDQUN6RSxDQUFDO0FBRVcsUUFBQSxXQUFXLEdBQUcsSUFBSSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IGRldlVybCA9IHtcbiAgU1lTVEVNX1NFUlZFUl9VUkw6ICdodHRwOi8vZXgtZGV2LWRjeHktc3lzdGVtLW1hbmFnZS4xNjhjYWQudG9wJyxcbiAgU1RBVElTVElDU19TRVJWRVJfVVJMOiAnaHR0cDovL2V4LWRldi1kY3h5LXN0YXRpc3RpY3MtbWFuYWdlLjE2OGNhZC50b3AnLFxufTtcbmV4cG9ydCBjb25zdCB0ZXN0VXJsID0ge1xuICBTWVNURU1fU0VSVkVSX1VSTDogJ2h0dHA6Ly9leC1kZXYtZGN4eS1zeXN0ZW0tbWFuYWdlLjE2OGNhZC50b3AnLFxuICBTVEFUSVNUSUNTX1NFUlZFUl9VUkw6ICdodHRwOi8vZXgtZGV2LWRjeHktc3RhdGlzdGljcy1tYW5hZ2UuMTY4Y2FkLnRvcCcsXG59O1xuZXhwb3J0IGNvbnN0IG1hc3RlclVybCA9IHtcbiAgU1lTVEVNX1NFUlZFUl9VUkw6ICdodHRwOi8vZXgtZGV2LWRjeHktc3lzdGVtLW1hbmFnZS4xNjhjYWQudG9wJyxcbiAgU1RBVElTVElDU19TRVJWRVJfVVJMOiAnaHR0cDovL2V4LWRldi1kY3h5LXN0YXRpc3RpY3MtbWFuYWdlLjE2OGNhZC50b3AnLFxufTtcblxuZXhwb3J0IGNvbnN0IHN1Y2Nlc3NDb2RlID0gMTAwMDtcbiJdfQ==
\ No newline at end of file
export const devUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
};
export const testUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
};
export const masterUrl = {
SYSTEM_SERVER_URL: 'http://ex-dev-dcxy-system-manage.168cad.top',
STATISTICS_SERVER_URL: 'http://ex-dev-dcxy-statistics-manage.168cad.top',
};
export const successCode = 1000;
"use strict";
Component({
properties: {
checked: { type: Number, value: 0 },
listData: { type: Array, value: [] },
},
lifetimes: {
attached: function () {
if (this.data.pagePath === 'home') {
this.setData({
index: 0,
});
}
else if (this.data.pagePath === 'report') {
this.setData({
index: 1,
});
}
},
detached: function () {
},
},
data: {},
methods: {
clickHandle: function (e) {
var _a = e.currentTarget.dataset, path = _a.path, index = _a.index;
var myEventDetail = {
path: path, index: index,
};
this.triggerEvent('customevent', myEventDetail);
}
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsU0FBUyxDQUFDO0lBSVIsVUFBVSxFQUFFO1FBQ1YsT0FBTyxFQUFFLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFO1FBQ25DLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtLQUNyQztJQUNELFNBQVMsRUFBRTtRQUNULFFBQVEsRUFBRTtZQUVSLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxLQUFLLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ2xDLElBQUksQ0FBQyxPQUFPLENBQUM7b0JBQ1gsS0FBSyxFQUFFLENBQUM7aUJBQ1QsQ0FBQyxDQUFDO1lBQ0wsQ0FBQztZQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFFBQVEsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO2dCQUMzQyxJQUFJLENBQUMsT0FBTyxDQUFDO29CQUNYLEtBQUssRUFBRSxDQUFDO2lCQUNULENBQUMsQ0FBQztZQUNMLENBQUM7UUFDSCxDQUFDO1FBQ0QsUUFBUSxFQUFFO1FBRVYsQ0FBQztLQUNGO0lBSUQsSUFBSSxFQUFFLEVBRUw7SUFLRCxPQUFPLEVBQUU7UUFD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Zmk5pe25omn6KGMXG4gICAgfSxcbiAgfSxcbiAgLyoqXG4gICAqIOe7hOS7tueahOWIneWni+aVsOaNrlxuICAgKi9cbiAgZGF0YToge1xuXG4gIH0sXG5cbiAgLyoqXG4gICAqIOe7hOS7tueahOaWueazleWIl+ihqFxuICAgKi9cbiAgbWV0aG9kczoge1xuICAgIGNsaWNrSGFuZGxlKGUpIHtcbiAgICAgIGxldCB7IHBhdGgsIGluZGV4IH0gPSBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldDtcbiAgICAgIGxldCBteUV2ZW50RGV0YWlsID0ge1xuICAgICAgICBwYXRoLCBpbmRleCxcbiAgICAgIH0gLy8gZGV0YWls5a+56LGh77yM5o+Q5L6b57uZ5LqL5Lu255uR5ZCs5Ye95pWwXG4gICAgICB0aGlzLnRyaWdnZXJFdmVudCgnY3VzdG9tZXZlbnQnLCBteUV2ZW50RGV0YWlsKVxuICAgIH1cbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
// custom-tab-bar/index.ts
Component({
/**
* 组件的属性列表
*/
properties: {
checked: { type: Number, value: 0 },
listData: { type: Array, value: [] },
},
lifetimes: {
attached: function () {
// 在组件实例进入页面节点树时执行
if (this.data.pagePath === 'home') {
this.setData({
index: 0,
});
} else if (this.data.pagePath === 'report') {
this.setData({
index: 1,
});
}
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
clickHandle(e) {
let { path, index } = e.currentTarget.dataset;
let myEventDetail = {
path, index,
} // detail对象,提供给事件监听函数
this.triggerEvent('customevent', myEventDetail)
}
},
});
<!--custom-tab-bar/index.wxml-->
<cover-view class="custom-tab-bar">
<cover-view wx:for="{{listData}}" wx:key="index" class="custom-tab-bar-item {{checked === index?'checked':''}}" data-index="{{index}}" data-path="{{item.pagePath}}" bindtap="clickHandle">
<cover-image class="custom-tab-bar-icon" src="{{checked === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
{{item.text}}
</cover-view>
</cover-view>
\ No newline at end of file
/* custom-tab-bar/index.wxss */
.custom-tab-bar {
position: fixed;
bottom: 0;
width: 100%;
height: 96rpx;
left: 0;
right: 0;
display: flex;
justify-content: space-around;
align-items: center;
font-size: 18rpx;
border-top: 1px solid #efefef;
background-color: #fff;
}
.custom-tab-bar-item {
display: flex;
flex-direction: column;
align-items: center;
}
.custom-tab-bar-item.checked {
color: #6895fe;
}
.custom-tab-bar-icon {
width: 52rpx;
height: 52rpx;
margin-bottom: 8rpx;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _wxF = __webpack_require__(1);
var _wxF2 = _interopRequireDefault(_wxF);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
Component({
/**
* 组件的属性列表
*/
properties: {
canvasId: {
type: String,
value: 'f2-canvas'
},
opts: {
type: Object
}
},
/**
* 组件的初始数据
*/
data: {},
ready: function ready() {
if (!this.data.opts) {
console.warn('组件需绑定 opts 变量,例:<ff-canvas id="mychart-dom-bar" canvas-id="mychart-bar" opts="{{ opts }}"></ff-canvas>');
return;
}
if (!this.data.opts.lazyLoad) {
this.init();
}
},
/**
* 组件的方法列表
*/
methods: {
init: function init(callback) {
var _this = this;
var version = wx.version.version.split('.').map(function (n) {
return parseInt(n, 10);
});
var isValid = version[0] > 1 || version[0] === 1 && version[1] > 9 || version[0] === 1 && version[1] === 9 && version[2] >= 91;
if (!isValid) {
console.error('微信基础库版本过低,需大于等于 1.9.91。');
return;
}
var ctx = wx.createCanvasContext(this.data.canvasId, this); // 获取小程序上下文
var canvas = new _wxF2.default.Renderer(ctx);
this.canvas = canvas;
var query = wx.createSelectorQuery().in(this);
query.select('.f2-canvas').boundingClientRect(function (res) {
if (typeof callback === 'function') {
_this.chart = callback(canvas, res.width, res.height, _wxF2.default);
} else if (_this.data.opts && _this.data.opts.onInit) {
_this.chart = _this.data.opts.onInit(canvas, res.width, res.height, _wxF2.default);
}
}).exec();
},
touchStart: function touchStart(e) {
if (this.canvas) {
this.canvas.emitEvent('touchstart', [e]);
}
},
touchMove: function touchMove(e) {
if (this.canvas) {
this.canvas.emitEvent('touchmove', [e]);
}
},
touchEnd: function touchEnd(e) {
if (this.canvas) {
this.canvas.emitEvent('touchend', [e]);
}
},
press: function press(e) {
if (this.canvas) {
this.canvas.emitEvent('press', [e]);
}
}
}
}); // f2-canvas.js
/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = require("@antv/wx-f2");
/***/ })
/******/ ]);
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<canvas
class="f2-canvas"
canvas-id="{{ canvasId }}"
bindinit="init"
bindtouchstart="touchStart"
bindtouchmove="touchMove"
bindtouchend="touchEnd"
bindlongtap="press"
>
</canvas>
/* f2-canvas.wxss */
.f2-canvas {
width: 100%;
height: 100%;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
const{storeMap:storeMap,notifyStack:notifyStack}=require("../constant"),{cloneObj:cloneObj}=require("../utils");module.exports=function(t){return function(n){const{onLoad:o,onUnload:a}=n;return n.onLoad=function(n){const a=t.call(this,storeMap,n),i=cloneObj(a);notifyStack.push([this,t.bind(this),i,n]),this.setData(Object.assign({},this.data,a)),o&&o.call(this,n)},n.onUnload=function(){notifyStack.pop(),a&&a.call(this)},n}};
\ No newline at end of file
const{storeMap:storeMap}=require("../constant"),{notifyUpdate:notifyUpdate}=require("../core"),{cloneObj:cloneObj,isProxyNeeded:isProxyNeeded}=require("../utils");module.exports=function(e,t){t=t||e.constructor.name.toLowerCase();const o=Object.getOwnPropertyNames(e);return storeMap[t]||(storeMap[t]=cloneObj(e,o)),wrapToProxy(e,[t])};const wrapToProxy=(e,t)=>(Object.keys(e).forEach(o=>{isProxyNeeded(e[o])&&(e[o]=wrapToProxy(e[o],t.concat([o])))}),new Proxy(e,{get(e,o){if("__isProxy"===o)return!0;if("__data"===o)return findInStoreMap(t);const r=Reflect.get(e,o)&&Reflect.get(e,o);if(r&&r.__isProxy)return r;const n=findInStoreMap(t.concat([o]));return void 0!==n&&n||r},set(e,o,r){const n=r&&r.__isProxy&&r.__data||r,a=isProxyNeeded(n)&&wrapToProxy(cloneObj(n),t.concat([o]))||n,c=Reflect.set(e,o,a);return setValueInStoreMap(t.concat([o]),n),notifyUpdate(),c},deleteProperty:(e,o)=>!!e[o]&&(Reflect.deleteProperty(e,o),deleteKeyInStoreMap(t.concat([o])),notifyUpdate(),!0)})),findInStoreMap=e=>e.reduce((e,t)=>"pointsGranted"===t?e:e&&e[t]||void 0,storeMap),setValueInStoreMap=(e,t)=>{const o=e.length,r=e[o-1];let n=storeMap;e.forEach((e,t)=>{t!==o-1&&(n=n[e])}),n[r]=t},deleteKeyInStoreMap=e=>{const t=e.length,o=e[t-1];let r=storeMap;e.forEach((e,o)=>{o!==t-1&&(r=r[e])}),delete r[o]};
\ No newline at end of file
exports.storeMap={},exports.notifyStack=[];
\ No newline at end of file
const{storeMap:storeMap,notifyStack:notifyStack}=require("./constant"),{isEqualObj:isEqualObj,cloneObj:cloneObj}=require("./utils"),timeout=5;let batch=0;exports.notifyUpdate=function(){batch++,setTimeout(()=>{if(0==--batch){for(let t=notifyStack.length-1;t>=0;t--){const[o,e,a,i]=notifyStack[t],n=e(storeMap,i);isEqualObj(a,n)||(notifyStack[t][2]=cloneObj(n),o.setData(n))}}},5)};
\ No newline at end of file
exports.mapToData=require("./api/mapToData"),exports.observe=require("./api/observe");
\ No newline at end of file
const isEqualObj=function(t,e){if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e))return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;let r=!0;return Object.keys(t).forEach(c=>{switch(Object.prototype.toString.call(t[c])){case"[object Object]":isEqualObj(t[c],e[c])||(r=!1);break;case"[object Array]":isEqualArray(t[c],e[c])||(r=!1);break;default:t[c]!==e[c]&&(r=!1)}}),r},isEqualArray=(t,e)=>{if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e))return!1;if(t.length!==e.length)return!1;let r=!0;return t.forEach((t,c)=>{t!==e[c]&&(r=!1)}),r};exports.isEqualObj=isEqualObj;const cloneObj=function(t,e){let r={};return Object.keys(t).forEach(c=>{if(!e||e.includes(c))switch(Object.prototype.toString.call(t[c])){case"[object Object]":r[c]=cloneObj(t[c]);break;case"[object Array]":r[c]=cloneArray(t[c]);break;default:r[c]=t[c]}}),r},cloneArray=t=>t.map(t=>{switch(Object.prototype.toString.call(t)){case"[object Object]":return cloneObj(t);case"[object Array]":return cloneArray(t);default:return t}});exports.cloneObj=cloneObj,exports.isProxyNeeded=(t=>{const e=Object.prototype.toString.call(t);return"[object Object]"===e||"[object Array]"===e});
\ No newline at end of file
{
"name": "miniprogram",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@antv/adjust": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@antv/adjust/-/adjust-0.1.1.tgz",
"integrity": "sha512-9FaMOyBlM4AgoRL0b5o0VhEKAYkexBNUrxV8XmpHU/9NBPJONBOB/NZUlQDqxtLItrt91tCfbAuMQmF529UX2Q==",
"requires": {
"@antv/util": "~1.3.1"
},
"dependencies": {
"@antv/util": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-1.3.1.tgz",
"integrity": "sha512-cbUta0hIJrKEaW3eKoGarz3Ita+9qUPF2YzTj8A6wds/nNiy20G26ztIWHU+5ThLc13B1n5Ik52LbaCaeg9enA==",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
}
}
},
"@antv/attr": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/@antv/attr/-/attr-0.1.2.tgz",
"integrity": "sha512-QXjP+T2I+pJQcwZx1oCA4tipG43vgeCeKcGGKahlcxb71OBAzjJZm1QbF4frKXcnOqRkxVXtCr70X9TRair3Ew==",
"requires": {
"@antv/util": "~1.3.1"
},
"dependencies": {
"@antv/util": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-1.3.1.tgz",
"integrity": "sha512-cbUta0hIJrKEaW3eKoGarz3Ita+9qUPF2YzTj8A6wds/nNiy20G26ztIWHU+5ThLc13B1n5Ik52LbaCaeg9enA==",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
}
}
},
"@antv/f2": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/@antv/f2/-/f2-3.4.2.tgz",
"integrity": "sha512-rji4J9GGQIpzXNv8P4qzUFYnodQTtfAN2ApaY6WfxCQTSYy3EycK2CsjiiWNQ3PpNY1lCVf63E5PutwOZhuPwA==",
"requires": {
"@antv/adjust": "~0.1.1",
"@antv/attr": "~0.1.0",
"@antv/scale": "~0.1.2",
"@antv/util": "~1.2.5",
"hammerjs": "^2.0.8"
}
},
"@antv/f2-canvas": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@antv/f2-canvas/-/f2-canvas-1.0.5.tgz",
"integrity": "sha512-iE4u1kAcxGaluu1CA6F5R0/dfsCMhubEfOKvR6zRwGC9S9bCil0y6JNCsIkyPZGCQYkAtsg3WDlcu2yneyqUuw==",
"requires": {
"@antv/wx-f2": "^1.1.4"
}
},
"@antv/gl-matrix": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/@antv/gl-matrix/-/gl-matrix-2.7.1.tgz",
"integrity": "sha512-oOWcVNlpELIKi9x+Mm1Vwbz8pXfkbJKykoCIOJ/dNK79hSIANbpXJ5d3Rra9/wZqK6MC961B7sybFhPlLraT3Q=="
},
"@antv/scale": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.1.3.tgz",
"integrity": "sha512-oknlOg4OUqIh8LygrfQttx+OAnNJm2fQ81si4g8aby1WJJwj/TU1gCr+J3loIpKBtBK4VpP/OzTTqg1Ym67SOQ==",
"requires": {
"@antv/util": "~1.3.1",
"fecha": "~2.3.3"
},
"dependencies": {
"@antv/util": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-1.3.1.tgz",
"integrity": "sha512-cbUta0hIJrKEaW3eKoGarz3Ita+9qUPF2YzTj8A6wds/nNiy20G26ztIWHU+5ThLc13B1n5Ik52LbaCaeg9enA==",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
}
}
},
"@antv/util": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-1.2.5.tgz",
"integrity": "sha512-yz1AjXSEjNu9O5kK9pqKq69f/Iliu/IA3XXljUcfrlbUtmUJ0CH1tB5I60vPqfaKaUPhz+/35K+56yqaCsGmqA==",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
},
"@antv/wx-f2": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@antv/wx-f2/-/wx-f2-1.1.4.tgz",
"integrity": "sha512-XaMUwS16ONcpHIEK4yv6wOIxrwSqzhLx4di2kmumQI8xi5vZK1bslJCtjSaxbNS99febpZkZqgwgAmXOOrMYmA==",
"requires": {
"@antv/f2": "^3.3.3",
"wolfy87-eventemitter": "^5.2.4"
}
},
"blueimp-md5": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.12.0.tgz",
"integrity": "sha512-zo+HIdIhzojv6F1siQPqPFROyVy7C50KzHv/k/Iz+BtvtVzSHXiMXOpq2wCfNkeBqdCv+V8XOV96tsEt2W/3rQ=="
},
"fecha": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz",
"integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg=="
},
"hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
"integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE="
},
"wolfy87-eventemitter": {
"version": "5.2.8",
"resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.8.tgz",
"integrity": "sha512-Z+wAU9SyuOZgFj22zBl8sg0auJOkrKBZl8TTlEM5dRDDs2zPtlm72vPJUIlf6tUJ4w2JLgrF7VznRnQHP+Rn/Q=="
}
}
}
{
"name": "miniprogram",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@antv/f2-canvas": "^1.0.5",
"blueimp-md5": "^2.12.0"
}
}
"use strict";
Component({
properties: {
feedbackData: {
type: Object,
value: {
phonecall: ''
}
},
},
data: {},
methods: {
makePhoneCallHandle: function () {
wx.makePhoneCall({
phoneNumber: this.data.feedbackData.phonecall,
success: function () {
console.log('success');
},
fail: function () {
console.log('fail');
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gfSxcblxuICAvKipcbiAgICog57uE5Lu255qE5Yid5aeL5pWw5o2uXG4gICAqL1xuICBkYXRhOiB7XG5cbiAgfSxcblxuICAvKipcbiAgICog57uE5Lu255qE5pa55rOV5YiX6KGoXG4gICAqL1xuICBtZXRob2RzOiB7XG4gICAgbWFrZVBob25lQ2FsbEhhbmRsZSgpIHtcbiAgICAgIHd4Lm1ha2VQaG9uZUNhbGwoe1xuICAgICAgICBwaG9uZU51bWJlcjogdGhpcy5kYXRhLmZlZWRiYWNrRGF0YS5waG9uZWNhbGwsXG4gICAgICAgIHN1Y2Nlc3M6ICgpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZygnc3VjY2VzcycpXG4gICAgICAgIH0sXG4gICAgICAgIGZhaWw6ICgpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZygnZmFpbCcpXG5cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gIH1cbn0pXG4iXX0=
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
// pages/components/FeedbackItem/FeedbackItem.ts
Component({
/**
* 组件的属性列表
*/
properties: {
feedbackData: {
type: Object,
value: {
phonecall: ''
}
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
makePhoneCallHandle() {
wx.makePhoneCall({
phoneNumber: this.data.feedbackData.phonecall,
success: () => {
console.log('success')
},
fail: () => {
console.log('fail')
}
})
}
}
})
<!--pages/components/FeedbackItem/FeedbackItem.wxml-->
<view class="FeedbackItem">
<view class="FeedbackItem-time">2019-09-28 8:46:32</view>
<view class="FeedbackItem-userinfo">
<view class="FeedbackItem-name">彰显则 男</view>
<view class="FeedbackItem-areaname">成都师范学院温江校区</view>
</view>
<view class="FeedbackItem-content">
佛 i 后 i 个问看见我发今晚看见短时间内夸父不期望你客气的接口就不算大看巴萨的咖色看巴萨的卡点半
</view>
<input class="FeedbackItem-input"></input>
<view class="FeedbackItem-option">
<view class="FeedbackItem-phone">
<image class="FeedbackItem-phoneIcon" src="../../../images/ic_phone@2x.png"></image>
{{feedbackData.phonecall}}
</view>
<view class="FeedbackItem-send" bindtap="makePhoneCallHandle">发送</view>
</view>
</view>
\ No newline at end of file
/* pages/components/FeedbackItem/FeedbackItem.wxss */
.FeedbackItem {
box-sizing: border-box;
width: 100%;
padding: 44rpx 40rpx 0;
}
.FeedbackItem-time {
font-size: 24rpx;
color: #999;
margin-bottom: 8rpx;
}
.FeedbackItem-userinfo {
display: flex;
justify-content: space-between;
font-size: 28rpx;
padding-bottom: 20rpx;
border-bottom: 1px solid #f7f7f7;
}
.FeedbackItem-content {
font-size: 28rpx;
padding: 40rpx 0 20rpx;
}
.FeedbackItem-input {
margin-bottom: 40rpx;
}
.FeedbackItem-option {
border-top: 1px solid #f7f7f7;
height: 104rpx;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}
.FeedbackItem-phone, .FeedbackItem-send {
width: 50%;
text-align: center;
}
.FeedbackItem-phoneIcon {
width: 28rpx;
height: 28rpx;
margin-right: 20rpx;
vertical-align: middle;
}
.FeedbackItem-phone {
color: #3ec95d;
border-right: 1px solid #f7f7f7;
}
.FeedbackItem-send {
color: #6895fe;
}
"use strict";
Component({
properties: {
navData: {
type: Object,
value: {
name: '',
icon: '',
url: '',
reLaunch: false,
},
},
},
data: {},
methods: {
clickHandle: function () {
if (this.data.navData.reLaunch) {
wx.redirectTo({
url: this.data.navData.url
});
}
else {
wx.navigateTo({
url: this.data.navData.url
});
}
}
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTmF2SXRlbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIk5hdkl0ZW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUVBLFNBQVMsQ0FBQztJQUlSLFVBQVUsRUFBRTtRQUNWLE9BQU8sRUFBRTtZQUNQLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQ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Dmja5cbiAgICovXG4gIGRhdGE6IHtcblxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHtcbiAgICBjbGlja0hhbmRsZSgpIHtcbiAgICAgIGlmICh0aGlzLmRhdGEubmF2RGF0YS5yZUxhdW5jaCkge1xuICAgICAgICB3eC5yZWRpcmVjdFRvKHtcbiAgICAgICAgICB1cmw6IHRoaXMuZGF0YS5uYXZEYXRhLnVybFxuICAgICAgICB9KVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgd3gubmF2aWdhdGVUbyh7XG4gICAgICAgICAgdXJsOiB0aGlzLmRhdGEubmF2RGF0YS51cmxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICB9XG4gIH1cbn0pXG4iXX0=
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
// pages/components/NavItem/NavItem.js
Component({
/**
* 组件的属性列表
*/
properties: {
navData: {
type: Object,
value: {
name: '',
icon: '',
url: '',
reLaunch: false,
},
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
clickHandle() {
if (this.data.navData.reLaunch) {
wx.redirectTo({
url: this.data.navData.url
})
} else {
wx.navigateTo({
url: this.data.navData.url
})
}
}
}
})
<!--pages/components/NavItem/NavItem.wxml-->
<view class="NavItem" bindtap="clickHandle">
<image class="NavItem-icon" src="{{navData.icon}}"></image>
<view class="NavItem-name">{{navData.name}}</view>
</view>
\ No newline at end of file
/* pages/components/NavItem/NavItem.wxss */
.NavItem {
margin: 60rpx 30rpx 0;
text-align: center;
}
.NavItem-icon {
width: 120rpx;
height: 120rpx;
}
.NavItem-name {
font-size: 28rpx;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("../../../utils/util");
Component({
properties: {
tagData: {
type: Object,
value: {
title: '',
numberType: '',
count: 0,
},
observer: function (newVal) {
var count = newVal.count, numberType = newVal.numberType;
var formatCount = count.toString();
if (numberType === 'price') {
formatCount = util_1.formatPrice(count);
}
this.setData({
formatCount: formatCount,
});
},
},
},
data: {
formatCount: '0',
},
methods: {},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJpY2VBbmRDb3VudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIlByaWNlQW5kQ291bnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw0Q0FBa0Q7QUFHbEQsU0FBUyxDQUFDO0lBSVIsVUFBVSxFQUFFO1FBQ1YsT0FBTyxFQUFFO1lBQ1AsSUFBSSxFQUFFLE1BQU07WUFDWixLQUFLLEVBQUU7Z0JBQ0wsS0FBSyxFQUFFLEVBQUU7Z0JBQ1QsVUFBVSxFQUFFLEVBQUU7Z0JBQ2QsS0FBSyxFQUFFLENBQUM7YUFDVDtZQUNELFFBQVEsRUFBRSxVQUFTLE1BQU07Z0JBQ2YsSUFBQSxvQkFBSyxFQUFFLDhCQUFVLENBQVk7Z0JBQ3JDLElBQUksV0FBVyxHQUFHLEtBQUssQ0FBQyxRQUFRLEVBQUUsQ0FBQztnQkFDbkMsRUFBRSxDQUFDLENBQUMsVUFBVSxLQUFLLE9BQU8sQ0FBQyxDQUFDLENBQUM7b0JBQzNCLFdBQVcsR0FBRyxrQkFBVyxDQUFDLEtBQUssQ0FBQyxDQUFDO2dCQUNuQyxDQUFDO2dCQUNELElBQUksQ0FBQyxPQUFPLENBQUM7b0JBQ1gsV0FBVyxhQUFBO2lCQUNaLENBQUMsQ0FBQztZQUNMLENBQUM7U0FDRjtLQUNGO0lBSUQsSUFBSSxFQUFFO1FBQ0osV0FBVyxFQUFFLEdBQUc7S0FDakI7SUFLRCxPQUFPLEVBQUUsRUFBRTtDQUNaLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGZvcm1hdFByaWNlIH0gZnJvbSAnLi4vLi4vLi4vdXRpbHMvdXRpbCc7XG5cbi8vIGNvbXBvbmVudHMvUHJpY2VBbmRDb3VudC9QcmljZUFuZENvdW50LmpzXG5Db21wb25lbnQoe1xuICAvKipcbiAgICog57uE5Lu255qE5bGe5oCn5YiX6KGoXG4gICAqL1xuICBwcm9wZXJ0aWVzOiB7XG4gICAgdGFnRGF0YToge1xuICAgICAgdHlwZTogT2JqZWN0LFxuICAgICAgdmFsdWU6IHtcbiAgICAgICAgdGl0bGU6ICcnLFxuICAgICAgICBudW1iZXJUeXBlOiAnJyxcbiAgICAgICAgY291bnQ6IDAsXG4gICAgICB9LFxuICAgICAgb2JzZXJ2ZXI6IGZ1bmN0aW9uKG5ld1ZhbCkge1xuICAgICAgICBjb25zdCB7IGNvdW50LCBudW1iZXJUeXBlIH0gPSBuZXdWYWw7XG4gICAgICAgIGxldCBmb3JtYXRDb3VudCA9IGNvdW50LnRvU3RyaW5nKCk7XG4gICAgICAgIGlmIChudW1iZXJUeXBlID09PSAncHJpY2UnKSB7XG4gICAgICAgICAgZm9ybWF0Q291bnQgPSBmb3JtYXRQcmljZShjb3VudCk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICBmb3JtYXRDb3VudCxcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTliJ3lp4vmlbDmja5cbiAgICovXG4gIGRhdGE6IHtcbiAgICBmb3JtYXRDb3VudDogJzAnLFxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHt9LFxufSk7XG4iXX0=
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
import { formatPrice } from '../../../utils/util';
// components/PriceAndCount/PriceAndCount.js
Component({
/**
* 组件的属性列表
*/
properties: {
tagData: {
type: Object,
value: {
title: '',
numberType: '',
count: 0,
},
observer: function(newVal) {
const { count, numberType } = newVal;
let formatCount = count.toString();
if (numberType === 'price') {
formatCount = formatPrice(count);
}
this.setData({
formatCount,
});
},
},
},
/**
* 组件的初始数据
*/
data: {
formatCount: '0',
},
/**
* 组件的方法列表
*/
methods: {},
});
<!-- components/PriceAndCount/PriceAndCount.wxml -->
<view class="PriceAndCount">
<view class="PriceAndCount-title">
<view class="PriceAndCount-title-text">{{tagData.title}}</view>
<view class="PriceAndCount-title-type">{{tagData.numberType === 'price'?'(元)':'(笔)'}}</view>
</view>
<view class="PriceAndCount-count">{{formatCount}}</view>
</view>
\ No newline at end of file
/* components/PriceAndCount/PriceAndCount.wxss */
.PriceAndCount {
width: 296rpx;
}
.PriceAndCount-title {
display: flex;
align-items: center;
font-size: 28rpx;
color: #666;
}
.PriceAndCount-title-type {
font-size: 22rpx;
margin-left: 10rpx;
}
.PriceAndCount-count {
font-size: 40rpx;
color: #333;
margin-top: 8rpx;
}
"use strict";
Component({});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VsZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiU2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxTQUFTLENBQUMsRUFBRSxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJDb21wb25lbnQoe30pO1xuIl19
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--pages/components/Select/Select.wxml-->
<view class="input">
<text>pages/components/Select/Select.wxml</text>
</view>
\ No newline at end of file
/* pages/components/Select/Select.wxss */
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("../../../utils/util");
Component({
properties: {
tagData: {
type: Object,
value: {
title: '',
numberType: '',
count: 0,
price: 0,
},
observer: function (newVal) {
var price = newVal.price;
var formatCount = util_1.formatPrice(price);
this.setData({
formatCount: formatCount,
});
},
},
},
data: {
formatCount: '0.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AgdmFsdWU6IHtcbiAgICAgICAgdGl0bGU6ICcnLFxuICAgICAgICBudW1iZXJUeXBlOiAnJyxcbiAgICAgICAgY291bnQ6IDAsXG4gICAgICAgIHByaWNlOiAwLFxuICAgICAgfSxcbiAgICAgIG9ic2VydmVyOiBmdW5jdGlvbihuZXdWYWwpIHtcbiAgICAgICAgY29uc3QgeyBwcmljZSB9ID0gbmV3VmFsO1xuICAgICAgICBsZXQgZm9ybWF0Q291bnQgPSBmb3JtYXRQcmljZShwcmljZSk7XG4gICAgICAgIHRoaXMuc2V0RGF0YSh7XG4gICAgICAgICAgZm9ybWF0Q291bnQsXG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9LFxuICB9LFxuICAvKipcbiAgICog57uE5Lu255qE5Yid5aeL5pWw5o2uXG4gICAqL1xuICBkYXRhOiB7XG4gICAgZm9ybWF0Q291bnQ6ICcwLjAwJyxcbiAgfSxcblxuICAvKipcbiAgICog57uE5Lu255qE5pa55rOV5YiX6KGoXG4gICAqL1xuICBtZXRob2RzOiB7fSxcbn0pO1xuIl19
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
import { formatPrice } from '../../../utils/util';
// pages/components/ServiceCount/ServiceCount.js
Component({
/**
* 组件的属性列表
*/
properties: {
tagData: {
type: Object,
value: {
title: '',
numberType: '',
count: 0,
price: 0,
},
observer: function(newVal) {
const { price } = newVal;
let formatCount = formatPrice(price);
this.setData({
formatCount,
});
},
},
},
/**
* 组件的初始数据
*/
data: {
formatCount: '0.00',
},
/**
* 组件的方法列表
*/
methods: {},
});
<!--pages/components/ServiceCount/ServiceCount.wxml-->
<view class="ServiceCount">
<view class="ServiceCount-color ServiceCount-color1"></view>
<view class="ServiceCount-title">{{tagData.title}}</view>
<view class="ServiceCount-tag">{{tagData.count}}笔</view>
<view class="ServiceCount-price">{{formatCount}}</view>
</view>
\ No newline at end of file
/* pages/components/ServiceCount/ServiceCount.wxss */
.ServiceCount {
width: 296rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
}
.ServiceCount-color {
width: 14rpx;
height: 20rpx;
border-radius: 7rpx;
margin-right: 16rpx;
}
.ServiceCount-color1 {
background-color: #6a92ff;
}
.ServiceCount-tag, .ServiceCount-title, .ServiceCount-price {
font-size: 26rpx;
color: #666;
}
.ServiceCount-title {
flex: 1;
}
.ServiceCount-tag {
font-size: 24rpx;
background-color: #f0f0f0;
border-radius: 20rpx;
padding: 0 16rpx;
}
.ServiceCount-price {
box-sizing: border-box;
width: 100%;
padding-left: 30rpx;
color: #333;
}
"use strict";
Page({
data: {
userdata: {
phonecall: '18108096099'
},
areaId: 0,
array: [
{ value: 1, name: 'asdd' },
{ value: 2, name: 'bjgd' },
{ value: 3, name: 'gksf' },
]
},
bindPickerChange: function (val) {
console.log(val);
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVlZGJhY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmZWVkYmFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsSUFBSSxDQUFDO0lBSUgsSUFBSSxFQUFFO1FBQ0osUUFBUSxFQUFFO1lBQ1IsU0FBUyxFQUFFLGFBQWE7U0FDekI7UUFDRCxNQUFNLEVBQUUsQ0FBQztRQUNULEtBQUssRUFBRTtZQUNMLEVBQUUsS0FBSyxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFO1lBQzFCLEVBQUUsS0FBSyxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFO1lBQzFCLEVBQUUsS0FBSyxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFO1NBQzNCO0tBQ0Y7SUFDRCxnQkFBZ0IsWUFBQyxHQUFHO1FBQ2xCLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDbEIsQ0FBQztDQUVGLENBQUMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8vIG1pbmlwcm9ncmFtL3BhZ2VzL2ZlZWRiYWNrL2ZlZWRiYWNrLmpzXG5QYWdlKHtcbiAgLyoqXG4gICAqIOmhtemdoueahOWIneWni+aVsOaNrlxuICAgKi9cbiAgZGF0YToge1xuICAgIHVzZXJkYXRhOiB7XG4gICAgICBwaG9uZWNhbGw6ICcxODEwODA5NjA5OSdcbiAgICB9LFxuICAgIGFyZWFJZDogMCxcbiAgICBhcnJheTogW1xuICAgICAgeyB2YWx1ZTogMSwgbmFtZTogJ2FzZGQnIH0sXG4gICAgICB7IHZhbHVlOiAyLCBuYW1lOiAnYmpnZCcgfSxcbiAgICAgIHsgdmFsdWU6IDMsIG5hbWU6ICdna3NmJyB9LFxuICAgIF1cbiAgfSxcbiAgYmluZFBpY2tlckNoYW5nZSh2YWwpIHtcbiAgICBjb25zb2xlLmxvZyh2YWwpXG4gIH0sXG5cbn0pIl19
\ No newline at end of file
{
"navigationBarTitleText": "反馈处理",
"usingComponents": {
"feedback-item": "../components/FeedbackItem/FeedbackItem"
}
}
\ No newline at end of file
// miniprogram/pages/feedback/feedback.js
Page({
/**
* 页面的初始数据
*/
data: {
userdata: {
phonecall: '18108096099'
},
areaId: 0,
array: [
{ value: 1, name: 'asdd' },
{ value: 2, name: 'bjgd' },
{ value: 3, name: 'gksf' },
]
},
bindPickerChange(val) {
console.log(val)
},
})
\ No newline at end of file
<!--miniprogram/pages/feedback/feedback.wxml-->
<view class="container feedback">
<view class="feedback-area">
<picker class="feedback-areaSelect" mode="selector" bindchange="bindPickerChange" value="{{areaIndex}}" range="{{areaList}}" range-key="{{'name'}}">
<view class="picker">
当前选择:{{areaList[index].name}}
</view>
</picker>
</view>
<view class="feedback-tabbar">
<view class="feedback-tabItem checked">
<text class="feedback-tabName">未处理</text>
<text class="feedback-tabCount">16</text>
</view>
<view class="feedback-tabItem">
<text class="feedback-tabName">进行中</text>
<text class="feedback-tabCount">5</text>
</view>
</view>
<view class="feedback-list">
<feedback-item feedback-data="{{userdata}}" />
</view>
</view>
\ No newline at end of file
/* miniprogram/pages/feedback/feedback.wxss */
page {
height: 100%;
}
.feedback-area {
box-sizing: border-box;
width: 100%;
padding: 20rpx 40rpx 0;
}
.feedback-areaSelect {
}
.feedback-tabbar {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 36rpx 40rpx 24rpx;
color: #999;
border-bottom: 8rpx solid #eef2fc;
}
.feedback-tabItem {
position: relative;
margin-right: 90rpx;
}
.feedback-tabItem.checked {
color: #6895ef;
}
.feedback-tabItem.checked::after {
content: '';
position: absolute;
left: 0;
bottom: -28rpx;
width: 32rpx;
height: 4rpx;
background-color: #6895ef;
}
.feedback-tabName {
font-size: 32rpx;
margin-right: 20rpx;
}
.feedback-tabCount {
background-color: #ed6863;
font-size: 24rpx;
color: #fff;
padding: 0 12rpx;
border-radius: 17rpx;
}
.feedback-list {
flex: 1;
width: 100%;
overflow: auto;
}
{
"usingComponents": {
"price-and-count": "../components/PriceAndCount/PriceAndCount",
"service-count": "../components/ServiceCount/ServiceCount"
}
}
\ No newline at end of file
import { statisticsFetch } from '../../api/fetch';
import { formatTime } from '../../utils/util';
// miniprogram/pages/home/home.js
Component({
pageLifetimes: {
show() {
!this.data.fetched && this.fetchRechargeData();
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 0,
});
}
},
},
/**
* 页面的初始数据
*/
data: {
timeType: 0,
fetched: false,
rechargeData: {
title: '充值总额',
numberType: 'price',
count: 0,
},
rechargeCount: {
title: '充值总笔数',
numberType: '',
count: 0,
},
onlineRechargeData: {
title: '线上充值',
numberType: '1',
count: 0,
price: 0,
},
offlineRechargeData: {
title: '线下充值',
numberType: '1',
count: 0,
price: 0,
},
comsumerData: {
title: '消费总额',
numberType: 'price',
count: 0,
},
comsumerCount: {
title: '消费总笔数',
numberType: '',
count: 0,
},
refundData: {
title: '退款总额',
numberType: 'price',
count: 0,
},
refundCount: {
title: '退款总笔数',
numberType: '',
count: 0,
},
testData: {
title: '充值总额',
numberType: 'price',
count: 0,
},
testData2: {
title: '线上充值',
numberType: '1',
count: 0,
price: 0,
},
},
methods: {
changeTimeType(e) {
const { timetype } = e.currentTarget.dataset;
if (timetype === this.data.timeType) return;
this.setData({
timeType: timetype,
});
this.fetchRechargeData(timetype);
return false;
},
fetchRechargeData(timeType?: number) {
if (!timeType) timeType = this.data.timeType;
const today = formatTime(new Date());
let date = today.split(' ')[0];
let entity = {};
if (timeType === 0) {
entity.date = date;
} else if (timeType === 1) {
entity.month = date.slice(0, 7);
} else if (timeType === 2) {
entity.year = date.slice(0, 4);
}
wx.showLoading({ title: '' });
statisticsFetch({
url: '/dcxy/reportInfo/queryRechargeOrderListV2',
method: 'POST',
data: entity,
})
.then(res => {
wx.hideLoading();
const data = res.rechargeOrderCountVo;
if (data) {
const {
rechargeMen,
rechargeMoney,
refundCount,
refundMoney,
offlineRechargeMen,
offlineRechargeMoney,
onlineRechargeMen,
onlineRechargeMoney,
} = data;
this.setData({
'rechargeData.count': rechargeMoney,
'rechargeCount.count': rechargeMen,
'refundData.count': refundMoney,
'refundCount.count': refundCount,
'onlineRechargeData.price': onlineRechargeMoney,
'onlineRechargeData.count': onlineRechargeMen,
'offlineRechargeData.price': offlineRechargeMoney,
'offlineRechargeData.count': offlineRechargeMen,
});
}
})
.catch((err: wx.GeneralCallbackResult) => {
wx.hideLoading();
wx.showToast({
title: err.errMsg,
});
console.log(err);
});
},
},
});
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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