init
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<view class="detail-content-card ss-p-b-20">
|
||||
<view class="card-content">
|
||||
<mp-html :content="content"></mp-html>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
content: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-content-card {
|
||||
.card-header {
|
||||
.line {
|
||||
width: 6rpx;
|
||||
height: 30rpx;
|
||||
background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%);
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.des {
|
||||
font-size: 24rpx;
|
||||
color: $dark-9;
|
||||
}
|
||||
|
||||
.more-btn {
|
||||
font-size: 24rpx;
|
||||
color: var(--ui-BG-Main);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep() {
|
||||
image {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<view
|
||||
class="skeleton-wrap"
|
||||
:class="['theme-' + sys.mode, 'main-' + sys.theme, 'font-' + sys.fontSize]"
|
||||
>
|
||||
<view class="skeleton-banner"></view>
|
||||
<view class="container-box">
|
||||
<view class="container-box-strip title ss-m-b-58"></view>
|
||||
<view class="container-box-strip ss-m-b-20"></view>
|
||||
<view class="container-box-strip ss-m-b-20"></view>
|
||||
<view class="container-box-strip w-364"></view>
|
||||
</view>
|
||||
<view class="container-box">
|
||||
<view class="ss-flex ss-row-between ss-m-b-34">
|
||||
<view class="container-box-strip w-380"></view>
|
||||
<view class="circle"></view>
|
||||
</view>
|
||||
<view class="ss-flex ss-row-between ss-m-b-34">
|
||||
<view class="container-box-strip w-556"></view>
|
||||
<view class="circle"></view>
|
||||
</view>
|
||||
<view class="ss-flex ss-row-between">
|
||||
<view class="container-box-strip w-556"></view>
|
||||
<view class="circle"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="container-box">
|
||||
<view class="container-box-strip w-198 ss-m-b-42"></view>
|
||||
<view class="ss-flex">
|
||||
<view class="circle ss-m-r-12"></view>
|
||||
<view class="container-box-strip w-252"></view>
|
||||
</view>
|
||||
</view>
|
||||
<su-fixed bottom placeholder bg="bg-white">
|
||||
<view class="ui-tabbar-box">
|
||||
<view class="foot ss-flex ss-col-center">
|
||||
<view class="ss-m-r-54 ss-m-l-32">
|
||||
<view class="rec ss-m-b-8"></view>
|
||||
<view class="oval"></view>
|
||||
</view>
|
||||
<view class="ss-m-r-54">
|
||||
<view class="rec ss-m-b-8"></view>
|
||||
<view class="oval"></view>
|
||||
</view>
|
||||
<view class="ss-m-r-50">
|
||||
<view class="rec ss-m-b-8"></view>
|
||||
<view class="oval"></view>
|
||||
</view>
|
||||
<button class="ss-reset-button add-btn ui-Shadow-Main"></button>
|
||||
<button class="ss-reset-button buy-btn ui-Shadow-Main"></button>
|
||||
</view>
|
||||
</view>
|
||||
</su-fixed>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
const sys = computed(() => sheep.$store('sys'));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@keyframes loading {
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-wrap {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.skeleton-banner {
|
||||
width: 100%;
|
||||
height: calc(100vh - 882rpx);
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.container-box {
|
||||
padding: 24rpx 18rpx;
|
||||
margin: 14rpx 20rpx;
|
||||
background: var(--ui-BG);
|
||||
animation: loading 1.4s ease infinite;
|
||||
|
||||
.container-box-strip {
|
||||
height: 40rpx;
|
||||
background: #f3f3f1;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 470rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
|
||||
.w-364 {
|
||||
width: 364rpx;
|
||||
}
|
||||
|
||||
.w-380 {
|
||||
width: 380rpx;
|
||||
}
|
||||
|
||||
.w-556 {
|
||||
width: 556rpx;
|
||||
}
|
||||
|
||||
.w-198 {
|
||||
width: 198rpx;
|
||||
}
|
||||
|
||||
.w-252 {
|
||||
width: 252rpx;
|
||||
}
|
||||
|
||||
.circle {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: #f3f3f1;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.ui-tabbar-box {
|
||||
box-shadow: 0px -6px 10px 0px rgba(51, 51, 51, 0.2);
|
||||
}
|
||||
|
||||
.foot {
|
||||
height: 100rpx;
|
||||
background: var(--ui-BG);
|
||||
.rec {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
background: #f3f3f1;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.oval {
|
||||
width: 38rpx;
|
||||
height: 22rpx;
|
||||
background: #f3f3f1;
|
||||
border-radius: 11rpx;
|
||||
}
|
||||
.add-btn {
|
||||
width: 214rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
border-radius: 40rpx 0 0 40rpx;
|
||||
background-color: var(--ui-BG-Main-light);
|
||||
color: var(--ui-BG-Main);
|
||||
}
|
||||
|
||||
.buy-btn {
|
||||
width: 214rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<view class="flex-row" @click="go">
|
||||
<view class="w_176 h_176 radius12 bg0">
|
||||
<image
|
||||
class="w100 h100"
|
||||
v-if="props.data?.picUrl"
|
||||
:src="props.data.picUrl"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image class="w100 h100" v-else src="/static/product_null.png" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="flex1 flex-column ju-between m-l-18">
|
||||
<view>
|
||||
<view class="size28 c0 lineTwo m-b-12">{{ props.data.productName }}</view>
|
||||
<view class="size24 c19">{{ props.data.title }}</view>
|
||||
</view>
|
||||
<view class="flex-row ju-between">
|
||||
<view class="c35 line56 size32"
|
||||
>{{ props.data.price }}<span class="size24">积分</span>
|
||||
</view>
|
||||
<view
|
||||
class="w_170 line56 bg35 radius12 center size28"
|
||||
style="color: #ffffff"
|
||||
@click.stop="sub"
|
||||
>
|
||||
{{
|
||||
statusObj(parseInt(props?.data?.joinStatus) || 0, parseInt(props?.data?.status) || 0)
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, getCurrentInstance, defineProps } from 'vue';
|
||||
import * as api from '@/sheep/api/increment';
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
let props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// status:1:已参加,0:未参加
|
||||
// joinStatus:0:未开团,1:已开团,2:开团成功,3:开团失败
|
||||
|
||||
const statusObj = (joinStatus, status) => {
|
||||
console.log(joinStatus, status);
|
||||
let text = '未开团';
|
||||
switch (status) {
|
||||
case 0:
|
||||
text = '未开团';
|
||||
if (joinStatus === 1) {
|
||||
text = '已参团';
|
||||
} else {
|
||||
text = '立即参团';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
text = '已开团';
|
||||
if (joinStatus === 1) {
|
||||
text = '已参团';
|
||||
} else {
|
||||
text = '立即参团';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
text = '开团成功';
|
||||
break;
|
||||
case 3:
|
||||
text = '开团失败';
|
||||
break;
|
||||
}
|
||||
return text;
|
||||
};
|
||||
const go = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/increment/info?id=' + props.data.productId,
|
||||
});
|
||||
};
|
||||
const sub = () => {
|
||||
api
|
||||
.joinGroup({
|
||||
groupBuyId: props.data.groupBuyId,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
proxy.$emit('upDate');
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<view class="tabBar bg16 h_100 flex-center ju-around">
|
||||
<view class="" v-for="(v, i) in nav" :key="i" @click="go(v)">
|
||||
<view class="flex-center">
|
||||
<image
|
||||
class="w_50 h_50"
|
||||
:src="`/static/increment/${v.icon == props.index ? v.icon1 : v.icon}.svg`"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="size24 name" :class="{ c32: v.icon == props.index }">{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
let props = defineProps({
|
||||
index: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
});
|
||||
let nav = ref([
|
||||
{
|
||||
name: '拼分',
|
||||
icon: '1',
|
||||
icon1: '1_1',
|
||||
path: '/pages/increment/index',
|
||||
},
|
||||
// {
|
||||
// name: '报单',
|
||||
// icon: '2',
|
||||
// icon1: '2_1',
|
||||
// path: '/pages/increment/index'
|
||||
// },
|
||||
{
|
||||
name: '我的',
|
||||
icon: '3',
|
||||
icon1: '3_1',
|
||||
path: '/pages/increment/user',
|
||||
},
|
||||
]);
|
||||
const go = (v) => {
|
||||
if (v.icon == props.index) return;
|
||||
uni.redirectTo({ url: v.path });
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.tabBar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
width: 100vw;
|
||||
}
|
||||
.name {
|
||||
color: #979797;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user