优化网络图片路径

This commit is contained in:
wangxiaowei 2024-11-15 15:47:51 +08:00
parent b5249059c0
commit e3f64ddd64
39 changed files with 120 additions and 69 deletions

@ -104,3 +104,7 @@ export function gh(data) {
return request.post("gh/pay", data)
}
export function wxPay(data) {
return request.post("gt/wxPay", data)
}

@ -175,7 +175,8 @@
} from '@/api/user.js'
import {
payTest,
huifu
huifu,
wxPay
} from '@/api/local_store.js'
import {
getLocalShopById
@ -425,7 +426,7 @@
// this.handleWechatPay(pay);
// }
// })
payTest({
wxPay({
money: this.money,
lid: this.lstore_id,
user_id: this.user_id,

@ -52,11 +52,11 @@
overflow: hidden;
&.new {
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/index_new_bg.png);
background-image: url(#{$aliOSS-path}uniapp/index_new_bg.png);
}
&.hot {
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/index_hot_bg.png);
background-image: url(#{$aliOSS-path}uniapp/index_hot_bg.png);
}
.active-hd {

@ -8,7 +8,6 @@
<view :data-item="item" style="width:100%;height:100%;" @click="goPage(item)">
<u-image mode="aspectFill" :width="'calc(100% - ' + previousMargin + ')'" height="100%"
:border-radius="radius" :src="item.image"></u-image>
<!-- <j-video url="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/mall_news/video/20240723162156dc5897012.mp4" height="100%" :width="'calc(100% - ' + previousMargin + ')'" poster="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/mall_news/video/20240723162156dc5897012.mp4"></j-video> -->
</view>
</swiper-item>
</swiper>

@ -172,7 +172,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
icon: `${this.$aliOSS}uniapp/order_null.png`,
tip: '暂无售后~',
fixed: true
}

@ -63,7 +63,7 @@
auto: true,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: '暂无砍价记录~',
fixed: true
}

@ -55,7 +55,7 @@
auto: false,
noMoreSize: 1,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: '暂无商品~',
}
},

@ -56,7 +56,7 @@
auto: false,
noMoreSize: 1,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: '暂无商品~',
}
},

@ -85,7 +85,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: '暂无收藏~',
fixed: true
}

@ -84,7 +84,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: '暂无评价~',
fixed: true
}

@ -36,7 +36,7 @@
background-repeat: no-repeat;
border-radius: 14rpx;
overflow: hidden;
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/index_community_bg.png);
background-image: url(#{$aliOSS-path}uniapp/index_community_bg.png);
.active-hd {
padding: 24rpx 20rpx;

@ -146,7 +146,7 @@
background-size: 100% 100%;
&.gray {
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/coupon_bg_grey.png);
background-image: url(#{$aliOSS-path}uniapp/coupon_bg_grey.png);
.btn {
&.plain {

@ -89,7 +89,7 @@
}
};
</script>
<style scoped>
<style lang="scss" scoped>
.coupon-order .coupon-list {
padding: 20rpx 24rpx;
}
@ -97,7 +97,7 @@
.coupon-order .coupon-item {
position: relative;
height: 200rpx;
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/coupon_bg.png);
background-image: url(#{$aliOSS-path}uniapp/coupon_bg.png);
background-size: 100% 100%;
}

@ -113,7 +113,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
icon: `${this.$aliOSS}uniapp/order_null.png`,
tip: '暂无订单~',
fixed: true
}

@ -41,7 +41,7 @@
upOption: {
auto: false,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: "暂无商品",
},
toTop: {

@ -59,7 +59,7 @@
auto: true,
noMoreSize: 1,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: '暂无拼团~',
fixed: true
}

@ -126,7 +126,7 @@
.seckill-hd {
padding: 0 20rpx;
height: 100rpx;
background: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/bg_seckill.png) no-repeat;
background: url(#{$aliOSS-path}uniapp/bg_seckill.png) no-repeat;
background-size: 100%;
}

@ -246,7 +246,7 @@
}
.activity-zone {
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/bg_activity_home.png);
background-image: url(#{$aliOSS-path}uniapp/bg_activity_home.png);
background-size: 100% auto;
padding: 0 15rpx;
border-radius: 14rpx;

@ -85,7 +85,7 @@
.seckill-hd {
padding: 0 20rpx;
height: 100rpx;
background: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/bg_seckill.png) no-repeat;
background: url(#{$aliOSS-path}uniapp/bg_seckill.png) no-repeat;
background-size: 100%;
}

@ -25,7 +25,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/coupon_null.png',
icon: `${this.$aliOSS}uniapp/coupon_null.png`,
tip: '暂无优惠券',
fixed: true
}

@ -128,7 +128,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
icon: `${this.$aliOSS}uniapp/order_null.png`,
tip: '暂无订单~',
fixed: true
}

