Commit 215403c9 by songbingqi

完成

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