初始化仓库
This commit is contained in:
201
bundle/pages/coupon/coupon.vue
Normal file
201
bundle/pages/coupon/coupon.vue
Normal file
@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<view class="coupon">
|
||||
<view>
|
||||
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="themeColor" height="96"></u-tabs>
|
||||
</view>
|
||||
|
||||
<view class="u-relative" v-if="current === 0">
|
||||
<view class="package u-text-center u-p-t-22 u-p-b-28">
|
||||
<view class="bold-500">超级省钱券包</view>
|
||||
<view>超值权益一单回本</view>
|
||||
</view>
|
||||
|
||||
<view class="list u-absolute left-0 right-0">
|
||||
<view class="block br20">
|
||||
<view class="row-between">
|
||||
<view>
|
||||
<view class="row">
|
||||
<u-image :src="cloudPath + 'img/icon_package1.png'" width="34" height="28"></u-image>
|
||||
<view class="text-333 u-m-l-10 nr">券包</view>
|
||||
</view>
|
||||
<view class="text-755023 xs u-m-t-10">
|
||||
<text>2元最低可抵111元/共<text class="primary">1</text>张券</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-relative">
|
||||
<u-image :src="cloudPath + 'img/icon_package2.png'" width="220" height="60"></u-image>
|
||||
<view class="text-755023 u-absolute price xs">¥2.00</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-bg u-m-t-32">
|
||||
<view class="xxs u-text-center u-p-t-4 text-845F2E">满减券x1</view>
|
||||
<view class="bold-600 u-text-center u-p-t-26">
|
||||
<price-format color="#FF0000" :price="121.99" :subscriptSize="32" :firstSize="52" :secondSize="52"></price-format>
|
||||
</view>
|
||||
<view class="text-D8A658 u-text-center u-p-t-32">满11元可用</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-list u-m-t-12" v-if="current === 1">
|
||||
<view class="coupon-list-bg row-between">
|
||||
<view class="row-start row-column u-row-center u-text-center">
|
||||
<view>
|
||||
<price-format :color="themeColor" :price="121" :subscriptSize="40" :firstSize="72" :secondSize="72"></price-format>
|
||||
</view>
|
||||
<view class="full">满20元可用</view>
|
||||
</view>
|
||||
<view class="flex1 u-m-l-80 row-between">
|
||||
<view>
|
||||
<view class="coupon-text bold-600">优惠券</view>
|
||||
<view class="xs u-m-t-20 date">有效期3天</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-button @click="mpLogin" hover-class="none" :customStyle="{width: '160rpx', height: '56rpx', backgroundColor: themeColor, color: '#fff', border: 'none', borderRadius: '100rpx', fontSize: '24rpx'}" :hair-line="false">立即兑换</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-list-bg row-between">
|
||||
<view class="row-start row-column u-row-center u-text-center">
|
||||
<view>
|
||||
<price-format :color="themeColor" :price="121" :subscriptSize="40" :firstSize="72" :secondSize="72"></price-format>
|
||||
</view>
|
||||
<view class="full">满20元可用</view>
|
||||
</view>
|
||||
<view class="flex1 u-m-l-80 row-between">
|
||||
<view>
|
||||
<view class="coupon-text bold-600">优惠券</view>
|
||||
<view class="xs u-m-t-20 date">有效期3天</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-button @click="mpLogin" hover-class="none" :customStyle="{width: '160rpx', height: '56rpx', backgroundColor: themeColor, color: '#fff', border: 'none', borderRadius: '100rpx', fontSize: '24rpx'}" :hair-line="false">立即兑换</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupon-list-bg row-between">
|
||||
<view class="row-start row-column u-row-center u-text-center">
|
||||
<view>
|
||||
<price-format :color="themeColor" :price="121" :subscriptSize="40" :firstSize="72" :secondSize="72"></price-format>
|
||||
</view>
|
||||
<view class="full">满20元可用</view>
|
||||
</view>
|
||||
<view class="flex1 u-m-l-80 row-between">
|
||||
<view>
|
||||
<view class="coupon-text bold-600">优惠券</view>
|
||||
<view class="xs u-m-t-20 date">有效期3天</view>
|
||||
</view>
|
||||
<view>
|
||||
<u-button @click="mpLogin" hover-class="none" :customStyle="{width: '160rpx', height: '56rpx', backgroundColor: themeColor, color: '#fff', border: 'none', borderRadius: '100rpx', fontSize: '24rpx'}" :hair-line="false">立即兑换</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
name: '购买'
|
||||
},
|
||||
{
|
||||
name: '兑换'
|
||||
}
|
||||
],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(index) {
|
||||
this.current = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.text-755023 {color: #755023;}
|
||||
.text-845F2E {color: #845F2E;}
|
||||
.text-D8A658 {color: #D8A658;}
|
||||
|
||||
.coupon {
|
||||
.package {
|
||||
background-color: #2D2622;
|
||||
height: 180rpx;
|
||||
|
||||
& > view:first-child {
|
||||
font-size: 64rpx;
|
||||
background: linear-gradient(90deg, #FDE0B4 0%, #FFC07F 100%);
|
||||
letter-spacing: 1px;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
& > view:last-child {
|
||||
font-size: 30rpx;
|
||||
background: linear-gradient(270deg, #FDE0B4 0%, #FFC07F 100%);
|
||||
letter-spacing: 1px;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
background-color: #F6F6F6;
|
||||
border-top-left-radius: 24rpx;
|
||||
border-top-right-radius: 24rpx;
|
||||
top: 160rpx;
|
||||
padding: 30rpx 24rpx;
|
||||
|
||||
.block {
|
||||
height: 386rpx;
|
||||
background: #FBE9CC;
|
||||
border: 2rpx solid #E0B66C;
|
||||
padding: 24rpx 36rpx 24rpx;
|
||||
|
||||
.price {
|
||||
left: 22rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.coupon-bg {
|
||||
width: 207rpx;
|
||||
height: 196rpx;
|
||||
background: url(#{$cloudPath}img/icon_package3.png) no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-list {
|
||||
.coupon-list-bg {
|
||||
height: 176rpx;
|
||||
background: url(#{$cloudPath}img/icon_coupon2.png) no-repeat;
|
||||
background-size: cover;
|
||||
margin: 0 32rpx 32rpx;
|
||||
padding: 0 32rpx;
|
||||
|
||||
.full {
|
||||
font-size: 20rpx;
|
||||
color: rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.coupon-text {
|
||||
color: #1D2129;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: rgba(0, 0, 0, .4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
135
bundle/pages/points/points.vue
Normal file
135
bundle/pages/points/points.vue
Normal file
@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<view class="index home-bg" :style="[navBackground]">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<u-sticky offset-top="0" h5-nav-height="0" bg-color="transparent" :enable="true">
|
||||
<u-navbar
|
||||
:border-bottom="false"
|
||||
:is-fixed="false"
|
||||
custom-class="home-bg"
|
||||
:background="navBackground"
|
||||
:is-back="true"
|
||||
:backText="backText"
|
||||
:title="title"
|
||||
title-color="#fff"
|
||||
backIconColor="#fff"
|
||||
>
|
||||
</u-navbar>
|
||||
</u-sticky>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="row-center balance u-relative" :style="{paddingTop: topSpace + 'px'}">
|
||||
<view class="u-text-center w-full">
|
||||
<view class="text-fff" style="font-size: 96rpx;">0</view>
|
||||
<view class="text-fff nr">积分</view>
|
||||
</view>
|
||||
|
||||
<view class="u-absolute right-0">
|
||||
<view class="excharge row-center text-default">
|
||||
<text class="xs">兑换商品</text>
|
||||
<u-icon name="arrow-right" size="22" :color="themeColor" class="u-m-l-10"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-p-b-40" style="margin-top: 132rpx;">
|
||||
<view class="list bg-white br16 u-p-32">
|
||||
<view class="lg">积分明细</view>
|
||||
<view class="u-m-t-16">
|
||||
<view class="u-m-b-16">
|
||||
<view class="nr row-between">
|
||||
<view>积分</view>
|
||||
<view class="deduct">-2000</view>
|
||||
</view>
|
||||
<view class="date xs u-m-t-16">2022-12-24 16:32:44</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '积分',
|
||||
statusBarHeight: 0, // 状态栏高度
|
||||
bgImageHeight: 244 ,// 背景图高度,单位px,根据实际情况调整
|
||||
selectIndex: 0,
|
||||
backText: '',
|
||||
topSpace: 0
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
this.statusBarHeight = systemInfo.statusBarHeight
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.topSpace = (80 - this.statusBarHeight)
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.topSpace = (80 + 44)
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 跳转个人信息
|
||||
toProfile() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/profile'
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转我的钱包
|
||||
toWallet() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/wallet'
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
navBackground() {
|
||||
return {
|
||||
'background-image': `url(${this.cloudPath}img/icon_recharge_bg.png)`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.index {
|
||||
background-size: 100% auto;
|
||||
}
|
||||
|
||||
.home-bg {
|
||||
background: url(#{$cloudPath}img/icon_recharge_bg.png) no-repeat;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin: 22rpx 34rpx;
|
||||
height: 962rpx;
|
||||
box-shadow: 0rpx 6rpx 28rpx 4rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.date {
|
||||
color: rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.excharge {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background-color: #DBE7F6;
|
||||
border-top-left-radius: 100rpx;
|
||||
border-bottom-left-radius: 100rpx;
|
||||
}
|
||||
</style>
|
||||
52
bundle/pages/points/points_shop.vue
Normal file
52
bundle/pages/points/points_shop.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<view class="points-shop u-relative">
|
||||
<view>
|
||||
<u-swiper height="500" :list="list" border-radius="0"></u-swiper>
|
||||
</view>
|
||||
|
||||
<view class="u-m-24">
|
||||
<view class="bg-white br24 set-menu">
|
||||
<view class="nr">煎饼果子套餐</view>
|
||||
<view class="primary u-m-t-8">100.00积分+39.90元</view>
|
||||
<view class="text-999 row-between u-m-t-8">
|
||||
<view>销量:973</view>
|
||||
<view>库存:973</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white fixed left-0 right-0 bottom-0 u-m-b-16 excharge">
|
||||
<u-button @click="mpLogin" hover-class="none" :customStyle="{height: '80rpx', backgroundColor: themeColor, color: '#fff', border: 'none', borderRadius: '116rpx'}" :hair-line="false">立即兑换</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
image: "http://jianbing-media.stnav.com/frontend/img/banner.png",
|
||||
title: "昨夜星辰昨夜风,画楼西畔桂堂东",
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.points-shop {
|
||||
.set-menu {
|
||||
height: 177rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
}
|
||||
|
||||
.excharge {
|
||||
padding: 16rpx 48rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
95
bundle/pages/points/points_store.vue
Normal file
95
bundle/pages/points/points_store.vue
Normal file
@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<view class="points-store u-relative">
|
||||
<view class="bg-default bg u-text-center text-fff">
|
||||
<view class="u-p-t-42">
|
||||
<view class="sm">可用积分</view>
|
||||
<view class="fraction bold-600 u-m-t-14">0.00</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-absolute left-0 right-0 bg-white u-p-t-34 list">
|
||||
<view>
|
||||
<u-tabs :list="list" :is-scroll="true" :current="current" @change="change" inactive-color="#636363" :active-color="themeColor"></u-tabs>
|
||||
</view>
|
||||
<view class="u-m-l-24 u-m-r-24">
|
||||
<u-line color="#EEE" />
|
||||
</view>
|
||||
<view class="u-m-t-32 u-m-l-24 u-m-r-24">
|
||||
<view class="row-start u-col-top u-m-b-42" v-for="(itme, index) in 10">
|
||||
<view>
|
||||
<u-image :src="cloudPath + 'img/banner.png'" width="180" height="180" border-radius="20"></u-image>
|
||||
</view>
|
||||
|
||||
<view class="u-m-l-18 w-full">
|
||||
<view>小熊早餐必备煮蛋器</view>
|
||||
<view class="u-m-t-4 text-7c">兑换66人</view>
|
||||
<view class="u-m-t-42 row-between">
|
||||
<view>
|
||||
<text class="primary">100.00</text>
|
||||
<text class="text-7c">积分+</text>
|
||||
<text class="primary">100.00</text>
|
||||
<text class="text-7c">元</text>
|
||||
</view>
|
||||
<view>
|
||||
<u-button @click="mpLogin" hover-class="none" :customStyle="{width: '145rpx', height: '61rpx', backgroundColor: themeColor, color: '#fff', border: 'none', borderRadius: '31rpx'}" :hair-line="false">兑换</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
name: '热门推荐'
|
||||
}
|
||||
],
|
||||
current: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(index) {
|
||||
this.current = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.points-store {
|
||||
.bg {
|
||||
height: 420rpx
|
||||
}
|
||||
|
||||
.fraction {
|
||||
font-size: 64rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
top: 186rpx;
|
||||
border-top-left-radius: 24rpx;
|
||||
border-top-right-radius: 24rpx;
|
||||
}
|
||||
|
||||
.text-46 {
|
||||
color: #464646;
|
||||
}
|
||||
|
||||
.text-7c {
|
||||
color: #7C7C7C;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
36
bundle/pages/setting/setting.vue
Normal file
36
bundle/pages/setting/setting.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-cell-group :border="false">
|
||||
<u-cell-item title="退出登录" :border-bottom="false" @click="logout" hover-class="none"></u-cell-item>
|
||||
</u-cell-group>
|
||||
|
||||
<u-modal v-model="showLogout" :content="content" :show-cancel-button="true" @confirm="confirmLogout"></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLogout: false,
|
||||
content: '确定退出登录'
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
logout() {
|
||||
this.showLogout = true
|
||||
},
|
||||
|
||||
confirmLogout() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user