@ -1,9 +1,9 @@
<template>
<view class="swiper-wrap">
<swiper class="swiper" ref="swiper" :autoplay="autoplay" :circular="circular"
:interval="interval" :duration="duration" @change="swiperChange">
<swiper class="swiper" ref="swiper" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" @change="swiperChange">
<swiper-item v-if="video">
<view class="video-wrap">
<view class="video-wrap">
<j-video :url="video" height="750rpx" width="750rpx" :poster="poster"></j-video>
</view>
</swiper-item>
@ -15,6 +15,15 @@
</swiper>
<text class="bold tip" v-if="tip">{{tip}}</text>
<view class="dots black sm bg-white br60">{{currentSwiper + 1}}/{{swiperLength}}</view>
<view>
<view class="txt" @click="expand">
返
</view>
<view :class="'con ' + (isActive ? 'active' : '')">
返补50%
</view>
</view>
</view>
</template>
@ -28,6 +37,11 @@
urls: [],
showPlay: true,
showControls: false,
isActive: true,
x: 0,
y: 0,
startX: 0,
startY: 0
};
},
props: {
@ -50,14 +64,14 @@
video: {
type: String,
},
autoplay: {
autoplay: {
type: Boolean,
default: true
default: true
},
borderRadius: {
borderRadius: {
type: [Number, String],
default: 0,
},
},
tip: {
type: String,
default: ''
@ -72,24 +86,28 @@
}
});
},
immediate: true
immediate: true
},
},
methods: {
swiperChange(e) {
this.currentSwiper = e.detail.current
},
previewImage(current) {
uni.previewImage({
current,
urls: this.imgUrls.map((item) => item.uri)
})
},
expand() {
this.isActive = !this.isActive;
}
},
computed: {
poster() {
return this.urls[0] ? this.urls[0].url : ''
return this.urls[0] ? this.urls[0].url : ''
},
swiperLength() {
let length = this.urls.length
@ -146,7 +164,7 @@
transform: translate(-50%, -50%);
z-index: 999;
}
.tip {
position: absolute;
top: 50%;
@ -154,4 +172,40 @@
transform: translateY(-50%);
writing-mode: vertical-rl;
}
</style>
.txt {
background-color: #FF2C3C;
width: 80rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
border-radius: 50%;
position: absolute;
top: 180rpx;
left: 20rpx;
color: #fff;
box-shadow: 0 0 24rpx 0 #d59797;
z-index: 2;
font-size: 32rpx;
font-weight: bold;
}
.con {
background-color: rgb(255 44 60);
box-shadow: 0 0 12px 0 #ea6f6f;
transition: all 0.5s ease;
transform: translateX(26rpx);
position: absolute;
top: 192rpx;
color: #fff;
z-index: 1;
opacity: 0;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
.active {
opacity: 1;
transform: translateX(84rpx);
}
</style>

@ -88,10 +88,10 @@
<style lang="scss">
.nearby-shops {
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/index_community_bg.png);
background-image: url(#{$aliOSS-path}uniapp/index_community_bg.png);
}
.shop-recommends {
background: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/index_shop_bg.png) no-repeat;
background: url(#{$aliOSS-path}uniapp/index_shop_bg.png) no-repeat;
}
.shop-recommend {
background-size: cover;

@ -67,7 +67,7 @@
auto: false,
noMoreSize: 4,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
icon: `${this.$aliOSS}uniapp/order_null.png`,
tip: '暂无分销订单~',
fixed: true
}

@ -17,7 +17,7 @@ const IS_H5 = false
/** S API BaseURL **/
const baseURLMap = {
// 开发环境
development: 'https://dlh.hainings.com',
development: 'https://dlh.stnav.com',
// 生产环境
production: IS_H5 ? location.origin : 'https://dlh.hainings.com',
//app https://dlh.zjeloong.com

@ -12,6 +12,7 @@ Vue.component('mescroll-body', MescrollBody)
Vue.prototype.$toast = toast
Vue.prototype.$Cache = Cache
Vue.prototype.$payWait = 2500
Vue.prototype.$aliOSS = 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/'
Vue.config.productionTip = false
Vue.component('RouterLink', routerLink)

@ -38,7 +38,7 @@
return {
upOption: {
empty: {
icon: "https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png",
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: "暂无商品~"
}
},

@ -25,7 +25,7 @@
active: 0,
upOption: {
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/coupon_null.png',
icon: `${this.$aliOSS}uniapp/coupon_null.png`,
tip: "暂无优惠券",
}
},

@ -19,7 +19,6 @@
<product-swiper :imgUrls="swiperList" :video="goodsDetail.video"
tip="注意! 本商品销售者为购物链接所属的店铺经营者"></product-swiper>
<!-- 秒杀 -->
<view class="seckill flex row-between" v-if="goodsType == 1">
<view class="price flex">
<view class="flex white info">
@ -43,7 +42,6 @@
</view>
</view>
<!-- 拼团 -->
<view class="group" v-show="goodsType == 2">
<view class="row info" style="height: 100%">
<view class="row-between ml20 white" style="flex: 1;">
@ -68,7 +66,6 @@
</view>
</view>
<!-- 抢购 -->
<view class="group" v-show="goodsType == 4">
<view class="row info" style="height: 100%">
<view class="row-between ml20 white" style="flex: 1;">
@ -80,6 +77,7 @@
</view>
</view>
</view>
<view class="goods-info bg-white">
<view class="info-header flex" v-if="goodsType != 1 && goodsType != 4">
<view class="price flex flex-1">
@ -370,7 +368,7 @@
<loading-view v-if="isFirstLoading"></loading-view>
</view>
</template>
team_min_price
<script>
import {
getGoodsDetail,
@ -937,7 +935,7 @@ team_min_price
.price {
width: 504rpx;
height: 100%;
background: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/bg_seckill.png) no-repeat;
background: url(#{$aliOSS-path}uniapp/bg_seckill.png) no-repeat;
background-size: 100%;
}
@ -949,7 +947,7 @@ team_min_price
.group {
height: 100rpx;
width: 100%;
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/pintuan_bg.png);
background-image: url(#{$aliOSS-path}uniapp/pintuan_bg.png);
background-size: 100%;
.group-num {
@ -1210,7 +1208,7 @@ team_min_price
}
.share-con {
background: url('https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/bg_packet_img.png');
background: url('#{$aliOSS-path}uniapp/bg_packet_img.png');
width: 241rpx;
height: 208rpx;
background-size: 100%;

@ -81,7 +81,7 @@
upOption: {
auto: false,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: "暂无商品",
}
},

@ -288,8 +288,9 @@
page {
padding: 0;
}
.index-bg {
background-image: url('https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uploads/images/202305310842517659b6584.png');
background-image: url('#{$aliOSS-path}uploads/images/202305310842517659b6584.png');
background-size: 100% auto;
background-repeat: no-repeat;
}

@ -163,7 +163,7 @@
auto: false,
empty: {
fixed: true,
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/order_null.png',
icon: `${this.$aliOSS}uniapp/order_null.png`,
tip: '暂无数据',
top: '60%'
}
@ -181,8 +181,6 @@
this.mescroll.resetUpScroll()
}
} catch (e) {}
// 选择城市后是否刷新
if (options?.refresh) await this.getHomeFun()
this.getLocal()
},
@ -226,11 +224,6 @@
await this.initLocationFunc();
},
async getHomeFun() {
console.log('getHome')
console.log(this.cityInfo.id)
},
swiperChange(e) {
this.currentSwiper = e.detail.current
},
@ -334,7 +327,6 @@
handler(val) {
this.$refs.uWaterfall.clear()
this.keyword = ''
this.getHomeFun()
this.mescroll.resetUpScroll()
}
},
@ -363,7 +355,7 @@
.index-bg {
position: relative;
background-image: url('https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uploads/images/2024010413223852d897379.jpg');
background-image: url('#{$aliOSS-path}uploads/images/2024010413223852d897379.jpg');
padding-top: 40rpx;
padding-bottom: 14rpx;
}

