Commit 215403c9 by songbingqi

完成

parent ef11b4cc
<template>
<view>
<web-view src="https://www.baidu.com"></web-view>
<web-view :src="weburl"></web-view>
</view>
</template>
<script>
export default {
onLoad(options) {
this.weburl = options.weburl;
},
data() {
return {
weburl:''
}
}
}
......
......@@ -99,6 +99,7 @@
<!-- </div>
<div class="order_flow" v-if="qrShow"> -->
<!-- <div v-if="qrShow" class="code">取单码 {{ orderInfo.orderNum }}</div> -->
<!-- <div class="realQrcodeBox" :style="{'background-image':`url(${ewmImg})`}" v-if="isBuild"> -->
<div class="realQrcodeBox" v-if="isBuild">
<image mode="aspectFit" :src="ewmImg" />
</div>
......@@ -309,6 +310,9 @@ export default {
};
},
methods: {
svgToBase64(svgString) {
return `data:image/svg+xml;charset=utf-8,${encodeURI(svgString)}`;
},
startTimeOut() {
this.timer = setTimeout(async () => {
const { data = {} } = await Order.getOrderDetail({ orderId: this.orderInfo.id, nodLoading:true })
......@@ -320,7 +324,7 @@ export default {
this.waitTime = data?.data;
}
if (isBuild) {
this.ewmImg = this.orderInfo.pickCode;
this.ewmImg = this.svgToBase64(this.orderInfo.pickCode);
}
clearTimeout(this.timer)
this.startTimeOut()
......@@ -448,7 +452,7 @@ export default {
// padding: 0, // 生成二维码四周自动留边宽度,不传入默认为0
// correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
// callback: (res) => {
this.ewmImg = this.orderInfo.pickCode;
this.ewmImg = this.svgToBase64(this.orderInfo.pickCode);
// }
// })
}
......@@ -793,6 +797,8 @@ export default {
margin-top: 38rpx;
margin-bottom: 37rpx;
height: 450rpx;
background-repeat: no-repeat;
background-position: center;
overflow: hidden;
image {
width: 100%;
......
......@@ -51,7 +51,7 @@
{
"path": "pages/myWebview/myWebview",
"style": {
"navigationBarTitleText": "轮播信息",
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
......
......@@ -8,6 +8,7 @@
:list="swiperList"
keyName="image"
:interval="5000"
@click="clickBanner"
circular
:height="200"
></u-swiper>
......@@ -282,6 +283,12 @@ export default {
this.getHomeOrder();
},
methods: {
clickBanner(index) {
console.log(this.swiperList[index].page)
if(this.swiperList[index].page) {
uni.navigateTo({ url: `/menuSubPackage/pages/myWebview/myWebview?weburl=${this.swiperList[index].page}` });
}
},
// 获取省市区
getCity(latitude,longitude){
return new Promise((resolve, reject) => {
......
......@@ -246,9 +246,7 @@ export default {
clickBanner(index) {
console.log(this.swiperList[index].page)
if(this.swiperList[index].page) {
// Plus.runtime.openURL( this.swiperList[index].page );
uni.navigateTo({ url: "/menuSubPackage/pages/myWebview/myWebview" });
// window.location.href = 'http://www.baidu.com'
uni.navigateTo({ url: `/menuSubPackage/pages/myWebview/myWebview?weburl=${this.swiperList[index].page}` });
}
},
getShareData(type) {
......
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