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 cc86ae95
authored
Sep 09, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
c9bc63d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
15 deletions
app.json
components/UserInfo/UserInfo.js
components/UserInfo/UserInfo.wxml
pages/tab/index/index.js
app.json
View file @
cc86ae9
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"window"
:
{
"window"
:
{
"backgroundTextStyle"
:
"light"
,
"backgroundTextStyle"
:
"light"
,
"navigationBarBackgroundColor"
:
"#fff"
,
"navigationBarBackgroundColor"
:
"#fff"
,
"navigationBarTitleText"
:
"
Weixin
"
,
"navigationBarTitleText"
:
"
广联数科智能名片
"
,
"navigationBarTextStyle"
:
"black"
"navigationBarTextStyle"
:
"black"
},
},
"usingComponents"
:
{
"usingComponents"
:
{
...
@@ -19,10 +19,5 @@
...
@@ -19,10 +19,5 @@
"phone-number"
:
"components/PhoneNumber/PhoneNumber"
"phone-number"
:
"components/PhoneNumber/PhoneNumber"
},
},
"sitemapLocation"
:
"sitemap.json"
,
"sitemapLocation"
:
"sitemap.json"
,
"permission"
:
{
"scope.userLocation"
:
{
"desc"
:
"你的位置信息将用于小程序位置接口的效果展示"
}
},
"lazyCodeLoading"
:
"requiredComponents"
"lazyCodeLoading"
:
"requiredComponents"
}
}
\ No newline at end of file
\ No newline at end of file
components/UserInfo/UserInfo.js
View file @
cc86ae9
...
@@ -10,6 +10,7 @@ Component({
...
@@ -10,6 +10,7 @@ Component({
cardInfo
:
{
cardInfo
:
{
type
:
Object
,
type
:
Object
,
observer
(
n
)
{
observer
(
n
)
{
console
.
log
(
n
)
this
.
setData
({
this
.
setData
({
cardInfo
:
n
,
cardInfo
:
n
,
});
});
...
...
components/UserInfo/UserInfo.wxml
View file @
cc86ae9
<view class="user-wrapper">
<view class="user-wrapper"
wx:if="{{cardInfo.id}}"
>
<view class="user-box">
<view class="user-box">
<view class="user-info" data-item="{{cardInfo}}">
<view class="user-info" data-item="{{cardInfo}}">
<block wx:if="{{!showWechant}}">
<block wx:if="{{!showWechant}}">
...
...
pages/tab/index/index.js
View file @
cc86ae9
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-08-30 11:26:21
* @Date: 2022-08-30 11:26:21
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-09-0
8 17:10:17
* @LastEditTime: 2022-09-0
9 09:57:16
*/
*/
// pages/tab/index/index.js
// pages/tab/index/index.js
import
{
menuMixin
}
from
"../../../mixins/index"
;
import
{
menuMixin
}
from
"../../../mixins/index"
;
...
@@ -112,7 +112,6 @@ Page({
...
@@ -112,7 +112,6 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
this
.
setShareInfo
();
console
.
log
(
wx
.
$trackData
)
console
.
log
(
wx
.
$trackData
)
if
(
wx
.
$trackData
.
merchant
)
{
if
(
wx
.
$trackData
.
merchant
)
{
wx
.
$Track
.
sendTrack
(
this
.
data
.
curTab
[
this
.
data
.
curTabIndex
])
wx
.
$Track
.
sendTrack
(
this
.
data
.
curTab
[
this
.
data
.
curTabIndex
])
...
@@ -148,7 +147,7 @@ Page({
...
@@ -148,7 +147,7 @@ Page({
imageUrl
:
this
.
data
.
shareImg
,
imageUrl
:
this
.
data
.
shareImg
,
};
};
},
},
setShareInfo
()
{
setShareInfo
(
data
)
{
const
canvasWidth
=
208
,
const
canvasWidth
=
208
,
canvasHeight
=
166
,
canvasHeight
=
166
,
textBaseline
=
"top"
;
textBaseline
=
"top"
;
...
@@ -182,7 +181,7 @@ Page({
...
@@ -182,7 +181,7 @@ Page({
// 头像的
// 头像的
{
{
// url: "https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg",
// url: "https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg",
url
:
''
,
url
:
data
.
image
,
x
:
154
,
x
:
154
,
y
:
36
,
y
:
36
,
width
:
36
,
width
:
36
,
...
@@ -212,7 +211,7 @@ Page({
...
@@ -212,7 +211,7 @@ Page({
],
],
textList
=
[
textList
=
[
{
{
text
:
"你的名字"
,
text
:
data
.
staffName
,
x
:
18
,
x
:
18
,
y
:
36
,
y
:
36
,
color
:
"#2D2D33"
,
color
:
"#2D2D33"
,
...
@@ -220,15 +219,15 @@ Page({
...
@@ -220,15 +219,15 @@ Page({
fontSize
:
14
,
fontSize
:
14
,
},
},
{
{
text
:
"市场总监"
,
text
:
data
.
operation
,
x
:
22
+
draw_function
.
getTextWidth
(
"你的名字"
,
14
),
x
:
22
+
draw_function
.
getTextWidth
(
data
.
staffName
,
14
),
y
:
40
,
y
:
40
,
color
:
"#6E6E7A"
,
color
:
"#6E6E7A"
,
fontWeight
:
400
,
fontWeight
:
400
,
fontSize
:
8
,
fontSize
:
8
,
},
},
{
{
text
:
"18888888888"
,
text
:
data
.
staffPhone
,
x
:
30
,
x
:
30
,
y
:
80
,
y
:
80
,
color
:
"#6E6E7A"
,
color
:
"#6E6E7A"
,
...
@@ -311,6 +310,7 @@ Page({
...
@@ -311,6 +310,7 @@ Page({
this
.
setData
({
this
.
setData
({
cardInfo
:
data
cardInfo
:
data
})
})
this
.
setShareInfo
(
data
);
});
});
},
},
});
});
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