Commit d2018dc7 by 施宇

h5zyly

parent e804b2d7
<template>
<div id="app">
<keep-alive exclude="newsDetail,pointchange,wallet,walletRetrieve,walletDetail,walletRecord,walletStatus,walletWithdraw,walletRecharge">
<keep-alive exclude="newsDetail,pointchange,wallet,walletRetrieve,walletDetail,walletRecord,walletStatus,walletWithdraw,walletRecharge,xianhuo">
<router-view class="router-view"></router-view>
</keep-alive>
</div>
......
......@@ -46,7 +46,7 @@
</a>
</dl>
<div class="mui-row block-but">
<div class="morePrice">
<div class="morePrice" :id="'morePrice'+itemchild.goods_id">
<template v-if="isZy">
<div
class="mui-row list_data"
......@@ -56,7 +56,10 @@
<p class="mui-col-sm-6 mui-col-xs-6" v-html="itemPrice.purchases+'+'"></p>
<p class="mui-col-sm-6 mui-col-xs-6">{{itemPrice.price_cn}}</p>
</div>
<div class="mui-row list_data f-fff" v-if="itemchild.ladder_price&&itemchild.ladder_price.length==0">
<div
class="mui-row list_data f-fff"
v-if="itemchild.ladder_price&&itemchild.ladder_price.length==0"
>
<p class="mui-col-sm-6 mui-col-xs-6">- -</p>
<p class="mui-col-sm-6 mui-col-xs-6">- -</p>
</div>
......@@ -71,7 +74,10 @@
<p class="mui-col-sm-4 mui-col-xs-4">{{itemPrice.price_cn}}</p>
<p class="mui-col-sm-4 mui-col-xs-4">${{itemPrice.price_us}}</p>
</div>
<div class="mui-row list_data f-fff" v-if="itemchild.ladder_price&&itemchild.ladder_price.length==0">
<div
class="mui-row list_data f-fff"
v-if="itemchild.ladder_price&&itemchild.ladder_price.length==0"
>
<p class="mui-col-sm-4 mui-col-xs-4">- -</p>
<p class="mui-col-sm-4 mui-col-xs-4">- -</p>
<p class="mui-col-sm-4 mui-col-xs-4">- -</p>
......@@ -80,7 +86,7 @@
<div
class="more-height"
v-if="itemchild.ladder_price&&itemchild.ladder_price.length>limitLength"
@click="priceRow(indexdata)"
@click="priceRow(indexdata,itemchild.goods_id)"
v-html="itemchild.checkBtn||defaultBtn"
>
更多梯度价格
......@@ -90,15 +96,13 @@
<div class="but-shop">
<template v-if="isZy">
<a class="but" v-if="itemchild.is_buy==1" @click="placeOrder(itemchild.goods_id)">我要下单</a>
<a class="but but-orange" v-else @click="xunjia">立即询价</a>
<a class="but but-orange" v-else @click="xunjia">立即询价</a>
</template>
<template v-else="isZy">
<a class="but" v-if="itemchild.is_buy==1" @click="placeOrder(itemchild.goods_id)">我要下单</a>
<a class="but but-orange" v-else-if="itemchild.is_buy==0" @click="xunjia">立即询价</a>
<a class="but but-orange" v-else-if="itemchild.is_buy==3" @click="xunjia">确认库存信息</a>
</template>
</div>
</div>
</div>
......@@ -107,7 +111,7 @@
<script>
import Vue from "vue";
import { Lazyload } from "vant";
import bus from '../../util/bus.js'
import bus from "../../util/bus.js";
Vue.use(Lazyload);
export default {
name: "GoodsOne",
......@@ -132,7 +136,9 @@ export default {
watch: {},
mounted() {},
methods: {
priceRow: function(index) {
priceRow: function(index, id) {
let dom = document.getElementById("morePrice" + id);
let arrLength = this.dataList[index].ladder_price.length;
if (this.dataList[index]["check"]) {
this.$set(this.dataList[index], "check", false);
this.$set(
......@@ -140,6 +146,7 @@ export default {
"checkBtn",
'更多梯度价格<i class="icon-bot"></i>'
);
dom.style.height = "81px";
} else {
this.$set(this.dataList[index], "check", true);
this.$set(
......@@ -147,13 +154,14 @@ export default {
"checkBtn",
'收起梯度价格<i class="icon-top"></i>'
);
dom.style.height = "200px";
}
},
placeOrder(id) {
this.$emit("placeOrder", id);
},
xunjia(){
bus.$emit('xunjia')
xunjia() {
bus.$emit("xunjia");
}
},
components: {}
......@@ -259,6 +267,8 @@ export default {
color: #666;
font-size: 12px;
width: 100%;
height: 81px;
transition: all 2s ease-in ;
.list_data {
height: 19px;
&.dataNo {
......@@ -297,7 +307,7 @@ export default {
cursor: pointer;
box-sizing: border-box;
border-radius: 4px;
&.but-orange{
&.but-orange {
background: #ffa200;
}
}
......
......@@ -3,7 +3,7 @@
<div class="details-head">
<div class="head_top clr">
<div class="head_top_left fl">
<img :src="goodDetail.brand_logo" @error="imgErr">
<img :src="goodDetail.brand_logo" @error="imgErr" @click="showImagePreview">
</div>
<div class="head_top_right">
<h4>
......@@ -183,6 +183,9 @@
</template>
<script>
import util from "../../util/index";
import Vue from 'vue'
import { ImagePreview } from 'vant';
Vue.use(ImagePreview);
export default {
props: {
goodDetail: {
......@@ -282,6 +285,19 @@ export default {
}
},
methods: {
showImagePreview(position, timer) {
let images = [this.goodDetail.brand_logo];
const instance = ImagePreview({
images,
asyncClose: !!timer,
showIndex: false
});
if (timer) {
setTimeout(() => {
instance.close();
}, timer);
}
},
imgErr() {
this.goodDetail.brand_logo =
"https://www.ichunt.com/v3/dist/res/m/images/materiel_img_3.png";
......
......@@ -3,7 +3,7 @@
<div class="details-head">
<div class="head_top clr">
<div class="head_top_left fl">
<img :src="goodDetail.brand_logo" @onerror="imgErr">
<img :src="goodDetail.brand_logo" @onerror="imgErr" @click="showImagePreview">
</div>
<div class="head_top_right">
<h4>
......@@ -199,6 +199,10 @@
</template>
<script>
import util from "../../util/index";
import Vue from 'vue'
import { ImagePreview } from 'vant';
Vue.use(ImagePreview);
export default {
props: {
goodDetail: {
......@@ -210,6 +214,7 @@ export default {
},
data() {
return {
images:[],
isShowMore: false,
ypNum: 0, //组
singlePrice: 0, //单价
......@@ -301,6 +306,19 @@ export default {
}
},
methods: {
showImagePreview(position, timer) {
let images = [this.goodDetail.brand_logo]
const instance = ImagePreview({
images,
asyncClose: !!timer,
showIndex:false
});
if (timer) {
setTimeout(() => {
instance.close();
}, timer);
}
},
imgErr() {
this.goodDetail.brand_logo =
"https://www.ichunt.com/v3/dist/res/m/images/materiel_img_3.png";
......
......@@ -243,6 +243,7 @@ export default {
},
created() {
this.getDefaultClass();
this.$store.commit("closeAlert");
},
computed: {
...mapState({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment