1、发布信息:发布成功后清空上传的图片;选择的省市清空,底部适应苹果手机

2、招租详情和课程详情的底部按钮适应苹果手机和安卓机
3、个人中心的滑动、未认证已认证更换为图片
4、选择省市的组件跟随发布页面调整
5、上传照片的组件跟随发布页面调整
This commit is contained in:
wangzimeng 2025-08-08 17:19:53 +08:00
parent c564efef43
commit 745ecaa8c7
9 changed files with 323 additions and 202 deletions

View File

@ -27,46 +27,44 @@
<!-- 食堂招租 -->
<view class="recommend-box" v-if="currentTab == 0">
<view class="rrecommList" v-for="(item,index) in collectRentList" :key="index">
<view class="rrecommList">
<view class="reListItem" v-for="(item,index) in rentList" :key="index"
@click="toDetail(item)">
<!-- 左侧图片 -->
<view class="listItem-images">
<image v-if="item.recommend == 1"
style="width: 77rpx;height: 36rpx;z-index: 100;position: relative;top: 34rpx;left: 0rpx;"
src="https://jiangxiaoxian.0rui.cn/hot.png"></image>
<image class="iamges-mainImg" :src="item.images[0]" mode="aspectFill"></image>
</view>
<!-- 右侧内容 -->
<view class="listItem-contents">
<view class="title2" style="margin-bottom: 20rpx;">{{item.platform_title}}</view>
<scroll-view class="score-box">
<view class="fs11 flex cate">
<view class="cate-e" v-for="(e,i) in item.cate" :key="i">
<view v-show="e" class="status-tag " style="margin-right: 20rpx;">{{e}}
</view>
<view class="rrecommList">
<view class="reListItem" v-for="(item,index) in searchRentList" :key="index"
@click="toDetail(item)">
<!-- 左侧图片 -->
<view class="listItem-images">
<image v-if="item.recommend == 1"
style="width: 77rpx;height: 36rpx;z-index: 100;position: relative;top: 34rpx;left: 0rpx;"
src="https://jiangxiaoxian.0rui.cn/hot.png"></image>
<image class="iamges-mainImg" :src="item.images[0]" mode="aspectFill"></image>
</view>
<!-- 右侧内容 -->
<view class="listItem-contents">
<view class="title2" style="margin-bottom: 20rpx;">{{item.platform_title}}</view>
<scroll-view class="score-box">
<view class="fs11 flex cate">
<view class="cate-e" v-for="(e,i) in item.cate" :key="i">
<view v-show="e" class="status-tag " style="margin-right: 20rpx;">{{e}}
</view>
</view>
<!-- <text v-show="item.cate[1]"
<!-- <text v-show="item.cate[1]"
class="status-tag" style="margin-right: 20rpx;">{{item.cate[1]}}</text>
<text v-show="item.cate[2]"
class="status-tag">{{item.cate[2]}}</text> -->
</view>
</scroll-view>
<view class="cons-third">
<view style="display: flex;">
<image style="width: 24rpx;height: 24rpx;"
src="https://jiangxiaoxian.0rui.cn/locationList.png"></image>
<view class="title3" style="margin-left: 10rpx;">{{item.address_city_text}}
</view>
</scroll-view>
<view class="cons-third">
<view style="display: flex;">
<image style="width: 24rpx;height: 24rpx;"
src="https://jiangxiaoxian.0rui.cn/locationList.png"></image>
<view class="title3" style="margin-left: 10rpx;">{{item.address_city_text}}
</view>
</view>
<view class="title3">{{item.release_time_text}}</view>
<view style="display: flex;">
<image style="width: 24rpx;height: 24rpx;"
src="https://jiangxiaoxian.0rui.cn/eye.png"></image>
<view class="title3" style="margin-left: 10rpx;">{{item.views}}</view>
</view>
</view>
<view class="title3">{{item.release_time_text}}</view>
<view style="display: flex;">
<image style="width: 24rpx;height: 24rpx;"
src="https://jiangxiaoxian.0rui.cn/eye.png"></image>
<view class="title3" style="margin-left: 10rpx;">{{item.views}}</view>
</view>
</view>
</view>
@ -78,7 +76,7 @@
<!-- 平台课程 -->
<view class="exChangeBox" v-if="currentTab == 1">
<view class="couponsList">
<view class="list-item" v-for="(item,index) in classesList" :key="index"
<view class="list-item" v-for="(item,index) in searchClassesList" :key="index"
@click="toDetail(item)">
<image style="width: 100%;height: 200rpx;border-radius: 30rpx 30rpx 0 0;" :src="item.image">
</image>
@ -111,12 +109,14 @@
<!-- 原料商城 -->
<view class="goodsBox" v-if="currentTab == 2">
<view class="goodsList">
<view class="list-item" v-for="(item,index) in mallList" :key="index" @click="sheep.$router.go('/pages/goods/index', { id: item.id })">
<view class="list-item" v-for="(item,index) in mallList" :key="index"
@click="sheep.$router.go('/pages/goods/index', { id: item.id })">
<image style="width: 330rpx;height: 200rpx;border-radius: 18rpx 18rpx 0 0;"
:src="item.image">
:src="item.full_image">
</image>
<view class="item-text">
<view class="fs30 c3 goodsTitle" style="margin: 0 auto;width: 300rpx;">{{item.title}}</view>
<view class="fs30 c3 goodsTitle" style="margin: 0 auto;width: 300rpx;">{{item.title}}
</view>
<view class="cons-third">
<view class="title3">{{item.release_time_text}}</view>
<view style="display: flex;">
@ -133,14 +133,16 @@
</view>
<!-- 无数据展示
<view class="flex flex-column flex-start align-items" style="margin-top: 400rpx;"
v-if="( currentTab == 0 && collectRentList.length == 0) || (currentTab == 1 && collectSchoolList.length == 0)">
<!-- 无数据展示 -->
<view class="flex flex-column justify-center align-items" style="margin-top: 230rpx;"
v-if="( currentTab == 0 && searchRentList.length == 0) || (currentTab == 1 && searchClassesList.length == 0) || (currentTab == 2 && mallList.length == 0)">
<image src="https://jiangxiaoxian.0rui.cn/noneList.png" mode=""
style="width: 520rpx;height: 259rpx;">
</image>
<view style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">暂无数据信息</view>
</view>-->
<view v-if="listQuery.keywords == ''" style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">
请输入要搜索的内容</view>
<view v-else style="margin-top: 30rpx;font-size: 28rpx;color: #323232;">暂无相关数据</view>
</view>
</scroll-view>
@ -176,9 +178,9 @@
},
];
const currentTab = ref(0)
const collectRentList = ref([])
const searchRentList = ref([])
const rentCount = ref(0)
const collectSchoolList = ref([])
const searchClassesList = ref([])
const schoolCount = ref(0)
const mallList = ref([])
const mallCount = ref(0)
@ -212,16 +214,33 @@
function onChange(e) {
console.log('onChange', e);
currentTab.value = e.index
console.log('切换tabs', currentTab.value,listQuery.value.keywords);
if(listQuery.value.keywords != null) {
console.log('切换tabs', currentTab.value, listQuery.value.keywords);
if (listQuery.value.keywords != null) {
if (currentTab.value == 0) {
collectRentList.value = [];
getRentList();
searchRentList.value = [];
if(listQuery.value.keywords == null || listQuery.value.keywords == '') {
}else {
getRentList();
}
} else if (currentTab.value == 1) {
collectSchoolList.value = [];
getSchoolList();
searchClassesList.value = [];
if(listQuery.value.keywords == null || listQuery.value.keywords == '') {
}else {
getSchoolList();
}
} else {
getGoods();
mallList.value = [];
if(listQuery.value.keywords == null || listQuery.value.keywords == '') {
}else {
getGoods();
// getRentList();
}
}
}
}
@ -229,12 +248,13 @@
function search(e) {
console.log('搜索', e.value);
if (currentTab.value == 0) {
collectRentList.value = [];
searchRentList.value = [];
getRentList();
} else if (currentTab.value == 1) {
collectSchoolList.value = [];
searchClassesList.value = [];
getSchoolList();
} else {
mallList.value = [];
getGoods();
}
}
@ -268,17 +288,20 @@
console.log('招租收藏列表', res);
if (res.code == 1) {
collectRentList.value = [...collectRentList.value, ...res.data.list];
searchRentList.value = [...searchRentList.value, ...res.data.list];
rentCount.value = res.data.count
for(let i=0;i<searchRentList.value.length;i++){
searchRentList.value[i].release_time_text = searchRentList.value[i].release_time_text.substring(0, 10)
}
} else {
// Handle case where data is not in expected format
collectRentList.value = [];
searchRentList.value = [];
uni.showToast({
title: res.msg,
icon: 'none'
})
}
console.log('getList', collectRentList.value);
console.log('getList', searchRentList.value);
}
//
async function getSchoolList() {
@ -291,32 +314,32 @@
console.log('平台课程收藏列表', res);
if (res.code == 1) {
collectSchoolList.value = [...collectSchoolList.value, ...res.data.list];
searchClassesList.value = [...searchClassesList.value, ...res.data.list];
schoolCount.value = res.data.count
} else {
// Handle case where data is not in expected format
collectSchoolList.value = [];
searchClassesList.value = [];
uni.showToast({
title: res.msg,
icon: 'none'
})
}
console.log('平台课程收藏列表-222', collectSchoolList.value);
console.log('平台课程收藏列表-222', searchClassesList.value);
}
//
function onScrolltolower() {
if (currentTab.value == 0) {
if (collectRentList.value.length < rentCount.value) {
if (searchRentList.value.length < rentCount.value) {
listQuery.value.rentPage += 1;
getRentList();
}
} else if(currentTab.value == 1) {
if (collectSchoolList.value.length < schoolCount.value) {
} else if (currentTab.value == 1) {
if (searchClassesList.value.length < schoolCount.value) {
listQuery.value.schoolPage += 1;
getSchoolList();
}
}else {
} else {
if (mallList.value.length < mallCount.value) {
listQuery.value.mallPage += 1;
getGoods();
@ -342,15 +365,15 @@
function resetLists() {
if (currentTab.value == 0) {
listQuery.value.rentPage = 1;
collectRentList.value = [];
searchRentList.value = [];
loadStatus.value = "loading";
getRentList();
} else if(currentTab.value == 1) {
} else if (currentTab.value == 1) {
listQuery.value.schoolPage = 1;
collectSchoolList.value = [];
searchClassesList.value = [];
loadStatus.value = "loading";
getSchoolList();
}else {
} else {
listQuery.value.mallPage = 1;
mallList.value = [];
loadStatus.value = "loading";
@ -360,6 +383,27 @@
</script>
<style lang="scss" scoped>
.flex {
display: flex;
}
.align-start {
align-items: flex-start;
}
.justify-center {
justify-content: center;
}
.align-items {
align-items: center;
}
.flex-column {
flex-flow: column;
}
.search-result {
padding-top: 10px;
padding-bottom: 20px;
@ -425,14 +469,15 @@
padding: 0rpx 30rpx;
.rrecommList {
margin-top: 30rpx;
// margin-top: 30rpx;
.reListItem {
background-color: #ffffff;
width: 640rpx;
// height: 190rpx auto;
height: 190rpx;
padding: 30rpx;
display: flex;
margin-top: 20rpx;
justify-content: flex-start;
align-items: center;
border-radius: 18rpx;
@ -448,29 +493,21 @@
right: 0rpx;
bottom: 18rpx;
z-index: 1;
border-radius: 12rpx;
}
}
.listItem-contents {
width: 300rpx;
height: auto;
margin-left: 20rpx;
.score-box {
// width: 300rpx;
display: flex;
.cate {
width: 300rpx;
height: 190rpx auto;
display: flex;
justify-content: flex-start;
align-items: center;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
.cate-e {
@ -481,49 +518,25 @@
font-weight: 400;
line-height: 22rpx;
background-color: rgba(247, 97, 0, 0.2);
width: 107rpx;
height: 36rpx;
display: flex;
justify-content: center;
align-items: center;
// opacity: 0.2;
color: #F76100;
//flex-shrink: 0
}
}
}
.cate-e {
width: 300rpx;
height: 190rpx auto;
display: flex;
justify-content: flex-start;
align-items: center;
overflow-wrap: break-word;
word-break: break-word;
white-space: normal;
.status-tag {
// padding: 5rpx 15rpx;
border-radius: 5rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 22rpx;
background-color: rgba(247, 97, 0, 0.2);
width: 107rpx;
height: 36rpx;
display: flex;
justify-content: center;
align-items: center;
color: #F76100;
}
}
}
.cons-third {
margin-top: 20rpx;
width: 430rpx;
display: flex;
justify-content: flex-start;
justify-content: space-between;
align-items: center;
}
}

View File

@ -81,7 +81,7 @@
</view>
</view>
<view style="width: 100%;height: 180rpx;"></view>
<view style="width: 100%;height: 248rpx;"></view>
<!-- 底部按钮 -->
<view class="footer-box">
@ -573,13 +573,14 @@
.footer-box {
width: 100%;
height: 140rpx;
padding-bottom: 0rpx;
height: 100rpx auto;
box-sizing: border-box;
position: fixed;
bottom: 0rpx;
padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 - 11.1 */
padding-bottom: env(safe-area-inset-bottom); /* iOS 11.2+ */
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
// box-shadow: 0 -4rpx 6rpx 6rpx #f6f6f6;
background-color: #fff;
@ -610,6 +611,12 @@
}
/* 对于没有安全区域的设备,设置默认值 */
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
.footer-box {
padding-bottom: 0;
}
}
}
.popupContacted {

View File

@ -47,7 +47,7 @@
<!-- 推荐列表 -->
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
@refresherrefresh="onS" scroll-y="true" class="flex align-items"
style="height: 1250rpx;box-sizing: border-box;">
style="height: 83vh;box-sizing: border-box;">
<view class="recommend-box">
<view class="rrecommList">
<view class="reListItem" v-for="(item,index) in rentList" :key="index" @click="toDetail(item)">

View File

@ -2,7 +2,8 @@
<!-- <view> 发布 </view> tabbar="/pages/index/fabu"-->
<s-layout title="发布信息" :bgStyle="{ color: '#f7f7f7' }">
<view class="container">
<view class="backImg flex flex-column align-items">
<!-- :style="{height: isIphone ? `calc(71vh - ${systemInfo.safeAreaInsets.bottom}px)` : '78vh',}" -->
<scroll-view scroll-y="true" class="backImg flex flex-column align-items">
<view class="scroll-container box flex flex-column align-items">
<view class="first flex flex-column align-items justify-start" style="padding: 30rpx;">
<view class="row flex align-items" style="padding: 0 30rpx;">
@ -80,8 +81,8 @@
</view>
<!-- 图片 -->
<s-uploader v-model:url="state.formData.images" fileMediatype="image" limit="9" mode="grid"
:imageStyles="{ width: '168rpx', height: '168rpx'}"></s-uploader>
<s-uploader ref="uploaderRef" v-model:url="state.formData.images" fileMediatype="image"
limit="9" mode="grid" :imageStyles="{ width: '220rpx', height: '220rpx'}"></s-uploader>
<view style="color: red;margin-top: 10rpx;font-size: 24rpx;">请上传尺寸大小为390*390的图片</view>
</view>
<span class="line-row" style="margin: 30rpx 0;"></span>
@ -132,11 +133,14 @@
</view>
</view>
<!-- <view class="width:100%;height:200rpx"></view> -->
<view style="height: 370rpx;width: 100%;color: #f7f7f7;"></view>
</view>
</view>
<view style="height: 496rpx;width: 100%;color: #f7f7f7;"></view>
</scroll-view>
<view class="bottomBtn">
<view style="margin:30rpx 0 0 0;display: flex;align-items: center;justify-content: center;">
@ -146,7 +150,8 @@
src="https://jiangxiaoxian.0rui.cn/fbxySelected.png"></image>
<view style="font-size: 22rpx;line-height: 31rpx;color: #9C9C9C;display: flex;
justify-content: center;align-items: center;margin-left: 20rpx;" @click="show = true">我已阅读并同意
<view style="margin-left: 6rpx;color: #FCC74E;font-size: 22rpx;line-height: 31rpx;">发布须知</view>
<view style="margin-left: 6rpx;color: #FCC74E;font-size: 22rpx;line-height: 31rpx;">发布须知
</view>
</view>
</view>
<view class="btns">
@ -336,6 +341,8 @@
console.log('onRegionConfirm33', state.model, proCity.value);
state.showRegion = false;
};
//
const uploaderRef = ref(null); // ref
const show = ref(false) //
const agreeAdd = ref(false) //
@ -343,14 +350,27 @@
const Negotiate = ref('') //
const cardShow = ref(false) //
const status = ref(0)
const systemInfo = ref()
const isIphone = ref(false)
onShow(() => {
isIos();
getAuthentied();
getFbKnow();
getTagList();
getTypeList();
})
function isIos() {
systemInfo.value = uni.getSystemInfoSync();
console.log('systemInfo.value', systemInfo.value.safeAreaInsets);
isIphone.value = systemInfo.platform === 'ios' || /iphone|ipad/i.test(systemInfo.model);
console.log('isIphone', isIphone.value);
// if (isIphone.value) {
// this.footerStyle = 'padding-bottom: 68rpx;';
// }
}
//
function getAuthentied() {
if (isLogin.value == true) {
@ -363,7 +383,7 @@
}
}
})
}else {
} else {
uni.showToast({
title: '请先登录',
icon: 'none',
@ -378,8 +398,9 @@
}
}
function toAuthen() {
console.log('isLogin.value',isLogin.value);
console.log('isLogin.value', isLogin.value);
if (isLogin.value == true) {
cardShow.value = false
uni.navigateTo({
@ -412,7 +433,7 @@
console.log('发布须知——Negotiate', Negotiate.value);
}
})
}else {
} else {
setTimeout(() => {
uni.showToast({
title: '请先登录',
@ -581,6 +602,7 @@
}
async function apply() {
console.log('state', state.formData.images);
if (agreeAdd.value == false) {
uni.showToast({
title: '请先同意发布须知',
@ -688,7 +710,17 @@
cateName: '',
imageList: [],
}
state.formData.images = []
state.formData.images = [];
state.imageFiles = []
console.log('state.formData.images', state.formData.images, uploaderRef.value);
// 2.
if (uploaderRef.value) { //
uploaderRef.value.clearFiles(); //
}
state.currentCityIndex = [0, 0]
console.log('currentCityIndex', state.currentCityIndex);
uni.switchTab({
url: '/pages/index/user'
})
@ -777,8 +809,7 @@
.container {
.backImg {
height: 90vh;
// background: linear-gradient(to bottom, #F1F2F8 0%, #F1F2F8 50%, #FFFFFF 100%);
height: 78vh;
width: 100%;
background-color: #f7f7f7;
@ -995,10 +1026,13 @@
width: 750rpx;
// height: 200rpx;
background: #FFFFFF;
// margin-top: 30rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
position: fixed;
bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
/* iOS 11.0 - 11.1 */
padding-bottom: env(safe-area-inset-bottom);
/* iOS 11.2+ */
z-index: 10;
.btns {
@ -1028,6 +1062,13 @@
}
/* 对于没有安全区域的设备,设置默认值 */
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
.bottomBtn {
padding-bottom: 0;
}
}
.inputl {
text-align: left;
font-family: PingFang SC, PingFang SC;

View File

@ -12,7 +12,7 @@
src="https://jiangxiaoxian.0rui.cn/locationTop.png" mode=""></image>
<view
style="margin-left: 10rpx;font-size: 30rpx;font-weight: 800;line-height: 45rpx;
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 200rpx;">
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 230rpx;">
{{state.model.city_name ? proCity:'全国' }}
</view>
</view>
@ -479,7 +479,7 @@
// background-size: 100% 100%;
.top {
height: 500rpx;
height: 520rpx;
background-image: url('https://jiangxiaoxian.0rui.cn/topBack.png');
background-size: 100%;
padding: 30rpx 30rpx 30rpx 30rpx;
@ -501,7 +501,7 @@
}
.locTop-right {
width: 426rpx;
width: 410rpx;
height: 70rpx;
}

View File

@ -4,11 +4,10 @@
<!-- 登录信息 -->
<view class="myBox">
<scroll-view :refresher-enabled="false" scroll-y="true" class="flex align-items"
style="height: 94vh;box-sizing: border-box;">
<view @touchmove.prevent scroll-y="true" :show-scrollbar="true"
class="con-center flex flex-start flex-column">
style="box-sizing: border-box;height: 94vh;">
<!-- :style="{height: isIphone ? `calc(90vh - ${systemInfo.safeAreaInsets.bottom}px)` : '94vh',}" -->
<view class="con-center flex flex-start flex-column">
<view class="header">
<!-- 用户信息 -->
<view class="hea-left flex">
@ -25,11 +24,17 @@
<view class="headAvatar-info justify-start">
<view class="info-name fs-36 weight8 flexD" v-if="isLogin == true">
<view style="font-weight: 800;" @click="sheep.$router.go('/pages/user/info')">
{{ userInfo.nickname}} </view>
<view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 "
@click="toPage('/pages/user/authentication')">未认证</view>
<view class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 ">已认证
{{ userInfo.nickname}}
</view>
<!-- <view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 "
@click="toPage('/pages/user/authentication')">未认证</view>
<view class="authenticationBox weight8 fs-20" >已认证
</view> -->
<image class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1"
src="https://jiangxiaoxian.0rui.cn/unAuthen.png"></image>
<image class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 "
src="https://jiangxiaoxian.0rui.cn/authened.png"></image>
</view>
<view class="info-name fs-36 weight8 flexD" v-else>
<view style="font-weight: 800;" @click="toLogin">登录/注册</view>
@ -37,7 +42,8 @@
<view class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 && isLogin == true">已认证</view> -->
</view>
<view class="fs-28 weight4" style="margin-top: 30rpx;">剩余拨打次数
{{ userInfo.all_mobile_num ? userInfo.all_mobile_num : 0 }}</view>
{{ userInfo.all_mobile_num ? userInfo.all_mobile_num : 0 }}
</view>
</view>
<view class="head-signInBox" @click="toPage('/pages/app/sign')">
<image style="width: 46rpx;height: 44rpx;"
@ -56,7 +62,8 @@
</view>
<view class="feetPrint" @click="toPage('/pages/user/goods-log')">
<view class="feetPrint-num">
{{ userInfo.footprint_number ? userInfo.footprint_number : 0 }}</view>
{{ userInfo.footprint_number ? userInfo.footprint_number : 0 }}
</view>
<view class="feetPrint-text">足迹</view>
</view>
<view class="feetPrint" @click="toPage('/pages/user/wallet/score')">
@ -142,8 +149,8 @@
src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
</view>
<view class="line-row" style="margin: 40rpx 0;"></view>
<!-- 官方客服 -->
<view class="fabuBox" @click="toPage('/pages/chat/index')">
<!-- 官方客服 @click="toPage('/pages/chat/index')" -->
<view class="fabuBox" @click="handleService()">
<view class="flex align-items">
<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
src="https://jiangxiaoxian.0rui.cn/service.png"></image>
@ -184,6 +191,8 @@
<view style="height: 180rpx;width: 100%;"></view>
</view>
<view class="width:100%;height:200rpx"></view>
</scroll-view>
<su-popup :show="showLogin == true" type="center" round="10" :isMaskClick="false">
@ -241,8 +250,12 @@
const isLogin = computed(() => sheep.$store('user').isLogin);
const userInfo = computed(() => sheep.$store('user').userInfo);
const authenInfo = computed(() => sheep.$store('user').authenInfo);
const systemInfo = ref()
const isIphone = ref(false)
const scrollHeight = ref()
onShow(() => {
isIos();
sheep.$store('user').updateUserData();
});
@ -254,6 +267,24 @@
});
onPageScroll(() => {});
function isIos() {
systemInfo.value = uni.getSystemInfoSync();
console.log('systemInfo.value', systemInfo.value.windowHeight);
isIphone.value = systemInfo.platform === 'ios' || /iphone|ipad/i.test(systemInfo.model);
console.log('isIphone', isIphone.value);
// px
// const totalHeight = systemInfo.value.windowHeight; // 使
// const iphoneHeight = Math.floor(totalHeight * 1); // 70%
// const androidHeight = Math.floor(totalHeight * 0.78); // 78%
// scrollHeight.value = isIphone.value ? `${iphoneHeight}px` : `${androidHeight}px`;
// if (isIphone.value) {
// this.footerStyle = 'padding-bottom: 68rpx;';
// }
}
//
function toLogin() {
console.log('toLogin', showLogin.value);
@ -360,6 +391,21 @@
}
}
//
function handleService() {
console.log('联系平台客服', userInfo.value.platform_contact_number);
wx.makePhoneCall({
phoneNumber: userInfo.value.platform_contact_number,
success: function() {
console.log("拨打电话成功")
},
fail: function(err) {
console.log("拨打电话失败", err)
}
})
}
</script>
<style lang="scss" scoped>
@ -485,13 +531,13 @@
.UnAuthenBox {
margin-left: 10rpx;
background-color: #EBECEE;
// background-color: #EBECEE;
border-radius: 8rpx;
width: 80rpx;
height: 30rpx;
color: #8D93B3;
// color: #8D93B3;
display: flex;
padding: 5rpx 10rpx;
// padding: 5rpx 10rpx;
align-items: center;
justify-content: center;
}
@ -499,13 +545,13 @@
.authenticationBox {
margin-left: 10rpx;
background-color: #333333;
// background-color: #333333;
border-radius: 8rpx;
width: 80rpx;
height: 30rpx;
color: #fecc4e;
// color: #fecc4e;
display: flex;
padding: 5rpx 10rpx;
// padding: 5rpx 10rpx;
align-items: center;
justify-content: center;
}
@ -652,7 +698,7 @@
display: block;
background-color: #ffffff;
border-radius: 18rpx;
padding: 30rpx;
padding: 40rpx 30rpx;
margin: 0 auto;
position: relative;
bottom: 50rpx;

View File

@ -1,6 +1,7 @@
<template>
<s-layout title="课程详情">
<view class="container">
<!-- 顶部视频 -->
<view class="swiper-box" v-if="detailClass.status == 2">
<view class="swiper_s">
@ -48,7 +49,8 @@
<!-- {{detailClass.content}} -->
</view>
<view style="width: 100%;height: 180rpx;"></view>
<!-- :style="{ height: systemInfo.value.platform == 'ios' ? '248rpx': '180rpx',}" -->
<view style="width: 100%;height: 248rpx;"></view>
<!-- 底部按钮 -->
<view class="footer-box">
@ -478,13 +480,15 @@
.footer-box {
width: 100%;
height: 140rpx;
padding-bottom: 0rpx;
height: 100rpx auto;
box-sizing: border-box;
position: fixed;
bottom: 0;
// padding-bottom: 68rpx;
padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 - 11.1 */
padding-bottom: env(safe-area-inset-bottom); /* iOS 11.2+ */
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
// box-shadow: 0 -4rpx 6rpx 6rpx #f6f6f6;
background-color: #fff;
@ -492,7 +496,7 @@
.icon-box {
width: 36%;
height: 110rpx;
height: 100rpx;
display: flex;
justify-content: space-around;
align-items: center;
@ -503,7 +507,7 @@
background-color: #fcc74e;
color: #333333;
width: 64%;
height: 110rpx;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
@ -521,6 +525,13 @@
}
// /* */
// @supports not (padding-bottom: env(safe-area-inset-bottom)) {
// .footer-box {
// padding-bottom: 0;
// }
// }
}
.popupContacted {

View File

@ -1,9 +1,9 @@
<template>
<view class="uni-file-picker__container">
<!-- <view class="file-picker__box" v-for="(url, index) in list" :key="index" :style="boxStyle"> -->
<view class="file-picker__box" v-for="(url, index) in list" :key="index" style="width: 110px;height: 110px;margin-right: 16rpx;">
<!-- <view class="file-picker__box" v-for="(url, index) in list" :key="index" :style="boxStyle" width: 196rpx;height: 196rpx;> -->
<view class="file-picker__box" v-for="(url, index) in list" :key="index" :style="boxStyle" >
<!-- <view class="file-picker__box-content" :style="borderStyle"> -->
<view class="file-picker__box-content" style="width: 110px;height: 110px;">
<view class="file-picker__box-content" :style="borderStyle">
<image class="file-image" :src="getImageUrl(url)" mode="aspectFill"
@click.stop="previewImage(url, index)"></image>
<view v-if="delIcon && !readonly" class="icon-del-box" @click.stop="delFile(index)">
@ -15,8 +15,8 @@
</view> -->
</view>
</view>
<!-- <view v-if="list.length < limit && !readonly" class="file-picker__box" :style="boxStyle"> -->
<view v-if="list.length < limit && !readonly" class="file-picker__box" style="width: 110px;height: 110px;">
<!-- <view v-if="list.length < limit && !readonly" class="file-picker__box" :style="boxStyle"> style="width: 196rpx;height: 196rpx;"-->
<view v-if="list.length < limit && !readonly" class="file-picker__box" :style="boxStyle">
<view class="file-picker__box-content is-add" :style="borderStyle" @click="choose">
<slot>
<view class="icon-add"></view>
@ -261,10 +261,10 @@
}
.file-image {
width: 110px;
height: 110px;
// width: 100%;
// height: 100%;
// width: 196rpx;
// height: 196rpx;
width: 100%;
height: 100%;
}
.is-add {

View File

@ -191,6 +191,9 @@
console.log('su-regionCity-picker result', result);
if (event) emits(event, result);
state.currentCityIndex = [0, 0]
};
</script>