|
@@ -9,10 +9,11 @@
|
|
|
/>
|
|
|
<i class="iconfont icon-sousuo" @click="gotoSearch(searchKey)"></i>
|
|
|
</div>
|
|
|
- <ul v-if="total">
|
|
|
+ <ul v-if="total" ref="ulMenu">
|
|
|
<li v-for="(item,index) in myscene.list" :key="index">
|
|
|
<div @click="((item.status === 1||item.status===-2)&&item.payStatus !== -2) && goto(item.webSite)" class="a-tap">
|
|
|
<div class="share-btn" v-if="((item.status === 1||item.status===-2)&&item.payStatus !== -2)" @click.stop="handleShare(item)"></div>
|
|
|
+ <div class="cooperation" v-if="item.cooperationUserName"><i class="iconfont icon-geren"></i><span>{{item.cooperationUserName}}</span></div>
|
|
|
<div class="card-img" :style="{backgroundImage: `url(${getSceneImg(item)})`}"></div>
|
|
|
<div class="loading-hover" v-if="item.status === 0">
|
|
|
<div class="loading-icon">
|
|
@@ -27,17 +28,26 @@
|
|
|
<p class="huifu" @click.stop="rechargeTip(item)">{{langScenes.limit.recharge}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="name">
|
|
|
+ <div class="name" >
|
|
|
<div class="title">{{item.sceneName}}</div>
|
|
|
<div class="oper">
|
|
|
- <div v-if="item.status !== 0" @click="del(item)">
|
|
|
+ <div @click="handleMenu(index)">
|
|
|
+ <span class="spot"></span>
|
|
|
+ </div>
|
|
|
+ <ul v-if="ulActive === index">
|
|
|
+ <li v-if="item.status === 1||item.status===-2" @click="gotoEdit(item)">{{langScenes.edit}}</li>
|
|
|
+ <li @click="handleCooperation(item)">{{item.cooperationUserId?'取消协作':'分配协作'}}</li>
|
|
|
+ <li v-if="item.status !== 0" @click="del(item)">{{langScenes.delete}}</li>
|
|
|
+ </ul>
|
|
|
+ <!-- <div v-if="item.status !== 0" @click="del(item)">
|
|
|
<span >{{langScenes.delete}}</span>
|
|
|
</div>
|
|
|
<div
|
|
|
v-if="item.status === 1||item.status===-2"
|
|
|
class="primary"
|
|
|
- @click="gotoEdit(item)"
|
|
|
- ><span>{{langScenes.edit}}</span></div>
|
|
|
+ @click="gotoEdit(item)">
|
|
|
+ <span>{{langScenes.edit}}</span>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
@@ -90,7 +100,7 @@
|
|
|
<div>"{{lheight}}"</div>
|
|
|
<p>src=</p>
|
|
|
<div>"{{url}}"</div>
|
|
|
- <p>frameborder=</p>
|
|
|
+ <p>allowfullscreen="true" frameborder=</p>
|
|
|
<div>"0"</div>
|
|
|
<div>{{'></iframe>'}}</div>
|
|
|
</div>
|
|
@@ -134,7 +144,8 @@ export default {
|
|
|
lwidth: 853,
|
|
|
lheight: 480,
|
|
|
url: 'https://www.4dkankan.com/showProPC.html?m=KcMeJlOr8',
|
|
|
- item: ''
|
|
|
+ item: '',
|
|
|
+ ulActive: ''
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -182,10 +193,17 @@ export default {
|
|
|
}
|
|
|
}),
|
|
|
htmlCode () {
|
|
|
- return `<iframe src="${this.url}" width="${this.lwidth}" height="${this.lheight}" frameborder="0"></iframe>`
|
|
|
+ return `<iframe src="${this.url}" width="${this.lwidth}" height="${this.lheight}" allowfullscreen="true" frameborder="0"></iframe>`
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
+ document.addEventListener('click', (e) => {
|
|
|
+ if (this.$refs.ulMenu) {
|
|
|
+ if (!this.$refs.ulMenu.contains(e.target)) {
|
|
|
+ this.ulActive = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
if (this.deviceLogin) {
|
|
|
this.$bus.$off('mycid')
|
|
|
this.$bus.$on('mycid', item => {
|
|
@@ -198,6 +216,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ async handleCooperation (item) {
|
|
|
+ if (item.cooperationUserId) {
|
|
|
+ let result = await this.$http({
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ sceneNum: item.num
|
|
|
+ },
|
|
|
+ headers: {
|
|
|
+ token: this.token
|
|
|
+ },
|
|
|
+ url: '/user/scene/cooperation/delete'
|
|
|
+ })
|
|
|
+ let data = result.data
|
|
|
+ if (data.code === 0) {
|
|
|
+ this.$toast.show('success', '取消协作成功', () => {
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return this.$toast.show('warn', data.msg, () => {})
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$toast.showCooperation(item.num, () => {
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleMenu (index) {
|
|
|
+ this.ulActive = index === this.ulActive ? '' : index
|
|
|
+ },
|
|
|
rechargeTip (item) {
|
|
|
this.$toast.showConfirm('warn', this.langToast['28'], () => {
|
|
|
let routeData = this.$router.resolve({name: 'introduce', params: {id: item.childName}})
|
|
@@ -231,7 +278,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
window.open([r, f].join(''), '', ['toolbar=0,status=0,resizable=1,width=620,height=450,left=', ((n.width) / 2) - 310, ',top=', ((n.height) / 2) - 225].join('')) || (u.href = [r, f].join(''))
|
|
|
- // window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://m.goczx.com/&title=【东莞厂房租售网|东莞厂房招租信息|东莞厂房网】-东莞i厂房网&desc=东莞i厂房网&summary=东莞i厂房网&site={{100*100}}&pics=http://img6.zcf8.com/black_logo1.png?imageView/3/w/67/h/27')
|
|
|
},
|
|
|
handleShare (item) {
|
|
|
this.url = item.webSite.replace('http://', 'https://')
|
|
@@ -242,8 +288,6 @@ export default {
|
|
|
},
|
|
|
goto (url) {
|
|
|
let temp = url.replace('show.html', 'showPC.html')
|
|
|
- // let temp1 = temp.replace('//www', '//test')
|
|
|
- // window.open(temp.replace('//www', '//test'), '_blank')
|
|
|
window.open(temp.replace('http://', 'https://') + (this.language === 'en' ? '&lang=en' : ''), '_blank')
|
|
|
},
|
|
|
getSceneImg (item) {
|
|
@@ -374,9 +418,9 @@ export default {
|
|
|
}
|
|
|
.scene-layout {
|
|
|
width: 100%;
|
|
|
- ul {
|
|
|
+ > ul {
|
|
|
padding: 30px 0 0 40px;
|
|
|
- li {
|
|
|
+ > li {
|
|
|
width: 270px;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
@@ -416,7 +460,20 @@ export default {
|
|
|
background-repeat: no-repeat;
|
|
|
background-size: cover;
|
|
|
border-radius: 50%;
|
|
|
- // :src="`${$cdn}images/share-btn.png`"
|
|
|
+ }
|
|
|
+ .cooperation{
|
|
|
+ background:rgba(0,0,0,0.5);
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ >span{
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 6px;
|
|
|
+ }
|
|
|
}
|
|
|
.name {
|
|
|
display: flex;
|
|
@@ -435,33 +492,56 @@ export default {
|
|
|
.oper {
|
|
|
flex: 1;
|
|
|
text-align: right;
|
|
|
- div {
|
|
|
+ cursor: pointer;
|
|
|
+ position: relative;
|
|
|
+ >div {
|
|
|
display: inline-block;
|
|
|
- background: #fff;
|
|
|
- color: #000;
|
|
|
- border: 1px solid #777777;
|
|
|
- border-radius: 2px;
|
|
|
- font-size: 12px;
|
|
|
- width: 52px;
|
|
|
- height: 22px;
|
|
|
- line-height: 22px;
|
|
|
- text-align: center;
|
|
|
- vertical-align: middle;
|
|
|
- margin-left: 4px;
|
|
|
- box-sizing: border-box;
|
|
|
- cursor: pointer;
|
|
|
- position: relative;
|
|
|
- span{
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 50%;
|
|
|
- transform: translate(-50%,-50%);
|
|
|
- width: 100%;
|
|
|
+ width: 20%;
|
|
|
+ .spot{
|
|
|
+ width: 4px;
|
|
|
+ height: 4px;
|
|
|
+ display: inline-block;
|
|
|
+ background-color: #202020;
|
|
|
+ border-radius: 50%;
|
|
|
+ position: relative;
|
|
|
+ margin-right: 10px;
|
|
|
+ &::after,&::before{
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 4px;
|
|
|
+ height: 4px;
|
|
|
+ display: inline-block;
|
|
|
+ background-color: #202020;
|
|
|
+ border-radius: 50%;
|
|
|
+ left: -8px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ }
|
|
|
+ &::before{
|
|
|
+ right: -8px;
|
|
|
+ left: unset;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- .primary{
|
|
|
- background: #1fe4dc;
|
|
|
- border: 1px solid #1fe4dc;
|
|
|
+
|
|
|
+ >ul{
|
|
|
+ position: absolute;
|
|
|
+ top: 30px;
|
|
|
+ z-index: 9;
|
|
|
+ left: 58%;
|
|
|
+ background: #F7F7F7;
|
|
|
+ min-width: 90px;
|
|
|
+ box-shadow:0px 1px 6px rgba(0,0,0,0.16);
|
|
|
+ >li{
|
|
|
+ text-align: center;
|
|
|
+ width: 100%;
|
|
|
+ line-height: 2.5;
|
|
|
+ padding: 0 10px;
|
|
|
+ color: #202020;
|
|
|
+ &:hover{
|
|
|
+ background-color: #EBEBEB;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|