Commit 6bf2a4c9 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents 339a1850 bd53b1cb
<template>
<view class="catstyle3" style="height: 100%;">
<view class="tabsbox">
<u-tabs :is-scroll="true" name="Name" :list="d" :active-color="mainColor" :current="active" @change="changeHandler"
:type-style="2" :show-bar="false" :bold="false" height="50" duration="0"></u-tabs>
<u-tabs :is-scroll="true" name="Name" :list="d" :active-color="mainColor" :current="active"
@change="changeHandler" :type-style="2" :show-bar="false" :bold="false" height="50" duration="0">
</u-tabs>
</view>
<view style="height: calc(100% - 45px);background: #f5f5f5;">
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" style="
......@@ -15,31 +16,63 @@
<view class="good" @click="clickHandler(cx)">
<view class="good-img" style="position: relative;">
<image mode="aspectFit" :src="cx.cover_pic" style="width: 100%; height: 100%">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/plugins-out.png" v-if="cx.totalStock==0"
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/plugins-out.png"
v-if="cx.totalStock==0"
style="width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;" />
</image>
</view>
<view class="good-name">
<view v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''" class="Logo"
:style="{color: cx.marketingLogo.wordsColor,background:cx.marketingLogo.wordsBack ,}">{{cx.marketingLogo.words}}</view>
<image v-if="cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''" mode="heightFix"
:src="cx.marketingLogo.ico" style=" height: 12px;margin-right: 5px" />
<view
v-if="cx.marketingLogo.iswords && cx.marketingLogo.iswords==1&& cx.marketingLogo.words!=''"
class="Logo"
:style="{color: cx.marketingLogo.wordsColor,background:cx.marketingLogo.wordsBack ,}">
{{cx.marketingLogo.words}}</view>
<view style="color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
<image
v-if="cx.marketingLogo.iswords&&cx.marketingLogo.iswords==2&& cx.marketingLogo.ico!=''"
mode="heightFix" :src="cx.marketingLogo.ico"
style=" height: 12px;margin-right: 5px" />
<view
style="color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;height: 32rpx;font-size: 20rpx;margin-right: 5rpx;"
v-if="cx.freeShippingFullMoneyPinkage>0 || cx.freeShippingFullNumPinkage>0">
{{cx.freeShippingFullMoneyPinkage>0 && cx.freeShippingFullNumPinkage==0?cx.freeShippingFullMoneyPinkage+'元包邮':''}}
{{cx.freeShippingFullMoneyPinkage==0 && cx.freeShippingFullNumPinkage>0?cx.freeShippingFullNumPinkage+'件包邮':''}}
</view>
{{ cx.name }}
</view>
<view class="good-info">
<!-- 新增上课日期 -->
<view v-if="u.TenantId==27">
<view v-if="u.TenantId==27&&cx.edudata.ClassTime" class="have">
{{cx.edudata.ClassTime}}</view>
<!-- 新增次数 -->
<div v-if="cx.edudata.ClassNum&&u.TenantId==27" class="have">{{cx.edudata.ClassNum}}
</div>
<!-- 新增老师相片资料 -->
<view class="price-box">
<view class="portrait-box">
<image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit"
:src="cx.edudata.TeacherIcon" />
<view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}
</view>
</view>
<view class="good-info2" >
<view class="price" :style="{ color: mainColor }">{{cx.price_content}}</view>
</view>
</view>
</view>
<!-- 新增上课日期结束 -->
<view class="good-info" v-if="u.TenantId!=27">
<view class="price" :style="{ color: mainColor }">{{cx.price_content}}</view>
<view class="sell">{{ cx.sales }}</view>
</view>
</view>
</u-col>
</u-row>
<u-divider v-if="isover" bg-color="#F5f5f5" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider>&nbsp;
<u-divider v-if="isover" bg-color="#F5f5f5" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider>
&nbsp;
</scroll-view>
</view>
</view>
......@@ -50,6 +83,7 @@
props: ["d", "h"],
data() {
return {
u: {},
mainColor: "",
msg: {
pageIndex: 1,
......@@ -59,7 +93,7 @@
CategoryIds: '',
OrderBy: 1,
UserId: 0,
StoreId:0,
StoreId: 0,
},
page_count: 1,
mh: 0,
......@@ -72,9 +106,11 @@
};
},
created() {
this.u = uni.getStorageSync('mall_UserInfo');
this.mainColor = this.$uiConfig.mainColor;
this.IsEducation = uni.getStorageSync('basedata') ?
(uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle
(uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall
.setting.mallStyle
.IsEducation : 0) :
0;
},
......@@ -97,9 +133,13 @@
});
} else {
if (item.goodsclassify == 3) {
uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + item.id});
uni.navigateTo({
url: "/pages/reserve/goodsDetails?GoodsId=" + item.id
});
} else {
uni.navigateTo({ url: "/pages/goods/goods?GoodsId=" + item.id });
uni.navigateTo({
url: "/pages/goods/goods?GoodsId=" + item.id
});
}
}
......@@ -107,10 +147,11 @@
init() {
this.isover = false;
this.loading = true;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
this.msg.StoreId = uni.getStorageSync("storeId") ? uni.getStorageSync("storeId").storeId : 0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig") ? uni.getStorageSync("GetAppConfig").IsOpenReserve :
0
if (IsOpenReserve == 0) { //如果没开启 门店id赋值为0
this.msg.StoreId = 0
}
let url
if (this.IsEducation == 1) {
......@@ -181,6 +222,56 @@
</script>
<style>
.good-info2 {
display: flex;
margin: 0px 10px;
margin-top: 0;
align-items: center;
}
.price-box{
display: flex;
justify-content: space-between;
align-items: center;
}
.portrait-box {
display: flex;
align-items: center;
margin-top: 10rpx;
margin-bottom: 10rpx;
margin-left: 7px;
}
.portrait {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.cent-box {
/* background: yellow; */
width: 100%;
display: flex;
}
.have {
font-size: 20rpx;
color: gray;
margin-left: 7px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 3px;
}
.sell2 {
font-size: 20rpx;
color: gray;
}
.catstyle3 .tabsbox {
padding: 10px;
}
......
......@@ -9,6 +9,8 @@
<image mode="aspectFit" :src="d[tid].advert_url" style="width: 100%; height: 100%;" />
</div>
<div class="good" v-for="(cx, ci) in g" :key="ci" @click="clickHandler(cx)">
<!-- 新加div -->
<view class="cent-box">
<div class="good-img" style="position: relative;">
<image mode="aspectFit" :src="cx.cover_pic" style="width: 100%; height: 100%;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/plugins-out.png" v-if="cx.totalStock==0"
......@@ -32,23 +34,49 @@
</div>
<div class="goodprice">
<div class="left">
<div v-if="cx.is_level==1">
<!-- 新增上课日期 -->
<div v-if="cx.edudata.ClassTime&&u.TenantId==27" class="sell">{{cx.edudata.ClassTime}}</div>
<!-- 上课次数 -->
<div v-if="cx.edudata.ClassNum&&u.TenantId==27" class="sell">{{cx.edudata.ClassNum}}</div>
<div v-if="cx.is_level==1&&u.TenantId!=27">
<!-- todo VIP价格显示-->
<u-tag size="mini" shape="circle" text="会员价" type="warning" />
<!-- <u-tag color="#f39800" type="warning">会员价</u-tag> -->
<span class="vip">{{cx.level_price}}</span>
<span class="vip" v-if="u.TenantId!=27">{{cx.level_price}}</span>
</div>
<div class="price" :style="{ color: mainColor }">
<div v-if="u.TenantId!=27" class="price" :style="{ color: mainColor }">
{{ cx.price_content }}
</div>
<div class="sell">{{ cx.sales }}</div>
<div v-if="u.TenantId!=27" class="sell">{{ cx.sales }}</div>
</div>
<div @click.stop="showSkuHandler(cx)" class="right">
<div v-if="u.TenantId!=27" @click.stop="showSkuHandler(cx)" class="right">
<!-- todo 点击加入购物车-->
<u-icon name="cart-circle-o" size="44" :color="mainColor" />
</div>
</div>
</div>
</view>
<!-- 新加div -->
<view v-if="u.TenantId==27" class="Teachers">
<view class="portrait-box">
<image v-if="cx.edudata.TeacherIcon" class="portrait" mode="aspectFit" :src="cx.edudata.TeacherIcon" />
<view v-if="cx.edudata.TeacherName" class="sell2">{{cx.edudata.TeacherName}}</view>
</view>
<!-- 价格 -->
<view class="cart-box">
<view class="vip2" :style="{ color: mainColor }">
{{ cx.price_content }}
</view>
<div @click.stop="showSkuHandler(cx)" class="right">
<!-- todo 点击加入购物车-->
<u-icon name="cart-circle-o" size="44" :color="mainColor" />
</div>
</view>
</view>
</div>
<u-divider v-if="isover" :margin-top="20" :margin-bottom="20">没有更多商品了</u-divider>
</scroll-view>
......@@ -66,6 +94,7 @@
props: ["d", "h"],
data() {
return {
mainColor: "",
activeStyle: "",
page: 1,
......@@ -108,6 +137,7 @@
},
mounted() {
this.init();
this.u = uni.getStorageSync('mall_UserInfo');
},
methods: {
// 购物车
......@@ -209,6 +239,33 @@
</script>
<style>
.vip2{
font-size: 16px;
margin-right: 10rpx;
}
.Teachers{
display: flex;
justify-content: space-between;
}
.cart-box{
display: flex;
align-items: center;
}
.portrait-box{
display: flex;
align-items: center;
}
.portrait{
width: 50rpx;
height: 50rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.cent-box{
/* background: yellow; */
width: 100%;
display: flex;
}
.catstyle4 {
display: flex;
}
......@@ -248,7 +305,7 @@
.catstyle4 .good {
border-bottom: 1rpx solid #f1f1f1;
display: flex;
/* display: flex; */
padding: 10px 0;
}
......@@ -265,7 +322,7 @@
-webkit-box-orient: vertical;
margin-bottom: 3px;
font-size: 14px;
height: 36px;
/* height: 36px; */
margin-bottom: 5px;
}
......@@ -308,7 +365,10 @@
font-size: 12px;
color: gray;
}
.sell2{
font-size: 12px;
color: gray;
}
.catstyle4 .right-slider .adbox {
width: 100%;
height: calc(100vw - 105px / 3.37);
......
......@@ -28,8 +28,8 @@
</u-checkbox>
</u-checkbox-group>
</view>
<view :class=" u.TenantId!=27?'cartList_item':'cartList_item2'" v-for="(item, index) in c.GoodsList" :key="index"
@click="btnclick(item,index,i)">
<view :class=" u.TenantId!=27?'cartList_item':'cartList_item2'"
v-for="(item, index) in c.GoodsList" :key="index" @click="btnclick(item,index,i)">
<view @click.stop="abc()" style="width: 40px;text-align: center;"
v-if="(item.GoodsStatus == 1 && item.InventoryNum!=0 && IsEducation!=1) || (editType == true&& IsEducation!=1)">
<u-checkbox-group @change="clickcheckbox(item.checked, item.Price, index, i)">
......@@ -51,16 +51,16 @@
v-if="item.InventoryNum == 0 && editType == false && IsEducation!=1">
<Text style="color: #fff; width: 22px;font-size: 20rpx;">售馨</Text>
</view>
<!-- 布局修改 -->
<view class="cent-box">
<image :src="item.CoverImage" v-if='IsEducation!=1' mode="aspectFill"
style="width: 150rpx;height: 150rpx;margin-left: 30rpx;border-radius: 5px;"
@click.native.stop="clickHandler(item.GoodsId)" />
<image :src="item.CoverImage" v-if='IsEducation==1' mode="aspectFill"
style="width: 116px;height: 64px;margin-left: 30rpx;border-radius: 5px;box-shadow:0 4px 10px 1px #D2D2D2;"
@click.native.stop="clickHandler2(item.GoodsId)" />
<view :class="u.TenantId!=27?'item-r':'item-r2' "
:style="{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1&&u.TenantId!=27?'150rpx':u.TenantId==27?'230rpx':'65px', }">
:style="{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1&&u.TenantId!=27?'150rpx':u.TenantId==27?'auto':'65px', }">
<view :class="IsEducation!=1?'item-r-n':'item-r-n2'">
<view
v-if="item.MarketingLogo.iswords && item.MarketingLogo.iswords==1&& item.MarketingLogo.words!=''"
......@@ -99,33 +99,34 @@
</view>
</view>
<!-- 新增上课时间 -->
<Text v-shpw='u.TenantId==27'
<Text v-if='u.TenantId==27&&item.EduData.ClassTime'
style="color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;">
上课时间:{{ attr}}
上课时间:{{item.EduData.ClassTime}}
</Text>
<!-- 课程数量 -->
<Text v-shpw='u.TenantId==27'
<Text v-if='u.TenantId==27&&item.EduData.ClassNum'
style="color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;">
课程数量:{{ attr}}
课程数量:{{item.EduData.ClassNum}}
</Text>
<view @click.stop="abc()"
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<Text style="font-size: 30rpx;" :style="{ color: pricecolor }">
<Text style="40rpx">{{ item.Price }}</Text>
</Text>
<u-number-box v-if='IsEducation!=1&&u.TenantId!=27' v-model="item.Number" :min="1"
:max="item.InventoryNum"
@change="valChange(i, index, item.Number, item.Price, $event)"></u-number-box>
<u-number-box v-if='IsEducation!=1&&u.TenantId!=27' v-model="item.Number"
:min="1" :max="item.InventoryNum"
@change="valChange(i, index, item.Number, item.Price, $event)">
</u-number-box>
</view>
<!-- 新增绑定物品 -->
<view>
<Text v-shpw='u.TenantId==27'
style="color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;">
已选物品:{{ attr}}
<view v-if='u.TenantId==27' v-for="(attr2, inde4x) in item.GoodsRelevanceList" :key="inde4x" >
<Text v-if='attr2.RelevanceName' style="color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;">
已选物品:{{attr2.RelevanceName}}
</Text>
<view style="font-size: 30rpx;" :style="{ color: pricecolor }">
<Text style="40rpx">{{ item.Price }}</Text>
<view v-if='attr2.RelevancePrice' style="font-size: 30rpx;" :style="{ color: pricecolor }">
<Text style="40rpx">{{attr2.RelevancePrice}}</Text>
</view>
</view>
<!-- 新增绑定物品 -->
......@@ -136,7 +137,13 @@
</view>
</view>
<!-- 布局修改 -->
</view>
</view>
</template>
</scroll-view>
</view>
......@@ -172,8 +179,8 @@
<tabbars></tabbars>
</div>
</template>
<script>
</template>
<script>
import tabbars from '@/components/tabbar/index';
import auth from "@/components/auth/index.vue";
......@@ -645,9 +652,20 @@
}
};
</script>
</script>
<style>
.the-binding {
width: 100%;
margin-left: 210rpx;
}
.cent-box {
display: flex;
justify-content: space-between;
width: 100%;
}
<style>
.cartStyle {
height: 100%;
position: relative;
......@@ -685,14 +703,16 @@
align-items: center;
border-bottom: 1rpx solid #f5f5f5;
}
.cartList_item2{
.cartList_item2 {
width: 100%;
padding: 30rpx 30rpx 30rpx 10rpx;
display: flex;
flex-direction: row;
/* align-items: center; */
align-items: center;
border-bottom: 1rpx solid #f5f5f5;
}
}
.cartList .cartList_item .item_input {
width: 200rpx;
height: 60rpx;
......@@ -799,4 +819,4 @@
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>
</style>
......@@ -79,6 +79,7 @@ import style8 from "@/components/cats/style8";
import style9 from "@/components/cats/style9";
import style10 from "@/components/cats/style10";
import style11 from "@/components/cats/style11";
// 新增商品绑定
export default {
data() {
return {
......
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