diff --git a/.env b/.env index adcc17dd..6172fd55 100644 --- a/.env +++ b/.env @@ -18,7 +18,8 @@ SHOPRO_WEBSOCKET_PATH = /infra/ws SHOPRO_DEV_PORT = 3000 # 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀 -SHOPRO_STATIC_URL = https://file.sheepjs.com +SHOPRO_STATIC_URL = http://test.yudao.iocoder.cn +### SHOPRO_STATIC_URL = https://file.sheepjs.com # 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启) SHOPRO_MPLIVE_ON = 0 diff --git a/manifest.json b/manifest.json index 2dfab7c7..ac575dbe 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "appid": "__UNI__460BC4C", "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", "versionName": "2.1.0", - "versionCode": 183, + "versionCode": "183", "transformPx": false, "app-plus": { "usingComponents": true, @@ -188,7 +188,8 @@ "setting": { "urlCheck": false, "minified": true, - "postcss": true + "postcss": false, + "es6": false }, "optimization": { "subPackages": true @@ -216,7 +217,7 @@ "h5": { "template": "index.html", "router": { - "mode": "hash", + "mode": "history", "base": "./" }, "sdkConfigs": { diff --git a/pages.json b/pages.json index 72d50091..78d7c311 100644 --- a/pages.json +++ b/pages.json @@ -307,6 +307,18 @@ "title": "编辑地址" } }, + { + "path": "goods_details_store/index", + "style": { + "navigationBarTitleText": "自提门店" + }, + "meta": { + "auth": true, + "sync": true, + "title": "地址管理", + "group": "用户中心" + } + }, { "path": "wallet/money", "style": { diff --git a/pages/activity/groupon/detail.vue b/pages/activity/groupon/detail.vue index 86daff20..7b606ec6 100644 --- a/pages/activity/groupon/detail.vue +++ b/pages/activity/groupon/detail.vue @@ -181,11 +181,11 @@ - - + + + @@ -203,25 +204,28 @@ import { computed, reactive } from 'vue'; import sheep from '@/sheep'; import { onLoad } from '@dcloudio/uni-app'; - import { useDurationTime } from '@/sheep/hooks/useGoods'; + import { fen2yuan, useDurationTime } from '@/sheep/hooks/useGoods'; import { showShareModal } from '@/sheep/hooks/useModal'; import { isEmpty } from 'lodash-es'; import CombinationApi from '@/sheep/api/promotion/combination'; + import SpuApi from '@/sheep/api/product/spu'; const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png'); const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const state = reactive({ data: {}, // 拼团详情 - loading: true, - grouponAction: 'create', - showSelectSku: false, - grouponNum: 0, - number: 0, - activity: {}, + goodsId: 0, // 商品ID + goodsInfo: {}, // 商品信息 + showSelectSku: false, // 显示规格弹框 + selectedSkuPrice: {}, // 选中的规格价格 + activity: {}, // 团购活动 + grouponId: 0, // 团购ID + grouponNum: 0, // 团购人数 + grouponAction: 'create', // 团购操作 combinationHeadId: null, // 拼团团长编号 + loading: true, }); - // todo 芋艿:分享要再接下 const shareInfo = computed(() => { if (isEmpty(state.data)) return {}; return sheep.$platform.share.getShareInfo( @@ -231,15 +235,14 @@ desc: state.data.goods?.subtitle, params: { page: '5', - query: state.data.id, + query: state.data.headRecord.id, }, }, { type: 'groupon', // 邀请拼团海报 title: state.data.headRecord.spuName, // 商品标题 image: sheep.$url.cdn(state.data.headRecord.picUrl), // 商品主图 - price: state.data.goods?.price, // 商品价格 - original_price: state.data.goods?.original_price, // 商品原价 + price: fen2yuan(state.data.headRecord.combinationPrice), // 商品价格 }, ); }); @@ -251,33 +254,33 @@ }); } - // 去开团 TODO 芋艿:这里没接入 + // 去开团 function onCreateGroupon() { state.grouponAction = 'create'; state.grouponId = 0; state.showSelectSku = true; } - // 规格变更 TODO 芋艿:这里没接入 + // 规格变更 function onSkuChange(e) { state.selectedSkuPrice = e; } - // 立即参团 TODO 芋艿:这里没接入 + // 立即参团 function onJoinGroupon() { state.grouponAction = 'join'; - state.grouponId = state.data.activityId; - state.combinationHeadId = state.data.id; - state.grouponNum = state.data.num; + state.grouponId = state.data.headRecord.activityId; + state.combinationHeadId = state.data.headRecord.id; + state.grouponNum = state.data.headRecord.userSize; state.showSelectSku = true; } - // 立即购买 TODO 芋艿:这里没接入 + // 立即购买 function onBuy(sku) { sheep.$router.go('/pages/order/confirm', { data: JSON.stringify({ order_type: 'goods', - combinationActivityId: state.data.activity.id, + combinationActivityId: state.activity.id, combinationHeadId: state.combinationHeadId, items: [ { @@ -306,6 +309,25 @@ data.headRecord.activityId, ); state.activity = activity; + state.grouponNum = activity.userSize; + // 加载商品信息 + const { data: spu } = await SpuApi.getSpuDetail(activity.spuId); + state.goodsId = spu.id; + // 默认显示最低价 + activity.products.forEach((product) => { + spu.price = Math.min(spu.price, product.combinationPrice); // 设置 SPU 的最低价格 + }); + state.goodsInfo = spu; + // 价格、库存使用活动的 + spu.skus.forEach((sku) => { + const product = activity.products.find((product) => product.skuId === sku.id); + if (product) { + sku.price = product.combinationPrice; + } else { + // 找不到可能是没配置,则不能发起秒杀 + sku.stock = 0; + } + }); } else { state.data = null; } diff --git a/pages/app/sign.vue b/pages/app/sign.vue index cb87bbe8..cf299d3c 100644 --- a/pages/app/sign.vue +++ b/pages/app/sign.vue @@ -62,7 +62,7 @@ - + 签到说明 1、已累计签到{{state.signInfo.totalDay}}天 @@ -110,7 +110,7 @@ signInfo: {}, // 签到信息 signConfigList: [], // 签到配置列表 - maxDay: 0, // 最大的签到天数 + maxDay: 0, // 最大的签到天数 showModel: false, // 签到弹框 signResult: {}, // 签到结果 diff --git a/pages/chat/components/messageList.vue b/pages/chat/components/messageList.vue index d08fd838..95a19e9e 100644 --- a/pages/chat/components/messageList.vue +++ b/pages/chat/components/messageList.vue @@ -7,7 +7,7 @@ @scrolltoupper="onScrollToUpper" @query="queryList"> @@ -33,7 +33,9 @@ import { reactive, ref } from 'vue'; import KeFuApi from '@/sheep/api/promotion/kefu'; import { isEmpty } from '@/sheep/helper/utils'; - + import sheep from '@/sheep'; + + const sys_navBar = sheep.$platform.navbar; const messageList = ref([]); // 消息列表 const showNewMessageTip = ref(false); // 显示有新消息提示 const backToTopStyle = reactive({ @@ -67,7 +69,7 @@ }; /** 刷新消息列表 */ const refreshMessageList = (message = undefined) => { - if (queryParams.pageNo != 1 && message !== undefined) { + if (message !== undefined) { showNewMessageTip.value = true; // 追加数据 pagingRef.value.addChatRecordData([message], false); @@ -87,8 +89,6 @@ return; } showNewMessageTip.value = false; - // 到底重置消息列表 - refreshMessageList(); }; defineExpose({ getMessageList, refreshMessageList }); diff --git a/pages/chat/components/messageListItem.vue b/pages/chat/components/messageListItem.vue index 0634878b..06a718de 100644 --- a/pages/chat/components/messageListItem.vue +++ b/pages/chat/components/messageListItem.vue @@ -4,12 +4,20 @@ - + {{ formatDate(message.createTime) }} - + {{ message.content }} @@ -18,32 +26,35 @@ v-if="message.contentType !== KeFuMessageContentTypeEnum.SYSTEM" class="ss-flex ss-col-top" :class="[ - message.senderType === UserTypeEnum.ADMIN - ? `ss-row-left` - : message.senderType === UserTypeEnum.MEMBER - ? `ss-row-right` - : '', - ]" + message.senderType === UserTypeEnum.ADMIN + ? `ss-row-left` + : message.senderType === UserTypeEnum.MEMBER + ? `ss-row-right` + : '', + ]" > @@ -104,7 +109,7 @@ // 消息 message: { type: Object, - default: ()=>({}), + default: () => ({}), }, // 消息索引 messageIndex: { @@ -112,10 +117,10 @@ default: 0, }, // 消息列表 - messageList:{ + messageList: { type: Array, default: () => [], - } + }, }); const getMessageContent = computed(() => (item) => JSON.parse(item.content)); // 解析消息内容 diff --git a/pages/commission/components/commission-menu.vue b/pages/commission/components/commission-menu.vue index 5655ca74..42498f5e 100644 --- a/pages/commission/components/commission-menu.vue +++ b/pages/commission/components/commission-menu.vue @@ -1,138 +1,145 @@ \ No newline at end of file + .menu-title { + font-size: 26rpx; + font-weight: 500; + color: #ffffff; + } + diff --git a/pages/commission/goods.vue b/pages/commission/goods.vue index b9df293a..4a3d9eba 100644 --- a/pages/commission/goods.vue +++ b/pages/commission/goods.vue @@ -76,7 +76,7 @@ shareInfo: {}, }); - // TODO 芋艿:分享的接入 + // TODO @puhui999:【分享】接入 function onShareGoods(goodsInfo) { state.shareInfo = $share.getShareInfo( { diff --git a/pages/commission/team.vue b/pages/commission/team.vue index eb58abb9..926c3bda 100644 --- a/pages/commission/team.vue +++ b/pages/commission/team.vue @@ -1,8 +1,29 @@ @@ -107,8 +111,6 @@ import mpAuthorization from './components/mp-authorization.vue'; import { closeAuthModal, showAuthModal } from '@/sheep/hooks/useModal'; - const appInfo = computed(() => sheep.$store('app').info); - const modalStore = sheep.$store('modal'); // 授权弹窗类型 const authType = computed(() => modalStore.auth); @@ -152,7 +154,13 @@ } const loginRes = await sheep.$platform.useProvider(provider).login(); if (loginRes) { + const userInfo = await sheep.$store('user').getInfo(); closeAuthModal(); + // 如果用户已经有头像和昵称,不需要再次授权 + if (userInfo.avatar && userInfo.nickname) { + return; + } + // 触发小程序授权信息弹框 // #ifdef MP-WEIXIN showAuthModal('mpAuthorization'); diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue index 9cd60073..5e65b36b 100644 --- a/sheep/components/s-block-item/s-block-item.vue +++ b/sheep/components/s-block-item/s-block-item.vue @@ -9,7 +9,7 @@ - + @@ -47,13 +47,13 @@ - + - + - + - + diff --git a/sheep/components/s-coupon-block/s-coupon-block.vue b/sheep/components/s-coupon-block/s-coupon-block.vue index 6250b4b6..89a0f0e8 100644 --- a/sheep/components/s-coupon-block/s-coupon-block.vue +++ b/sheep/components/s-coupon-block/s-coupon-block.vue @@ -1,152 +1,176 @@ + &.vertical { + width: 50rpx; + height: 140rpx; + margin: auto 20rpx auto 0; + + .btn-text { + font-size: 24rpx; + text-align: center; + writing-mode: vertical-lr; + } + } + } + + .coupon-item { + &:nth-of-type(1) { + margin-left: 0 !important; + } + } + \ No newline at end of file diff --git a/sheep/components/s-coupon-card/s-coupon-card.vue b/sheep/components/s-coupon-card/s-coupon-card.vue index bd5705bb..dac69e31 100644 --- a/sheep/components/s-coupon-card/s-coupon-card.vue +++ b/sheep/components/s-coupon-card/s-coupon-card.vue @@ -1,6 +1,6 @@ \ No newline at end of file + diff --git a/sheep/components/s-groupon-block/s-groupon-block.vue b/sheep/components/s-groupon-block/s-groupon-block.vue index 2c32d603..1a5a5918 100644 --- a/sheep/components/s-groupon-block/s-groupon-block.vue +++ b/sheep/components/s-groupon-block/s-groupon-block.vue @@ -1,83 +1,166 @@ - + diff --git a/sheep/components/s-live-block/s-live-block.vue b/sheep/components/s-live-block/s-live-block.vue index 9d1ad032..6e0b6c95 100644 --- a/sheep/components/s-live-block/s-live-block.vue +++ b/sheep/components/s-live-block/s-live-block.vue @@ -70,8 +70,8 @@ default() {}, }, }); - const { mode, goodsFields, mpliveIds } = props.data ?? {}; - const { marginLeft, marginRight } = props.styles ?? {}; + const { mode, goodsFields, mpliveIds } = props.data || {}; + const { marginLeft, marginRight } = props.styles || {}; async function getLiveListByIds(ids) { const { data } = await sheep.$api.app.mplive.getRoomList(ids); diff --git a/sheep/components/s-menu-button/s-menu-button.vue b/sheep/components/s-menu-button/s-menu-button.vue index 375a5913..ef647b89 100644 --- a/sheep/components/s-menu-button/s-menu-button.vue +++ b/sheep/components/s-menu-button/s-menu-button.vue @@ -1,363 +1,343 @@ + &.cur { + opacity: 1; + } + } + } + + &.tag { + justify-content: flex-end; + position: absolute; + bottom: 20rpx; + right: 20rpx; + } + } + } + \ No newline at end of file diff --git a/sheep/components/s-menu-grid/s-menu-grid.vue b/sheep/components/s-menu-grid/s-menu-grid.vue index 518d6edf..d05a49d4 100644 --- a/sheep/components/s-menu-grid/s-menu-grid.vue +++ b/sheep/components/s-menu-grid/s-menu-grid.vue @@ -1,82 +1,104 @@ + .grid-item-box { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + + .img-box { + position: relative; + + .tag-box { + position: absolute; + z-index: 2; + top: 0; + right: 0; + font-size: 2em; + line-height: 1; + padding: 0.4em 0.6em 0.3em; + transform: scale(0.4) translateX(0.5em) translatey(-0.6em); + transform-origin: 100% 0; + border-radius: 200rpx; + white-space: nowrap; + } + } + + .title-box { + .grid-tip { + font-size: 24rpx; + white-space: nowrap; + text-align: center; + } + } + } + \ No newline at end of file diff --git a/sheep/components/s-order-card/s-order-card.vue b/sheep/components/s-order-card/s-order-card.vue index 095e6cfd..b3d851bd 100644 --- a/sheep/components/s-order-card/s-order-card.vue +++ b/sheep/components/s-order-card/s-order-card.vue @@ -1,6 +1,6 @@