jiuyiUniapp/jiuyi2/pages/shop/settle.vue

106 lines
2.0 KiB
Vue
Raw Normal View History

2024-12-18 15:46:27 +08:00
<script setup>
2025-04-27 21:40:25 +08:00
// 平台入驻
2024-12-18 15:46:27 +08:00
import {
ref,
2025-01-10 10:51:21 +08:00
reactive,
computed,
getCurrentInstance,
2024-12-18 15:46:27 +08:00
} from 'vue';
2025-01-10 10:51:21 +08:00
import {
onLoad,
onReady,
} from '@dcloudio/uni-app';
// vuex
import {
useStore
} from 'vuex'
//
import api from '@/api/index.js';
// 工具库
2024-12-18 15:46:27 +08:00
import util from '@/common/js/util.js'
2025-04-27 21:40:25 +08:00
2025-01-10 10:51:21 +08:00
//
const store = useStore()
const {
proxy
2025-04-27 21:40:25 +08:00
} = getCurrentInstance()
// 身份选择列表
const identityList = reactive([{
icon: '/static/store1.png',
name: '商家入驻',
url: '/pages/shop/store/settled',
},
{
icon: '/static/store2.png',
name: '线下店铺入驻',
url: '/pages/shop/offline/settled',
}
])
// 身份选择下标
const identityIndex = ref(0)
2025-01-10 10:51:21 +08:00
// 用户信息
2025-02-12 17:03:02 +08:00
const userinfo = computed(() => store.state.userinfo)
2025-01-10 10:51:21 +08:00
onLoad(() => {
2025-04-27 21:40:25 +08:00
//
2024-12-18 15:46:27 +08:00
})
2025-01-10 10:51:21 +08:00
2024-12-18 15:46:27 +08:00
/**
2025-04-27 21:40:25 +08:00
* 选择身份
* @param {Object} index
2024-12-18 15:46:27 +08:00
*/
2025-04-27 21:40:25 +08:00
function handleIdentityIndex(index) {
if (identityIndex.value === index) return
identityIndex.value = index
2025-01-11 03:51:29 +08:00
}
2025-04-27 21:40:25 +08:00
// 下一步
function handleNext() {
uni.navigateTo({
url: identityList[identityIndex.value].url
2025-02-03 20:36:02 +08:00
})
2025-01-11 03:51:29 +08:00
}
2024-12-18 15:46:27 +08:00
</script>
<template>
2025-04-27 21:40:25 +08:00
<view class="app">
<view class="list">
<view class="item fmid mtb30 mlr30 ptb20 br20 bfff" v-for="(item,index) in identityList" :key="index"
:class="{'active': index === identityIndex}" @click="handleIdentityIndex(index)">
<image class="wh50" :src="item.icon" mode="aspectFit" />
2024-12-18 15:46:27 +08:00
2025-04-27 21:40:25 +08:00
<view class="name wsn mlr20 c333">{{item.name}}</view>
2024-12-18 15:46:27 +08:00
2025-04-27 21:40:25 +08:00
<template v-if="index === identityIndex">
<uni-icons type="circle-filled" color="#3d3d3d" />
2024-12-18 15:46:27 +08:00
</template>
<template v-else>
2025-04-27 21:40:25 +08:00
<uni-icons type="circle" color="#D8D8D8" />
2024-12-18 15:46:27 +08:00
</template>
</view>
</view>
2025-04-27 21:40:25 +08:00
<view class="fill" style="height: 150rpx;"></view>
2024-12-18 15:46:27 +08:00
2025-04-27 21:40:25 +08:00
<view class="footer plr30 bfff">
<view class="btn lg black" @click="handleNext">下一步</view>
2024-12-18 15:46:27 +08:00
</view>
2025-04-27 21:40:25 +08:00
</view>
2024-12-18 15:46:27 +08:00
</template>
<style lang="scss">
.img {
width: 100%;
height: 100%;
}
2025-04-27 21:40:25 +08:00
.list {
.item {
.name {
width: 220rpx;
font-size: 34rpx;
2024-12-18 15:46:27 +08:00
}
}
}
</style>