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>
|
||||
@@ -0,0 +1,283 @@
|
||||
<template>
|
||||
<s-layout :title="dataObj.title" navbar="inner">
|
||||
<view class="pages h100">
|
||||
<image
|
||||
class="w100 bg"
|
||||
:src="$url + 'home/points.png'"
|
||||
mode="widthFix"
|
||||
:style="{ top: paddingTop + 'px' }"
|
||||
/>
|
||||
<view class="pages_con">
|
||||
<!-- :style="{ marginTop: marginTop + 'px' }" -->
|
||||
<view class="page_top c0">
|
||||
<view class="size28 name">{{ dataObj.name }}</view>
|
||||
<view class="flex-row al-flex-end">
|
||||
<view class="num">{{ detailObj[dataObj.num] }}{{ dataObj.unit }}</view>
|
||||
<view class="btn size24 btn_bg" @click="goUrl(dataObj.url)" v-if="dataObj.btn">
|
||||
{{ dataObj.btn }}
|
||||
</view>
|
||||
<view class="btn size24 btn_bg" @click="goUrl(dataObj.url1)" v-if="dataObj.btn1">
|
||||
{{ dataObj.btn1 }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page_bottom bg24">
|
||||
<view class="bottom_title center c0"> 收支明细 </view>
|
||||
<view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height + 'px'">
|
||||
<view
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
class="flex-center ju-between p-b-34 p-t-32 border-bottom"
|
||||
>
|
||||
<view>
|
||||
<view class="size28 line40 m-b-10 c0">{{ v.remark }}</view>
|
||||
<view class="size24 c_999 line34">{{ formatDate(v.createTime) }}</view>
|
||||
</view>
|
||||
<view>{{ dataObj.numValue }}</view>
|
||||
<view class="size32 c_EE0A24">
|
||||
{{
|
||||
dataObj.sourceName && v[dataObj?.sourceName] === 1
|
||||
? (dataObj.sourceName ? '+' : '') + v[dataObj.numName]
|
||||
: (dataObj.sourceName ? '-' : '') + v[dataObj.numName]
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/increment';
|
||||
import * as pointsApi from '@/sheep/api/home/points';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
let { proxy } = getCurrentInstance();
|
||||
let dataObj = reactive({
|
||||
title: '我的积分',
|
||||
name: '我的积分',
|
||||
num: 0,
|
||||
btn: '',
|
||||
btn1: '',
|
||||
list: [],
|
||||
unit: '',
|
||||
url: '',
|
||||
url1: '',
|
||||
numName: 'changeAmount',
|
||||
sourceName: 'bizType',
|
||||
listApi: pointsApi.integraldetai,
|
||||
});
|
||||
let typeArr = ref([
|
||||
{
|
||||
name: '收入',
|
||||
transactionType: 1,
|
||||
},
|
||||
{
|
||||
name: '支出',
|
||||
transactionType: 2,
|
||||
},
|
||||
]);
|
||||
let navIndex = ref(0);
|
||||
let typeIndex = ref(0);
|
||||
let marginTop = ref();
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
marginTop.value = sysInfo.statusBarHeight + uni.upx2px(88) + uni.upx2px(54);
|
||||
let urlAPI = ref(api.getWallet);
|
||||
height.value =
|
||||
windowHeight -
|
||||
sysInfo.statusBarHeight -
|
||||
marginTop.value -
|
||||
uni.upx2px(204) -
|
||||
uni.upx2px(110) -
|
||||
uni.upx2px(48) -
|
||||
uni.upx2px(40);
|
||||
|
||||
const getData = () => {
|
||||
urlAPI.value().then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.num = proxy.$fen2yuan(res.data.balance);
|
||||
}
|
||||
});
|
||||
};
|
||||
let cardPages = ref(null);
|
||||
let detailList = ref([]);
|
||||
let detailObj = ref({});
|
||||
const getList = (mescroll) => {
|
||||
let urlApi = dataObj.listApi;
|
||||
let obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
};
|
||||
urlApi(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
detailObj.value = res.data;
|
||||
let list = res.data.detailList.list || [];
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
let type = ref(1);
|
||||
const dataChange = async () => {
|
||||
if (type.value) {
|
||||
type.value = Number(type.value);
|
||||
switch (Number(type.value)) {
|
||||
case 1:
|
||||
dataObj.title = '积分账户';
|
||||
dataObj.name = '积分账户';
|
||||
dataObj.btn = '去兑换';
|
||||
dataObj.url = '/pages/home/pay/seed?type=1';
|
||||
dataObj.num = 'currentBalance';
|
||||
dataObj.listApi = api.exAndBesPointList;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 2:
|
||||
dataObj.title = '增量账户';
|
||||
dataObj.name = '增量账户';
|
||||
dataObj.num = 'currentBalance';
|
||||
dataObj.unit = '元';
|
||||
dataObj.btn = '去配票';
|
||||
dataObj.btn1 = '去充值';
|
||||
dataObj.url = '/pages/home/pay/seed?type=2';
|
||||
dataObj.url1 = '/pages/home/pay/seed?type=3';
|
||||
dataObj.listApi = api.getAccountDetail;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// getList();
|
||||
}
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
onLoad(async (e) => {
|
||||
type.value = e.type;
|
||||
});
|
||||
onShow(() => {
|
||||
dataChange();
|
||||
});
|
||||
watch(
|
||||
() => [navIndex.value, typeIndex.value],
|
||||
() => {
|
||||
cardPages.value.mescrollTrigger();
|
||||
},
|
||||
);
|
||||
onShow(() => {
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
});
|
||||
const goUrl = (url) => {
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
});
|
||||
};
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
let paddingTop = ref();
|
||||
paddingTop.value = -(statusBarHeight + 44);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
position: relative;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pages_con {
|
||||
position: relative;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
|
||||
.page_top {
|
||||
height: 204rpx;
|
||||
color: #1a1a1a;
|
||||
|
||||
.name {
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 68rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 112rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page_bottom {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.bottom_title {
|
||||
line-height: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navItem {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.activeNav {
|
||||
position: relative;
|
||||
color: var(--color32);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(131deg, var(--color30) 0%, var(--color32) 100%), #fa7e31;
|
||||
border-radius: 4rpx;
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.activeType {
|
||||
color: var(--color30);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<s-layout title="绿色积分增量系统" leftUrl="/pages/index/index" :goLeft="false">
|
||||
<view class="p-x-32">
|
||||
<card_mescroll ref="mescrollRef" @upCallback="getList" :height="height">
|
||||
<view class="p-y-32 p-x-16 bg24 radius20 m-t-40" v-if="list.length">
|
||||
<view class="m-b-16" v-for="(v, i) in list" :key="i">
|
||||
<card_list :data="v" @upDate="upDate"></card_list>
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
<card_tabBar></card_tabBar>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
import card_list from './components/increment/card_list.vue';
|
||||
import card_tabBar from './components/increment/card_tabBar.vue';
|
||||
import * as api from '@/sheep/api/increment';
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
let height = ref('100%');
|
||||
let list = ref([]);
|
||||
let mescrollRef = ref(null);
|
||||
const getList = async (mescroll) => {
|
||||
let res: any = await api.getOrderPage({
|
||||
pageNo: mescroll?.num || 1,
|
||||
pageSize: mescroll?.size || 10,
|
||||
});
|
||||
let dataList = [];
|
||||
if (res.code === 0) {
|
||||
dataList = res.data.list;
|
||||
if (mescroll?.num == 1) {
|
||||
list.value = [];
|
||||
}
|
||||
list.value = list.value.concat(dataList);
|
||||
mescrollRef.value.getState(true, dataList.length);
|
||||
} else {
|
||||
mescrollRef.value.getState(false);
|
||||
}
|
||||
};
|
||||
const upDate = () => {
|
||||
if (mescrollRef.value) {
|
||||
mescrollRef.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
page{
|
||||
background: #F2F4F7;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,538 @@
|
||||
<template>
|
||||
<view>
|
||||
<s-layout title="商品详情">
|
||||
<!-- 标题栏 -->
|
||||
|
||||
<!-- 骨架屏 -->
|
||||
<detailSkeleton v-if="state.skeletonLoading" />
|
||||
<!-- 下架/售罄提醒 -->
|
||||
<s-empty
|
||||
v-else-if="state.goodsInfo === null"
|
||||
text="商品不存在或已下架"
|
||||
icon="/static/soldout-empty.png"
|
||||
showAction
|
||||
actionText="再逛逛"
|
||||
actionUrl="/pages/goods/list"
|
||||
/>
|
||||
<block v-else>
|
||||
<view class="detail-swiper-selector">
|
||||
<!-- 商品轮播图 -->
|
||||
<su-swiper
|
||||
v-if="state.goodsInfo.sliderPicUrls"
|
||||
class=""
|
||||
isPreview
|
||||
:list="formatGoodsSwiper(state.goodsInfo.sliderPicUrls)"
|
||||
otStyle="tag"
|
||||
imageMode="widthFix"
|
||||
dotCur="bg-mask-40"
|
||||
:seizeHeight="750"
|
||||
/>
|
||||
<!-- 价格+标题 -->
|
||||
<view class="title-card detail-card ss-p-y-32 ss-p-x-32">
|
||||
<view class="title-text ss-line-2 ss-m-b-6 c0"> {{ state.goodsInfo.name }}</view>
|
||||
<view class="subtitle-text ss-line-1 c0">{{ state.goodsInfo.introduction }}</view>
|
||||
<view class="c35 size32 m-t-10"
|
||||
>{{ state.goodsInfo.price }}<span class="size24">积分</span></view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-30 m-b-40 bg24 p-l-40 p-r-32 p-y-8">
|
||||
<view v-if="mesArr.length">
|
||||
<maoScroll
|
||||
:data="mesArr"
|
||||
:lineHeight="72"
|
||||
:animation="1000"
|
||||
:animationScroll="5000"
|
||||
:showNum="2"
|
||||
>
|
||||
<template #default="{ line }">
|
||||
<view class="flex-center ju-between">
|
||||
<view class="flex-row al-flex-end">
|
||||
<view v-for="(item, index) in line.participantAvatars" :key="index">
|
||||
<view
|
||||
class="userImg bg0 flex-center"
|
||||
v-if="index < 3"
|
||||
:style="{ 'margin-left': index ? '-28rpx' : 0, 'z-index': index + 10 }"
|
||||
>
|
||||
<image
|
||||
class="w_56 h_56"
|
||||
:src="item"
|
||||
mode="scaleToFill"
|
||||
v-if="item"
|
||||
style="border-radius: 50%"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
class="w_56 h_56"
|
||||
:src="`${$url}home/head.png`"
|
||||
mode="scaleToFill"
|
||||
style="border-radius: 50%"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="w_28 h_26"
|
||||
v-if="line.participantAvatars.length > 3"
|
||||
style="margin-left: -14rpx; margin-bottom: 5rpx"
|
||||
>
|
||||
<image
|
||||
class="w100 h100"
|
||||
src="/static/increment/more.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-center ju-flex-end">
|
||||
<view style="text-align: right">
|
||||
<view class="c13 size28">还剩{{ line.remainingCount }}</view>
|
||||
<view class="c19 size24">倒计时{{ getTime(line.expireTime) }}</view>
|
||||
</view>
|
||||
<view
|
||||
class="w_170 line56 bg35 radius12 center size28 m-l-10"
|
||||
@click.stop="sub(line)"
|
||||
style="color: #fff"
|
||||
>{{
|
||||
statusObj(parseInt(line.joinStatus) || 0, parseInt(line.status) || 0)
|
||||
}}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</maoScroll>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情 -->
|
||||
<detail-content-card
|
||||
class="detail-content-selector"
|
||||
:content="state.goodsInfo.description"
|
||||
/>
|
||||
</block>
|
||||
</s-layout>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, computed, ref, onMounted, onUnmounted } from 'vue';
|
||||
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
|
||||
import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
|
||||
import sheep from '@/sheep';
|
||||
import {
|
||||
formatSales,
|
||||
formatGoodsSwiper,
|
||||
fen2yuan,
|
||||
fen2yuanSimple,
|
||||
formatDiscountPercent,
|
||||
getRewardActivityRuleItemDescriptions,
|
||||
} from '@/sheep/hooks/useGoods';
|
||||
import detailSkeleton from './components/detail/detail-skeleton.vue';
|
||||
import detailContentCard from './components/detail/detail-content-card.vue';
|
||||
import * as SpuApi from '@/sheep/api/increment';
|
||||
|
||||
onPageScroll(() => {});
|
||||
import OrderApi from '@/sheep/api/trade/order';
|
||||
import { SharePageEnum } from '@/sheep/helper/const';
|
||||
import { emojiList } from '../chat/util/emoji';
|
||||
|
||||
const statusObj = (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 bgColor = {
|
||||
bgColor: '#E93323',
|
||||
Color: '#fff',
|
||||
width: '44rpx',
|
||||
timeTxtwidth: '16rpx',
|
||||
isDay: true,
|
||||
};
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||
const state = reactive({
|
||||
goodsId: 0,
|
||||
info: {},
|
||||
skeletonLoading: true, // SPU 加载中
|
||||
goodsInfo: {}, // SPU 信息
|
||||
showSelectSku: false, // 是否展示 SKU 选择弹窗
|
||||
selectedSku: {}, // 选中的 SKU
|
||||
settlementSku: {}, // 结算的 SKU:由于 selectedSku 不进行默认选中,所以初始使用结算价格最低的 SKU 作为基础展示
|
||||
showModel: false, // 是否展示 Coupon 优惠劵的弹窗
|
||||
updateKey: Date.now(), // 用于更新倒计时的触发键
|
||||
couponInfo: [], // 可领取的 Coupon 优惠劵的列表
|
||||
showActivityModel: false, // 【满减送/限时折扣】是否展示 Activity 营销活动的弹窗
|
||||
rewardActivity: {}, // 【满减送】活动
|
||||
activityList: [], // 【秒杀/拼团/砍价】可参与的 Activity 营销活动的列表
|
||||
});
|
||||
let mesArr = ref([]);
|
||||
|
||||
const getDetail = () => {
|
||||
SpuApi.getGroupDetail({
|
||||
id: state.goodsId,
|
||||
}).then((res) => {
|
||||
if (res.code !== 0 || !res.data) {
|
||||
state.goodsInfo = null;
|
||||
state.skeletonLoading = false;
|
||||
return;
|
||||
}
|
||||
state.skeletonLoading = false;
|
||||
state.goodsInfo = res.data;
|
||||
});
|
||||
};
|
||||
const getList = () => {
|
||||
SpuApi.getGroupBuys({
|
||||
productId: state.goodsId,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
mesArr.value = res.data;
|
||||
console.log(mesArr.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
onLoad((options) => {
|
||||
// 滚到顶部
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
});
|
||||
// 非法参数
|
||||
if (!options.id) {
|
||||
state.goodsInfo = null;
|
||||
state.skeletonLoading = false;
|
||||
return;
|
||||
}
|
||||
state.goodsId = options.id;
|
||||
getDetail();
|
||||
getList();
|
||||
});
|
||||
|
||||
const sub = (e) => {
|
||||
SpuApi.joinGroup({
|
||||
groupBuyId: e.groupBuyId,
|
||||
}).then((res) => {
|
||||
getList();
|
||||
});
|
||||
};
|
||||
// 时间戳倒计时
|
||||
const getTime = (t) => {
|
||||
// 计算剩余时间(毫秒)
|
||||
let time = t - Date.now();
|
||||
|
||||
// 确保时间不为负数
|
||||
if (time <= 0) {
|
||||
return '00:00:00';
|
||||
}
|
||||
|
||||
// 转换为时分秒
|
||||
let hour = Math.floor(time / (60 * 60 * 1000));
|
||||
let minute = Math.floor((time % (60 * 60 * 1000)) / (60 * 1000));
|
||||
let second = Math.floor((time % (60 * 1000)) / 1000);
|
||||
|
||||
// 格式化为两位数显示
|
||||
hour = hour.toString().padStart(2, '0');
|
||||
minute = minute.toString().padStart(2, '0');
|
||||
second = second.toString().padStart(2, '0');
|
||||
|
||||
return `${hour}:${minute}:${second}`;
|
||||
};
|
||||
|
||||
// 如果需要让倒计时动态更新,可以添加定时器
|
||||
onMounted(() => {
|
||||
// 每秒更新一次倒计时
|
||||
const timer = setInterval(() => {
|
||||
// 触发页面重新渲染
|
||||
state.updateKey = Date.now();
|
||||
}, 1000);
|
||||
|
||||
// 组件卸载时清除定时器
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.userImg {
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.detail-card {
|
||||
background-color: var(--color24);
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 40rpx;
|
||||
// color: #fff;
|
||||
}
|
||||
|
||||
// 价格标题卡片
|
||||
.title-card {
|
||||
.price-box {
|
||||
.price-text {
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
color: #ff3000;
|
||||
line-height: 30rpx;
|
||||
font-family: OPPOSANS;
|
||||
|
||||
&::before {
|
||||
content: '¥';
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.origin-price-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
color: $gray-c;
|
||||
font-family: OPPOSANS;
|
||||
|
||||
&::before {
|
||||
content: '¥';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sales-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: $gray-c;
|
||||
}
|
||||
|
||||
.discounts-box {
|
||||
.tag-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tag-box {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tag {
|
||||
flex-shrink: 0;
|
||||
padding: 4rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 4rpx;
|
||||
color: var(--ui-BG-Main);
|
||||
background: var(--ui-BG-Main-tag);
|
||||
}
|
||||
|
||||
.discounts-title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: var(--ui-BG-Main);
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.cicon-forward {
|
||||
color: var(--ui-BG-Main);
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title-text {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
.subtitle-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: $dark-9;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 购买
|
||||
.buy-box {
|
||||
.add-btn {
|
||||
width: 240rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
border-radius: 12rpx 0 0 12rpx;
|
||||
background-color: #74aef6;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.buy-btn {
|
||||
width: 240rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
border-radius: 0 12rpx 12rpx 0;
|
||||
background: #366eee;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.disabled-btn {
|
||||
width: 428rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 40rpx;
|
||||
background: #999999;
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.model-box {
|
||||
height: 60vh;
|
||||
|
||||
.model-content {
|
||||
height: 56vh;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
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: #ff393a;
|
||||
font-weight: bolder;
|
||||
font-style: oblique 20deg;
|
||||
letter-spacing: 0.1rem;
|
||||
}
|
||||
|
||||
.disContT1P {
|
||||
color: white;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.disContT1End {
|
||||
// width: 180rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
background-color: #fee2be;
|
||||
color: #f71b1b;
|
||||
font-size: 23rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-left: 26rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
color: #ffcccc;
|
||||
font-size: 24rpx;
|
||||
// 删除线
|
||||
text-decoration: line-through;
|
||||
padding-left: 6rpx;
|
||||
}
|
||||
|
||||
.disContB2 {
|
||||
width: 300rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
font-size: 20rpx;
|
||||
color: #ff5040;
|
||||
border: 1px solid #ff5040;
|
||||
border-radius: 8rpx;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
padding: 0 8rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<s-pages title="我的" leftUrl="/pages/index/index" :goLeft="false">
|
||||
<view class="p-x-32 w100 h_364 relative m-t-42 color0">
|
||||
<view class="p-x-32 w100 h100 absolute t0 l0">
|
||||
<image class="w100 h100" src="/static/increment/bg.png" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="w100 h100 relative p-x-32 p-t-30 p-b-4">
|
||||
<view class="flex-center ju-between m-b-62">
|
||||
<view class="w_150 h_150 absolute t-42 l20 img">
|
||||
<image
|
||||
class="w100 h100"
|
||||
v-if="dataObj.avatar"
|
||||
:src="dataObj.avatar"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image class="w100 h100" v-else src="/static/head_null.png" mode="scaleToFill" />
|
||||
</view>
|
||||
|
||||
<view class="lineOne m-l-164">{{ dataObj.nickname }}</view>
|
||||
<view>
|
||||
<span class="size28">自动拼团</span>
|
||||
<switch
|
||||
:checked="dataObj.automaticGroupBuy ? true : false"
|
||||
@change="autoChange"
|
||||
color="#F7492E"
|
||||
style="transform: scale(0.7)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row wrap" v-if="arr && arr.length">
|
||||
<view class="m-b-24" style="width: 50%" v-for="(v, i) in arr" :key="i">
|
||||
<view class="color4A size24 flex-center ju-flex-start" @click="go(v.path)">
|
||||
<span>{{ v.name }}</span>
|
||||
<uni-icons v-if="v.path" type="right" color="#4A4A4A" size="12" />
|
||||
</view>
|
||||
<view class="size32">{{ dataObj[v.num] || 0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box m-x-32 m-t-52 bg24" v-if="mesArr.length">
|
||||
<view class="relative h_60 w100">
|
||||
<view class="absolute h_60 w100">
|
||||
<image class="w100 h100" src="/static/increment/1.png" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="relative line60 w100 p-r-28" style="text-align: right; color: #fff">
|
||||
已参团
|
||||
</view>
|
||||
</view>
|
||||
<view class="card4">
|
||||
<maoScroll
|
||||
:data="mesArr"
|
||||
:lineHeight="72"
|
||||
:animation="1000"
|
||||
:animationScroll="1000"
|
||||
:showNum="3"
|
||||
>
|
||||
<template #default="{ line }">
|
||||
<view class="radius8 p-x-16 flex-center ju-flex-start h100" style="display: line-block">
|
||||
<view class="m-r-18 userImg flex-center">
|
||||
<image
|
||||
class="w_56 h_56"
|
||||
:src="line?.avatar"
|
||||
mode="scaleToFill"
|
||||
v-if="line?.avatar"
|
||||
style="border-radius: 50%"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
class="w_56 h_56"
|
||||
:src="`${$url}home/head.png`"
|
||||
mode="scaleToFill"
|
||||
style="border-radius: 50%"
|
||||
/>
|
||||
</view>
|
||||
<view class="size28 c0 line54 lineOne">{{ line?.nickname }}已参团</view>
|
||||
</view>
|
||||
</template>
|
||||
</maoScroll>
|
||||
</view>
|
||||
</view>
|
||||
<card_tabBar :index="3"></card_tabBar>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_tabBar from './components/increment/card_tabBar.vue';
|
||||
import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
|
||||
import * as api from '@/sheep/api/increment';
|
||||
const { proxy } = getCurrentInstance();
|
||||
let currentBalance = ref();
|
||||
let dataObj = ref({});
|
||||
let arr = ref([
|
||||
{
|
||||
name: '积分账户',
|
||||
num: 'currentBalance',
|
||||
path: '/pages/increment/detail?type=1',
|
||||
},
|
||||
{
|
||||
name: '增量账户',
|
||||
num: 'incrementPoint',
|
||||
path: '/pages/increment/detail?type=2',
|
||||
},
|
||||
{
|
||||
name: '拼团数',
|
||||
num: 'totalGroupBuyCount',
|
||||
},
|
||||
{
|
||||
name: '今日拼团',
|
||||
num: 'todayGroupBuyCount',
|
||||
},
|
||||
]);
|
||||
let mesArr = ref([]);
|
||||
const autoChange = (e) => {
|
||||
// 0关闭自动拼团1自动拼团
|
||||
console.log(e.detail.value);
|
||||
let b = e.detail.value ? 1 : 0;
|
||||
api
|
||||
.automaticGroupBuy({
|
||||
automaticGroupBuy: b,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
uni.showToast({
|
||||
title: '设置成功',
|
||||
});
|
||||
getData();
|
||||
}
|
||||
});
|
||||
// api.automaticGroupBuy
|
||||
};
|
||||
const go = (path) => {
|
||||
if (!path) return;
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
});
|
||||
};
|
||||
const getData = () => {
|
||||
api.getUserGroupInfo({}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.value = res.data;
|
||||
|
||||
api
|
||||
.exAndBesPointList({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.value.currentBalance = res.data.currentBalance;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const getList = () => {
|
||||
api
|
||||
.getParticipants({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
mesArr.value = res.data.list;
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getData();
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.color0 {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.color4A {
|
||||
color: #4a4a4a;
|
||||
}
|
||||
|
||||
.img {
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user