diff --git a/components/uni-forms-item/uni-forms-item.vue b/components/uni-forms-item/uni-forms-item.vue
new file mode 100644
index 0000000..9a6435c
--- /dev/null
+++ b/components/uni-forms-item/uni-forms-item.vue
@@ -0,0 +1,438 @@
+
+
+
+
+
+
+ {{label}}
+ *
+
+
+
+
+
+
+ {{ showMsg === 'undertext' ? msg:'' }}
+
+
+
+
+
+
diff --git a/components/uni-forms/uni-forms.vue b/components/uni-forms/uni-forms.vue
new file mode 100644
index 0000000..cdbecd9
--- /dev/null
+++ b/components/uni-forms/uni-forms.vue
@@ -0,0 +1,444 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/components/uni-forms/validate.js b/components/uni-forms/validate.js
new file mode 100644
index 0000000..e369abb
--- /dev/null
+++ b/components/uni-forms/validate.js
@@ -0,0 +1,442 @@
+
+var pattern = {
+ email: /^\S+?@\S+?\.\S+?$/,
+ url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i')
+};
+
+const FORMAT_MAPPING = {
+ "int": 'number',
+ "bool": 'boolean',
+ "double": 'number',
+ "long": 'number',
+ "password": 'string'
+}
+
+function formatMessage(args, resources) {
+ var defaultMessage = ['label']
+ defaultMessage.forEach((item) => {
+ if (args[item] === undefined) {
+ args[item] = ''
+ }
+ })
+
+ let str = resources
+ for (let key in args) {
+ let reg = new RegExp('{' + key + '}')
+ str = str.replace(reg, args[key])
+ }
+ return str
+}
+
+function isEmptyValue(value, type) {
+ if (value === undefined || value === null) {
+ return true;
+ }
+
+ if (typeof value === 'string' && !value) {
+ return true;
+ }
+
+ if (Array.isArray(value) && !value.length) {
+ return true;
+ }
+
+ if (type === 'object' && !Object.keys(value).length) {
+ return true;
+ }
+
+ return false;
+}
+
+const types = {
+ integer(value) {
+ return types.number(value) && parseInt(value, 10) === value;
+ },
+ string(value) {
+ return typeof value === 'string';
+ },
+ number(value) {
+ if (isNaN(value)) {
+ return false;
+ }
+ return typeof value === 'number';
+ },
+ "boolean": function (value) {
+ return typeof value === 'boolean';
+ },
+ "float": function (value) {
+ return types.number(value) && !types.integer(value);
+ },
+ array(value) {
+ return Array.isArray(value);
+ },
+ object(value) {
+ return typeof value === 'object' && !types.array(value);
+ },
+ date(value) {
+ var v
+ if (value instanceof Date) {
+ v = value;
+ } else {
+ v = new Date(value);
+ }
+ return typeof v.getTime === 'function' && typeof v.getMonth === 'function' && typeof v.getYear === 'function' && !isNaN(v.getTime());
+ },
+ timestamp(value) {
+ if (!this.integer(value) || Math.abs(value).toString().length > 16) {
+ return false
+ }
+
+ return this.date(value);
+ },
+ email(value) {
+ return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
+ },
+ url(value) {
+ return typeof value === 'string' && !!value.match(pattern.url);
+ },
+ pattern(reg, value) {
+ try {
+ return new RegExp(reg).test(value);
+ } catch (e) {
+ return false;
+ }
+ },
+ method(value) {
+ return typeof value === 'function';
+ }
+}
+
+class RuleValidator {
+
+ constructor(message) {
+ this._message = message
+ }
+
+ async validateRule(key, value, data, allData) {
+ var result = null
+
+ let rules = key.rules
+
+ let hasRequired = rules.findIndex((item) => {
+ return item.required
+ })
+ if (hasRequired < 0) {
+ if (value === null || value === undefined) {
+ return result
+ }
+ if (typeof value === 'string' && !value.length) {
+ return result
+ }
+ }
+
+ var message = this._message
+
+ if (rules === undefined) {
+ return message['default']
+ }
+
+ for (var i = 0; i < rules.length; i++) {
+ let rule = rules[i]
+ let vt = this._getValidateType(rule)
+
+ if (key.label !== undefined) {
+ Object.assign(rule, {
+ label: key.label
+ })
+ }
+
+ if (RuleValidatorHelper[vt]) {
+ result = RuleValidatorHelper[vt](rule, value, message)
+ if (result != null) {
+ break
+ }
+ }
+
+ if (rule.validateExpr) {
+ let now = Date.now()
+ let resultExpr = rule.validateExpr(value, allData, now)
+ if (resultExpr === false) {
+ result = this._getMessage(rule, rule.errorMessage || this._message['default'])
+ break
+ }
+ }
+
+ if (rule.validateFunction) {
+ result = await this.validateFunction(rule, value, data, allData, vt)
+ if (result !== null) {
+ break
+ }
+ }
+ }
+
+ return result
+ }
+
+ async validateFunction(rule, value, data, allData, vt) {
+ let result = null
+ try {
+ let callbackMessage = null
+ const res = await rule.validateFunction(rule, value, allData || data, (message) => {
+ callbackMessage = message
+ })
+ if (callbackMessage || (typeof res === 'string' && res) || res === false) {
+ result = this._getMessage(rule, callbackMessage || res, vt)
+ }
+ } catch (e) {
+ result = this._getMessage(rule, e.message, vt)
+ }
+ return result
+ }
+
+ _getMessage(rule, message, vt) {
+ return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default'])
+ }
+
+ _getValidateType(rule) {
+ // TODO
+ var result = ''
+ if (rule.required) {
+ result = 'required'
+ } else if (rule.format) {
+ result = 'format'
+ } else if (rule.range) {
+ result = 'range'
+ } else if (rule.maximum || rule.minimum) {
+ result = 'rangeNumber'
+ } else if (rule.maxLength || rule.minLength) {
+ result = 'rangeLength'
+ } else if (rule.pattern) {
+ result = 'pattern'
+ }
+ return result
+ }
+}
+
+const RuleValidatorHelper = {
+ required(rule, value, message) {
+ if (rule.required && isEmptyValue(value, rule.format || typeof value)) {
+ return formatMessage(rule, rule.errorMessage || message.required);
+ }
+
+ return null
+ },
+
+ range(rule, value, message) {
+ const { range, errorMessage } = rule;
+
+ let list = new Array(range.length);
+ for (let i = 0; i < range.length; i++) {
+ const item = range[i];
+ if (types.object(item) && item.value !== undefined) {
+ list[i] = item.value;
+ } else {
+ list[i] = item;
+ }
+ }
+
+ let result = false
+ if (Array.isArray(value)) {
+ result = (new Set(value.concat(list)).size === list.length);
+ } else {
+ if (list.indexOf(value) > -1) {
+ result = true;
+ }
+ }
+
+ if (!result) {
+ return formatMessage(rule, errorMessage || message['enum']);
+ }
+
+ return null
+ },
+
+ rangeNumber(rule, value, message) {
+ if (!types.number(value)) {
+ return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
+ }
+
+ let { minimum, maximum, exclusiveMinimum, exclusiveMaximum } = rule;
+ let min = exclusiveMinimum ? value <= minimum : value < minimum;
+ let max = exclusiveMaximum ? value >= maximum : value > maximum;
+
+ if (minimum !== undefined && min) {
+ return formatMessage(rule, rule.errorMessage || message['number'].min)
+ } else if (maximum !== undefined && max) {
+ return formatMessage(rule, rule.errorMessage || message['number'].max)
+ } else if (minimum !== undefined && maximum !== undefined && (min || max)) {
+ return formatMessage(rule, rule.errorMessage || message['number'].range)
+ }
+
+ return null
+ },
+
+ rangeLength(rule, value, message) {
+ if (!types.string(value) && !types.array(value)) {
+ return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
+ }
+
+ let min = rule.minLength;
+ let max = rule.maxLength;
+ let val = value.length;
+
+ if (min !== undefined && val < min) {
+ return formatMessage(rule, rule.errorMessage || message['length'].min)
+ } else if (max !== undefined && val > max) {
+ return formatMessage(rule, rule.errorMessage || message['length'].max)
+ } else if (min !== undefined && max !== undefined && (val < min || val > max)) {
+ return formatMessage(rule, rule.errorMessage || message['length'].range)
+ }
+
+ return null
+ },
+
+ pattern(rule, value, message) {
+ if (!types['pattern'](rule.pattern, value)) {
+ return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
+ }
+
+ return null
+ },
+
+ format(rule, value, message) {
+ var customTypes = Object.keys(types);
+ var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format;
+
+ if (customTypes.indexOf(format) > -1) {
+ if (!types[format](value)) {
+ return formatMessage(rule, rule.errorMessage || message.types[format]);
+ }
+ }
+
+ return null
+ }
+}
+
+class SchemaValidator extends RuleValidator {
+
+ constructor(schema, options) {
+ super(SchemaValidator.message);
+
+ this._schema = schema
+ this._options = options || null
+ }
+
+ updateSchema(schema) {
+ this._schema = schema
+ }
+
+ async validate(data, allData) {
+ let result = this._checkFieldInSchema(data)
+ if (!result) {
+ result = await this.invokeValidate(data, false, allData)
+ }
+ return result.length ? result[0] : null
+ }
+
+ async validateAll(data, allData) {
+ let result = this._checkFieldInSchema(data)
+ if (!result) {
+ result = await this.invokeValidate(data, true, allData)
+ }
+ return result
+ }
+
+ async validateUpdate(data, allData) {
+ let result = this._checkFieldInSchema(data)
+ if (!result) {
+ result = await this.invokeValidateUpdate(data, false, allData)
+ }
+ return result.length ? result[0] : null
+ }
+
+ async invokeValidate(data, all, allData) {
+ let result = []
+ let schema = this._schema
+ for (let key in schema) {
+ let value = schema[key]
+ let errorMessage = await this.validateRule(value, data[key], data, allData)
+ if (errorMessage != null) {
+ result.push({
+ key,
+ errorMessage
+ })
+ if (!all) break
+ }
+ }
+ return result
+ }
+
+ async invokeValidateUpdate(data, all, allData) {
+ let result = []
+ for (let key in data) {
+ let errorMessage = await this.validateRule(this._schema[key], data[key], data, allData)
+ if (errorMessage != null) {
+ result.push({
+ key,
+ errorMessage
+ })
+ if (!all) break
+ }
+ }
+ return result
+ }
+
+ _checkFieldInSchema(data) {
+ var keys = Object.keys(data)
+ var keys2 = Object.keys(this._schema)
+ if (new Set(keys.concat(keys2)).size === keys2.length) {
+ return ''
+ }
+ return [{
+ key: 'invalid',
+ errorMessage: SchemaValidator.message['defaultInvalid']
+ }]
+ }
+}
+
+function Message() {
+ return {
+ default: '验证错误',
+ defaultInvalid: '字段超出范围',
+ required: '{label}必填',
+ 'enum': '{label}超出范围',
+ whitespace: '{label}不能为空',
+ date: {
+ format: '{label}日期{value}格式无效',
+ parse: '{label}日期无法解析,{value}无效',
+ invalid: '{label}日期{value}无效'
+ },
+ types: {
+ string: '{label}类型无效',
+ array: '{label}类型无效',
+ object: '{label}类型无效',
+ number: '{label}类型无效',
+ date: '{label}类型无效',
+ boolean: '{label}类型无效',
+ integer: '{label}类型无效',
+ float: '{label}类型无效',
+ regexp: '{label}无效',
+ email: '{label}类型无效',
+ url: '{label}类型无效'
+ },
+ length: {
+ min: '{label}长度不能少于{minLength}',
+ max: '{label}长度不能超过{maxLength}',
+ range: '{label}必须介于{minLength}和{maxLength}之间'
+ },
+ number: {
+ min: '{label}不能小于{minimum}',
+ max: '{label}不能大于{maximum}',
+ range: '{label}必须介于{minimum}and{maximum}之间'
+ },
+ pattern: {
+ mismatch: '{label}格式不匹配'
+ }
+ };
+}
+
+
+SchemaValidator.message = new Message();
+
+export default SchemaValidator
diff --git a/components/usp-tinymce/dynamicLoadScript.js b/components/usp-tinymce/dynamicLoadScript.js
new file mode 100644
index 0000000..a6e1841
--- /dev/null
+++ b/components/usp-tinymce/dynamicLoadScript.js
@@ -0,0 +1,59 @@
+let callbacks = []
+
+function loadedTinymce() {
+ // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2144
+ // check is successfully downloaded script
+ return window.tinymce
+}
+
+const dynamicLoadScript = (src, callback) => {
+ const existingScript = document.getElementById(src)
+ const cb = callback || function() {}
+
+ if (!existingScript) {
+ const script = document.createElement('script')
+ script.src = src // src url for the third-party library being loaded.
+ script.id = src
+ document.body.appendChild(script)
+ callbacks.push(cb)
+ const onEnd = 'onload' in script ? stdOnEnd : ieOnEnd
+ onEnd(script)
+ }
+
+ if (existingScript && cb) {
+ if (loadedTinymce()) {
+ cb(null, existingScript)
+ } else {
+ callbacks.push(cb)
+ }
+ }
+
+ function stdOnEnd(script) {
+ script.onload = function() {
+ // this.onload = null here is necessary
+ // because even IE9 works not like others
+ this.onerror = this.onload = null
+ for (const cb of callbacks) {
+ cb(null, script)
+ }
+ callbacks = null
+ }
+ script.onerror = function() {
+ this.onerror = this.onload = null
+ cb(new Error('Failed to load ' + src), script)
+ }
+ }
+
+ function ieOnEnd(script) {
+ script.onreadystatechange = function() {
+ if (this.readyState !== 'complete' && this.readyState !== 'loaded') return
+ this.onreadystatechange = null
+ for (const cb of callbacks) {
+ cb(null, script) // there is no way to catch loading errors in IE8
+ }
+ callbacks = null
+ }
+ }
+}
+
+export default dynamicLoadScript
diff --git a/components/usp-tinymce/plugins.js b/components/usp-tinymce/plugins.js
new file mode 100644
index 0000000..53d2edb
--- /dev/null
+++ b/components/usp-tinymce/plugins.js
@@ -0,0 +1,41 @@
+// Any plugins you want to use has to be imported
+// Detail plugins list see https://www.tinymce.com/docs/plugins/
+// Custom builds see https://www.tinymce.com/download/custom-builds/
+
+const plugins = [
+ `
+ advlist
+ autolink
+ autosave
+ code
+ codesample
+ colorpicker
+ colorpicker
+ contextmenu
+ directionality
+ emoticons
+ fullscreen
+ hr
+ image
+ imagetools
+ insertdatetime
+ lists
+ media
+ nonbreaking
+ noneditable
+ paste
+ preview
+ print
+ save
+ searchreplace
+ tabfocus
+ table
+ textcolor
+ textpattern
+ visualblocks
+ visualchars
+ wordcount
+ `
+]
+
+export default plugins
diff --git a/components/usp-tinymce/toolbar.js b/components/usp-tinymce/toolbar.js
new file mode 100644
index 0000000..fab16a7
--- /dev/null
+++ b/components/usp-tinymce/toolbar.js
@@ -0,0 +1,9 @@
+// Here is a list of the toolbar
+// Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
+
+const toolbar = [
+ 'bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript',
+ 'hr bullist numlist image table forecolor backcolor code preview fullscreen'
+]
+
+export default toolbar
diff --git a/components/usp-tinymce/usp-tinymce.vue b/components/usp-tinymce/usp-tinymce.vue
new file mode 100644
index 0000000..3ea1e70
--- /dev/null
+++ b/components/usp-tinymce/usp-tinymce.vue
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 647e41f..b347d85 100644
--- a/pages.json
+++ b/pages.json
@@ -1,324 +1,341 @@
-{
- "easycom": {
- "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
- },
- "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
- {
- "path": "pages/home/home",
- "style": {
- "navigationStyle": "custom"
- }
- },{
- "path": "pages/login/login",
- "style": {
- "navigationStyle": "custom"
- }
- },{
- "path": "pages/workbench/workbench",
- "style": {
- "navigationStyle": "custom"
- }
- }, {
- "path": "pages/my/my",
- "style": {
- "navigationStyle": "custom"
- }
- },{
- "path": "pages/apply/apply",
- "style": {
- "navigationBarTitleText": "申请记录",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/shops/shops",
- "style": {
- "navigationBarTitleText": "租商铺",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/applyDetail/applyDetail",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/message/message",
- "style": {
- "navigationStyle": "custom"
- }
- },{
- "path": "pages/field/field",
- "style": {
- "navigationBarTitleText": "租场地",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/advertisementDetail/advertisementDetail",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/advertisement/advertisement",
- "style": {
- "navigationBarTitleText": "租广告",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/details/details",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/leaseAdd/leaseAdd",
- "style": {
- "navigationBarTitleText": "申请租赁",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/intentionApply/intentionApply",
- "style": {
- "navigationBarTitleText": "意向申请",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/recordService/recordService",
- "style": {
- "navigationBarTitleText": "服务记录",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/activityAdd/activityAdd",
- "style": {
- "navigationBarTitleText": "活动申请",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/complaint/complaint",
- "style": {
- "navigationBarTitleText": "投诉建议",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/repair/repair",
- "style": {
- "navigationBarTitleText": "故障报修",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/advertisementTime/advertisementTime",
- "style": {
- "navigationBarTitleText": "租赁时段选择",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },{
- "path": "pages/advertisementAdd/advertisementAdd",
- "style": {
- "navigationBarTitleText": "广告申请",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/participation/participation",
- "style": {
- "navigationBarTitleText": "活动参与",
- "navigationBarBackgroundColor": "#fff",
- "enablePullDownRefresh": true
- }
- },
- {
- "path": "pages/questionnaire/questionnaire",
- "style": {
- "navigationBarTitleText": "问卷调查",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/createQuestionnaire/createQuestionnaire",
- "style": {
- "navigationBarTitleText": "创建问卷",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/mycreated/mycreated",
- "style": {
- "navigationBarTitleText": "我的活动申请",
- "navigationBarBackgroundColor": "#FFFFFF",
- "enablePullDownRefresh": true
- }
- },
- {
- "path": "pages/record/record",
- "style": {
- "navigationBarTitleText": "申请记录",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/accepting/accepting",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/servicerecords/servicerecords",
- "style": {
- "navigationBarTitleText": "服务记录",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/servicedetails/servicedetails",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/application/application",
- "style": {
- "navigationBarTitleText": "推广方案申请",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/projectManagement/projectManagement",
- "style": {
- "navigationBarTitleText": "推广方案管理",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/shopjcMsg/shopjcMsg",
- "style": {
- "navigationBarTitleText": "商家基本信息",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/procedure/procedure",
- "style": {
- "navigationBarTitleText": "公告通知",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/salesReporting/salesReporting",
- "style": {
- "navigationBarTitleText": "销售上报",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/orderList/orderList",
- "style": {
- "navigationBarTitleText": "订单查询",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/salesSta/salesSta",
- "style": {
- "navigationBarTitleText": "销售统计",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/Iproposal/Iproposal",
- "style": {
- "navigationBarTitleText": "招商方案",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- // 营销推广活动
- {
- "path": "pages/marketing/marketingList/marketingList",
- "style": {
- "navigationBarTitleText": "营销推广活动",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/marketing/marketingDetail/marketingDetail",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- // 商务合作
- {
- "path": "pages/business/businessList/businessList",
- "style": {
- "navigationBarTitleText": "商务合作",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/business/businessDetail/businessDetail",
- "style": {
- "navigationBarTitleText": "详情",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- // 物业缴费
- {
- "path": "pages/propertyPay/propertyPayList/propertyPayList",
- "style": {
- "navigationBarTitleText": "物业缴费",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/propertyPay/payRecord/payRecord",
- "style": {
- "navigationBarTitleText": "缴费记录",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- },
- {
- "path": "pages/propertyPay/payDetail/payDetail",
- "style": {
- "navigationBarTitleText": "缴费记录",
- "navigationBarBackgroundColor": "#FFFFFF"
- }
- }
- ],
- "globalStyle": {
- "navigationBarTextStyle": "black"
- },
- "tabBar": {
- "custom": true,
- "selectedColor": "#F15A29",
- "backgroundColor": "#fff",
- "list": [{
- "iconPath": "/static/tabbar/tab_01.png",
- "selectedIconPath": "/static/tabbar/tab_02.png",
- "pagePath": "pages/home/home",
- "text": ""
- },
- {
- "selectedIconPath": "/static/tabbar/tab_03.png",
- "iconPath": "/static/tabbar/tab_04.png",
- "pagePath": "pages/workbench/workbench",
- "text": ""
- },
- {
- "iconPath": "/static/tabbar/tab_05.png",
- "selectedIconPath": "/static/tabbar/tab_06.png",
- "pagePath": "pages/message/message",
- "text": ""
- },
- {
- "iconPath": "/static/tabbar/tab_07.png",
- "selectedIconPath": "/static/tabbar/tab_08.png",
- "pagePath": "pages/my/my",
- "text": ""
- }
- ]
- }
-}
+{
+ "easycom": {
+ "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+ },
+ "pages": [
+ {
+ "path": "pages/home/home",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/login/login",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/workbench/workbench",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/my/my",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/apply/apply",
+ "style": {
+ "navigationBarTitleText": "申请记录",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/shops/shops",
+ "style": {
+ "navigationBarTitleText": "租商铺",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/applyDetail/applyDetail",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/message/message",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/field/field",
+ "style": {
+ "navigationBarTitleText": "租场地",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/advertisementDetail/advertisementDetail",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/advertisement/advertisement",
+ "style": {
+ "navigationBarTitleText": "租广告",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/details/details",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/leaseAdd/leaseAdd",
+ "style": {
+ "navigationBarTitleText": "申请租赁",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/intentionApply/intentionApply",
+ "style": {
+ "navigationBarTitleText": "意向申请",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/recordService/recordService",
+ "style": {
+ "navigationBarTitleText": "服务记录",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/activityAdd/activityAdd",
+ "style": {
+ "navigationBarTitleText": "活动申请",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/complaint/complaint",
+ "style": {
+ "navigationBarTitleText": "投诉建议",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/repair/repair",
+ "style": {
+ "navigationBarTitleText": "故障报修",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/advertisementTime/advertisementTime",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "投放时段",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/advertisementAdd/advertisementAdd",
+ "style": {
+ "navigationBarTitleText": "广告申请",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/participation/participation",
+ "style": {
+ "navigationBarTitleText": "活动参与",
+ "navigationBarBackgroundColor": "#fff",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/questionnaire/questionnaire",
+ "style": {
+ "navigationBarTitleText": "问卷调查",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/createQuestionnaire/createQuestionnaire",
+ "style": {
+ "navigationBarTitleText": "创建问卷",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/mycreated/mycreated",
+ "style": {
+ "navigationBarTitleText": "我的活动申请",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/record/record",
+ "style": {
+ "navigationBarTitleText": "申请记录",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/accepting/accepting",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/servicerecords/servicerecords",
+ "style": {
+ "navigationBarTitleText": "服务记录",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/servicedetails/servicedetails",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/application/application",
+ "style": {
+ "navigationBarTitleText": "推广方案申请",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/projectManagement/projectManagement",
+ "style": {
+ "navigationBarTitleText": "推广方案管理",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/shopjcMsg/shopjcMsg",
+ "style": {
+ "navigationBarTitleText": "商家基本信息",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/procedure/procedure",
+ "style": {
+ "navigationBarTitleText": "公告通知",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/salesReporting/salesReporting",
+ "style": {
+ "navigationBarTitleText": "销售上报",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/orderList/orderList",
+ "style": {
+ "navigationBarTitleText": "订单查询",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/salesSta/salesSta",
+ "style": {
+ "navigationBarTitleText": "销售统计",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/Iproposal/Iproposal",
+ "style": {
+ "navigationBarTitleText": "招商方案",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/marketing/marketingList/marketingList",
+ "style": {
+ "navigationBarTitleText": "营销推广活动",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/marketing/marketingDetail/marketingDetail",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/business/businessList/businessList",
+ "style": {
+ "navigationBarTitleText": "商务合作",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/business/businessDetail/businessDetail",
+ "style": {
+ "navigationBarTitleText": "详情",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/propertyPay/propertyPayList/propertyPayList",
+ "style": {
+ "navigationBarTitleText": "物业缴费",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/propertyPay/payRecord/payRecord",
+ "style": {
+ "navigationBarTitleText": "缴费记录",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ },
+ {
+ "path": "pages/propertyPay/payDetail/payDetail",
+ "style": {
+ "navigationBarTitleText": "缴费记录",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ }
+ }
+
+ ],
+ "globalStyle": {
+ "navigationBarTextStyle": "black"
+ },
+ "tabBar": {
+ "custom": true,
+ "selectedColor": "#F15A29",
+ "backgroundColor": "#fff",
+ "list": [
+ {
+ "iconPath": "/static/tabbar/tab_01.png",
+ "selectedIconPath": "/static/tabbar/tab_02.png",
+ "pagePath": "pages/home/home",
+ "text": ""
+ },
+ {
+ "selectedIconPath": "/static/tabbar/tab_03.png",
+ "iconPath": "/static/tabbar/tab_04.png",
+ "pagePath": "pages/workbench/workbench",
+ "text": ""
+ },
+ {
+ "iconPath": "/static/tabbar/tab_05.png",
+ "selectedIconPath": "/static/tabbar/tab_06.png",
+ "pagePath": "pages/message/message",
+ "text": ""
+ },
+ {
+ "iconPath": "/static/tabbar/tab_07.png",
+ "selectedIconPath": "/static/tabbar/tab_08.png",
+ "pagePath": "pages/my/my",
+ "text": ""
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/uniCloud-tcb/cloudfunctions/usp-test/index.js b/uniCloud-tcb/cloudfunctions/usp-test/index.js
new file mode 100644
index 0000000..937021a
--- /dev/null
+++ b/uniCloud-tcb/cloudfunctions/usp-test/index.js
@@ -0,0 +1,8 @@
+'use strict';
+exports.main = async (event, context) => {
+ //event为客户端上传的参数
+ console.log('event : ', event)
+
+ //返回数据给客户端
+ return event
+};
diff --git a/uniCloud-tcb/cloudfunctions/usp-test/package.json b/uniCloud-tcb/cloudfunctions/usp-test/package.json
new file mode 100644
index 0000000..ffb2585
--- /dev/null
+++ b/uniCloud-tcb/cloudfunctions/usp-test/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "usp-test",
+ "origin-plugin-dev-name": "usp-tinymce",
+ "origin-plugin-version": "1.0.0",
+ "plugin-dev-name": "usp-tinymce",
+ "plugin-version": "1.0.0",
+ "description": ""
+}
\ No newline at end of file
diff --git a/uni_modules/wn-calendar/components/wn-calendar/calendar.js b/uni_modules/wn-calendar/components/wn-calendar/calendar.js
new file mode 100644
index 0000000..5a49439
--- /dev/null
+++ b/uni_modules/wn-calendar/components/wn-calendar/calendar.js
@@ -0,0 +1,129 @@
+/**
+ *
+ */
+
+function getDays(year, month, data, isLess) {
+ if (!Array.isArray(data)) {
+ data = []
+ }
+
+ let today = new Date()
+
+ let y, m
+ if (typeof(year) === 'number' && year > 2000 && typeof(month) === 'number') {
+ const d = new Date(year, month - 1)
+ y = d.getFullYear()
+ m = d.getMonth()
+ } else {
+ y = today.getFullYear()
+ m = today.getMonth()
+ }
+
+ let st = new Date(y, m, 1).getDay(),
+ ed = new Date(y, m + 1, 0).getDay(),
+ len = new Date(y, m + 1, 0).getDate()
+
+ let isfill = data.length > 0
+ let days = Array.from(new Array(len), (x, i) => {
+ i = i + 1
+ const date = `${y}/${m+1}/${i}`
+ x = null
+ if (isfill) {
+ x = data.find(item => item.date === date)
+ }
+ return {
+ show: true,
+ label: i,
+ date,
+ data: x
+ }
+ })
+
+ let prev = new Date(y, m - 1),
+ prevDate = `${prev.getFullYear()}/${prev.getMonth()+1}`,
+ prevLd = new Date(y, m, 0).getDate()
+ let prevDays = Array.from(new Array(st), (x, i) => {
+ i = prevLd - (st - 1 - i)
+ return {
+ show: false,
+ label: isLess ? '' : i,
+ date: `${prevDate}/${i}`
+ }
+ })
+ days = prevDays.concat(days)
+
+ let next = new Date(y, m + 1),
+ nextDate = `${next.getFullYear()}/${next.getMonth()+1}`
+ let lened = (days.length <= 35 ? 7 : 0) + (6 - ed)
+ if (isLess) {
+ lened = 6 - ed
+ }
+ let nextDays = Array.from(new Array(lened), (x, i) => {
+ i = i + 1
+ return {
+ show: false,
+ label: isLess ? '' : i,
+ date: `${nextDate}/${i}`
+ }
+ })
+ days = days.concat(nextDays)
+
+ days = days.concat(Array.from(new Array(42 - days.length), (x, i) => {
+ return {
+ show: false,
+ label: '',
+ date: `*${i}`
+ }
+ }))
+
+ return {
+ days,
+ year: y,
+ month: m
+ }
+}
+
+function getEn (m) {
+ const en = [
+ 'Jan',
+ 'Feb',
+ 'Mar',
+ 'Apr',
+ 'May',
+ 'Jun',
+ 'Jul',
+ 'Aug',
+ 'Sept',
+ 'Oct',
+ 'Nov',
+ 'Dec',
+ ]
+ return en[m - 1]
+}
+
+const labels_en = [
+ 'Sun',
+ 'Mon',
+ 'Tues',
+ 'Wed',
+ 'Thur',
+ 'Fri',
+ 'Sat',
+]
+
+const labels_zh = [
+ '日',
+ '一',
+ '二',
+ '三',
+ '四',
+ '五',
+ '六',
+]
+
+export default {
+ getDays,
+ getEn,
+ labels_en,
+ labels_zh
+}
\ No newline at end of file
diff --git a/uni_modules/wn-calendar/components/wn-calendar/wn-calendar.vue b/uni_modules/wn-calendar/components/wn-calendar/wn-calendar.vue
new file mode 100644
index 0000000..e7927f3
--- /dev/null
+++ b/uni_modules/wn-calendar/components/wn-calendar/wn-calendar.vue
@@ -0,0 +1,258 @@
+
+
+
+
+
+ {{headText}}
+
+
+
+
+
+ {{label}}
+
+
+
+
+
+ {{item.label}}
+ {{item.data.text}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni_modules/wn-calendar/package.json b/uni_modules/wn-calendar/package.json
new file mode 100644
index 0000000..1f3c95b
--- /dev/null
+++ b/uni_modules/wn-calendar/package.json
@@ -0,0 +1,15 @@
+{
+ "id": "wn-calendar",
+ "name": "wn-calendar",
+ "displayName": "wn-calendar 展示打卡日历",
+ "version": "1.0.0",
+ "description": "展示打卡日历组件 | 主打轻巧易改、支持填充文本多色彩、选中日期返回、中英语言",
+ "keywords": [
+ "日历",
+ "calendar",
+ "日期",
+ "打卡",
+ "打点"
+],
+ "author": "Wenyp"
+}