Commit cc86ae95 by 胡悦

优化

1 parent c9bc63d5
......@@ -11,7 +11,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Weixin",
"navigationBarTitleText": "广联数科智能名片",
"navigationBarTextStyle": "black"
},
"usingComponents": {
......@@ -19,10 +19,5 @@
"phone-number": "components/PhoneNumber/PhoneNumber"
},
"sitemapLocation": "sitemap.json",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"lazyCodeLoading": "requiredComponents"
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ Component({
cardInfo: {
type: Object,
observer(n) {
console.log(n)
this.setData({
cardInfo: n,
});
......
<view class="user-wrapper">
<view class="user-wrapper" wx:if="{{cardInfo.id}}">
<view class="user-box">
<view class="user-info" data-item="{{cardInfo}}">
<block wx:if="{{!showWechant}}">
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-08-30 11:26:21
* @LastEditors: huyue
* @LastEditTime: 2022-09-08 17:10:17
* @LastEditTime: 2022-09-09 09:57:16
*/
// pages/tab/index/index.js
import { menuMixin } from "../../../mixins/index";
......@@ -112,7 +112,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.setShareInfo();
console.log(wx.$trackData)
if (wx.$trackData.merchant) {
wx.$Track.sendTrack(this.data.curTab[this.data.curTabIndex])
......@@ -148,7 +147,7 @@ Page({
imageUrl: this.data.shareImg,
};
},
setShareInfo() {
setShareInfo(data) {
const canvasWidth = 208,
canvasHeight = 166,
textBaseline = "top";
......@@ -182,7 +181,7 @@ Page({
// 头像的
{
// url: "https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg",
url: '',
url: data.image,
x: 154,
y: 36,
width: 36,
......@@ -212,7 +211,7 @@ Page({
],
textList = [
{
text: "你的名字",
text: data.staffName,
x: 18,
y: 36,
color: "#2D2D33",
......@@ -220,15 +219,15 @@ Page({
fontSize: 14,
},
{
text: "市场总监",
x: 22 + draw_function.getTextWidth("你的名字", 14),
text: data.operation,
x: 22 + draw_function.getTextWidth(data.staffName, 14),
y: 40,
color: "#6E6E7A",
fontWeight: 400,
fontSize: 8,
},
{
text: "18888888888",
text: data.staffPhone,
x: 30,
y: 80,
color: "#6E6E7A",
......@@ -311,6 +310,7 @@ Page({
this.setData({
cardInfo: data
})
this.setShareInfo(data);
});
},
});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!