Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
286c0ae7
Commit
286c0ae7
authored
Nov 16, 2018
by
Junling Bu
Browse files
chore[renard-wx]: 基于微信开发者工具的格式化代码
parent
20b97ec8
Changes
94
Show whitespace changes
Inline
Side-by-side
renard-wx/pages/ucenter/index/index.js
View file @
286c0ae7
renard-wx/pages/ucenter/index/index.wxml
View file @
286c0ae7
renard-wx/pages/ucenter/index/index.wxss
View file @
286c0ae7
.my-info{
width:100%;
text-align:center;
border-bottom:20rpx solid #f5f5f5;
padding-bottom:30rpx;
}
.my-info .avatar{
width:176rpx;
height:176rpx;
border-radius:50%;
}
.my-info .my-info-name{
color:#293539;
font-size:76rrpx;
margin-top:10rpx;
.my-info {
width: 100%;
text-align: center;
border-bottom: 20rpx solid #f5f5f5;
padding-bottom: 30rpx;
}
.my-info .avatar {
width: 176rpx;
height: 176rpx;
border-radius: 50%;
}
.my-info .my-info-name {
color: #293539;
font-size: 76rrpx;
margin-top: 10rpx;
position: relative;
}
.my-info .my-info-name text{
width:10rpx;
height:10rpx;
position:absolute;
border:4rpx solid #a78845;
border-radius:50%;
margin-left:10rpx;
}
.my-info-order{
width:95%;
text-align:center;
margin:0 auto;
margin-top:60rpx;
}
.my-info-order .list-icon{
.my-info .my-info-name text {
width: 10rpx;
height: 10rpx;
position: absolute;
border: 4rpx solid #a78845;
border-radius: 50%;
margin-left: 10rpx;
}
.my-info-order {
width: 95%;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
}
.my-info-order .list-icon {
display: inline-block;
width: 25%;
position: relative;
}
.my-info-order .list-icon .red-dot{
width:18rpx;
height:18rpx;
border-radius:50%;
position:absolute;
right:30rpx;
.my-info-order .list-icon .red-dot {
width: 18rpx;
height: 18rpx;
border-radius: 50%;
position: absolute;
right: 30rpx;
background-color: #ff3f3e;
}
.my-info-order .list-icon text{
display:block;
font-size:22rpx;
color:#293539;
}
.my-info-order .list-icon image{
width:56rpx;
height:56rpx;
}
.my-item-list .my-item{
width:100%;
height:120rpx;
border-bottom:2rpx dashed #f5f5f5;
line-height:120rpx;
font-size:32rpx;
color:#293539;
position:relative;
font-weight:300;
}
.my-item-list .my-item text{
width:10rpx;
height:10rpx;
position:absolute;
border:2rpx solid #a78845;
border-radius:50%;
left:30rpx;
bottom:50rpx;
}
.my-item-list .my-item navigator{
display:inline-block;
margin-left:70rpx;
width:90%;
}
.my-item-list .my-item .about{
display:inline-block;
margin-left:70rpx;
width:90%;
}
.my-item-list .my-item image{
width:40rpx;
height:40rpx;
float:right;
margin-top:40rpx;
margin-right:30rpx;
position:absolute;
right:0;
}
.show-pop{
.my-info-order .list-icon text {
display: block;
font-size: 22rpx;
color: #293539;
}
.my-info-order .list-icon image {
width: 56rpx;
height: 56rpx;
}
.my-item-list .my-item {
width: 100%;
height: 120rpx;
border-bottom: 2rpx dashed #f5f5f5;
line-height: 120rpx;
font-size: 32rpx;
color: #293539;
position: relative;
font-weight: 300;
}
.my-item-list .my-item text {
width: 10rpx;
height: 10rpx;
position: absolute;
border: 2rpx solid #a78845;
border-radius: 50%;
left: 30rpx;
bottom: 50rpx;
}
.my-item-list .my-item navigator {
display: inline-block;
margin-left: 70rpx;
width: 90%;
}
.my-item-list .my-item .about {
display: inline-block;
margin-left: 70rpx;
width: 90%;
}
.my-item-list .my-item image {
width: 40rpx;
height: 40rpx;
float: right;
margin-top: 40rpx;
margin-right: 30rpx;
position: absolute;
right: 0;
}
.show-pop {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background-color: rgba(255,255,255,.8);
}
.show-pop .show-pop-box{
width:55%;
margin:0 auto;
margin-top:30%;
background-color:#fff;
border-radius:10rpx;
text-align:center;
position:relative;
padding-bottom:40rpx;
padding-top:60rpx;
padding-left:30rpx;
padding-right:30rpx;
background-color: rgba(255, 255, 255, 0.8);
}
.show-pop .show-pop-box {
width: 55%;
margin: 0 auto;
margin-top: 30%;
background-color: #fff;
border-radius: 10rpx;
text-align: center;
position: relative;
padding-bottom: 40rpx;
padding-top: 60rpx;
padding-left: 30rpx;
padding-right: 30rpx;
box-shadow: 0rpx 4rpx 30rpx #eee;
}
.show-pop-box .close{
width:70rpx;
height:70rpx;
.show-pop-box .close {
width: 70rpx;
height: 70rpx;
position: absolute;
right: 0;
top: 0;
}
.show-pop .show-pop-box .show-pop-title{
color:#a78845;
font-size:36rpx;
font-weight:300;
.show-pop .show-pop-box .show-pop-title {
color: #a78845;
font-size: 36rpx;
font-weight: 300;
position: relative;
}
.show-pop .show-pop-box .show-pop-title .r{
width:10rpx;
height:10rpx;
position:absolute;
border:1px solid #a78845;
border-radius:50%;
margin-left:20rpx;
margin-top:20rpx;
}
.show-pop .show-pop-box .show-pop-title .l{
width:10rpx;
height:10rpx;
position:absolute;
border:2rpx solid #a78845;
border-radius:50%;
margin-left:-30rpx;
margin-top:20rpx;
}
.show-pop .show-pop-box .show-pop-text{
margin-top:20rpx;
color:#293539;
font-size:30rpx;
line-height:56rpx;
font-weight:300;
.show-pop .show-pop-box .show-pop-title .r {
width: 10rpx;
height: 10rpx;
position: absolute;
border: 1px solid #a78845;
border-radius: 50%;
margin-left: 20rpx;
margin-top: 20rpx;
}
.show-pop .show-pop-box .show-pop-title .l {
width: 10rpx;
height: 10rpx;
position: absolute;
border: 2rpx solid #a78845;
border-radius: 50%;
margin-left: -30rpx;
margin-top: 20rpx;
}
.show-pop .show-pop-box .show-pop-text {
margin-top: 20rpx;
color: #293539;
font-size: 30rpx;
line-height: 56rpx;
font-weight: 300;
}
renard-wx/pages/ucenter/order/order.js
View file @
286c0ae7
renard-wx/pages/ucenter/order/order.json
View file @
286c0ae7
renard-wx/pages/ucenter/order/order.wxml
View file @
286c0ae7
renard-wx/pages/ucenter/order/order.wxss
View file @
286c0ae7
renard-wx/pages/ucenter/orderDetail/orderDetail.js
View file @
286c0ae7
renard-wx/pages/ucenter/orderDetail/orderDetail.wxml
View file @
286c0ae7
renard-wx/pages/ucenter/orderDetail/orderDetail.wxss
View file @
286c0ae7
renard-wx/project.config.json
View file @
286c0ae7
...
...
@@ -48,18 +48,6 @@
"pathName"
:
"pages/topicDetail/topicDetail"
,
"query"
:
"id=314"
},
{
"id"
:
-1
,
"name"
:
"专题评论列表"
,
"pathName"
:
"pages/topicComment/topicComment"
,
"query"
:
"valueId=314&type=1"
},
{
"id"
:
-1
,
"name"
:
"专题评论添加"
,
"pathName"
:
"pages/topicCommentPost/topicCommentPost"
,
"query"
:
"valueId=314&type=1"
},
{
"id"
:
-1
,
"name"
:
"品牌"
,
...
...
@@ -174,12 +162,6 @@
"pathName"
:
"pages/ucenter/collect/collect"
,
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"我的足迹"
,
"pathName"
:
"pages/ucenter/footprint/footprint"
,
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"我的地址"
,
...
...
@@ -197,18 +179,6 @@
"name"
:
"登录"
,
"pathName"
:
"pages/auth/login/login"
,
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"注册"
,
"pathName"
:
"pages/auth/register/register"
,
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"找回密码"
,
"pathName"
:
"pages/auth/reset/reset"
,
"query"
:
""
}
]
}
...
...
renard-wx/utils/check.js
View file @
286c0ae7
renard-wx/utils/user.js
View file @
286c0ae7
...
...
@@ -9,12 +9,12 @@ const api = require('../config/api.js');
* Promise封装wx.checkSession
*/
function
checkSession
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
wx
.
checkSession
({
success
:
function
()
{
success
:
function
()
{
resolve
(
true
);
},
fail
:
function
()
{
fail
:
function
()
{
reject
(
false
);
}
})
...
...
@@ -25,16 +25,16 @@ function checkSession() {
* Promise封装wx.login
*/
function
login
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
wx
.
login
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
code
)
{
resolve
(
res
);
}
else
{
reject
(
res
);
}
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
reject
(
err
);
}
});
...
...
@@ -46,10 +46,13 @@ function login() {
*/
function
loginByWeixin
(
userInfo
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
login
().
then
((
res
)
=>
{
//登录远程服务器
util
.
request
(
api
.
AuthLoginByWeixin
,
{
code
:
res
.
code
,
userInfo
:
userInfo
},
'
POST
'
).
then
(
res
=>
{
util
.
request
(
api
.
AuthLoginByWeixin
,
{
code
:
res
.
code
,
userInfo
:
userInfo
},
'
POST
'
).
then
(
res
=>
{
if
(
res
.
errno
===
0
)
{
//存储用户信息
wx
.
setStorageSync
(
'
userInfo
'
,
res
.
data
.
userInfo
);
...
...
@@ -72,7 +75,7 @@ function loginByWeixin(userInfo) {
* 判断用户是否登录
*/
function
checkLogin
()
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
if
(
wx
.
getStorageSync
(
'
userInfo
'
)
&&
wx
.
getStorageSync
(
'
token
'
))
{
checkSession
().
then
(()
=>
{
resolve
(
true
);
...
...
renard-wx/utils/util.js
View file @
286c0ae7
...
...
@@ -23,7 +23,7 @@ function formatNumber(n) {
* 封装微信的的request
*/
function
request
(
url
,
data
=
{},
method
=
"
GET
"
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
wx
.
request
({
url
:
url
,
data
:
data
,
...
...
@@ -32,7 +32,7 @@ function request(url, data = {}, method = "GET") {
'
Content-Type
'
:
'
application/json
'
,
'
X-Litemall-Token
'
:
wx
.
getStorageSync
(
'
token
'
)
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
statusCode
==
200
)
{
...
...
@@ -56,7 +56,7 @@ function request(url, data = {}, method = "GET") {
}
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
reject
(
err
)
}
})
...
...
@@ -91,5 +91,3 @@ module.exports = {
redirect
,
showErrorToast
};
\ No newline at end of file
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment