Commit d242a2c7 by 宋冰琦

修改首页头图

parent e1a512ac
<template>
<view>
<image class="default-img" :style="{'height':!loadOver?height:0,'width':!loadOver?width:0}" :src="defaultSrc"/>
<image class="real-img" @load="loadOverFunction" :style="{'height':loadOver?height:0,'width':loadOver?width:0}" :src="realSrc" />
</view>
</template>
<script>
export default {
props:['defaultSrc','realSrc','width','height'],
data(){
return {
loadOver:false
}
},
methods: {
loadOverFunction(){
this.loadOver = true
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template> <template>
<view class="menu-box"> <view class="menu-box">
<view class="menu-banner" :style="{'height':buied?'360rpx':'450rpx'}"> <view class="menu-banner" :style="{'height':buied?'360rpx':'450rpx'}">
<image :src="img?img:'../../static/imgs/shouyezhanweitu.png'"/> <image :src="img"/>
<!-- <ImageLoader :defaultSrc="'../../static/imgs/shouyezhanweitu.png'" :realSrc="img" width="100%" height="400rpx"/> -->
<!-- <video autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4" /> --> <!-- <video autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4" /> -->
<view class="shop-info" :style="'top:100rpx'"> <view class="shop-info" :style="'top:100rpx'">
<view class="shop-box"> <view class="shop-box">
...@@ -55,13 +56,12 @@ ...@@ -55,13 +56,12 @@
style="background:#fff;width: 200px;height: 200px; display:block; left:-800rpx;position:absolute;" /> style="background:#fff;width: 200px;height: 200px; display:block; left:-800rpx;position:absolute;" />
<show-toast ref="toast"/> <show-toast ref="toast"/>
<taBar select="0"></taBar> <taBar select="0"></taBar>
<!-- <TestPopup /> -->
<ShopCar ref="shopbar" /> <ShopCar ref="shopbar" />
</view> </view>
</template> </template>
<script> <script>
import MenuAssembly from '@/components/menuAssembly' import MenuAssembly from '@/components/menuAssembly'
import TestPopup from '@/components/TestPopup/index.vue' import ImageLoader from '@/components/ImageLoader/index.vue'
import AreaPicker from '@/components/AreaPicker/index.vue' import AreaPicker from '@/components/AreaPicker/index.vue'
import User from '@/request/user' import User from '@/request/user'
import ShopCar from '../../components/shopCar/shopCar.vue' import ShopCar from '../../components/shopCar/shopCar.vue'
...@@ -73,7 +73,7 @@ import Order from '@/request/order' ...@@ -73,7 +73,7 @@ import Order from '@/request/order'
import OrderQrCode from '@/components/OrderQrCode' import OrderQrCode from '@/components/OrderQrCode'
import QRCode from '@/utils/qrCode' import QRCode from '@/utils/qrCode'
export default { export default {
components: { ShopCar, MenuAssembly, OrderQrCode, AreaPicker, TestPopup }, components: { ShopCar, MenuAssembly, OrderQrCode, AreaPicker, ImageLoader },
data() { data() {
return { return {
shopInfo: { name: '请选择' },// 店铺信息 shopInfo: { name: '请选择' },// 店铺信息
...@@ -94,7 +94,12 @@ export default { ...@@ -94,7 +94,12 @@ export default {
}, },
}, },
created() { created() {
this.img = 'https://s3.bmp.ovh/imgs/2022/07/02/2cfab823b35322e3.gif' let platform = uni.getSystemInfoSync().platform;
if(platform == 'android'){
this.img = '../../static/imgs/shouyezhanweitu.png'
}else{
this.img = 'https://s3.bmp.ovh/imgs/2022/07/02/2cfab823b35322e3.gif'
}
}, },
onLoad: async function () { onLoad: async function () {
uni.getSetting({ uni.getSetting({
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- <image class="logImg" src="/static/imgs/hooloo.png"></image> --> <!-- <image class="logImg" src="/static/imgs/hooloo.png"></image> -->
<!-- <view class="logText">未 来 咖 啡</view> --> <!-- <view class="logText">未 来 咖 啡</view> -->
</view> </view>
<image :src="img?img:'../../static/imgs/wodezhanweitu.png'"/> <image :src="img"/>
<!-- <video class="video" autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/e6582afb60924.mp4"></video> --> <!-- <video class="video" autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/e6582afb60924.mp4"></video> -->
<view class="mod11"> <view class="mod11">
<view class="avatar"> <view class="avatar">
...@@ -100,7 +100,12 @@ export default { ...@@ -100,7 +100,12 @@ export default {
this.loginInfo = loginInfo this.loginInfo = loginInfo
}) })
} }
this.img = 'https://s3.bmp.ovh/imgs/2022/07/05/1768111c5c7f5300.gif' let platform = uni.getSystemInfoSync().platform;
if(platform == 'android'){
this.img = '../../static/imgs/wodezhanweitu.png'
}else{
this.img = 'https://s3.bmp.ovh/imgs/2022/07/05/1768111c5c7f5300.gif'
}
}, },
data() { data() {
return { return {
......
...@@ -25,11 +25,14 @@ module.exports = (vm) => { ...@@ -25,11 +25,14 @@ module.exports = (vm) => {
// 请求拦截 // 请求拦截
uni.$u.http.interceptors.request.use( uni.$u.http.interceptors.request.use(
(config) => { (config) => {
const {noLoading = false} = config.params
// 可使用async await 做异步操作 // 可使用async await 做异步操作
uni.showLoading({ if(!noLoading){
title: '加载中', uni.showLoading({
mask: true, title: '加载中',
}); mask: true,
});
}
let Authorization = uni.getStorageSync(`Authorization`); let Authorization = uni.getStorageSync(`Authorization`);
const configUrl = [ const configUrl = [
'/weixin/login', '/weixin/login',
......
...@@ -2,7 +2,7 @@ export default { ...@@ -2,7 +2,7 @@ export default {
getMyOrder() { getMyOrder() {
return uni.$u.http return uni.$u.http
.get('/app/getMyOrder', { .get('/app/getMyOrder', {
params: {}, params: {noLoading:true},
}) })
.then((res) => res) .then((res) => res)
.catch((err) => { .catch((err) => {
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
getHomeOrder(params) { getHomeOrder(params) {
return uni.$u.http return uni.$u.http
.get(`/app/getHomeOrder?shopId=${params.shopId}`, { .get(`/app/getHomeOrder?shopId=${params.shopId}`, {
params: {}, params: {noLoading:true},
}) })
.then((res) => res) .then((res) => res)
.catch((err) => { .catch((err) => {
......
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