Branch_ccc #10

Merged
root merged 22 commits from Branch_ccc into master 2024-11-13 11:11:55 +08:00
17 changed files with 655 additions and 339 deletions
Showing only changes of commit 15bf3ad508 - Show all commits

View File

@ -1,7 +1,7 @@
<!-- 拼团活动列表 --> <!-- 拼团活动列表 -->
<template> <template>
<s-layout navbar="inner" :bgStyle="{ color: '#FE832A' }"> <s-layout navbar="inner" :bgStyle="{ color: '#FE832A' }">
<view class="page-bg" :style="[{ marginTop: '-' + Number(statusBarHeight + 88) + 'rpx' }]" /> <view class="page-bg" :class="state.themeType ? `${state.themeType}v` : ''" :style="[{ marginTop: '-' + Number(statusBarHeight + 88) + 'rpx' }]" />
<view class="list-content"> <view class="list-content">
<!-- 参团会员统计 --> <!-- 参团会员统计 -->
<view class="content-header ss-flex-col ss-col-center ss-row-center"> <view class="content-header ss-flex-col ss-col-center ss-row-center">
@ -17,7 +17,7 @@
<i>···</i> <i>···</i>
</span> </span>
</view> </view>
<text class="pic_count">{{ state.summaryData.userCount || 0 }}人参与</text> <text class="pic_count" :class="state.themeType ? state.themeType : ''">{{ state.summaryData.userCount || 0 }}人参与</text>
</view> </view>
</view> </view>
<scroll-view <scroll-view
@ -36,7 +36,7 @@
@click="sheep.$router.go('/pages/goods/groupon', { id: item.id })" @click="sheep.$router.go('/pages/goods/groupon', { id: item.id })"
> >
<template v-slot:cart> <template v-slot:cart>
<button class="ss-reset-button cart-btn">去拼团</button> <button class="ss-reset-button cart-btn" :class="state.themeType ? state.themeType : ''">去拼团</button>
</template> </template>
</s-goods-column> </s-goods-column>
</view> </view>
@ -53,11 +53,11 @@
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue'; import { reactive,computed } from 'vue';
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import sheep from '@/sheep'; import sheep from '@/sheep';
import CombinationApi from '@/sheep/api/promotion/combination'; import CombinationApi from '@/sheep/api/promotion/combination';
const app = computed(() => sheep.$store('app'));
const { safeAreaInsets, safeArea } = sheep.$platform.device; const { safeAreaInsets, safeArea } = sheep.$platform.device;
const sysNavBar = sheep.$platform.navbar; const sysNavBar = sheep.$platform.navbar;
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
@ -74,6 +74,7 @@
}, },
loadStatus: '', loadStatus: '',
summaryData: {}, summaryData: {},
themeType:app.value.platform.themeType
}); });
// //
@ -122,6 +123,14 @@
background: url('https://zysc.fjptzykj.com:3000/shangcheng/fea9ad54f32d4705a633874efd534e70e507030ea5a7604b0110fdf7292f1f4d.png'); background: url('https://zysc.fjptzykj.com:3000/shangcheng/fea9ad54f32d4705a633874efd534e70e507030ea5a7604b0110fdf7292f1f4d.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
.lvv{
background: url('https://zysc.fjptzykj.com:3000/shangcheng/ed254fe4a03c16933e608f8adeb3e700a24ec4620064746a516c10da395b9395.png') !important;
background-size: 100% 100%;
}
.bluev{
background: url('https://zysc.fjptzykj.com:3000/shangcheng/8728b7f2de5a0d2d8a74ef0c17a275f82b265a3d8d11993ec7c424c3ad454f0b.png') !important;
background-size: 100% 100%;
}
.list-content { .list-content {
position: relative; position: relative;
z-index: 3; z-index: 3;
@ -220,6 +229,7 @@
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%); background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
// background: rgba(72,204,82);
} }
} }
} }

View File

