From 95566eb3e6a40a2fbe7dd202a10bf7e068a5b9b0 Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Thu, 5 Jun 2025 22:55:56 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E8=AE=A2=E5=8D=95):=20=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E5=BF=AB=E6=8D=B7=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E5=8F=8A=E7=9B=B8=E5=85=B3=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增快捷订单列表页面,支持按状态筛选和分页加载
- 在快捷下单页面添加"我的快捷订单"入口按钮
- 实现城市选择组件并应用到多个页面,支持城市切换时刷新数据
- 优化提现页面,增加快捷金额选择和输入校验
- 修改登录过期处理逻辑,清空用户信息后跳转登录页
- 在store中添加城市列表和选中城市的状态管理
- 为订单相关API添加接口定义
新增功能包括订单状态展示、订单类型识别、语音播放、订单取消等操作,提升用户体验
---
App.vue | 1 +
api/api.js | 6 +
api/http.js | 7 +-
api/model/index.js | 11 +-
apijson.json | 1151 ++++++++++++++++++++++++++++++---
components/QuickOrderEntry.vue | 50 +-
components/selectCityPopup.vue | 213 ++++++
mixins/configList.js | 2 +-
pages.json | 6 +
pages/index/category.vue | 20 +-
pages/index/center.vue | 21 +-
pages/index/index.vue | 23 +-
pages_order/mine/purse.vue | 247 ++++++-
pages_order/order/fastCreateOrder.vue | 33 +-
pages_order/order/fastOrderList.vue | 665 +++++++++++++++++++
pages_order/product/productList.vue | 16 +-
static/image/home/1.png | Bin 257 -> 0 bytes
store/store.js | 17 +-
18 files changed, 2360 insertions(+), 129 deletions(-)
create mode 100644 components/selectCityPopup.vue
create mode 100644 pages_order/order/fastOrderList.vue
delete mode 100644 static/image/home/1.png
diff --git a/App.vue b/App.vue
index ff5e1c7..d6a1b73 100644
--- a/App.vue
+++ b/App.vue
@@ -4,6 +4,7 @@
},
onShow: function() {
this.$store.commit('initConfig')
+ this.$store.commit('getCityList')
if(uni.getStorageSync('token')){
this.$store.commit('getQrCode')
}
diff --git a/api/api.js b/api/api.js
index e8723cd..5822a00 100644
--- a/api/api.js
+++ b/api/api.js
@@ -1,5 +1,6 @@
import http from './http.js'
import utils from '../utils/utils.js'
+import store from '../store/store.js'
let limit = {}
@@ -48,7 +49,12 @@ export function api(key, data, callback, loadingTitle) {
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
+
+ store.state.userInfo = {}
+ store.state.riceInfo = {}
+ uni.removeStorageSync('token')
utils.toLogin()
+
console.error('需要登录', req.url)
return Promise.reject()
}
diff --git a/api/http.js b/api/http.js
index 6c3da63..49e6348 100644
--- a/api/http.js
+++ b/api/http.js
@@ -35,8 +35,11 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){
- store.commit('logout')
- console.error('登录过期');
+
+ store.state.userInfo = {}
+ store.state.riceInfo = {}
+ uni.removeStorageSync('token')
+
utils.toLogin()
}
diff --git a/api/model/index.js b/api/model/index.js
index bf6a19b..1b2cace 100644
--- a/api/model/index.js
+++ b/api/model/index.js
@@ -147,7 +147,16 @@ const api = {
method: 'POST',
limit : 1000,
},
-
+ // 获取城市
+ getCity: {
+ url: '/index/getCity',
+ method: 'GET',
+ },
+ // 获取快捷订单列表
+ getAddOrderPageBean: {
+ url: '/index/getAddOrderPageBean',
+ method: 'GET',
+ },
}
export default api
\ No newline at end of file
diff --git a/apijson.json b/apijson.json
index 5b59bde..c570063 100644
--- a/apijson.json
+++ b/apijson.json
@@ -10,7 +10,7 @@
"email": "*********@qq.com"
}
},
- "host": "h5.xzaiyp.top",
+ "host": "127.0.0.1",
"tags": [
{
"name": "个人中心",
@@ -28,6 +28,10 @@
"name": "订单接口",
"x-order": "2147483647"
},
+ {
+ "name": "购物车相关接口",
+ "x-order": "2147483647"
+ },
{
"name": "首页接口",
"x-order": "2147483647"
@@ -200,17 +204,41 @@
"x-order": "2147483647"
}
},
- "/building-admin/conf/getConfig": {
+ "/building-admin/cat/addCart": {
"get": {
"tags": [
- "公共配置接口"
+ "购物车相关接口"
],
- "summary": "获取平台基础配置",
- "description": "获取平台基础配置",
- "operationId": "getConfigUsingGET",
+ "summary": "加入购物车 传入token shopId num",
+ "description": "加入购物车 传入token shopId num",
+ "operationId": "addCartUsingGET",
"produces": [
"*/*"
],
+ "parameters": [
+ {
+ "name": "num",
+ "in": "query",
+ "description": "num",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "shopId",
+ "in": "query",
+ "description": "shopId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
"responses": {
"200": {
"description": "OK",
@@ -239,14 +267,14 @@
"x-order": "2147483647"
}
},
- "/building-admin/index/addOrder": {
+ "/building-admin/cat/deleteCart": {
"post": {
"tags": [
- "首页接口"
+ "购物车相关接口"
],
- "summary": "快捷下单-拍照下单/语音下单",
- "description": "快捷下单-拍照下单/语音下单",
- "operationId": "addOrderUsingPOST",
+ "summary": "删除购物车信息",
+ "description": "删除购物车信息",
+ "operationId": "deleteCartUsingPOST",
"consumes": [
"application/json"
],
@@ -255,90 +283,151 @@
],
"parameters": [
{
- "name": "createBy",
+ "name": "ids",
"in": "query",
- "description": "创建人",
+ "description": "ids",
"required": false,
"type": "string"
},
{
- "name": "createTime",
- "in": "query",
- "description": "创建日期",
- "required": false,
- "type": "string",
- "format": "date-time"
- },
- {
- "name": "id",
- "in": "query",
- "description": "主键",
- "required": false,
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
"type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
},
- {
- "name": "imageUrl",
- "in": "query",
- "description": "内容图片",
- "required": false,
- "type": "string"
+ "201": {
+ "description": "Created"
},
- {
- "name": "isPay",
- "in": "query",
- "description": "是否支付",
- "required": false,
- "type": "string"
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
},
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
{
- "name": "shopId",
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/cat/getCartPageList": {
+ "get": {
+ "tags": [
+ "购物车相关接口"
+ ],
+ "summary": "获取购物车信息列表带分页",
+ "description": "获取购物车信息列表带分页",
+ "operationId": "getCartPageListUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "pageNo",
"in": "query",
- "description": "推荐商品",
+ "description": "当前页",
"required": false,
- "type": "string"
+ "type": "integer",
+ "format": "int32"
},
{
- "name": "status",
+ "name": "pageSize",
"in": "query",
- "description": "审核状态",
+ "description": "显示条数",
"required": false,
- "type": "string"
+ "type": "integer",
+ "format": "int32"
},
{
- "name": "type",
+ "name": "title",
"in": "query",
- "description": "类型",
+ "description": "搜索标题",
"required": false,
"type": "string"
},
{
- "name": "updateBy",
- "in": "query",
- "description": "更新人",
- "required": false,
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
"type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
},
- {
- "name": "updateTime",
- "in": "query",
- "description": "更新日期",
- "required": false,
- "type": "string",
- "format": "date-time"
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
},
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
{
- "name": "userId",
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/cat/updateCartNum": {
+ "post": {
+ "tags": [
+ "购物车相关接口"
+ ],
+ "summary": "修改购物车信息数量",
+ "description": "修改购物车信息数量",
+ "operationId": "updateCartNumUsingPOST",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "id",
"in": "query",
- "description": "提交用户",
+ "description": "id",
"required": false,
"type": "string"
},
{
- "name": "voiceUrl",
+ "name": "num",
"in": "query",
- "description": "语音图片",
+ "description": "num",
"required": false,
- "type": "string"
+ "type": "integer",
+ "format": "int32"
},
{
"name": "X-Access-Token",
@@ -379,14 +468,53 @@
"x-order": "2147483647"
}
},
- "/building-admin/index/createOrder": {
+ "/building-admin/conf/getConfig": {
+ "get": {
+ "tags": [
+ "公共配置接口"
+ ],
+ "summary": "获取平台基础配置",
+ "description": "获取平台基础配置",
+ "operationId": "getConfigUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/addOrder": {
"post": {
"tags": [
"首页接口"
],
- "summary": "创建订单",
- "description": "创建订单",
- "operationId": "createOrderUsingPOST",
+ "summary": "快捷下单-拍照下单/语音下单",
+ "description": "快捷下单-拍照下单/语音下单",
+ "operationId": "addOrderUsingPOST",
"consumes": [
"application/json"
],
@@ -395,37 +523,397 @@
],
"parameters": [
{
- "name": "addressId",
+ "name": "commonShop[0].cityId",
"in": "query",
- "description": "addressId",
+ "description": "城市",
"required": false,
"type": "string"
},
{
- "name": "payType",
+ "name": "commonShop[0].createBy",
"in": "query",
- "description": "payType",
+ "description": "创建人",
"required": false,
- "type": "integer",
- "format": "int32"
+ "type": "string"
},
{
- "name": "productId",
+ "name": "commonShop[0].createTime",
"in": "query",
- "description": "productId",
+ "description": "创建日期",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "commonShop[0].details",
+ "in": "query",
+ "description": "x详情富文本",
"required": false,
"type": "string"
},
{
- "name": "X-Access-Token",
- "in": "header",
- "description": "X-Access-Token",
- "required": true,
+ "name": "commonShop[0].id",
+ "in": "query",
+ "description": "主键",
+ "required": false,
"type": "string"
- }
- ],
- "responses": {
- "200": {
+ },
+ {
+ "name": "commonShop[0].image",
+ "in": "query",
+ "description": "商品图片",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].isOpen",
+ "in": "query",
+ "description": "是否上架",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].material",
+ "in": "query",
+ "description": "材料",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].name",
+ "in": "query",
+ "description": "商品标题",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].num",
+ "in": "query",
+ "description": "库存",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "commonShop[0].oneMoney",
+ "in": "query",
+ "description": "直接推荐佣金",
+ "required": false,
+ "type": "number"
+ },
+ {
+ "name": "commonShop[0].parameter",
+ "in": "query",
+ "description": "参数",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].payNum",
+ "in": "query",
+ "description": "购买量",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "commonShop[0].price",
+ "in": "query",
+ "description": "价格",
+ "required": false,
+ "type": "number"
+ },
+ {
+ "name": "commonShop[0].service",
+ "in": "query",
+ "description": "服务",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].shopCion",
+ "in": "query",
+ "description": "所属区域",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].shopClass",
+ "in": "query",
+ "description": "商品分类",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].twoMoney",
+ "in": "query",
+ "description": "间接推荐佣金",
+ "required": false,
+ "type": "number"
+ },
+ {
+ "name": "commonShop[0].unit",
+ "in": "query",
+ "description": "单位",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].updateBy",
+ "in": "query",
+ "description": "更新人",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "commonShop[0].updateTime",
+ "in": "query",
+ "description": "更新日期",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "createBy",
+ "in": "query",
+ "description": "创建人",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "createTime",
+ "in": "query",
+ "description": "创建日期",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "id",
+ "in": "query",
+ "description": "主键",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "imageUrl",
+ "in": "query",
+ "description": "内容图片",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "isPay",
+ "in": "query",
+ "description": "是否支付",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "shopId",
+ "in": "query",
+ "description": "推荐商品",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status",
+ "in": "query",
+ "description": "审核状态",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "type",
+ "in": "query",
+ "description": "类型",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "updateBy",
+ "in": "query",
+ "description": "更新人",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "updateTime",
+ "in": "query",
+ "description": "更新日期",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "userId",
+ "in": "query",
+ "description": "提交用户",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "voiceUrl",
+ "in": "query",
+ "description": "语音图片",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "201": {
+ "description": "Created"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/cancelOrder": {
+ "post": {
+ "tags": [
+ "首页接口"
+ ],
+ "summary": "取消快捷订单",
+ "description": "取消快捷订单",
+ "operationId": "cancelOrderUsingPOST",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "orderId",
+ "in": "query",
+ "description": "orderId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "201": {
+ "description": "Created"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/createOrder": {
+ "post": {
+ "tags": [
+ "首页接口"
+ ],
+ "summary": "创建订单",
+ "description": "创建订单",
+ "operationId": "createOrderUsingPOST",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "addressId",
+ "in": "query",
+ "description": "addressId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "orderNum",
+ "in": "query",
+ "description": "orderNum",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "payType",
+ "in": "query",
+ "description": "payType",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "productId",
+ "in": "query",
+ "description": "productId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/接口返回对象«object»",
@@ -455,14 +943,225 @@
"x-order": "2147483647"
}
},
- "/building-admin/index/getBanner": {
+ "/building-admin/index/getAddOrderInfo": {
+ "get": {
+ "tags": [
+ "首页接口"
+ ],
+ "summary": "查询快捷订单详情",
+ "description": "查询快捷订单详情",
+ "operationId": "getAddOrderInfoUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "orderId",
+ "in": "query",
+ "description": "orderId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/getAddOrderPageBean": {
+ "get": {
+ "tags": [
+ "首页接口"
+ ],
+ "summary": "快捷订单列表数据带分页",
+ "description": "快捷订单列表数据带分页",
+ "operationId": "getAddOrderPageBeanUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "pageNo",
+ "in": "query",
+ "description": "当前页",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "pageSize",
+ "in": "query",
+ "description": "显示条数",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "state",
+ "in": "query",
+ "description": "state",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "title",
+ "in": "query",
+ "description": "搜索标题",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/getBanner": {
+ "get": {
+ "tags": [
+ "首页接口"
+ ],
+ "summary": "获取banner",
+ "description": "获取banner",
+ "operationId": "getBannerUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/getCity": {
+ "get": {
+ "tags": [
+ "首页接口"
+ ],
+ "summary": "获取城市",
+ "description": "获取城市",
+ "operationId": "getCityUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
+ "/building-admin/index/getClassify": {
"get": {
"tags": [
"首页接口"
],
- "summary": "获取banner",
- "description": "获取banner",
- "operationId": "getBannerUsingGET",
+ "summary": "获取分类",
+ "description": "获取分类",
+ "operationId": "getClassifyUsingGET",
"produces": [
"*/*"
],
@@ -641,6 +1340,13 @@
"*/*"
],
"parameters": [
+ {
+ "name": "cityId",
+ "in": "query",
+ "description": "cityId",
+ "required": false,
+ "type": "string"
+ },
{
"name": "pageNo",
"in": "query",
@@ -907,18 +1613,18 @@
"tags": [
"个人中心"
],
- "summary": "创建二维码",
- "description": "创建二维码",
+ "summary": "获取个人邀请码",
+ "description": "获取个人邀请码",
"operationId": "createQrCodeUsingGET",
"produces": [
- "*/*"
+ "image/png"
],
"parameters": [
{
- "name": "X-Access-Token",
- "in": "header",
- "description": "X-Access-Token",
- "required": true,
+ "name": "token",
+ "in": "query",
+ "description": "token",
+ "required": false,
"type": "string"
}
],
@@ -926,8 +1632,8 @@
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/接口返回对象«object»",
- "originalRef": "接口返回对象«object»"
+ "type": "string",
+ "format": "byte"
}
},
"401": {
@@ -1215,6 +1921,54 @@
"x-order": "2147483647"
}
},
+ "/building-admin/info/getTeamHeader": {
+ "get": {
+ "tags": [
+ "个人中心"
+ ],
+ "summary": "获取团队头部信息",
+ "description": "获取团队头部信息",
+ "operationId": "getTeamHeaderUsingGET",
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
"/building-admin/info/getTeamList": {
"get": {
"tags": [
@@ -1550,6 +2304,67 @@
"x-order": "2147483647"
}
},
+ "/building-admin/info/updateDefaultAddress": {
+ "post": {
+ "tags": [
+ "个人中心"
+ ],
+ "summary": "修改默认地址",
+ "description": "修改默认地址",
+ "operationId": "updateDefaultAddressUsingPOST",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "id",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "201": {
+ "description": "Created"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
"/building-admin/info/updateUserInfo": {
"post": {
"tags": [
@@ -1625,6 +2440,67 @@
"x-order": "2147483647"
}
},
+ "/building-admin/order/cancelOrder": {
+ "post": {
+ "tags": [
+ "订单接口"
+ ],
+ "summary": "取消订单",
+ "description": "取消订单",
+ "operationId": "cancelOrderUsingPOST_1",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "orderId",
+ "in": "query",
+ "description": "orderId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "201": {
+ "description": "Created"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
"/building-admin/order/confirmOrder": {
"post": {
"tags": [
@@ -1686,6 +2562,89 @@
"x-order": "2147483647"
}
},
+ "/building-admin/order/createSumOrder": {
+ "post": {
+ "tags": [
+ "订单接口"
+ ],
+ "summary": "商城-加入购物车之后一次下多个订单",
+ "description": "商城-加入购物车之后一次下多个订单",
+ "operationId": "createSumOrderUsingPOST",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "*/*"
+ ],
+ "parameters": [
+ {
+ "name": "addressId",
+ "in": "query",
+ "description": "addressId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "list",
+ "in": "query",
+ "description": "list",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "orderId",
+ "in": "query",
+ "description": "orderId",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "payType",
+ "in": "query",
+ "description": "payType",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "X-Access-Token",
+ "in": "header",
+ "description": "X-Access-Token",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/接口返回对象«object»",
+ "originalRef": "接口返回对象«object»"
+ }
+ },
+ "201": {
+ "description": "Created"
+ },
+ "401": {
+ "description": "Unauthorized"
+ },
+ "403": {
+ "description": "Forbidden"
+ },
+ "404": {
+ "description": "Not Found"
+ }
+ },
+ "security": [
+ {
+ "X-Access-Token": [
+ "global"
+ ]
+ }
+ ],
+ "x-order": "2147483647"
+ }
+ },
"/building-admin/order/getOrderInfo": {
"get": {
"tags": [
@@ -1770,9 +2729,9 @@
"format": "int32"
},
{
- "name": "status",
+ "name": "state",
"in": "query",
- "description": "status",
+ "description": "state",
"required": false,
"type": "integer",
"format": "int32"
diff --git a/components/QuickOrderEntry.vue b/components/QuickOrderEntry.vue
index 9472992..941daa7 100644
--- a/components/QuickOrderEntry.vue
+++ b/components/QuickOrderEntry.vue
@@ -1,8 +1,9 @@
-
+ @click="handleClick"
+ @longpress="handleLongPress">
+
你有新的快捷下单信息
@@ -10,6 +11,7 @@
{{ innerMessageCount }}
+ 长按查看更多
@@ -59,17 +61,37 @@ export default {
this.$emit('order-info', this.orderInfo);
}
- if(this.orderInfo.length > 0){
- this.navigateTo('/pages_order/order/firmOrder');
- return
- }
-
// 如果有目标页面,则跳转
if (this.targetUrl) {
this.navigateTo(this.targetUrl);
}
},
+ // 处理长按事件 - 跳转到快捷订单列表
+ handleLongPress() {
+ // 震动反馈
+ uni.vibrateShort();
+
+ // 显示操作菜单
+ uni.showActionSheet({
+ itemList: ['快捷下单', '我的快捷订单'],
+ success: (res) => {
+ if (res.tapIndex === 0) {
+ // 跳转到快捷下单页面
+ this.navigateTo(this.targetUrl);
+ } else if (res.tapIndex === 1) {
+ // 跳转到快捷订单列表
+ this.navigateTo('/pages_order/order/fastOrderList');
+ }
+ }
+ });
+ },
+
+ // 直接跳转到快捷订单列表
+ goToOrderList() {
+ this.navigateTo('/pages_order/order/fastOrderList');
+ },
+
// 获取快捷下单的信息
getQuickOrderInfo() {
@@ -198,6 +220,20 @@ export default {
top: 10rpx;
left: 25rpx;
}
+
+ .long-press-hint {
+ position: absolute;
+ bottom: -30rpx;
+ left: 50%;
+ transform: translateX(-50%);
+ background-color: rgba(0, 0, 0, 0.7);
+ color: #fff;
+ font-size: 20rpx;
+ padding: 4rpx 12rpx;
+ border-radius: 12rpx;
+ white-space: nowrap;
+ opacity: 0.8;
+ }
}
}
diff --git a/components/selectCityPopup.vue b/components/selectCityPopup.vue
new file mode 100644
index 0000000..1c77c05
--- /dev/null
+++ b/components/selectCityPopup.vue
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+ {{ selectCity.name || '请选择城市' }}
+
+
+
+
+
+
+
+
+
+
+ {{ city.name }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mixins/configList.js b/mixins/configList.js
index 6b5fcc1..c535f64 100644
--- a/mixins/configList.js
+++ b/mixins/configList.js
@@ -13,7 +13,7 @@ export default {
}
},
computed: {
- ...mapState(['configList', 'userInfo', 'riceInfo']),
+ ...mapState(['configList', 'userInfo', 'riceInfo', 'selectCity']),
currentPagePath() {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
diff --git a/pages.json b/pages.json
index c9c08e4..3e48a71 100644
--- a/pages.json
+++ b/pages.json
@@ -99,6 +99,12 @@
{
"path": "order/createOrder"
},
+ {
+ "path": "order/fastOrderList",
+ "style": {
+ "enablePullDownRefresh": true
+ }
+ },
{
"path": "mine/individualTeam",
"style": {
diff --git a/pages/index/category.vue b/pages/index/category.vue
index 37bd07d..c36313e 100644
--- a/pages/index/category.vue
+++ b/pages/index/category.vue
@@ -22,6 +22,8 @@
:chain="chain"
:list="category[current].children"
keyName="title"
+ :key="category[current].id"
+ :current="currentChildren"
:barItemBadgeStyle="{right:'20px',top:'12px'}"
@change="change">
@@ -66,10 +68,12 @@
diff --git a/pages/index/index.vue b/pages/index/index.vue
index dd613ce..5defebb 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -13,10 +13,13 @@
+
+
+
{
+ this.mixinsListApi = 'getProductList'
+ this.getData()
+ })
},
onShow() {
this.getBanner()
@@ -113,6 +127,11 @@ export default {
}
})
},
+ beforeGetData(){
+ return {
+ cityId : this.selectCity.id
+ }
+ },
// 获取菜单
getMenu() {
this.$api('getIcon', res => {
diff --git a/pages_order/mine/purse.vue b/pages_order/mine/purse.vue
index 065c1a8..9cb89be 100644
--- a/pages_order/mine/purse.vue
+++ b/pages_order/mine/purse.vue
@@ -13,9 +13,39 @@
我要提现
-
+
-
+
+ 可提现金额:¥{{userInfo.price}}
+
+
+
+
+ 快捷选择:
+
+
+ ¥{{amount}}
+
+
+ 全部
+
+
+
+
提现说明
@@ -33,12 +63,18 @@
- 提交
+
+ {{isSubmitting ? '提交中...' : '提交'}}
+
-
+ /> -->
@@ -51,14 +87,154 @@
},
data() {
return {
- notice : ''
+ notice: '',
+ withdrawAmount: '', // 提现金额
+ isSubmitting: false, // 是否正在提交
+ quickAmounts: [10, 50, 100, 200, 500], // 快捷金额选项
+ }
+ },
+ computed: {
+ userInfo() {
+ return this.$store.state.userInfo || {};
}
},
onLoad() {
this.$store.commit('getUserInfo');
},
methods: {
-
+ // 选择快捷金额
+ selectQuickAmount(amount) {
+ if (amount > parseFloat(this.userInfo.price)) return;
+ this.withdrawAmount = amount.toString();
+ },
+
+ // 选择全部金额
+ selectAllAmount() {
+ if (this.userInfo.price) {
+ this.withdrawAmount = parseFloat(this.userInfo.price).toString();
+ }
+ },
+
+ // 金额输入处理
+ onAmountInput(e) {
+ let value = e.detail.value;
+ // 只允许输入数字和小数点
+ value = value.replace(/[^\d.]/g, '');
+ // 只允许一个小数点
+ const pointIndex = value.indexOf('.');
+ if (pointIndex !== -1) {
+ value = value.substring(0, pointIndex + 1) + value.substring(pointIndex + 1).replace(/\./g, '');
+ }
+ // 最多保留2位小数
+ if (pointIndex !== -1 && value.length > pointIndex + 3) {
+ value = value.substring(0, pointIndex + 3);
+ }
+ this.withdrawAmount = value;
+ },
+
+ // 验证提现金额
+ validateAmount() {
+ if (!this.withdrawAmount) {
+ uni.showToast({
+ title: '请输入提现金额',
+ icon: 'none'
+ });
+ return false;
+ }
+
+ const amount = parseFloat(this.withdrawAmount);
+ if (isNaN(amount) || amount <= 0) {
+ uni.showToast({
+ title: '请输入正确的提现金额',
+ icon: 'none'
+ });
+ return false;
+ }
+
+ // 检查提现金额是否超过可用余额
+ if (this.userInfo.price && amount > parseFloat(this.userInfo.price)) {
+ uni.showToast({
+ title: '提现金额不能超过可用余额',
+ icon: 'none'
+ });
+ return false;
+ }
+
+ // 检查最小提现金额(假设最小提现1元)
+ if (amount < 1) {
+ uni.showToast({
+ title: '最小提现金额为1元',
+ icon: 'none'
+ });
+ return false;
+ }
+
+ return true;
+ },
+
+ // 提交提现申请
+ submitWithdraw() {
+ if (this.isSubmitting) return;
+
+ // 验证提现金额
+ if (!this.validateAmount()) return;
+
+ // 确认提现
+ uni.showModal({
+ title: '确认提现',
+ content: `确定要提现 ¥${this.withdrawAmount} 元吗?`,
+ success: (res) => {
+ if (res.confirm) {
+ this.doWithdraw();
+ }
+ }
+ });
+ },
+
+ // 执行提现操作
+ doWithdraw() {
+ this.isSubmitting = true;
+
+ const params = {
+ money: parseFloat(this.withdrawAmount)
+ };
+
+ this.$api('openMoney', params, res => {
+ this.isSubmitting = false;
+
+ if (res.code === 200) {
+ uni.showToast({
+ title: '提现申请提交成功',
+ icon: 'success',
+ duration: 2000,
+ success: () => {
+ // 清空输入框
+ this.withdrawAmount = '';
+ // 刷新用户信息
+ this.$store.commit('getUserInfo');
+ // 延迟返回上一页或跳转到提现记录页面
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 2000);
+ }
+ });
+ } else {
+ uni.showModal({
+ title: '提现失败',
+ content: res.message || '提现申请提交失败,请重试',
+ showCancel: false
+ });
+ }
+ }, err => {
+ this.isSubmitting = false;
+ console.error('提现请求失败', err);
+ uni.showModal({
+ title: '网络错误',
+ content: '网络连接失败,请检查网络后重试',
+ showCancel: false
+ });
+ });
+ }
}
}
@@ -97,6 +273,55 @@
text-align: left;
color: #333;
}
+
+ .tips {
+ margin-top: 20rpx;
+ font-size: 24rpx;
+ color: #999;
+ font-weight: 400;
+ }
+
+ .quick-amounts {
+ margin-top: 30rpx;
+
+ .quick-label {
+ font-size: 26rpx;
+ color: #666;
+ margin-bottom: 20rpx;
+ font-weight: 400;
+ }
+
+ .amount-buttons {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 20rpx;
+
+ .amount-btn {
+ padding: 16rpx 32rpx;
+ background: #f5f5f5;
+ border-radius: 30rpx;
+ font-size: 26rpx;
+ color: #333;
+ text-align: center;
+ border: 1rpx solid transparent;
+ transition: all 0.3s;
+
+ &:active {
+ transform: scale(0.95);
+ }
+
+ &.disabled {
+ opacity: 0.5;
+ color: #999;
+ }
+
+ &.all {
+ background: $uni-color;
+ color: #fff;
+ }
+ }
+ }
+ }
}
.button-submit {
@@ -113,6 +338,12 @@
font-weight: 400;
text-align: center;
color: #ffffff;
+ transition: opacity 0.3s;
+
+ &.disabled {
+ opacity: 0.6;
+ background: #ccc;
+ }
}
}
diff --git a/pages_order/order/fastCreateOrder.vue b/pages_order/order/fastCreateOrder.vue
index 4067434..a78a48c 100644
--- a/pages_order/order/fastCreateOrder.vue
+++ b/pages_order/order/fastCreateOrder.vue
@@ -20,6 +20,14 @@
+
+
+
+
+ 我的快捷订单
+
+
+
@@ -37,7 +45,7 @@
diff --git a/pages_order/order/fastOrderList.vue b/pages_order/order/fastOrderList.vue
new file mode 100644
index 0000000..da278a8
--- /dev/null
+++ b/pages_order/order/fastOrderList.vue
@@ -0,0 +1,665 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{getTypeName(order.type)}}
+ {{getTypeDesc(order.type)}}
+
+
+
+
+
+
+
+
+ 通过图片识别下单
+
+
+
+
+
+
+
+
+ 通过语音识别下单
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无{{currentTabName}}订单
+
+
+
+
+ {{loading ? '加载中...' : '上拉加载更多'}}
+
+
+
+
+ 没有更多订单了
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/product/productList.vue b/pages_order/product/productList.vue
index 65657cd..4fdb1ae 100644
--- a/pages_order/product/productList.vue
+++ b/pages_order/product/productList.vue
@@ -2,7 +2,14 @@
-
+
+
+
+
+
+
import productItem from '@/components/productItem.vue'
import mixinsList from '@/mixins/list.js'
+ import selectCityPopup from '@/components/selectCityPopup.vue'
export default {
mixins: [mixinsList],
components : {
productItem,
+ selectCityPopup,
},
data() {
return {
@@ -54,6 +63,11 @@
}
},
methods: {
+ beforeGetData(){
+ return {
+ cityId : this.selectCity.id
+ }
+ },
handleSearch(value){
this.queryParams.title = this.keyword
this.getData()
diff --git a/static/image/home/1.png b/static/image/home/1.png
deleted file mode 100644
index 6ef8d78f0622c6e120f82ec9e63a97b1d8096ceb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 257
zcmV+c0sj7pP)Px#yGcYrR47w@kSz|vKoo?(;YVRGgalOy2jC1S6bIlGBxoF1QiXxTZ~_t%5=WjWrU9Cah93hf6(C}dL9DF*Ee^A~Fy`zY_{00000NkvXX
Hu0mjfIfPx%
diff --git a/store/store.js b/store/store.js
index 467b838..8e5c1f3 100644
--- a/store/store.js
+++ b/store/store.js
@@ -15,8 +15,11 @@ const store = new Vuex.Store({
category: [], //分类信息
payOrderProduct: [], //支付订单中的商品
promotionUrl : '',//分享二维码
+ cityList : [],
+ selectCity : {},
+ },
+ getters: {
},
- getters: {},
mutations: {
// 初始化配置
initConfig(state) {
@@ -188,6 +191,18 @@ const store = new Vuex.Store({
setPromotionUrl(state, data){
state.promotionUrl = data
},
+ setCity(state, data){
+ state.selectCity = data
+ },
+ getCityList(state){
+ api('getCity', res => {
+ if (res.code == 200) {
+ state.cityList = res.result
+ state.selectCity = res.result[0]
+ uni.$emit('initCity', res.result[0])
+ }
+ })
+ },
},
actions: {},
})