Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit efede916
authored
Sep 01, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加图片
1 parent
7590842e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
5 deletions
components/UserInfo/UserInfo.wxml
components/UserInfo/UserInfo.wxss
mixins/componentsMixin.js
router/router.js
utils/util.js
components/UserInfo/UserInfo.wxml
View file @
efede91
<view class="user-wrapper">
<view class="user-info">
<view>
<view
class="user-company"
>
<image webp src="{{IMGURL}}/home/logo.png"></image>
<text>汽车流通行业数字化运营服务商</text>
</view>
...
...
components/UserInfo/UserInfo.wxss
View file @
efede91
...
...
@@ -3,8 +3,23 @@
background-color: #fff;
}
.user-info {
height: 416rpx;
padding: 40rpx 52rpx;
box-shadow: 0 12rpx 32rpx 0 rgba(147, 160, 194, .35);
border-radius: 16rpx;
height: 416rpx;
padding: 40rpx 52rpx;
box-shadow: 0 12rpx 32rpx 0 rgba(147, 160, 194, .35);
border-radius: 16rpx;
}
.user-company {
display: flex;
align-items: center;
}
.user-company image {
width: 112rpx;
height: 24rpx;
}
.user-company text {
font-size: 18rpx;
line-height: 24rpx;
color: #2d2d33;
margin-left: 16rpx;
}
\ No newline at end of file
mixins/componentsMixin.js
View file @
efede91
/*
* @Description:
* @Author: huyue
* @Date: 2022-09-01 11:28:34
* @LastEditors: huyue
* @LastEditTime: 2022-09-01 17:31:43
*/
module
.
exports
=
Behavior
({
lifetimes
:
{
attached
()
{
...
...
router/router.js
View file @
efede91
...
...
@@ -42,6 +42,17 @@ class Router {
wx
.
onAppRoute
(
e
=>
{
let
thisPage
=
this
.
getPageInstance
()
if
(
thisPage
)
{
if
(
!
wx
.
$version
)
util
.
getImgVersion
().
then
(({
version
})
=>
{
wx
.
$version
=
version
||
'1.0.0'
thisPage
.
setData
({
img_version
:
wx
.
$version
})
})
else
thisPage
.
setData
({
img_version
:
wx
.
$version
,
})
thisPage
.
setData
({
IMGURL
:
wx
.
$imgUrl
})
...
...
utils/util.js
View file @
efede91
import
$router
from
'../router/index'
import
{
commonApi
}
from
'../api/api'
/**emoji正则 */
const
emojiReg
=
/
([^\u
0020-
\u
007E
\u
00A0-
\u
00BE
\u
2E80-
\u
A4CF
\u
F900-
\u
FAFF
\u
FE30-
\u
FE4F
\u
FF00-
\u
FFEF
\u
0080-
\u
009F
\u
2000-
\u
201f
\u
2026
\u
2022
\u
20ac
])
/g
/**
* 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss') //log 2020-07-31 10:00:00
*/
const
getImgVersion
=
()
=>
{
return
commonApi
.
getImgVersion
()
}
Date
.
prototype
.
format
=
function
(
fmt
)
{
let
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
...
...
@@ -398,6 +404,7 @@ const Util = {
setUserInfo
,
showLoading
,
hideLoading
,
getImgVersion
,
getViewInfo
,
setCopyData
,
getSceneId
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment