Commit 65ab4bde by 胡悦

Merge branch 'kuangyq_v2.10.0' of http://192.168.3.233:8090/saas/mini-program/ai…

…-card into kuangyq_v2.10.0
2 parents 7e098e17 79d2e8fa
......@@ -18,17 +18,27 @@ const secretKey = {
sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
},
}
},
uat: {
sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
}
},
prod: {
sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
}
},
uat: {},
prod: {},
} [target[index]]
const domain = {
ip: 'http://192.168.3.181:8394',
dev: 'https://scrm.dev.glsx.com.cn',
uat: 'https://scrm.test.glsx.com.cn',
prod: 'https://scrm.cgacar.com',
prod: 'https://scrm.glsx.com.cn',
} [target[index]]
const pathEnum = {
......
......@@ -6,7 +6,7 @@
* @LastEditTime: 2022-09-02 13:48:49
*/
// pages/tab/index/index.js
import {menuMixin} from '../../../mixins/index'
import { menuMixin } from "../../../mixins/index";
Page({
behaviors: [menuMixin],
/**
......@@ -38,7 +38,7 @@ Page({
],
curTabIndex: 0,
// 0-员工,1-代理商
customerType: 0
customerType: 0,
},
introduce(e) {
const curTabIndex = e.currentTarget.dataset.index;
......@@ -58,6 +58,11 @@ Page({
});
}
},
// 跳转咨询页面
goConsult() {
console.log("跳转到咨询页面");
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -77,7 +82,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.setShareInfo()
this.setShareInfo();
},
/**
......@@ -105,125 +110,128 @@ Page({
*/
onShareAppMessage() {
return {
title: `您好,我向你推荐了广联数科的${'你的名字'}的智能名片~`,
imageUrl: this.data.shareImg
}
title: `您好,我向你推荐了广联数科的${"你的名字"}的智能名片~`,
imageUrl: this.data.shareImg,
};
},
setShareInfo() {
const canvasWidth = 208,
canvasHeight = 166,
textBaseline = 'top'
textBaseline = "top";
const draw_function = new Draw(this, {
width: canvasWidth,
height: canvasHeight,
// pixelRatio: 2,
// backgroundColor: '#096'
})
const drawCard = callBack => {
let index = 0
});
const drawCard = (callBack) => {
let index = 0;
const iconWidth = 9,
iconHeight = 9,
iconX = 18,
iconY = 79,
imgList = [{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/bg.png',
imgList = [
{
url: "https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/bg.png",
x: 0,
y: 0,
width: canvasWidth,
height: 124
}, {
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/logo.png',
height: 124,
},
{
url: "https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/logo.png",
x: 15,
y: 18,
width: 152,
height: 10
}, {
url: 'https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg',
height: 10,
},
{
url: "https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg",
x: 154,
y: 36,
width: 36,
height: 36
}, {
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/icon-phone.png',
height: 36,
},
{
url: "https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/icon-phone.png",
x: iconX,
y: iconY,
width: iconWidth,
height: iconHeight
height: iconHeight,
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/icon-address.png',
url: "https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/icon-address.png",
x: iconX,
y: iconY + 13,
width: iconWidth,
height: iconHeight
height: iconHeight,
},
{
url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/btn.png',
url: "https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/share/btn.png",
x: 64,
y: 138,
width: 80,
height: 24
}
height: 24,
},
],
textList = [{
text: '你的名字',
textList = [
{
text: "你的名字",
x: 18,
y: 36,
color: '#2D2D33',
color: "#2D2D33",
fontWeight: 600,
fontSize: 14
fontSize: 14,
},
{
text: '市场总监',
x: 22 + draw_function.getTextWidth('你的名字', 14),
text: "市场总监",
x: 22 + draw_function.getTextWidth("你的名字", 14),
y: 40,
color: '#6E6E7A',
color: "#6E6E7A",
fontWeight: 400,
fontSize: 8
fontSize: 8,
},
{
text: '18888888888',
text: "18888888888",
x: 30,
y: 80,
color: '#6E6E7A',
fontSize: 7
color: "#6E6E7A",
fontSize: 7,
},
{
text: '深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层',
text: "深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层",
x: 30,
y: 94,
color: '#6E6E7A',
color: "#6E6E7A",
fontSize: 7,
lineNum: 2,
width: 185,
lineHeight: 9
}
]
const drawImages = callBack => {
lineHeight: 9,
},
];
const drawImages = (callBack) => {
draw_function.drawImages(imgList[index], () => {
index += 1
if (index != imgList.length) drawImages(callBack)
else callBack()
})
}
index += 1;
if (index != imgList.length) drawImages(callBack);
else callBack();
});
};
drawImages(() => {
try {
textList.map((e, ind) => {
e.textBaseline = textBaseline
draw_function.drawText(e)
if (ind == textList.length - 1) throw true
})
e.textBaseline = textBaseline;
draw_function.drawText(e);
if (ind == textList.length - 1) throw true;
});
} catch (error) {
draw_function.toDataURL(({
path
}) => {
draw_function.toDataURL(({ path }) => {
this.setData({
shareImg: path
})
})
shareImg: path,
});
});
}
})
}
drawCard()
}
});
\ No newline at end of file
});
};
drawCard();
},
});
<!-- pages/tab/index/index.wxml -->
<user-info></user-info>
<view class="main-box">
<user-info></user-info>
<view class="main-bottom">
<!-- 面向渠道 -->
<import src="../../template/channel/channel.wxml" />
<template is="channel"></template>
......@@ -25,7 +27,9 @@
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType}}"></template>
</block>
</view>
<!-- 服务咨询 -->
<view>
<view bindtap="goConsult">
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
</view>
</view>
\ No newline at end of file
......@@ -5,6 +5,7 @@
page {
background-color: #F5F5F7;
}
.tab-list {
display: flex;
justify-content: space-evenly;
......@@ -61,5 +62,20 @@ page {
width: 80rpx;
position: absolute;
right: 6rpx;
bottom: 76rpx;
bottom: 90rpx;
}
.main-box {
box-sizing: border-box;
height: 100%;
position: absolute;
width: 100%;
display: flex;
flex-direction: column;
}
.main-bottom {
background: #FFFFFF;
padding: 24rpx 0;
flex: 1;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!