diff --git a/.env b/.env new file mode 100644 index 00000000..da303d9b --- /dev/null +++ b/.env @@ -0,0 +1,20 @@ +# 版本号 +SHOPRO_VERSION = v1.8.3 + +# 正式环境接口域名 +SHOPRO_BASE_URL = https://api.shopro.sheepjs.com + +# 开发环境接口域名 +SHOPRO_DEV_BASE_URL = https://api.shopro.sheepjs.com + +# 开发环境运行端口 +SHOPRO_DEV_PORT = 3000 + +# 接口地址前缀 +SHOPRO_API_PATH = /shop/api/ + +# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀 +SHOPRO_STATIC_URL = https://file.sheepjs.com + +# 是否开启直播 1 开启直播 | 0 关闭直播 (小程序官方后台未审核开通直播权限时请勿开启) +SHOPRO_MPLIVE_ON = 0 \ No newline at end of file diff --git a/pages/index/user.vue b/pages/index/user.vue index a1425311..b51e5fdb 100644 --- a/pages/index/user.vue +++ b/pages/index/user.vue @@ -3,13 +3,13 @@ title="我的" tabbar="/pages/index/user" navbar="custom" - :bgStyle="template.style?.background" + :bgStyle="template.page" :navbarStyle="template.style?.navbar" onShareAppMessage :showFloatButton="true" > - - + + diff --git a/sheep/api/product/spu.js b/sheep/api/product/spu.js new file mode 100644 index 00000000..87bf1fa5 --- /dev/null +++ b/sheep/api/product/spu.js @@ -0,0 +1,37 @@ +import request from '@/sheep/request'; + +const SpuApi = { + // 获得商品 SPU 列表 + getSpuList: (recommendType) => { + return request({ + url: '/app-api/product/spu/list', + method: 'GET', + params: {recommendType}, + }); + }, + // 获得商品 SPU 列表 + getSpuListByIds: (ids) => { + return request({ + url: '/app-api/product/spu/list-by-ids', + method: 'GET', + params: {ids}, + }); + }, + // 获得商品 SPU 分页 + getSpuPage: (data) => { + return request({ + url: '/app-api/product/spu/page', + method: 'GET', + data + }); + }, + // 查询商品 + getSpuDetail: (id) => { + return request({ + url: '/app-api/product/spu/get-detail', + method: 'GET', + params: { id }, + }); + } +}; +export default SpuApi; diff --git a/sheep/api/promotion/article.js b/sheep/api/promotion/article.js new file mode 100644 index 00000000..36b037d0 --- /dev/null +++ b/sheep/api/promotion/article.js @@ -0,0 +1,12 @@ +import request from '@/sheep/request'; + +export default { + // 获得文章详情 + getArticle: (id) => { + return request({ + url: '/app-api/promotion/article/get', + method: 'GET', + params: { id } + }); + } +} diff --git a/sheep/api/promotion/combination.js b/sheep/api/promotion/combination.js new file mode 100644 index 00000000..eeeb9a0a --- /dev/null +++ b/sheep/api/promotion/combination.js @@ -0,0 +1,67 @@ +import request2 from "@/sheep/request2"; + +// 拼团 API +const CombinationApi = { + // 获得拼团活动列表 + getCombinationActivityList: (count) => { + return request2({ + url: "promotion/combination-activity/list", + method: 'GET', + params: {count} + }); + }, + + // 获得拼团活动分页 + getCombinationActivityPage: (params) => { + return request2({ + url: "promotion/combination-activity/page", + method: 'GET', + params + }); + }, + + // 获得拼团活动明细 + getCombinationActivity: (id) => { + return request2({ + url: "promotion/combination-activity/get-detail", + method: 'GET', + params: { + id + } + }); + }, + + // 获得最近 n 条拼团记录(团长发起的) + getHeadCombinationRecordList: (activityId, status, count) => { + return request2({ + url: "promotion/combination-record/get-head-list", + method: 'GET', + params: { + activityId, + status, + count + } + }); + }, + + // 获得拼团记录明细 + getCombinationRecordDetail: (id) => { + return request2({ + url: "promotion/combination-record/get-detail", + method: 'GET', + params: { + id + } + }); + }, + + // 获得拼团记录的概要信息 + getCombinationRecordSummary: () => { + return request2({ + url: "promotion/combination-record/get-summary", + method: 'GET', + }); + } +} + +export default CombinationApi diff --git a/sheep/api/promotion/coupon.js b/sheep/api/promotion/coupon.js new file mode 100644 index 00000000..d4e62dd5 --- /dev/null +++ b/sheep/api/promotion/coupon.js @@ -0,0 +1,12 @@ +import request from '@/sheep/request'; + +export default { + // 获得优惠劵模板列表 + getCouponTemplateListByIds: (ids) => { + return request({ + url: '/app-api/promotion/coupon-template/list-by-ids', + method: 'GET', + params: { ids } + }); + } +} diff --git a/sheep/api/promotion/seckill.js b/sheep/api/promotion/seckill.js new file mode 100644 index 00000000..ecbb4c1f --- /dev/null +++ b/sheep/api/promotion/seckill.js @@ -0,0 +1,33 @@ +import request2 from "@/sheep/request2"; + +const SeckillApi = { + // 获得秒杀时间段列表 + getSeckillConfigList: () => { + return request2({ url: 'promotion/seckill-config/list', method: 'GET' }); + }, + + // 获得当前秒杀活动 + getNowSeckillActivity: () => { + return request2({ url: 'promotion/seckill-activity/get-now', method: 'GET' }); + }, + + // 获得秒杀活动分页 + getSeckillActivityPage: () => { + return request2({ url: 'promotion/seckill-activity/page', method: 'GET' }); + }, + + /** + * 获得秒杀活动明细 + * @param {number} id 秒杀活动编号 + * @return {*} + */ + getSeckillActivity: (id) => { + return request2({ + url: 'promotion/seckill-activity/get-detail', + method: 'GET', + params: { id } + }); + } +} + +export default SeckillApi; diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue index 3d19d856..a9c795b8 100644 --- a/sheep/components/s-block-item/s-block-item.vue +++ b/sheep/components/s-block-item/s-block-item.vue @@ -18,40 +18,40 @@ - + - - - - + + - + - + - + - - - - - + + + + + - + + + - - - - - - - - + + + + + + + + diff --git a/sheep/components/s-coupon-block/s-coupon-block.vue b/sheep/components/s-coupon-block/s-coupon-block.vue index d8060bce..af29c097 100644 --- a/sheep/components/s-coupon-block/s-coupon-block.vue +++ b/sheep/components/s-coupon-block/s-coupon-block.vue @@ -1,126 +1,54 @@ @@ -168,25 +131,21 @@ border-radius: 25rpx; font-size: 24rpx; line-height: 50rpx; + &.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; } } - .md-coupon-wrap { - .card-btn { - width: 50rpx; - height: 140rpx; - margin: auto 0; - margin-right: 20rpx; - - .btn-text { - font-size: 24rpx; - text-align: center; - writing-mode: vertical-lr; - writing-mode: tb-lr; - } - } - } diff --git a/sheep/components/s-goods-card/s-goods-card.vue b/sheep/components/s-goods-card/s-goods-card.vue index 8aeba1f1..b51706f7 100644 --- a/sheep/components/s-goods-card/s-goods-card.vue +++ b/sheep/components/s-goods-card/s-goods-card.vue @@ -1,8 +1,8 @@