Compare commits

..

No commits in common. "e4a71cc971ad5f118b98922ab139b105f96d1270" and "e704f5f1fcff518ecde7b0d95579a004e0d0499d" have entirely different histories.

31 changed files with 443 additions and 654 deletions

View File

@ -8,6 +8,7 @@
"prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"build:prod": "vue-cli-service build --mode prod", "build:prod": "vue-cli-service build --mode prod",
"build:dev": "vue-cli-service build --mode dev" "build:dev": "vue-cli-service build --mode dev"
}, },
"repository": "https://github.com/sheepjs/shop.git", "repository": "https://github.com/sheepjs/shop.git",
"keywords": [ "keywords": [
@ -92,7 +93,6 @@
"dependencies": { "dependencies": {
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"luch-request": "^3.0.8", "luch-request": "^3.0.8",
"pinia": "^2.0.33", "pinia": "^2.0.33",
"pinia-plugin-persist-uni": "^1.2.0", "pinia-plugin-persist-uni": "^1.2.0",

View File

@ -73,42 +73,6 @@
}, },
{ {
"path": "pages/index/page", "path": "pages/index/page",
"style": {
"navigationBarTitleText": "1"
},
"meta": {
"auth": false,
"sync": true,
"title": "自定义页面",
"group": "商城"
}
},
{
"path": "pages/index/page2",
"style": {
"navigationBarTitleText": "2"
},
"meta": {
"auth": false,
"sync": true,
"title": "自定义页面二",
"group": "商城二"
}
},
{
"path": "pages/index/page3",
"style": {
"navigationBarTitleText": ""
},
"meta": {
"auth": false,
"sync": true,
"title": "自定义页面",
"group": "商城"
}
},
{
"path": "pages/index/page4",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
}, },

View File

@ -11,7 +11,7 @@
<block v-if="modelValue.favorite"> <block v-if="modelValue.favorite">
<image <image
class="item-icon" class="item-icon"
src="@/static/images/collect_1.gif" :src="sheep.$url.static('/static/img/shop/goods/collect_1.gif')"
mode="aspectFit" mode="aspectFit"
/> />
<view class="item-title">已收藏</view> <view class="item-title">已收藏</view>
@ -19,7 +19,7 @@
<block v-else> <block v-else>
<image <image
class="item-icon" class="item-icon"
src="@/static/images/collect_0.png" :src="sheep.$url.static('/static/img/shop/goods/collect_0.png')"
mode="aspectFit" mode="aspectFit"
/> />
<view class="item-title">收藏</view> <view class="item-title">收藏</view>
@ -32,7 +32,7 @@
> >
<image <image
class="item-icon" class="item-icon"
src="/static/images/service.png" :src="sheep.$url.static('/static/img/shop/goods/message.png')"
mode="aspectFit" mode="aspectFit"
/> />
<view class="item-title">客服</view> <view class="item-title">客服</view>
@ -44,7 +44,7 @@
> >
<image <image
class="item-icon" class="item-icon"
src="@/static/images/share.png" :src="sheep.$url.static('/static/img/shop/goods/share.png')"
mode="aspectFit" mode="aspectFit"
/> />
<view class="item-title">分享</view> <view class="item-title">分享</view>

View File

@ -156,7 +156,7 @@
import CombinationApi from '@/sheep/api/promotion/combination'; import CombinationApi from '@/sheep/api/promotion/combination';
import SpuApi from '@/sheep/api/product/spu'; import SpuApi from '@/sheep/api/product/spu';
const headerBg = '@/static/images/seckill-header.png'; const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-bg.png');
const btnBg = sheep.$url.css('/static/img/shop/goods/groupon-btn.png'); const btnBg = sheep.$url.css('/static/img/shop/goods/groupon-btn.png');
const disabledBtnBg = sheep.$url.css('/static/img/shop/goods/activity-btn-disabled.png'); const disabledBtnBg = sheep.$url.css('/static/img/shop/goods/activity-btn-disabled.png');
const grouponBg = sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png'); const grouponBg = sheep.$url.css('/static/img/shop/goods/groupon-tip-bg.png');
@ -293,7 +293,7 @@
// height: 320rpx; // height: 320rpx;
background-size: 100% 100%; background-size: 100% 100%;
border-radius: 10rpx; border-radius: 10rpx;
background-image: url('@/static/images/seckill-header.png'); background-image: v-bind(headerBg);
background-repeat: no-repeat; background-repeat: no-repeat;
.price-box { .price-box {
@ -417,7 +417,7 @@
font-size: 24rpx; font-size: 24rpx;
font-weight: 600; font-weight: 600;
margin-left: -36rpx; margin-left: -36rpx;
background-image: url('@/static/images/groupon-btn.png'); background-image: v-bind(btnBg);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: #ffffff; color: #ffffff;
@ -430,7 +430,7 @@
font-size: 24rpx; font-size: 24rpx;
font-weight: 600; font-weight: 600;
margin-left: -36rpx; margin-left: -36rpx;
background-image: url('@/static/images/activity-btn-disabled.png'); background-image: v-bind(disabledBtnBg);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: #999999; color: #999999;

View File

@ -3,7 +3,6 @@
<s-layout <s-layout
:title="state.name" :title="state.name"
navbar="custom" navbar="custom"
tabbar="/pages/index/page"
:bgStyle="state.page" :bgStyle="state.page"
:navbarStyle="state.navigationBar" :navbarStyle="state.navigationBar"
onShareAppMessage onShareAppMessage

View File

@ -1,52 +0,0 @@
<!-- 自定义页面支持装修 -->
<template>
<s-layout
:title="state.name"
navbar="custom"
tabbar="/pages/index/page2"
:bgStyle="state.page"
:navbarStyle="state.navigationBar"
onShareAppMessage
showLeftButton
>
<s-block v-for="(item, index) in state.components" :key="index" :styles="item.property.style">
<s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
</s-block>
</s-layout>
</template>
<script setup>
import { reactive } from 'vue';
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
import DiyApi from '@/sheep/api/promotion/diy';
const state = reactive({
name: '',
components: [],
navigationBar: {},
page: {},
});
onLoad(async (options) => {
let id = options.id;
// #ifdef MP
//
if (options.scene) {
const sceneParams = decodeURIComponent(options.scene).split('=');
id = sceneParams[1];
}
// #endif
const { code, data } = await DiyApi.getDiyPage(id);
if (code === 0) {
state.name = data.name;
state.components = data.property?.components;
state.navigationBar = data.property?.navigationBar;
state.page = data.property?.page;
}
});
onPageScroll(() => {});
</script>
<style></style>

View File

@ -1,52 +0,0 @@
<!-- 自定义页面支持装修 -->
<template>
<s-layout
:title="state.name"
navbar="custom"
tabbar="/pages/index/page3"
:bgStyle="state.page"
:navbarStyle="state.navigationBar"
onShareAppMessage
showLeftButton
>
<s-block v-for="(item, index) in state.components" :key="index" :styles="item.property.style">
<s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
</s-block>
</s-layout>
</template>
<script setup>
import { reactive } from 'vue';
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
import DiyApi from '@/sheep/api/promotion/diy';
const state = reactive({
name: '',
components: [],
navigationBar: {},
page: {},
});
onLoad(async (options) => {
let id = options.id;
// #ifdef MP
//
if (options.scene) {
const sceneParams = decodeURIComponent(options.scene).split('=');
id = sceneParams[1];
}
// #endif
const { code, data } = await DiyApi.getDiyPage(id);
if (code === 0) {
state.name = data.name;
state.components = data.property?.components;
state.navigationBar = data.property?.navigationBar;
state.page = data.property?.page;
}
});
onPageScroll(() => {});
</script>
<style></style>

View File

@ -1,52 +0,0 @@
<!-- 自定义页面支持装修 -->
<template>
<s-layout
:title="state.name"
navbar="custom"
tabbar="/pages/index/page4"
:bgStyle="state.page"
:navbarStyle="state.navigationBar"
onShareAppMessage
showLeftButton
>
<s-block v-for="(item, index) in state.components" :key="index" :styles="item.property.style">
<s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
</s-block>
</s-layout>
</template>
<script setup>
import { reactive } from 'vue';
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
import DiyApi from '@/sheep/api/promotion/diy';
const state = reactive({
name: '',
components: [],
navigationBar: {},
page: {},
});
onLoad(async (options) => {
let id = options.id;
// #ifdef MP
//
if (options.scene) {
const sceneParams = decodeURIComponent(options.scene).split('=');
id = sceneParams[1];
}
// #endif
const { code, data } = await DiyApi.getDiyPage(id);
if (code === 0) {
state.name = data.name;
state.components = data.property?.components;
state.navigationBar = data.property?.navigationBar;
state.page = data.property?.page;
}
});
onPageScroll(() => {});
</script>
<style></style>

View File

@ -1,14 +1,13 @@
<!-- 个人中心支持装修 --> <!-- 个人中心支持装修 -->
<template> <template>
<s-layout <s-layout
title=" " title="我的"
tabbar="/pages/index/user" tabbar="/pages/index/user"
navbar="normal" navbar="custom"
:bgStyle="template.page" :bgStyle="template.page"
:navbarStyle="template.navigationBar" :navbarStyle="template.navigationBar"
onShareAppMessage onShareAppMessage
> >
<image class="seckill" src="@/static/images/seckill-bg.png"></image>
<s-block <s-block
v-for="(item, index) in template.components" v-for="(item, index) in template.components"
:key="index" :key="index"
@ -44,12 +43,4 @@
onPageScroll(() => {}); onPageScroll(() => {});
</script> </script>
<style> <style></style>
.seckill{
width:100%;
position:absolute;
}
view{
position: relative;
}
</style>

View File

@ -1,6 +1,5 @@
<template> <template>
<view> <view>
<!-- 基础组件搜索框 --> <!-- 基础组件搜索框 -->
<s-search-block v-if="type === 'SearchBar'" :data="data" :styles="styles" :navbar="false" /> <s-search-block v-if="type === 'SearchBar'" :data="data" :styles="styles" :navbar="false" />
<!-- 基础组件公告栏 --> <!-- 基础组件公告栏 -->

View File

@ -1,36 +1,61 @@
<!-- 装修基础组件菜单导航金刚区 --> <!-- 装修基础组件菜单导航金刚区 -->
<template> <template>
<view>
<view class="title">
我的服务
</view>
<!-- 包裹层 --> <!-- 包裹层 -->
<view class="ui-swiper" :class="[props.mode, props.bg, props.ui]" <view
:style="[{ height: swiperHeight + (menuList.length > 1 ? 50 : 0) + 'rpx' }]"> class="ui-swiper"
:class="[props.mode, props.bg, props.ui]"
:style="[{ height: swiperHeight + (menuList.length > 1 ? 50 : 0) + 'rpx' }]"
>
<!-- 轮播 --> <!-- 轮播 -->
<swiper :circular="props.circular" :current="state.cur" :autoplay="props.autoplay" <swiper
:interval="props.interval" :duration="props.duration" :style="[{ height: swiperHeight + 'rpx' }]" :circular="props.circular"
@change="swiperChange"> :current="state.cur"
<swiper-item v-for="(arr, index) in menuList" :key="index" :class="{ cur: state.cur == index }"> :autoplay="props.autoplay"
:interval="props.interval"
:duration="props.duration"
:style="[{ height: swiperHeight + 'rpx' }]"
@change="swiperChange"
>
<swiper-item
v-for="(arr, index) in menuList"
:key="index"
:class="{ cur: state.cur == index }"
>
<!-- 宫格 --> <!-- 宫格 -->
<view class="grid-wrap"> <view class="grid-wrap">
<view v-for="(item, index) in arr" :key="index" <view
v-for="(item, index) in arr"
:key="index"
class="grid-item ss-flex ss-flex-col ss-col-center ss-row-center" class="grid-item ss-flex ss-flex-col ss-col-center ss-row-center"
:style="[{ width: `${100 * (1 / data.column)}%`, height: '200rpx' }]" :style="[{ width: `${100 * (1 / data.column)}%`, height: '200rpx' }]"
hover-class="ss-hover-btn" @tap="sheep.$router.go(item.url)"> hover-class="ss-hover-btn"
@tap="sheep.$router.go(item.url)"
>
<view class="menu-box ss-flex ss-flex-col ss-col-center ss-row-center"> <view class="menu-box ss-flex ss-flex-col ss-col-center ss-row-center">
<view v-if="item.badge.show" class="tag-box" <view
:style="[{ background: item.badge.bgColor, color: item.badge.textColor }]"> v-if="item.badge.show"
class="tag-box"
:style="[{ background: item.badge.bgColor, color: item.badge.textColor }]"
>
{{ item.badge.text }} {{ item.badge.text }}
</view> </view>
<image v-if="item.iconUrl" class="menu-icon" :style="[ <image
v-if="item.iconUrl"
class="menu-icon"
:style="[
{ {
width: props.iconSize + 'rpx', width: props.iconSize + 'rpx',
height: props.iconSize + 'rpx', height: props.iconSize + 'rpx',
}, },
]" :src="sheep.$url.cdn(item.iconUrl)" mode="aspectFill"></image> ]"
<view v-if="data.layout === 'iconText'" class="menu-title" :src="sheep.$url.cdn(item.iconUrl)"
:style="[{ color: item.titleColor }]"> mode="aspectFill"
></image>
<view
v-if="data.layout === 'iconText'"
class="menu-title"
:style="[{ color: item.titleColor }]"
>
{{ item.title }} {{ item.title }}
</view> </view>
</view> </view>
@ -41,8 +66,12 @@
<!-- 指示点 --> <!-- 指示点 -->
<template v-if="menuList.length > 1"> <template v-if="menuList.length > 1">
<view class="ui-swiper-dot" :class="props.dotStyle" v-if="props.dotStyle != 'tag'"> <view class="ui-swiper-dot" :class="props.dotStyle" v-if="props.dotStyle != 'tag'">
<view class="line-box" v-for="(item, index) in menuList.length" :key="index" <view
:class="[state.cur == index ? 'cur' : '', props.dotCur]"></view> class="line-box"
v-for="(item, index) in menuList.length"
:key="index"
:class="[state.cur == index ? 'cur' : '', props.dotCur]"
></view>
</view> </view>
<view class="ui-swiper-dot" :class="props.dotStyle" v-if="props.dotStyle == 'tag'"> <view class="ui-swiper-dot" :class="props.dotStyle" v-if="props.dotStyle == 'tag'">
<view class="ui-tag radius" :class="[props.dotCur]" style="pointer-events: none"> <view class="ui-tag radius" :class="[props.dotCur]" style="pointer-events: none">
@ -51,7 +80,6 @@
</view> </view>
</template> </template>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
@ -83,10 +111,7 @@
* *
*/ */
import { import { reactive, computed } from 'vue';
reactive,
computed
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
// //
@ -212,15 +237,6 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.title {
padding: 10px 20px;
height: 20px;
line-height: 20px;
font-size: 16px;
font-weight: 600;
border-bottom: 1px solid #dcdcdc;
}
.grid-wrap { .grid-wrap {
width: 100%; width: 100%;
display: flex; display: flex;
@ -230,7 +246,6 @@
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
} }
.menu-box { .menu-box {
position: relative; position: relative;
z-index: 1; z-index: 1;
@ -319,7 +334,8 @@
opacity: 1; opacity: 1;
} }
&.cur::after {} &.cur::after {
}
} }
&.line { &.line {

View File

@ -1,42 +1,34 @@
<!-- 装修用户组件用户订单 --> <!-- 装修用户组件用户订单 -->
<template> <template>
<view>
<view class="title">
订单中心
</view>
<view class="ss-order-menu-wrap ss-flex ss-col-center"> <view class="ss-order-menu-wrap ss-flex ss-col-center">
<view
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center" v-for="(item, index) in orderMap" class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
:key="item.title" @tap="sheep.$router.go(item.path, { type: item.value })"> v-for="item in orderMap"
<uni-badge class="uni-badge-left-margin" :text="numData.orderCount[item.count]" absolute="rightTop" :key="item.title"
size="small"> @tap="sheep.$router.go(item.path, { type: item.value })"
<image v-if="index == 0" class="item-icon" :src="imag0" mode="aspectFit" /> >
<image v-if="index == 1" class="item-icon" :src="imag1" mode="aspectFit" /> <uni-badge
<image v-if="index == 2" class="item-icon" :src="imag2" mode="aspectFit" /> class="uni-badge-left-margin"
<image v-if="index == 3" class="item-icon" :src="imag3" mode="aspectFit" /> :text="numData.orderCount[item.count]"
<image v-if="index == 4" class="item-icon" :src="imag4" mode="aspectFit" /> absolute="rightTop"
size="small"
>
<image class="item-icon" :src="sheep.$url.static(item.icon)" mode="aspectFit" />
</uni-badge> </uni-badge>
<view class="menu-title ss-m-t-28">{{ item.title }}</view> <view class="menu-title ss-m-t-28">{{ item.title }}</view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
import imag0 from '@/static/images/no_0.png'
import imag1 from '@/static/images/no_take.png'
import imag2 from '@/static/images/no_comment.png'
import imag3 from '@/static/images/order.png'
import imag4 from '@/static/images/order.png'
/** /**
* 装修组件 - 订单菜单组 * 装修组件 - 订单菜单组
*/ */
import sheep from '@/sheep'; import sheep from '@/sheep';
import { import { computed } from 'vue';
computed
} from 'vue';
const orderMap = [{ const orderMap = [
{
title: '待付款', title: '待付款',
value: '1', value: '1',
icon: '/static/img/shop/order/no_pay.png', icon: '/static/img/shop/order/no_pay.png',
@ -80,32 +72,20 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.title {
padding: 10px 20px;
height: 20px;
line-height: 20px;
font-size: 16px;
font-weight: 600;
border-bottom: 1px solid #dcdcdc;
}
.ss-order-menu-wrap { .ss-order-menu-wrap {
.menu-item { .menu-item {
height: 160rpx; height: 160rpx;
position: relative; position: relative;
z-index: 10; z-index: 10;
.menu-title { .menu-title {
font-size: 24rpx; font-size: 24rpx;
line-height: 24rpx; line-height: 24rpx;
color: #333333; color: #333333;
} }
.item-icon { .item-icon {
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }
.num-icon { .num-icon {
position: absolute; position: absolute;
right: 18rpx; right: 18rpx;
@ -118,7 +98,6 @@
color: #fefefe; color: #fefefe;
display: flex; display: flex;
align-items: center; align-items: center;
.num { .num {
font-size: 24rpx; font-size: 24rpx;
transform: scale(0.8); transform: scale(0.8);

View File

@ -36,7 +36,7 @@
> >
<image <image
class="share-img" class="share-img"
src="@/static/images/share_poster.png" :src="sheep.$url.static('/static/img/shop/share/share_poster.png')"
mode="" mode=""
/> />
<text class="share-title">生成海报</text> <text class="share-title">生成海报</text>
@ -50,7 +50,7 @@
> >
<image <image
class="share-img" class="share-img"
src="@/static/images/share_link.png" :src="sheep.$url.static('/static/img/shop/share/share_link.png')"
mode="" mode=""
/> />
<text class="share-title">复制链接</text> <text class="share-title">复制链接</text>

View File

@ -9,7 +9,7 @@
:src=" :src="
isLogin isLogin
? sheep.$url.cdn(userInfo.avatar) ? sheep.$url.cdn(userInfo.avatar)
: defaultAvatar : sheep.$url.static('/static/img/shop/default_avatar.png')
" "
mode="aspectFill" mode="aspectFill"
@tap="sheep.$router.go('/pages/user/info')" @tap="sheep.$router.go('/pages/user/info')"
@ -43,8 +43,6 @@
</template> </template>
<script setup> <script setup>
// 使 import
import defaultAvatar from '@/static/images/default_avatar.png';
/** /**
* 用户卡片 * 用户卡片
* *
@ -122,7 +120,7 @@
.nick-name { .nick-name {
font-size: 34rpx; font-size: 34rpx;
font-weight: 400; font-weight: 400;
color: white; color: #333333;
line-height: normal; line-height: normal;
} }

View File

@ -41,7 +41,7 @@
> >
<image <image
class="item-icon" class="item-icon"
:src="walleticon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')"
mode="aspectFit" mode="aspectFit"
/> />
<view class="menu-title ss-m-t-30">我的钱包</view> <view class="menu-title ss-m-t-30">我的钱包</view>
@ -50,7 +50,6 @@
</template> </template>
<script setup> <script setup>
import walleticon from '@/static/images/wallet_icon.png'
/** /**
* 装修组件 - 订单菜单组 * 装修组件 - 订单菜单组
*/ */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B