Merge branch 'master' of http://122.51.230.86:3000/sunliwei/lanan-repair
# Conflicts: # config.js # unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/components/VNavigationBar.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/components/mote-lines-divide/mote-lines-divide.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/components/reservationOrder/reservationOrder.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/components/tabBar/tabBar.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/guideList/guideDetail.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/guideList/guideList.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/home.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/cardRoll.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/evaluate.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/message.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/my.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/myEquity.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/myInfo.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/register.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/myCar/carDetail.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/myCar/myCar.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/myReservation/addReservation.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/myReservation/myReservation.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/myReservation/reservationSuccess.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/orderDetail/evaluate.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/orderDetail/orderDetail.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/orderList/orderList.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/shopDetail/shopDetail.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-rate/components/uni-rate/uni-rate.js.map # unpackage/dist/dev/mp-weixin/app.json # unpackage/dist/dev/mp-weixin/common/main.js # unpackage/dist/dev/mp-weixin/common/main.wxss # unpackage/dist/dev/mp-weixin/common/runtime.js # unpackage/dist/dev/mp-weixin/common/vendor.js # unpackage/dist/dev/mp-weixin/components/VNavigationBar.js # unpackage/dist/dev/mp-weixin/components/mote-lines-divide/mote-lines-divide.js # unpackage/dist/dev/mp-weixin/components/reservationOrder/reservationOrder.js # unpackage/dist/dev/mp-weixin/components/reservationOrder/reservationOrder.json # unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.js # unpackage/dist/dev/mp-weixin/pages/guideList/guideDetail.js # unpackage/dist/dev/mp-weixin/pages/guideList/guideList.js # unpackage/dist/dev/mp-weixin/pages/home/home.js # unpackage/dist/dev/mp-weixin/pages/home/home.wxml # unpackage/dist/dev/mp-weixin/pages/my/cardRoll.js # unpackage/dist/dev/mp-weixin/pages/my/evaluate.js # unpackage/dist/dev/mp-weixin/pages/my/message.js # unpackage/dist/dev/mp-weixin/pages/my/my.js # unpackage/dist/dev/mp-weixin/pages/my/myEquity.js # unpackage/dist/dev/mp-weixin/pages/my/myInfo.js # unpackage/dist/dev/mp-weixin/pages/my/register.js # unpackage/dist/dev/mp-weixin/pages/my/register.json # unpackage/dist/dev/mp-weixin/pages/my/register.wxml # unpackage/dist/dev/mp-weixin/pages/my/register.wxss # unpackage/dist/dev/mp-weixin/pages/myCar/carDetail.js # unpackage/dist/dev/mp-weixin/pages/myCar/myCar.js # unpackage/dist/dev/mp-weixin/pages/myReservation/addReservation.js # unpackage/dist/dev/mp-weixin/pages/myReservation/addReservation.wxml # unpackage/dist/dev/mp-weixin/pages/myReservation/myReservation.js # unpackage/dist/dev/mp-weixin/pages/myReservation/reservationSuccess.js # unpackage/dist/dev/mp-weixin/pages/orderDetail/evaluate.js # unpackage/dist/dev/mp-weixin/pages/orderDetail/orderDetail.js # unpackage/dist/dev/mp-weixin/pages/orderList/orderList.js # unpackage/dist/dev/mp-weixin/pages/orderList/orderList.wxml # unpackage/dist/dev/mp-weixin/pages/orderList/orderList.wxss # unpackage/dist/dev/mp-weixin/pages/shopDetail/shopDetail.js # unpackage/dist/dev/mp-weixin/pages/shopDetail/shopDetail.wxml # unpackage/dist/dev/mp-weixin/project.config.json # unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js # unpackage/dist/dev/mp-weixin/uni_modules/uni-rate/components/uni-rate/uni-rate.js
This commit is contained in:
commit
110bbf8232
@ -157,7 +157,14 @@
|
||||
},
|
||||
{
|
||||
"path" : "pages/login/bindPhoe",
|
||||
"style" :
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/home/content",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
|
47
pages/home/content.vue
Normal file
47
pages/home/content.vue
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
|
||||
<template>
|
||||
<view class="container">
|
||||
<web-view :src="richTextHtml"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
import config from '@/config'
|
||||
|
||||
export default {
|
||||
name: "content",
|
||||
data() {
|
||||
return {
|
||||
richTextHtml: ''
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
const id = data.id;
|
||||
this.getRichTextHtml(id)
|
||||
},
|
||||
methods:{
|
||||
async getRichTextHtml(id){
|
||||
try {
|
||||
const res = await request({
|
||||
url: '/userClient/banner/getById?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
const data = res.data
|
||||
this.richTextHtml = data.content.replace(/(<img[^>]+src=")([^":]*?)(")/g, (match, p1, p2, p3) => {
|
||||
return `${p1}${config.baseImageUrl}/${p2}${p3}`;
|
||||
});
|
||||
this.richTextHtml = `data:text/html;charset=utf-8,${encodeURIComponent(this.richTextHtml)}`
|
||||
}catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
img{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
@ -3,7 +3,8 @@
|
||||
<VNavigationBar leftTitle="true" backgroundColor="transparent" title="车辆检测维修"></VNavigationBar>
|
||||
<view class="body">
|
||||
<view class="body-top-banner">
|
||||
<image class="banner" src="@/static/images/banner.jpg" mode="aspectFit" />
|
||||
<!-- <image class="banner" src="@/static/images/banner.jpg" mode="aspectFit" />-->
|
||||
<image class="banner" v-for="banner in bannerList" :key="banner.id" :src="banner.url" @click="toContent(banner.id)" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="menus">
|
||||
<view @click="gotoPage(menu)" v-for="(menu, index) in menus" :key="index" class="menu-item">
|
||||
@ -45,7 +46,8 @@
|
||||
<script>
|
||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import request from "@/utils/request";
|
||||
import request from "../../utils/request";
|
||||
import config from "@/config";
|
||||
export default {
|
||||
components: {
|
||||
tabBarVue,
|
||||
@ -105,13 +107,31 @@
|
||||
// image: ''
|
||||
// },
|
||||
// ]
|
||||
shopList: []
|
||||
}
|
||||
shopList: [],
|
||||
bannerList: [],
|
||||
richTextHtml: null
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.getCompanyPage()
|
||||
this.getBannerList()
|
||||
},
|
||||
methods: {
|
||||
toContent(id){
|
||||
uni.navigateTo({
|
||||
url: "/pages/home/content?id=" + id,
|
||||
})
|
||||
},
|
||||
async getBannerList(){
|
||||
const res = await request({
|
||||
url: '/userClient/banner/list?type=weixiu',
|
||||
method: "get",
|
||||
})
|
||||
this.bannerList = res.data
|
||||
this.bannerList.forEach(item => {
|
||||
item.url = config.baseImageUrl + item.url
|
||||
})
|
||||
},
|
||||
gotoShopDetail(row) {
|
||||
// 直接把那一行的数据转发过去
|
||||
uni.navigateTo({
|
||||
|
Loading…
Reference in New Issue
Block a user