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>
<view class="menu-box">
<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" /> -->
<view class="shop-info" :style="'top:100rpx'">
<view class="shop-box">
......@@ -55,13 +56,12 @@
style="background:#fff;width: 200px;height: 200px; display:block; left:-800rpx;position:absolute;" />
<show-toast ref="toast"/>
<taBar select="0"></taBar>
<!-- <TestPopup /> -->
<ShopCar ref="shopbar" />
</view>
</template>
<script>
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 User from '@/request/user'
import ShopCar from '../../components/shopCar/shopCar.vue'
......@@ -73,7 +73,7 @@ import Order from '@/request/order'
import OrderQrCode from '@/components/OrderQrCode'
import QRCode from '@/utils/qrCode'
export default {
components: { ShopCar, MenuAssembly, OrderQrCode, AreaPicker, TestPopup },
components: { ShopCar, MenuAssembly, OrderQrCode, AreaPicker, ImageLoader },
data() {
return {
shopInfo: { name: '请选择' },// 店铺信息
......@@ -94,7 +94,12 @@ export default {
},
},
created() {
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 () {
uni.getSetting({
......
......@@ -5,7 +5,7 @@
<!-- <image class="logImg" src="/static/imgs/hooloo.png"></image> -->
<!-- <view class="logText">未 来 咖 啡</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> -->
<view class="mod11">
<view class="avatar">
......@@ -100,7 +100,12 @@ export default {
this.loginInfo = loginInfo
})
}
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() {
return {
......
......@@ -25,11 +25,14 @@ module.exports = (vm) => {
// 请求拦截
uni.$u.http.interceptors.request.use(
(config) => {
const {noLoading = false} = config.params
// 可使用async await 做异步操作
if(!noLoading){
uni.showLoading({
title: '加载中',
mask: true,
});
}
let Authorization = uni.getStorageSync(`Authorization`);
const configUrl = [
'/weixin/login',
......
......@@ -2,7 +2,7 @@ export default {
getMyOrder() {
return uni.$u.http
.get('/app/getMyOrder', {
params: {},
params: {noLoading:true},
})
.then((res) => res)
.catch((err) => {
......@@ -68,7 +68,7 @@ export default {
getHomeOrder(params) {
return uni.$u.http
.get(`/app/getHomeOrder?shopId=${params.shopId}`, {
params: {},
params: {noLoading:true},
})
.then((res) => res)
.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