提交 1bb757a3 编写于 作者: G gongfuxiang

小程序优化

上级 454e1dd6
......@@ -40,7 +40,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......@@ -58,6 +58,7 @@
}
.goods-base {
min-height: 160rpx;
margin-left: 180rpx;
}
/**
......
......@@ -26,7 +26,8 @@
<view class="goods-base">
<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 class="goods-spec cr-888" a:for="{{item.spec}}" a:for-item="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
</view>
......
......@@ -34,7 +34,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -17,7 +17,7 @@
<view class="goods-base">
<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">
<view class="goods-spec cr-888" a:for="{{item.spec}}" a:for-item="spec">
{{spec.type}}:{{spec.value}}
</view>
</block>
......
......@@ -18,6 +18,7 @@
}
.goods-base {
min-height: 160rpx;
margin-left: 180rpx;
}
.goods-title {
line-height: 36rpx;
......@@ -28,7 +29,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......
......@@ -81,60 +81,50 @@ App({
/**
* 启动query参数处理
*/
startup_query(options) {
startup_query(params) {
// 没有启动参数则返回
if ((options.query || null) == null) {
if ((params || null) == null) {
return false;
}
// 启动处理类型
var type = options.query.type || null;
var type = params.type || null;
switch (type) {
// type=page
case 'page':
case "page":
// 页面
var page = options.query.page || null;
var page = params.page || null;
// 参数值
var value = options.query.value || null;
// 附带参数值
var params = null;
// 参数名
var params_field = params.params_field || null;
// 进入逻辑处理
switch (page) {
// 进入店铺 page=shop
case 'shop':
// 参数值
var params_value = params.params_value || null;
// 进入项目详情 page=detail
case 'detail':
if (value != null) {
params = 'id=' + value;
}
break;
// 页面跳转
if (page != null) {
wx.navigateTo({
url: "/pages/" + page + "/" + page + "?" + params_field + "=" + params_value
});
}
break;
// 店铺买单 page=shoppay
case 'shoppay':
if (value != null) {
params = 'shop_id=' + value;
}
break;
// type=view
case "view":
var url = params.url || null;
default:
break;
// 页面跳转
if (url != null) {
wx.navigateTo({
url: '/pages/web-view/web-view?url=' + url
});
}
break;
// 默认
default:
break;
}
// 是否需要进行页面跳转
if (params != null) {
wx.navigateTo({
url: '/pages/' + page + '/' + page + '?' + params
});
}
},
/**
......
......@@ -23,6 +23,7 @@ input[type="digit"],
textarea {
-webkit-appearance: none;
border-radius: 5px;
box-sizing: border-box;
}
/* 导航分割 */
......@@ -222,8 +223,8 @@ textarea {
position: fixed;
left: 0;
bottom: 0;
background: #d2364c;
color: #fff;
background: #d2364c !important;
color: #fff !important;
border: none;
width: 100%;
}
......
......@@ -36,7 +36,7 @@ Page({
];
if(app.fields_check(e.detail.value, validation))
{
wx.showLoading({content: '提交中...'});
wx.showLoading({title: '提交中...'});
this.setData({form_submit_loading: true});
// 网络请求
......
......@@ -31,7 +31,7 @@ Page({
this.setData({ params: JSON.parse(params.data)});
// 删除地址缓存
wx.removeStorageSync({key: app.data.cache_buy_user_address_select_key});
wx.removeStorageSync(app.data.cache_buy_user_address_select_key);
}
},
......@@ -46,14 +46,12 @@ Page({
// 本地缓存地址
if(this.data.is_first == 0)
{
var cache_address = wx.getStorageSync({
key: app.data.cache_buy_user_address_select_key
});
if((cache_address.data || null) != null)
var cache_address = wx.getStorageSync(app.data.cache_buy_user_address_select_key);
if((cache_address || null) != null)
{
this.setData({
address: cache_address.data,
address_id: cache_address.data.id
address: cache_address,
address_id: cache_address.id
});
} else {
this.setData({
......@@ -64,7 +62,7 @@ Page({
}
// 加载loding
wx.showLoading({content: '加载中...'});
wx.showLoading({title: '加载中...'});
this.setData({
data_list_loding_status: 1
});
......@@ -153,7 +151,7 @@ Page({
}
if (app.fields_check(data, validation)) {
// 加载loding
wx.showLoading({content: '提交中...'});
wx.showLoading({title: '提交中...'});
this.setData({ buy_submit_disabled_status: true });
wx.request({
......
......@@ -21,12 +21,12 @@
<!-- 商品 -->
<view class="goods bg-white spacing-mb">
<view wx:for="{{goods_list}}" class="goods-item oh">
<view wx:for="{{goods_list}}" wx:key="key" class="goods-item oh">
<image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
<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:for-item="spec">{{spec.type}}:{{spec.value}}
<view class="goods-spec cr-888" wx:for="{{item.spec}}" wx:key="key" wx:for-item="spec">{{spec.type}}:{{spec.value}}
</view>
</block>
</view>
......@@ -42,11 +42,11 @@
</view>
<!-- 留言 -->
<textarea bindinput="bind_user_note_event" maxlength="60" auto-height placeholder="留言" class="spacing-mb" />
<textarea bindinput="bind_user_note_event" maxlength="60" auto-height placeholder="留言" class="content-textarea bg-white spacing-mb" />
<!-- 扩展数据展示 -->
<view wx:if="{{extension_list.length > 0}}" class="extension-list spacing-mb">
<view wx:for="{{extension_list}}" class="item oh">
<view wx:for="{{extension_list}}" wx:key="key" class="item oh">
<text class="cr-666">{{item.name}}
</text>
<text class="text-tips fr">{{item.tips}}
......@@ -56,7 +56,7 @@
<!-- 支付方式 -->
<view wx:if="{{payment_list.length > 0 && common_order_is_booking != 1}}" class="payment-list bg-white oh">
<view class="item tc fl" wx:for="{{payment_list}}">
<view class="item tc fl" wx:for="{{payment_list}}" wx:key="key">
<view class="item-content br {{(item.selected || '')}}" data-value="{{item.id}}" bindtap="payment_event">
<image wx:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
<text>{{item.name}}</text>
......
......@@ -20,7 +20,7 @@
}
.address-divider {
height: 4px;
background-image: url("/images/buy-address-divider.png");
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAAECAYAAADWIIyPAAAAkklEQVR42mP4jwR+7tr1/4OzM1Xwt46O/6SA3Yd//HeLeU0V3DXjE0H7GGCMvw8f/v/o5UUVT39KTPz/78cPoj398Omf/75Jb6ji6ZSyd/9//PxHnMdBjvyUlEQVT4MC7++DB0R7GuTIlPJ3VPE0KPAePvlDlL1gj3/r6qJaEv+5YwdJSbxn5meqJfGdh74TbS8A1dn662xhNdIAAAAASUVORK5CYII=");
background-repeat-y: no-repeat;
}
.address-detail .text, .goods-title {
......@@ -40,7 +40,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......@@ -58,6 +58,7 @@
}
.goods-base {
min-height: 160rpx;
margin-left: 180rpx;
}
/**
......@@ -120,4 +121,13 @@
}
.extension-list .item .text-tips {
color: #ff8f44;
}
/**
* 留言
*/
.content-textarea {
padding: 10rpx;
min-height: 10vh;
width: 100%;
}
\ No newline at end of file
......@@ -58,6 +58,7 @@
.number-content input {
width: 30px;
background: #fff;
border-radius: 0px;
}
.number-content .number-submit,
.number-content input
......
......@@ -60,7 +60,7 @@ Page({
var self = this;
// 加载loding
wx.showLoading({content: '加载中...'});
wx.showLoading({title: '加载中...'});
this.setData({
data_list_loding_status: 1
});
......@@ -205,7 +205,7 @@ Page({
});
return false;
} else {
wx.showLoading({content: '处理中...'});
wx.showLoading({title: '处理中...'});
wx.request({
url: app.get_request_url('favor', 'goods'),
......@@ -246,7 +246,7 @@ Page({
});
return false;
} else {
wx.showLoading({ content: '处理中...' });
wx.showLoading({title: '处理中...' });
wx.request({
url: app.get_request_url('save', 'cart'),
method: 'POST',
......
......@@ -105,7 +105,7 @@
<view wx:if="{{goods_specifications_choose.length > 0}}" class="goods-attr-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="attribute">
<view wx:if="{{item.value.length > 0}}" class="spec">
<block wx:for="{{item.value}}" wx:key="key" wx:for-index="keys" wx: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 wx:if="{{(items.images || null) != null}}" src="{{items.images}}" mode="scaleToFill" />
......
......@@ -50,7 +50,7 @@
.goods-popup-content .title {
font-size: 36rpx;
}
.goods-attr-choose .item .attribute button {
.goods-attr-choose .item .spec button {
margin-top: 20rpx;
margin-right: 25rpx;
padding: 0 30rpx;
......@@ -60,7 +60,7 @@
height: 27px;
border: 1px solid #d5d5d5;
}
.goods-attr-choose .item .attribute button image {
.goods-attr-choose .item .spec button image {
width: 20px;
height: 20px;
vertical-align: middle;
......@@ -87,7 +87,7 @@
.spec-items-disabled image {
opacity: 0.3;
}
.goods-attr-choose .item .attribute button,
.goods-attr-choose .item .spec button,
.goods-popup-submit
{
border-radius: 50rpx;
......@@ -123,6 +123,7 @@
.goods-popup .number-content input {
width: 50px;
background: #fff;
border-radius: 0px;
}
.goods-popup .number-content .number-submit,
.goods-popup .number-content input
......
......@@ -51,7 +51,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......
......@@ -37,7 +37,7 @@
</scroll-view>
<!-- 筛选条件 popup -->
<component-popup prop-show="{{is_show_popup_form}}" prop-position="right" prop-onclose="popup_form_event_close">
<component-popup prop-show="{{is_show_popup_form}}" prop-position="right" bindonclose="popup_form_event_close">
<form bindsubmit="form_submit_event" class="popup-form oh bg-white">
<view class="item oh screening-price">
<view class="title cr-666">价格区间(元)
......
......@@ -2,7 +2,7 @@
<view wx:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto">
<view class="search-content bg-white oh">
<icon type="search" size="16" />
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" onConfirm="search_input_event" />
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" bindconfirm="search_input_event" confirm-type="search" />
</view>
</view>
......
......@@ -62,6 +62,10 @@ Page({
this.setData({
user: app.get_user_cache_info() || null
});
if((this.data.user.mobile || null) != null)
{
wx.navigateBack();
}
},
/**
......@@ -83,7 +87,7 @@ Page({
{
// 网络请求
var $this = this;
wx.showLoading({content: '发送中...'});
wx.showLoading({title: '发送中...'});
this.setData({verify_submit_text: '发送中', verify_loading: true, verify_disabled: true});
wx.request({
......@@ -146,7 +150,7 @@ Page({
e.detail.value['app_type'] = 'weixin';
if(app.fields_check(e.detail.value, validation))
{
wx.showLoading({content: '处理中...'});
wx.showLoading({title: '处理中...'});
this.setData({form_submit_loading: true});
// 网络请求
......
......@@ -38,7 +38,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......
......@@ -55,7 +55,7 @@ Page({
get_user_address() {
var self = this;
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
wx.request({
url: app.get_request_url("detail", "useraddress"),
......@@ -257,7 +257,7 @@ Page({
if (app.fields_check(form_data, validation)) {
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
wx.request({
url: app.get_request_url("save", "useraddress"),
......@@ -268,7 +268,7 @@ Page({
success: res => {
wx.hideLoading();
if (res.data.code == 0) {
app.showToast(res.data.msg);
app.showToast(res.data.msg, "success");
setTimeout(function() {
wx.navigateBack();
}, 1000);
......
......@@ -35,7 +35,7 @@ Page({
// 获取数据列表
get_data_list() {
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......@@ -117,7 +117,7 @@ Page({
success: result => {
if (result.confirm) {
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
// 获取数据
wx.request({
......@@ -140,13 +140,11 @@ Page({
app.showToast(res.data.msg, "success");
// 当前删除是否存在缓存中,存在则删除
var cache_address = wx.getStorageSync({
key: app.data.cache_buy_user_address_select_key
});
var cache_address = wx.getStorageSync(app.data.cache_buy_user_address_select_key);
if ((cache_address.data || null) != null) {
if (cache_address.data.id == value) {
// 删除地址缓存
wx.removeStorageSync({ key: app.data.cache_buy_user_address_select_key });
wx.removeStorageSync(app.data.cache_buy_user_address_select_key);
}
}
......@@ -182,7 +180,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
// 获取数据
wx.request({
......
<view class="page">
<view wx:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" wx:for="{{data_list}}">
<view class="item bg-white spacing-mb" wx:for="{{data_list}}" wx:key="key">
<view bindtap="address_conent_event" data-index="{{index}}">
<view class="base oh">
<text>{{item.name}}</text>
......@@ -17,9 +17,9 @@
<image wx:else class="item-icon" src="/images/default-select-icon.png" mode="widthFix" />
<text>设为默认地址</text>
</view>
<button class="fr cr-666 delete-submit" type="default" size="mini" bindtap="address_delete_event" data-index="{{index}}" data-value="{{item.id}}" hover-class="none">删除</button>
<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>
<navigator url="/pages/user-address-save/user-address-save?id={{item.id}}" open-type="navigate" hover-class="none">
<button class="fr cr-666" type="default" size="mini" bindtap="address_edit_event" hover-class="none">编辑</button>
<button class="fr cr-666 br" type="default" size="mini" bindtap="address_edit_event" hover-class="none">编辑</button>
</navigator>
</view>
</view>
......
......@@ -38,7 +38,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......
......@@ -37,7 +37,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......@@ -132,7 +132,7 @@ Page({
var index = e.currentTarget.dataset.index;
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
wx.request({
url: app.get_request_url("cancel", "usergoodsfavor"),
......
......@@ -37,7 +37,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......@@ -131,7 +131,7 @@ Page({
var index = e.currentTarget.dataset.index;
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
wx.request({
url: app.get_request_url("delete", "usergoodsbrowse"),
......
......@@ -38,7 +38,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......
......@@ -20,7 +20,7 @@ Page({
init() {
var self = this;
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......
......@@ -49,6 +49,6 @@
<view class="nav-back tc wh-auto">
<navigator url="/pages/user-order/user-order" open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888" hover-class="none">返回</button>
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
\ No newline at end of file
......@@ -77,7 +77,7 @@ Page({
}
// 加载loding
wx.showLoading({ content: "加载中..." });
wx.showLoading({title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
......@@ -211,7 +211,7 @@ Page({
// 支付方法
pay_handle(order_id, index) {
// 加载loding
wx.showLoading({ content: "请求中..." });
wx.showLoading({title: "请求中..." });
wx.request({
url: app.get_request_url("pay", "order"),
......@@ -283,7 +283,7 @@ Page({
var index = e.currentTarget.dataset.index;
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
wx.request({
url: app.get_request_url("cancel", "order"),
......@@ -327,7 +327,7 @@ Page({
var index = e.currentTarget.dataset.index;
// 加载loding
wx.showLoading({ content: "处理中..." });
wx.showLoading({title: "处理中..." });
wx.request({
url: app.get_request_url("collect", "order"),
......
......@@ -36,11 +36,11 @@
<view wx:if="{{item.status <= 3}}" class="item-operation tr br-t">
<button wx:if="{{item.status <= 1}}" class="submit-cancel" type="default" size="mini" bindtap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消
</button>
<button wx:if="{{item.status == 1}}" class="submit-pay cr-666" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付
<button wx:if="{{item.status == 1}}" class="submit-pay cr-666 br" type="default" size="mini" bindtap="pay_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">支付
</button>
<button wx:if="{{item.status == 2}}" class="submit-rush cr-666" type="default" size="mini" bindtap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催
<button wx:if="{{item.status == 2}}" class="submit-rush cr-666 br" type="default" size="mini" bindtap="rush_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">催催
</button>
<button wx:if="{{item.status == 3}}" class="submit-success cr-666" type="default" size="mini" bindtap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货
<button wx:if="{{item.status == 3}}" class="submit-success cr-666 br" type="default" size="mini" bindtap="collect_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">收货
</button>
</view>
<view wx:if="{{data_list.length == 0}}">
......
......@@ -18,6 +18,7 @@
}
.goods-base {
min-height: 160rpx;
margin-left: 180rpx;
}
.goods-title {
line-height: 36rpx;
......@@ -28,7 +29,7 @@
.goods-item {
padding: 20rpx 10rpx;
}
.goods-title, .goods-attribute {
.goods-title, .goods-spec {
margin-bottom: 10rpx;
}
.goods-image {
......@@ -46,11 +47,11 @@
bottom: 0;
}
.item-base, .item-describe, .item-operation {
padding: 25rpx 10rpx 20rpx 10rpx;
padding: 25rpx 10rpx 10rpx 10rpx;
}
.submit-cancel {
border: 1px solid #f7c3b3;
color: #f7c3b3;
color: #f7c3b3 !important;
}
.item-operation button:not(:first-child) {
margin-left: 20rpx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册