Browse Source

fix(deliveryAddress): 修复地址选择页底部间距和导航问题

调整底部间距样式,将padding-bottom改为单独的高度元素
修复导航到加入企业页面的链接问题
同时优化了joinEnterprise页面的输入处理和样式引入
master
wei 3 days ago
parent
commit
7b82124865
  1. 5
      pages/deliveryAddress/deliveryAddress.scss
  2. 10
      pages/deliveryAddress/deliveryAddress.vue
  3. 52
      pages/joinEnterprise/joinEnterprise.vue

5
pages/deliveryAddress/deliveryAddress.scss

@ -1,7 +1,10 @@
/* pages/selectAddress/selectAddress.wxss */
.content {
margin: 21rpx 14rpx 0 14rpx;
padding-bottom: 200rpx;
// padding-bottom: 200rpx;
}
.padding {
height: 200rpx;
}
.list {

10
pages/deliveryAddress/deliveryAddress.vue

@ -37,9 +37,10 @@ async function getUserInfo() {
content: "请先添加企业",
complete: (res) => {
if (res.confirm) {
// uni.navigateTo({
uni.navigateTo({
url: "/pages/joinEnterprise/joinEnterprise",
// url: "../../enterprise/pages/joinEnterprise/joinEnterprise",
// });
});
}
},
});
@ -141,8 +142,8 @@ onLoad(() => {
<template>
<navv>
<template #default="{ content }">
<TopTitle title="选择地址" />
<template #default="{ content, style }">
<TopTitle title="选择地址" :style="{ style }" />
<view class="content" :style="{ 'height': `${content}px`, 'overflow-y': 'auto' }">
<block
v-for="(item, idx) in selectData"
@ -178,6 +179,7 @@ onLoad(() => {
</view>
</view>
</block>
<view class="padding" />
<!-- <view
v-if="selectData?.[0]?.addrId == null"
class="not-data"

52
pages/joinEnterprise/joinEnterprise.vue

@ -3,13 +3,50 @@ import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import navv from "@/components/nav/nav.vue";
import TopTitle from "@/components/topTitle/topTitle.vue";
import { getJoinEnterpriseApi } from "@/libs/api";
/**
* 标注
*/
const showTil = ref(false);
/**
* 企业名称
*/
const company = ref("");
/**
* 加入企业列表
*/
const enterprise = ref([]);
function inputEdit() {
}
function createEnterprise() { }
async function addEnterprise() {
const res = await getJoinEnterpriseApi({
search: company.value,
pageSize: 500,
pageNum: 1,
});
if (res.code !== "0") {
return;
}
// null
res.data.forEach(item =>
Object.keys(item).forEach(k => item[k] ??= ""),
);
enterprise.value = res.data;
showTil.value = true;
}
</script>
<template>
<navv>
<template #default="{ content, fixStyle }">
<template #default="{ fixStyle, padStyle }">
<TopTitle title="加入企业" :style="fixStyle" />
<view class="content" wx:if="{{!showTil}}">
<view v-if="!showTil" class="content" :style="padStyle">
<view class="tips">
创建企业您将成为企业的管理者加入企业您将成为企业的子账号若有同事已经创建过企业请加入企业
</view>
@ -22,19 +59,18 @@ import TopTitle from "@/components/topTitle/topTitle.vue";
type="text"
placeholder="请输入您要添加的企业"
data-item="company"
type="text"
:value="company"
placeholder-style="color:#999999"
@input="inputEdit"
@input="(e) => company = e.detail.value"
>
</view>
</view>
<view class="buttons">
<!-- <button class="btn" bindtap="aginAddEnterprise">创建企业</button> -->
<button class="btn" data-create="{{true}}" @tap="addEnterprise">
<button class="btn" @tap="createEnterprise">
创建企业
</button>
<button class="btn" data-create="{{false}}" @tap="addEnterprise">
<button class="btn" @tap="addEnterprise">
加入企业
</button>
</view>
@ -42,3 +78,7 @@ import TopTitle from "@/components/topTitle/topTitle.vue";
</template>
</navv>
</template>
<style lang="scss" scoped>
@import './joinEnterprise.scss'
</style>
Loading…
Cancel
Save