diff --git a/api/mall/goods.js b/api/mall/goods.js new file mode 100644 index 0000000..0797a2d --- /dev/null +++ b/api/mall/goods.js @@ -0,0 +1,68 @@ +import { + request +} from "@/utils/request"; + +export default { + list(data) { + return request({ + url: "/shop/shopGoods/goodsList", + method: "POST", + data, + }); + }, + + goodsEditAttribute(data) { + return request({ + url: "/shop/shopGoods/goodsEditAttribute", + method: "POST", + data, + }); + }, + + classify: { + list(data) { + return request({ + url: "/shop/shopClassify/list", + method: "POST", + data, + }); + }, + + createItem(data) { + return request({ + url: "/shop/shopClassify/createItem", + method: "POST", + data, + }); + }, + + }, + + freightRules(data) { + return request({ + url: "/shop/freightRules/list", + method: "POST", + data, + }); + }, + + goodsItem(data) { + return request({ + url: "/shop/shopGoods/goodsItem", + method: "POST", + data, + }); + }, + + goodsEdit(data) { + return request({ + url: "/shop/shopGoods/goodsEdit", + method: "POST", + data, + }); + }, + + + + +}; \ No newline at end of file diff --git a/api/mall/index.js b/api/mall/index.js new file mode 100644 index 0000000..290068f --- /dev/null +++ b/api/mall/index.js @@ -0,0 +1,50 @@ +import { + request +} from "@/utils/request"; + +export default { + dataCount: { + oneLine(data) { + return request({ + url: "/shop/dataCount/oneLine", + method: "POST", + data, + }); + }, + orderProfit(data) { + return request({ + url: "/shop/dataCount/orderProfit", + method: "POST", + data, + }); + }, + orderGood(data) { + return request({ + url: "/shop/dataCount/orderGood", + method: "POST", + data, + }); + }, + + }, + + getStoreSetting(data) { + return request({ + url: "/shop/store/getStoreSetting", + method: "POST", + data, + }) + }, + + setStoreSetting(data) { + return request({ + url: "/shop/store/setStoreSetting", + method: "POST", + data, + }) + } + + + + +}; \ No newline at end of file diff --git a/api/mall/order.js b/api/mall/order.js new file mode 100644 index 0000000..2db8022 --- /dev/null +++ b/api/mall/order.js @@ -0,0 +1,106 @@ +import { + request +} from "@/utils/request"; + +export default { + orderList(data) { + return request({ + url: "/shop/order/orderList", + method: "POST", + data, + }); + }, + + orderSend(data) { + return request({ + url: "/shop/order/orderSend", + method: "POST", + data, + }); + }, + + GetExpressList(data) { + return request({ + url: "/admin/order/GetExpressList", + method: "POST", + data, + }); + }, + + printOrder(data) { + return request({ + url: "/shop/order/printOrder", + method: "POST", + data, + }); + }, + + updateNotes(data) { + return request({ + url: "/shop/order/updateNotes", + method: "POST", + data, + }); + }, + + // 核销记录 + checkLog(data) { + return request({ + url: "/shop/shop/checkLog", + method: "POST", + data, + }); + }, + + confirmCancel(data) { + return request({ + url: "/shop/order/confirmCancel", + method: "POST", + data, + }); + }, + + after_sale: { + index(data) { + return request({ + url: "/shop/after_sale/index", + method: "POST", + data, + }); + }, + + + update(data) { + return request({ + url: "/shop/after_sale/update", + method: "POST", + data, + }); + }, + + show(data) { + return request({ + url: "/shop/after_sale/show", + method: "POST", + data, + }); + }, + + express(data) { + return request({ + url: "/client/common/express", + method: "POST", + data, + }); + }, + enums(data) { + return request({ + url: "/client/after_sale/enums", + method: "POST", + data, + }); + }, + + }, + +}; \ No newline at end of file diff --git a/api/mall/shop.js b/api/mall/shop.js new file mode 100644 index 0000000..cd040f2 --- /dev/null +++ b/api/mall/shop.js @@ -0,0 +1,41 @@ +import { + request +} from "@/utils/request"; + +export default { + + list(data) { + return request({ + url: "/shop/shop/List", + method: "POST", + data, + }) + }, + + edit(data) { + return request({ + url: "/shop/shop/edit", + method: "POST", + data, + }) + }, + + editStatus(data) { + return request({ + url: "/shop/shop/editStatus", + method: "POST", + data, + }) + }, + + synchronousGoods(data) { + return request({ + url: "/shop/shop/synchronousGoods", + method: "POST", + data, + }) + }, + + + +}; \ No newline at end of file diff --git a/api/mall/user.js b/api/mall/user.js new file mode 100644 index 0000000..0afaa74 --- /dev/null +++ b/api/mall/user.js @@ -0,0 +1,51 @@ +import { + request +} from "@/utils/request"; + +export default { + + userList(data) { + return request({ + url: "/shop/user/userList", + method: "GET", + data, + }) + }, + + userItem(data) { + return request({ + url: "/shop/user/userItem", + method: "GET", + data, + }) + }, + + + getLog(data) { + return request({ + url: "/shop/user/getLog", + method: "GET", + data, + }) + }, + + changeInformation(data) { + return request({ + url: "/shop/user/changeInformation", + method: "GET", + data, + }) + }, + + UpdateLevel(data) { + return request({ + url: "/shop/user/UpdateLevel", + method: "GET", + data, + }) + }, + + + + +}; \ No newline at end of file diff --git a/api/mall/userMembers.js b/api/mall/userMembers.js new file mode 100644 index 0000000..fef7a7f --- /dev/null +++ b/api/mall/userMembers.js @@ -0,0 +1,56 @@ +import { + request +} from "@/utils/request"; + +export default { + + LevelShow(data) { + return request({ + url: "/shop/UserMembers/LevelShow", + method: "GET", + data, + }) + }, + + LevelSave(data) { + return request({ + url: "/shop/UserMembers/LevelSave", + method: "GET", + data, + }) + }, + + SetList(data) { + return request({ + url: "/shop/UserMembers/SetList", + method: "GET", + data, + }) + }, + + SetSave(data) { + return request({ + url: "/shop/UserMembers/SetSave", + method: "GET", + data, + }) + }, + + DiscountList(data) { + return request({ + url: "/shop/UserMembers/DiscountList", + method: "GET", + data, + }) + }, + + CreateDiscount(data) { + return request({ + url: "/shop/UserMembers/CreateDiscount", + method: "POST", + data, + }) + }, + + +}; \ No newline at end of file diff --git a/api/store/order.js b/api/store/order.js index 8802ac9..924ce93 100644 --- a/api/store/order.js +++ b/api/store/order.js @@ -101,6 +101,26 @@ export default { }); }, + }, + + + OrderInpersonPayment: { + orderList(data) { + return request({ + url: "/admin/OrderInpersonPayment/orderList", + method: "POST", + data, + }); + }, + + GetQrItem(data) { + return request({ + url: "/admin/OrderInpersonPayment/GetQrItem", + method: "POST", + data, + }); + }, } + }; \ No newline at end of file diff --git a/mall/cat/edit.vue b/mall/cat/edit.vue new file mode 100644 index 0000000..acc6855 --- /dev/null +++ b/mall/cat/edit.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/mall/cat/index.vue b/mall/cat/index.vue new file mode 100644 index 0000000..122b368 --- /dev/null +++ b/mall/cat/index.vue @@ -0,0 +1,130 @@ + + + + + \ No newline at end of file diff --git a/mall/check/list.vue b/mall/check/list.vue new file mode 100644 index 0000000..0f3a333 --- /dev/null +++ b/mall/check/list.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/mall/components/bar/bar.vue b/mall/components/bar/bar.vue new file mode 100644 index 0000000..43ba611 --- /dev/null +++ b/mall/components/bar/bar.vue @@ -0,0 +1,78 @@ + + + + + \ No newline at end of file diff --git a/mall/components/myTabbar/index.vue b/mall/components/myTabbar/index.vue new file mode 100644 index 0000000..5f50bf1 --- /dev/null +++ b/mall/components/myTabbar/index.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/mall/goods/components/skuEdit.vue b/mall/goods/components/skuEdit.vue new file mode 100644 index 0000000..8510cbd --- /dev/null +++ b/mall/goods/components/skuEdit.vue @@ -0,0 +1,374 @@ + + + + + diff --git a/mall/goods/components/uni-data-picker/changelog.md b/mall/goods/components/uni-data-picker/changelog.md new file mode 100644 index 0000000..486eedc --- /dev/null +++ b/mall/goods/components/uni-data-picker/changelog.md @@ -0,0 +1,56 @@ +## 1.0.3(2022-02-25) +- 修复 nvue 不支持的 v-show 的 bug +## 1.0.2(2022-02-25) +- 修复 条件编译 nvue 不支持的 css 样式 +## 1.0.1(2021-11-23) +- 修复 由上个版本引发的map、v-model等属性不生效的bug +## 1.0.0(2021-11-19) +- 优化 组件 UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-data-picker](https://uniapp.dcloud.io/component/uniui/uni-data-picker) +## 0.4.9(2021-10-28) +- 修复 VUE2 v-model 概率无效的 bug +## 0.4.8(2021-10-27) +- 修复 v-model 概率无效的 bug +## 0.4.7(2021-10-25) +- 新增 属性 spaceInfo 服务空间配置 HBuilderX 3.2.11+ +- 修复 树型 uniCloud 数据类型为 int 时报错的 bug +## 0.4.6(2021-10-19) +- 修复 非 VUE3 v-model 为 0 时无法选中的 bug +## 0.4.5(2021-09-26) +- 新增 清除已选项的功能(通过 clearIcon 属性配置是否显示按钮),同时提供 clear 方法以供调用,二者等效 +- 修复 readonly 为 true 时报错的 bug +## 0.4.4(2021-09-26) +- 修复 上一版本造成的 map 属性失效的 bug +- 新增 ellipsis 属性,支持配置 tab 选项长度过长时是否自动省略 +## 0.4.3(2021-09-24) +- 修复 某些情况下级联未触发的 bug +## 0.4.2(2021-09-23) +- 新增 提供 show 和 hide 方法,开发者可以通过 ref 调用 +- 新增 选项内容过长自动添加省略号 +## 0.4.1(2021-09-15) +- 新增 map 属性 字段映射,将 text/value 映射到数据中的其他字段 +## 0.4.0(2021-07-13) +- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 0.3.5(2021-06-04) +- 修复 无法加载云端数据的问题 +## 0.3.4(2021-05-28) +- 修复 v-model 无效问题 +- 修复 loaddata 为空数据组时加载时间过长问题 +- 修复 上个版本引出的本地数据无法选择带有 children 的 2 级节点 +## 0.3.3(2021-05-12) +- 新增 组件示例地址 +## 0.3.2(2021-04-22) +- 修复 非树形数据有 where 属性查询报错的问题 +## 0.3.1(2021-04-15) +- 修复 本地数据概率无法回显时问题 +## 0.3.0(2021-04-07) +- 新增 支持云端非树形表结构数据 +- 修复 根节点 parent_field 字段等于 null 时选择界面错乱问题 +## 0.2.0(2021-03-15) +- 修复 nodeclick、popupopened、popupclosed 事件无法触发的问题 +## 0.1.9(2021-03-09) +- 修复 微信小程序某些情况下无法选择的问题 +## 0.1.8(2021-02-05) +- 优化 部分样式在 nvue 上的兼容表现 +## 0.1.7(2021-02-05) +- 调整为 uni_modules 目录规范 diff --git a/mall/goods/components/uni-data-picker/components/uni-data-picker/keypress.js b/mall/goods/components/uni-data-picker/components/uni-data-picker/keypress.js new file mode 100644 index 0000000..6ef26a2 --- /dev/null +++ b/mall/goods/components/uni-data-picker/components/uni-data-picker/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git a/mall/goods/components/uni-data-picker/components/uni-data-picker/uni-data-picker.vue b/mall/goods/components/uni-data-picker/components/uni-data-picker/uni-data-picker.vue new file mode 100644 index 0000000..6014efe --- /dev/null +++ b/mall/goods/components/uni-data-picker/components/uni-data-picker/uni-data-picker.vue @@ -0,0 +1,598 @@ + + + + + diff --git a/mall/goods/components/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js b/mall/goods/components/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js new file mode 100644 index 0000000..c12fd54 --- /dev/null +++ b/mall/goods/components/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js @@ -0,0 +1,563 @@ +export default { + props: { + localdata: { + type: [Array, Object], + default () { + return [] + } + }, + spaceInfo: { + type: Object, + default () { + return {} + } + }, + collection: { + type: String, + default: '' + }, + action: { + type: String, + default: '' + }, + field: { + type: String, + default: '' + }, + orderby: { + type: String, + default: '' + }, + where: { + type: [String, Object], + default: '' + }, + pageData: { + type: String, + default: 'add' + }, + pageCurrent: { + type: Number, + default: 1 + }, + pageSize: { + type: Number, + default: 20 + }, + getcount: { + type: [Boolean, String], + default: false + }, + getone: { + type: [Boolean, String], + default: false + }, + gettree: { + type: [Boolean, String], + default: false + }, + manual: { + type: Boolean, + default: false + }, + value: { + type: [Array, String, Number], + default () { + return [] + } + }, + modelValue: { + type: [Array, String, Number], + default () { + return [] + } + }, + preload: { + type: Boolean, + default: false + }, + stepSearh: { + type: Boolean, + default: true + }, + selfField: { + type: String, + default: '' + }, + parentField: { + type: String, + default: '' + }, + multiple: { + type: Boolean, + default: false + }, + map: { + type: Object, + default() { + return { + text: "text", + value: "value" + } + } + } + }, + data() { + return { + loading: false, + errorMessage: '', + loadMore: { + contentdown: '', + contentrefresh: '', + contentnomore: '' + }, + dataList: [], + selected: [], + selectedIndex: 0, + page: { + current: this.pageCurrent, + size: this.pageSize, + count: 0 + } + } + }, + computed: { + isLocaldata() { + return !this.collection.length + }, + postField() { + let fields = [this.field]; + if (this.parentField) { + fields.push(`${this.parentField} as parent_value`); + } + return fields.join(','); + }, + dataValue() { + let isModelValue = Array.isArray(this.modelValue) ? (this.modelValue.length > 0) : (this.modelValue !== null || this.modelValue !== undefined) + return isModelValue ? this.modelValue : this.value + }, + hasValue() { + if (typeof this.dataValue === 'number') { + return true + } + return (this.dataValue != null) && (this.dataValue.length > 0) + } + }, + created() { + this.$watch(() => { + var al = []; + ['pageCurrent', + 'pageSize', + 'spaceInfo', + 'value', + 'modelValue', + 'localdata', + 'collection', + 'action', + 'field', + 'orderby', + 'where', + 'getont', + 'getcount', + 'gettree' + ].forEach(key => { + al.push(this[key]) + }); + return al + }, (newValue, oldValue) => { + let needReset = false + for (let i = 2; i < newValue.length; i++) { + if (newValue[i] != oldValue[i]) { + needReset = true + break + } + } + if (newValue[0] != oldValue[0]) { + this.page.current = this.pageCurrent + } + this.page.size = this.pageSize + + this.onPropsChange() + }) + this._treeData = [] + }, + methods: { + onPropsChange() { + this._treeData = [] + }, + getCommand(options = {}) { + /* eslint-disable no-undef */ + let db = uniCloud.database(this.spaceInfo) + + const action = options.action || this.action + if (action) { + db = db.action(action) + } + + const collection = options.collection || this.collection + db = db.collection(collection) + + const where = options.where || this.where + if (!(!where || !Object.keys(where).length)) { + db = db.where(where) + } + + const field = options.field || this.field + if (field) { + db = db.field(field) + } + + const orderby = options.orderby || this.orderby + if (orderby) { + db = db.orderBy(orderby) + } + + const current = options.pageCurrent !== undefined ? options.pageCurrent : this.page.current + const size = options.pageSize !== undefined ? options.pageSize : this.page.size + const getCount = options.getcount !== undefined ? options.getcount : this.getcount + const getTree = options.gettree !== undefined ? options.gettree : this.gettree + + const getOptions = { + getCount, + getTree + } + if (options.getTreePath) { + getOptions.getTreePath = options.getTreePath + } + + db = db.skip(size * (current - 1)).limit(size).get(getOptions) + + return db + }, + getNodeData(callback) { + if (this.loading) { + return + } + this.loading = true + this.getCommand({ + field: this.postField, + where: this._pathWhere() + }).then((res) => { + this.loading = false + this.selected = res.result.data + callback && callback() + }).catch((err) => { + this.loading = false + this.errorMessage = err + }) + }, + getTreePath(callback) { + if (this.loading) { + return + } + this.loading = true + + this.getCommand({ + field: this.postField, + getTreePath: { + startWith: `${this.selfField}=='${this.dataValue}'` + } + }).then((res) => { + this.loading = false + let treePath = [] + this._extractTreePath(res.result.data, treePath) + this.selected = treePath + callback && callback() + }).catch((err) => { + this.loading = false + this.errorMessage = err + }) + }, + loadData() { + if (this.isLocaldata) { + this._processLocalData() + return + } + + if (this.dataValue != null) { + this._loadNodeData((data) => { + this._treeData = data + this._updateBindData() + this._updateSelected() + }) + return + } + + if (this.stepSearh) { + this._loadNodeData((data) => { + this._treeData = data + this._updateBindData() + }) + } else { + this._loadAllData((data) => { + this._treeData = [] + this._extractTree(data, this._treeData, null) + this._updateBindData() + }) + } + }, + _loadAllData(callback) { + if (this.loading) { + return + } + this.loading = true + + this.getCommand({ + field: this.postField, + gettree: true, + startwith: `${this.selfField}=='${this.dataValue}'` + }).then((res) => { + this.loading = false + callback(res.result.data) + this.onDataChange() + }).catch((err) => { + this.loading = false + this.errorMessage = err + }) + }, + _loadNodeData(callback, pw) { + if (this.loading) { + return + } + this.loading = true + + this.getCommand({ + field: this.postField, + where: pw || this._postWhere(), + pageSize: 500 + }).then((res) => { + this.loading = false + callback(res.result.data) + this.onDataChange() + }).catch((err) => { + this.loading = false + this.errorMessage = err + }) + }, + _pathWhere() { + let result = [] + let where_field = this._getParentNameByField(); + if (where_field) { + result.push(`${where_field} == '${this.dataValue}'`) + } + + if (this.where) { + return `(${this.where}) && (${result.join(' || ')})` + } + + return result.join(' || ') + }, + _postWhere() { + let result = [] + let selected = this.selected + let parentField = this.parentField + if (parentField) { + result.push(`${parentField} == null || ${parentField} == ""`) + } + if (selected.length) { + for (var i = 0; i < selected.length - 1; i++) { + result.push(`${parentField} == '${selected[i].value}'`) + } + } + + let where = [] + if (this.where) { + where.push(`(${this.where})`) + } + if (result.length) { + where.push(`(${result.join(' || ')})`) + } + + return where.join(' && ') + }, + _nodeWhere() { + let result = [] + let selected = this.selected + if (selected.length) { + result.push(`${this.parentField} == '${selected[selected.length - 1].value}'`) + } + + if (this.where) { + return `(${this.where}) && (${result.join(' || ')})` + } + + return result.join(' || ') + }, + _getParentNameByField() { + const fields = this.field.split(','); + let where_field = null; + for (let i = 0; i < fields.length; i++) { + const items = fields[i].split('as'); + if (items.length < 2) { + continue; + } + if (items[1].trim() === 'value') { + where_field = items[0].trim(); + break; + } + } + return where_field + }, + _isTreeView() { + return (this.parentField && this.selfField) + }, + _updateSelected() { + var dl = this.dataList + var sl = this.selected + let textField = this.map.text + let valueField = this.map.value + for (var i = 0; i < sl.length; i++) { + var value = sl[i].value + var dl2 = dl[i] + for (var j = 0; j < dl2.length; j++) { + var item2 = dl2[j] + if (item2[valueField] === value) { + sl[i].text = item2[textField] + break + } + } + } + }, + _updateBindData(node) { + const { + dataList, + hasNodes + } = this._filterData(this._treeData, this.selected) + + let isleaf = this._stepSearh === false && !hasNodes + + if (node) { + node.isleaf = isleaf + } + + this.dataList = dataList + this.selectedIndex = dataList.length - 1 + + if (!isleaf && this.selected.length < dataList.length) { + this.selected.push({ + value: null, + text: "请选择" + }) + } + + return { + isleaf, + hasNodes + } + }, + _filterData(data, paths) { + let dataList = [] + let hasNodes = true + + dataList.push(data.filter((item) => { + return (item.parent_value === null || item.parent_value === undefined || item.parent_value === '') + })) + for (let i = 0; i < paths.length; i++) { + var value = paths[i].value + var nodes = data.filter((item) => { + return item.parent_value === value + }) + + if (nodes.length) { + dataList.push(nodes) + } else { + hasNodes = false + } + } + + return { + dataList, + hasNodes + } + }, + _extractTree(nodes, result, parent_value) { + let list = result || [] + let valueField = this.map.value + for (let i = 0; i < nodes.length; i++) { + let node = nodes[i] + + let child = {} + for (let key in node) { + if (key !== 'children') { + child[key] = node[key] + } + } + if (parent_value !== null && parent_value !== undefined && parent_value !== '') { + child.parent_value = parent_value + } + result.push(child) + + let children = node.children + if (children) { + this._extractTree(children, result, node[valueField]) + } + } + }, + _extractTreePath(nodes, result) { + let list = result || [] + for (let i = 0; i < nodes.length; i++) { + let node = nodes[i] + + let child = {} + for (let key in node) { + if (key !== 'children') { + child[key] = node[key] + } + } + result.push(child) + + let children = node.children + if (children) { + this._extractTreePath(children, result) + } + } + }, + _findNodePath(key, nodes, path = []) { + let textField = this.map.text + let valueField = this.map.value + for (let i = 0; i < nodes.length; i++) { + let node = nodes[i] + let children = node.children + let text = node[textField] + let value = node[valueField] + + path.push({ + value, + text + }) + + if (value === key) { + return path + } + + if (children) { + const p = this._findNodePath(key, children, path) + if (p.length) { + return p + } + } + + path.pop() + } + return [] + }, + _processLocalData() { + this._treeData = [] + this._extractTree(this.localdata, this._treeData) + + var inputValue = this.dataValue + if (inputValue === undefined) { + return + } + + if (Array.isArray(inputValue)) { + inputValue = inputValue[inputValue.length - 1] + if (typeof inputValue === 'object' && inputValue[this.map.value]) { + inputValue = inputValue[this.map.value] + } + } + + this.selected = this._findNodePath(inputValue, this.localdata) + } + } +} diff --git a/mall/goods/components/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue b/mall/goods/components/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue new file mode 100644 index 0000000..d4882f1 --- /dev/null +++ b/mall/goods/components/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue @@ -0,0 +1,364 @@ + + + + diff --git a/mall/goods/components/uni-data-picker/package.json b/mall/goods/components/uni-data-picker/package.json new file mode 100644 index 0000000..d4925ef --- /dev/null +++ b/mall/goods/components/uni-data-picker/package.json @@ -0,0 +1,92 @@ +{ + "id": "uni-data-picker", + "displayName": "uni-data-picker 数据驱动的picker选择器", + "version": "1.0.3", + "description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景", + "keywords": [ + "uni-ui", + "uniui", + "picker", + "级联", + "省市区", + "" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-load-more", + "uni-icons", + "uni-scss" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/mall/goods/components/uni-data-picker/readme.md b/mall/goods/components/uni-data-picker/readme.md new file mode 100644 index 0000000..6cda224 --- /dev/null +++ b/mall/goods/components/uni-data-picker/readme.md @@ -0,0 +1,22 @@ +## DataPicker 级联选择 +> **组件名:uni-data-picker** +> 代码块: `uDataPicker` +> 关联组件:`uni-data-pickerview`、`uni-load-more`。 + + +`` 是一个选择类[datacom组件](https://uniapp.dcloud.net.cn/component/datacom)。 + +支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。 + +候选数据支持一次性加载完毕,也支持懒加载,比如示例图中,选择了“北京”后,动态加载北京的区县数据。 + +`` 组件尤其适用于地址选择、分类选择等选择类。 + +`` 支持本地数据、云端静态数据(json),uniCloud云数据库数据。 + +`` 可以通过JQL直连uniCloud云数据库,配套[DB Schema](https://uniapp.dcloud.net.cn/uniCloud/schema),可在schema2code中自动生成前端页面,还支持服务器端校验。 + +在uniCloud数据表中新建表“uni-id-address”和“opendb-city-china”,这2个表的schema自带foreignKey关联。在“uni-id-address”表的表结构页面使用schema2code生成前端页面,会自动生成地址管理的维护页面,自动从“opendb-city-china”表包含的中国所有省市区信息里选择地址。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-picker) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/mall/goods/edit.vue b/mall/goods/edit.vue new file mode 100644 index 0000000..2da475c --- /dev/null +++ b/mall/goods/edit.vue @@ -0,0 +1,429 @@ + + + + + diff --git a/mall/goods/index.vue b/mall/goods/index.vue new file mode 100644 index 0000000..21ba325 --- /dev/null +++ b/mall/goods/index.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/mall/index/index.vue b/mall/index/index.vue new file mode 100644 index 0000000..2a64e6e --- /dev/null +++ b/mall/index/index.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/mall/order/index.vue b/mall/order/index.vue new file mode 100644 index 0000000..73a73c1 --- /dev/null +++ b/mall/order/index.vue @@ -0,0 +1,511 @@ + + + + + diff --git a/pages.json b/pages.json index 8cceabd..feaeb21 100644 --- a/pages.json +++ b/pages.json @@ -65,6 +65,18 @@ } } }, + { + "path": "inpersonPay/index", + "style": { + "navigationBarTitleText": "当面付订单", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, { "path": "afterSale/index", "style": { @@ -234,6 +246,95 @@ } } ] + }, + { + "root": "mall", + "pages": [ + { + "path": "index/index", + "style": { + "navigationBarTitleText": "门店首页", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "goods/index", + "style": { + "navigationBarTitleText": "商品管理", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "goods/edit", + "style": { + "navigationBarTitleText": "修改商品", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "cat/index", + "style": { + "navigationBarTitleText": "分类管理", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "cat/edit", + "style": { + "navigationBarTitleText": "分类编辑", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "check/list", + "style": { + "navigationBarTitleText": "核销记录", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "order/index", + "style": { + "navigationBarTitleText": "订单管理", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + } + ] } ], "globalStyle": { diff --git a/pages/index/index.vue b/pages/index/index.vue index ef5bfd9..7499ec8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -11,6 +11,10 @@ if (token) { const user_info = uni.getStorageSync("user_info"); if (user_info.type == 1) { utils.toUrl("/store/index/index", "redirectTo") + } else if (user_info.type == 3) { + utils.toUrl("/mall/index/index", "redirectTo") + } else { + } } else { utils.toUrl("/pages/login/index", "redirectTo") diff --git a/pages/login/index.vue b/pages/login/index.vue index acac5e6..e9a3318 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -59,6 +59,8 @@ function handleSubmit() { if (res.data.user_info.type == 1) { utils.toUrl("/store/index/index", "redirectTo") + } else if (res.data.user_info.type == 3) { + utils.toUrl("/mall/index/index", "redirectTo") } else { uni.showToast({ title: '登录平台开发中 ···', diff --git a/store/index/index.vue b/store/index/index.vue index b952d13..3b3c1ce 100644 --- a/store/index/index.vue +++ b/store/index/index.vue @@ -24,7 +24,7 @@ - 等级管理 @@ -35,7 +35,7 @@ - + --> @@ -85,6 +85,20 @@ + + 当面付订单 + + + +
+ +
+
+
+ + diff --git a/store/inpersonPay/index.vue b/store/inpersonPay/index.vue new file mode 100644 index 0000000..70ddbf5 --- /dev/null +++ b/store/inpersonPay/index.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/store/user/memberList.vue b/store/user/memberList.vue index 24fe5d4..fe85a71 100644 --- a/store/user/memberList.vue +++ b/store/user/memberList.vue @@ -24,7 +24,6 @@
-
@@ -34,11 +33,9 @@ style="width: 60px;height: 60px;min-width: 60px;border-radius: 100px; " /> - - + {{ member.name }} ¥{{ member.price }} @@ -88,7 +85,7 @@ - + 状态: 开启 关闭 @@ -96,14 +93,16 @@ 折扣商品:{{ user?.goods_list?.length || 0 }} + + 优惠时间: + {{ utils.dateFormat(user.start_time * 1000) }} - {{ + utils.dateFormat(user.end_time * 1000) }} + + +