This commit is contained in:
2023-08-15 13:29:52 +08:00
parent 433a4d8f3d
commit c081f0fc29
25 changed files with 1328 additions and 448 deletions

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '首页'
navigationBarTitleText: '购物车'
})

View File

@@ -1,45 +1,35 @@
<template>
<view class="index">
<view>
<nut-empty description="购物车暂无数据">
<!-- <nut-button icon="refresh" type="primary" @click="toPage()">去兑换商品</nut-button>-->
</nut-empty>
<view>
<img src="" alt="">
<view style="height: 100px"></view>
</view>
{{ msg }} <Dongdong />
<view class="btn">
<nut-button type="primary" @click="handleClick('text', msg2, true)">点我</nut-button>
<view class="bottom-box">
<view class="left">
<nut-checkbox v-model="checkbox">全选</nut-checkbox>
<view class="text-box">
总计积分
<nut-price :price="0" size="normal" :need-symbol="false"/>
</view>
</view>
<nut-button type="primary">去结算</nut-button>
</view>
<nut-toast :msg="msg2" v-model:visible="show" :type="type" :cover="cover"/>
</view>
</template>
<script>
import { reactive, toRefs } from 'vue';
import { Dongdong } from '@nutui/icons-vue-taro';
export default {
name: 'Index',
components: {
Dongdong
},
setup() {
const state = reactive({
msg: '欢迎使用 NutUI4.0 开发小程序',
msg2: '你成功了~',
type: 'text',
show: false,
cover: false
});
<script lang="ts" setup>
import {ref} from 'vue';
import Taro from '@tarojs/taro'
const handleClick = (type, msg, cover = false) => {
state.show = true;
state.msg2 = msg;
state.type = type;
state.cover = cover;
};
const checkbox = ref(false)
return {
...toRefs(state),
handleClick
}
}
const toPage = () => {
Taro.switchTab({
url: '/pages/index/index'
})
}
</script>
@@ -50,4 +40,31 @@ export default {
-moz-osx-font-smoothing: grayscale;
text-align: center;
}
.bottom-box {
box-sizing: border-box;
background-color: #fff;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 100px;
z-index: 999;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
box-shadow: 100px 104px 288px rgba(0, 0, 0, 0.01);
.left {
display: flex;
align-items: center;
.text-box {
margin-left: 10px;
}
}
}
</style>