Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
c8f08f23
ShopXO
项目概览
jamesyang1999
/
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,发现更多精彩内容 >>
提交
c8f08f23
编写于
9月 24, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微信小程序支持地址导入
上级
72557441
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
95 addition
and
41 deletion
+95
-41
application/service/UserAddressService.php
application/service/UserAddressService.php
+5
-14
changelog.txt
changelog.txt
+2
-1
sourcecode/alipay/pages/buy/buy.axml
sourcecode/alipay/pages/buy/buy.axml
+1
-1
sourcecode/alipay/pages/extraction-address/extraction-address.axml
...e/alipay/pages/extraction-address/extraction-address.axml
+1
-1
sourcecode/alipay/pages/user-address/user-address.axml
sourcecode/alipay/pages/user-address/user-address.axml
+1
-1
sourcecode/alipay/pages/user-address/user-address.js
sourcecode/alipay/pages/user-address/user-address.js
+1
-1
sourcecode/baidu/pages/buy/buy.swan
sourcecode/baidu/pages/buy/buy.swan
+1
-1
sourcecode/baidu/pages/extraction-address/extraction-address.swan
...de/baidu/pages/extraction-address/extraction-address.swan
+1
-1
sourcecode/baidu/pages/user-address/user-address.js
sourcecode/baidu/pages/user-address/user-address.js
+1
-2
sourcecode/baidu/pages/user-address/user-address.swan
sourcecode/baidu/pages/user-address/user-address.swan
+1
-1
sourcecode/qq/pages/buy/buy.qml
sourcecode/qq/pages/buy/buy.qml
+1
-1
sourcecode/qq/pages/extraction-address/extraction-address.qml
...cecode/qq/pages/extraction-address/extraction-address.qml
+1
-1
sourcecode/qq/pages/user-address/user-address.js
sourcecode/qq/pages/user-address/user-address.js
+1
-1
sourcecode/qq/pages/user-address/user-address.qml
sourcecode/qq/pages/user-address/user-address.qml
+1
-1
sourcecode/toutiao/pages/buy/buy.ttml
sourcecode/toutiao/pages/buy/buy.ttml
+1
-1
sourcecode/toutiao/pages/extraction-address/extraction-address.ttml
.../toutiao/pages/extraction-address/extraction-address.ttml
+1
-1
sourcecode/toutiao/pages/user-address/user-address.js
sourcecode/toutiao/pages/user-address/user-address.js
+1
-1
sourcecode/toutiao/pages/user-address/user-address.ttml
sourcecode/toutiao/pages/user-address/user-address.ttml
+1
-1
sourcecode/weixin/app.js
sourcecode/weixin/app.js
+1
-1
sourcecode/weixin/pages/buy/buy.wxml
sourcecode/weixin/pages/buy/buy.wxml
+1
-1
sourcecode/weixin/pages/extraction-address/extraction-address.wxml
...e/weixin/pages/extraction-address/extraction-address.wxml
+1
-1
sourcecode/weixin/pages/user-address/user-address.js
sourcecode/weixin/pages/user-address/user-address.js
+53
-1
sourcecode/weixin/pages/user-address/user-address.wxml
sourcecode/weixin/pages/user-address/user-address.wxml
+8
-5
sourcecode/weixin/pages/user-address/user-address.wxss
sourcecode/weixin/pages/user-address/user-address.wxss
+8
-0
未找到文件。
application/service/UserAddressService.php
浏览文件 @
c8f08f23
...
...
@@ -221,9 +221,9 @@ class UserAddressService
$data
=
[
'name'
=>
$params
[
'name'
],
'tel'
=>
$params
[
'tel'
],
'province'
=>
$params
[
'province'
]
,
'city'
=>
$params
[
'city'
]
,
'county'
=>
$params
[
'county'
]
,
'province'
=>
intval
(
$params
[
'province'
])
,
'city'
=>
intval
(
$params
[
'city'
])
,
'county'
=>
isset
(
$params
[
'county'
])
?
intval
(
$params
[
'county'
])
:
0
,
'address'
=>
$params
[
'address'
],
'is_default'
=>
$is_default
,
];
...
...
@@ -341,11 +341,6 @@ class UserAddressService
'key_name'
=>
'city'
,
'error_msg'
=>
'城市不能为空'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'county'
,
'error_msg'
=>
'区/县不能为空'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'address'
,
...
...
@@ -495,7 +490,7 @@ class UserAddressService
// 省市区解析
$province_name
=
$params
[
'province'
];
$city_name
=
$params
[
'city'
];
$county_name
=
$params
[
'county'
]
;
$county_name
=
isset
(
$params
[
'county'
])
?
$params
[
'county'
]
:
''
;
$town_name
=
isset
(
$params
[
'town'
])
?
$params
[
'town'
]
:
''
;
// 开始匹配地址
...
...
@@ -551,15 +546,11 @@ class UserAddressService
$where2
[]
=
[
'name'
,
'like'
,
str_replace
(
$search
,
''
,
$town_name
)
.
'%'
];
$county
=
Db
::
name
(
'Region'
)
->
where
(
$where2
)
->
field
(
$field
)
->
find
();
}
if
(
empty
(
$county
))
{
return
DataReturn
(
'区/县匹配失败'
,
-
1
);
}
// 地区id赋值
$params
[
'province'
]
=
$province
[
'id'
];
$params
[
'city'
]
=
$city
[
'id'
];
$params
[
'county'
]
=
$county
[
'id'
];
$params
[
'county'
]
=
empty
(
$county
[
'id'
])
?
0
:
$county
[
'id'
];
// 存在街道字段数据则拼接到详细地址前面
if
(
!
empty
(
$town_name
))
...
...
changelog.txt
浏览文件 @
c8f08f23
...
...
@@ -10,10 +10,11 @@
web端
1. 后台菜单支持自定义url地址、并支持钩子自动添加
2.
统计维度新增当月、上月
2.
后台区块数据统计新增当月、上月维度
小程序
1. QQ小程序支持微信支付
2. 百度/微信小程序支持手机号码一键绑定、获取收货地址
插件
1. 汇率插件支持货币自由切换
...
...
sourcecode/alipay/pages/buy/buy.axml
浏览文件 @
c8f08f23
...
...
@@ -22,7 +22,7 @@
</view>
<view class="address-detail oh">
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{address.province_name
}}{{address.city_name}}{{address.county_name}}{{address.address
}}</view>
<view class="text fr">{{address.province_name
|| ''}}{{address.city_name || ''}}{{address.county_name || ''}}{{address.address || ''
}}</view>
</view>
</view>
<view a:if="{{address == null}}" class="no-address cr-888">
...
...
sourcecode/alipay/pages/extraction-address/extraction-address.axml
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/alipay/pages/user-address/user-address.axml
浏览文件 @
c8f08f23
...
...
@@ -8,7 +8,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/alipay/pages/user-address/user-address.js
浏览文件 @
c8f08f23
...
...
@@ -10,11 +10,11 @@ Page({
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
my
.
setNavigationBar
({
title
:
app
.
data
.
common_pages_title
.
user_address
});
this
.
init
();
},
// 初始化
...
...
sourcecode/baidu/pages/buy/buy.swan
浏览文件 @
c8f08f23
...
...
@@ -22,7 +22,7 @@
</view>
<view class="address-detail oh">
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{address.province_name
}}{{address.city_name}}{{address.county_name}}{{address.address
}}</view>
<view class="text fr">{{address.province_name
|| ''}}{{address.city_name || ''}}{{address.county_name || ''}}{{address.address || ''
}}</view>
</view>
</view>
<view s-if="address == null" class="no-address cr-888">
...
...
sourcecode/baidu/pages/extraction-address/extraction-address.swan
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/baidu/pages/user-address/user-address.js
浏览文件 @
c8f08f23
...
...
@@ -10,11 +10,11 @@ Page({
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
swan
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_address
});
this
.
init
();
},
// 初始化
...
...
@@ -253,7 +253,6 @@ Page({
swan
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
this
.
get_data_list
();
app
.
showToast
(
res
.
data
.
msg
,
"
success
"
);
}
else
{
if
(
app
.
is_login_check
(
res
.
data
))
{
app
.
showToast
(
res
.
data
.
msg
);
...
...
sourcecode/baidu/pages/user-address/user-address.swan
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/qq/pages/buy/buy.qml
浏览文件 @
c8f08f23
...
...
@@ -22,7 +22,7 @@
<
/view
>
<
view
class
=
"
address-detail oh
"
>
<
image
class
=
"
icon fl
"
src
=
"
/images/user-address.png
"
mode
=
"
widthFix
"
/>
<
view
class
=
"
text fr
"
>
{{
address
.
province_name
}}{{
address
.
city_name
}}{{
address
.
county_name
}}{{
address
.
address
}}
<
/view
>
<
view
class
=
"
text fr
"
>
{{
address
.
province_name
||
''
}}{{
address
.
city_name
||
''
}}{{
address
.
county_name
||
''
}}{{
address
.
address
||
''
}}
<
/view
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{address == null}}
"
class
=
"
no-address cr-888
"
>
...
...
sourcecode/qq/pages/extraction-address/extraction-address.qml
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
<
/view
>
<
view
class
=
"
address oh
"
>
<
image
class
=
"
item-icon fl
"
src
=
"
/images/user-address.png
"
mode
=
"
widthFix
"
/>
<
view
class
=
"
text fr
"
>
{{
item
.
province_name
}}{{
item
.
city_name
}}{{
item
.
county_name
}}{{
item
.
address
}}
<
/view
>
<
view
class
=
"
text fr
"
>
{{
item
.
province_name
||
''
}}{{
item
.
city_name
||
''
}}{{
item
.
county_name
||
''
}}{{
item
.
address
||
''
}}
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"
operation br-t oh
"
>
...
...
sourcecode/qq/pages/user-address/user-address.js
浏览文件 @
c8f08f23
...
...
@@ -10,11 +10,11 @@ Page({
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
qq
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_address
});
this
.
init
();
},
// 初始化
...
...
sourcecode/qq/pages/user-address/user-address.qml
浏览文件 @
c8f08f23
...
...
@@ -8,7 +8,7 @@
<
/view
>
<
view
class
=
"
address oh
"
>
<
image
class
=
"
item-icon fl
"
src
=
"
/images/user-address.png
"
mode
=
"
widthFix
"
/>
<
view
class
=
"
text fr
"
>
{{
item
.
province_name
}}{{
item
.
city_name
}}{{
item
.
county_name
}}{{
item
.
address
}}
<
/view
>
<
view
class
=
"
text fr
"
>
{{
item
.
province_name
||
''
}}{{
item
.
city_name
||
''
}}{{
item
.
county_name
||
''
}}{{
item
.
address
||
''
}}
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"
operation br-t oh
"
>
...
...
sourcecode/toutiao/pages/buy/buy.ttml
浏览文件 @
c8f08f23
...
...
@@ -22,7 +22,7 @@
</view>
<view class="address-detail oh">
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{address.province_name
}}{{address.city_name}}{{address.county_name}}{{address.address
}}</view>
<view class="text fr">{{address.province_name
|| ''}}{{address.city_name || ''}}{{address.county_name || ''}}{{address.address || ''
}}</view>
</view>
</view>
<view tt:if="{{address == null}}" class="no-address cr-888">
...
...
sourcecode/toutiao/pages/extraction-address/extraction-address.ttml
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/toutiao/pages/user-address/user-address.js
浏览文件 @
c8f08f23
...
...
@@ -10,11 +10,11 @@ Page({
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
tt
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_address
});
this
.
init
();
},
// 初始化
...
...
sourcecode/toutiao/pages/user-address/user-address.ttml
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/weixin/app.js
浏览文件 @
c8f08f23
...
...
@@ -71,7 +71,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.wxml
浏览文件 @
c8f08f23
...
...
@@ -22,7 +22,7 @@
</view>
<view class="address-detail oh">
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{address.province_name
}}{{address.city_name}}{{address.county_name}}{{address.address
}}</view>
<view class="text fr">{{address.province_name
|| ''}}{{address.city_name || ''}}{{address.county_name || ''}}{{address.address || ''
}}</view>
</view>
</view>
<view wx:if="{{address == null}}" class="no-address cr-888">
...
...
sourcecode/weixin/pages/extraction-address/extraction-address.wxml
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
sourcecode/weixin/pages/user-address/user-address.js
浏览文件 @
c8f08f23
...
...
@@ -10,11 +10,11 @@ Page({
onLoad
(
params
)
{
this
.
setData
({
params
:
params
});
this
.
init
();
},
onShow
()
{
wx
.
setNavigationBarTitle
({
title
:
app
.
data
.
common_pages_title
.
user_address
});
this
.
init
();
},
// 初始化
...
...
@@ -236,5 +236,57 @@ Page({
wx
.
navigateBack
();
}
},
// 获取系统地址
choose_system_address_event
(
e
)
{
var
self
=
this
;
wx
.
authorize
({
scope
:
'
scope.address
'
,
success
:
function
(
res
)
{
wx
.
chooseAddress
({
success
(
res
)
{
var
data
=
{
"
name
"
:
res
.
userName
||
''
,
"
tel
"
:
res
.
telNumber
||
''
,
"
province
"
:
res
.
provinceName
||
''
,
"
city
"
:
res
.
cityName
||
''
,
"
county
"
:
res
.
countyName
||
''
,
"
address
"
:
res
.
detailInfo
||
''
,
};
// 加载loding
wx
.
showLoading
({
title
:
"
处理中...
"
});
// 获取数据
wx
.
request
({
url
:
app
.
get_request_url
(
"
outsystemadd
"
,
"
useraddress
"
),
method
:
"
POST
"
,
data
:
data
,
dataType
:
"
json
"
,
success
:
res
=>
{
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
self
.
get_data_list
();
}
else
{
if
(
app
.
is_login_check
(
res
.
data
))
{
app
.
showToast
(
res
.
data
.
msg
);
}
else
{
app
.
showToast
(
'
提交失败,请重试!
'
);
}
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
app
.
showToast
(
"
服务器请求出错
"
);
}
});
}
});
},
fail
:
function
(
res
)
{
app
.
showToast
(
'
取消选择
'
);
}
});
},
});
sourcecode/weixin/pages/user-address/user-address.wxml
浏览文件 @
c8f08f23
...
...
@@ -9,7 +9,7 @@
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name
}}{{item.city_name}}{{item.county_name}}{{item.address
}}</view>
<view class="text fr">{{item.province_name
|| ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''
}}</view>
</view>
</view>
<view class="operation br-t oh">
...
...
@@ -33,8 +33,11 @@
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
<navigator url="/pages/user-address-save/user-address-save" open-type="navigate" hover-class="none">
<button class="submit-fixed submit-bottom" type="default" hover-class="none">新增地址</button>
</navigator>
<view class="submit-list">
<navigator url="/pages/user-address-save/user-address-save" open-type="navigate" hover-class="none">
<button class="submit-fixed submit-bottom" type="default" hover-class="none">添加新地址</button>
</navigator>
<button class="submit-fixed submit-bottom import-system-address-submit" type="default" hover-class="none" bindtap="choose_system_address_event">导入百度地址</button>
</view>
</view>
\ No newline at end of file
sourcecode/weixin/pages/user-address/user-address.wxss
浏览文件 @
c8f08f23
...
...
@@ -33,4 +33,12 @@
}
.page {
padding-bottom: 85rpx;
}
.submit-list button {
width: 50%;
}
.submit-list .import-system-address-submit {
background: #07c160 !important;
right: 0;
left: auto;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录