@ -3,7 +3,7 @@
<view class="detail-comment-card bg-white"> <view class="detail-comment-card bg-white">
<view class="card-header ss-flex ss-col-center ss-row-between ss-p-b-30"> <view class="card-header ss-flex ss-col-center ss-row-between ss-p-b-30">
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<view class="line"></view> <view class="line" :class="state.themeType ? `${state.themeType}` : ''"></view>
<view class="title ss-m-l-20 ss-m-r-10">评价</view> <view class="title ss-m-l-20 ss-m-r-10">评价</view>
<view class="des">({{ state.total }})</view> <view class="des">({{ state.total }})</view>
</view> </view>
@ -32,11 +32,11 @@
</template> </template>
<script setup> <script setup>
import { reactive, onBeforeMount } from 'vue'; import { reactive, onBeforeMount,computed } from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import CommentApi from '@/sheep/api/product/comment'; import CommentApi from '@/sheep/api/product/comment';
import commentItem from './comment-item.vue'; import commentItem from './comment-item.vue';
const app = computed(() => sheep.$store('app'));
const props = defineProps({ const props = defineProps({
goodsId: { goodsId: {
type: [Number, String], type: [Number, String],
@ -47,6 +47,7 @@
const state = reactive({ const state = reactive({
commentList: [], // 3 commentList: [], // 3
total: 0, // total: 0, //
themeType: app.value.platform.themeType
}); });
async function getComment(id) { async function getComment(id) {

View File

@ -2,7 +2,7 @@
<template> <template>
<view class="detail-content-card bg-white ss-m-x-20 ss-p-t-20"> <view class="detail-content-card bg-white ss-m-x-20 ss-p-t-20">
<view class="card-header ss-flex ss-col-center ss-m-b-30 ss-m-l-20"> <view class="card-header ss-flex ss-col-center ss-m-b-30 ss-m-l-20">
<view class="line"></view> <view class="line" :class="state.themeType ? `${state.themeType}` : ''"></view>
<view class="title ss-m-l-20 ss-m-r-20">详情</view> <view class="title ss-m-l-20 ss-m-r-20">详情</view>
</view> </view>
<view class="card-content"> <view class="card-content">
@ -12,8 +12,19 @@
</template> </template>
<script setup> <script setup>
import {
reactive,
computed
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
const { safeAreaInsets } = sheep.$platform.device; const app = computed(() => sheep.$store('app'));
const state = reactive({
themeType: app.value.platform.themeType
});
const {
safeAreaInsets
} = sheep.$platform.device;
const props = defineProps({ const props = defineProps({
content: { content: {

View File

@ -29,7 +29,7 @@
<view class="tab-title" :class="state.curTab === item.value ? 'cur-tab-title' : ''"> <view class="tab-title" :class="state.curTab === item.value ? 'cur-tab-title' : ''">
{{ item.label }} {{ item.label }}
</view> </view>
<view v-show="state.curTab === item.value" class="tab-line"></view> <view v-show="state.curTab === item.value" class="tab-line" :class="state.themeType ? state.themeType : ''"></view>
</view> </view>
</view> </view>
</view> </view>
@ -41,12 +41,12 @@
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue'; import { reactive, computed } from 'vue';
import { onPageScroll } from '@dcloudio/uni-app'; import { onPageScroll } from '@dcloudio/uni-app';
import sheep from '@/sheep'; import sheep from '@/sheep';
import throttle from '@/sheep/helper/throttle.js'; import throttle from '@/sheep/helper/throttle.js';
import { showMenuTools, closeMenuTools } from '@/sheep/hooks/useModal'; import { showMenuTools, closeMenuTools } from '@/sheep/hooks/useModal';
const app = computed(() => sheep.$store('app'));
const sys_statusBar = sheep.$platform.device.statusBarHeight; const sys_statusBar = sheep.$platform.device.statusBarHeight;
const sys_navBar = sheep.$platform.navbar; const sys_navBar = sheep.$platform.navbar;
const capsuleStyle = { const capsuleStyle = {
@ -74,6 +74,7 @@
to: 'detail-content-selector', to: 'detail-content-selector',
}, },
], ],
themeType:app.value.platform.themeType
}); });
const emits = defineEmits(['clickLeft']); const emits = defineEmits(['clickLeft']);
const hasHistory = sheep.$router.hasHistory(); const hasHistory = sheep.$router.hasHistory();

File diff suppressed because one or more lines are too long

View File

@ -111,12 +111,14 @@
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-if="state.goodsInfo.stock > 0"> <view class="buy-box ss-flex ss-col-center ss-p-r-20" v-if="state.goodsInfo.stock > 0">
<button <button
class="ss-reset-button add-btn ui-Shadow-Main" class="ss-reset-button add-btn ui-Shadow-Main"
:class="state.themeType ? `${state.themeType}v` : ''"
@tap="state.showSelectSku = true" @tap="state.showSelectSku = true"
> >
加入购物车 加入购物车
</button> </button>
<button <button
class="ss-reset-button buy-btn ui-Shadow-Main" class="ss-reset-button buy-btn ui-Shadow-Main"
:class="state.themeType ? state.themeType : ''"
@tap="state.showSelectSku = true" @tap="state.showSelectSku = true"
> >
立即购买 立即购买
@ -167,6 +169,7 @@
onPageScroll(() => {}); onPageScroll(() => {});
const isLogin = computed(() => sheep.$store('user').isLogin); const isLogin = computed(() => sheep.$store('user').isLogin);
const app = computed(() => sheep.$store('app'));
const state = reactive({ const state = reactive({
goodsId: 0, goodsId: 0,
skeletonLoading: true, // SPU skeletonLoading: true, // SPU
@ -178,6 +181,7 @@
showActivityModel: false, // / Activity showActivityModel: false, // / Activity
activityInfo: [], // / Activity activityInfo: [], // / Activity
activityList: [], // // Activity activityList: [], // // Activity
themeType:app.value.platform.themeType
}); });
// //
@ -318,6 +322,14 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.bluev{
background-color:rgba(33,202,254) !important;
color:white !important;
}
.lvv{
background-color:rgba(253,157,17) !important;
color:white !important;
}
.detail-card { .detail-card {
background-color: #ffff; background-color: #ffff;
margin: 14rpx 20rpx; margin: 14rpx 20rpx;

File diff suppressed because one or more lines are too long

View File

@ -21,10 +21,10 @@
<first-one v-if="state.style === 'first_one'" :pagination="state.pagination" /> <first-one v-if="state.style === 'first_one'" :pagination="state.pagination" />
<first-two v-if="state.style === 'first_two'" :pagination="state.pagination" /> <first-two v-if="state.style === 'first_two'" :pagination="state.pagination" />
<!-- 样式1 --> <!-- 样式1 -->
<!-- <second-one v-if="state.style === 'second_one'" :data="state.categoryList" <second-one v-show="state.typeId === '1'" :data="state.categoryList"
:activeMenu="state.activeMenu" /> --> :activeMenu="state.activeMenu" />
<!-- 样式2 --> <!-- 样式2 -->
<second-second ref="secondRef" v-if="state.style === 'second_one'" :data="state.categoryList" <second-second ref="secondRef" v-show="state.typeId === '2'" :data="state.categoryList"
:activeMenu="state.activeMenu" /> :activeMenu="state.activeMenu" />
<uni-load-more v-if=" <uni-load-more v-if="
@ -60,7 +60,6 @@
import { import {
handleTree handleTree
} from '@/sheep/util'; } from '@/sheep/util';
const state = reactive({ const state = reactive({
style: 'second_one', // first_one - , first_two - , second_one style: 'second_one', // first_one - , first_two - , second_one
categoryList: [], // categoryList: [], //
@ -74,8 +73,11 @@
pageSize: 6, pageSize: 6,
}, },
loadStatus: '', loadStatus: '',
typeId:'1'
}); });
const app = computed(() => sheep.$store('app'));
state.typeId = app.value.platform.goodsType;//
// console.log(app.value.platform.goodsType,"------------------------")
const secondRef = ref(null); const secondRef = ref(null);
const { const {

View File

@ -170,8 +170,8 @@
<image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image> <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image>
</view> </view>
<!-- <view v-if="seckillTag" class="seckill-tag ss-flex ss-row-center">秒杀</view> --> <!-- <view v-if="seckillTag" class="seckill-tag ss-flex ss-row-center">秒杀</view> -->
<view v-if="grouponTag" class="groupon-tag ss-flex ss-row-center"> <view v-if="grouponTag" class="groupon-tag ss-flex ss-row-center" :class="state.themeType ? state.themeType : ''">
<view class="tag-icon">拼团</view> <view class="tag-icon" :class="state.themeType ? state.themeType : ''">拼团</view>
</view> </view>
<image class="lg-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFill" /> <image class="lg-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFill" />
<view class="lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 "> <view class="lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 ">
@ -350,6 +350,7 @@
* *
*/ */
import { import {
reactive,
computed, computed,
getCurrentInstance, getCurrentInstance,
nextTick, nextTick,
@ -369,6 +370,10 @@
import { import {
PromotionActivityTypeEnum PromotionActivityTypeEnum
} from '@/sheep/util/const'; } from '@/sheep/util/const';
const app = computed(() => sheep.$store('app'));
const state = reactive({
themeType:app.value.platform.themeType
});
// console.log(PromotionActivityTypeEnum,"PromotionActivityTypeEnum") // console.log(PromotionActivityTypeEnum,"PromotionActivityTypeEnum")
// //
const props = defineProps({ const props = defineProps({

View File

@ -16,11 +16,7 @@
:key="item.title" @tap="sheep.$router.go(item.path, { type: item.value })"> :key="item.title" @tap="sheep.$router.go(item.path, { type: item.value })">
<uni-badge class="uni-badge-left-margin" :text="numData.orderCount[item.count]" absolute="rightTop" <uni-badge class="uni-badge-left-margin" :text="numData.orderCount[item.count]" absolute="rightTop"
size="small"> size="small">
<image v-if="index == 0" class="item-icon" :src="imag0" mode="aspectFit" /> <image class="item-icon" :src="item.icon" mode="aspectFit" />
<image v-if="index == 1" class="item-icon" :src="imag1" mode="aspectFit" />
<image v-if="index == 2" class="item-icon" :src="imag2" mode="aspectFit" />
<image v-if="index == 3" class="item-icon" :src="imag3" mode="aspectFit" />
<image v-if="index == 4" class="item-icon" :src="imag4" mode="aspectFit" />
</uni-badge> </uni-badge>
<view class="menu-title">{{ item.title }}</view> <view class="menu-title">{{ item.title }}</view>
</view> </view>
@ -39,13 +35,21 @@
*/ */
import sheep from '@/sheep'; import sheep from '@/sheep';
import { import {
computed computed,
reactive,
ref
} from 'vue'; } from 'vue';
const app = computed(() => sheep.$store('app'));
const state = reactive({
themeType: app.value.platform.themeType
});
const orderMap = ref([]);
const orderMap = [{ if (state.themeType == 'lv') {
orderMap.value = [{
title: '待付款', title: '待付款',
value: '1', value: '1',
icon: '/static/img/shop/order/no_pay.png', icon: 'https://zysc.fjptzykj.com:3000/shangcheng/853135945c3ba85e1e59b7b4998fc058353b0d6a293d123a7208ea119bbc3511.png',
path: '/pages/order/list', path: '/pages/order/list',
type: 'unpaid', type: 'unpaid',
count: 'unpaidCount', count: 'unpaidCount',
@ -53,7 +57,7 @@
{ {
title: '待发货', title: '待发货',
value: '2', value: '2',
icon: '/static/img/shop/order/no_take.png', icon: 'https://zysc.fjptzykj.com:3000/shangcheng/c9957347129a658ed5c9217bd913e4ecd8d05b161f9ba7931a7f9915657dde14.png',
path: '/pages/order/list', path: '/pages/order/list',
type: 'take', type: 'take',
count: 'undeliveredCount', count: 'undeliveredCount',
@ -61,7 +65,7 @@
{ {
title: '待收货', title: '待收货',
value: '3', value: '3',
icon: '/static/img/shop/order/no_take.png', icon: 'https://zysc.fjptzykj.com:3000/shangcheng/c2c90f1a7bee3d1d0e933b7ab7c5b186b4dbc0adf8748ceb4e69cabcbfab136f.png',
path: '/pages/order/list', path: '/pages/order/list',
type: 'noget', type: 'noget',
count: 'deliveredCount', count: 'deliveredCount',
@ -69,7 +73,7 @@
{ {
title: '待评价', title: '待评价',
value: '4', value: '4',
icon: '/static/img/shop/order/no_comment.png', icon: 'https://zysc.fjptzykj.com:3000/shangcheng/d392c395c9aa2fa0a6d250b4bad574909945f56cb480b7a05707c4f4e7e23b19.png',
path: '/pages/order/list', path: '/pages/order/list',
type: 'nocomment', type: 'nocomment',
count: 'uncommentedCount', count: 'uncommentedCount',
@ -77,7 +81,92 @@
{ {
title: '退款/售后', title: '退款/售后',
value: '0', value: '0',
icon: '/static/img/shop/order/change_order.png', icon: 'https://zysc.fjptzykj.com:3000/shangcheng/cdd41605506b625510a90ce6d8194ad4b66be37ec5bdf6a56ddcf8d9206eff40.png',
path: '/pages/order/aftersale/list',
type: 'aftersale',
count: 'afterSaleCount',
}
]
} else if (state.themeType == 'blue') {
orderMap.value = [{
title: '待付款',
value: '1',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/e947004cbd4ffa27cc5b0b752da5cebfc4133a280961711c581025ff2e28e04b.png',
path: '/pages/order/list',
type: 'unpaid',
count: 'unpaidCount',
},
{
title: '待发货',
value: '2',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/1658843d761c5d2a130feeabe86b82f11ef6f9546db4fd013eb94ab4d759858f.png',
path: '/pages/order/list',
type: 'take',
count: 'undeliveredCount',
},
{
title: '待收货',
value: '3',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/71e01ef9cfe2c54695169248f142dd28d37b56b61fc36622b98b415b70e7b495.png',
path: '/pages/order/list',
type: 'noget',
count: 'deliveredCount',
},
{
title: '待评价',
value: '4',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/3bcf948bf269e61d0fe709836b2d36f646bfc3adbc968efc9404e41e7be6f04d.png',
path: '/pages/order/list',
type: 'nocomment',
count: 'uncommentedCount',
},
{
title: '退款/售后',
value: '0',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/6c69c4f4b1887889a0d0a5ca34a26582a8ba4f0600ae2db3ea6c76a67fcdab59.png',
path: '/pages/order/aftersale/list',
type: 'aftersale',
count: 'afterSaleCount',
}
]
} else {
orderMap.value = [{
title: '待付款',
value: '1',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/623cb21c48a8e74cad53266c2b51db74408871f85a7e6adcb375513011659197.png',
path: '/pages/order/list',
type: 'unpaid',
count: 'unpaidCount',
},
{
title: '待发货',
value: '2',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/908b654b1d00bdb10f0364607fa2799f1209f2e986cb58582f0dc6ebe52d9ce4.png',
path: '/pages/order/list',
type: 'take',
count: 'undeliveredCount',
},
{
title: '待收货',
value: '3',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/a6bc4ea6f95aaaec8b12ce20886d2dd7e1db7b547ba1c52f8b4bebb35f3e7cf3.png',
path: '/pages/order/list',
type: 'noget',
count: 'deliveredCount',
},
{
title: '待评价',
value: '4',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/f4f14b9cc394e0791928257174fa1b62e05a535f5556f07218f058ffc6cefe80.png',
path: '/pages/order/list',
type: 'nocomment',
count: 'uncommentedCount',
},
{
title: '退款/售后',
value: '0',
icon: 'https://zysc.fjptzykj.com:3000/shangcheng/686bf80ff876ed116df99552e5649e10ed5a9cddcc7b3cd5adc641ec022366cf.png',
path: '/pages/order/aftersale/list', path: '/pages/order/aftersale/list',
type: 'aftersale', type: 'aftersale',
count: 'afterSaleCount', count: 'afterSaleCount',
@ -90,6 +179,8 @@
// path: '/pages/order/list', // path: '/pages/order/list',
// } // }
]; ];
}
const numData = computed(() => sheep.$store('user').numData); const numData = computed(() => sheep.$store('user').numData);

View File

@ -42,6 +42,12 @@
{ {
'disabled-btn': value.disabled === true, 'disabled-btn': value.disabled === true,
}, },
{
'lv' : state.themeType == 'lv' && state.currentPropertyArray[property.id] === value.id,
},
{
'blue' : state.themeType == 'blue' && state.currentPropertyArray[property.id] === value.id,
},
]" ]"
:key="value.id" :key="value.id"
:disabled="value.disabled === true" :disabled="value.disabled === true"
@ -59,6 +65,7 @@
:step="1" :step="1"
v-model="state.selectedSku.goods_num" v-model="state.selectedSku.goods_num"
@change="onNumberChange($event)" @change="onNumberChange($event)"
:vsl= state.themeType
/> />
</view> </view>
</scroll-view> </scroll-view>
@ -67,10 +74,10 @@
<!-- 操作区 --> <!-- 操作区 -->
<view class="modal-footer border-top"> <view class="modal-footer border-top">
<view class="buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center"> <view class="buy-box ss-flex ss-col-center ss-flex ss-col-center ss-row-center">
<button class="ss-reset-button add-btn ui-Shadow-Main" @tap="onAddCart" <button :class="state.themeType ? `${state.themeType}v` : ''" class="ss-reset-button add-btn ui-Shadow-Main" @tap="onAddCart"
>加入购物车</button >加入购物车</button
> >
<button class="ss-reset-button buy-btn ui-Shadow-Main" @tap="onBuy">立即购买</button> <button :class="state.themeType ? state.themeType : ''" class="ss-reset-button buy-btn ui-Shadow-Main" @tap="onBuy">立即购买</button>
</view> </view>
</view> </view>
</view> </view>
@ -81,7 +88,7 @@
import { computed, reactive, watch } from 'vue'; import { computed, reactive, watch } from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { formatStock, convertProductPropertyList, fen2yuan } from '@/sheep/hooks/useGoods'; import { formatStock, convertProductPropertyList, fen2yuan } from '@/sheep/hooks/useGoods';
const app = computed(() => sheep.$store('app'));
const emits = defineEmits(['change', 'addCart', 'buy', 'close']); const emits = defineEmits(['change', 'addCart', 'buy', 'close']);
const props = defineProps({ const props = defineProps({
goodsInfo: { goodsInfo: {
@ -97,6 +104,7 @@
const state = reactive({ const state = reactive({
selectedSku: {}, // SKU selectedSku: {}, // SKU
currentPropertyArray: [], // Mapkey property value value currentPropertyArray: [], // Mapkey property value value
themeType:app.value.platform.themeType
}); });
const propertyList = convertProductPropertyList(props.goodsInfo.skus); const propertyList = convertProductPropertyList(props.goodsInfo.skus);
@ -295,6 +303,14 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.bluev{
background-color:rgba(33,202,254) !important;
color:white !important;
}
.lvv{
background-color:rgba(253,157,17) !important;
color:white !important;
}
// //
.buy-box { .buy-box {
padding: 10rpx 0; padding: 10rpx 0;

View File

@ -1,24 +1,12 @@
<template> <template>
<view class="u-page__item" v-if="tabbar?.items?.length > 0"> <view class="u-page__item" v-if="tabbar?.items?.length > 0">
<su-tabbar <su-tabbar :value="path" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true"
:value="path" :inactiveColor="tabbar.style.color" :activeColor="tabbar.style.activeColor" :midTabBar="tabbar.mode === 2"
:fixed="true" :customStyle="tabbarStyle">
:placeholder="true" <su-tabbar-item v-for="(item, index) in Citrn" :key="item.text" :text="item.text" :name="item.url"
:safeAreaInsetBottom="true" :isCenter="getTabbarCenter(index)" :centerImage="sheep.$url.cdn(item.iconUrl)"
:inactiveColor="tabbar.style.color"
:activeColor="tabbar.style.activeColor"
:midTabBar="tabbar.mode === 2"
:customStyle="tabbarStyle"
>
<su-tabbar-item
v-for="(item, index) in tabbar.items"
:key="item.text"
:text="item.text"
:name="item.url"
:isCenter="getTabbarCenter(index)"
:centerImage="sheep.$url.cdn(item.iconUrl)"
@tap="sheep.$router.go(item.url)" @tap="sheep.$router.go(item.url)"
> :vl="state.themeType">
<template v-slot:active-icon> <template v-slot:active-icon>
<image class="u-page__item__slot-icon" :src="sheep.$url.cdn(item.activeIconUrl)"></image> <image class="u-page__item__slot-icon" :src="sheep.$url.cdn(item.activeIconUrl)"></image>
</template> </template>
@ -31,17 +19,117 @@
</template> </template>
<script setup> <script setup>
import { computed, unref } from 'vue'; import {
computed,
unref,
ref,
reactive
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
const app = computed(() => sheep.$store('app'));
const state = reactive({
themeType:app.value.platform.themeType
});
const tabbar = computed(() => { const tabbar = computed(() => {
return sheep.$store('app').template.basic?.tabbar; return sheep.$store('app').template.basic?.tabbar;
}); });
console.log('--------', tabbar.value.items)
const Citrn = ref([]);
if (state.themeType == 'lv') {
Citrn.value = [{
text: "首页",
url: "/pages/index/index",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/1-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/fdece57673d74d956692edad8c83e85b62503f90f1286cfcbfa9e1c564e127f0.png"
},
{
text: "分类",
url: "/pages/index/category?id=3",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/2-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/3f681bdfd791d2170fff188be799c588b60a3ceb5b9cd22b8b94a1ae508783d4.png"
},
{
text: "购物车",
url: "/pages/index/cart",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/3-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/c8e2bc5e2d49ad959951e52c4f4020d6b794310389a09138e1b454be6d6086ec.png"
},
{
text: "我的",
url: "/pages/index/user",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/4-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/cfd3ca7242acfa44b890c66b43ea39dc83de0570a20718251c73785540085002.png"
}
];
} else if (state.themeType == 'blue') {
Citrn.value = [{
text: "首页",
url: "/pages/index/index",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/1-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/d353e289077f36dab00bb39b161e04364e8d5c1f8e86b2c8ad77e2efc8b38c80.png"
},
{
text: "分类",
url: "/pages/index/category?id=3",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/2-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/ffdbfc0244b68cbc0985339049e9b5b5cddf16e50cf4c0ec7326efd61dc5334d.png"
},
{
text: "购物车",
url: "/pages/index/cart",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/3-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/5d399948d0d391a2ae88fb29049ced561106d7bc6d3bae525c32f3f6dfb92677.png"
},
{
text: "我的",
url: "/pages/index/user",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/4-001.png",
activeIconUrl: "https://zysc.fjptzykj.com:3000/shangcheng/4a5387da733de9a9b2bfe921d0a3f09031cc6da7d3bf1b6125eb6635c9e5f7e9.png"
}
];
} else {
Citrn.value = [{
text: "首页",
url: "/pages/index/index",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/1-001.png",
activeIconUrl: "http://mall.yudao.iocoder.cn/static/images/1-002.png"
},
{
text: "分类",
url: "/pages/index/category?id=3",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/2-001.png",
activeIconUrl: "http://mall.yudao.iocoder.cn/static/images/2-002.png"
},
{
text: "购物车",
url: "/pages/index/cart",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/3-001.png",
activeIconUrl: "http://mall.yudao.iocoder.cn/static/images/3-002.png"
},
{
text: "我的",
url: "/pages/index/user",
iconUrl: "http://mall.yudao.iocoder.cn/static/images/4-001.png",
activeIconUrl: "http://mall.yudao.iocoder.cn/static/images/4-002.png"
}
];
}
const tabbarStyle = computed(() => { const tabbarStyle = computed(() => {
const backgroundStyle = tabbar.value.style; const backgroundStyle = tabbar.value.style;
if (backgroundStyle.bgType === 'color') { if (backgroundStyle.bgType === 'color') {
return { background: backgroundStyle.bgColor }; return {
background: backgroundStyle.bgColor
};
} }
if (backgroundStyle.bgType === 'img') if (backgroundStyle.bgType === 'img')
return { return {
@ -53,9 +141,9 @@
const getTabbarCenter = (index) => { const getTabbarCenter = (index) => {
if (unref(tabbar).mode !== 2) return false; if (unref(tabbar).mode !== 2) return false;
return unref(tabbar).items % 2 > 0 return unref(tabbar).items % 2 > 0 ?
? Math.ceil(unref(tabbar).items.length / 2) === index + 1 Math.ceil(unref(tabbar).items.length / 2) === index + 1 :
: false; false;
}; };
const props = defineProps({ const props = defineProps({

View File

@ -1,7 +1,9 @@
<!-- 装修用户组件用户卡片 --> <!-- 装修用户组件用户卡片 -->
<template> <template>
<view class="ss-user-info-wrap ss-p-t-50" style="z-index: 9999;"> <view class="ss-user-info-wrap ss-p-t-50" style="z-index: 9999;">
<image class="seckill" src="@/static/images/seckilbg.png"></image> <image class="seckill" src="@/static/images/seckilbg.png" v-if="state.themeType == ''"></image>
<image class="seckill" src="https://zysc.fjptzykj.com:3000/shangcheng/7925fd9e2c1df9cd29462c946f7c54d89d148b03d5fd366864636c3343282a2b.png" v-if="state.themeType == 'lv'"></image>
<image class="seckill" src="https://zysc.fjptzykj.com:3000/shangcheng/b350b54f38628fcb465805b81d624717dc83598604c4e58c674ae8558dc7386c.png" v-if="state.themeType == 'blue'"></image>
<view class="ss-flex ss-col-center ss-row-between "> <view class="ss-flex ss-col-center ss-row-between ">
<view class="left-box ss-flex ss-col-center ss-m-l-36"> <view class="left-box ss-flex ss-col-center ss-m-l-36">
<view class="avatar-box ss-m-r-24"> <view class="avatar-box ss-m-r-24">
@ -73,7 +75,10 @@
showShareModal, showShareModal,
showAuthModal showAuthModal
} from '@/sheep/hooks/useModal'; } from '@/sheep/hooks/useModal';
const app = computed(() => sheep.$store('app'));
const state = reactive({
themeType: app.value.platform.themeType
});
// //
const userInfo = computed(() => sheep.$store('user').userInfo); const userInfo = computed(() => sheep.$store('user').userInfo);
console.log('用户信息', userInfo); console.log('用户信息', userInfo);

View File

@ -25,3 +25,12 @@ page {
color: transparent; color: transparent;
display: none; display: none;
} }
/* 主题颜色 */
.lv{
background:rgba(72,204,82) !important;
}
.blue{
background:rgba(28,165,233) !important;
}

View File

@ -1,5 +1,7 @@
import DiyApi from '@/sheep/api/promotion/diy'; import DiyApi from '@/sheep/api/promotion/diy';
import { defineStore } from 'pinia'; import {
defineStore
} from 'pinia';
import $platform from '@/sheep/platform'; import $platform from '@/sheep/platform';
import $router from '@/sheep/router'; import $router from '@/sheep/router';
import user from './user'; import user from './user';
@ -27,6 +29,7 @@ const app = defineStore({
linkAddress: '', // 复制链接地址 linkAddress: '', // 复制链接地址
}, },
bind_mobile: 0, // 登陆后绑定手机号提醒 (弱提醒,可手动关闭) bind_mobile: 0, // 登陆后绑定手机号提醒 (弱提醒,可手动关闭)
goodsType: '' //商城分类样式
}, },
template: { template: {
// 店铺装修模板 // 店铺装修模板
@ -55,8 +58,8 @@ const app = defineStore({
} }
// 加载装修配置 // 加载装修配置
await adaptTemplate(this.template, templateId); const res2 = await adaptTemplate(this.template, templateId);
console.log(res2,"--------------")
// TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init // TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init
if (true) { if (true) {
this.info = { this.info = {
@ -80,6 +83,8 @@ const app = defineStore({
}, },
}, },
bind_mobile: 0, bind_mobile: 0,
goodsType:res2.goodsType,
themeType:res2.themeType
}; };
this.has_wechat_trade_managed = 0; this.has_wechat_trade_managed = 0;
@ -100,20 +105,20 @@ const app = defineStore({
}, },
persist: { persist: {
enabled: true, enabled: true,
strategies: [ strategies: [{
{
key: 'app-store', key: 'app-store',
}, }, ],
],
}, },
}); });
// todo: @owen 先做数据适配,后期重构 // todo: @owen 先做数据适配,后期重构
const adaptTemplate = async (appTemplate, templateId) => { const adaptTemplate = async (appTemplate, templateId) => {
const { data: diyTemplate } = templateId const {
data: diyTemplate
} = templateId
? // 查询指定模板,一般是预览时使用 ? // 查询指定模板,一般是预览时使用
await DiyApi.getDiyTemplate(templateId) await DiyApi.getDiyTemplate(templateId) :
: await DiyApi.getUsedDiyTemplate(); await DiyApi.getUsedDiyTemplate();
// 模板不存在 // 模板不存在
if (!diyTemplate) { if (!diyTemplate) {
$router.error('TemplateError'); $router.error('TemplateError');
@ -129,6 +134,7 @@ const adaptTemplate = async (appTemplate, templateId) => {
} }
appTemplate.home = diyTemplate?.home; appTemplate.home = diyTemplate?.home;
appTemplate.user = diyTemplate?.user; appTemplate.user = diyTemplate?.user;
return diyTemplate
}; };
export default app; export default app;

View File

@ -11,6 +11,8 @@
'uni-numbox--disabled': inputValue <= min || disabled, 'uni-numbox--disabled': inputValue <= min || disabled,
'groupon-btn': activity === 'groupon', 'groupon-btn': activity === 'groupon',
'seckill-btn': activity === 'seckill', 'seckill-btn': activity === 'seckill',
'lvv' : vsl == 'lv',
'bluev' : vsl == 'blue',
}" }"
@click="_calcValue('minus')" @click="_calcValue('minus')"
></text> ></text>
@ -33,6 +35,8 @@
'uni-numbox--disabled': inputValue >= max || disabled, 'uni-numbox--disabled': inputValue >= max || disabled,
'groupon-btn': activity === 'groupon', 'groupon-btn': activity === 'groupon',
'seckill-btn': activity === 'seckill', 'seckill-btn': activity === 'seckill',
'lvv' : vsl == 'lv',
'bluev' : vsl == 'blue',
}" }"
@click="_calcValue('plus')" @click="_calcValue('plus')"
></text> ></text>
@ -59,6 +63,10 @@
name: 'UniNumberBox', name: 'UniNumberBox',
emits: ['change', 'input', 'update:modelValue', 'blur', 'focus'], emits: ['change', 'input', 'update:modelValue', 'blur', 'focus'],
props: { props: {
vsl:{
type: String,
default: '',
},
value: { value: {
type: [Number, String], type: [Number, String],
default: 1, default: 1,
@ -185,6 +193,12 @@
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.bluev{
color:rgba(28,165,233) !important;
}
.lvv{
color:rgba(72,204,82) !important;
}
.uni-numbox .uni-numbox--disabled { .uni-numbox .uni-numbox--disabled {
color: #c0c0c0 !important; color: #c0c0c0 !important;
/* #ifdef H5 */ /* #ifdef H5 */

View File

@ -32,6 +32,7 @@
:style="{ :style="{
color: isActive ? parentData.activeColor : parentData.color, color: isActive ? parentData.activeColor : parentData.color,
}" }"
:class="vl && isActive ? `${vl}v` : ''"
> >
{{ text }} {{ text }}
</text> </text>
@ -65,6 +66,10 @@
type: String, type: String,
default: '', default: '',
}, },
vl: {
type: String,
default: '',
},
// //
url: { url: {
type: String, type: String,
@ -185,6 +190,12 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.lvv{
color:rgba(72,204,82) !important;
}
.bluev{
color:rgba(28,165,233) !important;
}
.tabbar-center-item { .tabbar-center-item {
height: 40px; height: 40px;
width: 40px; width: 40px;