Compare commits
11 Commits
2025-08-11
...
main
Author | SHA1 | Date | |
---|---|---|---|
7a868c671c | |||
e405700578 | |||
7ad5a25cdf | |||
af6a57f378 | |||
a278bf103d | |||
e999d3738d | |||
1e87dd5950 | |||
be19313044 | |||
6f158c739d | |||
b5b7d667b6 | |||
53d6123af9 |
41
pages.json
41
pages.json
@ -21,13 +21,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/fabu",
|
||||
"path": "pages/index/category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布信息"
|
||||
"navigationBarTitleText": "商品分类"
|
||||
},
|
||||
"meta": {
|
||||
"sync": true,
|
||||
"title": "发布信息",
|
||||
"title": "商品分类",
|
||||
"group": "商城"
|
||||
}
|
||||
},
|
||||
@ -42,17 +42,6 @@
|
||||
"group": "商城"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/category",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品分类"
|
||||
},
|
||||
"meta": {
|
||||
"sync": true,
|
||||
"title": "商品分类",
|
||||
"group": "商城"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/cart",
|
||||
"style": {
|
||||
@ -117,6 +106,28 @@
|
||||
"group": "食堂招租"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "lawNotice",
|
||||
"style": {
|
||||
"navigationBarTitleText": "法律声明"
|
||||
},
|
||||
"meta": {
|
||||
"sync": true,
|
||||
"title": "法律声明",
|
||||
"group": "商品"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "fabu",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布信息"
|
||||
},
|
||||
"meta": {
|
||||
"sync": true,
|
||||
"title": "发布信息",
|
||||
"group": "商城"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "rentEdit",
|
||||
"style": {
|
||||
@ -854,7 +865,7 @@
|
||||
"pagePath": "pages/index/index"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/fabu"
|
||||
"pagePath": "pages/index/category"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/user"
|
||||
|
@ -1,6 +1,9 @@
|
||||
<!-- 页面 -->
|
||||
<template>
|
||||
<s-layout title="积分商城">
|
||||
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
|
||||
@refresherrefresh="onS" scroll-y="true" class="flex align-items "
|
||||
style="height: 100vh;box-sizing: border-box;">
|
||||
<view class="container">
|
||||
<!-- 顶部信息 -->
|
||||
<view class="conTop">
|
||||
@ -14,33 +17,42 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- tabs页签 -->
|
||||
<!-- tabs页签
|
||||
<view class="tabs-box">
|
||||
<su-tabs :list="tabMaps" @change="onChange" :scrollable="false" :current="currentTab"></su-tabs>
|
||||
</view>
|
||||
</view>-->
|
||||
|
||||
<!-- 可兑换券列表 -->
|
||||
<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;">
|
||||
<!-- 满减券 -->
|
||||
<view class="exChangeBox" v-if="currentTab == 0">
|
||||
<view class="exChangeBox">
|
||||
<view class="scoreBox" style="display: flex;justify-content: center;align-items: center;width: 100%;margin: 40rpx 30rpx;">
|
||||
<view style="width: 60rpx;height: 8rpx;background-color: #fcc74e;"></view>
|
||||
<view style="color: #333333;font-size: 42rpx;font-weight: bold;line-height: 28rpx;margin: 0 30rpx;font-family: PingFang SC;;">积分兑换</view>
|
||||
<view style="width: 60rpx;height: 8rpx;background-color: #fcc74e;"></view>
|
||||
</view>
|
||||
<view class="couponsList">
|
||||
<view class="list-item" v-for="(item, index) in couponList" :key="index" @click="openCouponPro(item)">
|
||||
<image style="width: 330rpx;height: 200rpx;" src="https://jiangxiaoxian.0rui.cn/fullCoupon.png">
|
||||
</image>
|
||||
<view class="item-text">
|
||||
<view class="fs30 c3" style="margin: 0 auto;text-align: center;">{{item.name}}</view>
|
||||
<view class="exchangeBtn">
|
||||
{{item.score}}积分兑换
|
||||
<view >
|
||||
<image v-if="item.status == 1" style="width: 330rpx;height: 200rpx;" src="https://jiangxiaoxian.0rui.cn/fullCoupon.png">
|
||||
</image>
|
||||
<image v-else style="width: 330rpx;height: 200rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/scoreNumCoupon.png"></image>
|
||||
<view class="item-text">
|
||||
<view class="fs30 c3" style="margin: 0 auto;text-align: center;">{{item.name}}</view>
|
||||
<view class="exchangeBtn">
|
||||
{{item.score}}积分兑换
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 次数券 -->
|
||||
<view class="exChangeBox" v-if="currentTab == 1">
|
||||
<!-- 次数券
|
||||
<view class="exChangeBox">
|
||||
<view class="couponsList">
|
||||
<view class="list-item" v-for="(item, index) in couponList" :key="index" @click="openCouponPro(item)">
|
||||
<image style="width: 330rpx;height: 200rpx;"
|
||||
@ -54,9 +66,9 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
|
||||
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
@ -85,6 +97,8 @@
|
||||
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
@ -146,10 +160,10 @@
|
||||
const couponCount = ref(0)
|
||||
const homrS = ref(false)
|
||||
async function getCouponList() {
|
||||
// status: listQuery.value.status,
|
||||
const res = await sheep.$api.app.scoreShop.fullList({
|
||||
page: listQuery.value.page,
|
||||
limit: listQuery.value.limit,
|
||||
status: listQuery.value.status,
|
||||
order: 'normal'
|
||||
});
|
||||
if (res.code === 1) {
|
||||
|
@ -80,7 +80,7 @@
|
||||
</image>
|
||||
<view class="signTask-text">
|
||||
<view class="textFir">发布1条信息</view>
|
||||
<view class="textSec">+10积分</view>
|
||||
<view class="textSec">+100积分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
</image>
|
||||
<view class="signTask-text">
|
||||
<view class="textFir">每日签到</view>
|
||||
<view class="textSec">+10积分</view>
|
||||
<view class="textSec">+20积分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -120,12 +120,12 @@
|
||||
mode="">
|
||||
</image>
|
||||
<view class="signTask-text">
|
||||
<view class="textFir">每消费100元</view>
|
||||
<view class="textSec">+10积分</view>
|
||||
<view class="textFir">每消费1元</view>
|
||||
<view class="textSec">+1积分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="signBtn" @click="toPage('/pages/index/category')">
|
||||
<view class="signBtn" @click="toTabb('/pages/index/category')">
|
||||
去消费
|
||||
</view>
|
||||
</view>
|
||||
@ -139,7 +139,7 @@
|
||||
</image>
|
||||
<view class="signTask-text">
|
||||
<view class="textFir">分享1个好友注册平台</view>
|
||||
<view class="textSec">+10积分</view>
|
||||
<view class="textSec">+500积分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -218,7 +218,7 @@
|
||||
</view>
|
||||
<view class="contactBtn">
|
||||
<view class="tactBtnBox" style="color: #999999;" @click="showFB = false">取消</view>
|
||||
<view class="tactBtnBox2" style="color: #323232;" @click="toTabb('/pages/index/fabu')">去发布</view>
|
||||
<view class="tactBtnBox2" style="color: #323232;" @click="toFaBu">去发布</view>
|
||||
</view>
|
||||
</view>
|
||||
</su-popup>
|
||||
@ -410,7 +410,15 @@
|
||||
})
|
||||
}
|
||||
|
||||
const showFB = ref(false)
|
||||
const showFB = ref(false);
|
||||
function toFaBu() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/canteenRent/fabu',
|
||||
})
|
||||
setTimeout(() => {
|
||||
showFB.value = false;
|
||||
},1000)
|
||||
}
|
||||
function openFB() {
|
||||
showFB.value = true;
|
||||
}
|
||||
@ -418,7 +426,6 @@
|
||||
showFB.value = false;
|
||||
}
|
||||
|
||||
|
||||
//分享功能
|
||||
function showShare() {
|
||||
// 确保使用有效的图片URL
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<!-- <view> 发布 </view> tabbar="/pages/index/fabu"-->
|
||||
<!-- <view> 发布 </view>-->
|
||||
<s-layout title="发布信息" :bgStyle="{ color: '#f7f7f7' }">
|
||||
<view class="container">
|
||||
<!-- :style="{height: isIphone ? `calc(71vh - ${systemInfo.safeAreaInsets.bottom}px)` : '78vh',}" -->
|
||||
@ -33,12 +33,12 @@
|
||||
|
||||
<view class="row " style="">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
详细地址
|
||||
学校名
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;height: 80rpx;">
|
||||
<textarea v-model="form.address_detail" style="height: 80rpx;width: 100%;"
|
||||
maxlength="400" placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx"
|
||||
placeholder="请输入详细地址"></textarea>
|
||||
placeholder="请输入学校全名"></textarea>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -46,10 +46,10 @@
|
||||
|
||||
<view class="row flex align-items" style="padding: 0 30rpx;">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
联系人
|
||||
经理
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="text" placeholder="请输入联系人" class="input" v-model="form.contacts"
|
||||
<input type="text" placeholder="请输入经理名字" class="input" v-model="form.contacts"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -57,10 +57,10 @@
|
||||
|
||||
<view class="row flex align-items" style="padding: 0 30rpx;">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
联系电话
|
||||
经理电话
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="number" placeholder="请输入联系电话" class="input" v-model="form.contact_number"
|
||||
<input type="number" placeholder="请输入经理电话" class="input" v-model="form.contact_number"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -72,14 +72,14 @@
|
||||
style="margin-top: 20rpx;padding: 30rpx">
|
||||
<view class="row align-items" style="">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
详细信息
|
||||
餐厅信息
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;height: 120rpx;margin-bottom: 30rpx;">
|
||||
<textarea v-model="form.content" style="height: 120rpx;width: 100%;" maxlength="400"
|
||||
placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx"
|
||||
placeholder="请输入你的招标详细信息"></textarea>
|
||||
placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx;white-space: pre-line;"
|
||||
placeholder="餐厅发布信息:\n楼层:**,\n押金:**,\n房租:**,\n扣点:**,\n水电燃气费:**,\n公摊:**,"
|
||||
></textarea>
|
||||
</view>
|
||||
|
||||
<!-- 图片 -->
|
||||
<s-uploader ref="uploaderRef" v-model:url="state.formData.images" fileMediatype="image"
|
||||
limit="9" mode="grid" :imageStyles="{ width: '220rpx', height: '220rpx'}"></s-uploader>
|
||||
@ -634,7 +634,7 @@
|
||||
return
|
||||
}
|
||||
if (form.value.address_detail == '') {
|
||||
sheep.$helper.toast('请输入详细地址');
|
||||
sheep.$helper.toast('请输入学校全名');
|
||||
// uni.showToast({
|
||||
// title: '请输入详细地址',
|
||||
// icon: 'none',
|
||||
@ -709,6 +709,7 @@
|
||||
icon: 'success'
|
||||
})
|
||||
agreeAdd.value = false;
|
||||
agreeShow.value = false;
|
||||
selectTagslist.value = []
|
||||
tagSelectedNum.value = 0;
|
||||
form.value = {
|
||||
@ -741,11 +742,11 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/myRelease/list'
|
||||
})
|
||||
},1000)
|
||||
}, 1000)
|
||||
// uni.switchTab({
|
||||
// url: '/pages/index/user'
|
||||
// })
|
||||
}else {
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg);
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
55
pages/canteenRent/lawNotice.vue
Normal file
55
pages/canteenRent/lawNotice.vue
Normal file
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<s-layout title="法律声明">
|
||||
<view style="padding: 30rpx;">
|
||||
<rich-text style="text-align: justify;" :nodes="legal_notice_agreement"></rich-text>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import rent from '../../sheep/api/rent';
|
||||
|
||||
const rentId = ref('');
|
||||
const legal_notice_agreement = ref('');
|
||||
|
||||
onLoad((options) => {
|
||||
console.log('options', options.id);
|
||||
if (options.id) {
|
||||
rentId.value = options.id;
|
||||
getDetail();
|
||||
}
|
||||
})
|
||||
|
||||
function getDetail() {
|
||||
sheep.$api.rent.rentInfo(rentId.value).then((res) => {
|
||||
console.log('获取招租详情', res);
|
||||
if (res.code == 1) {
|
||||
legal_notice_agreement.value = res.data.detail.legal_notice_agreement;
|
||||
console.log(' legal_notice_agreement', legal_notice_agreement.value);
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg);
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none'
|
||||
// })
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log('error: ', error);
|
||||
// 'error: ',
|
||||
// error;
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
@ -80,6 +80,23 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 重要提示 -->
|
||||
<view class="lawBox">
|
||||
<view class="importTitle">
|
||||
<image src="https://jiangxiaoxian.0rui.cn/lawImage.png" style="width: 50rpx;height: 50rpx;border-radius: 116rpx;" mode=""></image>
|
||||
<view style="font-weight: bold;font-size: 36rpx;line-height: 38rpx;color: #3d3d3d;margin-left: 20rpx;">重要提醒</view>
|
||||
</view>
|
||||
<view class="importText">
|
||||
<view class="textLaw">
|
||||
1.请再次阅读团餐宝典
|
||||
<view class="lawPage" @click="toPage(`/pages/canteenRent/lawNotice?id=` + detailRent.id )">《法律声明》</view>
|
||||
</view>
|
||||
<view class="textNotice">2.练习时请说明是在团餐宝典看到的</view>
|
||||
<view class="textNotice">3.不要轻信先付款再带你去看餐厅档口信息,以免上当受骗</view>
|
||||
<view class="textNotice">4.本文系作者授权发表。如需转载请联系团餐宝典平台</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;height: 248rpx;"></view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
@ -564,6 +581,48 @@
|
||||
|
||||
}
|
||||
|
||||
.lawBox {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.importTitle {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.importText {
|
||||
margin-top: 23rpx;
|
||||
width: 690rpx;
|
||||
|
||||
.textLaw {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #3d3d3d;
|
||||
line-height: 42rpx;
|
||||
|
||||
.lawPage {
|
||||
color: #ff6200;
|
||||
}
|
||||
}
|
||||
|
||||
.textNotice {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #3d3d3d;
|
||||
line-height: 42rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer-box {
|
||||
width: 100%;
|
||||
height: 100rpx auto;
|
||||
|
@ -31,12 +31,12 @@
|
||||
|
||||
<view class="row " style="">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
详细地址
|
||||
学校名
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;height: 80rpx;">
|
||||
<textarea v-model="form.address_detail" style="height: 80rpx;width: 100%;"
|
||||
maxlength="400" placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx"
|
||||
placeholder="请输入详细地址"></textarea>
|
||||
placeholder="请输入学校全名"></textarea>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@ -44,10 +44,10 @@
|
||||
|
||||
<view class="row flex align-items" style="padding: 0 30rpx;">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
联系人
|
||||
经理
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="text" placeholder="请输入联系人" class="input" v-model="form.contacts"
|
||||
<input type="text" placeholder="请输入经理名字" class="input" v-model="form.contacts"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -55,10 +55,10 @@
|
||||
|
||||
<view class="row flex align-items" style="padding: 0 30rpx;">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
联系电话
|
||||
经理电话
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="number" placeholder="请输入联系电话" class="input" v-model="form.contact_number"
|
||||
<input type="number" placeholder="请输入经理电话" class="input" v-model="form.contact_number"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -70,12 +70,12 @@
|
||||
style="margin-top: 20rpx;padding: 30rpx;">
|
||||
<view class="row align-items" style="">
|
||||
<view class="label flex align-items" style="width: auto;">
|
||||
详细信息
|
||||
餐厅信息
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;height: 120rpx;margin-bottom: 30rpx;">
|
||||
<textarea v-model="form.content" style="height: 120rpx;width: 100%;" maxlength="400"
|
||||
placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx"
|
||||
placeholder="请输入你的招标详细信息"></textarea>
|
||||
placeholder="餐厅发布信息:\n楼层:**,\n押金:**,\n房租:**,\n扣点:**,\n水电燃气费:**,\n公摊:**,"></textarea>
|
||||
</view>
|
||||
|
||||
<!-- 图片 :value="state.formData.images" @success="handleUploadSuccess" @del-file="handleDelFile"
|
||||
@ -616,7 +616,7 @@
|
||||
return
|
||||
}
|
||||
if (form.value.address_detail == '') {
|
||||
sheep.$helper.toast('请输入详细地址');
|
||||
sheep.$helper.toast('请输入学校全名');
|
||||
// uni.showToast({
|
||||
// title: '请输入详细地址',
|
||||
// icon: 'none',
|
||||
@ -624,7 +624,7 @@
|
||||
return
|
||||
}
|
||||
if (form.value.contacts == '') {
|
||||
sheep.$helper.toast('请输入联系人');
|
||||
sheep.$helper.toast('请输入经理名字');
|
||||
// uni.showToast({
|
||||
// title: '请输入联系人',
|
||||
// icon: 'none',
|
||||
@ -632,7 +632,7 @@
|
||||
return
|
||||
}
|
||||
if (form.value.contact_number == '') {
|
||||
sheep.$helper.toast('请输入联系人电话');
|
||||
sheep.$helper.toast('请输入经理电话');
|
||||
// uni.showToast({
|
||||
// title: '请输入联系人电话',
|
||||
// icon: 'none',
|
||||
|
@ -17,7 +17,7 @@
|
||||
<view class="locTop-left-left" @click="state.showRegion = true">
|
||||
<view @click="state.showRegion = true"
|
||||
style="font-size: 28rpx;font-weight: 400;line-height: 32rpx;color: #999999;max-width: 140rpx;">
|
||||
{{state.model.city_name ? state.model.city_name:'全国' }}
|
||||
{{state.model.city_name ? state.model.city_name:'全部地区' }}
|
||||
</view>
|
||||
<image @click="state.showRegion = true"
|
||||
style="width: 27rpx;height: 27rpx;margin-left: 10rpx;"
|
||||
|
@ -182,7 +182,7 @@
|
||||
/* 使用券 */
|
||||
function toUseFull(item) {
|
||||
console.log('使用满减券', item);
|
||||
uni.navigateTo({
|
||||
uni.switchTab({
|
||||
url: '/pages/index/category'
|
||||
})
|
||||
}
|
||||
|
@ -62,11 +62,11 @@
|
||||
value: 'goods',
|
||||
to: 'detail-swiper-selector',
|
||||
},
|
||||
{
|
||||
label: '评价',
|
||||
value: 'comment',
|
||||
to: 'detail-comment-selector',
|
||||
},
|
||||
// {
|
||||
// label: '评价',
|
||||
// value: 'comment',
|
||||
// to: 'detail-comment-selector',
|
||||
// },
|
||||
{
|
||||
label: '详情',
|
||||
value: 'detail',
|
||||
@ -150,30 +150,34 @@
|
||||
.icon-box {
|
||||
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
|
||||
border-radius: 30rpx;
|
||||
width: 134rpx;
|
||||
height: 56rpx;
|
||||
width: 150rpx;
|
||||
height: 64rpx;
|
||||
// width: 134rpx;
|
||||
// height: 56rpx;
|
||||
margin-left: 8rpx;
|
||||
border: 1px solid rgba(#fff, 0.4);
|
||||
.line {
|
||||
width: 2rpx;
|
||||
height: 24rpx;
|
||||
background: #e5e5e7;
|
||||
width: 3rpx;
|
||||
height: 30rpx;
|
||||
// height: 24rpx;
|
||||
// background: #e5e5e7;
|
||||
background-color: #000;
|
||||
}
|
||||
.sicon-back {
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.sicon-home {
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.sicon-more {
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.icon-button {
|
||||
width: 67rpx;
|
||||
height: 56rpx;
|
||||
height: 56rpx;s
|
||||
&-left:hover {
|
||||
background: rgba(0, 0, 0, 0.16);
|
||||
border-radius: 30rpx 0px 0px 30rpx;
|
||||
|
@ -1,417 +1,390 @@
|
||||
<template>
|
||||
<view>
|
||||
<s-layout :onShareAppMessage="shareInfo" navbar="goods">
|
||||
<!-- 标题栏 -->
|
||||
<detailNavbar />
|
||||
<view>
|
||||
<s-layout :onShareAppMessage="shareInfo" navbar="goods">
|
||||
<!-- 标题栏 -->
|
||||
<detailNavbar />
|
||||
|
||||
<!-- 骨架屏 -->
|
||||
<detailSkeleton v-if="state.skeletonLoading" />
|
||||
<!-- 下架/售罄提醒 -->
|
||||
<s-empty
|
||||
v-else-if="state.goodsInfo === null"
|
||||
text="商品不存在或已下架"
|
||||
icon="/static/soldout-empty.png"
|
||||
showAction
|
||||
actionText="再逛逛"
|
||||
actionUrl="/pages/goods/list"
|
||||
/>
|
||||
<block v-else>
|
||||
<view class="detail-swiper-selector">
|
||||
<!-- 商品轮播图 -->
|
||||
<su-swiper
|
||||
class="ss-m-b-14"
|
||||
isPreview
|
||||
:list="state.goodsSwiper"
|
||||
dotStyle="tag"
|
||||
imageMode="widthFix"
|
||||
dotCur="bg-mask-40"
|
||||
:seizeHeight="750"
|
||||
/>
|
||||
<!-- 骨架屏 -->
|
||||
<detailSkeleton v-if="state.skeletonLoading" />
|
||||
<!-- 下架/售罄提醒 -->
|
||||
<s-empty v-else-if="state.goodsInfo === null" text="商品不存在或已下架" icon="/static/soldout-empty.png" showAction
|
||||
actionText="再逛逛" actionUrl="/pages/goods/list" />
|
||||
<block v-else>
|
||||
<view class="detail-swiper-selector">
|
||||
<!-- 商品轮播图 -->
|
||||
<su-swiper class="ss-m-b-14" isPreview :list="state.goodsSwiper" dotStyle="tag" imageMode="widthFix"
|
||||
dotCur="bg-mask-40" :seizeHeight="750" />
|
||||
|
||||
<!-- 价格+标题 -->
|
||||
<view class="title-card detail-card ss-p-y-40 ss-p-x-20">
|
||||
<view class="ss-flex ss-row-between ss-col-center ss-m-b-26">
|
||||
<view class="price-box ss-flex ss-col-bottom">
|
||||
<view class="price-text ss-m-r-16">
|
||||
{{ state.selectedSkuPrice.price || formatPrice(state.goodsInfo.price) }}
|
||||
</view>
|
||||
<view class="origin-price-text" v-if="state.goodsInfo.original_price > 0">
|
||||
{{ state.selectedSkuPrice.original_price || state.goodsInfo.original_price }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="sales-text">
|
||||
{{ formatSales(state.goodsInfo.sales_show_type, state.goodsInfo.sales) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="discounts-box ss-flex ss-row-between ss-m-b-28">
|
||||
<div class="tag-content">
|
||||
<view class="tag-box ss-flex">
|
||||
<view
|
||||
class="tag ss-m-r-10"
|
||||
v-for="promos in state.goodsInfo.promos"
|
||||
:key="promos.id"
|
||||
@tap="onActivity"
|
||||
>
|
||||
{{ promos.title }}
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
<!-- 价格+标题 -->
|
||||
<view class="title-card detail-card ss-p-y-40 ss-p-x-20">
|
||||
<view class="ss-flex ss-row-between ss-col-center ss-m-b-26">
|
||||
<view class="price-box ss-flex ss-col-bottom">
|
||||
<view class="price-text ss-m-r-16">
|
||||
{{ state.selectedSkuPrice.price || formatPrice(state.goodsInfo.price) }}
|
||||
</view>
|
||||
<view class="origin-price-text" v-if="state.goodsInfo.original_price > 0">
|
||||
{{ state.selectedSkuPrice.original_price || state.goodsInfo.original_price }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="sales-text">
|
||||
{{ formatSales(state.goodsInfo.sales_show_type, state.goodsInfo.sales) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="discounts-box ss-flex ss-row-between ss-m-b-28">
|
||||
<div class="tag-content">
|
||||
<view class="tag-box ss-flex">
|
||||
<view class="tag ss-m-r-10" v-for="promos in state.goodsInfo.promos"
|
||||
:key="promos.id" @tap="onActivity">
|
||||
{{ promos.title }}
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
|
||||
<view
|
||||
class="get-coupon-box ss-flex ss-col-center ss-m-l-20"
|
||||
@tap="state.showModel = true"
|
||||
v-if="state.couponInfo.length"
|
||||
>
|
||||
<view class="discounts-title ss-m-r-8">领券</view>
|
||||
<text class="cicon-forward"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-text ss-line-2 ss-m-b-6">{{ state.goodsInfo.title }}</view>
|
||||
<view class="subtitle-text ss-line-1">{{ state.goodsInfo.subtitle }}</view>
|
||||
</view>
|
||||
<view class="get-coupon-box ss-flex ss-col-center ss-m-l-20" @tap="state.showModel = true"
|
||||
v-if="state.couponInfo.length">
|
||||
<view class="discounts-title ss-m-r-8">领券</view>
|
||||
<text class="cicon-forward"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title-text ss-line-2 ss-m-b-6">{{ state.goodsInfo.title }}</view>
|
||||
<view class="subtitle-text ss-line-1">{{ state.goodsInfo.subtitle }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能卡片 -->
|
||||
<view class="detail-cell-card detail-card ss-flex-col">
|
||||
<detail-cell-sku
|
||||
v-model="state.selectedSkuPrice.goods_sku_text"
|
||||
:skus="state.goodsInfo.skus"
|
||||
@tap="state.showSelectSku = true"
|
||||
/>
|
||||
<detail-cell-service v-if="state.goodsInfo.service" v-model="state.goodsInfo.service" />
|
||||
<detail-cell-params v-if="state.goodsInfo.params" v-model="state.goodsInfo.params" />
|
||||
</view>
|
||||
<!-- 功能卡片 -->
|
||||
<view class="detail-cell-card detail-card ss-flex-col">
|
||||
<detail-cell-sku v-model="state.selectedSkuPrice.goods_sku_text" :skus="state.goodsInfo.skus"
|
||||
@tap="state.showSelectSku = true" />
|
||||
<!-- <detail-cell-service v-if="state.goodsInfo.service" v-model="state.goodsInfo.service" /> -->
|
||||
<detail-cell-params v-if="state.goodsInfo.params" v-model="state.goodsInfo.params" />
|
||||
</view>
|
||||
|
||||
<!-- 规格与数量弹框 -->
|
||||
<s-select-sku
|
||||
:goodsInfo="state.goodsInfo"
|
||||
:show="state.showSelectSku"
|
||||
@addCart="onAddCart"
|
||||
@buy="onBuy"
|
||||
@change="onSkuChange"
|
||||
@close="state.showSelectSku = false"
|
||||
/>
|
||||
</view>
|
||||
<!-- 规格与数量弹框 -->
|
||||
<s-select-sku :goodsInfo="state.goodsInfo" :show="state.showSelectSku" @addCart="onAddCart"
|
||||
@buy="onBuy" @change="onSkuChange" @close="state.showSelectSku = false" />
|
||||
</view>
|
||||
|
||||
<!-- 评价 -->
|
||||
<detail-comment-card class="detail-comment-selector" :goodsId="state.goodsId" />
|
||||
<!-- 详情 -->
|
||||
<detail-content-card class="detail-content-selector" :content="state.goodsInfo.content" />
|
||||
<!-- 评价 -->
|
||||
<!-- <detail-comment-card class="detail-comment-selector" :goodsId="state.goodsId" /> -->
|
||||
<!-- 详情 -->
|
||||
<detail-content-card class="detail-content-selector" :content="state.goodsInfo.content" />
|
||||
|
||||
<!-- 活动跳转 -->
|
||||
<detail-activity-tip
|
||||
v-if="state.goodsInfo.activities"
|
||||
:data="state.goodsInfo"
|
||||
></detail-activity-tip>
|
||||
<view style="width: 100%;height: 100rpx;"></view>
|
||||
|
||||
<!-- 详情tabbar -->
|
||||
<detail-tabbar v-model="state.goodsInfo">
|
||||
<!-- TODO: 缺货中 已售罄 判断 设计-->
|
||||
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-if="state.goodsInfo.stock > 0">
|
||||
<button
|
||||
class="ss-reset-button add-btn ui-Shadow-Main"
|
||||
@tap="state.showSelectSku = true"
|
||||
>
|
||||
加入购物车
|
||||
</button>
|
||||
<button
|
||||
class="ss-reset-button buy-btn ui-Shadow-Main"
|
||||
@tap="state.showSelectSku = true"
|
||||
>
|
||||
立即购买
|
||||
</button>
|
||||
</view>
|
||||
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-else>
|
||||
<button class="ss-reset-button disabled-btn" disabled> 已售罄 </button>
|
||||
</view>
|
||||
</detail-tabbar>
|
||||
<s-coupon-get
|
||||
v-model="state.couponInfo"
|
||||
:show="state.showModel"
|
||||
@close="state.showModel = false"
|
||||
@get="onGet"
|
||||
/>
|
||||
<s-activity-pop
|
||||
v-model="state.activityInfo"
|
||||
:show="state.showActivityModel"
|
||||
@close="state.showActivityModel = false"
|
||||
/>
|
||||
</block>
|
||||
</s-layout>
|
||||
</view>
|
||||
<!-- 活动跳转 -->
|
||||
<detail-activity-tip v-if="state.goodsInfo.activities" :data="state.goodsInfo"></detail-activity-tip>
|
||||
|
||||
<!-- 详情tabbar -->
|
||||
<detail-tabbar v-model="state.goodsInfo">
|
||||
<!-- TODO: 缺货中 已售罄 判断 设计-->
|
||||
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-if="state.goodsInfo.stock > 0">
|
||||
<button class="ss-reset-button add-btn ui-Shadow-Main" @tap="state.showSelectSku = true">
|
||||
加入购物车
|
||||
</button>
|
||||
<button class="ss-reset-button buy-btn ui-Shadow-Main" @tap="state.showSelectSku = true">
|
||||
立即购买
|
||||
</button>
|
||||
</view>
|
||||
<view class="buy-box ss-flex ss-col-center ss-p-r-20" v-else>
|
||||
<button class="ss-reset-button disabled-btn" disabled> 已售罄 </button>
|
||||
</view>
|
||||
</detail-tabbar>
|
||||
<s-coupon-get v-model="state.couponInfo" :show="state.showModel" @close="state.showModel = false"
|
||||
@get="onGet" />
|
||||
<s-activity-pop v-model="state.activityInfo" :show="state.showActivityModel"
|
||||
@close="state.showActivityModel = false" />
|
||||
</block>
|
||||
</s-layout>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, computed } from 'vue';
|
||||
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import { formatSales, formatGoodsSwiper, formatPrice } from '@/sheep/hooks/useGoods';
|
||||
import detailNavbar from './components/detail/detail-navbar.vue';
|
||||
import detailCellSku from './components/detail/detail-cell-sku.vue';
|
||||
import detailCellService from './components/detail/detail-cell-service.vue';
|
||||
import detailCellParams from './components/detail/detail-cell-params.vue';
|
||||
import detailTabbar from './components/detail/detail-tabbar.vue';
|
||||
import detailSkeleton from './components/detail/detail-skeleton.vue';
|
||||
import detailCommentCard from './components/detail/detail-comment-card.vue';
|
||||
import detailContentCard from './components/detail/detail-content-card.vue';
|
||||
import detailActivityTip from './components/detail/detail-activity-tip.vue';
|
||||
import { isEmpty } from 'lodash';
|
||||
import {
|
||||
reactive,
|
||||
computed
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onPageScroll
|
||||
} from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import {
|
||||
formatSales,
|
||||
formatGoodsSwiper,
|
||||
formatPrice
|
||||
} from '@/sheep/hooks/useGoods';
|
||||
import detailNavbar from './components/detail/detail-navbar.vue';
|
||||
import detailCellSku from './components/detail/detail-cell-sku.vue';
|
||||
import detailCellService from './components/detail/detail-cell-service.vue';
|
||||
import detailCellParams from './components/detail/detail-cell-params.vue';
|
||||
import detailTabbar from './components/detail/detail-tabbar.vue';
|
||||
import detailSkeleton from './components/detail/detail-skeleton.vue';
|
||||
import detailCommentCard from './components/detail/detail-comment-card.vue';
|
||||
import detailContentCard from './components/detail/detail-content-card.vue';
|
||||
import detailActivityTip from './components/detail/detail-activity-tip.vue';
|
||||
import {
|
||||
isEmpty
|
||||
} from 'lodash';
|
||||
|
||||
// import detailActivityTip from './components/detail/detail-activity-tip.vue';
|
||||
// import detailTab from './components/detail/detail-tab.vue';
|
||||
// import detailCoupon from './components/detail/detail-coupon.vue';
|
||||
onPageScroll(() => {});
|
||||
// import detailActivityTip from './components/detail/detail-activity-tip.vue';
|
||||
// import detailTab from './components/detail/detail-tab.vue';
|
||||
// import detailCoupon from './components/detail/detail-coupon.vue';
|
||||
onPageScroll(() => {});
|
||||
|
||||
const state = reactive({
|
||||
goodsId: 0,
|
||||
skeletonLoading: true,
|
||||
goodsInfo: {},
|
||||
showSelectSku: false,
|
||||
goodsSwiper: [],
|
||||
selectedSkuPrice: {},
|
||||
showModel: false,
|
||||
total: 0,
|
||||
couponInfo: [],
|
||||
showActivityModel: false,
|
||||
activityInfo: [],
|
||||
});
|
||||
const state = reactive({
|
||||
goodsId: 0,
|
||||
skeletonLoading: true,
|
||||
goodsInfo: {},
|
||||
showSelectSku: false,
|
||||
goodsSwiper: [],
|
||||
selectedSkuPrice: {},
|
||||
showModel: false,
|
||||
total: 0,
|
||||
couponInfo: [],
|
||||
showActivityModel: false,
|
||||
activityInfo: [],
|
||||
});
|
||||
|
||||
// 规格变更
|
||||
function onSkuChange(e) {
|
||||
state.selectedSkuPrice = e;
|
||||
}
|
||||
// 规格变更
|
||||
function onSkuChange(e) {
|
||||
state.selectedSkuPrice = e;
|
||||
}
|
||||
|
||||
// 添加购物车
|
||||
function onAddCart(e) {
|
||||
sheep.$store('cart').add(e);
|
||||
}
|
||||
// 添加购物车
|
||||
function onAddCart(e) {
|
||||
sheep.$store('cart').add(e);
|
||||
}
|
||||
|
||||
// 立即购买
|
||||
function onBuy(e) {
|
||||
sheep.$router.go('/pages/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
order_type: 'goods',
|
||||
goods_list: [
|
||||
{
|
||||
goods_id: e.goods_id,
|
||||
goods_num: e.goods_num,
|
||||
goods_sku_price_id: e.id,
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
}
|
||||
//营销活动
|
||||
function onActivity() {
|
||||
state.activityInfo = state.goodsInfo.promos;
|
||||
state.showActivityModel = true;
|
||||
}
|
||||
// 立即购买
|
||||
function onBuy(e) {
|
||||
sheep.$router.go('/pages/order/confirm', {
|
||||
data: JSON.stringify({
|
||||
order_type: 'goods',
|
||||
goods_list: [{
|
||||
goods_id: e.goods_id,
|
||||
goods_num: e.goods_num,
|
||||
goods_sku_price_id: e.id,
|
||||
}, ],
|
||||
}),
|
||||
});
|
||||
}
|
||||
//营销活动
|
||||
function onActivity() {
|
||||
state.activityInfo = state.goodsInfo.promos;
|
||||
state.showActivityModel = true;
|
||||
}
|
||||
|
||||
//立即领取
|
||||
async function onGet(id) {
|
||||
const { code, msg } = await sheep.$api.coupon.get(id);
|
||||
if (code === 1) {
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
});
|
||||
setTimeout(() => {
|
||||
getCoupon();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
//立即领取
|
||||
async function onGet(id) {
|
||||
const {
|
||||
code,
|
||||
msg
|
||||
} = await sheep.$api.coupon.get(id);
|
||||
if (code === 1) {
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
});
|
||||
setTimeout(() => {
|
||||
getCoupon();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
const shareInfo = computed(() => {
|
||||
if (isEmpty(state.goodsInfo)) return {};
|
||||
return sheep.$platform.share.getShareInfo(
|
||||
{
|
||||
title: state.goodsInfo.title,
|
||||
image: sheep.$url.cdn(state.goodsInfo.image),
|
||||
desc: state.goodsInfo.subtitle,
|
||||
params: {
|
||||
page: '2',
|
||||
query: state.goodsInfo.id,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'goods', // 商品海报
|
||||
title: state.goodsInfo.title, // 商品标题
|
||||
image: sheep.$url.cdn(state.goodsInfo.image), // 商品主图
|
||||
price: state.goodsInfo.price[0], // 商品价格
|
||||
original_price: state.goodsInfo.original_price, // 商品原价
|
||||
},
|
||||
);
|
||||
});
|
||||
const shareInfo = computed(() => {
|
||||
if (isEmpty(state.goodsInfo)) return {};
|
||||
return sheep.$platform.share.getShareInfo({
|
||||
title: state.goodsInfo.title,
|
||||
image: sheep.$url.cdn(state.goodsInfo.image),
|
||||
desc: state.goodsInfo.subtitle,
|
||||
params: {
|
||||
page: '2',
|
||||
query: state.goodsInfo.id,
|
||||
},
|
||||
}, {
|
||||
type: 'goods', // 商品海报
|
||||
title: state.goodsInfo.title, // 商品标题
|
||||
image: sheep.$url.cdn(state.goodsInfo.image), // 商品主图
|
||||
price: state.goodsInfo.price[0], // 商品价格
|
||||
original_price: state.goodsInfo.original_price, // 商品原价
|
||||
}, );
|
||||
});
|
||||
|
||||
onLoad(async (options) => {
|
||||
// 非法参数
|
||||
if (!options.id) {
|
||||
state.goodsInfo = null;
|
||||
return;
|
||||
}
|
||||
state.goodsId = options.id;
|
||||
// 加载商品信息
|
||||
sheep.$api.goods.detail(state.goodsId).then((res) => {
|
||||
state.skeletonLoading = false;
|
||||
if (res.code === 1) {
|
||||
state.goodsInfo = res.data;
|
||||
state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.images);
|
||||
} else {
|
||||
// 未找到商品
|
||||
state.goodsInfo = null;
|
||||
}
|
||||
});
|
||||
const { code, data } = await sheep.$api.coupon.listByGoods(state.goodsId);
|
||||
if (code === 1) {
|
||||
state.couponInfo = data;
|
||||
}
|
||||
});
|
||||
onLoad(async (options) => {
|
||||
// 非法参数
|
||||
if (!options.id) {
|
||||
state.goodsInfo = null;
|
||||
return;
|
||||
}
|
||||
state.goodsId = options.id;
|
||||
// 加载商品信息
|
||||
sheep.$api.goods.detail(state.goodsId).then((res) => {
|
||||
state.skeletonLoading = false;
|
||||
if (res.code === 1) {
|
||||
state.goodsInfo = res.data;
|
||||
state.goodsSwiper = formatGoodsSwiper(state.goodsInfo.images);
|
||||
} else {
|
||||
// 未找到商品
|
||||
state.goodsInfo = null;
|
||||
}
|
||||
});
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await sheep.$api.coupon.listByGoods(state.goodsId);
|
||||
if (code === 1) {
|
||||
state.couponInfo = data;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-card {
|
||||
background-color: #ffff;
|
||||
margin: 14rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 价格标题卡片
|
||||
.title-card {
|
||||
.price-box {
|
||||
.price-text {
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
color: #ff3000;
|
||||
line-height: 30rpx;
|
||||
font-family: OPPOSANS;
|
||||
.detail-card {
|
||||
background-color: #ffff;
|
||||
margin: 14rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '¥';
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
// 价格标题卡片
|
||||
.title-card {
|
||||
.price-box {
|
||||
.price-text {
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
color: #ff3000;
|
||||
line-height: 30rpx;
|
||||
font-family: OPPOSANS;
|
||||
|
||||
.origin-price-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
color: $gray-c;
|
||||
font-family: OPPOSANS;
|
||||
&::before {
|
||||
content: '¥';
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '¥';
|
||||
}
|
||||
}
|
||||
}
|
||||
.origin-price-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
text-decoration: line-through;
|
||||
color: $gray-c;
|
||||
font-family: OPPOSANS;
|
||||
|
||||
.sales-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: $gray-c;
|
||||
}
|
||||
&::before {
|
||||
content: '¥';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.discounts-box {
|
||||
.tag-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.sales-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: $gray-c;
|
||||
}
|
||||
|
||||
.tag-box {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.discounts-box {
|
||||
.tag-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tag {
|
||||
flex-shrink: 0;
|
||||
padding: 4rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 4rpx;
|
||||
color: var(--ui-BG-Main);
|
||||
background: var(--ui-BG-Main-tag);
|
||||
}
|
||||
.tag-box {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.discounts-title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: var(--ui-BG-Main);
|
||||
line-height: normal;
|
||||
}
|
||||
.tag {
|
||||
flex-shrink: 0;
|
||||
padding: 4rpx 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 4rpx;
|
||||
color: var(--ui-BG-Main);
|
||||
background: var(--ui-BG-Main-tag);
|
||||
}
|
||||
|
||||
.cicon-forward {
|
||||
color: var(--ui-BG-Main);
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
.discounts-title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: var(--ui-BG-Main);
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
.cicon-forward {
|
||||
color: var(--ui-BG-Main);
|
||||
font-size: 24rpx;
|
||||
line-height: normal;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.subtitle-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: $dark-9;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
.title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
// 购买
|
||||
.buy-box {
|
||||
.add-btn {
|
||||
width: 214rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
border-radius: 40rpx 0 0 40rpx;
|
||||
background-color: var(--ui-BG-Main-light);
|
||||
color: var(--ui-BG-Main);
|
||||
}
|
||||
.subtitle-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: $dark-9;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.buy-btn {
|
||||
width: 214rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
// 购买
|
||||
.buy-box {
|
||||
.add-btn {
|
||||
// width: 214rpx;
|
||||
width: 312rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
border-radius: 40rpx 0 0 40rpx;
|
||||
background-color: var(--ui-BG-Main-light);
|
||||
color: var(--ui-BG-Main);
|
||||
}
|
||||
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
color: $white;
|
||||
}
|
||||
.buy-btn {
|
||||
// width: 214rpx;
|
||||
width: 312rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
||||
.disabled-btn {
|
||||
width: 428rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
color: $white;
|
||||
}
|
||||
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
.disabled-btn {
|
||||
width: 428rpx;
|
||||
height: 72rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
||||
.model-box {
|
||||
height: 60vh;
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.model-content {
|
||||
height: 56vh;
|
||||
}
|
||||
.model-box {
|
||||
height: 60vh;
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
.model-content {
|
||||
height: 56vh;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- tabbar="/pages/index/category" -->
|
||||
<s-layout title="分类" :bgStyle="{ color: '#fff' }">
|
||||
<s-layout title="分类" tabbar="/pages/index/category" :bgStyle="{ color: '#fff' }">
|
||||
<view class="s-category">
|
||||
<view class="three-level-wrap ss-flex ss-col-top">
|
||||
<view class="side-menu-wrap" :style="[{ top: Number(statusBarHeight + 88) + 'rpx' }]">
|
||||
@ -271,7 +271,7 @@
|
||||
.car-show {
|
||||
height: 80rpx;
|
||||
position: fixed;
|
||||
bottom: 150rpx;
|
||||
bottom: 200rpx;
|
||||
right: 0;
|
||||
|
||||
.car-image {
|
||||
|
@ -2,65 +2,62 @@
|
||||
<view v-if="template">
|
||||
<s-layout title="首页" navbar="custom" tabbar="/pages/index/index" :bgStyle="template.style?.background"
|
||||
:navbarStyle="template.style?.navbar" onShareAppMessage :showFloatButton="true" bgColor="#fcc74e">
|
||||
<view class="container">
|
||||
<!-- 顶部 -->
|
||||
<view class="top">
|
||||
<!-- 顶部-地址&搜索 -->
|
||||
<view class="locTop">
|
||||
<view class="locTop-left" @click="state.showRegion = true">
|
||||
<image style="width: 34rpx;height: 34rpx;"
|
||||
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: 230rpx;">
|
||||
{{state.model.city_name ? proCity:'全国' }}
|
||||
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
|
||||
@refresherrefresh="onS" scroll-y="true" class="scrollBox align-items"
|
||||
style="height: 84vh;box-sizing: border-box;">
|
||||
<view class="container">
|
||||
<!-- 顶部 -->
|
||||
<view class="top">
|
||||
<!-- 顶部-地址&搜索 -->
|
||||
<view class="locTop">
|
||||
<view class="locTop-left" @click="toPage('/packageA/search/index')">
|
||||
<uni-section style="border-radius: 192rpx;padding: 0;width: 430rpx;height: 70rpx;"
|
||||
type="line">
|
||||
<uni-search-bar style="border-radius: 192rpx;" radius="23" placeholder="搜索您需要的信息"
|
||||
bgColor="#ffffff" clearButton="none" cancelButton="none" :readonly="true" />
|
||||
</uni-section>
|
||||
</view>
|
||||
<view class="locTop-right" @click="toPage('/pages/canteenRent/fabu')">
|
||||
发布档口信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="locTop-right" @click="toPage('/packageA/search/index')">
|
||||
<uni-section style="border-radius: 192rpx;padding: 0;" type="line">
|
||||
<uni-search-bar style="border-radius: 192rpx;" radius="23" placeholder="搜索您需要的信息"
|
||||
bgColor="#ffffff" clearButton="none" cancelButton="none"
|
||||
:readonly="true" />
|
||||
</uni-section>
|
||||
<!-- @confirm="search"-->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 顶部-三个内容跳转 -->
|
||||
<view class="navTop">
|
||||
<view class="navTop-left" @click="toPage('/pages/canteenRent/rentList')">
|
||||
<view class="title" style="">食堂招租</view>
|
||||
<view class="intro" style="color: #f42b2b;margin-top: 20rpx;">味揽商机 食载未来</view>
|
||||
</view>
|
||||
<view class="navTop-right">
|
||||
<view class="navRight1" @click="toPage('/pages/school/schoolIndex')">
|
||||
<view class="title" style="">平台学院</view>
|
||||
<view class="intro" style="color: #05b0b0;margin-top: 20rpx;">学知赋能成长</view>
|
||||
<!-- 顶部-三个内容跳转 -->
|
||||
<view class="navTop">
|
||||
<view class="navTop-left" @click="toTabb('/pages/index/category')">
|
||||
<!-- <view class="title" style="">食堂招租</view>
|
||||
<view class="intro" style="color: #f42b2b;margin-top: 20rpx;">味揽商机 食载未来</view> -->
|
||||
</view>
|
||||
<view class="navRight2" @click="toPage('/pages/index/category')">
|
||||
<view class="title" style="">原料商城</view>
|
||||
<view class="intro" style="color: #f58f3d;margin-top: 20rpx;">优材好料直供</view>
|
||||
<view class="navTop-right">
|
||||
<view class="navRight1" @click="toPage('/pages/canteenRent/rentList')">
|
||||
<!-- <view class="title" style="">平台学院</view>
|
||||
<view class="intro" style="color: #05b0b0;margin-top: 20rpx;">学知赋能成长</view> -->
|
||||
</view>
|
||||
<view class="navRight2" @click="toPage('/pages/school/schoolIndex')">
|
||||
<!-- <view class="title" style="">原料商城</view>
|
||||
<view class="intro" style="color: #f58f3d;margin-top: 20rpx;">优材好料直供</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 轮播图 -->
|
||||
<view class="swiper-box">
|
||||
<view class="swiper_s">
|
||||
<swiper class="swiper_s" :circular="true" :autoplay="true" indicator-active-color="#0DAE11"
|
||||
indicator-color="#ffffff" :indicator-dots="false" :current="swiperCurrent"
|
||||
@animationfinish="swiperChange">
|
||||
<!-- v-for="(item, index) in swiperList" :key="index" @click="openSwiper(item)"-->
|
||||
<swiper-item style="margin: 0 auto;" v-for="(item, index) in bannerList" :key="index" @click="swiperJump(item)">
|
||||
<view style="position: relative;width: 100%;height: 100%;">
|
||||
<!--<view class="fnon_tit"></view>
|
||||
</view>
|
||||
<!-- 轮播图 -->
|
||||
<view class="swiper-box">
|
||||
<view class="swiper_s">
|
||||
<swiper class="swiper_s" :circular="true" :autoplay="true" indicator-active-color="#0DAE11"
|
||||
indicator-color="#ffffff" :indicator-dots="false" :current="swiperCurrent"
|
||||
@animationfinish="swiperChange">
|
||||
<!-- v-for="(item, index) in swiperList" :key="index" @click="openSwiper(item)"-->
|
||||
<swiper-item style="margin: 0 auto;" v-for="(item, index) in bannerList" :key="index"
|
||||
@click="swiperJump(item)">
|
||||
<view style="position: relative;width: 100%;height: 100%;">
|
||||
<!--<view class="fnon_tit"></view>
|
||||
<view class="text">{{ item.title ? item.title : '' }}</view>
|
||||
@click="click(item.url)" 跳转活动链接 -->
|
||||
<image class="swiper-image" :src="item.image" mode="scaleToFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
<!-- <swiper-item style="margin: 0 auto;">
|
||||
<image class="swiper-image" :src="item.image" mode="scaleToFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
<!-- <swiper-item style="margin: 0 auto;">
|
||||
<view style="position: relative;width: 100%;height: 100%">
|
||||
<!--<view class="fnon_tit"></view>
|
||||
<view class="text">{{ item.title ? item.title : '' }}</view>
|
||||
@ -68,66 +65,84 @@
|
||||
<image class="swiper-image" src="/static/cart-empty.png" mode="scaleToFill" />
|
||||
</view>
|
||||
</swiper-item> -->
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 推荐列表 -->
|
||||
<view class="recommend-box">
|
||||
<!-- 推荐标题 -->
|
||||
<view class="recom-titleBox">
|
||||
<view style="font-size: 38rpx;line-height: 38rpx;font-weight: 800;color: #333333;">平台推荐</view>
|
||||
<view class="title-more" @click="toPage('/pages/canteenRent/rentList')">
|
||||
<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">查看更多
|
||||
</view>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-left: 20rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/nextMore.png" mode=""></image>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rrecommList" v-for="(item,index) in rentList" :key="index" @click="toPage(`/pages/canteenRent/rentDetail?id=` + item.id)">
|
||||
<view class="reListItem">
|
||||
<!-- 左侧图片 -->
|
||||
<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 class="recommend-box">
|
||||
<!-- 推荐标题 -->
|
||||
<view class="recom-titleBox">
|
||||
<view style="width: 60%;display: flex;justify-content: flex-start;align-items: center;">
|
||||
<view style="font-size: 38rpx;line-height: 38rpx;font-weight: 800;color: #333333;">餐厅推荐
|
||||
</view>
|
||||
<view class="cityBox" @click="state.showRegion = true">
|
||||
<view style="margin-right: 10rpx;font-size: 30rpx;font-weight: 800;line-height: 45rpx;
|
||||
white-space: nowrap;overflow: hidden;text-overflow: ellipsis;color: #999999;">
|
||||
{{ state.model.city_name ? state.model.city_name : '地区筛选'}}
|
||||
</view>
|
||||
<image style="width: 25rpx;height: 13rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/rentTriangle.png" mode=""></image>
|
||||
</view>
|
||||
</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 class="title-more" @click="toPage('/pages/canteenRent/rentList')">
|
||||
<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">查看更多
|
||||
</view>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-left: 20rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/nextMore.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
|
||||
<view class="rrecommList" v-for="(item,index) in rentList" :key="index"
|
||||
@click="toPage(`/pages/canteenRent/rentDetail?id=` + item.id)">
|
||||
<view class="reListItem">
|
||||
<!-- 左侧图片 -->
|
||||
<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]"
|
||||
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>
|
||||
</view>
|
||||
|
||||
<!-- <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 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>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="viewCan" style="width: 100%;height: 300rpx;"></view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
<!-- 省市区弹窗 -->
|
||||
@ -161,33 +176,33 @@
|
||||
|
||||
|
||||
function getAreaCity() {
|
||||
// if (_.isEmpty(uni.getStorageSync('areaCity'))) {
|
||||
sheep.$api.rent.getCity().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('areaCity', res.data);
|
||||
}
|
||||
});
|
||||
// }
|
||||
// if (_.isEmpty(uni.getStorageSync('areaCity'))) {
|
||||
sheep.$api.rent.getCity().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('areaCity', res.data);
|
||||
}
|
||||
});
|
||||
// }
|
||||
};
|
||||
|
||||
function getTag() {
|
||||
// if (_.isEmpty(uni.getStorageSync('areaCity'))) {
|
||||
sheep.$api.rent.tagsList().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('tagList', res.data.list);
|
||||
}
|
||||
});
|
||||
// }
|
||||
// if (_.isEmpty(uni.getStorageSync('areaCity'))) {
|
||||
sheep.$api.rent.tagsList().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('tagList', res.data.list);
|
||||
}
|
||||
});
|
||||
// }
|
||||
};
|
||||
|
||||
function getType() {
|
||||
// if (_.isEmpty(uni.getStorageSync('areaCity'))) {
|
||||
sheep.$api.rent.listType().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('typeList', res.data);
|
||||
}
|
||||
});
|
||||
// }
|
||||
// if (_.isEmpty(uni.getStorageSync('areaCity'))) {
|
||||
sheep.$api.rent.listType().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('typeList', res.data);
|
||||
}
|
||||
});
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
@ -213,13 +228,13 @@
|
||||
});
|
||||
|
||||
const getAreaData = () => {
|
||||
if (_.isEmpty(uni.getStorageSync('areaData'))) {
|
||||
sheep.$api.data.area().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('areaData', res.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (_.isEmpty(uni.getStorageSync('areaData'))) {
|
||||
sheep.$api.data.area().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('areaData', res.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -234,9 +249,9 @@
|
||||
...e,
|
||||
};
|
||||
|
||||
if(state.model.province_name == state.model.city_name) {
|
||||
if (state.model.province_name == state.model.city_name) {
|
||||
proCity.value = state.model.province_name
|
||||
}else {
|
||||
} else {
|
||||
// proCity.value = state.model.province_name + " " + state.model.city_name
|
||||
proCity.value = state.model.province_name + state.model.city_name
|
||||
}
|
||||
@ -245,7 +260,9 @@
|
||||
|
||||
console.log('onRegionConfirm33', state.model, proCity.value);
|
||||
listQuery.value.province = state.model.province_id
|
||||
listQuery.value.city = state.model.city_id
|
||||
listQuery.value.city = state.model.city_id;
|
||||
listQuery.value.page = 1;
|
||||
rentList.value = [];
|
||||
getList()
|
||||
state.showRegion = false;
|
||||
};
|
||||
@ -301,21 +318,21 @@
|
||||
|
||||
//轮播图跳转
|
||||
function swiperJump(item) {
|
||||
console.log('轮播图跳转事件:',item.url);
|
||||
console.log('轮播图跳转事件:', item.url);
|
||||
const tabBarPages = [
|
||||
'/pages/index/index',
|
||||
'/pages/index/fabu',
|
||||
'/pages/index/user'
|
||||
];
|
||||
console.log('tabbarsList:',tabBarPages);
|
||||
if(item.type == "in") {
|
||||
'/pages/index/index',
|
||||
'/pages/index/category',
|
||||
'/pages/index/user'
|
||||
];
|
||||
console.log('tabbarsList:', tabBarPages);
|
||||
if (item.type == "in") {
|
||||
console.log('跳进内页');
|
||||
if(tabBarPages.includes(item.url)) {
|
||||
if (tabBarPages.includes(item.url)) {
|
||||
console.log('导航页');
|
||||
uni.switchTab({
|
||||
url: item.url,
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: item.url,
|
||||
})
|
||||
@ -329,6 +346,11 @@
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 800);
|
||||
rentList.value = [];
|
||||
state.model.city_name = '';
|
||||
state.model.province_name = '';
|
||||
state.currentCityIndex = [0, 0];
|
||||
getList();
|
||||
});
|
||||
|
||||
onPageScroll(() => {});
|
||||
@ -336,10 +358,10 @@
|
||||
const bannerList = ref([])
|
||||
async function getBanner() {
|
||||
const res = await sheep.$api.home.homeBanner({});
|
||||
console.log('banner',res);
|
||||
if(res.code == 1) {
|
||||
console.log('banner', res);
|
||||
if (res.code == 1) {
|
||||
bannerList.value = res.data.list
|
||||
console.log('bannerList',bannerList.value);
|
||||
console.log('bannerList', bannerList.value);
|
||||
}
|
||||
|
||||
}
|
||||
@ -367,13 +389,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
const rentList = ref([])
|
||||
const toTabb = (e) => {
|
||||
uni.switchTab({
|
||||
url: e,
|
||||
})
|
||||
}
|
||||
|
||||
const rentList = ref([]);
|
||||
const rentCount = ref(0);
|
||||
const homrS = ref(false)
|
||||
//招租列表
|
||||
async function getList() {
|
||||
const res = await sheep.$api.rent.rentlist({
|
||||
keywords: listQuery.value.keywords,
|
||||
page: listQuery.value.page,
|
||||
limit: 25,
|
||||
limit: 10,
|
||||
cate_ids: listQuery.value.cate_ids,
|
||||
order: 'normal',
|
||||
status: 1,
|
||||
@ -385,7 +415,10 @@
|
||||
console.log('getList', res);
|
||||
|
||||
if (res.data && res.data.list) {
|
||||
rentList.value = res.data.list;
|
||||
// rentList.value = res.data.list;
|
||||
// rentCount.value = res.data.count
|
||||
rentList.value = [...rentList.value, ...res.data.list];
|
||||
rentCount.value = res.data.count;
|
||||
|
||||
// Safely process each item
|
||||
rentList.value = rentList.value.map(item => {
|
||||
@ -413,6 +446,42 @@
|
||||
console.log('getList', rentList.value);
|
||||
}
|
||||
|
||||
//加载更多
|
||||
function onScrolltolower() {
|
||||
if (rentList.value.length < rentCount.value) {
|
||||
listQuery.value.page += 1;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
//下拉刷新
|
||||
function onS() {
|
||||
homrS.value = true
|
||||
listQuery.value.keywords = '';
|
||||
listQuery.value.cate_ids = '';
|
||||
listQuery.value.province = '';
|
||||
state.model.city_name = '';
|
||||
listQuery.value.city = '';
|
||||
state.currentCityIndex = [0, 0];
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
resetLists();
|
||||
|
||||
setTimeout(() => {
|
||||
homrS.value = false;
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh();
|
||||
}, 2000)
|
||||
}
|
||||
// 重置列表
|
||||
function resetLists() {
|
||||
// listQuery.value.keywords = ''
|
||||
console.log('listQuery.value.keywords', listQuery.value.keywords);
|
||||
listQuery.value.page = 1;
|
||||
rentList.value = [];
|
||||
getList();
|
||||
}
|
||||
|
||||
// 隐藏原生tabBar
|
||||
uni.hideTabBar({
|
||||
fail: () => {},
|
||||
@ -470,8 +539,22 @@
|
||||
line-height: 22rpx;
|
||||
}
|
||||
|
||||
.scrollBox {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
/* iOS 11.0 - 11.1 */
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
/* iOS 11.2+ */
|
||||
}
|
||||
|
||||
/* 对于没有安全区域的设备,设置默认值 */
|
||||
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
|
||||
.scrollBox {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
min-height: 90vh;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #f7f7f7;
|
||||
// display: grid;
|
||||
@ -482,7 +565,7 @@
|
||||
height: 520rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/topBack.png');
|
||||
background-size: 100%;
|
||||
padding: 30rpx 30rpx 30rpx 30rpx;
|
||||
padding: 30rpx;
|
||||
display: grid;
|
||||
|
||||
.locTop {
|
||||
@ -493,7 +576,8 @@
|
||||
// align-items: center;
|
||||
|
||||
.locTop-left {
|
||||
width: 250rpx;
|
||||
width: 430rpx;
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
@ -501,9 +585,18 @@
|
||||
}
|
||||
|
||||
.locTop-right {
|
||||
width: 410rpx;
|
||||
width: 203rpx;
|
||||
height: 70rpx;
|
||||
|
||||
background-color: #ff5900;
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
line-height: 42rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 104rpx;
|
||||
padding: 0rpx 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,38 +607,38 @@
|
||||
// align-items: center;
|
||||
|
||||
.navTop-left {
|
||||
width: 270rpx;
|
||||
height: 350rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/rent.png');
|
||||
background-size: 100%;
|
||||
width: 330rpx;
|
||||
height: 390rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/shoppingMall.png');
|
||||
background-size: 100% 100%;
|
||||
border-radius: 18rpx;
|
||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
// padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.navTop-right {
|
||||
display: grid;
|
||||
// display: grid;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 330rpx;
|
||||
|
||||
.navRight1 {
|
||||
width: 270rpx;
|
||||
height: 140rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/school.png');
|
||||
width: 330rpx;
|
||||
height: 180rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/rent.png');
|
||||
background-size: 100%;
|
||||
border-radius: 18rpx;
|
||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
// padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
}
|
||||
|
||||
.navRight2 {
|
||||
margin-top: 30rpx;
|
||||
width: 270rpx;
|
||||
height: 140rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/shoppingMall.png');
|
||||
width: 330rpx;
|
||||
height: 180rpx;
|
||||
background-image: url('https://jiangxiaoxian.0rui.cn/school.png');
|
||||
background-size: 100%;
|
||||
border-radius: 18rpx;
|
||||
padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
// padding: 40rpx 30rpx 0rpx 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -580,6 +673,7 @@
|
||||
.recommend-box {
|
||||
margin-top: 30rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
height: 900rpx;
|
||||
|
||||
.recom-titleBox {
|
||||
display: flex;
|
||||
@ -587,6 +681,18 @@
|
||||
align-items: center;
|
||||
width: 690rpx;
|
||||
|
||||
.cityBox {
|
||||
width: 222rpx;
|
||||
height: 60rpx;
|
||||
margin-left: 30rpx;
|
||||
border-radius: 132rpx 132rpx 132rpx 132rpx;
|
||||
border: 1rpx solid #999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.title-more {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -670,6 +776,9 @@
|
||||
|
||||
}
|
||||
|
||||
.viewCan {}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
@ -26,20 +26,14 @@
|
||||
<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" >已认证
|
||||
</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 "
|
||||
<image class="UnAuthenBox weight8 fs-20" v-if="authenInfo?.status == -1"
|
||||
src="https://jiangxiaoxian.0rui.cn/unAuthen.png" @click="toPage('/pages/user/authentication')"></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>
|
||||
<!-- <view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 && isLogin == true">未认证</view>
|
||||
<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 }}次
|
||||
@ -255,6 +249,7 @@
|
||||
const scrollHeight = ref()
|
||||
|
||||
onShow(() => {
|
||||
// console.log('onShow',authenInfo.value.status);
|
||||
isIos();
|
||||
sheep.$store('user').updateUserData();
|
||||
});
|
||||
|
@ -7,16 +7,16 @@
|
||||
|
||||
<view style="padding: 0 30rpx;width: 100%;">
|
||||
<view v-if="currentTab == 0">
|
||||
<image v-if="form.workimage != '' && form.status == 1" style="width: 690rpx;height: 350rpx;" :src="baseUrl + form.workimage" @click="afterRead"></image>
|
||||
<image v-if="form.workimage != '' && form.status == 1" style="width: 690rpx;height: 350rpx;" :src="baseUrl + form.workimage" @click="afterRead" mode="aspectFill"></image>
|
||||
<image v-else style="width: 690rpx;height: 350rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/manager.png" @click="afterRead"></image>
|
||||
src="https://jiangxiaoxian.0rui.cn/manager.png" @click="afterRead" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
||||
<view v-if="currentTab == 1">
|
||||
<image v-if="form.gateimage != '' && form.status == 2" style="width: 690rpx;height: 350rpx;"
|
||||
:src="baseUrl + form.gateimage" @click="afterRead"></image>
|
||||
:src="baseUrl + form.gateimage" @click="afterRead" mode="aspectFill"></image>
|
||||
<image v-else style="width: 690rpx;height: 350rpx;" @click="afterRead"
|
||||
src="https://jiangxiaoxian.0rui.cn/Merchant.png">
|
||||
src="https://jiangxiaoxian.0rui.cn/Merchant.png" mode="aspectFill">
|
||||
</image>
|
||||
|
||||
</view>
|
||||
|
@ -225,7 +225,7 @@
|
||||
const res = await sheep.$api.rent.rentlist({
|
||||
page: listQuery.value.page,
|
||||
limit: listQuery.value.limit,
|
||||
order: 'normal',
|
||||
order: 'new',
|
||||
status: listQuery.value.status,
|
||||
my: 1,
|
||||
});
|
||||
|
@ -161,24 +161,31 @@
|
||||
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08),
|
||||
0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
|
||||
border-radius: 30rpx;
|
||||
width: 134rpx;
|
||||
height: 56rpx;
|
||||
width: 150rpx;
|
||||
height: 64rpx;
|
||||
// width: 134rpx;
|
||||
// height: 56rpx;
|
||||
margin-left: 8rpx;
|
||||
.line {
|
||||
width: 2rpx;
|
||||
height: 24rpx;
|
||||
background: #e5e5e7;
|
||||
width: 4rpx;
|
||||
height: 30rpx;
|
||||
// height: 24rpx;
|
||||
// background: #e5e5e7;
|
||||
background-color: #000;
|
||||
}
|
||||
.sicon-back {
|
||||
font-size: 32rpx;
|
||||
// font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.sicon-home {
|
||||
font-size: 32rpx;
|
||||
// font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.sicon-more {
|
||||
font-size: 32rpx;
|
||||
// font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.icon-button {
|
||||
|
@ -47,6 +47,7 @@ const getShareInfo = (
|
||||
|
||||
// 配置转发参数
|
||||
if (shareConfig.methods.includes('forward')) {
|
||||
console.log('shareConfig');
|
||||
if (shareConfig.forwardInfo.title === '' || shareConfig.forwardInfo.image === '') {
|
||||
console.log('请在平台设置中配置转发信息');
|
||||
}
|
||||
@ -148,11 +149,13 @@ const decryptSpm = (spm) => {
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
shareParams.platform = platformMap[shareParamsArray[3] - 1];
|
||||
shareParams.from = fromMap[shareParamsArray[4] - 1];
|
||||
if (shareParams.shareId != 0) {
|
||||
// 已登录 立即添加分享记录
|
||||
if (user.isLogin) {
|
||||
console.log('已登录 立即添加分享记录前');
|
||||
user.addShareLog(shareParams);
|
||||
} else {
|
||||
// 未登录 待用户登录后添加分享记录
|
||||
|
@ -186,7 +186,7 @@
|
||||
},
|
||||
leftWidth: {
|
||||
type: [Number, String],
|
||||
default: 80,
|
||||
default: 86,
|
||||
},
|
||||
rightWidth: {
|
||||
type: [Number, String],
|
||||
@ -285,25 +285,31 @@
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
|
||||
border-radius: 30rpx;
|
||||
// width: 150rpx;
|
||||
height: 64rpx;
|
||||
width: 134rpx;
|
||||
height: 56rpx;
|
||||
// height: 56rpx;
|
||||
margin-left: 8rpx;
|
||||
.line {
|
||||
width: 2rpx;
|
||||
height: 24rpx;
|
||||
// background: #e5e5e7;
|
||||
background: #3d3d3d;
|
||||
width: 4rpx;
|
||||
height: 30rpx;
|
||||
// height: 24rpx;
|
||||
// background: #e5e5e7;
|
||||
background: #000;
|
||||
}
|
||||
.sicon-back {
|
||||
font-size: 32rpx;
|
||||
// font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
.sicon-home {
|
||||
font-size: 32rpx;
|
||||
// font-size: 32rpx;
|
||||
font-size: 34rpx;
|
||||
color: #000;
|
||||
}
|
||||
.sicon-more {
|
||||
font-size: 32rpx;
|
||||
// font-size: 32rpx;
|
||||
font-size: 34rpx;
|
||||
color: #000;
|
||||
}
|
||||
.icon-button {
|
||||
@ -401,6 +407,7 @@
|
||||
/* #endif */
|
||||
width: 120rpx;
|
||||
justify-content: flex-start;
|
||||
// justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
@ -89,12 +89,12 @@
|
||||
child: [{
|
||||
id: '',
|
||||
level: "city",
|
||||
name: "全国",
|
||||
name: "全部地区",
|
||||
pid: 0
|
||||
}], // 确保有默认的子项
|
||||
id: '',
|
||||
level: "province",
|
||||
name: "全国",
|
||||
name: "全部地区",
|
||||
pid: 0
|
||||
}]
|
||||
const areaData = proFirst.concat(uni.getStorageSync('areaCity'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user