提交 904c2af7 编写于 作者: D devil

微信小程序优化

上级 4848be36
......@@ -15,7 +15,7 @@
</div>
<div class="am-form-group">
<label>{{$data.admin_login_info_bg_images_rand.name}}</label>
<label>{{$data.admin_login_info_bg_images_rand.name}}<span class="am-form-group-label-tips">{{$data.admin_login_info_bg_images_rand.describe}}</span></label>
<select name="{{$data.admin_login_info_bg_images_rand.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.admin_login_info_bg_images_rand.error_tips}}" required>
{{foreach $common_is_enable_list as $v}}
<option value="{{$v.id}}" {{if isset($data['admin_login_info_bg_images_rand']['value']) and $data['admin_login_info_bg_images_rand']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
......
......@@ -26,23 +26,30 @@
</ul>
{{foreach $goods_category_list as $k=>$v}}
<div class="category-content category-content-{{$k}} am-fr am-padding-vertical-xs {{if $k neq 0}} none{{/if}}">
{{if !empty($v['vice_name']) or !empty($v['describe'])}}
<div class="category-item am-padding-sm am-margin-bottom-sm one-cetegory">
<a href="{{:MyUrl('index/search/index', ['category_id'=>$v['id']])}}" title="{{$v.name}}">
<div>
{{if !empty($v['vice_name'])}}
<strong {{if !empty($v['bg_color'])}}style="color:{{$v.bg_color}};"{{/if}} class="am-text-sm am-margin-right-sm">{{$v.vice_name}}</strong>
{{/if}}
{{if !empty($v['describe'])}}
<span class="am-text-grey">{{$v.describe}}</span>
{{/if}}
</div>
</a>
</div>
{{/if}}
{{if !empty($v['items'])}}
{{foreach $v.items as $vs}}
<div class="category-item am-padding-sm">
<div class="title">
<div class="title-value am-fl">
{{if !empty($vs['icon'])}}
<a href="{{:MyUrl('index/search/index', ['category_id'=>$vs['id']])}}" title="{{$vs.name}}" class="am-block">
<img src="{{$vs.icon}}" alt="{{$vs.name}}" class="category-icon am-block" />
</a>
{{/if}}
<p class="am-margin-top-xs">
<a href="{{:MyUrl('index/search/index', ['category_id'=>$vs['id']])}}" title="{{$vs.name}}">{{$vs.name}}</a>
</p>
<a href="{{:MyUrl('index/search/index', ['category_id'=>$vs['id']])}}" title="{{$vs.name}}">
<div class="am-text-center">
<strong>{{$vs.name}}</strong>
</div>
</div>
</a>
{{if !empty($vs['items'])}}
<ul class="am-margin-top-xs">
<ul class="am-margin-top-sm">
{{foreach $vs.items as $kss=>$vss}}
<li class="am-fl am-text-center">
{{if !empty($vss['icon'])}}
......@@ -62,7 +69,7 @@
{{else /}}
<div class="table-no">
<i class="am-icon-warning"></i>
<span>没有分类数据</span>
<span>没有分类数据</span>
<p class="am-margin-top-lg am-text-center">
<a href="{{:MyUrl('index/search/index', ['category_id'=>$v['id']])}}" class="am-text-secondary" title="查看分类下商品">查看分类下商品 >></a>
</p>
......
......@@ -37,18 +37,16 @@
.category-list-container .category-content .category-item:not(:last-child) {
margin-bottom: 15px;
}
.category-list-container .category-content .one-cetegory a:hover {
text-decoration: none;
}
.category-list-container .category-content ul {
border-top: 1px dotted #e5e5e5;
}
.category-list-container ul.category-nav li,
.category-list-container .category-content .title,
.category-list-container .category-content ul {
overflow: hidden;
}
.category-list-container .category-content .title a {
font-weight: 500;
color: #888;
}
.category-list-container .category-content ul li:not(:last-child) {
margin-right: 20px;
}
......@@ -57,6 +55,9 @@
font-size: 12px;
line-height: 22px;
}
.category-list-container .table-no {
padding: 50px 0;
}
@media only screen and (min-width:640px) {
.category-list-container {
margin-top: 10px;
......
......@@ -163,7 +163,7 @@ textarea {
width: 33.3%;
}
.data-bottom-line .left, .data-bottom-line .right{
margin-top: 5px;
margin-top: 8px;
border-bottom: 1px solid #e1e1e1;
}
.data-bottom-line .msg{
......
......@@ -17,6 +17,7 @@
color: #666;
border-left: 3px solid #ececec;
border-right: 3px solid #ececec;
overflow: hidden;
}
.left-nav .items:not(:last-child) {
border-bottom: 1px solid #e6e6e6;
......
......@@ -170,7 +170,7 @@ textarea {
width: 33.3%;
}
.data-bottom-line .left, .data-bottom-line .right{
margin-top: 5px;
margin-top: 8px;
border-bottom: 1px solid #e1e1e1;
}
.data-bottom-line .msg{
......
......@@ -17,6 +17,7 @@
color: #666;
border-left: 3px solid #ececec;
border-right: 3px solid #ececec;
overflow: hidden;
}
.left-nav .items:not(:last-child) {
border-bottom: 1px solid #e6e6e6;
......
......@@ -170,7 +170,7 @@ textarea {
width: 33.3%;
}
.data-bottom-line .left, .data-bottom-line .right{
margin-top: 5px;
margin-top: 8px;
border-bottom: 1px solid #e1e1e1;
}
.data-bottom-line .msg{
......
......@@ -17,6 +17,7 @@
color: #666;
border-left: 3px solid #ececec;
border-right: 3px solid #ececec;
overflow: hidden;
}
.left-nav .items:not(:last-child) {
border-bottom: 1px solid #e6e6e6;
......
......@@ -171,7 +171,7 @@ textarea {
width: 33.3%;
}
.data-bottom-line .left, .data-bottom-line .right{
margin-top: 5px;
margin-top: 8px;
border-bottom: 1px solid #e1e1e1;
}
.data-bottom-line .msg{
......
......@@ -17,6 +17,7 @@
color: #666;
border-left: 3px solid #ececec;
border-right: 3px solid #ececec;
overflow: hidden;
}
.left-nav .items:not(:last-child) {
border-bottom: 1px solid #e6e6e6;
......
......@@ -68,7 +68,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
......@@ -698,4 +698,12 @@ App({
}
},
// 显示分享菜单
show_share_menu() {
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
});
},
});
\ No newline at end of file
......@@ -170,7 +170,7 @@ textarea {
width: 33.3%;
}
.data-bottom-line .left, .data-bottom-line .right{
margin-top: 5px;
margin-top: 8px;
border-bottom: 1px solid #e1e1e1;
}
.data-bottom-line .msg{
......
......@@ -74,7 +74,7 @@
margin-bottom: 5rpx;
}
.goods-item {
padding: 5rpx 0;
padding: 10rpx 0;
}
.goods-image {
width: 160rpx;
......@@ -163,6 +163,7 @@
.content-textarea-view,
.content-textarea-view textarea {
height: 180rpx;
padding: 5rpx;
}
.content-textarea-view view {
padding: 12rpx;
......
const app = getApp();
Page({
data: {
tab_active: 0,
tab_active_text_color: '#d2364c',
tab_active_line_color: '#d2364c',
data_list_loding_status: 1,
data_bottom_line_status: false,
nav_active_index: 0,
data_list: [],
data_content: [],
data_content: null,
},
onShow() {
wx.setNavigationBarTitle({title: app.data.common_pages_title.goods_category});
this.init();
// 显示分享菜单
app.show_share_menu();
},
// 获取数据
......@@ -34,10 +34,11 @@ Page({
if (res.data.code == 0) {
var data = res.data.data;
var data_content = [];
var index = this.data.nav_active_index || 0;
if (data.length > 0)
{
data[0]['active'] = 'nav-active';
data_content = data[0]['items'];
data[index]['active'] = 'nav-active';
data_content = data[index];
}
this.setData({
data_list: data,
......@@ -80,7 +81,8 @@ Page({
}
this.setData({
data_list: temp_data,
data_content: temp_data[index]['items'],
data_content: temp_data[index],
nav_active_index: index,
});
},
......
<view class='left-nav'>
<block wx:for="{{data_list}}" wx:key="key">
<view class='items {{item.active || ""}}' data-index="{{index}}" bindtap='nav_event'>
<text>{{item.name}}</text>
</view>
</block>
</view>
<view class='right-content bg-white'>
<block wx:if="{{data_content.length > 0}}">
<block wx:for="{{data_content}}" wx:key="keys" wx:for-item="v">
<view class="content-items" data-value="{{v.id}}" bindtap="category_event">
<image wx:if="{{(v.icon || null) != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{v.name}}</view>
<view wx:if="{{data_list.length > 0}}">
<view class='left-nav'>
<block wx:for="{{data_list}}" wx:key="key">
<view class='items {{item.active || ""}}' data-index="{{index}}" bindtap='nav_event'>
<text>{{item.name}}</text>
</view>
</block>
</block>
</view>
<view class='right-container'>
<!-- 一级 -->
<view wx:if="{{(data_content || null) != null}}" class="right-content">
<view wx:if="{{(data_content.vice_name || null) != null || (data_content.describe || null) != null}}" class="one-content bg-white" data-value="{{data_content.id}}" bindtap="category_event">
<view wx:if="{{(data_content.vice_name || null) != null}}" class="one-vice-name cr-main" style="color:{{data_content.bg_color}};">{{data_content.vice_name}}</view>
<view wx:if="{{(data_content.describe || null) != null}}" class="one-desc">{{data_content.describe}}</view>
</view>
<!-- 二级 -->
<block wx:if="{{data_content.items.length > 0}}">
<block wx:for="{{data_content.items}}" wx:key="key" wx:for-item="v">
<view class="content-tow bg-white oh">
<view class="tc two-name" data-value="{{v.id}}" bindtap="category_event">{{v.name}}</view>
<!-- 三级 -->
<block wx:if="{{v.items.length > 0}}">
<block wx:for="{{v.items}}" wx:key="key" wx:for-item="vs">
<view class="content-three" data-value="{{vs.id}}" bindtap="category_event">
<image wx:if="{{(vs.icon || null) != null}}" src="{{vs.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{vs.name}}</view>
</view>
</block>
</block>
</view>
</block>
</block>
<block wx:else>
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: 0, msg: '没有子分类数据'}}"></template>
</block>
</view>
</view>
</view>
<view wx:if="{{data_list.length == 0 && data_list_loding_status != 0}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
</view>
\ No newline at end of file
/**
左侧导航
*/
* 左侧导航
*/
.left-nav {
height: 100vh;
background: #ececec;
width: 230rpx;
background: #fff;
width: 210rpx;
overflow-x: hidden;
overflow-y: auto;
}
......@@ -15,43 +15,62 @@
padding: 0 10rpx;
text-align: center;
color: #666;
border-left: 3px solid #ececec;
border-right: 3px solid #ececec;
border-left: 3px solid #fff;
border-right: 3px solid #fff;
overflow: hidden;
}
.left-nav .items:not(:last-child) {
border-bottom: 1px solid #e6e6e6;
border-bottom: 1px solid #f1f1f1;
}
.nav-active {
background: #f5f5f5;
border-left: 3px solid #e23f36 !important;
border-right: 3px solid #fff !important;
border-right: 3px solid #f5f5f5 !important;
color: #e23f36;
background: #fff;
}
/**
右侧内容
*/
.right-content {
* 右侧内容
*/
.right-container {
height: 100vh;
width: calc( 100% - 230rpx );
width: calc( 100% - 210rpx );
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
right: 0;
background: #f5f5f5;
}
.right-content, .one-content {
padding: 20rpx;
}
.one-vice-name {
font-size: 30rpx;
font-weight: 500;
}
.content-items {
.one-desc {
color: #999;
margin-top: 10rpx;
}
.two-name {
font-weight: bold;
font-size: 32rpx;
background: #f5f5f5;
padding: 20rpx 10rpx;
}
.content-three {
float: left;
width: calc(33.33% - 20rpx);
padding: 20rpx 10rpx;
padding: 25rpx 10rpx;
text-align: center;
}
.content-items .text {
.content-three .text {
font-size: 28rpx;
line-height: 46rpx;
}
.content-items .icon {
.content-three .icon {
width: 100%;
height: 120rpx;
}
\ No newline at end of file
}
......@@ -87,6 +87,9 @@ Page({
//params['goods_id']=2;
this.setData({params: params});
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {
......
......@@ -21,6 +21,9 @@ Page({
onLoad(params) {
this.setData({params: params, post_data: params});
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {
......
......@@ -24,6 +24,9 @@ Page({
onShow() {
this.init();
// 显示分享菜单
app.show_share_menu();
},
// 获取数据列表
......
......@@ -15,6 +15,9 @@ Page({
onLoad(params) {
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {
......
......@@ -10,6 +10,9 @@ Page({
onLoad(params) {
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {},
......
......@@ -15,6 +15,9 @@ Page({
//params['id'] = 1;
this.setData({ params: params });
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {},
......
......@@ -12,6 +12,9 @@ Page({
onShow() {
this.init();
// 显示分享菜单
app.show_share_menu();
},
init() {
......
......@@ -37,6 +37,9 @@ Page({
nav_status_index: nav_status_index,
});
this.init();
// 显示分享菜单
app.show_share_menu();
},
onShow() {},
......
......@@ -45,12 +45,13 @@ Page({
self.setData({
detail: data.data,
detail_list:[
{name: "订单号", value: data.data.order_no || ''},
{name: "出货仓库", value: data.data.warehouse_name || ''},
{name: "订单模式", value: data.data.order_model_name || '' },
{name: "状态", value: data.data.status_name || ''},
{name: "订单编号", value: data.data.order_no || ''},
{name: "订单状态", value: data.data.status_name || ''},
{name: "支付状态", value: data.data.pay_status_name || ''},
{name: "单价", value: data.data.price || ''},
{name: "总价", value: data.data.total_price || ''},
{name: "订单单价", value: data.data.price || ''},
{name: "订单总价", value: data.data.total_price || ''},
{name: "优惠金额", value: data.data.preferential_price || ''},
{name: "增加金额", value: data.data.increase_price || '' },
{name: "支付金额", value: data.data.pay_price || ''},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册