Commit bdd2af9b authored by 罗超's avatar 罗超

1

parent 6b08fb1d
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
:style="{ :style="{
'background-color': goodsInfo.backgroundColor, 'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl, 'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '' 'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}" }"
> >
<div <div
...@@ -13,12 +13,19 @@ ...@@ -13,12 +13,19 @@
@click="openGood(item)" @click="openGood(item)"
:style="{ :style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '', border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '' background:
goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '',
}" }"
> >
<div class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width: 100%;" /></div> <div class="tips" v-if="goodsInfo.showGoodsTag">
<image <image
style="width: calc(100vw - 24px); height: 66vw;" :src="goodsInfo.goodsTagPicUrl"
mode="widthFix"
style="width: 100%"
/>
</div>
<image
style="width: calc(100vw - 24px); height: 66vw"
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.picUrl" :src="item.picUrl"
v-if="goodsInfo.goodsCoverProportion == '3-2'" v-if="goodsInfo.goodsCoverProportion == '3-2'"
...@@ -34,58 +41,95 @@ ...@@ -34,58 +41,95 @@
:src="item.picUrl" :src="item.picUrl"
/> />
<div class="good-info"> <div class="good-info">
<div class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</div> <div class="good-name" v-if="goodsInfo.showGoodsName">
<view class="good-sub-name" v-if="item.subname">{{item.subname}}</view> {{ item.name }}
</div>
<view class="good-sub-name" v-if="item.subname">{{
item.subname
}}</view>
<div class="good-price-info"> <div class="good-price-info">
<span class="price" :style="{ color: mainColor }">{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} <span class="price" :style="{ color: mainColor }"
>{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : "" }}
<!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> --> <!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
</span> </span>
<span class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <span
<u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" /> class="buy"
<u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" /> v-if="goodsInfo.showBuyBtn"
@click.stop="showSkuHandler(item)"
>
<u-icon
name="cart-o"
size="40"
:color="mainColor"
v-if="goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name="add-o"
size="40"
:color="mainColor"
v-else-if="goodsInfo.buyBtn == 'add'"
/>
<u-button <u-button
type="primary" type="primary"
size="mini" size="mini"
:ripple="true" :ripple="true"
:color="goodsInfo.buttonColor" :color="goodsInfo.buttonColor"
:custom-style="{ :custom-style="{
'backgroundColor':goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ?'#FFF' : goodsInfo.buttonColor , backgroundColor:
'color':goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF' goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? '#FFF'
: goodsInfo.buttonColor,
color:
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? goodsInfo.buttonColor
: '#FFF',
}" }"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4" :plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'" :shape="
goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4
? 'circle'
: 'square'
"
v-else v-else
> >
{{ goodsInfo.buyBtnText }} {{ goodsInfo.buyBtnText }}
</u-button> </u-button>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku> <good-sku
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> v-if="showSku"
:option-type="2"
borderRadius="20"
v-model="showSku"
:good="sku"
></good-sku>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</div> </div>
</template> </template>
<script> <script>
import goodSku from '../goods/goodsku'; import goodSku from "../goods/goodsku";
import auth from '@/components/auth/index.vue'; import auth from "@/components/auth/index.vue";
export default { export default {
components: { components: {
goodSku, goodSku,
auth auth,
}, },
props: ['goodList', 'goodsInfo'], props: ["goodList", "goodsInfo"],
data() { data() {
return { return {
mainColor: '', mainColor: "",
activeKey: 0, activeKey: 0,
showSku: false, showSku: false,
sku: {}, sku: {},
showAuth: false, showAuth: false,
u: {} u: {},
}; };
}, },
created() { created() {
...@@ -95,38 +139,42 @@ export default { ...@@ -95,38 +139,42 @@ export default {
openGood(item) { openGood(item) {
//线路 //线路
if (item.goodType == 4) { if (item.goodType == 4) {
var url="/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid; var url =
console.log("url1",url) "/pages/jiuzhai/jz_LineDetail?tcid=" +
item.id +
"&configId=" +
item.subid;
console.log("url1", url);
uni.navigateTo({ uni.navigateTo({
url:url url: url,
}); });
} }
//酒店 //酒店
else if (item.goodType == 1) { else if (item.goodType == 1) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/hotel/detail?id=" + item.id url: "/pages/hotel/detail?id=" + item.id,
}); });
} }
//餐食 //餐食
else if (item.goodType == 2) { else if (item.goodType == 2) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/restaurant/detail?id=' + item.id url: "/pages/restaurant/detail?id=" + item.id,
}); });
} }
//景点 //景点
else if (item.goodType == 3) { else if (item.goodType == 3) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/ticketCoupons/detail?id=' + item.id url: "/pages/ticketCoupons/detail?id=" + item.id,
}); });
} }
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: '未登录', nickName: "未登录",
avatarUrl: '' avatarUrl: "",
}; };
this.showAuth = true; this.showAuth = true;
} else { } else {
...@@ -134,18 +182,18 @@ export default { ...@@ -134,18 +182,18 @@ export default {
} }
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth = false; // this.showAuth = false;
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth() { gbAuth() {
this.showAuth = false; this.showAuth = false;
} },
} },
}; };
</script> </script>
<style> <style scoped>
.good-one { .good-one {
margin: 12px; margin: 12px;
position: relative; position: relative;
......
...@@ -251,28 +251,23 @@ export default { ...@@ -251,28 +251,23 @@ export default {
padding-bottom: 0; */ padding-bottom: 0; */
} }
.good-two .good-info .good-name { .good-two .good-info .good-name {
width: 100%;
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
white-space: nowrap;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
/* height: 37px; */
} }
.good-two .good-info .good-sub-name { .good-two .good-info .good-sub-name {
width: 100%;
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box;
/* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
white-space: nowrap;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 22rpx; font-size: 22rpx;
color: #999999; color: #999999;
/* height: 37px; */
} }
.good-two .good-info .good-price-info { .good-two .good-info .good-price-info {
display: flex; display: flex;
......
...@@ -864,7 +864,15 @@ export default { ...@@ -864,7 +864,15 @@ export default {
}, },
(res) => { (res) => {
this.orderInfo = JSON.parse(res.data); this.orderInfo = JSON.parse(res.data);
// this.PayAli(OrderId); if (res.data) {
this.PayAli(res.data);
} else {
uni.showToast({
title: "获取交易号失败",
duration: 2000,
});
}
console.log(873, res); console.log(873, res);
} }
); );
......
...@@ -16,21 +16,20 @@ ...@@ -16,21 +16,20 @@
name="picUrl" name="picUrl"
v-if="active == 1" v-if="active == 1"
></u-swiper> ></u-swiper>
<!-- #ifdef MP-WEIXIN -->
<view <view
@click="goback" @click="goback"
:style="[titleStyle, { opacity: '100% !important' }]" :style="[titleStyle, { opacity: '100% !important' }]"
style="position: fixed; top: 0; left: 0; padding-left: 6rpx" style="position: fixed; top: 0; left: 0; padding-left: 6rpx"
> >
<!-- #ifdef MP-WEIXIN -->
<u-icon <u-icon
name="arrow-left" name="arrow-left"
size="44" size="44"
color="#FFF" color="#FFF"
style="margin-top: 22rpx" style="margin-top: 22rpx"
></u-icon> ></u-icon>
<!-- #endif -->
</view> </view>
<!-- #endif -->
</view> </view>
<view class="restaurant-title" :style="[titleStyle]"> <view class="restaurant-title" :style="[titleStyle]">
<view @click="goback"> <view @click="goback">
...@@ -284,20 +283,7 @@ import calendar from "./components/uni-calendar/uni-calendar.vue"; ...@@ -284,20 +283,7 @@ import calendar from "./components/uni-calendar/uni-calendar.vue";
export default { export default {
data() { data() {
return { return {
imgsList: [ imgsList: [],
// {
// picUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1622459632000_216.png"
// },
// {
// picUrl: "https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
// },
// {
// picUrl: "https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
// },
// {
// picUrl: "https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
// }
],
ID: 0, ID: 0,
details: {}, details: {},
typeList: [ typeList: [
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
" "
:style="{ opacity: 100 - boxOption + '%' }" :style="{ opacity: 100 - boxOption + '%' }"
> >
<!-- #ifdef MP-WEIXIN -->
<view <view
@click="goback" @click="goback"
:style="[titleStyle, { opacity: '100% !important' }]" :style="[titleStyle, { opacity: '100% !important' }]"
...@@ -28,15 +29,14 @@ ...@@ -28,15 +29,14 @@
padding-left: 6rpx; padding-left: 6rpx;
" "
> >
<!-- #ifdef MP-WEIXIN -->
<u-icon <u-icon
name="arrow-left" name="arrow-left"
size="44" size="44"
color="#ffffff" color="#ffffff"
style="margin-top: 22rpx" style="margin-top: 22rpx"
></u-icon> ></u-icon>
<!-- #endif -->
</view> </view>
<!-- #endif -->
<image <image
class="banner-img" class="banner-img"
:src="details.AllPicList[0].TagPicList[0].Path" :src="details.AllPicList[0].TagPicList[0].Path"
......
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 to comment