提交 5141582c 编写于 作者: D devil

小程序商品参数

上级 e89e815b
......@@ -66,9 +66,10 @@ class Goods extends Common
'id' => $goods_id,
'is_delete_time' => 0,
],
'is_photo' => true,
'is_spec' => true,
'is_content_app' => ($is_use_mobile_detail == 1),
'is_photo' => true,
'is_spec' => true,
'is_params' => true,
'is_content_app' => ($is_use_mobile_detail == 1),
];
$ret = GoodsService::GoodsList($params);
if(empty($ret['data'][0]) || $ret['data'][0]['is_delete_time'] != 0)
......
......@@ -1413,15 +1413,16 @@ function RequestGet($value)
*/
function CurlGet($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_URL, $url);
$result = curl_exec($curl);
curl_close($curl);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 500);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
......@@ -1443,6 +1444,8 @@ function CurlPost($url, $post, $is_json = false)
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $url);
// 是否 json
......@@ -1464,9 +1467,17 @@ function CurlPost($url, $post, $is_json = false)
);
}
// 返回结果
$result = curl_exec($ch);
curl_close($ch);
return $result;
if($result !== false)
{
curl_close($ch);
return $result;
} else {
$error = curl_errno($ch);
curl_close($ch);
return "curl出错,错误码:$error";
}
}
/**
......
......@@ -845,13 +845,25 @@ class WarehouseGoodsService
$md5_key = md5($md5_key);
// 扣除仓库商品规格库存
if(!Db::name('WarehouseGoodsSpec')->where(['warehouse_id'=>$warehouse_id, 'goods_id'=>$goods_id, 'md5_key'=>$md5_key])->setDec('inventory', $buy_number))
$where = ['warehouse_id'=>$warehouse_id, 'goods_id'=>$goods_id, 'md5_key'=>$md5_key];
$inventory = Db::name('WarehouseGoodsSpec')->where($where)->value('inventory');
if($inventory < $buy_number)
{
return DataReturn('仓库商品规格库存不足['.$warehouse_id.'-'.$goods_id.'('.$inventory.'<'.$buy_number.')]', -11);
}
if(!Db::name('WarehouseGoodsSpec')->where($where)->setDec('inventory', $buy_number))
{
return DataReturn('仓库商品规格库存扣减失败['.$warehouse_id.'-'.$goods_id.'('.$buy_number.')]', -11);
}
// 扣除仓库商品库存
if(!Db::name('WarehouseGoods')->where(['warehouse_id'=>$warehouse_id, 'goods_id'=>$goods_id])->setDec('inventory', $buy_number))
$where = ['warehouse_id'=>$warehouse_id, 'goods_id'=>$goods_id];
$inventory = Db::name('WarehouseGoods')->where($where)->value('inventory');
if($inventory < $buy_number)
{
return DataReturn('仓库商品库存不足['.$warehouse_id.'-'.$goods_id.'('.$inventory.'<'.$buy_number.')]', -11);
}
if(!Db::name('WarehouseGoods')->where($where)->setDec('inventory', $buy_number))
{
return DataReturn('仓库商品库存扣减失败['.$warehouse_id.'-'.$goods_id.'('.$buy_number.')]', -12);
}
......
......@@ -39,7 +39,6 @@ App({
common_pages_title: {
"goods_search": "商品搜索",
"goods_detail": "商品详情",
"goods_attribute": "属性",
"user_address": "我的地址",
"user_address_save_add": "新增地址",
"user_address_save_edit": "编辑地址",
......
......@@ -10,7 +10,6 @@
"pages/goods-search/goods-search",
"pages/goods-detail/goods-detail",
"pages/goods-comment/goods-comment",
"pages/goods-attribute/goods-attribute",
"pages/buy/buy",
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
......
......@@ -14,7 +14,7 @@
.goods-item:not(:last-child) {
border-bottom: 1px solid #eee;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -16,7 +16,7 @@
<view class="goods-title multi-text">{{item.title}}
</view>
<block a:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" a:for="{{item.spec}}" a:for-item="spec">{{spec.type}}:{{spec.value}}</view>
<view class="goods-spec cr-888" a:for="{{item.spec}}" a:for-item="spec">{{spec.type}}:{{spec.value}}</view>
</block>
</view>
<!-- 数量 -->
......
.goods-attribute {
padding: 0 10rpx;
}
.goods-attribute .item {
padding: 20rpx 0;
}
.goods-attribute .item .title {
width: 25%;
}
.goods-attribute .item .content {
width: calc(75% - 30rpx);
margin-left: 20rpx;
}
.goods-attribute .item view {
line-height: 46rpx;
}
\ No newline at end of file
<view a:if="{{goods_attribute.length > 0}}" class="goods-attribute bg-white">
<view a:for="{{goods_attribute}}" class="item br-b oh">
<view class="title fl br-r">{{item.name}}</view>
<view class="content cr-888 fl">
<text a:for="{{item.find}}" a:for-index="keys" a:for-item="items">
<text>{{items.name}}</text>
<text a:if="{{keys < item.find.length-1}}"> , </text>
</text>
</view>
</view>
</view>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888" hover-class="none">返回</button>
</navigator>
</view>
const app = getApp();
Page({
data: {
goods_attribute: [],
},
onLoad(params) {
if((params.data || null) == null)
{
my.alert({
title: '温馨提示',
content: '属性数据有误',
buttonText: '返回',
success: () => {
my.navigateBack();
}
});
} else {
this.setData({goods_attribute: JSON.parse(params.data)});
}
},
onShow() {
my.setNavigationBar({title: app.data.common_pages_title.goods_attribute});
},
});
{
"pullRefresh": false
}
\ No newline at end of file
......@@ -2,12 +2,6 @@
height: 55vh !important;
display: block;
}
.goods-attr-show-title {
height: 80rpx;
line-height: 80rpx;
padding: 0 10rpx;
}
.goods-popup {
padding: 20rpx 10rpx;
position: relative;
......@@ -43,14 +37,14 @@
overflow-x: hidden;
margin-top: 20rpx;
}
.goods-attr-choose .item {
.goods-spec-choose .item {
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.goods-popup-content .title {
font-size: 36rpx;
}
.goods-attr-choose .item .attribute button {
.goods-spec-choose .item .spec button {
margin-top: 20rpx;
margin-right: 25rpx;
padding: 0 30rpx;
......@@ -60,7 +54,7 @@
height: 27px;
border: 1px solid #d5d5d5;
}
.goods-attr-choose .item .attribute button image {
.goods-spec-choose .item .spec button image {
width: 20px;
height: 20px;
vertical-align: middle;
......@@ -87,7 +81,7 @@
.spec-items-disabled image {
opacity: 0.3;
}
.goods-attr-choose .item .attribute button,
.goods-spec-choose .item .spec button,
.goods-popup-submit
{
border-radius: 50rpx;
......@@ -207,7 +201,6 @@
.goods-base .base-grid {
margin-top: 15rpx;
padding-top: 15rpx;
border-top: 1px solid #f5f5f5;
}
.goods-base .base-grid view {
width: calc(33.33% - 1px);
......
......@@ -48,7 +48,7 @@
<text class="sales-price">{{price_symbol}}{{goods.price}}</text>
<view a:if="{{(goods.original_price || null) != null && goods.original_price != '0.00'}}" class="original-price">{{price_symbol}}{{goods.original_price}}</view>
</view>
<view class="base-grid oh">
<view class="base-grid br-t oh">
<view class="fl tl">
<text class="cr-888">累计销量</text>
<text class="cr-main">{{goods.sales_count}}</text>
......@@ -91,30 +91,30 @@
<!-- 属性导航 -->
<!-- <view a:if="{{false}}" class="spacing">
<view class="goods-attr-show-title bg-white arrow-right cr-666" onTap="good_attribute_nav_event">
<view class="goods-spec-show-title bg-white arrow-right cr-666" onTap="good_spec_nav_event">
属性
</view>
</view> -->
<!-- 商品详情 -->
<view class="goods-detail spacing">
<view class="goods-detail spacing-mt spacing bg-white">
<view class="spacing-nav-title">
<text class="line"></text>
<text class="text-wrapper">详情</text>
<text class="text-wrapper">商品详情</text>
</view>
<!-- 是否详情展示相册 -->
<block a:if="{{common_is_goods_detail_show_photo == 1 && goods_photo.length > 0}}">
<view a:for="{{goods_photo}}" a:key="key" class="goods-detail-photo bg-white">
<view a:for="{{goods_photo}}" a:key="key" class="goods-detail-photo">
<image a:if="{{(item.images || null) != null}}" onTap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
</view>
</block>
<!-- web详情 -->
<view a:if="{{common_app_is_use_mobile_detail == 0}}" class="bg-white">
<view a:if="{{common_app_is_use_mobile_detail == 0}}">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<block a:if="{{common_app_is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<view a:for="{{goods_content_app}}" class="goods-detail-app bg-white">
<view a:for="{{goods_content_app}}" class="goods-detail-app">
<image a:if="{{(item.images || null) != null}}" onTap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
<view a:if="{{(item.content || null) != null}}" class="content-items">
<view a:for="{{item.content}}" a:for-item="items">{{items}}</view>
......@@ -176,11 +176,11 @@
</view>
<view class="goods-popup-content">
<!-- 商品属性 -->
<view a:if="{{goods_specifications_choose.length > 0}}" class="goods-attr-choose">
<!-- 商品规格 -->
<view a:if="{{goods_specifications_choose.length > 0}}" class="goods-spec-choose">
<view a:for="{{goods_specifications_choose}}" a:for-index="key" class="item br-b">
<view class="title">{{item.name}}</view>
<view a:if="{{item.value.length > 0}}" class="attribute">
<view a:if="{{item.value.length > 0}}" class="spec">
<block a:for="{{item.value}}" a:for-index="keys" a:for-item="items">
<button catchTap="goods_specifications_event" data-key="{{key}}" data-keys="{{keys}}" type="default" size="mini" hover-class="none" class="{{items.is_active}} {{items.is_dont}} {{items.is_disabled}}">
<image a:if="{{(items.images || null) != null}}" src="{{items.images}}" mode="scaleToFill" />
......
......@@ -80,11 +80,6 @@ Page({
// 获取数据列表
init() {
// 数据初始化
this.setData({
temp_attribute_active: {}
});
// 参数校验
if((this.data.params.goods_id || null) == null)
{
......@@ -262,13 +257,6 @@ Page({
this.init();
},
// 进入商品属性事件
good_attribute_nav_event(e) {
my.navigateTo({
url: "/pages/goods-attribute/goods-attribute?data="+JSON.stringify(this.data.goods_attribute_show)
});
},
// 弹层关闭
popup_close_event(e) {
this.setData({popup_status: false});
......
......@@ -47,7 +47,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -11,7 +11,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -7,7 +7,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{order_data.items.title}}</view>
<block a:if="{{order_data.items.spec != null}}">
<view class="goods-attribute cr-888" a:for="{{order_data.items.spec}}" a:for-item="spec" a:key="spec">
<view class="goods-spec cr-888" a:for="{{order_data.items.spec}}" a:for-item="spec" a:key="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -39,7 +39,6 @@ App({
common_pages_title: {
"goods_search": "商品搜索",
"goods_detail": "商品详情",
"goods_attribute": "属性",
"user_address": "我的地址",
"user_address_save_add": "新增地址",
"user_address_save_edit": "编辑地址",
......
......@@ -10,7 +10,6 @@
"pages/goods-search/goods-search",
"pages/goods-detail/goods-detail",
"pages/goods-comment/goods-comment",
"pages/goods-attribute/goods-attribute",
"pages/buy/buy",
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
......
......@@ -14,7 +14,7 @@
.goods-item:not(:last-child) {
border-bottom: 1px solid #eee;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -16,7 +16,7 @@
<view class="goods-title multi-text">{{item.title}}
</view>
<block s-if="item.spec != null">
<view class="goods-attribute cr-888" s-for="spec, index in item.spec" s-key="key">{{spec.type}}:{{spec.value}}</view>
<view class="goods-spec cr-888" s-for="spec, index in item.spec" s-key="key">{{spec.type}}:{{spec.value}}</view>
</block>
</view>
<!-- 数量 -->
......
.goods-attribute {
padding: 0 10rpx;
}
.goods-attribute .item {
padding: 20rpx 0;
}
.goods-attribute .item .title {
width: 25%;
}
.goods-attribute .item .content {
width: calc(75% - 30rpx);
margin-left: 20rpx;
}
.goods-attribute .item view {
line-height: 46rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
goods_attribute: []
},
onLoad(params) {
if ((params.data || null) == null) {
swan.alert({
title: '温馨提示',
content: '属性数据有误',
buttonText: '返回',
success: () => {
swan.navigateBack();
}
});
} else {
this.setData({ goods_attribute: JSON.parse(params.data) });
}
},
onShow() {
swan.setNavigationBarTitle({ title: app.data.common_pages_title.goods_attribute });
}
});
\ No newline at end of file
{
"enablePullDownRefresh": false
}
\ No newline at end of file
<view s-if="goods_attribute.length > 0" class="goods-attribute bg-white">
<view s-for="item, index in goods_attribute" class="item br-b oh">
<view class="title fl br-r">{{item.name}}</view>
<view class="content cr-888 fl">
<text s-for="items, keys in item.find">
<text>{{items.name}}</text>
<text s-if="keys < item.find.length-1"> , </text>
</text>
</view>
</view>
</view>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888" hover-class="none">返回</button>
</navigator>
</view>
......@@ -2,12 +2,6 @@
height: 55vh !important;
display: block;
}
.goods-attr-show-title {
height: 80rpx;
line-height: 80rpx;
padding: 0 10rpx;
}
.goods-popup {
padding: 20rpx 10rpx;
position: relative;
......@@ -43,14 +37,14 @@
overflow-x: hidden;
margin-top: 20rpx;
}
.goods-attr-choose .item {
.goods-spec-choose .item {
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.goods-popup-content .title {
font-size: 36rpx;
}
.goods-attr-choose .item .spec button {
.goods-spec-choose .item .spec button {
margin-top: 20rpx;
margin-right: 25rpx;
padding: 0 30rpx;
......@@ -60,7 +54,7 @@
height: 27px;
border: 1px solid #d5d5d5;
}
.goods-attr-choose .item .spec button image {
.goods-spec-choose .item .spec button image {
width: 20px;
height: 20px;
vertical-align: middle;
......@@ -87,7 +81,7 @@
.spec-items-disabled image {
opacity: 0.3;
}
.goods-attr-choose .item .spec button,
.goods-spec-choose .item .spec button,
.goods-popup-submit
{
border-radius: 50rpx;
......@@ -205,7 +199,6 @@
.goods-base .base-grid {
margin-top: 15rpx;
padding-top: 15rpx;
border-top: 1px solid #f5f5f5;
}
.goods-base .base-grid view {
width: calc(33.33% - 1px);
......
......@@ -75,11 +75,6 @@ Page({
// 获取数据列表
init() {
// 数据初始化
this.setData({
temp_attribute_active: {}
});
// 参数校验
if ((this.data.params.goods_id || null) == null) {
swan.stopPullDownRefresh();
......@@ -232,13 +227,6 @@ Page({
this.init();
},
// 进入商品属性事件
good_attribute_nav_event(e) {
swan.navigateTo({
url: "/pages/goods-attribute/goods-attribute?data=" + JSON.stringify(this.data.goods_attribute_show)
});
},
// 购买弹层关闭
popup_close_event(e) {
this.setData({ popup_status: false });
......
......@@ -41,7 +41,7 @@
<text class="sales-price">{{price_symbol}}{{goods.price}}</text>
<view s-if="(goods.original_price || null) != null && goods.original_price != '0.00'" class="original-price">{{price_symbol}}{{goods.original_price}}</view>
</view>
<view class="base-grid oh">
<view class="base-grid br-t oh">
<view class="fl tl">
<text class="cr-888">累计销量</text>
<text class="cr-main">{{goods.sales_count}}</text>
......@@ -84,30 +84,30 @@
<!-- 属性导航 -->
<!-- <view wx:if="{{false}}" class="spacing">
<view class="goods-attr-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
<view class="goods-spec-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
属性
</view>
</view> -->
<!-- 商品详情 -->
<view class="goods-detail spacing">
<view class="goods-detail spacing-mt spacing bg-white">
<view class="spacing-nav-title">
<text class="line"></text>
<text class="text-wrapper">详情</text>
<text class="text-wrapper">商品详情</text>
</view>
<!-- 是否详情展示相册 -->
<block s-if="common_is_goods_detail_show_photo == 1 && goods_photo.length > 0">
<view s-for="item, index in goods_photo" s-key="key" class="goods-detail-photo bg-white">
<view s-for="item, index in goods_photo" s-key="key" class="goods-detail-photo">
<image s-if="(item.images || null) != null" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
</view>
</block>
<!-- web详情 -->
<view s-if="common_app_is_use_mobile_detail == 0" class="bg-white">
<view s-if="common_app_is_use_mobile_detail == 0">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<block s-if="common_app_is_use_mobile_detail == 1 && goods_content_app.length > 0">
<view s-for="item, index in goods_content_app" s-key="key" class="goods-detail-app bg-white">
<view s-for="item, index in goods_content_app" s-key="key" class="goods-detail-app">
<image s-if="(item.images || null) != null" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
<view s-if="(item.content || null) != null" class="content-items">
<view s-for="items, index in item.content">{{items}}</view>
......@@ -169,8 +169,8 @@
</view>
<view class="goods-popup-content">
<!-- 商品属性 -->
<view s-if="goods_specifications_choose.length > 0" class="goods-attr-choose">
<!-- 商品规格 -->
<view s-if="goods_specifications_choose.length > 0" class="goods-spec-choose">
<view s-for="item, key in goods_specifications_choose" s-key="key" class="item br-b">
<view class="title">{{item.name}}</view>
<view s-if="item.value.length > 0" class="spec">
......
......@@ -47,7 +47,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -23,7 +23,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{item.title}}</view>
<block s-if="item.spec != null">
<view class="goods-attribute cr-888" s-for="spec, index in item.spec" s-key="spec">
<view class="goods-spec cr-888" s-for="spec, index in item.spec" s-key="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -11,7 +11,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -7,7 +7,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{order_data.items.title}}</view>
<block s-if="order_data.items.spec != null">
<view class="goods-attribute cr-888" s-for="spec, index in order_data.items.spec" s-key="spec">
<view class="goods-spec cr-888" s-for="spec, index in order_data.items.spec" s-key="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -39,7 +39,6 @@ App({
common_pages_title: {
"goods_search": "商品搜索",
"goods_detail": "商品详情",
"goods_attribute": "属性",
"user_address": "我的地址",
"user_address_save_add": "新增地址",
"user_address_save_edit": "编辑地址",
......
......@@ -10,7 +10,6 @@
"pages/goods-search/goods-search",
"pages/goods-detail/goods-detail",
"pages/goods-comment/goods-comment",
"pages/goods-attribute/goods-attribute",
"pages/buy/buy",
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
......
......@@ -16,7 +16,7 @@
<view class="goods-title multi-text">{{item.title}}
</view>
<block qq:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" qq:for="{{item.spec}}" qq:key="key" qq:for-item="spec">{{spec.type}}:{{spec.value}}</view>
<view class="goods-spec cr-888" qq:for="{{item.spec}}" qq:key="key" qq:for-item="spec">{{spec.type}}:{{spec.value}}</view>
</block>
</view>
<!-- 数量 -->
......
......@@ -14,7 +14,7 @@
.goods-item:not(:last-child) {
border-bottom: 1px solid #eee;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
const app = getApp();
Page({
data: {
goods_attribute: [],
},
onLoad(params) {
if((params.data || null) == null)
{
qq.alert({
title: '温馨提示',
content: '属性数据有误',
buttonText: '返回',
success: () => {
qq.navigateBack();
}
});
} else {
this.setData({goods_attribute: JSON.parse(params.data)});
}
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.goods_attribute});
},
});
{
"enablePullDownRefresh": false
}
\ No newline at end of file
<view qq:if="{{goods_attribute.length > 0}}" class="goods-attribute bg-white">
<view qq:for="{{goods_attribute}}" class="item br-b oh">
<view class="title fl br-r">{{item.name}}</view>
<view class="content cr-888 fl">
<text qq:for="{{item.find}}" qq:for-index="keys" qq:for-item="items">
<text>{{items.name}}</text>
<text qq:if="{{keys < item.find.length-1}}"> , </text>
</text>
</view>
</view>
</view>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888" hover-class="none">返回</button>
</navigator>
</view>
.goods-attribute {
padding: 0 10rpx;
}
.goods-attribute .item {
padding: 20rpx 0;
}
.goods-attribute .item .title {
width: 25%;
}
.goods-attribute .item .content {
width: calc(75% - 30rpx);
margin-left: 20rpx;
}
.goods-attribute .item view {
line-height: 46rpx;
}
\ No newline at end of file
......@@ -94,11 +94,6 @@ Page({
// 获取数据列表
init() {
// 数据初始化
this.setData({
temp_attribute_active: {}
});
// 参数校验
if((this.data.params.goods_id || null) == null)
{
......@@ -264,13 +259,6 @@ Page({
this.init();
},
// 进入商品属性事件
good_attribute_nav_event(e) {
qq.navigateTo({
url: "/pages/goods-attribute/goods-attribute?data="+JSON.stringify(this.data.goods_attribute_show)
});
},
// 购买弹层关闭
popup_close_event(e) {
this.setData({popup_status: false});
......
......@@ -48,7 +48,7 @@
<text class="sales-price">{{price_symbol}}{{goods.price}}</text>
<view qq:if="{{(goods.original_price || null) != null && goods.original_price != '0.00'}}" class="original-price">{{price_symbol}}{{goods.original_price}}</view>
</view>
<view class="base-grid oh">
<view class="base-grid br-t oh">
<view class="fl tl">
<text class="cr-888">累计销量</text>
<text class="cr-main">{{goods.sales_count}}</text>
......@@ -91,30 +91,30 @@
<!-- 属性导航 -->
<!-- <view qq:if="{{false}}" class="spacing">
<view class="goods-attr-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
<view class="goods-spec-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
属性
</view>
</view> -->
<!-- 商品详情 -->
<view class="goods-detail spacing">
<view class="goods-detail spacing-mt spacing bg-white">
<view class="spacing-nav-title">
<text class="line"></text>
<text class="text-wrapper">详情</text>
<text class="text-wrapper">商品详情</text>
</view>
<!-- 是否详情展示相册 -->
<block qq:if="{{common_is_goods_detail_show_photo == 1 && goods_photo.length > 0}}">
<view qq:for="{{goods_photo}}" qq:key="key" class="goods-detail-photo bg-white">
<view qq:for="{{goods_photo}}" qq:key="key" class="goods-detail-photo">
<image qq:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
</view>
</block>
<!-- web详情 -->
<view qq:if="{{common_app_is_use_mobile_detail == 0}}" class="bg-white">
<view qq:if="{{common_app_is_use_mobile_detail == 0}}">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<block qq:if="{{common_app_is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<view qq:for="{{goods_content_app}}" qq:key="key" class="goods-detail-app bg-white">
<view qq:for="{{goods_content_app}}" qq:key="key" class="goods-detail-app">
<image qq:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
<view qq:if="{{(item.content || null) != null}}" class="content-items">
<view qq:for="{{item.content}}" qq:for-item="items">{{items}}</view>
......@@ -176,8 +176,8 @@
</view>
<view class="goods-popup-content">
<!-- 商品属性 -->
<view qq:if="{{goods_specifications_choose.length > 0}}" class="goods-attr-choose">
<!-- 商品规格 -->
<view qq:if="{{goods_specifications_choose.length > 0}}" class="goods-spec-choose">
<view qq:for="{{goods_specifications_choose}}" qq:key="key" qq:for-index="key" class="item br-b">
<view class="title">{{item.name}}</view>
<view qq:if="{{item.value.length > 0}}" class="spec">
......
......@@ -2,12 +2,6 @@
height: 55vh !important;
display: block;
}
.goods-attr-show-title {
height: 80rpx;
line-height: 80rpx;
padding: 0 10rpx;
}
.goods-popup {
padding: 20rpx 10rpx;
position: relative;
......@@ -43,14 +37,14 @@
overflow-x: hidden;
margin-top: 20rpx;
}
.goods-attr-choose .item {
.goods-spec-choose .item {
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.goods-popup-content .title {
font-size: 36rpx;
}
.goods-attr-choose .item .spec button {
.goods-spec-choose .item .spec button {
margin-top: 20rpx;
margin-right: 25rpx;
padding: 0 30rpx;
......@@ -60,7 +54,7 @@
height: 27px;
border: 1px solid #d5d5d5;
}
.goods-attr-choose .item .spec button image {
.goods-spec-choose .item .spec button image {
width: 20px;
height: 20px;
vertical-align: middle;
......@@ -87,7 +81,7 @@
.spec-items-disabled image {
opacity: 0.3;
}
.goods-attr-choose .item .spec button,
.goods-spec-choose .item .spec button,
.goods-popup-submit
{
border-radius: 50rpx;
......@@ -206,7 +200,6 @@
.goods-base .base-grid {
margin-top: 15rpx;
padding-top: 15rpx;
border-top: 1px solid #f5f5f5;
}
.goods-base .base-grid view {
width: calc(33.33% - 1px);
......
......@@ -23,7 +23,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{item.title}}</view>
<block qq:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" qq:for="{{item.spec}}" qq:key="spec" qq:for-item="spec">
<view class="goods-spec cr-888" qq:for="{{item.spec}}" qq:key="spec" qq:for-item="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -47,7 +47,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -7,7 +7,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{order_data.items.title}}</view>
<block qq:if="{{order_data.items.spec != null}}">
<view class="goods-attribute cr-888" qq:for="{{order_data.items.spec}}" qq:for-item="spec" qq:key="spec">
<view class="goods-spec cr-888" qq:for="{{order_data.items.spec}}" qq:for-item="spec" qq:key="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -11,7 +11,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -39,7 +39,6 @@ App({
common_pages_title: {
"goods_search": "商品搜索",
"goods_detail": "商品详情",
"goods_attribute": "属性",
"user_address": "我的地址",
"user_address_save_add": "新增地址",
"user_address_save_edit": "编辑地址",
......
......@@ -11,7 +11,6 @@
"pages/goods-search/goods-search",
"pages/goods-detail/goods-detail",
"pages/goods-comment/goods-comment",
"pages/goods-attribute/goods-attribute",
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
"pages/user-order/user-order",
......
......@@ -16,7 +16,7 @@
<view class="goods-title multi-text">{{item.title}}
</view>
<block tt:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" tt:for="{{item.spec}}" tt:key="key" tt:for-item="spec">{{spec.type}}:{{spec.value}}</view>
<view class="goods-spec cr-888" tt:for="{{item.spec}}" tt:key="key" tt:for-item="spec">{{spec.type}}:{{spec.value}}</view>
</block>
</view>
<!-- 数量 -->
......
......@@ -14,7 +14,7 @@
.goods-item:not(:last-child) {
border-bottom: 1px solid #eee;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
const app = getApp();
Page({
data: {
goods_attribute: [],
},
onLoad(params) {
if((params.data || null) == null)
{
tt.alert({
title: '温馨提示',
content: '属性数据有误',
buttonText: '返回',
success: () => {
tt.navigateBack();
}
});
} else {
this.setData({goods_attribute: JSON.parse(params.data)});
}
},
onShow() {
tt.setNavigationBarTitle({title: app.data.common_pages_title.goods_attribute});
},
});
{
"enablePullDownRefresh": false
}
\ No newline at end of file
<view tt:if="{{goods_attribute.length > 0}}" class="goods-attribute bg-white">
<view tt:for="{{goods_attribute}}" class="item br-b oh">
<view class="title fl br-r">{{item.name}}</view>
<view class="content cr-888 fl">
<text tt:for="{{item.find}}" tt:for-index="keys" tt:for-item="items">
<text>{{items.name}}</text>
<text tt:if="{{keys < item.find.length-1}}"> , </text>
</text>
</view>
</view>
</view>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888" hover-class="none">返回</button>
</navigator>
</view>
.goods-attribute {
padding: 0 10rpx;
}
.goods-attribute .item {
padding: 20rpx 0;
}
.goods-attribute .item .title {
width: 25%;
}
.goods-attribute .item .content {
width: calc(75% - 30rpx);
margin-left: 20rpx;
}
.goods-attribute .item view {
line-height: 46rpx;
}
\ No newline at end of file
......@@ -94,11 +94,6 @@ Page({
// 获取数据列表
init() {
// 数据初始化
this.setData({
temp_attribute_active: {}
});
// 参数校验
if((this.data.params.goods_id || null) == null)
{
......@@ -264,13 +259,6 @@ Page({
this.init();
},
// 进入商品属性事件
good_attribute_nav_event(e) {
tt.navigateTo({
url: "/pages/goods-attribute/goods-attribute?data="+JSON.stringify(this.data.goods_attribute_show)
});
},
// 购买弹层关闭
popup_close_event(e) {
this.setData({popup_status: false});
......
......@@ -48,7 +48,7 @@
<text class="sales-price">{{price_symbol}}{{goods.price}}</text>
<view tt:if="{{(goods.original_price || null) != null && goods.original_price != '0.00'}}" class="original-price">{{price_symbol}}{{goods.original_price}}</view>
</view>
<view class="base-grid oh">
<view class="base-grid br-t oh">
<view class="fl tl">
<text class="cr-888">累计销量</text>
<text class="cr-main">{{goods.sales_count}}</text>
......@@ -91,30 +91,30 @@
<!-- 属性导航 -->
<!-- <view tt:if="{{false}}" class="spacing">
<view class="goods-attr-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
<view class="goods-spec-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
属性
</view>
</view> -->
<!-- 商品详情 -->
<view class="goods-detail spacing">
<view class="goods-detail spacing-mt spacing bg-white">
<view class="spacing-nav-title">
<text class="line"></text>
<text class="text-wrapper">详情</text>
<text class="text-wrapper">商品详情</text>
</view>
<!-- 是否详情展示相册 -->
<block tt:if="{{common_is_goods_detail_show_photo == 1 && goods_photo.length > 0}}">
<view tt:for="{{goods_photo}}" tt:key="key" class="goods-detail-photo bg-white">
<view tt:for="{{goods_photo}}" tt:key="key" class="goods-detail-photo">
<image tt:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
</view>
</block>
<!-- web详情 -->
<view tt:if="{{common_app_is_use_mobile_detail == 0}}" class="bg-white">
<view tt:if="{{common_app_is_use_mobile_detail == 0}}">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<block tt:if="{{common_app_is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<view tt:for="{{goods_content_app}}" tt:key="key" class="goods-detail-app bg-white">
<view tt:for="{{goods_content_app}}" tt:key="key" class="goods-detail-app">
<image tt:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
<view tt:if="{{(item.content || null) != null}}" class="content-items">
<view tt:for="{{item.content}}" tt:for-item="items">{{items}}</view>
......@@ -176,8 +176,8 @@
</view>
<view class="goods-popup-content">
<!-- 商品属性 -->
<view tt:if="{{goods_specifications_choose.length > 0}}" class="goods-attr-choose">
<!-- 商品规格 -->
<view tt:if="{{goods_specifications_choose.length > 0}}" class="goods-spec-choose">
<view tt:for="{{goods_specifications_choose}}" tt:key="key" tt:for-index="key" class="item br-b">
<view class="title">{{item.name}}</view>
<view tt:if="{{item.value.length > 0}}" class="spec">
......
......@@ -2,12 +2,6 @@
height: 55vh !important;
display: block;
}
.goods-attr-show-title {
height: 80rpx;
line-height: 80rpx;
padding: 0 10rpx;
}
.goods-popup {
padding: 20rpx 10rpx;
position: relative;
......@@ -43,14 +37,14 @@
overflow-x: hidden;
margin-top: 20rpx;
}
.goods-attr-choose .item {
.goods-spec-choose .item {
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.goods-popup-content .title {
font-size: 36rpx;
}
.goods-attr-choose .item .spec button {
.goods-spec-choose .item .spec button {
margin-top: 20rpx;
margin-right: 25rpx;
padding: 0 30rpx;
......@@ -60,7 +54,7 @@
height: 27px;
border: 1px solid #d5d5d5;
}
.goods-attr-choose .item .spec button image {
.goods-spec-choose .item .spec button image {
width: 20px;
height: 20px;
vertical-align: middle;
......@@ -87,7 +81,7 @@
.spec-items-disabled image {
opacity: 0.3;
}
.goods-attr-choose .item .spec button,
.goods-spec-choose .item .spec button,
.goods-popup-submit
{
border-radius: 50rpx;
......@@ -206,7 +200,6 @@
.goods-base .base-grid {
margin-top: 15rpx;
padding-top: 15rpx;
border-top: 1px solid #f5f5f5;
}
.goods-base .base-grid view {
width: calc(33.33% - 1px);
......
......@@ -23,7 +23,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{item.title}}</view>
<block tt:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" tt:for="{{item.spec}}" tt:key="spec" tt:for-item="spec">
<view class="goods-spec cr-888" tt:for="{{item.spec}}" tt:key="spec" tt:for-item="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -47,7 +47,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -7,7 +7,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{order_data.items.title}}</view>
<block tt:if="{{order_data.items.spec != null}}">
<view class="goods-attribute cr-888" tt:for="{{order_data.items.spec}}" tt:for-item="spec" tt:key="spec">
<view class="goods-spec cr-888" tt:for="{{order_data.items.spec}}" tt:for-item="spec" tt:key="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -11,7 +11,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -39,7 +39,6 @@ App({
common_pages_title: {
"goods_search": "商品搜索",
"goods_detail": "商品详情",
"goods_attribute": "属性",
"user_address": "我的地址",
"user_address_save_add": "新增地址",
"user_address_save_edit": "编辑地址",
......@@ -67,15 +66,16 @@ App({
// 请求地址
request_url: "{{request_url}}",
// request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
request_url: 'http://shopxo.com/',
request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
application_describe: "{{application_describe}}",
// 价格符号
price_symbol: "{{price_symbol}}"
price_symbol: "{{price_symbol}}",
price_symbol: ""
},
/**
......
......@@ -11,7 +11,6 @@
"pages/goods-search/goods-search",
"pages/goods-detail/goods-detail",
"pages/goods-comment/goods-comment",
"pages/goods-attribute/goods-attribute",
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
"pages/user-order/user-order",
......
......@@ -16,7 +16,7 @@
<view class="goods-title multi-text">{{item.title}}
</view>
<block wx:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" wx:for="{{item.spec}}" wx:key="key" wx:for-item="spec">{{spec.type}}:{{spec.value}}</view>
<view class="goods-spec cr-888" wx:for="{{item.spec}}" wx:key="key" wx:for-item="spec">{{spec.type}}:{{spec.value}}</view>
</block>
</view>
<!-- 数量 -->
......
......@@ -14,7 +14,7 @@
.goods-item:not(:last-child) {
border-bottom: 1px solid #eee;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
const app = getApp();
Page({
data: {
goods_attribute: [],
},
onLoad(params) {
if((params.data || null) == null)
{
wx.alert({
title: '温馨提示',
content: '属性数据有误',
buttonText: '返回',
success: () => {
wx.navigateBack();
}
});
} else {
this.setData({goods_attribute: JSON.parse(params.data)});
}
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.goods_attribute});
},
});
{
"enablePullDownRefresh": false
}
\ No newline at end of file
<view wx:if="{{goods_attribute.length > 0}}" class="goods-attribute bg-white">
<view wx:for="{{goods_attribute}}" class="item br-b oh">
<view class="title fl br-r">{{item.name}}</view>
<view class="content cr-888 fl">
<text wx:for="{{item.find}}" wx:for-index="keys" wx:for-item="items">
<text>{{items.name}}</text>
<text wx:if="{{keys < item.find.length-1}}"> , </text>
</text>
</view>
</view>
</view>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888" hover-class="none">返回</button>
</navigator>
</view>
.goods-attribute {
padding: 0 10rpx;
}
.goods-attribute .item {
padding: 20rpx 0;
}
.goods-attribute .item .title {
width: 25%;
}
.goods-attribute .item .content {
width: calc(75% - 30rpx);
margin-left: 20rpx;
}
.goods-attribute .item view {
line-height: 46rpx;
}
\ No newline at end of file
......@@ -84,7 +84,7 @@ Page({
params = app.launch_params_handle(params);
// 参数赋值,初始化
//params['goods_id']=2;
params['goods_id']=12;
this.setData({params: params});
this.init();
......@@ -98,11 +98,6 @@ Page({
// 获取数据列表
init() {
// 数据初始化
this.setData({
temp_attribute_active: {}
});
// 参数校验
if((this.data.params.goods_id || null) == null)
{
......@@ -269,13 +264,6 @@ Page({
this.init();
},
// 进入商品属性事件
good_attribute_nav_event(e) {
wx.navigateTo({
url: "/pages/goods-attribute/goods-attribute?data="+JSON.stringify(this.data.goods_attribute_show)
});
},
// 购买弹层关闭
popup_close_event(e) {
this.setData({popup_status: false});
......
......@@ -46,7 +46,7 @@
<text class="sales-price">{{price_symbol}}{{goods.price}}</text>
<view wx:if="{{(goods.original_price || null) != null && goods.original_price != '0.00'}}" class="original-price">{{price_symbol}}{{goods.original_price}}</view>
</view>
<view class="base-grid oh">
<view class="base-grid br-t oh">
<view class="fl tl">
<text class="cr-888">累计销量</text>
<text class="cr-main">{{goods.sales_count}}</text>
......@@ -64,6 +64,18 @@
</view>
</view>
<!-- 商品基础参数 -->
<view wx:if="{{(goods.parameters || null) != null && (goods.parameters.base || null) != null}}" class="goods-parameters parameters-base br-t bg-white spacing">
<view class="content-item oh">
<block wx:for="{{goods.parameters.base}}" wx:key="item">
<view class="item single-text">
<text class="name">{{item.name}}:</text>
<text class="value">{{item.value}}</text>
</view>
</block>
</view>
</view>
<!-- 优惠劵 -->
<view wx:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.data.length > 0}}" class="coupon-container wh-auto spacing-mt bg-white">
<scroll-view scroll-x="true">
......@@ -87,32 +99,41 @@
</scroll-view>
</view>
<!-- 属性导航 -->
<!-- <view wx:if="{{false}}" class="spacing">
<view class="goods-attr-show-title bg-white arrow-right cr-666" bindtap="good_attribute_nav_event">
属性
<!-- 商品详情参数 -->
<view wx:if="{{(goods.parameters || null) != null && (goods.parameters.detail || null) != null}}" class="goods-parameters spacing-mt bg-white">
<view class="spacing-nav-title">
<text class="line"></text>
<text class="text-wrapper">商品参数</text>
</view>
</view> -->
<view class="content-item oh">
<block wx:for="{{goods.parameters.detail}}" wx:key="item">
<view class="item single-text">
<text class="name">{{item.name}}:</text>
<text class="value">{{item.value}}</text>
</view>
</block>
</view>
</view>
<!-- 商品详情 -->
<view class="goods-detail spacing">
<view class="goods-detail spacing-mt spacing bg-white">
<view class="spacing-nav-title">
<text class="line"></text>
<text class="text-wrapper">详情</text>
<text class="text-wrapper">商品详情</text>
</view>
<!-- 是否详情展示相册 -->
<block wx:if="{{common_is_goods_detail_show_photo == 1 && goods_photo.length > 0}}">
<view wx:for="{{goods_photo}}" wx:key="key" class="goods-detail-photo bg-white">
<view wx:for="{{goods_photo}}" wx:key="key" class="goods-detail-photo">
<image wx:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
</view>
</block>
<!-- web详情 -->
<view wx:if="{{common_app_is_use_mobile_detail == 0}}" class="bg-white">
<view wx:if="{{common_app_is_use_mobile_detail == 0}}">
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
</view>
<!-- 手机独立详情 -->
<block wx:if="{{common_app_is_use_mobile_detail == 1 && goods_content_app.length > 0}}">
<view wx:for="{{goods_content_app}}" wx:key="key" class="goods-detail-app bg-white">
<view wx:for="{{goods_content_app}}" wx:key="key" class="goods-detail-app">
<image wx:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
<view wx:if="{{(item.content || null) != null}}" class="content-items">
<view wx:for="{{item.content}}" wx:for-item="items">{{items}}</view>
......@@ -174,8 +195,8 @@
</view>
<view class="goods-popup-content">
<!-- 商品属性 -->
<view wx:if="{{goods_specifications_choose.length > 0}}" class="goods-attr-choose">
<!-- 商品规格 -->
<view wx:if="{{goods_specifications_choose.length > 0}}" class="goods-spec-choose">
<view wx:for="{{goods_specifications_choose}}" wx:key="key" wx:for-index="key" class="item br-b">
<view class="title">{{item.name}}</view>
<view wx:if="{{item.value.length > 0}}" class="spec">
......
......@@ -2,12 +2,6 @@
height: 55vh !important;
display: block;
}
.goods-attr-show-title {
height: 80rpx;
line-height: 80rpx;
padding: 0 10rpx;
}
.goods-popup {
padding: 20rpx 10rpx;
position: relative;
......@@ -43,14 +37,14 @@
overflow-x: hidden;
margin-top: 20rpx;
}
.goods-attr-choose .item {
.goods-spec-choose .item {
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.goods-popup-content .title {
font-size: 36rpx;
}
.goods-attr-choose .item .spec button {
.goods-spec-choose .item .spec button {
margin-top: 20rpx;
margin-right: 25rpx;
padding: 0 30rpx;
......@@ -60,7 +54,7 @@
height: 27px;
border: 1px solid #d5d5d5;
}
.goods-attr-choose .item .spec button image {
.goods-spec-choose .item .spec button image {
width: 20px;
height: 20px;
vertical-align: middle;
......@@ -87,7 +81,7 @@
.spec-items-disabled image {
opacity: 0.3;
}
.goods-attr-choose .item .spec button,
.goods-spec-choose .item .spec button,
.goods-popup-submit
{
border-radius: 50rpx;
......@@ -205,7 +199,6 @@
.goods-base .base-grid {
margin-top: 15rpx;
padding-top: 15rpx;
border-top: 1px solid #f5f5f5;
}
.goods-base .base-grid view {
width: calc(33.33% - 1px);
......@@ -344,4 +337,27 @@
*/
.goods-buy-nav .buy-nav-submit-full button {
width: 100%;
}
/*
* 商品参数
*/
.parameters-base .content-item .item {
color: #666;
}
.goods-parameters .content-item {
padding-bottom: 10rpx;
}
.goods-parameters .content-item .item {
padding: 5rpx 10rpx;
width: calc(50% - 20rpx);
}
.goods-parameters .content-item .item .name {
margin-right: 5rpx;
}
.goods-parameters .content-item .item:nth-child(2n-1) {
float: left;
}
.goods-parameters .content-item .item:nth-child(2n) {
float: right;
}
\ No newline at end of file
......@@ -23,7 +23,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{item.title}}</view>
<block wx:if="{{item.spec != null}}">
<view class="goods-attribute cr-888" wx:for="{{item.spec}}" wx:key="spec" wx:for-item="spec">
<view class="goods-spec cr-888" wx:for="{{item.spec}}" wx:key="spec" wx:for-item="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -47,7 +47,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -7,7 +7,7 @@
<view class="goods-base">
<view class="goods-title multi-text">{{order_data.items.title}}</view>
<block wx:if="{{order_data.items.spec != null}}">
<view class="goods-attribute cr-888" wx:for="{{order_data.items.spec}}" wx:for-item="spec" wx:key="spec">
<view class="goods-spec cr-888" wx:for="{{order_data.items.spec}}" wx:for-item="spec" wx:key="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -11,7 +11,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册