注册有礼

This commit is contained in:
2024-04-24 23:01:38 +08:00
parent bb9a32d296
commit 7f6ace8ac6
3 changed files with 46 additions and 22 deletions

View File

@@ -31,7 +31,8 @@ enum URL {
integralList = '/ext/member/integral_query',
tradeList = '/memberIncoming/wx_balance_records',
terminal = 'wechat/coupons/terminal?companyId=',
cardLink = '/wc/wechat/get_card_url'
cardLink = '/wc/wechat/get_card_url',
registerCoupon = '/couponsStrategy/wx_register_coupon'
}
export const getUserProfile = () => get<UserBean>({ url: URL.profile });
@@ -70,3 +71,5 @@ export const getTerminal = (companyId: string) => get<TerminalBean>({ url: URL.t
export const getTradeList = (data: any) => post<any>({ url: URL.tradeList, data });
export const getCardLink = () => get<string>({ url: URL.cardLink });
export const getRegisterCoupon = () => get<any>({ url: URL.registerCoupon });

View File

@@ -2,8 +2,8 @@
<view class='content'>
<image class='bg-image' :src='assetsUrl("bg_register.png")' />
<image src='./static/images/ic_register_gift_text.png'
style='align-self: center;position: relative;width: 356rpx;height: 124rpx;margin-top: 70rpx'/>
<image :src='assetsUrl("ic_register_gift_text.png")'
style='align-self: center;position: relative;width: 356rpx;height: 124rpx;margin-top: 70rpx' />
<view class='card-view'>
<view class='mobile-view c-flex-row' style='display: none'>
<image :src='assetsUrl("ic_register_mobile.png")' />
@@ -27,25 +27,42 @@
align-self: center;color: #666666;'>长按扫码注册
</text>
<view class='divider' />
<view class='coupon c-flex-column' @click.stop='goPath("/pages/mine/subs/coupon/index")'>
<view class='c-flex-row'>
<text class='coupon-name'>新人利券</text>
<image :src='assetsUrl("ic_arrow_right_gray.png")' />
<template v-if='couponBean&&couponBean.status==0'>
<view class='divider' />
<view class='coupon c-flex-column' @click.stop='goPath("/pages/mine/subs/coupon/index")'>
<view class='c-flex-row'>
<text class='coupon-name'>{{ couponBean.title }}</text>
<image :src='assetsUrl("ic_arrow_right_gray.png")' />
</view>
<text class='expired-time'>
有效期至{{ dayjs(Date.now()).add(couponBean.triggerEndDay, 'day').format('YYYY.MM.DD') }}
</text>
</view>
<text class='expired-time'>有效期至2023.11.12</text>
</view>
<view class='divider' />
<view class='divider' />
<text style='font-size: 28rpx;
<text style='font-size: 28rpx;
font-weight: bold;
color: #333333;margin-top: 20rpx'>福利详情
</text>
<text style='font-size: 28rpx;
color: #333333;margin-top: 14rpx'>1.优惠金额10\n
2.300减50\n
3.赠送3
</text>
</text>
<text style='font-size: 28rpx;
color: #333333;margin-top: 14rpx'>1.优惠金额{{ couponBean.reduce }}\n
2.{{ couponBean.threshold }}{{ couponBean.reduce }}\n
3.赠送{{ couponBean.publicNum }}
</text>
</template>
<template v-else>
<text style='font-size: 28rpx;
font-weight: bold;
color: #333333;margin-top: 20rpx'>
微信扫一扫领取会员卡
</text>
<text style='font-size: 28rpx;
color: #333333;margin-top: 14rpx'>
1及时接受消费小票\n
2随时查询消费记录\n
3及时接收优惠信息
</text>
</template>
</view>
</view>
</template>
@@ -54,14 +71,17 @@ color: #333333;margin-top: 14rpx'>1.优惠金额10元\n
import { assetsUrl, defaultImage } from '@/utils/assets';
import { useUserStore } from '@/store';
import { goPath } from '@/utils';
import { getRegisterCoupon } from '@/api/user';
import dayjs from 'dayjs';
const userStore = useUserStore();
const { companyConfigInfo } = storeToRefs(userStore);
const countdown = ref('获取验证码');
const couponBean = ref();
onLoad((e) => {
onLoad(async (e) => {
couponBean.value = await getRegisterCoupon();
});
const startCountdown = () => {

View File

@@ -2,19 +2,20 @@
<view class='card-view'>
<view class='c-flex-row'>
<text class='key'>姓名</text>
<text class='value'>{{companyInfo.creatorName||companyInfo.companyName}}</text>
<text class='value'>{{companyInfo.master||companyInfo.companyName}}</text>
</view>
<view class='divider' />
<view class='c-flex-row'>
<text class='key'>手机号</text>
<text class='value'>{{companyInfo.telphone}}</text>
<image src='./static/images/ic_contact_merchant.png' @click.stop='call' />
<image :src='assetsUrl("ic_contact_merchant.png")' @click.stop='call' />
</view>
</view>
</template>
<script lang='ts' setup>
import { useUserStore } from '@/store';
import { assetsUrl } from '@/utils/assets';
const { companyInfo } = storeToRefs(useUserStore());
const call = () => {