Merge branch 'dev'
This commit is contained in:
@@ -291,3 +291,8 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
.ai-center {
|
||||
align-items: center;
|
||||
}
|
||||
.ql-editor.ql-blank::before {
|
||||
font-style: normal;
|
||||
font-size: 28rpx;
|
||||
color: #C2C5CC;
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<view class="cover-box-wrap">
|
||||
<view class="cover-box">
|
||||
<image
|
||||
:src="item.cover"
|
||||
class="cover"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<view class="my-mask">
|
||||
<image
|
||||
class="icon"
|
||||
:src="webUrl + '/20220510142728577618.png'"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<text>{{ item.cityName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more-t">{{ item.content }}</view>
|
||||
<view class="flex ai-center bottom">
|
||||
<image
|
||||
v-if="item.logo"
|
||||
:src="item.logo"
|
||||
class="logo"
|
||||
mode="scaleToFill"
|
||||
></image>
|
||||
<image
|
||||
v-else
|
||||
:src="webUrl + '/20230609145651814148.png'"
|
||||
class="logo"
|
||||
/>
|
||||
<text class="one-t">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'FunHotelItem',
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.cover-box-wrap {
|
||||
margin: 20rpx 0 0 0;
|
||||
.cover-box {
|
||||
position: relative;
|
||||
width: 328rpx;
|
||||
height: auto;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cover {
|
||||
width: 328rpx;
|
||||
height: 328rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.icon {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-top: -6rpx;
|
||||
margin-right: 6rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.logo {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
vertical-align: middle;
|
||||
margin: 0 8rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.item {
|
||||
width: 328rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.my-mask {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24rpx;
|
||||
background: linear-gradient(rgba(51, 51, 51, 0), rgba(0, 0, 0, 1));
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.more-t {
|
||||
margin: 10rpx;
|
||||
}
|
||||
.one-t {
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.bottom {
|
||||
margin: 0 0 20rpx 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+163
-189
@@ -1,117 +1,36 @@
|
||||
<script>
|
||||
import {getHotelList, getHotelTypeList} from "@/api/inn.js";
|
||||
import {getCurAddress, getLocation} from "@/utils/common";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
name: "",
|
||||
page: 1,
|
||||
typeList: [],
|
||||
typeIndex: 0,
|
||||
cityName: "",
|
||||
hotelList: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getMapData();
|
||||
getHotelTypeList().then(({data}) => {
|
||||
this.typeList = data;
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
let memCityName = uni.getStorageSync("cityName")
|
||||
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName;
|
||||
uni.removeStorageSync("cityName")
|
||||
this.search();
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.cityName) {
|
||||
return
|
||||
}
|
||||
this.page++;
|
||||
this.fetchList();
|
||||
},
|
||||
methods: {
|
||||
goCity() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
||||
})
|
||||
},
|
||||
|
||||
goInnDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}`
|
||||
})
|
||||
},
|
||||
|
||||
async getMapData() {
|
||||
const map = await getLocation();
|
||||
if (map.length > 1) {
|
||||
const {latitude, longitude} = map[1];
|
||||
const address = await getCurAddress(latitude, longitude);
|
||||
this.cityName = address[1].data.result.ad_info.city;
|
||||
this.search();
|
||||
}
|
||||
},
|
||||
|
||||
tapType(index) {
|
||||
if (this.typeIndex === index) return;
|
||||
this.typeIndex = index;
|
||||
this.search();
|
||||
},
|
||||
search() {
|
||||
this.page = 1;
|
||||
this.hotelList = [];
|
||||
this.fetchList();
|
||||
},
|
||||
fetchList() {
|
||||
let param = {
|
||||
page: this.page,
|
||||
type: this.typeList[this.typeIndex].id,
|
||||
cityName: this.cityName
|
||||
};
|
||||
let name = this.name.trim();
|
||||
if (name.length > 0) param.name = name;
|
||||
getHotelList(param).then(res => {
|
||||
if (res.status === 200) {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
res.data[i].hide = true;
|
||||
this.hotelList.push(res.data[i])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="have-fun">
|
||||
<!-- <u-navbar title="寻趣味" height="90rpx">-->
|
||||
<!-- <view slot="left"> </view>-->
|
||||
<!-- </u-navbar>-->
|
||||
<view class="top-box">
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input type="text" v-model="name" placeholder="搜索店铺" placeholder-style="color:#949494"
|
||||
@confirm="search">
|
||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill"
|
||||
@click="search"/>
|
||||
<input
|
||||
v-model="name"
|
||||
type="text"
|
||||
placeholder="搜索店铺"
|
||||
placeholder-style="color:#949494"
|
||||
@confirm="search"
|
||||
>
|
||||
<image
|
||||
class="icon"
|
||||
:src="webUrl+'/20220903142935869059.png'"
|
||||
mode="scaleToFill"
|
||||
@click="search"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<scroll-view class="type-box flex" scroll-x enable-flex>
|
||||
<view class="item flex-0 flex flex-col jc-center ai-center" :class="{'active':typeIndex===index}"
|
||||
v-for="(item,index) in typeList" :key="index" @click="tapType(index)">
|
||||
<view
|
||||
v-for="(item, index) in typeList"
|
||||
:key="index"
|
||||
:class="{
|
||||
'active': typeIndex === index
|
||||
}"
|
||||
class="item flex-0 flex flex-col jc-center ai-center"
|
||||
@click="tapType(index)"
|
||||
>
|
||||
<image :src="item.icon" mode="scaleToFill"/>
|
||||
<view class="name">{{ item.name }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view class="body">
|
||||
<view class="flex jc-end">
|
||||
<view class="city-box" @click="goCity('cloud')">
|
||||
@@ -119,41 +38,150 @@ export default {
|
||||
<text>{{ cityName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list" v-if="hotelList.length">
|
||||
<custom-waterfalls-flow :value="hotelList" imageKey="cover">
|
||||
<view
|
||||
v-for="(item,index) in hotelList"
|
||||
:key="index"
|
||||
class="item"
|
||||
@click="goInnDetail(item)"
|
||||
>
|
||||
<view class="cover-box">
|
||||
<image class="cover" :src="item.cover" mode="scaleToFill"></image>
|
||||
<view class="my-mask">
|
||||
<image class="icon" :src="webUrl+'/20220510142728577618.png'"
|
||||
mode="scaleToFill"></image>
|
||||
<text>{{ item.cityName }}</text>
|
||||
<view v-if="isLoad">
|
||||
<view v-if="hotelList.length > 0">
|
||||
<view class="list-wrapper">
|
||||
<view class="list">
|
||||
<view
|
||||
v-for="(item, index) in hotelEvenList"
|
||||
:key="index"
|
||||
class="item"
|
||||
@click="goInnDetail(item)"
|
||||
>
|
||||
<fun-hotel-item :item="item" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="more-t">{{ item.content }}</view>
|
||||
<view class="flex ai-center" style="margin-bottom: 18rpx;">
|
||||
<image class="logo" :src="item.logo" mode="scaleToFill" v-if="item.logo"></image>
|
||||
<image class="logo" :src="webUrl+'/20230609145651814148.png'" v-else/>
|
||||
<text class="one-t">{{ item.name }}</text>
|
||||
<view class="list">
|
||||
<view
|
||||
v-for="(item, index) in hotelOddList"
|
||||
:key="index"
|
||||
class="item"
|
||||
@click="goInnDetail(item)"
|
||||
>
|
||||
<fun-hotel-item :item="item" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</custom-waterfalls-flow>
|
||||
</view>
|
||||
|
||||
<view class="v4-nodata" v-else>
|
||||
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
||||
<view class="text">暂无数据</view>
|
||||
</view>
|
||||
<view class="v4-nodata" v-else>
|
||||
<image src="@/static/images/img_nodata.png" mode="scaleToFill"/>
|
||||
<view class="text">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<goo-skeleton v-else />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHotelList, getHotelTypeList } from "@/api/inn.js"
|
||||
import { getCurAddress, getLocation } from "@/utils/common"
|
||||
import GooSkeleton from '@/components/GooSkeleton/index.vue'
|
||||
import FunHotelItem from './components/HotelItem'
|
||||
export default {
|
||||
components: {
|
||||
GooSkeleton,
|
||||
FunHotelItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
name: '',
|
||||
page: 1,
|
||||
typeList: [],
|
||||
typeIndex: 0,
|
||||
cityName: '',
|
||||
hotelList: [],
|
||||
isLoad: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hotelOddList() {
|
||||
const arr = this.hotelList.filter(function(item, index) { return index % 2 === 1 })
|
||||
return arr
|
||||
},
|
||||
hotelEvenList() {
|
||||
const arr = this.hotelList.filter(function(item, index) { return index % 2 === 0 })
|
||||
return arr
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getMapData()
|
||||
getHotelTypeList().then(({data}) => {
|
||||
this.typeList = data;
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
const memCityName = uni.getStorageSync('cityName')
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName
|
||||
uni.removeStorageSync('cityName')
|
||||
this.search()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goCity() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
||||
})
|
||||
},
|
||||
goInnDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesInn/inn/innHome?id=${item.id}`
|
||||
})
|
||||
},
|
||||
async getMapData() {
|
||||
const map = await getLocation()
|
||||
if (map.length > 1) {
|
||||
const {latitude, longitude} = map[1]
|
||||
const address = await getCurAddress(latitude, longitude)
|
||||
this.cityName = address[1].data.result.ad_info.city
|
||||
this.search()
|
||||
}
|
||||
},
|
||||
tapType(index) {
|
||||
if (this.typeIndex === index) return
|
||||
this.typeIndex = index
|
||||
this.search()
|
||||
},
|
||||
search() {
|
||||
this.isLoad = false
|
||||
this.page = 1
|
||||
this.hotelList = []
|
||||
this.fetchList()
|
||||
},
|
||||
fetchList() {
|
||||
const param = {
|
||||
page: this.page,
|
||||
type: this.typeList[this.typeIndex].id,
|
||||
cityName: this.cityName
|
||||
}
|
||||
const name = this.name.trim()
|
||||
if (name.length > 0) {
|
||||
param.name = name
|
||||
}
|
||||
getHotelList(param).then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const cover = data[i].cover
|
||||
data[i].hide = true
|
||||
// 视频封面取第一帧图片
|
||||
if (data[i].coverType === 2) {
|
||||
data[i].videoCover = cover
|
||||
data[i].cover = (cover + '?vframe/jpg/offset/1')
|
||||
} else {
|
||||
data[i].videoCover = ''
|
||||
}
|
||||
this.hotelList.push(data[i])
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.isLoad = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.have-fun {
|
||||
//padding-top: 120rpx;
|
||||
@@ -240,70 +268,16 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.cover {
|
||||
.list-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.list {
|
||||
width: 328rpx;
|
||||
height: 328rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-top: -6rpx;
|
||||
margin-right: 6rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
vertical-align: middle;
|
||||
margin: 0 8rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 328rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.cover-box {
|
||||
position: relative;
|
||||
width: 328rpx;
|
||||
height: auto;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.my-mask {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24rpx;
|
||||
background: linear-gradient(rgba(51, 51, 51, 0), rgba(0, 0, 0, 1));
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.more-t {
|
||||
margin: 10rpx;
|
||||
}
|
||||
|
||||
.one-t {
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .waterfalls-flow-column .column-value {
|
||||
background-color: rgba(0, 0, 0, 0) !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -211,7 +211,9 @@
|
||||
<view class="msg_title">
|
||||
{{ unReadMessageInfo.noticeTitle }}
|
||||
</view>
|
||||
<view class="msg_content" v-html="unReadMessageInfo.noticeContent"></view>
|
||||
<view class="msg_content">
|
||||
<rich-text :nodes="unReadMessageInfo.noticeContent" />
|
||||
</view>
|
||||
<view class="msg_line"></view>
|
||||
<view class="msg_btn" @click="msgConfirm">我知道了</view>
|
||||
</view>
|
||||
|
||||
@@ -316,9 +316,10 @@ export default {
|
||||
},
|
||||
{
|
||||
text: '帮助中心',
|
||||
url: '/pages/user/Message/Message',
|
||||
url: '',
|
||||
icon: '/icon/icon-help.png',
|
||||
allowEnter: true
|
||||
allowEnter: true,
|
||||
showTip: true
|
||||
},
|
||||
{
|
||||
text: '设置中心',
|
||||
@@ -468,6 +469,12 @@ export default {
|
||||
},
|
||||
toolItemClickHandle(item) {
|
||||
const url = item.url
|
||||
if (item.showTip) {
|
||||
this.$dialog.toast({
|
||||
mes: '暂未开放'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!url || !item.allowEnter) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<template>
|
||||
<view class="container" :style="{height: height}">
|
||||
<editor
|
||||
ref="editot"
|
||||
id="editor"
|
||||
class="ql-container"
|
||||
:placeholder="placeholder"
|
||||
:show-img-size="true"
|
||||
:show-img-toolbar="true"
|
||||
:show-img-resize="true"
|
||||
:read-only="readOnly"
|
||||
placeholder-style="font-size:24rpx;color:#C2C5CC;"
|
||||
@ready="onEditorReady"
|
||||
id="editor"
|
||||
@statuschange="statuschange"
|
||||
@focus="editFocus"
|
||||
@blur="editBlur"
|
||||
ref="editot"
|
||||
></editor>
|
||||
<!-- 操作工具 -->
|
||||
<view class="tool-view" >
|
||||
@@ -36,7 +38,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="tool">
|
||||
<!-- <jinIcon class="single" type="" title="图片" @click="insertImage"></jinIcon> -->
|
||||
<jinIcon class="single" type="" title="图片" @click="insertImage"></jinIcon>
|
||||
<jinIcon class="single" type="" title="格式" @click="showMore" :color="showMoreTool ? activeColor : '#666666'"></jinIcon>
|
||||
<jinIcon class="single" type="" title="分割线" @click="insertDivider"></jinIcon>
|
||||
<jinIcon class="single" type="" title="撤回" @click="undo"></jinIcon>
|
||||
@@ -49,8 +51,15 @@
|
||||
|
||||
<script>
|
||||
import jinIcon from './jin-icons.vue';
|
||||
import {
|
||||
chooseImage
|
||||
} from '@/utils'
|
||||
export default {
|
||||
props: {
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 点击图片时显示图片大小控件
|
||||
showImgSize: {
|
||||
type: Boolean,
|
||||
@@ -127,14 +136,32 @@ export default {
|
||||
},res => {
|
||||
this.editorCtx = res.context;
|
||||
this.editorCtx.setContents({
|
||||
html: this.html
|
||||
html: this.html,
|
||||
success: () => {
|
||||
this.editorCtx.blur()
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 0
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
.exec();
|
||||
},
|
||||
undo() {
|
||||
this.editorCtx.undo();
|
||||
},
|
||||
insertImage() {
|
||||
const _this = this
|
||||
chooseImage((path) => {
|
||||
_this.editorCtx.insertImage({
|
||||
src: path,
|
||||
alt: '图片'
|
||||
})
|
||||
})
|
||||
},
|
||||
/// 插入分割线
|
||||
insertDivider() {
|
||||
this.editorCtx.insertDivider();
|
||||
@@ -238,7 +265,7 @@ export default {
|
||||
|
||||
.ql-container {
|
||||
line-height: 150%;
|
||||
font-size: 22rpx;
|
||||
font-size: 28rpx;
|
||||
width: 100%;
|
||||
height: 240px;
|
||||
background: #fff;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
fontSize: {
|
||||
type: String,
|
||||
default: '32rpx'
|
||||
default: '36rpx'
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
@@ -53,7 +53,7 @@
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 8px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
line-height: 8px;
|
||||
transform: translateY(-8px);
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<video
|
||||
:src="inn.cover"
|
||||
:autoplay="true"
|
||||
:controls="false"
|
||||
:loop="true"
|
||||
:controls="true"
|
||||
:loop="false"
|
||||
object-fit="contain"
|
||||
play-btn-position="center"
|
||||
class="video"
|
||||
@@ -257,10 +257,22 @@
|
||||
</view>
|
||||
<view class="flex">
|
||||
<image
|
||||
v-if="!item.zanVo"
|
||||
:src="webUrl + '/page/hotel/zan-off.png'"
|
||||
class="zan-off-icon"
|
||||
@click="likeInfoItemHandle(item, index, 1)"
|
||||
/>
|
||||
<image
|
||||
v-else
|
||||
:src="webUrl + '/page/hotel/zan-on.png'"
|
||||
class="zan-on-icon"
|
||||
@click="likeInfoItemHandle(item, index, 0)"
|
||||
/>
|
||||
<!-- <image
|
||||
:src="webUrl + '/20230803151302213857.png'"
|
||||
class="icon"
|
||||
/>
|
||||
<text class="seeNum-txt">{{ item.zan }}</text>
|
||||
<text class="seeNum-txt">{{ item.zan }}</text> -->
|
||||
</view>
|
||||
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
|
||||
<image
|
||||
@@ -408,7 +420,8 @@ import {
|
||||
getPoster,
|
||||
getHotelGoodList,
|
||||
postHotelNewsDel,
|
||||
setTopHotelNew
|
||||
setTopHotelNew,
|
||||
getHotelNewsZan
|
||||
} from "@/api/inn.js"
|
||||
import {formatDateTime} from "@/utils"
|
||||
import {getUrlParam} from "@/utils/common.js"
|
||||
@@ -465,7 +478,7 @@ export default {
|
||||
onPageScroll(e) {
|
||||
this.scrollData = e
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.id = options.id || null
|
||||
this.partnerId = options.partnerId || null
|
||||
@@ -493,7 +506,7 @@ export default {
|
||||
if (!this.isLoad) {
|
||||
return
|
||||
}
|
||||
if (this.inn.hasProduct <= 0) {
|
||||
if (this.inn.hasProduct > 0) {
|
||||
this.fetchGoods()
|
||||
}
|
||||
this.fetchInnInfoList()
|
||||
@@ -686,7 +699,6 @@ export default {
|
||||
if (data.hasProduct <= 0) {
|
||||
_this.activeIndex = 1
|
||||
_this.tabList[0].isShow = false
|
||||
_this.isLoadInfoListSuccess = true
|
||||
} else {
|
||||
_this.fetchGoods()
|
||||
}
|
||||
@@ -839,11 +851,26 @@ export default {
|
||||
this.$dialog.toast({
|
||||
mes: '操作成功!'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
}, 3000)
|
||||
this.fetchInnInfoList()
|
||||
}
|
||||
}).finally(() => {
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
likeInfoItemHandle(item, index, value) {
|
||||
getHotelNewsZan(item.id).then(res => {
|
||||
const { success } = res
|
||||
if (success) {
|
||||
this.$dialog.toast({
|
||||
mes: '操作成功!'
|
||||
})
|
||||
this.$set(this.infoArray[index], 'zanVo', value)
|
||||
// this.fetchInnInfoList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -853,6 +880,7 @@ export default {
|
||||
@import "@/assets/css/store.less";
|
||||
.my-inn-page {
|
||||
padding: 0 0 100rpx 0;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.cover-box {
|
||||
position: relative;
|
||||
@@ -1289,6 +1317,14 @@ export default {
|
||||
height: 32rpx;
|
||||
margin: 0 8rpx 0 0;
|
||||
}
|
||||
.zan-off-icon {
|
||||
width: 138rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.zan-on-icon {
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.more-btn {
|
||||
position: relative;
|
||||
.more-wrapper {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
'active': tabIndex === index
|
||||
}"
|
||||
@click="changeTab(index)"
|
||||
>{{item.label}}</text>
|
||||
>{{ item.label }}</text>
|
||||
</view>
|
||||
<form @submit="formSubmit">
|
||||
<view class="form-item">
|
||||
@@ -37,6 +37,7 @@
|
||||
:dataList="picsArray"
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="uploadMax"
|
||||
:upload_count="uploadCount"
|
||||
:url="uploadUrl"
|
||||
:type='uploadType'
|
||||
:header="uploadHeader"
|
||||
@@ -48,7 +49,7 @@
|
||||
<view class="inp">
|
||||
<jin-edit
|
||||
:html="form.content"
|
||||
placeholder="请输入内容"
|
||||
placeholder="请输入内容..."
|
||||
height="320px"
|
||||
@editOk="editOk"
|
||||
/>
|
||||
@@ -62,14 +63,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue';
|
||||
import jinEdit from '@/pagesInn/components/jin-edit/jin-edit.vue';
|
||||
import tmUpload from '@/pagesInn/components/tm-upload/tm-upload.vue'
|
||||
import jinEdit from '@/pagesInn/components/jin-edit/jin-edit.vue'
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
} from "@/config";
|
||||
} from '@/config'
|
||||
import {
|
||||
postHotelNewsAdd
|
||||
} from "@/api/inn.js";
|
||||
} from '@/api/inn.js'
|
||||
export default {
|
||||
components: {
|
||||
tmUpload,
|
||||
@@ -77,7 +78,6 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
uploadUrl: VUE_APP_API_URL + '/api/upload',
|
||||
uploadType: 'image',
|
||||
uploadCount: 9,
|
||||
@@ -88,19 +88,18 @@
|
||||
uploadedFilesArray: [],
|
||||
uploadMax:10,
|
||||
picsArray: [],
|
||||
showUpload:true,
|
||||
|
||||
showUpload: true,
|
||||
hotelId: 0,
|
||||
tabData: [{
|
||||
label: "图文动态",
|
||||
type: "NT_TEXT",
|
||||
uploadType: "image",
|
||||
label: '图文动态',
|
||||
type: 'NT_TEXT',
|
||||
uploadType: 'image',
|
||||
uploadCount: 9
|
||||
},
|
||||
{
|
||||
label: "视频动态",
|
||||
type: "NT_VIDEO",
|
||||
uploadType: "video",
|
||||
label: '视频动态',
|
||||
type: 'NT_VIDEO',
|
||||
uploadType: 'video',
|
||||
uploadCount: 1
|
||||
}
|
||||
],
|
||||
@@ -113,17 +112,16 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.hotelId = option.hotelId;
|
||||
this.hotelId = option.hotelId
|
||||
},
|
||||
methods: {
|
||||
changeTab(index) {
|
||||
this.tabIndex = index;
|
||||
this.showUpload = false;
|
||||
this.uploadType = this.tabData[index].uploadType;
|
||||
this.uploadCount = this.tabData[index].uploadCount;
|
||||
|
||||
this.tabIndex = index
|
||||
this.showUpload = false
|
||||
this.uploadType = this.tabData[index].uploadType
|
||||
this.uploadCount = this.tabData[index].uploadCount
|
||||
setTimeout(()=>{
|
||||
this.showUpload = true;
|
||||
this.showUpload = true
|
||||
},100)
|
||||
},
|
||||
editOk(res) {
|
||||
@@ -135,41 +133,41 @@
|
||||
},
|
||||
formSubmit(e) {
|
||||
if (!this.form.title) {
|
||||
this.$dialog.error("请输入动态标题");
|
||||
return;
|
||||
this.$dialog.error('请输入动态标题')
|
||||
return
|
||||
}
|
||||
if (!this.form.intro) {
|
||||
this.$dialog.error("请输入简介");
|
||||
return;
|
||||
this.$dialog.error('请输入简介')
|
||||
return
|
||||
}
|
||||
if (!this.form.content) {
|
||||
this.$dialog.error("请输入资讯详情");
|
||||
return;
|
||||
this.$dialog.error('请输入资讯详情')
|
||||
return
|
||||
}
|
||||
if (this.uploadedFilesArray.length == 0) {
|
||||
this.$dialog.error("请上传动态图片或视频");
|
||||
return;
|
||||
this.$dialog.error('请上传动态图片或视频')
|
||||
return
|
||||
}
|
||||
uni.showLoading();
|
||||
postHotelNewsAdd({
|
||||
hotelId: this.hotelId,
|
||||
name: this.form.title,
|
||||
intro: this.form.intro,
|
||||
content: this.form.content,
|
||||
content: this.form.content.replace(/\<img src/g, '<img style="display: block;max-width: 100%;" src'),
|
||||
type: this.uploadType === 'image' ? 'NT_TEXT' : 'NT_VIDEO',
|
||||
resources: this.uploadType === 'image' ? this.uploadedFilesArray : [],
|
||||
video: this.uploadType === 'image' ? '' : this.uploadedFilesArray[0]
|
||||
}).then(res => {
|
||||
uni.hideLoading();
|
||||
this.$dialog.toast({
|
||||
mes: "发布成功!"
|
||||
});
|
||||
mes: '发布成功!'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$yrouter.back();
|
||||
}, 1000);
|
||||
this.$yrouter.back()
|
||||
}, 3000)
|
||||
}).catch((err) => {
|
||||
uni.hideLoading();
|
||||
this.$dialog.error(err.msg);
|
||||
this.$dialog.error(err.msg)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -221,6 +219,7 @@
|
||||
padding: 10rpx 16rpx;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 6rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.inp-input {
|
||||
padding: 0 16rpx;
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getDetail, getPrize, takePrize} from "@/api/lottery";
|
||||
import gbroMarquee from "@/components/gbro-marquee/marquee.vue";
|
||||
import { getDetail, getPrize, takePrize } from '@/api/lottery'
|
||||
import gbroMarquee from '../components/gbro-marquee/marquee.vue'
|
||||
|
||||
export default {
|
||||
components: {gbroMarquee},
|
||||
components: { gbroMarquee },
|
||||
data() {
|
||||
return {
|
||||
ready: false,
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<view class="components-coupons">
|
||||
<image class="coupons__cover" :src="data.image" mode="widthFix"/>
|
||||
|
||||
<view class="coupons__section flex jc-between ai-center">
|
||||
<view>有效期至:
|
||||
<text>{{ data.endTime }}</text>
|
||||
</view>
|
||||
<view class="coupons__tag coupons__tag-expire" v-if="data.status===2">已到期</view>
|
||||
<view class="coupons__tag" @click="goGoods()" v-if="data.status===0 && !radioModel">去使用</view>
|
||||
<view @click="selectCoupon">
|
||||
<radio :value="data.id" :checked="data.checked" color="#FF564A" v-if="radioModel && data.status===0"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coupons__rules">
|
||||
<view class="coupons__rules-title" @click="changeRules()">使用规则
|
||||
<image :class="{'open':isOpen}" :src="webUrl+'/20231125220409665027.png'" mode="scaleToFill"/>
|
||||
</view>
|
||||
<view
|
||||
:class="isOpen ? 'auto-height' : ''"
|
||||
class="coupon-html"
|
||||
>
|
||||
<rich-text :nodes="data.description" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Coupons",
|
||||
props: {
|
||||
data: Object,
|
||||
radioModel: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
checked: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
isOpen: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeRules() {
|
||||
this.isOpen = !this.isOpen
|
||||
},
|
||||
goGoods() {
|
||||
uni.switchTab({url: '/pages/home/landMark'})
|
||||
// this.$global.navToGoods(this.data.productId)
|
||||
},
|
||||
selectCoupon() {
|
||||
if (!this.radioModel) return
|
||||
this.$emit('change', this.data.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.components-coupons {
|
||||
width: 686rpx;
|
||||
box-sizing: border-box;
|
||||
border: 2rpx solid #FF564A;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.coupons__cover {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.coupons__section {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 18rpx 20rpx 16rpx 16rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
|
||||
text {
|
||||
color: #EA1C1C;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.coupons__tag {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 120rpx;
|
||||
height: 52rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8rpx;
|
||||
border: 2px solid #0DC5C5;
|
||||
color: #0DC5C5;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.coupons__tag-expire {
|
||||
border: 2rpx solid #BFBFBF;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.coupons__rules {
|
||||
padding: 0 20rpx 20rpx 16rpx;
|
||||
|
||||
.coupons__rules-title {
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
|
||||
image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.open {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
.coupon-html {
|
||||
height: 80rpx;
|
||||
overflow: hidden;
|
||||
transition: all .3s;
|
||||
&.auto-height {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -5,23 +5,13 @@
|
||||
<Coupons class="coupons" :data="item" v-for="(item,index) in list" :key="index"/>
|
||||
|
||||
<image class="zero-coupons" :src="webUrl+'/20231201201733142658.png'" mode="scaleToFill" v-if="list.length===0"/>
|
||||
<!-- <view>-->
|
||||
<!-- <button @tap="startRecord">开始录音</button>-->
|
||||
<!-- <button @tap="endRecord">停止录音</button>-->
|
||||
<!-- <button @tap="playVoice">播放录音</button>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SubSection from "@/components/SubSection.vue";
|
||||
import Coupons from "@/components/Coupons.vue";
|
||||
import {getCouponsUser} from "@/api/user";
|
||||
|
||||
const recorderManager = uni.getRecorderManager();
|
||||
const innerAudioContext = uni.createInnerAudioContext();
|
||||
|
||||
innerAudioContext.autoplay = true;
|
||||
import SubSection from '@/components/SubSection.vue'
|
||||
import Coupons from '../components/Coupons.vue'
|
||||
import {getCouponsUser} from '@/api/user'
|
||||
|
||||
export default {
|
||||
name: "myCoupons",
|
||||
@@ -29,7 +19,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
voicePath: '',
|
||||
current: 0,
|
||||
canUse: 0,
|
||||
notUse: 0,
|
||||
@@ -37,34 +26,10 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// let self = this;
|
||||
// recorderManager.onStop(function (res) {
|
||||
// console.log('recorder stop' + JSON.stringify(res));
|
||||
// self.voicePath = res.tempFilePath;
|
||||
// });
|
||||
|
||||
this.fetchList(1)
|
||||
this.fetchList(2)
|
||||
},
|
||||
methods: {
|
||||
startRecord() {
|
||||
console.log('开始录音');
|
||||
|
||||
recorderManager.start();
|
||||
},
|
||||
endRecord() {
|
||||
console.log('录音结束');
|
||||
recorderManager.stop();
|
||||
},
|
||||
playVoice() {
|
||||
console.log('播放录音');
|
||||
|
||||
if (this.voicePath) {
|
||||
innerAudioContext.src = this.voicePath;
|
||||
innerAudioContext.play();
|
||||
}
|
||||
},
|
||||
|
||||
changeNav(index) {
|
||||
this.current = index
|
||||
this.fetchList(index + 1)
|
||||
@@ -79,7 +44,7 @@ export default {
|
||||
if (type === 1) this.canUse = data.length
|
||||
if (type === 2) this.notUse = data.length
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+41
-5
@@ -1,8 +1,29 @@
|
||||
<template>
|
||||
<view class="waterfalls-flow">
|
||||
<view v-for="(item,index) in data.column" :key="index" class="waterfalls-flow-column" :id="`waterfalls_flow_column_${index+1}`" :msg="msg" :style="{'width':w,'margin-left':index==0?0:m}">
|
||||
<view :class="['column-value',{'column-value-show':item2.o}]" v-for="(item2,index2) in columnValue(index)" :key="index2" :style="[s1]" @click.stop="wapperClick(item2)">
|
||||
<view class="inner" v-if="data.seat==1">
|
||||
<view
|
||||
v-for="(item, index) in data.column"
|
||||
:key="index" class="waterfalls-flow-column"
|
||||
:id="`waterfalls_flow_column_${index+1}`"
|
||||
:msg="msg"
|
||||
:style="{
|
||||
'width': w,
|
||||
'margin-left': index == 0 ? 0 : m
|
||||
}"
|
||||
>
|
||||
<view
|
||||
v-for="(item2, index2) in columnValue(index)"
|
||||
:key="index2"
|
||||
:class="[
|
||||
'column-value',
|
||||
{ 'column-value-show': item2.o }
|
||||
]"
|
||||
:style="[s1]"
|
||||
@click.stop="wapperClick(item2)"
|
||||
>
|
||||
<view
|
||||
v-if="data.seat == 1"
|
||||
class="inner"
|
||||
>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- #ifdef VUE2 -->
|
||||
<slot name="slot{{item2.index}}"></slot>
|
||||
@@ -15,8 +36,22 @@
|
||||
<slot v-bind="item2"></slot>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<image :class="['img',{'img-hide':item2[hideImageKey]==true||item2[hideImageKey]==1},{'img-error':!item2[data.imageKey]}]" :src="item2[data.imageKey]" mode="widthFix" @load="imgLoad(item2,index+1)" @error="imgError(item2,index+1)" @click.stop="imageClick(item2)"></image>
|
||||
<view class="inner" v-if="data.seat==2">
|
||||
<image
|
||||
:class="[
|
||||
'img',
|
||||
{ 'img-hide': item2[hideImageKey] == true || item2[hideImageKey] == 1 },
|
||||
{ 'img-error': !item2[data.imageKey] }
|
||||
]"
|
||||
:src="item2[data.imageKey]"
|
||||
mode="widthFix"
|
||||
@load="imgLoad(item2, index+1)"
|
||||
@error="imgError(item2, index+1)"
|
||||
@click.stop="imageClick(item2)"
|
||||
/>
|
||||
<view
|
||||
v-if="data.seat==2"
|
||||
class="inner"
|
||||
>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- #ifdef VUE2 -->
|
||||
<slot name="slot{{item2.index}}"></slot>
|
||||
@@ -156,6 +191,7 @@
|
||||
this.msg++;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
console.log(this.data.list)
|
||||
this.initValue(this.curIndex, 'refresh==>');
|
||||
})
|
||||
}, 1)
|
||||
|
||||
+4
-4
@@ -49,7 +49,7 @@ dialog.message = (mes = "操作失败", obj = {}) => {
|
||||
uni.showToast({
|
||||
title: mes,
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
duration: 3000,
|
||||
complete: () => {
|
||||
resolve();
|
||||
}
|
||||
@@ -61,7 +61,7 @@ dialog.toast = (options) => {
|
||||
uni.showToast({
|
||||
title: options.mes,
|
||||
icon: "none",
|
||||
duration: 2000,
|
||||
duration: 3000,
|
||||
complete: () => {
|
||||
options.callback ? options.callback() : null
|
||||
}
|
||||
@@ -72,7 +72,7 @@ dialog.error = (mes) => {
|
||||
uni.showToast({
|
||||
title: mes,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
duration: 3000
|
||||
});
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ export function validatorDefaultCatch(err, type = "message") {
|
||||
uni.showToast({
|
||||
title: err.errors[0].message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
duration: 3000
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user