团购秒杀
This commit is contained in:
@@ -8,9 +8,8 @@
|
||||
|
||||
<view class='top-row'>
|
||||
<image :src='userInfo.image' />
|
||||
|
||||
<view class='u-flex-column'>
|
||||
<text>{{ userInfo.nickName}}</text>
|
||||
<text>{{ userInfo.nickName }}</text>
|
||||
<text>{{ userInfo.telephone }}</text>
|
||||
</view>
|
||||
|
||||
@@ -18,15 +17,15 @@
|
||||
</view>
|
||||
|
||||
<view class='bottom-row'>
|
||||
<view @click.stop='goPath("/pages/mine/subs/integral/index")'>
|
||||
<view @click.stop='gotoPath("/pages/mine/subs/integral/index")'>
|
||||
<text>{{ userInfo.integration }}</text>
|
||||
<text>积分</text>
|
||||
</view>
|
||||
<view @click.stop='goPath("/pages/mine/subs/recharge/index")'>
|
||||
<view @click.stop='gotoPath("/pages/mine/subs/recharge/index")'>
|
||||
<text>{{ userInfo.balance }}</text>
|
||||
<text>余额</text>
|
||||
</view>
|
||||
<view @click.stop='goPath("/pages/mine/subs/coupon/coupon-list")'>
|
||||
<view @click.stop='gotoPath("/pages/mine/subs/coupon/coupon-list")'>
|
||||
<text>3</text>
|
||||
<text>优惠券</text>
|
||||
</view>
|
||||
@@ -36,14 +35,14 @@
|
||||
<view class='integral-add-view'>
|
||||
<text>将会员卡放入微信卡包,及时了解积分变动</text>
|
||||
<text>去添加</text>
|
||||
<image :src=' assetsUrl("ic_arrow_right_yellow.png")' />
|
||||
<image :src='assetsUrl("ic_arrow_right_yellow.png")' />
|
||||
</view>
|
||||
|
||||
<text class='title-view'>
|
||||
我的订单
|
||||
</text>
|
||||
<view class='card-order-view'>
|
||||
<view v-for='(item,index) in orderActionList' :key='index' @click.stop='goPath(item.path)'>
|
||||
<view v-for='(item,index) in orderActionList' :key='index' @click.stop='gotoPath(item.path)'>
|
||||
<image :src='item.icon' />
|
||||
<text>{{ item.title }}</text>
|
||||
<text v-if='item.amount>0'>{{ item.amount }}</text>
|
||||
@@ -55,18 +54,23 @@
|
||||
</text>
|
||||
|
||||
<view class='card-service-view'>
|
||||
<view v-for='(item,index) in serviceList' :key='index' @click.stop='goPath(item.path)'>
|
||||
<view v-for='(item,index) in serviceList' :key='index' @click.stop='gotoPath(item.path)'>
|
||||
<image :src='item.icon' />
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<official-account-dialog ref='officialAccountDialogRef' />
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { useUserStore } from '@/store';
|
||||
import { assetsUrl } from '@/utils/assets';
|
||||
import { goPath } from '@/utils';
|
||||
import OfficialAccountDialog from '@/components/official-account-dialog.vue';
|
||||
|
||||
const officialAccountDialogRef = ref();
|
||||
|
||||
const orderActionList = ref([{
|
||||
title: '进行中',
|
||||
@@ -99,7 +103,7 @@ const serviceList = [
|
||||
{
|
||||
title: '关注公众号',
|
||||
icon: assetsUrl('ic_member_service_follow.png'),
|
||||
path: ''
|
||||
path: 'follow_official_account'
|
||||
},
|
||||
{
|
||||
title: '收货地址',
|
||||
@@ -123,6 +127,18 @@ title.value = import.meta.env.VITE_APP_TITLE;
|
||||
const store = useUserStore();
|
||||
const { userInfo } = storeToRefs(store);
|
||||
|
||||
const gotoPath = (path: string) => {
|
||||
if(path === 'follow_official_account') {
|
||||
showOfficialAccountDialog();
|
||||
} else {
|
||||
goPath(path);
|
||||
}
|
||||
};
|
||||
|
||||
const showOfficialAccountDialog = () => {
|
||||
officialAccountDialogRef.value.show();
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
|
Reference in New Issue
Block a user