@ -26,7 +26,7 @@
return {
upOption: {
empty: {
icon: "https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png",
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: "暂无商品~"
}
},

@ -57,7 +57,7 @@
upOption: {
auto: false,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/news_null.png',
icon: `${this.$aliOSS}uniapp/news_null.png`,
tip: "暂无数据",
}
},

@ -26,7 +26,7 @@
lists: [],
upOption: {
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/news_null.png',
icon: `${this.$aliOSS}uniapp/news_null.png`,
tip: "暂无消息通知~",
}
},

@ -62,7 +62,7 @@
upOption: {
auto: false,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: "暂无数据~",
},
},

@ -125,7 +125,7 @@
upOption: {
auto: false,
empty: {
icon: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/goods_null.png',
icon: `${this.$aliOSS}uniapp/goods_null.png`,
tip: "暂无商品",
}
},

@ -180,7 +180,7 @@
<view v-if="userInfo.after_sale" class="badge xs flex row-center bg-white">
{{userInfo.after_sale}}
</view>
<image class="nav-icon" :src="imgUrl + '20240523164511214f81779.png'"></image>
<image class="nav-icon" :src="aliOSSDomain + 'uploads/images/20240523164511214f81779.png'"></image>
</view>
<view class="sm m-t-10 bold">我的订单</view>
</view>
@ -191,7 +191,7 @@
<view v-if="userInfo.after_sale" class="badge xs flex row-center bg-white">
{{userInfo.after_sale}}
</view>
<image class="nav-icon" :src="imgUrl + '202106231653409334c6907.png'"></image>
<image class="nav-icon" :src="aliOSSDomain + 'uploads/images/202106231653409334c6907.png'"></image>
</view>
<view class="sm m-t-10 bold">收货地址</view>
</view>
@ -276,7 +276,6 @@
toolsList: [],
newGoods: [],
priceType: 0,
imgUrl: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uploads/images/',
local_order_path: '/bundle_b/pages/local_shop_order/index',
localMenuList: []
};
@ -410,7 +409,7 @@
}
.user {
background-image: url(https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/my_topbg.png);
background-image: url(#{$aliOSS-path}uniapp/my_topbg.png);
background-size: 100% auto;
background-repeat: no-repeat;

@ -50,3 +50,5 @@ $u-bg-color: #f3f4f6;
$u-form-item-border-color: #dcdfe6;
$u-form-item-height: 70rpx;
$aliOSS-path: 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/';