增加登录日志埋点
This commit is contained in:
@@ -6,7 +6,10 @@
|
||||
<view class='store-item' v-for='(item, index) in companyList' :key='index' @click='() => {
|
||||
handleClick(index)
|
||||
}'>
|
||||
<text>{{ item?.companyName || '' }}</text>
|
||||
<view class='c-flex-row'>
|
||||
<text>{{ item?.companyName || '' }}</text>
|
||||
<image v-if='index===currentIndex' src='/static/images/ic_checkmark_red.png' />
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class='close-btn primary-button' @click='close'>
|
||||
@@ -17,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
companyList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
@@ -25,14 +28,19 @@ defineProps({
|
||||
});
|
||||
|
||||
const popupRef = ref();
|
||||
const currentIndex = ref(0);
|
||||
let callback: Function;
|
||||
|
||||
const show = (fn: Function) => {
|
||||
const show = (companyId: string, fn: Function) => {
|
||||
if(companyId) {
|
||||
currentIndex.value = props.companyList.findIndex(item => item.id === companyId);
|
||||
}
|
||||
callback = fn;
|
||||
popupRef.value.open();
|
||||
};
|
||||
|
||||
const handleClick = (index: number) => {
|
||||
currentIndex.value = index;
|
||||
callback(index);
|
||||
close();
|
||||
};
|
||||
@@ -68,6 +76,20 @@ defineExpose({
|
||||
font-size: 35rpx;
|
||||
color: #333333;
|
||||
//padding: 20rpx 20rpx;
|
||||
|
||||
|
||||
.c-flex-row {
|
||||
text {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.store-item:after {
|
||||
@@ -81,6 +103,7 @@ defineExpose({
|
||||
.close-btn {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user