Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
0fa2f242
ShopXO
项目概览
飞鱼0526
/
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,发现更多精彩内容 >>
提交
0fa2f242
编写于
9月 16, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序货币切换
上级
ca254b06
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
224 addition
and
9 deletion
+224
-9
application/tags.php
application/tags.php
+20
-0
public/static/index/default/css/common.css
public/static/index/default/css/common.css
+2
-2
sourcecode/weixin/app.js
sourcecode/weixin/app.js
+34
-4
sourcecode/weixin/app.json
sourcecode/weixin/app.json
+2
-1
sourcecode/weixin/components/quick-nav/quick-nav.wxss
sourcecode/weixin/components/quick-nav/quick-nav.wxss
+3
-2
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.js
...de/weixin/pages/plugins/exchangerate/currency/currency.js
+126
-0
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.json
.../weixin/pages/plugins/exchangerate/currency/currency.json
+4
-0
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.wxml
.../weixin/pages/plugins/exchangerate/currency/currency.wxml
+19
-0
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.wxss
.../weixin/pages/plugins/exchangerate/currency/currency.wxss
+14
-0
未找到文件。
application/tags.php
浏览文件 @
0fa2f242
...
...
@@ -107,6 +107,26 @@ return array (
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
),
'plugins_service_quick_navigation_weixin'
=>
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
),
'plugins_service_quick_navigation_alipay'
=>
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
),
'plugins_service_quick_navigation_baidu'
=>
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
),
'plugins_service_quick_navigation_qq'
=>
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
),
'plugins_service_quick_navigation_toutiao'
=>
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
),
'plugins_service_currency_price_symbol'
=>
array
(
0
=>
'app\\plugins\\exchangerate\\Hook'
,
...
...
public/static/index/default/css/common.css
浏览文件 @
0fa2f242
...
...
@@ -969,8 +969,8 @@ legend a.am-fr {
background
:
#d2354c
;
color
:
#fff
;
position
:
fixed
;
left
:
2
0px
;
bottom
:
7
0px
;
left
:
1
0px
;
bottom
:
15
0px
;
z-index
:
1020
;
-webkit-box-shadow
:
0
0
15px
rgba
(
0
,
0
,
0
,
0.5
);
-moz-box-shadow
:
0
0
15px
rgba
(
0
,
0
,
0
,
0.5
);
...
...
sourcecode/weixin/app.js
浏览文件 @
0fa2f242
App
({
data
:
{
// uuid缓存key
cache_user_uuid_key
:
"
cache_user_uuid_key
"
,
// 配置信息缓存key
cache_config_info_key
:
"
cache_config_info_key
"
,
...
...
@@ -68,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}}
"
,
...
...
@@ -174,12 +177,13 @@ App({
// 用户信息
var
user
=
this
.
get_user_cache_info
();
var
token
=
(
user
==
false
)
?
''
:
user
.
token
||
''
;
var
uuid
=
this
.
request_uuid
();
return
this
.
data
.
request_url
+
"
index.php?s=/api/
"
+
c
+
"
/
"
+
a
+
plugins_params
+
"
&application=app&application_client_type=weixin
"
+
"
&token=
"
+
token
+
"
&token=
"
+
token
+
"
&ajax=ajax
"
+
"
&uuid=
"
+
uuid
+
params
;
},
...
...
@@ -717,7 +721,7 @@ App({
*/
get_config
(
key
,
default_value
)
{
var
value
=
null
;
let
config
=
wx
.
getStorageSync
(
this
.
data
.
cache_config_info_key
)
||
null
;
var
config
=
wx
.
getStorageSync
(
this
.
data
.
cache_config_info_key
)
||
null
;
if
(
config
!=
null
)
{
// 数据读取
...
...
@@ -839,4 +843,30 @@ App({
});
},
// uuid生成
uuid
()
{
var
d
=
new
Date
().
getTime
();
return
'
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
'
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
var
r
=
(
d
+
Math
.
random
()
*
16
)
%
16
|
0
;
d
=
Math
.
floor
(
d
/
16
);
return
(
c
==
'
x
'
?
r
:
(
r
&
0x3
|
0x8
)).
toString
(
16
);
});
},
// 获取当前uuid
request_uuid
()
{
var
uuid
=
wx
.
getStorageSync
(
this
.
data
.
cache_user_uuid_key
)
||
null
;
if
(
uuid
==
null
)
{
uuid
=
this
.
uuid
();
wx
.
setStorage
({
key
:
this
.
data
.
cache_user_uuid_key
,
data
:
uuid
,
fail
:
()
=>
{
this
.
showToast
(
'
uuid缓存失败
'
);
}
});
}
return
uuid
;
},
});
\ No newline at end of file
sourcecode/weixin/app.json
浏览文件 @
0fa2f242
...
...
@@ -65,7 +65,8 @@
"pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail"
,
"pages/plugins/weixinliveplayer/index/index"
,
"pages/plugins/weixinliveplayer/search/search"
,
"pages/plugins/weixinliveplayer/detail/detail"
"pages/plugins/weixinliveplayer/detail/detail"
,
"pages/plugins/exchangerate/currency/currency"
],
"permission"
:
{
"scope.userLocation"
:
{
...
...
sourcecode/weixin/components/quick-nav/quick-nav.wxss
浏览文件 @
0fa2f242
...
...
@@ -3,13 +3,14 @@
*/
.quick-event-submit {
position: fixed;
bottom: 50rpx;
left:
5
0rpx;
bottom:
1
50rpx;
left:
1
0rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
background-color: #d2364c;
z-index: 2;
}
.quick-event-submit image {
width: 50rpx;
...
...
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.js
0 → 100644
浏览文件 @
0fa2f242
const
app
=
getApp
();
Page
({
data
:
{
data_bottom_line_status
:
false
,
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_list
:
[],
data_default
:
null
,
data_base
:
null
,
},
onShow
()
{
// 数据加载
this
.
init
();
},
// 获取数据
init
()
{
this
.
get_data_list
();
},
// 获取数据
get_data_list
()
{
var
self
=
this
;
wx
.
showLoading
({
title
:
"
加载中...
"
});
if
(
self
.
data
.
data_list
.
length
<=
0
)
{
self
.
setData
({
data_list_loding_status
:
1
});
}
wx
.
request
({
url
:
app
.
get_request_url
(
"
index
"
,
"
index
"
,
"
exchangerate
"
),
method
:
"
POST
"
,
data
:
{},
dataType
:
"
json
"
,
success
:
res
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
var
data
=
res
.
data
.
data
;
var
status
=
((
data
.
data
.
data
||
[]).
length
>
0
);
this
.
setData
({
data_base
:
data
.
base
||
null
,
data_default
:
data
.
data
.
default
||
null
,
data_list
:
data
.
data
.
data
||
[],
data_list_loding_msg
:
''
,
data_list_loding_status
:
status
?
3
:
0
,
data_bottom_line_status
:
status
,
});
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
app
.
showToast
(
"
服务器请求出错
"
);
}
});
},
// 选择事件
selected_event
(
e
)
{
// 参数处理
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_list
=
this
.
data
.
data_list
;
var
data
=
temp_list
[
index
]
||
null
;
if
(
data
==
null
)
{
app
.
showToast
(
'
数据有误
'
);
return
false
;
}
// id与当前默认一致则不处理
if
(
data
.
id
!=
this
.
data
.
data_default
.
id
)
{
var
self
=
this
;
wx
.
showLoading
({
title
:
"
处理中...
"
});
wx
.
request
({
url
:
app
.
get_request_url
(
"
setcurrency
"
,
"
index
"
,
"
exchangerate
"
),
method
:
"
POST
"
,
data
:
{
"
currency
"
:
data
.
id
},
dataType
:
"
json
"
,
header
:
{
'
content-type
'
:
'
application/x-www-form-urlencoded
'
},
success
:
res
=>
{
wx
.
hideLoading
();
if
(
res
.
data
.
code
==
0
)
{
app
.
showToast
(
res
.
data
.
msg
,
"
success
"
);
self
.
setData
({
data_default
:
data
});
// 重新初始化配置
app
.
init_config
();
// 返回上一页
setTimeout
(
function
()
{
wx
.
navigateBack
();
},
2000
);
}
else
{
app
.
showToast
(
res
.
data
.
msg
);
}
},
fail
:
()
=>
{
wx
.
hideLoading
();
app
.
showToast
(
"
服务器请求出错
"
);
}
});
}
},
// 下拉刷新
onPullDownRefresh
()
{
this
.
get_data_list
();
},
});
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.json
0 → 100644
浏览文件 @
0fa2f242
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"货币切换"
}
\ No newline at end of file
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.wxml
0 → 100644
浏览文件 @
0fa2f242
<!-- 货币列表 -->
<view wx:if="{{data_list.length > 0}}" class="exchangerate-container">
<block wx:for="{{data_list}}" wx:key="item">
<view class="item oh spacing-mb bg-white" bindtap="selected_event" data-index="{{index}}">
<view wx:if="{{common_site_type != 1}}" class="fl icon">
<image src="/images/default-select{{item.id == data_default.id ? '-active' : ''}}-icon.png" mode="widthFix" />
</view>
<view class="fl single-text {{item.id == data_default.id ? 'cr-main' : 'cr-666'}}">{{item.name}} / {{item.symbol}}</view>
</view>
</block>
</view>
<view wx:if="{{data_list_loding_status != 3}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
\ No newline at end of file
sourcecode/weixin/pages/plugins/exchangerate/currency/currency.wxss
0 → 100644
浏览文件 @
0fa2f242
.exchangerate-container .item {
padding: 20rpx 10rpx;
font-size: 36rpx;
}
.exchangerate-container .item .icon image {
width: 50rpx;
height: 50rpx !important;
margin: 0 10rpx;
vertical-align: middle;
}
.exchangerate-container .item .single-text {
width: calc(100% - 80rpx);
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录