Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
155dca21
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
155dca21
编写于
8月 09, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
支付宝小程序适配
上级
f52243c5
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
467 addition
and
194 deletion
+467
-194
application/admin/form/Order.php
application/admin/form/Order.php
+6
-6
application/index/form/Order.php
application/index/form/Order.php
+6
-6
application/tags.php
application/tags.php
+41
-0
sourcecode/alipay/app.js
sourcecode/alipay/app.js
+1
-1
sourcecode/alipay/pages/buy/buy.acss
sourcecode/alipay/pages/buy/buy.acss
+35
-9
sourcecode/alipay/pages/buy/buy.axml
sourcecode/alipay/pages/buy/buy.axml
+43
-30
sourcecode/alipay/pages/buy/buy.js
sourcecode/alipay/pages/buy/buy.js
+73
-21
sourcecode/alipay/pages/goods-category/goods-category.acss
sourcecode/alipay/pages/goods-category/goods-category.acss
+59
-26
sourcecode/alipay/pages/goods-category/goods-category.axml
sourcecode/alipay/pages/goods-category/goods-category.axml
+68
-14
sourcecode/alipay/pages/goods-category/goods-category.js
sourcecode/alipay/pages/goods-category/goods-category.js
+14
-12
sourcecode/alipay/pages/paytips/paytips.axml
sourcecode/alipay/pages/paytips/paytips.axml
+0
-4
sourcecode/alipay/pages/paytips/paytips.js
sourcecode/alipay/pages/paytips/paytips.js
+0
-1
sourcecode/alipay/pages/user-order-detail/user-order-detail.axml
...ode/alipay/pages/user-order-detail/user-order-detail.axml
+1
-1
sourcecode/alipay/pages/user-order-detail/user-order-detail.js
...ecode/alipay/pages/user-order-detail/user-order-detail.js
+5
-4
sourcecode/alipay/pages/user-order/user-order.acss
sourcecode/alipay/pages/user-order/user-order.acss
+19
-0
sourcecode/alipay/pages/user-order/user-order.axml
sourcecode/alipay/pages/user-order/user-order.axml
+13
-5
sourcecode/alipay/pages/user-order/user-order.js
sourcecode/alipay/pages/user-order/user-order.js
+76
-41
sourcecode/weixin/app.js
sourcecode/weixin/app.js
+1
-1
sourcecode/weixin/pages/buy/buy.js
sourcecode/weixin/pages/buy/buy.js
+0
-6
sourcecode/weixin/pages/buy/buy.wxml
sourcecode/weixin/pages/buy/buy.wxml
+1
-1
sourcecode/weixin/pages/goods-category/goods-category.js
sourcecode/weixin/pages/goods-category/goods-category.js
+0
-1
sourcecode/weixin/pages/user-order-detail/user-order-detail.wxml
...ode/weixin/pages/user-order-detail/user-order-detail.wxml
+1
-1
sourcecode/weixin/pages/user-order/user-order.js
sourcecode/weixin/pages/user-order/user-order.js
+1
-0
sourcecode/weixin/pages/user-order/user-order.wxml
sourcecode/weixin/pages/user-order/user-order.wxml
+2
-2
sourcecode/weixin/pages/user-order/user-order.wxss
sourcecode/weixin/pages/user-order/user-order.wxss
+1
-1
未找到文件。
application/admin/form/Order.php
浏览文件 @
155dca21
...
...
@@ -109,27 +109,27 @@ class Order
],
],
[
'label'
=>
'
单
价(元)'
,
'label'
=>
'
总
价(元)'
,
'view_type'
=>
'field'
,
'view_key'
=>
'price'
,
'view_key'
=>
'
total_
price'
,
'search_config'
=>
[
'form_type'
=>
'section'
,
'is_point'
=>
1
,
],
],
[
'label'
=>
'
总价
(元)'
,
'label'
=>
'
支付金额
(元)'
,
'view_type'
=>
'field'
,
'view_key'
=>
'
total
_price'
,
'view_key'
=>
'
pay
_price'
,
'search_config'
=>
[
'form_type'
=>
'section'
,
'is_point'
=>
1
,
],
],
[
'label'
=>
'
支付金额
(元)'
,
'label'
=>
'
单价
(元)'
,
'view_type'
=>
'field'
,
'view_key'
=>
'p
ay_p
rice'
,
'view_key'
=>
'price'
,
'search_config'
=>
[
'form_type'
=>
'section'
,
'is_point'
=>
1
,
...
...
application/index/form/Order.php
浏览文件 @
155dca21
...
...
@@ -124,27 +124,27 @@ class Order
],
],
[
'label'
=>
'
单
价(元)'
,
'label'
=>
'
总
价(元)'
,
'view_type'
=>
'field'
,
'view_key'
=>
'price'
,
'view_key'
=>
'
total_
price'
,
'search_config'
=>
[
'form_type'
=>
'section'
,
'is_point'
=>
1
,
],
],
[
'label'
=>
'
总价
(元)'
,
'label'
=>
'
支付金额
(元)'
,
'view_type'
=>
'field'
,
'view_key'
=>
'
total
_price'
,
'view_key'
=>
'
pay
_price'
,
'search_config'
=>
[
'form_type'
=>
'section'
,
'is_point'
=>
1
,
],
],
[
'label'
=>
'
支付金额
(元)'
,
'label'
=>
'
单价
(元)'
,
'view_type'
=>
'field'
,
'view_key'
=>
'p
ay_p
rice'
,
'view_key'
=>
'price'
,
'search_config'
=>
[
'form_type'
=>
'section'
,
'is_point'
=>
1
,
...
...
application/tags.php
浏览文件 @
155dca21
...
...
@@ -37,16 +37,19 @@ return array (
0
=>
'app\\plugins\\distribution\\Hook'
,
1
=>
'app\\plugins\\freightfee\\Hook'
,
2
=>
'app\\plugins\\coupon\\Hook'
,
3
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_users_center_left_menu_handle'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
1
=>
'app\\plugins\\coupon\\Hook'
,
2
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_header_navigation_top_right_handle'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
1
=>
'app\\plugins\\coupon\\Hook'
,
2
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_order_status_change_history_success_handle'
=>
array
(
...
...
@@ -68,14 +71,17 @@ return array (
'plugins_service_goods_spec_extends_handle'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
1
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_view_admin_user_save'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
1
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_user_save_handle'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
1
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_view_goods_detail_base_buy_nav_min_inside'
=>
array
(
...
...
@@ -93,6 +99,7 @@ return array (
array
(
0
=>
'app\\plugins\\freightfee\\Hook'
,
1
=>
'app\\plugins\\coupon\\Hook'
,
2
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_view_goods_detail_title'
=>
array
(
...
...
@@ -105,6 +112,8 @@ return array (
'plugins_service_navigation_header_handle'
=>
array
(
0
=>
'app\\plugins\\coupon\\Hook'
,
1
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
2
=>
'app\\plugins\\weixinliveplayer\\Hook'
,
),
'plugins_view_goods_detail_panel_bottom'
=>
array
(
...
...
@@ -126,5 +135,37 @@ return array (
array
(
0
=>
'app\\plugins\\coupon\\Hook'
,
),
'plugins_service_goods_handle_end'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_goods_spec_base'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_user_login_success_record'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_goods_save_handle'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_view_goods_detail_panel_price_top'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_view_home_goods_inside_bottom'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_view_search_goods_inside_bottom'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
'plugins_service_goods_spec_type'
=>
array
(
0
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
),
);
?>
\ No newline at end of file
sourcecode/alipay/app.js
浏览文件 @
155dca21
...
...
@@ -68,7 +68,7 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
request_url
:
'
http://shopxo.com/
'
,
//
request_url: 'http://dev.shopxo.net/',
request_url
:
'
http://dev.shopxo.net/
'
,
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
sourcecode/alipay/pages/buy/buy.acss
浏览文件 @
155dca21
...
...
@@ -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 {
...
...
@@ -41,14 +41,40 @@
/**
* 商品
*/
.goods .goods-item:not(:last-child) {
.goods
-group-list
.goods-item:not(:last-child) {
border-bottom: 1px dashed #efefef;
}
.goods-item {
padding: 20rpx 10rpx;
.goods-group-list {
padding: 0 10rpx 10rpx 10rpx;
}
.goods-group-hd {
padding: 20rpx 0;
}
.goods-group-title {
font-weight: bold;
vertical-align: middle;
}
.goods-group-alias {
border: 1px solid #3bb4f2;
color: #3bb4f2;
padding: 2rpx 10rpx;
border-radius: 6rpx;
margin-left: 10rpx;
}
.goods-group-footer .original-price {
margin-right: 10rpx;
}
.goods-group-map-submit {
font-size: 24rpx;
padding: 5rpx 20rpx;
background: #f0f0f0;
border-radius: 6rpx;
}
.goods-title, .goods-spec {
margin-bottom: 10rpx;
margin-bottom: 5rpx;
}
.goods-item {
padding: 10rpx 0;
}
.goods-image {
width: 160rpx;
...
...
@@ -119,6 +145,7 @@
*/
.extension-list {
background-color: #ffffeb;
border: 1px solid #ffe2cf;
}
.extension-list .item {
padding: 20rpx 10rpx;
...
...
@@ -133,14 +160,13 @@
/**
* 留言
*/
.content-textarea-view {
height: 220rpx;
}
.content-textarea-view,
.content-textarea-view textarea {
height: 180rpx;
padding: 5rpx;
}
.content-textarea-view view {
padding:
8rpx 10
rpx;
padding:
12
rpx;
}
/**
...
...
sourcecode/alipay/pages/buy/buy.axml
浏览文件 @
155dca21
...
...
@@ -6,7 +6,7 @@
<view a:if="{{goods_list.length > 0}}" class="page">
<!-- 销售+自提 模式选择 -->
<view a:if="{{common_site_type == 4}}" class="buy-header-nav oh tc">
<block a:for="{{buy_header_nav}}"
a:key="key"
>
<block a:for="{{buy_header_nav}}">
<view class="item fl {{site_model == item.value ? 'cr-main' : 'cr-666'}}" data-value="{{item.value}}" onTap="buy_header_nav_event">{{item.name}}</view>
</block>
</view>
...
...
@@ -32,15 +32,25 @@
<view class="address-divider spacing-mb"></view>
</block>
<!-- 商品 -->
<view class="goods bg-white spacing-mb">
<view a:for="{{goods_list}}" class="goods-item oh">
<!-- 商品数据 -->
<view class="goods-group-list bg-white spacing-mb" a:for="{{goods_list}}" a:for-item="group">
<!-- 仓库分组 -->
<view class="goods-group-hd oh br-b">
<view class="fl">
<text class="goods-group-title">{{group.name}}</text>
<text a:if="{{(group.alias || null) != null}}" class="goods-group-alias">{{group.alias}}</text>
</view>
<view a:if="{{(group.lng || null) != null && (group.lat || null) != null}}" class="fr">
<view class="goods-group-map-submit br" data-index="{{index}}" onTap="map_event">查看地图</view>
</view>
</view>
<!-- 商品 -->
<view a:for="{{group.goods_items}}" 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 a:if="{{item.spec != null}}">
<view class="goods-spec 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>
...
...
@@ -53,30 +63,33 @@
</text>
</view>
</view>
<!-- 优惠劵 -->
<view a:if="{{(plugins_coupon_data || null) != null && (plugins_coupon_data[index] || null) != null && (plugins_coupon_data[index].coupon_data || null) != null && (plugins_coupon_data[index].coupon_data.coupon_list || null) != null && plugins_coupon_data[index].coupon_data.coupon_list.length > 0}}" class="plugins-coupon bg-white spacing-mb arrow-right" data-index="{{index}}" onTap="plugins_coupon_open_event">
<text class="cr-666">优惠劵</text>
<text class="cr-ccc fr">{{((plugins_choice_coupon_value || null) != null && (plugins_choice_coupon_value[group.id] || null) != null) ? plugins_choice_coupon_value[group.id] : '请选择优惠券'}}</text>
</view>
<!-- 扩展数据展示 -->
<view a:if="{{group.order_base.extension_data.length > 0}}" class="extension-list spacing-mt">
<view a:for="{{group.order_base.extension_data}}" class="item oh">
<text class="cr-666 fl">{{item.name}}
</text>
<text class="text-tips fr">{{item.tips}}
</text>
</view>
</view>
<!-- 小计 -->
<view class="oh tr goods-group-footer spacing-mt spacing-mb">
<text a:if="{{group.order_base.total_price != group.order_base.actual_price}}" class="original-price">{{price_symbol}}{{group.order_base.total_price}}</text>
<text class="sales-price">{{price_symbol}}{{group.order_base.actual_price}}</text>
</view>
</view>
<!-- 留言 -->
<view class="content-textarea-view bg-white spacing-mb">
<textarea a:if="{{!popup_plugins_coupon_status}}" onInput="bind_user_note_event" value="{{user_note_value}}" maxlength="60" placeholder="留言" />
<textarea a:if="{{!popup_plugins_coupon_status}}" onInput="bind_user_note_event" value="{{user_note_value}}" maxlength="60" placeholder="留言"
class="wh-auto"
/>
<view a:if="{{popup_plugins_coupon_status}}" class="cr-888">{{user_note_value || '留言'}}</view>
</view>
<!-- 优惠劵 -->
<view a:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="plugins-coupon bg-white spacing-mb arrow-right" onTap="plugins_coupon_open_event">
<text class="cr-666">优惠劵</text>
<text class="cr-ccc fr">{{plugins_choice_coupon_value}}</text>
</view>
<!-- 扩展数据展示 -->
<view a:if="{{extension_data.length > 0}}" class="extension-list spacing-mb">
<view a:for="{{extension_data}}" class="item oh">
<text class="cr-666">{{item.name}}
</text>
<text class="text-tips fr">{{item.tips}}
</text>
</view>
</view>
<!-- 支付方式 -->
<view a:if="{{payment_list.length > 0 && common_order_is_booking != 1}}" class="payment-list bg-white oh">
<view class="item tc fl" a:for="{{payment_list}}">
...
...
@@ -108,16 +121,16 @@
<component-popup prop-show="{{popup_plugins_coupon_status}}" prop-position="bottom" onClose="plugins_coupon_close_event">
<view class="plugins-coupon-popup bg-white">
<view class="close oh">
<view class="fr" catch
T
ap="plugins_coupon_close_event">
<view class="fr" catch
t
ap="plugins_coupon_close_event">
<icon type="clear" size="20" />
</view>
</view>
<view a:if="{{
(plugins_coupon_data || null) != null && plugins_
coupon_data.coupon_list.length > 0}}" class="coupon-container oh br-b">
<view a:if="{{
popup_plugins_coupon_index != null && (plugins_coupon_data || null) != null && (plugins_coupon_data[popup_plugins_coupon_index] || null) != null && (plugins_coupon_data[popup_plugins_coupon_index].coupon_data || null) != null && (plugins_coupon_data[popup_plugins_coupon_index].coupon_data.coupon_list || null) != null && plugins_coupon_data[popup_plugins_coupon_index].
coupon_data.coupon_list.length > 0}}" class="coupon-container oh br-b">
<view class="not-use-tips tc">
<text onTap="plugins_coupon_not_use_event">不使用优惠劵</text>
<text
data-wid="{{plugins_coupon_data[popup_plugins_coupon_index].warehouse_id}}"
onTap="plugins_coupon_not_use_event">不使用优惠劵</text>
</view>
<block a:for="{{plugins_coupon_data.coupon_list}}">
<view class="item spacing-mt bg-white" style="border:1px solid {{item.coupon.bg_color_value}};">
<block a:for="{{plugins_coupon_data
[popup_plugins_coupon_index].coupon_data
.coupon_list}}">
<view class="item spacing-mt bg-white
{{plugins_use_coupon_ids.indexOf(item.id) != -1 ? 'item-disabled' : ''}}
" style="border:1px solid {{item.coupon.bg_color_value}};">
<view class="v-left fl">
<view class="base single-text" style="color:{{item.coupon.bg_color_value}};">
<text class="symbol">{{price_symbol}}</text>
...
...
@@ -128,9 +141,9 @@
<view a:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666 single-text">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888 single-text">{{item.time_start_text}} 至 {{item.time_end_text}}</view>
</view>
<view class="v-right fr" style="background:{{item.coupon.bg_color_value}};" data-
index="{{index
}}" data-value="{{item.id}}" onTap="plugins_coupon_use_event">
<view class="v-right fr" style="background:{{item.coupon.bg_color_value}};" data-
wid="{{plugins_coupon_data[popup_plugins_coupon_index].warehouse_id
}}" data-value="{{item.id}}" onTap="plugins_coupon_use_event">
<text class="circle"></text>
<text>{{plugins_use_coupon_id
== item.id
? '已选' : '选择'}}</text>
<text>{{plugins_use_coupon_id
s.indexOf(item.id) != -1
? '已选' : '选择'}}</text>
</view>
</view>
</block>
...
...
sourcecode/alipay/pages/buy/buy.js
浏览文件 @
155dca21
...
...
@@ -26,9 +26,10 @@ Page({
// 优惠劵
plugins_coupon_data
:
null
,
plugins_use_coupon_id
:
0
,
plugins_choice_coupon_value
:
'
选择优惠劵
'
,
plugins_use_coupon_id
s
:
[]
,
plugins_choice_coupon_value
:
[]
,
popup_plugins_coupon_status
:
false
,
popup_plugins_coupon_index
:
null
,
},
onLoad
(
params
)
{
//params['data'] = '{"buy_type":"goods","goods_id":"1","stock":"1","spec":"[]"}';
...
...
@@ -92,12 +93,11 @@ Page({
var
data
=
this
.
data
.
params
;
data
[
'
address_id
'
]
=
this
.
data
.
address_id
;
data
[
'
payment_id
'
]
=
this
.
data
.
payment_id
;
data
[
'
coupon_id
'
]
=
this
.
data
.
plugins_use_coupon_id
;
data
[
'
site_model
'
]
=
this
.
data
.
site_model
;
my
.
request
({
url
:
app
.
get_request_url
(
"
index
"
,
"
buy
"
),
method
:
"
POST
"
,
data
:
data
,
data
:
this
.
request_data_coupon_merge
(
data
)
,
dataType
:
"
json
"
,
headers
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
...
...
@@ -123,13 +123,19 @@ Page({
// 优惠劵选择处理
if
((
data
.
plugins_coupon_data
||
null
)
!=
null
)
{
if
((
data
.
plugins_coupon_data
.
coupon_choice
||
null
)
!=
null
)
var
plugins_choice_coupon_value
=
[];
for
(
var
i
in
data
.
plugins_coupon_data
)
{
this
.
setData
({
plugins_choice_coupon_value
:
data
.
plugins_coupon_data
.
coupon_choice
.
coupon
.
desc
});
}
else
{
var
coupon_count
=
((
data
.
plugins_coupon_data
.
coupon_list
||
null
)
!=
null
)
?
data
.
plugins_coupon_data
.
coupon_list
.
length
:
0
;
this
.
setData
({
plugins_choice_coupon_value
:
(
coupon_count
>
0
)
?
'
可选优惠劵
'
+
coupon_count
+
'
张
'
:
'
暂无可用优惠劵
'
});
var
cupk
=
data
.
plugins_coupon_data
[
i
][
'
warehouse_id
'
];
if
((
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_choice
'
]
||
null
)
!=
null
)
{
plugins_choice_coupon_value
[
cupk
]
=
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_choice
'
][
'
desc
'
];
}
else
{
var
coupon_count
=
(
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_list
'
]
||
null
)
!=
null
?
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
].
coupon_list
.
length
:
0
;
plugins_choice_coupon_value
[
cupk
]
=
(
coupon_count
>
0
)
?
'
可选优惠劵
'
+
coupon_count
+
'
张
'
:
'
暂无可用优惠劵
'
;
}
}
this
.
setData
({
plugins_choice_coupon_value
:
plugins_choice_coupon_value
});
}
// 地址
...
...
@@ -167,6 +173,19 @@ Page({
});
},
// 请求参数合并优惠券参数
request_data_coupon_merge
(
data
)
{
var
coupon_ids
=
this
.
data
.
plugins_use_coupon_ids
;
if
((
coupon_ids
||
null
)
!=
null
&&
coupon_ids
.
length
>
0
)
{
for
(
var
i
in
coupon_ids
)
{
data
[
'
coupon_id_
'
+
i
]
=
coupon_ids
[
i
];
}
}
return
data
;
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
init
();
...
...
@@ -184,7 +203,6 @@ Page({
data
[
'
address_id
'
]
=
this
.
data
.
address_id
;
data
[
'
payment_id
'
]
=
this
.
data
.
payment_id
;
data
[
'
user_note
'
]
=
this
.
data
.
user_note_value
;
data
[
'
coupon_id
'
]
=
this
.
data
.
plugins_use_coupon_id
;
data
[
'
site_model
'
]
=
this
.
data
.
site_model
;
// 数据验证
...
...
@@ -204,15 +222,15 @@ Page({
my
.
request
({
url
:
app
.
get_request_url
(
"
add
"
,
"
buy
"
),
method
:
"
POST
"
,
data
:
data
,
data
:
this
.
request_data_coupon_merge
(
data
)
,
dataType
:
"
json
"
,
headers
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
my
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
order
.
status
==
1
)
{
if
(
res
.
data
.
data
.
order
_
status
==
1
)
{
my
.
redirectTo
({
url
:
'
/pages/user-order/user-order?is_pay=1&order_id
=
'
+
res
.
data
.
data
.
order
.
id
url
:
'
/pages/user-order/user-order?is_pay=1&order_id
s=
'
+
res
.
data
.
data
.
order_ids
.
join
(
'
,
'
)
});
}
else
{
my
.
redirectTo
({
url
:
'
/pages/user-order/user-order
'
});
...
...
@@ -256,7 +274,11 @@ Page({
// 优惠劵弹层开启
plugins_coupon_open_event
(
e
)
{
this
.
setData
({
popup_plugins_coupon_status
:
true
});
var
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
setData
({
popup_plugins_coupon_status
:
true
,
popup_plugins_coupon_index
:
index
,
});
},
// 优惠劵弹层关闭
...
...
@@ -266,19 +288,28 @@ Page({
// 优惠劵选择
plugins_coupon_use_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
wid
=
e
.
currentTarget
.
dataset
.
wid
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
this
.
setData
({
plugins_use_coupon_id
:
value
,
popup_plugins_coupon_status
:
false
,
});
this
.
init
();
var
temp
=
this
.
data
.
plugins_use_coupon_ids
;
// 是否已选择优惠券id
if
(
temp
.
indexOf
(
value
)
==
-
1
)
{
temp
[
wid
]
=
value
;
this
.
setData
({
plugins_use_coupon_ids
:
temp
,
popup_plugins_coupon_status
:
false
,
});
this
.
init
();
}
},
// 不使用优惠劵
plugins_coupon_not_use_event
(
e
)
{
var
wid
=
e
.
currentTarget
.
dataset
.
wid
;
var
temp
=
this
.
data
.
plugins_use_coupon_ids
;
temp
[
wid
]
=
0
;
this
.
setData
({
plugins_use_coupon_id
:
0
,
plugins_use_coupon_id
s
:
temp
,
popup_plugins_coupon_status
:
false
,
});
this
.
init
();
...
...
@@ -320,4 +351,25 @@ Page({
this
.
init
();
}
},
// 地图查看
map_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
||
0
;
var
data
=
this
.
data
.
goods_list
[
index
]
||
null
;
if
(
data
==
null
)
{
app
.
showToast
(
"
地址有误
"
);
return
false
;
}
var
lng
=
parseFloat
(
data
.
lng
||
0
);
var
lat
=
parseFloat
(
data
.
lat
||
0
);
my
.
openLocation
({
latitude
:
lat
,
longitude
:
lng
,
scale
:
18
,
name
:
data
.
alias
||
''
,
address
:
(
data
.
province_name
||
''
)
+
(
data
.
city_name
||
''
)
+
(
data
.
county_name
||
''
)
+
(
data
.
address
||
''
),
});
},
});
sourcecode/alipay/pages/goods-category/goods-category.acss
浏览文件 @
155dca21
/**
左侧导航
*/
*
左侧导航
*/
.left-nav {
height: 100vh;
background: #
ececec
;
width: 2
3
0rpx;
background: #
fff
;
width: 2
1
0rpx;
overflow-x: hidden;
overflow-y: auto;
}
...
...
@@ -15,44 +15,77 @@
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;
color: #e23f36;
background: #fff;
border-right: 3px solid #f5f5f5 !important;
color: #e23f36 !important;
}
/**
右侧内容
*/
.right-cont
ent
{
*
右侧内容
*/
.right-cont
ainer
{
height: 100vh;
width: calc( 100% - 2
3
0rpx );
width: calc( 100% - 2
1
0rpx );
overflow-x: hidden;
overflow-y: auto;
position: absolute;
top: 0;
right: 0;
background: #f5f5f5;
}
.right-content {
padding: 0 20rpx 20rpx 20rpx;
}
.one-content {
padding: 20rpx;
}
.one-content, .two-content {
margin-top: 20rpx;
}
.content-items {
float: left;
width: calc(33.33% - 20rpx);
padding: 20rpx 10rpx;
text-align: center;
.one-vice-name {
font-size: 30rpx;
font-weight: 500;
}
.one-desc {
color: #999;
margin-top: 10rpx;
}
.two-name {
font-weight: bold;
font-size: 32rpx;
background: #f5f5f5;
padding: 20rpx 10rpx;
}
.content-item {
display: -webkit-inline-box;
width: calc(33.33% - 20rpx);
padding: 10rpx;
text-align: center;
}
.content-item .content {
margin: 0 auto;
padding: 15rpx 0;
}
.content-item .text {
font-size: 28rpx;
line-height: 46rpx;
}
.content-item .icon {
width: 100%;
height: 120rpx;
}
.content-items .text {
font-size: 28rpx;
line-height: 46rpx;
.model-one {
padding: 10rpx;
}
.content-items .icon {
width: 100%;
height: 120rpx;
.model-one .content-item:nth-child(3n) {
border-right: 0;
}
\ No newline at end of file
sourcecode/alipay/pages/goods-category/goods-category.axml
浏览文件 @
155dca21
<view class='left-nav'>
<block a:for="{{data_list}}">
<view class='items {{item.active || ""}}' data-index="{{index}}" onTap='nav_event'>
<text>{{item.name}}</text>
<view a:if="{{data_list.length > 0}}">
<block a:if="{{category_show_level == 1}}">
<!-- 一级模式 -->
<view class="model-one oh">
<block a:for="{{data_list}}" a:for-item="v">
<view class="content-item" data-value="{{v.id}}" onTap="category_event">
<view class="content bg-white wh-auto">
<image a:if="{{(v.icon || null) != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{v.name}}</view>
</view>
</view>
</block>
</view>
</block>
</view>
<view class='right-content bg-white'>
<block a:if="{{data_content.length > 0}}">
<block a:for="{{data_content}}" a:for-item="v">
<view class="content-items" data-value="{{v.id}}" onTap="category_event">
<image a:if="{{(v.icon || null) != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{v.name}}</view>
<block a:else>
<!-- 一级内导航 -->
<view class='left-nav'>
<block a:for="{{data_list}}">
<view class='items {{item.active || ""}}' data-index="{{index}}" onTap='nav_event'>
<text>{{item.name}}</text>
</view>
</block>
</view>
<view class='right-container'>
<!-- 一级内基础容 -->
<view a:if="{{(data_content || null) != null}}" class="right-content">
<view a:if="{{(data_content.vice_name || null) != null || (data_content.describe || null) != null}}" class="one-content bg-white" data-value="{{data_content.id}}" onTap="category_event">
<view a: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 a:if="{{(data_content.describe || null) != null}}" class="one-desc">{{data_content.describe}}</view>
</view>
<!-- 一二级数据渲染 -->
<block a:if="{{data_content.items.length > 0}}">
<!-- 二级模式 -->
<block a:if="{{category_show_level == 2}}">
<view class="two-content bg-white oh">
<block a:for="{{data_content.items}}" a:for-item="v">
<view class="content-item" data-value="{{v.id}}" onTap="category_event">
<view class="content wh-auto">
<image a:if="{{(v.icon || null) != null}}" src="{{v.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{v.name}}</view>
</view>
</view>
</block>
</view>
</block>
<!-- 三级模式 -->
<block a:if="{{category_show_level == 3}}">
<block a:for="{{data_content.items}}" a:for-item="v">
<view class="bg-white oh">
<view class="tc two-name" data-value="{{v.id}}" onTap="category_event">{{v.name}}</view>
<block a:if="{{v.items.length > 0}}">
<block a:for="{{v.items}}" a:for-item="vs">
<view class="content-item" data-value="{{vs.id}}" onTap="category_event">
<view class="content wh-auto">
<image a:if="{{(vs.icon || null) != null}}" src="{{vs.icon}}" mode="aspectFit" class="icon" />
<view class="text single-text">{{vs.name}}</view>
</view>
</view>
</block>
</block>
</view>
</block>
</block>
</block>
<block a:else>
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: 0, msg: '没有子分类数据'}}"></template>
</block>
</view>
</
block
>
</
view
>
</block>
</view>
<view a:if="{{data_list.length == 0 && data_list_loding_status != 0}}">
<import src="/pages/common/nodata.axml" />
<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
sourcecode/alipay/pages/goods-category/goods-category.js
浏览文件 @
155dca21
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
:
[],
category_show_level
:
3
,
data_content
:
null
,
},
onShow
()
{
...
...
@@ -31,17 +30,19 @@ Page({
success
:
res
=>
{
my
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
var
category
=
res
.
data
.
data
.
category
;
var
data_content
=
[];
if
(
data
.
length
>
0
)
var
index
=
this
.
data
.
nav_active_index
||
0
;
if
(
category
.
length
>
0
)
{
data
[
0
][
'
active
'
]
=
'
nav-active
'
;
data_content
=
data
[
0
][
'
items
'
];
category
[
index
][
'
active
'
]
=
'
nav-active
'
;
data_content
=
category
[
index
];
}
this
.
setData
({
data_list
:
data
,
data_list
:
category
,
category_show_level
:
res
.
data
.
data
.
category_show_level
||
3
,
data_content
:
data_content
,
data_list_loding_status
:
data
.
length
==
0
?
0
:
3
,
data_list_loding_status
:
category
.
length
==
0
?
0
:
3
,
data_bottom_line_status
:
true
,
});
}
else
{
...
...
@@ -78,13 +79,14 @@ Page({
}
this
.
setData
({
data_list
:
temp_data
,
data_content
:
temp_data
[
index
][
'
items
'
],
data_content
:
temp_data
[
index
],
nav_active_index
:
index
,
});
},
// 事件
category_event
(
e
)
{
my
.
navigateTo
({
url
:
'
/pages/goods-search/goods-search?category_id=
'
+
e
.
t
arget
.
dataset
.
value
});
my
.
navigateTo
({
url
:
'
/pages/goods-search/goods-search?category_id=
'
+
e
.
currentT
arget
.
dataset
.
value
});
},
// 自定义分享
...
...
sourcecode/alipay/pages/paytips/paytips.axml
浏览文件 @
155dca21
...
...
@@ -2,10 +2,6 @@
<image class="pay-icon" a:if="{{params.code == '9000'}}" mode="widthFix" src="{{default_round_success_icon}}" />
<image class="pay-icon" a:else mode="widthFix" src="{{default_round_error_icon}}" />
<text class="dis-block">{{params.msg}}</text>
<view a:if="{{params.code == '9000'}}" class="price-box">
<text class="sales-price">{{price_symbol}}{{params.total_price}}</text>
<text class="price-unit cr-888">元</text>
</view>
</view>
<view class="btn-box">
...
...
sourcecode/alipay/pages/paytips/paytips.js
浏览文件 @
155dca21
const
app
=
getApp
();
Page
({
data
:
{
price_symbol
:
app
.
data
.
price_symbol
,
params
:
{},
default_round_success_icon
:
app
.
data
.
default_round_success_icon
,
default_round_error_icon
:
app
.
data
.
default_round_error_icon
,
...
...
sourcecode/alipay/pages/user-order-detail/user-order-detail.axml
浏览文件 @
155dca21
...
...
@@ -10,7 +10,7 @@
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">
{{detail.address_data.province_name}}{{detail.address_data.city_name}}{{detail.address_data.county_name}}{{detail.address_data.address}}
<text a:if="{{detail.order_model == 2 && (detail.address_data.lng ||
0) > 0 && (detail.address_data.lat || 0) > 0
}}" class="cr-666 br address-map-submit" onTap="address_map_event">查看位置</text>
<text a:if="{{detail.order_model == 2 && (detail.address_data.lng ||
null) != null && (detail.address_data.lat || null) != null
}}" class="cr-666 br address-map-submit" onTap="address_map_event">查看位置</text>
</view>
</view>
</view>
...
...
sourcecode/alipay/pages/user-order-detail/user-order-detail.js
浏览文件 @
155dca21
...
...
@@ -47,12 +47,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
||
''
},
...
...
sourcecode/alipay/pages/user-order/user-order.acss
浏览文件 @
155dca21
...
...
@@ -85,4 +85,23 @@
height: 50rpx !important;
vertical-align: middle;
margin-right: 10rpx;
}
/**
* 选择
*/
.selected .icon {
width: 35rpx;
height: 35rpx !important;
margin: 0 20rpx 0 10rpx;
vertical-align: middle;
}
/**
* 合并支付按钮
*/
.pay-merge-submit {
width: 220rpx;
left: calc(50% - 110rpx);
bottom: 50rpx;
}
\ No newline at end of file
sourcecode/alipay/pages/user-order/user-order.axml
浏览文件 @
155dca21
...
...
@@ -11,10 +11,13 @@
<view class="list-content">
<view class="list-item bg-white spacing-mb" a:if="{{data_list.length > 0}}" a:for="{{data_list}}">
<view class="item-base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">
{{item.status_name}}<text a:if="{{(item.is_under_line_text || null) != null}}">({{item.is_under_line_text}})</text>
</text>
<!-- 选择 -->
<view a:if="{{nav_status_index == 1}}" onTap="selected_event" data-oid="{{item.id}}" class="fl selected">
<image class="icon" src="/images/default-select{{order_select_ids.indexOf(item.id) != -1 ? '-active' : ''}}-icon.png" mode="widthFix" />
</view>
<!-- 基础信息 -->
<text class="fl cr-666">{{item.warehouse_name}}</text>
<text class="fr cr-main">{{item.status_name}}<text a:if="{{(item.is_under_line_text || null) != null}}">({{item.is_under_line_text}})</text></text>
</view>
<view a:for="{{item.items}}" a:for-item="detail" class="goods-item br-b-dashed oh">
<navigator url="/pages/user-order-detail/user-order-detail?id={{item.id}}" hover-class="none">
...
...
@@ -26,7 +29,7 @@
{{spec.type}}:{{spec.value}}
</view>
</block>
<view a:if="{{(item.is_can_launch_aftersale == 1 || (detail.orderaftersale || null) != null) && (
$
detail.orderaftersale_btn_text || null) != null}}" class="orderaftersale-btn-text" catchTap="orderaftersale_event" data-oid="{{item.id}}" data-did="{{detail.id}}">{{detail.orderaftersale_btn_text}}</view>
<view a:if="{{(item.is_can_launch_aftersale == 1 || (detail.orderaftersale || null) != null) && (detail.orderaftersale_btn_text || null) != null}}" class="orderaftersale-btn-text" catchTap="orderaftersale_event" data-oid="{{item.id}}" data-did="{{detail.id}}">{{detail.orderaftersale_btn_text}}</view>
</view>
<view class="oh goods-price">
<text class="sales-price">{{price_symbol}}{{detail.price}}</text>
...
...
@@ -56,6 +59,11 @@
</view>
</scroll-view>
<!-- 合并支付 -->
<view a:if="{{nav_status_index == 1 && order_select_ids.length > 0}}">
<button class="submit-fixed pay-merge-submit" type="default" size="mini" hover-class="none" onTap="pay_merge_event">合并支付</button>
</view>
<!-- 支付方式 popup -->
<component-popup prop-show="{{is_show_payment_popup}}" prop-position="bottom" onClose="payment_popup_event_close">
<view a:if="{{payment_list.length > 0}}" class="payment-list oh bg-white">
...
...
sourcecode/alipay/pages/user-order/user-order.js
浏览文件 @
155dca21
...
...
@@ -14,7 +14,6 @@ Page({
payment_list
:
[],
payment_id
:
0
,
temp_pay_value
:
0
,
temp_pay_index
:
0
,
nav_status_list
:
[
{
name
:
"
全部
"
,
value
:
"
-1
"
},
{
name
:
"
待付款
"
,
value
:
"
1
"
},
...
...
@@ -24,6 +23,7 @@ Page({
{
name
:
"
已失效
"
,
value
:
"
5,6
"
},
],
nav_status_index
:
0
,
order_select_ids
:
[],
},
onLoad
(
params
)
{
...
...
@@ -116,16 +116,9 @@ Page({
// 下订单支付处理
if
(
this
.
data
.
load_status
==
0
)
{
if
((
this
.
data
.
params
.
is_pay
||
0
)
==
1
&&
(
this
.
data
.
params
.
order_id
||
0
)
!=
0
)
if
((
this
.
data
.
params
.
is_pay
||
0
)
==
1
&&
(
this
.
data
.
params
.
order_id
s
||
null
)
!=
null
)
{
for
(
var
i
in
temp_data_list
)
{
if
(
this
.
data
.
params
.
order_id
==
temp_data_list
[
i
][
'
id
'
])
{
this
.
pay_handle
(
this
.
data
.
params
.
order_id
,
i
);
break
;
}
}
this
.
pay_handle
(
this
.
data
.
params
.
order_ids
);
}
}
}
else
{
...
...
@@ -200,8 +193,8 @@ Page({
pay_event
(
e
)
{
this
.
setData
({
is_show_payment_popup
:
true
,
temp_pay_value
:
e
.
t
arget
.
dataset
.
value
,
temp_pay_index
:
e
.
target
.
dataset
.
index
,
temp_pay_value
:
e
.
currentT
arget
.
dataset
.
value
,
order_select_ids
:
[]
,
});
},
...
...
@@ -212,14 +205,14 @@ Page({
// 支付弹窗发起支付
popup_payment_event
(
e
)
{
var
payment_id
=
e
.
t
arget
.
dataset
.
value
||
0
;
var
payment_id
=
e
.
currentT
arget
.
dataset
.
value
||
0
;
this
.
setData
({
payment_id
:
payment_id
});
this
.
payment_popup_event_close
();
this
.
pay_handle
(
this
.
data
.
temp_pay_value
,
this
.
data
.
temp_pay_index
);
this
.
pay_handle
(
this
.
data
.
temp_pay_value
);
},
// 支付方法
pay_handle
(
order_id
,
index
)
{
pay_handle
(
order_id
s
)
{
var
self
=
this
;
// 加载loding
my
.
showLoading
({
content
:
"
请求中...
"
});
...
...
@@ -228,7 +221,7 @@ Page({
url
:
app
.
get_request_url
(
"
pay
"
,
"
order
"
),
method
:
"
POST
"
,
data
:
{
id
:
order_id
,
id
s
:
order_ids
,
payment_id
:
this
.
data
.
payment_id
,
},
dataType
:
"
json
"
,
...
...
@@ -245,13 +238,12 @@ Page({
success
:
res
=>
{
if
(
res
.
resultCode
==
9000
)
{
// 数据设置
self
.
order_item_pay_success_handle
(
index
);
self
.
order_item_pay_success_handle
(
order_ids
);
// 跳转支付页面
my
.
navigateTo
({
url
:
"
/pages/paytips/paytips?code=9000&total_price=
"
+
self
.
data
.
data_list
[
index
][
'
total_price
'
]
"
/pages/paytips/paytips?code=9000
"
});
}
else
{
app
.
showToast
(
'
支付失败
'
);
...
...
@@ -265,15 +257,22 @@ Page({
// 线下支付
case
1
:
var
order_ids_arr
=
order_ids
.
split
(
'
,
'
);
var
temp_data_list
=
self
.
data
.
data_list
;
temp_data_list
[
index
][
'
is_under_line
'
]
=
1
;
for
(
var
i
in
temp_data_list
)
{
if
(
order_ids_arr
.
indexOf
(
temp_data_list
[
i
][
'
id
'
])
!=
-
1
)
{
temp_data_list
[
i
][
'
is_under_line
'
]
=
1
;
}
}
self
.
setData
({
data_list
:
temp_data_list
});
app
.
alert
({
msg
:
res
.
data
.
msg
,
is_show_cancel
:
0
});
break
;
// 钱包支付
case
2
:
self
.
order_item_pay_success_handle
(
index
);
self
.
order_item_pay_success_handle
(
order_ids
);
app
.
showToast
(
'
支付成功
'
,
'
success
'
);
break
;
...
...
@@ -293,27 +292,35 @@ Page({
},
// 支付成功数据设置
order_item_pay_success_handle
(
index
)
{
// 数据设置
order_item_pay_success_handle
(
order_ids
)
{
var
order_ids_arr
=
order_ids
.
split
(
'
,
'
);
var
temp_data_list
=
this
.
data
.
data_list
;
switch
(
parseInt
(
temp_data_list
[
index
][
'
order_model
'
]))
{
// 销售模式
case
0
:
temp_data_list
[
index
][
'
status
'
]
=
2
;
temp_data_list
[
index
][
'
status_name
'
]
=
'
待发货
'
;
break
;
// 自提模式
case
2
:
temp_data_list
[
index
][
'
status
'
]
=
2
;
temp_data_list
[
index
][
'
status_name
'
]
=
'
待取货
'
;
break
;
// 虚拟模式
case
3
:
temp_data_list
[
index
][
'
status
'
]
=
3
;
temp_data_list
[
index
][
'
status_name
'
]
=
'
待收货
'
;
break
;
// 数据设置
for
(
var
i
in
temp_data_list
)
{
if
(
order_ids_arr
.
indexOf
(
temp_data_list
[
i
][
'
id
'
])
!=
-
1
)
{
switch
(
parseInt
(
temp_data_list
[
i
][
'
order_model
'
]))
{
// 销售模式
case
0
:
temp_data_list
[
i
][
'
status
'
]
=
2
;
temp_data_list
[
i
][
'
status_name
'
]
=
'
待发货
'
;
break
;
// 自提模式
case
2
:
temp_data_list
[
i
][
'
status
'
]
=
2
;
temp_data_list
[
i
][
'
status_name
'
]
=
'
待取货
'
;
break
;
// 虚拟模式
case
3
:
temp_data_list
[
i
][
'
status
'
]
=
3
;
temp_data_list
[
i
][
'
status_name
'
]
=
'
待收货
'
;
break
;
}
}
}
this
.
setData
({
data_list
:
temp_data_list
});
},
...
...
@@ -416,6 +423,7 @@ Page({
this
.
setData
({
nav_status_index
:
e
.
target
.
dataset
.
index
||
0
,
data_page
:
1
,
order_select_ids
:
[],
});
this
.
get_data_list
(
1
);
},
...
...
@@ -442,4 +450,31 @@ Page({
url
:
"
/pages/user-order-comments/user-order-comments?id=
"
+
e
.
target
.
dataset
.
value
});
},
// 选中处理
selected_event
(
e
)
{
var
oid
=
e
.
currentTarget
.
dataset
.
oid
||
0
;
var
temp_select_ids
=
this
.
data
.
order_select_ids
;
if
(
temp_select_ids
.
indexOf
(
oid
)
==
-
1
)
{
temp_select_ids
.
push
(
oid
);
}
else
{
for
(
var
i
in
temp_select_ids
)
{
if
(
temp_select_ids
[
i
]
==
oid
)
{
temp_select_ids
.
splice
(
i
,
1
);
}
}
}
this
.
setData
({
order_select_ids
:
temp_select_ids
});
},
// 合并支付
pay_merge_event
(
e
)
{
this
.
setData
({
is_show_payment_popup
:
true
,
temp_pay_value
:
this
.
data
.
order_select_ids
.
join
(
'
,
'
)
});
},
});
sourcecode/weixin/app.js
浏览文件 @
155dca21
...
...
@@ -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}}
"
,
...
...
sourcecode/weixin/pages/buy/buy.js
浏览文件 @
155dca21
...
...
@@ -231,7 +231,6 @@ Page({
fail
:
()
=>
{
wx
.
hideLoading
();
this
.
setData
({
buy_submit_disabled_status
:
false
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
...
...
@@ -351,11 +350,6 @@ Page({
var
lng
=
parseFloat
(
data
.
lng
||
0
);
var
lat
=
parseFloat
(
data
.
lat
||
0
);
if
(
lng
<=
0
||
lat
<=
0
)
{
app
.
showToast
(
"
坐标有误
"
);
return
false
;
}
wx
.
openLocation
({
latitude
:
lat
,
longitude
:
lng
,
...
...
sourcecode/weixin/pages/buy/buy.wxml
浏览文件 @
155dca21
...
...
@@ -40,7 +40,7 @@
<text class="goods-group-title">{{group.name}}</text>
<text wx:if="{{(group.alias || null) != null}}" class="goods-group-alias">{{group.alias}}</text>
</view>
<view wx:if="{{
group.lng > 0 && group.lat > 0
}}" class="fr">
<view wx:if="{{
(group.lng || null) != null && (group.lat || null) != null
}}" class="fr">
<view class="goods-group-map-submit br" data-index="{{index}}" bindtap="map_event">查看地图</view>
</view>
</view>
...
...
sourcecode/weixin/pages/goods-category/goods-category.js
浏览文件 @
155dca21
...
...
@@ -62,7 +62,6 @@ Page({
data_list_loding_status
:
2
,
data_bottom_line_status
:
true
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
...
...
sourcecode/weixin/pages/user-order-detail/user-order-detail.wxml
浏览文件 @
155dca21
...
...
@@ -10,7 +10,7 @@
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">
{{detail.address_data.province_name}}{{detail.address_data.city_name}}{{detail.address_data.county_name}}{{detail.address_data.address}}
<text wx:if="{{detail.order_model == 2 && (detail.address_data.lng ||
0) > 0 && (detail.address_data.lat || 0) > 0
}}" class="cr-666 br address-map-submit" bindtap="address_map_event">查看位置</text>
<text wx:if="{{detail.order_model == 2 && (detail.address_data.lng ||
null) != null && (detail.address_data.lat || null) != null
}}" class="cr-666 br address-map-submit" bindtap="address_map_event">查看位置</text>
</view>
</view>
</view>
...
...
sourcecode/weixin/pages/user-order/user-order.js
浏览文件 @
155dca21
...
...
@@ -193,6 +193,7 @@ Page({
this
.
setData
({
is_show_payment_popup
:
true
,
temp_pay_value
:
e
.
currentTarget
.
dataset
.
value
,
order_select_ids
:
[],
});
},
...
...
sourcecode/weixin/pages/user-order/user-order.wxml
浏览文件 @
155dca21
...
...
@@ -13,7 +13,7 @@
<view class="list-item bg-white spacing-mb" wx:if="{{data_list.length > 0}}" wx:for="{{data_list}}" wx:key="key">
<view class="item-base oh br-b">
<!-- 选择 -->
<view wx:if="{{nav_status_index == 1}}" bindtap="selected_event" data-
type="node" data-
oid="{{item.id}}" class="fl selected">
<view wx:if="{{nav_status_index == 1}}" bindtap="selected_event" data-oid="{{item.id}}" class="fl selected">
<image class="icon" src="/images/default-select{{tools.indexOf(order_select_ids, item.id) ? '-active' : ''}}-icon.png" mode="widthFix" />
</view>
<!-- 基础信息 -->
...
...
@@ -30,7 +30,7 @@
{{spec.type}}:{{spec.value}}
</view>
</block>
<view wx:if="{{(item.is_can_launch_aftersale == 1 || (detail.orderaftersale || null) != null) && (
$
detail.orderaftersale_btn_text || null) != null}}" class="orderaftersale-btn-text" catchtap="orderaftersale_event" data-oid="{{item.id}}" data-did="{{detail.id}}">{{detail.orderaftersale_btn_text}}</view>
<view wx:if="{{(item.is_can_launch_aftersale == 1 || (detail.orderaftersale || null) != null) && (detail.orderaftersale_btn_text || null) != null}}" class="orderaftersale-btn-text" catchtap="orderaftersale_event" data-oid="{{item.id}}" data-did="{{detail.id}}">{{detail.orderaftersale_btn_text}}</view>
</view>
<view class="oh goods-price">
<text class="sales-price">{{price_symbol}}{{detail.price}}</text>
...
...
sourcecode/weixin/pages/user-order/user-order.wxss
浏览文件 @
155dca21
...
...
@@ -88,7 +88,7 @@
}
/**
*
多选
*
选择
*/
.selected .icon {
width: 35rpx;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录