weliam-smartcity智慧城市
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

157 lines
3.8 KiB

<template>
<!-- 抢购专题 -->
<view>
<loadlogo v-if="!loadlogo" />
<view class="speci-box" v-if="loadlogo">
<far-bottom></far-bottom>
<view class="header-image p-r" :style="{'background-image':'url('+speciInfo.thumb+')',height:imgstyle.height + 'px',width: imgstyle.width + 'px'}">
<view class="rule-box t-c col-f f-24" @click="openWxParse">规则</view>
</view>
<view class="speci-list padding-box-all" :style="'background-color:'+speciInfo.bgcolor">
<goods-style goodsStyleType="rush" :goodslistData="rushlist"></goods-style>
</view>
<popup-view :show="showRule" type="center" @clickmask="showRule = false">
<view class="wxParse-box b-f">
<scroll-view scroll-y="true" class="scrollView-parse">
<jyf-parser domain="https://6874-html-foe72-1259071903.tcb.qcloud.la" gesture-zoom lazy-load ref="article" selectable
show-with-animation use-anchor :html="speciInfo.rule" ></jyf-parser>
</scroll-view>
<view class="closeRule col-f f-28 t-c" @click="openWxParse">知道了</view>
</view>
</popup-view>
</view>
</view>
</template>
<script>
import App from "@/common/js/app.js"
import Loadlogo from '@/components/template/loadlogo.vue'
import wxApi from "@/common/js/wxApi.js"
import PopupView from "@/components/template/PopManager.vue"
import goodsStyle from '@/components/page/pageComponents/goodsStyle.vue'
import jyfParser from '@/components/jyf-parser/jyf-parser.vue'
export default {
data() {
return {
rushlist: [],
speciInfo: null,
loadlogo: false,
showRule: false,
imgstyle:{}
}
},
components: {
Loadlogo,
PopupView,
goodsStyle,
jyfParser
},
onLoad(e) {
let _this = this;
_this.imgstyle = uni.getStorageSync('imgstyle');
let agencyData = uni.getStorageSync('agencyData');
let lnglat = {
latitude:agencyData.lat,
longitude:agencyData.lng
}
_this.specialInfo(lnglat, e.id);
},
methods: {
specialInfo(location, id = "3") {
let _this = this,
requestData = {
id,
lat: location.latitude || "",
lng: location.longitude || ""
};
App._post_form('&p=rush&do=specialInfo', requestData, res => {
let speciInfoData = res.data,
speciInfo = {};
speciInfo.thumb = speciInfoData.thumb;
speciInfo.title = speciInfoData.title;
speciInfo.share_title = speciInfoData.share_title;
speciInfo.share_desc = speciInfoData.share_desc;
speciInfo.rule = speciInfoData.rule;
speciInfo.bgcolor = speciInfoData.bgcolor;
_this.setData({
speciInfo,
rushlist: res.data.list
});
// if(res.errno == 0){
// _this.loadlogo = true;
// }
}, false, () => {
_this.loadlogo = true;
})
},
navigateTo(url) {
App.navigationTo({
url
})
},
openWxParse() {
let _this = this;
_this.showRule = !_this.showRule;
},
goodsremind(id, item) {
let _this = this;
App._post_form('&p=rush&do=follow', {
id
}, res => {
if (res.errno === 0) {
App.showSuccess(res.message, () => {
_this.$set(item, 'is_follow', 1)
})
}
})
}
},
computed: {
},
}
</script>
<style lang="scss">
@import "../../../../common/css/old_diyPages";
.header-image {
width: 100%;
height: 300upx;
background-size: 100% 300upx;
background-repeat: no-repeat;
}
.rule-box {
position: absolute;
right: 0;
top: 15%;
width: 110upx;
height: 52upx;
line-height: 52upx;
background-color: #E63232;
border-radius: 26upx 0 0 26upx;
}
.wxParse-box {
border-radius: 20upx;
width: 500upx;
height: 75vh;
padding: 20upx 50upx;
}
.scrollView-parse {
height: 65vh;
}
.closeRule {
width: 460upx;
height: 80upx;
line-height: 80upx;
background-color: #FF4444;
border-radius: 40upx;
margin: 30upx auto 0;
}
</style>