feat 压缩大小
@@ -32,6 +32,11 @@ export function getAddressLists() {
|
||||
return request.get('user_address/lists')
|
||||
}
|
||||
|
||||
// 获取地区树(公开接口,页面按需加载)
|
||||
export function getRegionLists() {
|
||||
return request.get('region/lists')
|
||||
}
|
||||
|
||||
// 添加编辑地址
|
||||
export function editAddress(data) {
|
||||
return request.post('user_address/update', data)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<template>
|
||||
<view class="activity-detail-contain">
|
||||
<view class="header row-start" v-if="goodsList.length">
|
||||
<view class="header row-start" v-if="goodsList.length" :style="{ backgroundImage: 'url(' + staticAsset('bundle/activity_detail_bg.png') + ')' }">
|
||||
<text class="white header-title"> {{title}} <text class="white xxs ml20">{{name}}</text></text>
|
||||
</view>
|
||||
<view class="content">
|
||||
@@ -109,7 +109,6 @@ export default {
|
||||
</script>
|
||||
<style>
|
||||
.activity-detail-contain .header {
|
||||
background-image: url(../../static/images/activity_detail_bg.png);
|
||||
background-size: 100% 100%;
|
||||
height: 340rpx;
|
||||
width: 100%;
|
||||
@@ -158,4 +157,4 @@ export default {
|
||||
.goods-container .data-null {
|
||||
padding-top: 225rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<download-nav v-if="showDownload" :top="44"></download-nav>
|
||||
<!-- #endif -->
|
||||
<view v-show="status == -1">
|
||||
<view class="bargain-process-header">
|
||||
<view class="bargain-process-header" :style="bargainHeaderStyle">
|
||||
<view class="mt20 column status-container">
|
||||
<view class="white xxl">
|
||||
{{activityObj.bargain_tips}}
|
||||
@@ -210,7 +210,7 @@
|
||||
<loading-view v-if="showLoadingView" />
|
||||
<goods-bargain v-if="status != -1" ref="goodsBargain" />
|
||||
<u-popup v-model="showBargainPop" mode="center">
|
||||
<view class="bargain-pop-container">
|
||||
<view class="bargain-pop-container" :style="{ backgroundImage: 'url(' + staticAsset('bundle/bg_kanjia.png') + ')' }">
|
||||
<view class="md normal bold row-center" style="padding-top: 64rpx;">
|
||||
恭喜您成功砍下<text class="primary lg">{{knifePrice || 0}}</text>元
|
||||
</view>
|
||||
@@ -226,7 +226,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="row-center">
|
||||
<view class="invite-btn row-center md" @click="shareToBargain">
|
||||
<view class="invite-btn row-center md" :style="{ backgroundImage: 'url(' + staticAsset('bundle/coupon_button.png') + ')' }" @click="shareToBargain">
|
||||
{{isHelpKnife ? '确定' : '邀请好友帮砍'}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -343,6 +343,10 @@
|
||||
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
bargainHeaderStyle() {
|
||||
const image = this.staticAsset('bg_hometop')
|
||||
return image ? { backgroundImage: `url(${image})` } : {}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -501,7 +505,7 @@
|
||||
<style lang="scss">
|
||||
.bargain-process-container {
|
||||
.bargain-process-header {
|
||||
background-image: url(../../../static/images/bg_hometop.png);
|
||||
background-color: #ff6b57;
|
||||
height: 420rpx;
|
||||
background-size: 100% 100%;
|
||||
padding-top: 30rpx;
|
||||
@@ -674,7 +678,6 @@
|
||||
.bargain-pop-container {
|
||||
width: 559rpx;
|
||||
height: 580rpx;
|
||||
background-image: url(../../static/images/bg_kanjia.png);
|
||||
background-size: 100% 100%;
|
||||
.differ-price {
|
||||
font-size: 58rpx;
|
||||
@@ -697,7 +700,6 @@
|
||||
}
|
||||
}
|
||||
.invite-btn {
|
||||
background-image: url(../../static/images/coupon_button.png);
|
||||
background-size: 100% 100%;
|
||||
height: 106rpx;
|
||||
color: #7B3200;
|
||||
@@ -714,4 +716,4 @@
|
||||
background-color: $ls-color-white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<img class="content-img" :src="server.image" />
|
||||
<view class="primary wechat-num lg">客服微信</view>
|
||||
<view class="row-center copy-btn xxl white" @click="onCopy(server.wechat)">
|
||||
<image class="mr5" style="width: 32px;height: 25px;" src="../../static/images/wechat-btn-icon.png" />
|
||||
<image class="mr5" style="width: 32px;height: 25px;" :src="staticAsset('bundle/wechat-btn-icon.png')" />
|
||||
微信扫码添加
|
||||
</view>
|
||||
<view class="mt20 normal xs" style="line-height: 35px">{{server.time}}</view>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="goods-combination">
|
||||
<navbar title="拼团活动"></navbar>
|
||||
<view class="header">
|
||||
<image class="img" src="../../static/images/group_bg.png"></image>
|
||||
<image class="img" :src="staticAsset('bundle/group_bg.png')"></image>
|
||||
</view>
|
||||
<view class="main bg-primary">
|
||||
<view class="goods-list">
|
||||
@@ -32,7 +32,7 @@
|
||||
<view class="dec row">
|
||||
<view class="group mr20 row">
|
||||
<view class="group-img row-center">
|
||||
<image class="icon-sm" src="../../static/images/icon_group_white.png"></image>
|
||||
<image class="icon-sm" :src="staticAsset('bundle/icon_group_white.png')"></image>
|
||||
</view>
|
||||
<view class="primary xxs mr10 ml10">{{item.people_num}}人团</view>
|
||||
</view>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- 顶部收货地址 -->
|
||||
<view class="express-address row" v-if="take.contacts">
|
||||
<view class="express-left column-center">
|
||||
<image class="express-icon" :src="finish.tips ? '../../static/images/logistics_address.png' : '../../static/images/logistics_address_gray.png'"></image>
|
||||
<image class="express-icon" :src="finish.tips ? staticAsset('bundle/logistics_address.png') : staticAsset('bundle/logistics_address_gray.png')"></image>
|
||||
<view class="express-line"></view>
|
||||
</view>
|
||||
<view class="express-right">
|
||||
@@ -50,7 +50,7 @@
|
||||
</view>
|
||||
<view class="express-item row" v-if="finish.tips">
|
||||
<view class="express-left column-center">
|
||||
<image class="express-icon" src="../../static/images/logistics_success.png"></image>
|
||||
<image class="express-icon" :src="staticAsset('bundle/logistics_success.png')"></image>
|
||||
<view class="express-line"></view>
|
||||
</view>
|
||||
<view class="express-right">
|
||||
@@ -61,7 +61,7 @@
|
||||
</view>
|
||||
<view class="express-item row" v-if="delivery.traces && delivery.traces.length">
|
||||
<view class="express-left column-center">
|
||||
<image class="express-icon" src="../../static/images/logistics_transit.png"></image>
|
||||
<image class="express-icon" :src="staticAsset('bundle/logistics_transit.png')"></image>
|
||||
<view class="express-line"></view>
|
||||
</view>
|
||||
<view class="express-right muted" v-if="express == 'kd100'">
|
||||
@@ -103,7 +103,7 @@
|
||||
</block>
|
||||
<view class="express-item row" v-if="shipment.tips">
|
||||
<view class="express-left column-center">
|
||||
<image class="express-icon" src="../../static/images/logistics_delivered.png"></image>
|
||||
<image class="express-icon" :src="staticAsset('bundle/logistics_delivered.png')"></image>
|
||||
<view class="express-line"></view>
|
||||
</view>
|
||||
<view class="express-right muted">
|
||||
@@ -114,7 +114,7 @@
|
||||
</view>
|
||||
<view class="express-item row" v-if="buy.tips">
|
||||
<view class="express-left column-center">
|
||||
<image class="express-icon" src="../../static/images/logistics_pay.png"></image>
|
||||
<image class="express-icon" :src="staticAsset('bundle/logistics_pay.png')"></image>
|
||||
<view class="express-line"></view>
|
||||
</view>
|
||||
<view class="express-right muted">
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
<template>
|
||||
<view class="hot-list">
|
||||
<view class="hot-list" :style="{ backgroundImage: 'url(' + staticAsset('bundle/hot_list_bg.png') + ')' }">
|
||||
<view class="header">
|
||||
<view class="title row mb20">
|
||||
<image src="../../static/images/icon_paixu.png" class="icon mr20"></image>
|
||||
<image :src="staticAsset('bundle/icon_paixu.png')" class="icon mr20"></image>
|
||||
<text class="xs white">实时更新热销火爆商品</text>
|
||||
</view>
|
||||
<swipers :pid="15" height="284rpx" radius="10rpx"></swipers>
|
||||
@@ -91,7 +91,7 @@
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.hot-list {
|
||||
background: url(../../static/images/hot_list_bg.png) no-repeat;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 330rpx;
|
||||
padding: 62rpx 30rpx 0;
|
||||
min-height: 100vh;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</view>
|
||||
<loading-footer slotEmpty :status="loadingStatus">
|
||||
<view class="data-null column-center" slot="empty">
|
||||
<image src="../../static/images/null_gift.png" class="img-null"></image>
|
||||
<image :src="staticAsset('bundle/null_gift.png')" class="img-null"></image>
|
||||
<text class="xs muted">暂无抽奖记录~</text>
|
||||
</view>
|
||||
</loading-footer>
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
<view class="address black xs mb20 row">
|
||||
<image
|
||||
class="icon1"
|
||||
src="../../static/images/icon_shop.png"
|
||||
:src="staticAsset('bundle/icon_shop.png')"
|
||||
></image>
|
||||
{{ item.shop_address }}
|
||||
</view>
|
||||
<view class="time black xs row">
|
||||
<image
|
||||
class="icon1"
|
||||
src="../../static/images/icon_time.png"
|
||||
:src="staticAsset('bundle/icon_time.png')"
|
||||
></image>
|
||||
{{ item.business_start_time }} - {{ item.business_end_time }}
|
||||
</view>
|
||||
@@ -47,7 +47,7 @@
|
||||
<view class="ml20 flexnone">
|
||||
<image
|
||||
class="icon2"
|
||||
src="../../static/images/icon_call.png"
|
||||
:src="staticAsset('bundle/icon_call.png')"
|
||||
@tap.stop="onCall(item.mobile)"
|
||||
></image>
|
||||
</view>
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
id: item.id,
|
||||
latitude: item.latitude,
|
||||
longitude: item.longitude,
|
||||
iconPath: "../../static/images/icon_marker.png",
|
||||
iconPath: this.staticAsset('bundle/icon_marker.png'),
|
||||
width: 34,
|
||||
height: 34,
|
||||
callout: {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</view>
|
||||
<u-popup class="pay-popup" v-model="showPopup" closeable round mode="center">
|
||||
<view class="content bg-white">
|
||||
<image class="img-icon" src="../../static/images/recharge_success.png"></image>
|
||||
<image class="img-icon" :src="staticAsset('bundle/recharge_success.png')"></image>
|
||||
<view class="xxl bold mt10">充值成功</view>
|
||||
<view v-if="rechargeInfo.give_integral || rechargeInfo.give_growth" class="lg"
|
||||
style="margin-top: 50rpx">恭喜您获得 <text><text class="primary"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
:src="
|
||||
userInfo.avatar != ''
|
||||
? userInfo.avatar
|
||||
: '../../static/images/default_avatar.png'
|
||||
: staticAsset('bundle/default_avatar.png')
|
||||
"
|
||||
@click="handleUser"
|
||||
>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
:src="
|
||||
userInfo.avatar != ''
|
||||
? userInfo.avatar
|
||||
: '../../static/images/default_avatar.png'
|
||||
: staticAsset('bundle/default_avatar.png')
|
||||
"
|
||||
>
|
||||
</image>
|
||||
|
||||
@@ -21,20 +21,20 @@
|
||||
</view>
|
||||
<view class="nav row">
|
||||
<navigator class="nav-item column-center" hover-class="none" url="/bundle/pages/balance_transfer/balance_transfer">
|
||||
<image src="../../static/images/icon_yezz.png"></image>
|
||||
<image :src="staticAsset('bundle/icon_yezz.png')"></image>
|
||||
<view class="mt10">余额转账</view>
|
||||
</navigator>
|
||||
<navigator class="nav-item column-center" hover-class="none" url="/bundle/pages/user_bill/user_bill?type=0">
|
||||
<image src="../../static/images/icon_zhmx.png"></image>
|
||||
<image :src="staticAsset('bundle/icon_zhmx.png')"></image>
|
||||
<view class="mt10">账户明细</view>
|
||||
</navigator>
|
||||
|
||||
<navigator class="nav-item column-center" hover-class="none" url="/bundle/pages/transfer_record/transfer_record">
|
||||
<image src="../../static/images/icon_zzjl.png"></image>
|
||||
<image :src="staticAsset('bundle/icon_zzjl.png')"></image>
|
||||
<view class="mt10">转账记录</view>
|
||||
</navigator>
|
||||
<navigator class="nav-item column-center" hover-class="none" url="/bundle/pages/recharge_code/recharge_code">
|
||||
<image src="../../static/images/icon_czjl.png"></image>
|
||||
<image :src="staticAsset('bundle/icon_czjl.png')"></image>
|
||||
<view class="mt10">充值记录</view>
|
||||
</navigator>
|
||||
</view>
|
||||
@@ -48,7 +48,7 @@
|
||||
<view class="muted sm mt10">积分签到抵现金</view>
|
||||
<navigator class="br60 bg-primary white join-btn row-center" url="/bundle/pages/user_sign/user_sign" hover-class="none">立即参与</navigator>
|
||||
</view>
|
||||
<image style="width:274rpx;height: 210rpx;" src="../../static/images/img_activity_jifen.png"></image>
|
||||
<image style="width:274rpx;height: 210rpx;" :src="staticAsset('bundle/img_activity_jifen.png')"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -117,11 +117,11 @@
|
||||
case 1:
|
||||
"";
|
||||
case 2:
|
||||
return '../../static/images/icon_cashOut_wait.png';
|
||||
return this.staticAsset('bundle/icon_cashOut_wait.png');
|
||||
case 3:
|
||||
return '/static/images/icon_paySuccess.png';
|
||||
case 4:
|
||||
return '../../static/images/icon_payFail.png';
|
||||
return this.staticAsset('bundle/icon_payFail.png');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 570 B |
|
Before Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 614 B |
|
Before Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 914 B |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 204 B |
|
Before Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 141 B |
|
Before Width: | Height: | Size: 653 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 987 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -17,7 +17,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
<template>
|
||||
<view :class="'active-area ' + type">
|
||||
<view :class="'active-area ' + type" :style="backgroundStyle">
|
||||
<view class="a-header">
|
||||
<slot name="header"></slot>
|
||||
</view>
|
||||
@@ -71,13 +71,19 @@
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
watch: {
|
||||
"lists": function(value) {
|
||||
if (!value) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
backgroundStyle() {
|
||||
const image = this.type === 'seckill' ? this.staticAsset('home_seckill_bg') : ''
|
||||
return image ? { backgroundImage: `url(${image})` } : {}
|
||||
}
|
||||
},
|
||||
|
||||
beforeMount: function() {
|
||||
|
||||
@@ -92,10 +98,9 @@
|
||||
background-size: 100% auto;
|
||||
border-radius: 10rpx;
|
||||
padding-bottom: 20rpx;
|
||||
&.seckill {
|
||||
background-color: $ls-color-white;
|
||||
background-image: url(../../static/images/home_seckill_bg.png);
|
||||
}
|
||||
&.seckill {
|
||||
background-color: $ls-color-white;
|
||||
}
|
||||
|
||||
.a-main {
|
||||
position: relative;
|
||||
|
||||
@@ -3,5 +3,6 @@ module.exports = {
|
||||
USER_INFO: 'USER_INFO',
|
||||
TOKEN: 'TOKEN',
|
||||
BACK_URL: 'BACK_URL',
|
||||
CONFIG: 'CONFIG'
|
||||
}
|
||||
CONFIG: 'CONFIG',
|
||||
REGION_TREE: 'REGION_TREE'
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name" : "LikeShop",
|
||||
"appid" : "__UNI__E8F2641",
|
||||
"description" : "",
|
||||
"versionName" : "3.0.3",
|
||||
"versionName" : "3.5.1",
|
||||
"versionCode" : 100,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
@@ -160,7 +160,9 @@
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"es6" : true,
|
||||
"minified" : true
|
||||
"minified" : true,
|
||||
"minifyWXML" : true,
|
||||
"minifyWXSS" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"optimization" : {
|
||||
|
||||
@@ -6,11 +6,11 @@ import Cache from '@/utils/cache'
|
||||
import { inputInviteCode } from '@/api/user'
|
||||
import { BACK_URL } from '@/config/cachekey'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
primaryColor: '#FF2C3C'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
primaryColor: '#FF2C3C'
|
||||
}
|
||||
},
|
||||
async onLoad(option) {
|
||||
// #ifdef H5
|
||||
const route = currentPage().route
|
||||
@@ -58,8 +58,16 @@ export default {
|
||||
} else {
|
||||
wechath5.share(options)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
staticAsset(name) {
|
||||
const config = this.$store && this.$store.getters.appConfig
|
||||
const assets = config && config.static_assets
|
||||
if (assets && assets.bundle_base && name.indexOf('bundle/') === 0) {
|
||||
return assets.bundle_base + name.slice('bundle/'.length)
|
||||
}
|
||||
return assets && assets[name] ? assets[name] : ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin'])
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
placeholder="请填写手机号码"
|
||||
/>
|
||||
</view>
|
||||
<view @click="showRegion = true">
|
||||
<view @click="openRegion">
|
||||
<view class="form-item row">
|
||||
<view class="label">所在地区</view>
|
||||
<input
|
||||
@@ -94,7 +94,7 @@
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
import { editAddress, getOneAddress, hasRegionCode, addAddress } from '@/api/user'
|
||||
import area from '@/utils/area'
|
||||
import { loadRegionTree } from '@/utils/region'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -133,9 +133,6 @@ export default {
|
||||
})
|
||||
this.getWxAddressFun()
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.lists = area
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -150,6 +147,19 @@ export default {
|
||||
*/
|
||||
// onShareAppMessage: function () {},
|
||||
methods: {
|
||||
async openRegion() {
|
||||
if (this.lists.length) {
|
||||
this.showRegion = true
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.lists = await loadRegionTree()
|
||||
this.showRegion = true
|
||||
} catch (error) {
|
||||
this.$toast({ title: error.message || '地区数据加载失败' })
|
||||
}
|
||||
},
|
||||
|
||||
formSubmit(e) {
|
||||
let { value } = e.detail
|
||||
let {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<product-swiper :imgUrls="swiperList" :video="goodsDetail.video"></product-swiper>
|
||||
<!-- 秒杀 -->
|
||||
<view class="seckill row-between" v-if="goodsType == 1">
|
||||
<view class="price row">
|
||||
<view class="price row" :style="remoteBackground('bg_seckill')">
|
||||
<view class="row white info">
|
||||
<view style="align-items: baseline;" class="row ml20">
|
||||
<view class="mr10">秒杀价</view>
|
||||
@@ -36,7 +36,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 拼团 -->
|
||||
<view class="group" v-show="goodsType == 2">
|
||||
<view class="group" v-show="goodsType == 2" :style="remoteBackground('pintuan_bg')">
|
||||
<view class="row info" style="height: 100%">
|
||||
<view class="row-between ml20 white" style="flex: 1;">
|
||||
<view style="align-items: baseline;" class="row">
|
||||
@@ -296,7 +296,7 @@
|
||||
<u-icon name="close" size="16" color="#fff"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="share-con mt10" @tap="showShareBtn=true">
|
||||
<view class="share-con mt10" :style="remoteBackground('bg_packet_img')" @tap="showShareBtn=true">
|
||||
<view class="primary" style="font-size: 45rpx;">
|
||||
{{distribution.earnings}}<text class="xs">元</text>
|
||||
</view>
|
||||
@@ -410,7 +410,12 @@
|
||||
this.percent = scrollTop / top > 1 ? 1 : scrollTop / top
|
||||
this.scrollTop = scrollTop
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
remoteBackground(name) {
|
||||
const image = this.staticAsset(name)
|
||||
return image ? { backgroundImage: `url(${image})` } : {}
|
||||
},
|
||||
|
||||
...mapActions(['getCartNum']),
|
||||
async getGoodsDetailFun() {
|
||||
const {
|
||||
@@ -665,11 +670,11 @@
|
||||
height: 100rpx;
|
||||
background: #ffd4d8;
|
||||
|
||||
.price {
|
||||
width: 504rpx;
|
||||
height: 100%;
|
||||
background: url(../../static/images/bg_seckill.png) no-repeat;
|
||||
background-size: 100%;
|
||||
.price {
|
||||
width: 504rpx;
|
||||
height: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.down {
|
||||
@@ -677,11 +682,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.group {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
background-image: url(../../static/images/pintuan_bg.png);
|
||||
background-size: 100%;
|
||||
.group {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
background-size: 100%;
|
||||
|
||||
.group-num {
|
||||
border: 1px solid #ffffff;
|
||||
@@ -967,8 +971,8 @@
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.share-con {
|
||||
background: url('../../static/images/bg_packet_img.png');
|
||||
.share-con {
|
||||
background-repeat: no-repeat;
|
||||
width: 241rpx;
|
||||
height: 208rpx;
|
||||
background-size: 100%;
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
|
||||
<u-popup class="coupons-popup" v-model="showCoupop" mode="center">
|
||||
<view class="wrap">
|
||||
<image class="coupon-bg" src="/static/images/home_coupon_bg.png"></image>
|
||||
<image v-if="staticAsset('home_coupon_bg')" class="coupon-bg" :src="staticAsset('home_coupon_bg')"></image>
|
||||
<scroll-view :scroll-y="true" style="height: 460rpx; margin-top: 300rpx">
|
||||
<view class="item" v-for="(item, index) in couponPopList" :key="item.id">
|
||||
<image class="img" src="/static/images/pop_bg_coupon.png"></image>
|
||||
@@ -562,19 +562,14 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// #ifdef H5
|
||||
::v-deep .home-bg {
|
||||
background: url(../../static/images/bg_hometop.png) no-repeat;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
|
||||
// #endif
|
||||
.home-bg {
|
||||
background: url(../../static/images/bg_hometop.png) no-repeat;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
.index {
|
||||
<style lang="scss">
|
||||
.home-bg {
|
||||
background-color: #ff6b57;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
|
||||
.index {
|
||||
.live-play {
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
@@ -758,8 +753,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.coupon-pop-container {
|
||||
background-image: url(../../static/images/home_coupon_bg.png);
|
||||
.coupon-pop-container {
|
||||
width: 638rpx;
|
||||
height: 804rpx;
|
||||
background-size: 100% 100%;
|
||||
|
||||
@@ -304,9 +304,9 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.user {
|
||||
background-image: url(../../static/images/my_topbg.png);
|
||||
background-size: 100% 420rpx;
|
||||
.user {
|
||||
background-color: #ff6b57;
|
||||
background-size: 100% 420rpx;
|
||||
background-repeat: no-repeat;
|
||||
.header {
|
||||
display: flex;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"bundle": false,
|
||||
"useIsolateContext": true,
|
||||
"useCompilerModule": true,
|
||||
"minifyWXML": true,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
@@ -69,4 +70,4 @@
|
||||
"list": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -15,6 +15,7 @@ const state = {
|
||||
app_agreement: 0,
|
||||
center_setting: {},
|
||||
index_setting: {},
|
||||
static_assets: {},
|
||||
navigation_menu: [],
|
||||
navigation_setting: {}
|
||||
},
|
||||
|
||||
36
uniapp/utils/region.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import { getRegionLists } from '@/api/user'
|
||||
import Cache from '@/utils/cache'
|
||||
import { REGION_TREE } from '@/config/cachekey'
|
||||
|
||||
const REGION_CACHE_SECONDS = 7 * 24 * 60 * 60
|
||||
let loadingPromise = null
|
||||
|
||||
export function loadRegionTree() {
|
||||
const cached = Cache.get(REGION_TREE)
|
||||
if (Array.isArray(cached) && cached.length) {
|
||||
return Promise.resolve(cached)
|
||||
}
|
||||
|
||||
if (loadingPromise) {
|
||||
return loadingPromise
|
||||
}
|
||||
|
||||
loadingPromise = getRegionLists().then((response) => {
|
||||
if (response && response.code === 1 && Array.isArray(response.data)) {
|
||||
Cache.set(REGION_TREE, response.data, REGION_CACHE_SECONDS)
|
||||
return response.data
|
||||
}
|
||||
throw new Error(response && response.msg ? response.msg : '地区数据加载失败')
|
||||
})
|
||||
|
||||
return loadingPromise.then(
|
||||
(data) => {
|
||||
loadingPromise = null
|
||||
return data
|
||||
},
|
||||
(error) => {
|
||||
loadingPromise = null
|
||||
throw error
|
||||
}
|
||||
)
|
||||
}
|
||||