Browse Source

feat: 邀请好友页面;

pull/1/head
fox 2 months ago
parent
commit
b10d23c56f
3 changed files with 64 additions and 54 deletions
  1. +0
    -1
      pages/index/center.vue
  2. +17
    -19
      pages_order/mine/memberCenter.vue
  3. +47
    -34
      pages_order/mine/promotion.vue

+ 0
- 1
pages/index/center.vue View File

@ -94,7 +94,6 @@
<image class="fun-common-icon" src="@/static/image/center/icon-member-center.png" mode="widthFix"></image>
<text class="fun-common-label">会员中心</text>
</view>
<!-- todo: navigateTo -->
<view class="flex flex-column" @click="$utils.navigateTo('/pages_order/mine/partner')">
<image class="fun-common-icon" src="@/static/image/center/icon-team.png" mode="widthFix"></image>
<text class="fun-common-label">我的团队</text>


+ 17
- 19
pages_order/mine/memberCenter.vue View File

@ -106,32 +106,22 @@
{
id: '001',
value: 800,
rights: [
'会员享受专属折扣和优惠活动',
'会员积分累积与抵扣功能',
'成为会员后,得到平台发放的代金券',
]
},
{
id: '002',
value: 1800,
rights: [
'会员享受专属折扣和优惠活动',
'会员积分累积与抵扣功能',
'成为会员后,得到平台发放的代金券',
]
},
{
id: '003',
value: 2800,
rights: [
'会员享受专属折扣和优惠活动',
'会员积分累积与抵扣功能',
'成为会员后,得到平台发放的代金券',
]
},
],
selectedChargeId: '001'
selectedChargeId: '001',
rights: [
'会员享受专属折扣和优惠活动',
'会员积分累积与抵扣功能',
'成为会员后,得到平台发放的代金券',
]
}
},
computed: {
@ -139,9 +129,6 @@
selectedChargeObj() {
return this.chargeOptions.find(item => item.id === this.selectedChargeId)
},
rights() {
return this.selectedChargeObj?.rights || []
},
totalPrice() {
return this.selectedChargeObj?.value || 0
}
@ -153,6 +140,17 @@
},
submit() {
// todo: check jump to create order ?
this.$api('recharge', res => {
if(res.code == 200){
uni.showToast({
title: '充值成功',
icon : 'none'
})
this.form.money = 0
setTimeout(uni.navigateBack, 800, -1)
}
})
}
}
}


+ 47
- 34
pages_order/mine/promotion.vue View File

@ -1,22 +1,22 @@
<template>
<view class="promotion">
<view class="page">
<navbar title="二维码"
bgColor="rgb(235, 51, 0)"
color="#fff"
leftClick @leftClick="$utils.navigateBack" />
<navbar title="邀请好友" leftClick @leftClick="$utils.navigateBack" color="#fff" />
<image
class="image"
:src="imagePath" mode="aspectFill"></image>
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas>
<view class="btn"
v-if="imagePath"
@click="preservationImg(imagePath)">
保存到相册
<view class="flex flex-column content">
<image class="image" :src="imagePath" mode="aspectFill"></image>
<!-- todo: check -->
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas>
<view v-if="imagePath" class="tools">
<button plain class="flex btn" @click="preservationImg(imagePath)">
保存到本地
</button>
</view>
</view>
</view>
@ -209,14 +209,24 @@ import index from '../../uni_modules/uv-ui-tools'
</script>
<style lang="scss" scoped>
.promotion {
width: 100%;
height: 100vh;
background-color: $uni-color;
.page {
background-color: $uni-bg-color;
min-height: 100vh;
/deep/ .nav-bar__view {
background-image: linear-gradient(#84A73F, #D8FF8F);
}
}
.content {
align-items: flex-start;
padding: 48rpx 26rpx;
}
.image{
width: 100%;
height: calc(100vh - 300rpx);
height: 778rpx;
}
#myCanvas {
@ -231,19 +241,22 @@ import index from '../../uni_modules/uv-ui-tools'
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.tools {
margin-top: 163rpx;
width: 100%;
padding: 0 56rpx;
box-sizing: border-box;
.btn{
position: fixed;
// top: 58vh;
bottom: 0;
margin: 0;
width: 750rpx;
height: 100rpx;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
color: $uni-color;
.btn {
width: 100%;
padding: 29rpx 0;
color: $uni-text-color-inverse;
font-size: 28rpx;
line-height: 40rpx;
border-radius: 49rpx;
border: none;
background-image: linear-gradient(to right, #84A73F, #D8FF8F);
}
}
</style>

Loading…
Cancel
Save