From d56e2e666679fc3b2ae29a71cbade7e58caa66e7 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Sun, 19 Jan 2025 13:55:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/api/shop.js | 40 +++- jiuyi2/api/video.js | 31 ++- jiuyi2/common/js/config.js | 5 +- jiuyi2/common/js/util.js | 2 +- jiuyi2/components/index/indexVideo.vue | 21 +- jiuyi2/components/index/leftMenu.vue | 2 +- jiuyi2/components/index/videoMenu.vue | 2 +- jiuyi2/components/mine/history.vue | 102 +++++++++ jiuyi2/components/mine/like.vue | 10 +- jiuyi2/components/mine/product.vue | 16 +- .../public/jy-commodity-address/index.vue | 14 +- jiuyi2/pages.json | 17 +- jiuyi2/pages/index/dataCenter/dataCenter.vue | 2 +- jiuyi2/pages/index/videoDetail.nvue | 16 +- jiuyi2/pages/index/videoDetail.vue | 5 +- .../components/jy-pick-regions/area.js | 0 .../components/jy-pick-regions/index.vue | 0 .../{delivery-address => address}/index.vue | 0 jiuyi2/pages/mine/homepage.vue | 44 ++-- jiuyi2/pages/mine/mine.vue | 4 +- jiuyi2/pages/mine/setting/setting.vue | 5 + jiuyi2/pages/shop/collect.vue | 24 +- .../components/jy-commodity-foot/index.vue | 213 +++++++++++------- .../index.vue => commodity/payment.vue} | 44 +++- jiuyi2/readme.md | 1 - jiuyi2/static/statistic.png | Bin 0 -> 473 bytes jiuyi2/vite.config.js | 28 +-- 27 files changed, 473 insertions(+), 175 deletions(-) create mode 100644 jiuyi2/components/mine/history.vue rename jiuyi2/pages/mine/{delivery-address => address}/components/jy-pick-regions/area.js (100%) rename jiuyi2/pages/mine/{delivery-address => address}/components/jy-pick-regions/index.vue (100%) rename jiuyi2/pages/mine/{delivery-address => address}/index.vue (100%) rename jiuyi2/pages/shop/{continue-pay/index.vue => commodity/payment.vue} (87%) create mode 100644 jiuyi2/static/statistic.png diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 0f51164b..7614a2b7 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -132,6 +132,18 @@ const shop = { * 获取收货地址 * @param {Object} param */ + getDefaultAddress(param) { + return util.request({ + url: `/shopify/appAddress/getDefaultOne`, + method: 'GET', + query: param.query, + }) + }, + + /** + * 获取默认收货地址 + * @param {Object} param + */ getAddressList(param) { return util.request({ url: `/shopify/appAddress/getList`, @@ -195,7 +207,7 @@ const shop = { * 查看收藏记录 * @param {Object} param */ - collect(param) { + getCollectList(param) { return util.request({ url: `/shopify/collect`, method: 'GET', @@ -266,6 +278,32 @@ const shop = { load: true, }) }, + + /** + * 获取发布的商品列表 + * @param {Object} param + */ + addOrder(param) { + return util.request({ + url: `/shopify/appOrder/addOrder`, + data: param.data, + method: 'POST', + load: true, + }) + }, + + /** + * 获取订单详情 + * @param {Object} param + */ + getOrderDetail(param) { + return util.request({ + url: `/shopify/appOrder/getOne`, + query: param.query, + method: 'GET', + load: true, + }) + }, } export default shop \ No newline at end of file diff --git a/jiuyi2/api/video.js b/jiuyi2/api/video.js index c8d5eeb2..9edeebd0 100644 --- a/jiuyi2/api/video.js +++ b/jiuyi2/api/video.js @@ -421,9 +421,21 @@ const video = { */ myLikeVideoList(param) { return util.request({ - url: `/home/myLikeVideoList`, + url: `/video/homepage/myLike`, query: param.query, - method: 'POST', + method: 'GET', + }) + }, + + /** + * 查看历史记录 + * @param {Object} param + */ + getHistoryVideoList(param) { + return util.request({ + url: `/video/homepage/history`, + query: param.query, + method: 'GET', }) }, @@ -433,8 +445,8 @@ const video = { */ getVideoById(param) { return util.request({ - url: `/homecommon/getVideoById`, - query: param.query, + url: `/video/video/getParticulars`, + data: param.data, method: 'POST', }) }, @@ -482,6 +494,17 @@ const video = { method: 'POST', }) }, + + /** + * 查看作品 + */ + myWorks(param) { + return util.request({ + url: `/video/homepage/myWorks`, + query: param.query, + method: 'GET', + }) + }, } export default video \ No newline at end of file diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index 97a8a1c4..cf8cf25e 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -5,9 +5,8 @@ const config = { host: 'http://localhost:5173', // #endif // #ifndef H5 - // host: 'http://1641c8e0.r22.cpolar.top', - host: 'http://192.168.0.189:8080', - // host: 'http://192.168.0.102:8080', + host: 'https://539c1514.r24.cpolar.top', + // host: 'http://gfjds5.natappfree.cc', // #endif // 上传文件二级路径 uploadFilePath: "/homecommon/file/preview?fileName=", diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index c99a4831..34c19d82 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -212,7 +212,7 @@ const util = { responseType: params.responseType || 'text', // 请求成功返回 success: res => { - // console.log('request success', url, res, params.data ? params.data : '') + console.log('request success', url, res, params.data ? params.data : '') // 关闭加载效果 if (params.load) { uni.hideLoading() diff --git a/jiuyi2/components/index/indexVideo.vue b/jiuyi2/components/index/indexVideo.vue index 91095cc8..ef4fa7a5 100644 --- a/jiuyi2/components/index/indexVideo.vue +++ b/jiuyi2/components/index/indexVideo.vue @@ -63,10 +63,15 @@ type: Number, default: 0, }, + // 是否统计 0不是 1是 + statistic: { + type: [String, Number], + default: 0, + }, }) // const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay', - 'onPause', 'like', 'detailMenu', 'onEnd', 'longtap' + 'onPause', 'like', 'detailMenu', 'onEnd', 'longtap','dataCenter' ]) // 视频上下文对象 @@ -455,6 +460,11 @@ videoCtx.value.playbackRate(2) } + // + function handleData() { + emit('dataCenter', props.item) + } + // defineExpose({ play, @@ -511,6 +521,15 @@ + + + + + + + + + diff --git a/jiuyi2/components/index/leftMenu.vue b/jiuyi2/components/index/leftMenu.vue index 474f61b8..7928c5cd 100644 --- a/jiuyi2/components/index/leftMenu.vue +++ b/jiuyi2/components/index/leftMenu.vue @@ -103,7 +103,7 @@ - + 我的钱包 diff --git a/jiuyi2/components/index/videoMenu.vue b/jiuyi2/components/index/videoMenu.vue index c4149d48..7a0f7fb5 100644 --- a/jiuyi2/components/index/videoMenu.vue +++ b/jiuyi2/components/index/videoMenu.vue @@ -68,7 +68,7 @@ if (props.mode == 'list') { uni.navigateTo({ url: util.setUrl('/pages/index/videoDetail', { - videoId: item.videoId, + videoId: item.id, isMine: props.isMine, }) }) diff --git a/jiuyi2/components/mine/history.vue b/jiuyi2/components/mine/history.vue new file mode 100644 index 00000000..fefcc3d3 --- /dev/null +++ b/jiuyi2/components/mine/history.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/components/mine/like.vue b/jiuyi2/components/mine/like.vue index 3e48af30..e737daee 100644 --- a/jiuyi2/components/mine/like.vue +++ b/jiuyi2/components/mine/like.vue @@ -21,17 +21,14 @@ // 列表数据 const list = reactive({ data: [], - pageSize: 10, + pageSize: 18, pageNum: 1, total: 0, }) // 仓库 const store = useStore() // 用户信息 - const userinfo = computed(() => { - let result = store.state.userinfo - return result - }) + const userinfo = computed(() => store.state.userinfo) onMounted(() => { getList() @@ -53,11 +50,10 @@ // 获取列表 function getList() { - return // api.video.myLikeVideoList({ query: { - userId: userinfo.value.userId, + userId: userinfo.value.id, pageSize: list.pageSize, pageNum: list.pageNum, } diff --git a/jiuyi2/components/mine/product.vue b/jiuyi2/components/mine/product.vue index 4b987820..cb110e7b 100644 --- a/jiuyi2/components/mine/product.vue +++ b/jiuyi2/components/mine/product.vue @@ -5,8 +5,13 @@ import { ref, reactive, - onMounted + onMounted, + computed } from 'vue' + // + import { + useStore, + } from 'vuex' // 工具库 import util from '@/common/js/util'; // api @@ -17,10 +22,13 @@ // 列表数据 const list = reactive({ data: [], - pageSize: 10, + pageSize: 9, pageNum: 1, total: 0, }) + const store = useStore() + // 用户信息 + const userinfo = computed(() => store.state.userinfo) onMounted(() => { getList() @@ -48,10 +56,10 @@ // 获取列表 function getList() { - return // - api.video.myVideoList({ + api.video.myWorks({ query: { + userId: userinfo.value.id, pageSize: list.pageSize, pageNum: list.pageNum, } diff --git a/jiuyi2/components/public/jy-commodity-address/index.vue b/jiuyi2/components/public/jy-commodity-address/index.vue index a8c03730..c783b8bc 100644 --- a/jiuyi2/components/public/jy-commodity-address/index.vue +++ b/jiuyi2/components/public/jy-commodity-address/index.vue @@ -23,12 +23,12 @@ }) onMounted(() => { - // 开启监听 -addListener() + // 开启监听 + addListener() }) - + onUnmounted(() => { - // 移除监听 + // 移除监听 removeListener() }) @@ -65,16 +65,16 @@ addListener() - 收货地址收货地址收货地址收货地址收货地址收货地址收货地址 + {{address.province}}{{address.city}}{{address.country}}{{address.detail}} - 张三 123456789 + {{address.name}} {{address.mobile}} - + 选择地址 diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index 64ce1450..0f62e8e1 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -46,13 +46,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/shop/continue-pay/index", - "style": { - "navigationBarTitleText": "继续付款", - "navigationBarBackgroundColor": "#fff" - } - }, { "path": "pages/shop/store/index", "style": { @@ -145,7 +138,7 @@ } }, { - "path": "pages/mine/delivery-address/index", + "path": "pages/mine/address/index", "style": { "navigationBarTitleText": "收货地址", "navigationBarBackgroundColor": "#fff", @@ -713,6 +706,14 @@ "navigationBarTitleText" : "支付顺序", "navigationBarBackgroundColor": "#fff" } + }, + { + "path" : "pages/shop/commodity/payment", + "style" : + { + "navigationBarTitleText" : "继续付款", + "navigationBarBackgroundColor": "#fff" + } } ], diff --git a/jiuyi2/pages/index/dataCenter/dataCenter.vue b/jiuyi2/pages/index/dataCenter/dataCenter.vue index e6f9249f..86e8a797 100644 --- a/jiuyi2/pages/index/dataCenter/dataCenter.vue +++ b/jiuyi2/pages/index/dataCenter/dataCenter.vue @@ -131,7 +131,7 @@ - + diff --git a/jiuyi2/pages/index/videoDetail.nvue b/jiuyi2/pages/index/videoDetail.nvue index 8456d72f..6ac3ff0d 100644 --- a/jiuyi2/pages/index/videoDetail.nvue +++ b/jiuyi2/pages/index/videoDetail.nvue @@ -59,8 +59,8 @@ // 获取视频详情 function getVideoDetail() { api.video.getVideoById({ - query: { - videoId: videoId.value, + data: { + id: videoId.value, } }).then(rs => { if (rs.code == 200) { @@ -201,12 +201,22 @@ } }) } + + /** + * 跳转数据中心 + * @param {Object} detail + */ + function handleDataCenter(detail) { + // + }