Commit e3979ba2 by 李嘉林

样式调整

parent a6b5f40c
...@@ -12,10 +12,17 @@ ...@@ -12,10 +12,17 @@
</div> </div>
<div class="img"> <div class="img">
<image <image
v-if="userInfo.headPortraitUrl"
mode="aspectFill" mode="aspectFill"
:src="userInfo.headPortraitUrl" :src="userInfo.headPortraitUrl"
alt="" alt=""
></image> ></image>
<image
v-else
mode="aspectFill"
src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/jpeg/9e733736-3e9d-48d1-82a8-96d21ee014df.jpeg"
alt=""
></image>
</div> </div>
</div> </div>
<div class="cell flex"> <div class="cell flex">
...@@ -129,7 +136,7 @@ export default { ...@@ -129,7 +136,7 @@ export default {
wx.hideLoading(); wx.hideLoading();
if(res.data.ok=='true'){ if(res.data.ok=='true'){
this.userInfo = res.data.data; this.userInfo = res.data.data;
this.userInfo.headPortraitUrl = DFSImg(this.userInfo.headPortraitUrl); this.userInfo.headPortraitUrl = this.userInfo.headPortraitUrl?DFSImg(this.userInfo.headPortraitUrl) : '';
} }
}) })
}, },
...@@ -178,7 +185,7 @@ export default { ...@@ -178,7 +185,7 @@ export default {
padding: 16px 16px 16px 0; padding: 16px 16px 16px 0;
margin-left: 16px; margin-left: 16px;
background: #fff; background: #fff;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #f5f5f5;
.label { .label {
flex-shrink: 0; flex-shrink: 0;
p { p {
...@@ -215,6 +222,7 @@ export default { ...@@ -215,6 +222,7 @@ export default {
width: 80px; width: 80px;
height: 100px; height: 100px;
overflow: hidden; overflow: hidden;
border: 1px solid #d8d8d8;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -17,24 +17,31 @@ ...@@ -17,24 +17,31 @@
alt="" alt=""
></image> ></image>
</div> </div>
<p>{{userInfo.company}}</p> <p>{{ userInfo.company }}</p>
</div> </div>
<div class="userImg"> <div class="userImg">
<image <image
v-if="userInfo.headPortraitUrl"
mode="aspectFill" mode="aspectFill"
:src="userInfo.headPortraitUrl" :src="userInfo.headPortraitUrl"
alt="" alt=""
></image> ></image>
</div>
<div class="userName">{{ userInfo.realname }}</div>
<div class="userWork">{{ userInfo.identity }}</div>
<div class="qrCode">
<image <image
v-else
mode="aspectFill" mode="aspectFill"
:src="qrCode" src="http://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/jpeg/9e733736-3e9d-48d1-82a8-96d21ee014df.jpeg"
alt="" alt=""
></image> ></image>
</div> </div>
<div class="userName">{{ userInfo.realname }}</div>
<div class="userWork">{{ userInfo.identity }}</div>
<div class="qrCode">
<canvas
class="canvas-code"
canvas-id="myQrcode"
style="background: #fff; width: 154px; height: 154px"
/>
</div>
<div class="time" v-if="updateTime">{{ updateTime }}</div> <div class="time" v-if="updateTime">{{ updateTime }}</div>
</div> </div>
<div class="explain">相约北京系列冬季体育赛事张家口赛区组委会</div> <div class="explain">相约北京系列冬季体育赛事张家口赛区组委会</div>
...@@ -45,7 +52,8 @@ ...@@ -45,7 +52,8 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import live from "@/api/live"; import live from "@/api/live";
import index from "@/api/index"; import index from "@/api/index";
import { DFSImg } from '@/utils/common.js' import { DFSImg } from "@/utils/common.js";
import QRCode from "@/utils/weapp-qrcode.js";
export default { export default {
name: "showPassCheck", name: "showPassCheck",
data() { data() {
...@@ -53,7 +61,8 @@ export default { ...@@ -53,7 +61,8 @@ export default {
// 十秒更新一次 // 十秒更新一次
updateTime: "", updateTime: "",
TimeOut: "", TimeOut: "",
qrCode: '', qrCode: "",
qrCodeImg: "",
userInfo: {}, userInfo: {},
}; };
}, },
...@@ -67,12 +76,12 @@ export default { ...@@ -67,12 +76,12 @@ export default {
console.log("---onLoad"); console.log("---onLoad");
}, },
onShow() { onShow() {
console.log("---onShow");
this.getQrCode(); this.getQrCode();
this.TimeOut = null; this.TimeOut = null;
this.TimeOut = setInterval(() => { this.TimeOut = setInterval(() => {
this.getQrCode(); this.getQrCode();
}, 1000 * 10); }, 1000 * 10);
console.log("---onShow");
this.init(); this.init();
}, },
onHide() { onHide() {
...@@ -91,17 +100,38 @@ export default { ...@@ -91,17 +100,38 @@ export default {
wx.hideLoading(); wx.hideLoading();
if (res.data.ok == "true") { if (res.data.ok == "true") {
this.userInfo = res.data.data; this.userInfo = res.data.data;
this.userInfo.headPortraitUrl = DFSImg(this.userInfo.headPortraitUrl); this.userInfo.headPortraitUrl = this.userInfo.headPortraitUrl
? DFSImg(this.userInfo.headPortraitUrl)
: "";
} }
}); });
}, },
getQrCode() { getQrCode() {
index.generatorUniqueCodeByDynamic().then(res=>{ index.generatorUniqueCodeByDynamic().then((res) => {
if(res.data.ok == 'true'){ if (res.data.ok == "true") {
this.qrCode = res.data.data.uniqueCodePhoto; this.qrCode = res.data.data.uniqueCode;
this.updateTime = res.data.data.createDatetime; this.updateTime = res.data.data.createDatetime;
this.getQrcodeImg();
} }
}) });
},
getQrcodeImg() {
let _this = this;
const systemInfo = wx.getSystemInfoSync();
const width = (154 * systemInfo.windowWidth) / 375;
const height = width;
new QRCode("myQrcode", {
text: _this.qrCode,
width,
height,
padding: 4, // 生成二维码四周自动留边宽度,不传入默认为0
correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
callback: (res) => {
console.log(res.path, "---res.path");
_this.qrCodeImg = res.path;
// 接下来就可以直接调用微信小程序的api保存到本地或者将这张二维码直接画在海报上面去,看各自需求
},
});
}, },
getTime() { getTime() {
let year = new Date().getFullYear(); let year = new Date().getFullYear();
...@@ -154,7 +184,7 @@ export default { ...@@ -154,7 +184,7 @@ export default {
.main { .main {
width: 80%; width: 80%;
margin: 0 auto; margin: 0 auto;
margin-top: 40px; margin-top: 60px;
padding: 10px 12px; padding: 10px 12px;
background: #fff; background: #fff;
box-shadow: 0px 6px 24px 8px rgba(0, 0, 0, 0.03), box-shadow: 0px 6px 24px 8px rgba(0, 0, 0, 0.03),
...@@ -194,7 +224,7 @@ export default { ...@@ -194,7 +224,7 @@ export default {
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
padding: 1px; padding: 1px;
overflow: hidden; overflow: hidden;
image{ image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
...@@ -217,8 +247,8 @@ export default { ...@@ -217,8 +247,8 @@ export default {
width: 154px; width: 154px;
height: 154px; height: 154px;
border: 2px solid #229df1; border: 2px solid #229df1;
padding: 4px;
margin-top: 16px; margin-top: 16px;
overflow: hidden;
} }
.time { .time {
margin-top: 14px; margin-top: 14px;
......
...@@ -203,6 +203,7 @@ export default { ...@@ -203,6 +203,7 @@ export default {
let _this = this; let _this = this;
let query = { let query = {
customerId: infoData.customerId, customerId: infoData.customerId,
tagInfos: infoData.tagInfos,
handImage: this.idPhoto, handImage: this.idPhoto,
code: this.code, code: this.code,
}; };
...@@ -358,7 +359,7 @@ export default { ...@@ -358,7 +359,7 @@ export default {
padding: 16px 16px 16px 0; padding: 16px 16px 16px 0;
margin-left: 16px; margin-left: 16px;
background: #fff; background: #fff;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #f5f5f5;
.label { .label {
flex-shrink: 0; flex-shrink: 0;
p { p {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment