From efe27805480f2d6ec1b7e369c0bc43f2dfe44aae Mon Sep 17 00:00:00 2001 From: hflllll Date: Mon, 28 Apr 2025 21:27:48 +0800 Subject: [PATCH] =?UTF-8?q?2.0=20=E6=AD=A3=E5=BC=8F=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E8=81=94=E8=B0=83=20=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E7=82=B9=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 8 +- api/http.js | 4 +- api/model/index.js | 213 ++-------------------------- api/model/info.js | 115 --------------- api/model/login.js | 4 +- api/model/order.js | 12 ++ api/model/vip.js | 20 --- components/base/tabbar.vue | 4 - components/config/PrivacyPopup.vue | 157 ++++++++++++++++++++ components/product/productItem.vue | 2 +- config.js | 2 +- main.js | 2 +- mixins/configList.js | 29 ++-- pages/index/category.vue | 54 +++---- pages/index/center.vue | 6 +- pages/index/order.vue | 2 +- pages_order/auth/wxLogin.vue | 179 ++++++++++++----------- pages_order/auth/wxUserInfo.vue | 79 +++++++---- pages_order/components/order/placeOrder.vue | 2 +- pages_order/mine/team.vue | 2 +- pages_order/mine/wallet.vue | 2 +- pages_order/order/newOrderDetail.vue | 10 +- static/image/logo.png | Bin 271998 -> 0 bytes static/image/logo.webp | Bin 0 -> 125756 bytes static/image/红烧肉.png | Bin 954281 -> 0 bytes static/image/红烧肉.webp | Bin 0 -> 392880 bytes static/js/mockAssets.js | 12 +- static/js/mockCartData.js | 17 ++- static/js/mockCoupon.js | 15 +- static/js/mockOrders.js | 98 +++++++------ static/js/mockShare.js | 11 +- static/js/mockTeam.js | 13 +- static/js/mockTeamData.js | 11 +- static/js/mockUserInfo.js | 9 +- static/js/mockWallet.js | 9 +- store/store.js | 21 +-- 36 files changed, 527 insertions(+), 597 deletions(-) delete mode 100644 api/model/info.js create mode 100644 api/model/order.js delete mode 100644 api/model/vip.js create mode 100644 components/config/PrivacyPopup.vue delete mode 100644 static/image/logo.png create mode 100644 static/image/logo.webp delete mode 100644 static/image/红烧肉.png create mode 100644 static/image/红烧肉.webp diff --git a/api/api.js b/api/api.js index d852c8f..c93d2cb 100644 --- a/api/api.js +++ b/api/api.js @@ -5,7 +5,7 @@ import utils from '../utils/utils.js' let limit = {} let debounce = {} -const models = ['login', 'index', 'vip', 'info'] +const models = ['login', 'index', 'order'] const config = { // 示例 @@ -14,7 +14,7 @@ const config = { // limit : 1000 // }, - getConfig : {url : '/config_common/getConfig', method : 'GET', limit : 500}, + getConfig : {url : '/teambuy/config/queryConfigList', method : 'GET', limit : 500}, } @@ -46,7 +46,7 @@ export function api(key, data, callback, loadingTitle) { } //必须登录 - 注释掉登录检查 - /* + if (req.auth) { if (!uni.getStorageSync('token')) { utils.toLogin() @@ -54,7 +54,7 @@ export function api(key, data, callback, loadingTitle) { return Promise.reject() } } - */ + // 接口防抖 if(req.debounce){ diff --git a/api/http.js b/api/http.js index b02666d..a5aa2d3 100644 --- a/api/http.js +++ b/api/http.js @@ -32,7 +32,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) { } // 注释掉登录状态检查 - /* + if(res.statusCode == 401 || res.data.message == '操作失败,token非法无效!' || res.data.message == '操作失败,用户不存在!'){ @@ -40,7 +40,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) { console.error('登录过期'); utils.toLogin() } - */ + if(res.statusCode == 200 && res.data.code != 200 && res.data.code != 902){ diff --git a/api/model/index.js b/api/model/index.js index 3bd6c97..25b9571 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -1,214 +1,17 @@ // 首页相关接口 const api = { - // 获取首页轮播图 - getRiceBanner: { - url: '/index_common/getRiceBanner', + // 查看商品分类列表 + queryCategoryList: { + url: '/teambuy/goods/queryCategoryList', method: 'GET', + limit: 500, }, - // 获取首页常规产品【废弃】 - // getRiceCommonProductList: { - // url: '/index_common/getRiceCommonProductList', - // method: 'GET', - // }, - // 获取首页跳转图标 - getRiceIconList: { - url: '/index_common/getRiceIconList', + // 查看商品列表 + queryGoodsList: { + url: '/teambuy/goods/queryGoodsList', method: 'GET', - }, - // 获取首页新闻详情 - getRiceNewsDetail: { - url: '/index_common/getCommonNewsDetail', - method: 'GET', - }, - // 获取首页新闻列表 - getRiceNewsList: { - url: '/index_common/getRiceNewsList', - method: 'GET', - }, - // 获取首页公告列表 - getRiceNoticeList: { - url: '/index_common/getRiceNoticeList', - method: 'GET', - }, - // 获取首页商品详情 - getRiceProductDetail: { - url: '/index_common/getRiceProductDetail', - method: 'GET', - }, - // 获取首页体验产品 - getRiceProductList: { - url: '/index_common/getRiceProductList', - method: 'GET', - }, - // 查询分类接口 - getCategoryList: { - url: '/index_common/getCategoryList', - method: 'GET', - }, - // 新查询分类以及商品数据接口 - getCategoryPidList: { - url: '/index_common/getCategoryPidList', - method: 'GET', - debounce : 250, - }, - // 查询一级分类接口 - getPidList: { - url: '/index_common/getCategoryPidList', - method: 'GET', - }, - // 获取分类分页商品列表接口 - getClassShopPageList: { - url: '/index_common/getClassShopPageList', - method: 'GET', - }, - // 加入购物车 - addCart: { - url: '/index_common/addCart', - method: 'GET', - auth: true, - showLoading: true, - limit : 500, - }, - // 删除购物车信息 - deleteCart: { - url: '/index_common/deleteCart', - method: 'DELETE', - auth: true, - showLoading: true, - }, - // 修改购物车信息数量 - updateCartNum: { - url: '/index_common/updateCartNum', - method: 'POST', - auth: true, - debounce: 300, - }, - // 创建订单 - createOrder: { - url: '/index_common/createOrder', - method: 'GET', - auth: true, - limit: 1000, - showLoading: true, - }, - // 创建订单-再次支付 - createOrderTwo: { - url: '/index_common/createOrderTwo', - method: 'GET', - auth: true, - limit: 1000, - showLoading: true, - }, - // 多商品创建订单 - createSumOrder: { - url: '/index_common/createSumOrder', - method: 'POST', - auth: true, - limit: 1000, - showLoading: true, - }, - // 多商品订单再次支付 - createSumOrderAgain: { - url: '/index_common/createSumOrderAgain', - method: 'POST', - auth: true, - limit: 1000, - showLoading: true, - }, - // 确认收货 - confirmOrder: { - url: '/index_common/confirmOrder', - method: 'GET', - auth: true, - limit: 1000, - showLoading: true, - }, - // 取消订单 - cancelOrder: { - url: '/index_common/cancelOrder', - method: 'GET', - auth: true, - limit: 1000, - showLoading: true, - }, - // 获取首页广告列表 - getRiceProductList: { - url: '/index_common/getRiceAdList', - method: 'GET', - }, - // 获取首页广告列表 - getRiceAdDetail: { - url: '/index_common/getRiceAdDetail', - method: 'GET', - }, - //获取优惠券信息 - getRiceCouponList: { - url: '/info_common/getRiceCouponList', - method: 'GET', - }, - //增加或者修改合伙人申请信息 - addOrUpdateCommonUser: { - url: '/index_common/addOrUpdateCommonUser', - method: 'POST', - }, - //根据用户查询渠合伙人申请信息表单 - getCommonUser: { - url: '/index_common/getCommonUser', - method: 'GET' - }, - //提交反馈信息 - addFeedback: { - url: '/info_common/addFeedback', - method: 'POST' - }, - // 获取我的直接推荐间接推荐用户列表带分页 - getHanHaiMemberUser: { - url: '/info_common/getHanHaiMemberUser', - method: 'GET' - }, - // 获取祝福背景图 - getRiceBlessing: { - url: '/index_common/getRiceBlessing', - method: 'GET' - }, - // 随机获取祝福语 - getRiceBlessingWords: { - url: '/index_common/getRiceBlessingWords', - method: 'GET' - }, - // 根据订单标识修改订单祝福语背景 - updateOrderBlessing: { - url: '/index_common/updateOrderBlessing', - method: 'POST', - auth : true, - limit : 1000, - }, - // 1.收礼流程 =》点击收礼 - getGiveShop: { - url: '/index_common/getGiveShop', - method: 'GET', - auth : true, - limit : 1000, - }, - // 2.点击抽奖 =》抽奖 - getGiveShopLottery: { - url: '/index_common/getGiveShopLottery', - method: 'GET', - auth : true, - limit : 1000, - }, - // 获取我的礼品订单 - getMyGiftOrder: { - url: '/index_common/getMyGiftOrder', - method: 'GET', - auth : true, - }, - // 获取我的礼品订单详情 - getMyGiftOrderDetail: { - url: '/index_common/getMyGiftOrderDetail', - method: 'GET', - auth : true, + limit: 500, }, } diff --git a/api/model/info.js b/api/model/info.js deleted file mode 100644 index a695abd..0000000 --- a/api/model/info.js +++ /dev/null @@ -1,115 +0,0 @@ -// 个人相关接口 - -const api = { - // 充值 - recharge: { - url: '/info_common/withdraw', - method: 'GET', - auth: true, - limit: 1000, - showLoading: true, - }, - // 提现 - withdraw: { - url: '/info_common/withdraw', - method: 'GET', - auth: true, - limit: 1000, - showLoading: true, - }, - // 获取地址列表带分页 - getAddressPageList: { - url: '/info_common/getAddressPageList', - method: 'GET', - auth: true, - }, - // 增加或修改地址信息 - addOrUpdateAddress: { - url: '/info_common/addOrUpdateAddress', - method: 'POST', - limit: 500, - auth: true, - showLoading: true, - }, - // 删除地址 - deleteAddress: { - url: '/info_common/deleteAddress', - method: 'GET', - limit: 500, - auth: true, - showLoading: true, - }, - // 修改默认地址 - updateDefaultAddress: { - url: '/info_common/updateDefaultAddress', - method: 'GET', - auth: true, - limit: 1000, - }, - // 获取粉丝列表带分页 - getFansPageList: { - url: '/info_common/getFansPageList', - method: 'GET', - auth: true, - }, - // 获取相关介绍 - getInfoIntroduce: { - url: '/info_common/getInfoIntroduce', - method: 'GET', - auth: true, - }, - // 获取个人邀请码 - getInviteCode: { - url: '/info_common/getInviteCode', - method: 'GET', - auth: true, - }, - // 获取订单列表带分页 - getOrderPageList: { - url: '/info_common/getOrderPageList', - method: 'GET', - auth: true, - }, - // 获取订单详情 - getOrderDetail: { - url: '/info_common/getOrderDetail', - method: 'GET', - auth: true, - }, - // 获取流水记录带分页 - getWaterPageList: { - url: '/info_common/getWaterPageList', - method: 'GET', - auth: true, - }, - // 获取相关介绍 - getInfoIntroduce: { - url: '/info_common/getInfoIntroduce', - method: 'GET', - }, - // 获取相关介绍详情 - getInfoIntroduceDetail: { - url: '/info_common/getRiceNewsDetail', - method: 'GET', - }, - // 查询个人信息相关 - getRiceInfo: { - url: '/info_common/getRiceInfo', - method: 'GET', - limit: 500, - }, - // 获取购物车信息列表带分页 - getCartPageList: { - url: '/info_common/getCartPageList', - method: 'GET', - }, - // 领取新人优惠券 - getRiceCoupon: { - url: '/info_common/getRiceCoupon', - method: 'GET', - limit: 500, - auth: true, - }, -} - -export default api \ No newline at end of file diff --git a/api/model/login.js b/api/model/login.js index b8f46d1..149ee49 100644 --- a/api/model/login.js +++ b/api/model/login.js @@ -3,13 +3,13 @@ const api = { // 微信登录接口 wxLogin: { - url: '/login_common/appletLogin', + url: '/teambuy/login/login', method: 'GET', limit: 500, }, // 获取绑定手机号码 bindPhone: { - url: '/login_common/bindPhone', + url: '/teambuy/login/bindPhone', method: 'GET', // auth: true, }, diff --git a/api/model/order.js b/api/model/order.js new file mode 100644 index 0000000..2dffb92 --- /dev/null +++ b/api/model/order.js @@ -0,0 +1,12 @@ +// 首页相关接口 + +const api = { + // 订单-查询团餐订单列表-详情 + queryLeaderOrderList: { + url: '/teambuy/order/queryLeaderOrderList', + method: 'GET', + limit: 500, + }, +} + +export default api \ No newline at end of file diff --git a/api/model/vip.js b/api/model/vip.js deleted file mode 100644 index c2d4b7b..0000000 --- a/api/model/vip.js +++ /dev/null @@ -1,20 +0,0 @@ - -// vip相关接口 - -const api = { - // 获取会员权益列表 - getRiceVipList: { - url: '/index_common/getVipInfoList', - method: 'GET', - }, - // 申请成为会员 - applyRiceVip: { - url: '/rice_vip/applyRiceVip', - method: 'POST', - limit : 500, - auth : true, - showLoading : true, - }, -} - -export default api \ No newline at end of file diff --git a/components/base/tabbar.vue b/components/base/tabbar.vue index c31b5db..b2d5209 100644 --- a/components/base/tabbar.vue +++ b/components/base/tabbar.vue @@ -17,14 +17,10 @@ + + \ No newline at end of file diff --git a/components/product/productItem.vue b/components/product/productItem.vue index 6480f68..aaaea0c 100644 --- a/components/product/productItem.vue +++ b/components/product/productItem.vue @@ -5,7 +5,7 @@ - + diff --git a/config.js b/config.js index 16ccf23..9c07f7d 100644 --- a/config.js +++ b/config.js @@ -18,7 +18,7 @@ const config = { baseUrl: 'http://h5.xzaiyp.top/jewelry-admin', }, test: { - baseUrl: 'https://jewelry-admin.hhlm1688.com/jewelry-admin', + baseUrl: 'https://www.gwrx666.com/teambuy-api', }, prod: { baseUrl: 'https://admin.momeirenzhubao.com/jewelry-admin', diff --git a/main.js b/main.js index f971a7f..9291776 100644 --- a/main.js +++ b/main.js @@ -14,8 +14,8 @@ import store from '@/store/store' import './config' import './utils/index.js' +// 全局混入 import mixinConfigList from '@/mixins/configList.js' - Vue.mixin(mixinConfigList) //组件注册 diff --git a/mixins/configList.js b/mixins/configList.js index 6b5fcc1..7169d4e 100644 --- a/mixins/configList.js +++ b/mixins/configList.js @@ -1,5 +1,8 @@ +// 这个已经在全局混入了 + + import { mapState } from 'vuex' export default { data() { @@ -13,21 +16,21 @@ export default { } }, computed: { - ...mapState(['configList', 'userInfo', 'riceInfo']), - currentPagePath() { - const pages = getCurrentPages(); - const currentPage = pages[pages.length - 1]; - let path = `/${currentPage.route}`; + ...mapState(['configList', 'userInfo']), + // currentPagePath() { + // const pages = getCurrentPages(); + // const currentPage = pages[pages.length - 1]; + // let path = `/${currentPage.route}`; - // 获取当前页面的参数 - const options = currentPage.options; - if (options && Object.keys(options).length > 0) { - const params = this.$utils.objectToUrlParams(options); - path += `?${params}`; - } + // // 获取当前页面的参数 + // const options = currentPage.options; + // if (options && Object.keys(options).length > 0) { + // const params = this.$utils.objectToUrlParams(options); + // path += `?${params}`; + // } - return path; - }, + // return path; + // }, }, // 定义全局分享 // 1.发送给朋友 diff --git a/pages/index/category.vue b/pages/index/category.vue index 10746c3..2b189c0 100644 --- a/pages/index/category.vue +++ b/pages/index/category.vue @@ -5,7 +5,7 @@ - + --> - - - - + + + + + + + + + @@ -64,6 +73,8 @@