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 @@
+
-
-
-
-
+ -->
+
+
一级({{ state.summary.firstBrokerageUserCount || 0 }})
@@ -152,7 +173,7 @@
- 暂无推广人数
+ 暂无推广人数
@@ -456,7 +477,7 @@
.promoter-list .nav .item.on {
border-bottom: 5rpx solid;
// $theme-color
- color: red;
+ color: var(--ui-BG-Main);
// $theme-color
}
diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue
index 73f96904..4ce3ad40 100644
--- a/pages/commission/withdraw.vue
+++ b/pages/commission/withdraw.vue
@@ -15,7 +15,10 @@
可提现金额(元)
{{ fen2yuan(state.brokerageInfo.brokeragePrice) }}
-
@@ -98,12 +101,23 @@
v-show="state.accountInfo.type === '2'"
>
-
+
+
+
+
开户地址
@@ -152,6 +166,7 @@
import { fen2yuan } from '@/sheep/hooks/useGoods';
import TradeConfigApi from '@/sheep/api/trade/config';
import BrokerageApi from '@/sheep/api/trade/brokerage';
+ import DictApi from '@/sheep/api/system/dict';
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
@@ -176,6 +191,8 @@
frozenDays: 0, // 冻结天数
minPrice: 0, // 最低提现金额
withdrawTypes: [], // 提现方式
+ bankList: [], // 银行字典数据
+ bankListSelectedIndex: '', // 选中银行 bankList 的 index
});
// 打开提现方式的弹窗
@@ -186,7 +203,7 @@
// 提交提现
const onConfirm = async () => {
// 参数校验
- debugger;
+ //debugger;
if (
!state.accountInfo.price ||
state.accountInfo.price > state.brokerageInfo.price ||
@@ -215,12 +232,12 @@
confirmText: '查看记录',
success: (res) => {
if (res.confirm) {
- sheep.$router.go('/pages/commission/wallet', { type: 2 })
+ sheep.$router.go('/pages/commission/wallet', { type: 2 });
return;
}
getBrokerageUser();
state.accountInfo = {};
- }
+ },
});
};
@@ -245,10 +262,29 @@
}
}
+ // 获取提现银行配置字典
+ async function getDictDataListByType() {
+ let { code, data } = await DictApi.getDictDataListByType('brokerage_bank_name');
+ if (code !== 0) {
+ return;
+ }
+ if (data && data.length > 0) {
+ state.bankList = data;
+ }
+ }
+
+ // 银行选择
+ function bankChange(e) {
+ const value = e.detail.value;
+ state.bankListSelectedIndex = value;
+ state.accountInfo.bankName = state.bankList[value].label;
+ }
+
onBeforeMount(() => {
getWithdrawRules();
- getBrokerageUser()
- })
+ getBrokerageUser();
+ getDictDataListByType(); //获取银行字典数据
+ });
\ No newline at end of file
+ .checkbox-container {
+ padding: 10rpx;
+ }
+
+ .post-btn {
+ width: 690rpx;
+ line-height: 80rpx;
+ border-radius: 40rpx;
+ color: rgba(#fff, 0.9);
+ margin-bottom: 20rpx;
+ }
+
diff --git a/pages/goods/comment/list.vue b/pages/goods/comment/list.vue
index 8d4184e7..ed43e1b7 100644
--- a/pages/goods/comment/list.vue
+++ b/pages/goods/comment/list.vue
@@ -1,6 +1,6 @@
-
+
-
-
import sheep from '@/sheep';
- // TODO 芋艿:这里要迁移下;
const seckillBg = sheep.$url.css('/static/img/shop/goods/seckill-tip-bg.png');
const grouponBg = sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png');
diff --git a/pages/goods/groupon.vue b/pages/goods/groupon.vue
index 354d6ed9..b24b1614 100644
--- a/pages/goods/groupon.vue
+++ b/pages/goods/groupon.vue
@@ -54,7 +54,7 @@
单买价:
- {{ fen2yuan(state.goodsInfo.price) }}
+ {{ fen2yuan(state.goodsInfo.marketPrice) }}
@@ -80,7 +80,7 @@
-
+
@@ -104,7 +104,6 @@
-
{{
- fen2yuan(state.activity.price || state.goodsInfo.price)
+ fen2yuan(
+ state.selectedSku.price * state.selectedSku.count ||
+ state.activity.price * state.selectedSku.count ||
+ state.goodsInfo.price * state.selectedSku.count ||
+ state.goodsInfo.price,
+ )
}}
未开始
已结束
@@ -168,7 +172,7 @@
goodsInfo: {}, // 商品信息
goodsSwiper: [], // 商品轮播图
showSelectSku: false, // 显示规格弹框
- selectedSkuPrice: {}, // 选中的规格价格
+ selectedSku: {}, // 选中的规格属性
activity: {}, // 团购活动
grouponId: 0, // 团购ID
grouponNum: 0, // 团购人数
@@ -183,7 +187,7 @@
// 规格变更
function onSkuChange(e) {
- state.selectedSkuPrice = e;
+ state.selectedSku = e;
}
function onSkuClose() {
@@ -199,6 +203,7 @@
/**
* 去参团
+ *
* @param record 团长的团购记录
*/
function onJoinGroupon(record) {
@@ -227,7 +232,6 @@
}
// 分享信息
- // TODO @芋艿:分享的接入
const shareInfo = computed(() => {
if (isEmpty(state.activity)) return {};
return sheep.$platform.share.getShareInfo(
@@ -262,9 +266,23 @@
// 加载商品信息
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 的最低价格
+
+ // 默认显示最低价
+ spu.price = activity.products.reduce((min, product) => {
+ return Math.min(min, product.combinationPrice || Infinity);
+ }, Infinity);
+
+ // 价格、库存使用活动的
+ spu.skus.forEach((sku) => {
+ const product = activity.products.find((product) => product.skuId === sku.id);
+ if (product) {
+ sku.price = product.combinationPrice;
+ } else {
+ // 找不到可能是没配置,则不能发起秒杀
+ sku.stock = 0;
+ }
});
+
// 关闭骨架屏
state.skeletonLoading = false;
if (code === 0) {
diff --git a/pages/goods/index.vue b/pages/goods/index.vue
index 062a0f2c..978448ac 100644
--- a/pages/goods/index.vue
+++ b/pages/goods/index.vue
@@ -7,47 +7,30 @@
-
+
-
-
-
-
-
-
-
-
- ¥{{fen2yuan(settleData.price)}}
-
-
- 直降¥{{fen2yuan( state.goodsInfo.price - settleData.price)}}
-
-
-
- 限时折扣
-
-
-
-
- 价格:¥{{fen2yuan(state.goodsInfo.price)}} 丨 剩余:{{settleData.stock}}
-
-
- 距结束仅剩
-
-
-
-
-
-
+
+
-
+
{{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }}
@@ -64,16 +47,23 @@
-
+
{{ promos.name }}
-
-
+
+
领券
@@ -84,30 +74,51 @@
-
+
-
+
-
+
-
+
-
+
加入购物车
-
+
立即购买
@@ -117,38 +128,32 @@
-
+
-
+
@@ -504,101 +448,4 @@
color: #333333;
}
}
-
- // 限时折扣
- .discount {
- width: 750rpx;
- height: 100rpx;
- // background-color: red;
- overflow: hidden;
- position: relative;
- }
-
- .disImg {
- width: 750rpx;
- height: 100rpx;
- position: absolute;
- top: 0;
- z-index: -1;
- }
-
- .discountCont {
- width: 680rpx;
- height: 90rpx;
- margin: 10rpx auto 0 auto;
- // background-color: gold;
- }
-
- .disContT {
- width: 680rpx;
- height: 50rpx;
- display: flex;
- justify-content: space-between;
- }
-
- .disContT1 {
- width: 400rpx;
- height: 50rpx;
- // background-color: green;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
-
- .disContT2 {
- width: 200rpx;
- height: 50rpx;
- line-height: 50rpx;
- // background-color: gold;
- font-size: 30rpx;
- text-align: end;
- color: white;
- font-weight: bolder;
- font-style: oblique 20deg;
- letter-spacing: .1rem;
- }
-
- .disContT1P {
- color: white;
- font-weight: bold;
- font-size: 28rpx;
- }
-
- .disContT1End {
- // width: 180rpx;
- padding: 0 10rpx;
- height: 30rpx;
- line-height: 28rpx;
- text-align: center;
- font-weight: bold;
- background-color: white;
- color: #ff3000;
- font-size: 23rpx;
- border-radius: 20rpx;
- margin-left: 10rpx;
- }
-
- .disContB {
- width: 680rpx;
- height: 40rpx;
- display: flex;
- justify-content: space-between;
- font-size: 20rpx;
- color: white;
- align-items: center;
- }
-
- .disContB1 {
- width: 300rpx;
- height: 40rpx;
- line-height: 40rpx;
- }
-
- .disContB2 {
- width: 300rpx;
- height: 40rpx;
- line-height: 40rpx;
- display: flex;
- justify-content: flex-end;
- }
-
\ No newline at end of file
+
diff --git a/pages/index/cart.vue b/pages/index/cart.vue
index ae90777f..633b567d 100644
--- a/pages/index/cart.vue
+++ b/pages/index/cart.vue
@@ -107,6 +107,7 @@
skuId: item.sku.id,
count: item.count,
cartId: item.id,
+ categoryId: item.spu.categoryId
})
goods_list.push({
// goods_id: item.goods_id,
@@ -124,12 +125,7 @@
}
sheep.$router.go('/pages/order/confirm', {
data: JSON.stringify({
- // order_type: 'goods',
- // goods_list,
- items,
- // from: 'cart',
- deliveryType: 1,
- pointStatus: false,
+ items
}),
});
}
diff --git a/pages/index/category.vue b/pages/index/category.vue
index cb87b0b5..4c88f388 100644
--- a/pages/index/category.vue
+++ b/pages/index/category.vue
@@ -131,12 +131,13 @@
getGoodsList();
}
- onLoad(async () => {
+ onLoad(async (params) => {
await getList();
- // 如果是 first 风格,需要加载商品分页
- if (state.style === 'first_one' || state.style === 'first_two') {
- onMenu(0);
- }
+
+ // 首页点击分类的处理:查找满足条件的分类
+ const foundCategory = state.categoryList.find(category => category.id === params.id);
+ // 如果找到则调用 onMenu 自动勾选相应分类,否则调用 onMenu(0) 勾选第一个分类
+ onMenu(foundCategory ? state.categoryList.indexOf(foundCategory) : 0);
});
onReachBottom(() => {
diff --git a/pages/order/addressSelection.vue b/pages/order/addressSelection.vue
index d041f079..d54c68d3 100644
--- a/pages/order/addressSelection.vue
+++ b/pages/order/addressSelection.vue
@@ -1,52 +1,69 @@
-
+
-
-
+
+
-
-
- {{ state.addressInfo.name }}
- {{ state.addressInfo.mobile }}
+
+
+ {{ state.addressInfo.name }}
+ {{ state.addressInfo.mobile }}
- [默认]
- {{ state.addressInfo.areaName }} {{ state.addressInfo.detailAddress }}
+ [默认]
+ {{ state.addressInfo.areaName }} {{ state.addressInfo.detailAddress }}
-
- 设置收货地址
+
+ 设置收货地址
-
+
-
-
- {{ state.pickUpInfo.name }}
- {{ state.pickUpInfo.phone }}
+
+
+ {{ state.pickUpInfo.name }}
+ {{ state.pickUpInfo.phone }}
- {{ state.pickUpInfo.areaName }}{{ ', ' + state.pickUpInfo.detailAddress }}
+
+ {{ state.pickUpInfo.areaName }}{{ ', ' + state.pickUpInfo.detailAddress }}
-
- 选择自提门店
+
+ 选择自提门店
-
+
-
+
@@ -61,13 +78,13 @@
modelValue: {
type: Object,
default() {},
- }
+ },
});
- const emits = defineEmits(['update:modelValue','change']);
+ const emits = defineEmits(['update:modelValue']);
// computed 解决父子组件双向数据同步
const state = computed({
- get(){
+ get() {
return new Proxy(props.modelValue, {
set(obj, name, val) {
emits('update:modelValue', {
@@ -75,21 +92,21 @@
[name]: val,
});
return true;
- }
- })
+ },
+ });
},
- set(val){
+ set(val) {
emits('update:modelValue', val);
- }
- })
+ },
+ });
// 选择地址
function onSelectAddress() {
- let emitName = 'SELECT_ADDRESS'
+ let emitName = 'SELECT_ADDRESS';
let addressPage = '/pages/user/address/list?type=select';
- if (state.value.deliveryType === 2){
- emitName = 'SELECT_PICK_UP_INFO'
- addressPage = '/pages/user/goods_details_store/index'
+ if (state.value.deliveryType === 2) {
+ emitName = 'SELECT_PICK_UP_INFO';
+ addressPage = '/pages/user/goods_details_store/index';
}
uni.$once(emitName, (e) => {
changeConsignee(e.addressInfo);
@@ -100,28 +117,26 @@
// 更改收货人地址&计算订单信息
async function changeConsignee(addressInfo = {}) {
if (!isEmpty(addressInfo)) {
- if (state.value.deliveryType === 1){
+ if (state.value.deliveryType === 1) {
state.value.addressInfo = addressInfo;
}
- if (state.value.deliveryType === 2){
+ if (state.value.deliveryType === 2) {
state.value.pickUpInfo = addressInfo;
}
- emits('change')
}
}
// 收货方式切换
- const switchDeliveryType = (type) =>{
+ const switchDeliveryType = (type) => {
state.value.deliveryType = type;
- emits('change')
- }
+ };
\ No newline at end of file
+
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index 8ab02713..ed0119fa 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -45,9 +45,9 @@
{{ formatOrderStatus(state.orderInfo) }}
- {{
- formatOrderStatusDescription(state.orderInfo)
- }}
+
+ {{ formatOrderStatusDescription(state.orderInfo) }}
+
@@ -126,6 +126,9 @@
+
+
+
@@ -167,11 +170,14 @@
运费
¥{{ fen2yuan(state.orderInfo.deliveryPrice) }}
-
优惠劵金额
-¥{{ fen2yuan(state.orderInfo.couponPrice) }}
+
+ 积分抵扣
+ -¥{{ fen2yuan(state.orderInfo.pointPrice) }}
+
活动优惠
¥{{ fen2yuan(state.orderInfo.discountPrice) }}
@@ -251,7 +257,7 @@
+
+
diff --git a/pages/pay/index.vue b/pages/pay/index.vue
index 46e3eafd..103e9e4d 100644
--- a/pages/pay/index.vue
+++ b/pages/pay/index.vue
@@ -174,6 +174,12 @@
return
}
state.payMethods = getPayMethods(data)
+ state.payMethods.find(item => {
+ if (item.value && !item.disabled) {
+ state.payment = item.value;
+ return true;
+ }
+ });
}
onLoad((options) => {
diff --git a/pages/pay/result.vue b/pages/pay/result.vue
index 49a65f4f..53e72b3d 100644
--- a/pages/pay/result.vue
+++ b/pages/pay/result.vue
@@ -39,7 +39,6 @@
查看订单
-
{
- // TODO 芋艿:目前简单做,使用营销文章,作为 faq
+ // TODO 芋艿:【文章】目前简单做,使用营销文章,作为 faq
if (true) {
sheep.$router.go('/pages/public/richtext', {
title: '常见问题',
diff --git a/pages/user/address/list.vue b/pages/user/address/list.vue
index 47b0b1a3..58b62147 100644
--- a/pages/user/address/list.vue
+++ b/pages/user/address/list.vue
@@ -39,8 +39,8 @@
+
diff --git a/pages/user/wallet/score.vue b/pages/user/wallet/score.vue
index be76de86..8e48b026 100644
--- a/pages/user/wallet/score.vue
+++ b/pages/user/wallet/score.vue
@@ -36,7 +36,7 @@
-
+
diff --git a/sheep/api/migration/chat.js b/sheep/api/migration/chat.js
deleted file mode 100644
index 140dd75d..00000000
--- a/sheep/api/migration/chat.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import request from '@/sheep/request';
-
-// TODO 芋艿:暂不支持 socket 聊天
-export default {
- // 获取聊天token
- unifiedToken: () =>
- request({
- url: 'unifiedToken',
- custom: {
- showError: false,
- showLoading: false,
- },
- }),
-};
diff --git a/sheep/api/promotion/activity.js b/sheep/api/promotion/activity.js
index eb47ce1d..2449ebb0 100644
--- a/sheep/api/promotion/activity.js
+++ b/sheep/api/promotion/activity.js
@@ -1,7 +1,7 @@
import request from '@/sheep/request';
const ActivityApi = {
- // 获得单个商品,近期参与的每个活动
+ // 获得单个商品,进行中的拼团、秒杀、砍价活动信息
getActivityListBySpuId: (spuId) => {
return request({
url: '/promotion/activity/list-by-spu-id',
diff --git a/sheep/api/promotion/combination.js b/sheep/api/promotion/combination.js
index 44f61e9d..8e8436cb 100644
--- a/sheep/api/promotion/combination.js
+++ b/sheep/api/promotion/combination.js
@@ -2,15 +2,6 @@ import request from '@/sheep/request';
// 拼团 API
const CombinationApi = {
- // 获得拼团活动列表
- getCombinationActivityList: (count) => {
- return request({
- url: '/promotion/combination-activity/list',
- method: 'GET',
- params: { count },
- });
- },
-
// 获得拼团活动分页
getCombinationActivityPage: (params) => {
return request({
@@ -31,6 +22,17 @@ const CombinationApi = {
});
},
+ // 获得拼团活动列表,基于活动编号数组
+ getCombinationActivityListByIds: (ids) => {
+ return request({
+ url: '/promotion/combination-activity/list-by-ids',
+ method: 'GET',
+ params: {
+ ids,
+ },
+ });
+ },
+
// 获得最近 n 条拼团记录(团长发起的)
getHeadCombinationRecordList: (activityId, status, count) => {
return request({
@@ -47,9 +49,9 @@ const CombinationApi = {
// 获得我的拼团记录分页
getCombinationRecordPage: (params) => {
return request({
- url: "/promotion/combination-record/page",
+ url: '/promotion/combination-record/page',
method: 'GET',
- params
+ params,
});
},
diff --git a/sheep/api/promotion/coupon.js b/sheep/api/promotion/coupon.js
index c9dfa524..f0382ee0 100644
--- a/sheep/api/promotion/coupon.js
+++ b/sheep/api/promotion/coupon.js
@@ -79,23 +79,6 @@ const CouponApi = {
},
});
},
- // 获得匹配指定商品的优惠劵列表
- getMatchCouponList: (price, spuIds, skuIds, categoryIds) => {
- return request({
- url: '/promotion/coupon/match-list',
- method: 'GET',
- params: {
- price,
- spuIds: spuIds.join(','),
- skuIds: skuIds.join(','),
- categoryIds: categoryIds.join(','),
- },
- custom: {
- showError: false,
- showLoading: false, // 避免影响 settlementOrder 结算的结果
- },
- });
- }
};
export default CouponApi;
diff --git a/sheep/api/promotion/seckill.js b/sheep/api/promotion/seckill.js
index 4d41e8b7..f57e054d 100644
--- a/sheep/api/promotion/seckill.js
+++ b/sheep/api/promotion/seckill.js
@@ -1,4 +1,4 @@
-import request from "@/sheep/request";
+import request from '@/sheep/request';
const SeckillApi = {
// 获得秒杀时间段列表
@@ -16,6 +16,17 @@ const SeckillApi = {
return request({ url: 'promotion/seckill-activity/page', method: 'GET', params });
},
+ // 获得秒杀活动列表,基于活动编号数组
+ getSeckillActivityListByIds: (ids) => {
+ return request({
+ url: '/promotion/seckill-activity/list-by-ids',
+ method: 'GET',
+ params: {
+ ids,
+ },
+ });
+ },
+
/**
* 获得秒杀活动明细
* @param {number} id 秒杀活动编号
@@ -25,9 +36,9 @@ const SeckillApi = {
return request({
url: 'promotion/seckill-activity/get-detail',
method: 'GET',
- params: { id }
+ params: { id },
});
- }
-}
+ },
+};
export default SeckillApi;
diff --git a/sheep/api/system/dict.js b/sheep/api/system/dict.js
new file mode 100644
index 00000000..83b6d952
--- /dev/null
+++ b/sheep/api/system/dict.js
@@ -0,0 +1,16 @@
+import request from '@/sheep/request';
+
+const DictApi = {
+ // 根据字典类型查询字典数据信息
+ getDictDataListByType: (type) => {
+ return request({
+ url: `/system/dict-data/type`,
+ method: 'GET',
+ params: {
+ type,
+ },
+ });
+ },
+};
+
+export default DictApi;
diff --git a/sheep/api/trade/delivery.js b/sheep/api/trade/delivery.js
index 27a08d95..a6551dab 100644
--- a/sheep/api/trade/delivery.js
+++ b/sheep/api/trade/delivery.js
@@ -7,7 +7,25 @@ const DeliveryApi = {
url: `/trade/delivery/express/list`,
method: 'get',
});
- }
+ },
+ // 获得自提门店列表
+ getDeliveryPickUpStoreList: (params) => {
+ return request({
+ url: `/trade/delivery/pick-up-store/list`,
+ method: 'GET',
+ params,
+ });
+ },
+ // 获得自提门店
+ getDeliveryPickUpStore: (id) => {
+ return request({
+ url: `/trade/delivery/pick-up-store/get`,
+ method: 'GET',
+ params: {
+ id,
+ },
+ });
+ },
};
export default DeliveryApi;
diff --git a/sheep/api/trade/order.js b/sheep/api/trade/order.js
index 4d571252..49661c79 100644
--- a/sheep/api/trade/order.js
+++ b/sheep/api/trade/order.js
@@ -1,4 +1,5 @@
import request from '@/sheep/request';
+import { isEmpty } from '@/sheep/helper/utils';
const OrderApi = {
// 计算订单信息
@@ -13,6 +14,15 @@ const OrderApi = {
if (!(data.addressId > 0)) {
delete data2.addressId;
}
+ if (!(data.pickUpStoreId > 0)) {
+ delete data2.pickUpStoreId;
+ }
+ if (isEmpty(data.receiverName)) {
+ delete data2.receiverName;
+ }
+ if (isEmpty(data.receiverMobile)) {
+ delete data2.receiverMobile;
+ }
if (!(data.combinationActivityId > 0)) {
delete data2.combinationActivityId;
}
diff --git a/sheep/components/s-auth-modal/s-auth-modal.vue b/sheep/components/s-auth-modal/s-auth-modal.vue
index cf6a6ff9..41a7dbbb 100644
--- a/sheep/components/s-auth-modal/s-auth-modal.vue
+++ b/sheep/components/s-auth-modal/s-auth-modal.vue
@@ -10,7 +10,11 @@
/>
-
+
@@ -32,7 +36,11 @@
还没有账号?
-
+
快捷登录
@@ -81,17 +89,13 @@
/>
我已阅读并遵守
-
- 《用户协议》
-
+ 《用户协议》
与
-
- 《隐私协议》
-
+ 《隐私协议》
-
+
@@ -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 @@
-
+
+
+
+ @click="sheep.$router.go('/pages/goods/groupon', { id: item.activityId })"
+ >
+
+
+
+ {{ btnBuy.type === 'text' ? btnBuy.text : '' }}
+
+
+
-
-
+
+
+
+
- {{ btnBuy?.type === 'text' ? btnBuy.text : '' }}
+ {{ btnBuy.type === 'text' ? btnBuy.text : '' }}
+
+
+
+
+
+
+
+
+
+ {{ btnBuy.type === 'text' ? btnBuy.text : '' }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ btnBuy.type === 'text' ? btnBuy.text : '' }}
+
+
+
+
+
+
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 @@
-
-
-
-
-
-
-
-
-
+ ]" :src="sheep.$url.cdn(item.iconUrl)" mode="aspectFill">
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ state.cur + 1 }} / {{ menuList.length }}
+
+
+
+
+ &.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 @@
-
-
-
-
-
- {{ item.badge.text }}
-
-
-
+
+
+
+
+
+
+ {{ item.badge.text }}
+
+
+
+
+
+
+ {{ item.title }}
+
+
+ {{ item.subtitle }}
+
+
+
+
+
+
-
-
- {{ item.title }}
-
-
- {{ item.subtitle }}
-
-
-
-
-
+ .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 @@
-