新增商品详情展示相册
parent
0c9ebcf3e8
commit
4c4c22c803
|
|
@ -0,0 +1,33 @@
|
|||
{{include file="public/header" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- table nav start -->
|
||||
{{include file="site/nav" /}}
|
||||
<!-- table nav end -->
|
||||
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/site/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/site/index', ['nav_type'=>'goods'])}}" enctype="multipart/form-data">
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.common_is_goods_detail_show_photo.name}}<span class="am-form-group-label-tips">{{$data.common_is_goods_detail_show_photo.describe}}</span></label>
|
||||
<select name="{{$data.common_is_goods_detail_show_photo.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_goods_detail_show_photo.error_tips}}" required>
|
||||
{{foreach $common_is_text_list as $v}}
|
||||
<option value="{{$v.id}}" {{if isset($data['common_is_goods_detail_show_photo']['value']) and $data['common_is_goods_detail_show_photo']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
||||
|
|
@ -29,6 +29,9 @@
|
|||
<li {{if $nav_type eq 'search'}}class="am-active"{{/if}} data-type="search">
|
||||
<a href="{{:MyUrl('admin/site/index', ['nav_type'=>'search'])}}">搜索</a>
|
||||
</li>
|
||||
<li {{if $nav_type eq 'goods'}}class="am-active"{{/if}} data-type="goods">
|
||||
<a href="{{:MyUrl('admin/site/index', ['nav_type'=>'goods'])}}">商品</a>
|
||||
</li>
|
||||
<li {{if $nav_type eq 'extends'}}class="am-active"{{/if}} data-type="extends">
|
||||
<a href="{{:MyUrl('admin/site/index', ['nav_type'=>'extends'])}}">扩展项</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ class Goods extends Common
|
|||
'common_app_is_poster_share' => (int) MyC('common_app_is_poster_share'),
|
||||
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
|
||||
'customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
|
||||
'common_is_goods_detail_show_photo' => MyC('common_is_goods_detail_show_photo', 0, true),
|
||||
|
||||
// 站点模式
|
||||
'common_site_type' => (int) MyC('common_site_type', 0, true),
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@ class Goods extends Common
|
|||
// 站点类型 - 展示型模式操作名称
|
||||
$this->assign('common_is_exhibition_mode_btn_text', MyC('common_is_exhibition_mode_btn_text', '立即咨询', true));
|
||||
|
||||
// 是否商品详情页展示相册
|
||||
$this->assign('common_is_goods_detail_show_photo', MyC('common_is_goods_detail_show_photo', 0, true));
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -485,12 +485,24 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 详情内容 -->
|
||||
<div class="details">
|
||||
<div class="spacing-nav-title">
|
||||
<span class="line"></span>
|
||||
<span class="text-wrapper">商品细节</span>
|
||||
</div>
|
||||
<div class="detail-content">{{$goods.content_web|raw}}</div>
|
||||
<div class="detail-content">
|
||||
{{if isset($common_is_goods_detail_show_photo) and $common_is_goods_detail_show_photo eq 1 and !empty($goods.photo)}}
|
||||
<div class="content-photo">
|
||||
{{foreach $goods.photo as $photo}}
|
||||
<li>
|
||||
<img src="{{$photo.images}}" title="{{$goods.title}}" />
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="content-web">{{$goods.content_web|raw}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -102,6 +102,12 @@
|
|||
<text class="line"></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">
|
||||
<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">
|
||||
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ Page({
|
|||
|
||||
goods_video_is_autoplay: false,
|
||||
common_app_is_use_mobile_detail: 1,
|
||||
common_is_goods_detail_show_photo: 0,
|
||||
|
||||
// 在线客服
|
||||
common_app_is_online_service: 0,
|
||||
|
|
@ -130,6 +131,7 @@ Page({
|
|||
|
||||
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
|
||||
common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
|
||||
common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
|
||||
|
||||
common_app_is_limitedtimediscount: data.common_app_is_limitedtimediscount || 0,
|
||||
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ Page({
|
|||
|
||||
goods_video_is_autoplay: false,
|
||||
common_app_is_use_mobile_detail: 1,
|
||||
common_is_goods_detail_show_photo: 0,
|
||||
|
||||
common_app_is_online_service: 0,
|
||||
|
||||
|
|
@ -124,6 +125,7 @@ Page({
|
|||
|
||||
show_field_price_text: data.goods.show_field_price_text == '销售价' ? null : data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null,
|
||||
common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
|
||||
common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
|
||||
common_app_is_online_service: data.common_app_is_online_service || 0,
|
||||
|
||||
common_app_is_limitedtimediscount: data.common_app_is_limitedtimediscount || 0,
|
||||
|
|
|
|||
|
|
@ -95,6 +95,12 @@
|
|||
<text class="line"></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">
|
||||
<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">
|
||||
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ Page({
|
|||
|
||||
goods_video_is_autoplay: false,
|
||||
common_app_is_use_mobile_detail: 1,
|
||||
common_is_goods_detail_show_photo: 0,
|
||||
|
||||
common_app_is_online_service: 0,
|
||||
|
||||
|
|
@ -144,6 +145,7 @@ Page({
|
|||
|
||||
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
|
||||
common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
|
||||
common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
|
||||
//common_app_is_online_service: data.common_app_is_online_service || 0,
|
||||
|
||||
common_app_is_limitedtimediscount: data.common_app_is_limitedtimediscount || 0,
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@
|
|||
<text class="line"></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">
|
||||
<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">
|
||||
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<import src="/pages/common/nodata.ttml" />
|
||||
<template is="nodata" data="{{status: 2, msg: '展示型不允许提交订单'}}"></template>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<block tt:else>
|
||||
<view tt:if="{{goods_list.length > 0}}" class="page">
|
||||
<!-- 地址 -->
|
||||
<block tt:if="{{common_site_type == 0 || common_site_type == 2}}">
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
</view>
|
||||
|
||||
<!-- 2 处理错误 -->
|
||||
<view wx:elif="{{status == 2}}" class="no-data-box tc">
|
||||
<view tt:elif="{{status == 2}}" class="no-data-box tc">
|
||||
<image src="/images/error.png" mode="widthFix" />
|
||||
<view class="no-data-tips">{{msg || '处理错误'}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 0 默认没有数据 -->
|
||||
<view wx:elif="{{status == 0}}" class="no-data-box tc">
|
||||
<view tt:elif="{{status == 0}}" class="no-data-box tc">
|
||||
<image src="/images/empty.png" mode="widthFix" />
|
||||
<view class="no-data-tips">{{msg || '没有相关数据'}}</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<view tt:if="{{item.portion > 0}}" class="progress-bar {{progress_class[index]}}" style="width: {{item.portion}}%;">{{item.name}}</view>
|
||||
</block>
|
||||
</block>
|
||||
<text wx:else class="cr-888">暂无评分</text>
|
||||
<text tt:else class="cr-888">暂无评分</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ Page({
|
|||
|
||||
goods_video_is_autoplay: false,
|
||||
common_app_is_use_mobile_detail: 1,
|
||||
common_is_goods_detail_show_photo: 0,
|
||||
|
||||
common_app_is_online_service: 0,
|
||||
|
||||
|
|
@ -144,6 +145,7 @@ Page({
|
|||
|
||||
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
|
||||
common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
|
||||
common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
|
||||
//common_app_is_online_service: data.common_app_is_online_service || 0,
|
||||
|
||||
common_app_is_limitedtimediscount: data.common_app_is_limitedtimediscount || 0,
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@
|
|||
<text class="line"></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">
|
||||
<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">
|
||||
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
|
||||
|
|
@ -138,7 +144,7 @@
|
|||
</block>
|
||||
|
||||
<!-- 销售型,自提点,虚拟销售 -->
|
||||
<block wx:else>
|
||||
<block tt:else>
|
||||
<button class="bg-warning fl" type="default" bindtap="cart_submit_event" hover-class="none" disabled="{{nav_submit_is_disabled}}">加入购物车</button>
|
||||
<button class="bg-main fl" type="default" bindtap="buy_submit_event" hover-class="none" disabled="{{nav_submit_is_disabled}}">{{nav_submit_text}}</button>
|
||||
</block>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<view class="content">
|
||||
<image class="pay-icon" tt:if="{{params.code == '9000'}}" mode="widthFix" src="{{default_round_success_icon}}" />
|
||||
<image class="pay-icon" wx:else mode="widthFix" src="{{default_round_error_icon}}" />
|
||||
<image class="pay-icon" tt:else mode="widthFix" src="{{default_round_error_icon}}" />
|
||||
<text class="dis-block">{{params.msg}}</text>
|
||||
<view tt:if="{{params.code == '9000'}}" class="price-box">
|
||||
<text class="sales-price">¥{{params.total_price}}</text>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<view class="operation br-t oh">
|
||||
<view class="default fl" bindtap="address_default_event" data-value="{{item.id}}">
|
||||
<image tt:if="{{is_default == item.id}}" class="item-icon" src="/images/default-select-active-icon.png" mode="widthFix" />
|
||||
<image wx:else class="item-icon" src="/images/default-select-icon.png" mode="widthFix" />
|
||||
<image tt:else class="item-icon" src="/images/default-select-icon.png" mode="widthFix" />
|
||||
<text>设为默认地址</text>
|
||||
</view>
|
||||
<button class="fr cr-666 delete-submit br" type="default" size="mini" bindtap="address_delete_event" data-index="{{index}}" data-value="{{item.id}}" hover-class="none">删除</button>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="nav">
|
||||
<block tt:for="{{nav_status_list}}" tt:key="key">
|
||||
<view tt:if="{{nav_status_index == index}}" class="item fl tc cr-main" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
<view wx:else class="item fl tc" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
<view tt:else class="item fl tc" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
|
|
@ -65,5 +65,5 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else class="payment-list oh bg-white tc cr-888">没有支付方式</view>
|
||||
<view tt:else class="payment-list oh bg-white tc cr-888">没有支付方式</view>
|
||||
</component-popup>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="nav">
|
||||
<block tt:for="{{nav_status_list}}" tt:key="key">
|
||||
<view tt:if="{{nav_status_index == index}}" class="item fl tc cr-main" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
<view wx:else class="item fl tc" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
<view tt:else class="item fl tc" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ Page({
|
|||
|
||||
goods_video_is_autoplay: false,
|
||||
common_app_is_use_mobile_detail: 1,
|
||||
common_is_goods_detail_show_photo: 0,
|
||||
|
||||
popup_share_status: false,
|
||||
common_app_is_online_service: 0,
|
||||
|
|
@ -145,6 +146,7 @@ Page({
|
|||
|
||||
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
|
||||
common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
|
||||
common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
|
||||
common_app_is_online_service: data.common_app_is_online_service || 0,
|
||||
|
||||
common_app_is_limitedtimediscount: data.common_app_is_limitedtimediscount || 0,
|
||||
|
|
|
|||
|
|
@ -100,6 +100,12 @@
|
|||
<text class="line"></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">
|
||||
<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">
|
||||
<rich-text nodes="{{goods.content_web || ''}}"></rich-text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue