提交 3b73cc9f 编写于 作者: zhangzhiwei's avatar zhangzhiwei

测试

上级 1f4b768b
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
} catch { } catch {
} }
} }
uni.setStorageSync('subdomain','alisa1') uni.setStorageSync('subdomain','0571gs008')
}); });
onShow(() => { onShow(() => {
console.log("App Show"); console.log("App Show");
......
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
<van-image fit="cover" lazy-load :src="item.mainImg" <van-image fit="cover" lazy-load :src="item.mainImg"
loading-icon="https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default.png" icon-size="30vw" /> loading-icon="https://img.edsmall.com/ROOT/ETao/fenxiao/h5/default.png" icon-size="30vw" />
</div> </div>
<text class="text-s ellipsis line_over2" style="height: 32px;text-align: left;background: #ffffff;padding: 15rpx"> <view style="padding: 15rpx;background: #ffffff">
<text class="text-s ellipsis line_over2" style="text-align: left;background: #ffffff">
{{ item.title }} {{ item.title }}
</text> </text>
</view>
<view style="display: flex;background: #ffffff;padding: 15rpx" class="text01"> <view style="display: flex;background: #ffffff;padding: 15rpx" class="text01">
<view class="text-orange text-ss"> <view class="text-orange text-ss">
<text class="text-bold text-l">{{ item.salePrice }}</text> <text class="text-bold text-l">{{ item.salePrice }}</text>
......
...@@ -76,15 +76,15 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt ...@@ -76,15 +76,15 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
<view> <view>
<van-row gutter="8" class="pd-h-px-10"> <van-row gutter="8" class="pd-h-px-10">
<van-col span="12" > <van-col span="12" >
<van-image width="100%;" radius="20rpx" src="../../static/img/dz/act01.png" <van-image @click="goUrl(1)" width="100%;" radius="20rpx" src="../../static/img/dz/act03.png"
/> />
<van-image width="100%" style="margin-top: 12rpx" radius="20rpx" src="../../static/img/dz/act02.png" <van-image @click="goUrl(2)" width="100%" style="margin-top: 12rpx" radius="20rpx" src="../../static/img/dz/act04.png"
/> />
</van-col> </van-col>
<van-col span="12"> <van-col span="12">
<van-image width="100%" radius="20rpx" src="../../static/img/dz/act03.png" <van-image @click="goUrl(3)" width="100%" radius="20rpx" src="../../static/img/dz/act02.png"
/> />
<van-image width="100%" style="margin-top: 12rpx" radius="20rpx" src="../../static/img/dz/act04.png" <van-image @click="goUrl(4)" width="100%" style="margin-top: 12rpx" radius="20rpx" src="../../static/img/dz/act01.png"
/> />
</van-col> </van-col>
</van-row> </van-row>
...@@ -108,38 +108,6 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt ...@@ -108,38 +108,6 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
<van-image :src="item.iconpath" @tap="goto(item.josnContent)" /> <van-image :src="item.iconpath" @tap="goto(item.josnContent)" />
</van-swipe-item> </van-swipe-item>
</van-swipe> </van-swipe>
<template v-if="state.banner.areaBanner.length > 0">
<van-image class="block_title" src="https://img.edsmall.com/ROOT/ETao/fenxiao/h5/area_title.png" />
<view>
<view v-if="state.banner.areaBanner.length == 6">
<van-row gutter="8" class="pd-h-px-10">
<van-col span="12">
<van-image width="100%" radius="20rpx" :src="state.banner.areaBanner[0].iconpath"
@tap="changeTab(state.banner.areaBanner[0].josnContent, 'zq')" />
</van-col>
<van-col span="12" class="flex col justify-between">
<van-image width="100%" radius="20rpx" :src="state.banner.areaBanner[1].iconpath"
@tap="changeTab(state.banner.areaBanner[1].josnContent, 'zq')" />
<van-image width="100%" radius="20rpx" :src="state.banner.areaBanner[2].iconpath"
@tap="changeTab(state.banner.areaBanner[2].josnContent, 'zq')" />
</van-col>
</van-row>
<van-row gutter="8" class="pd-h-px-10 pd-t-px-10">
<van-col span="12" class="flex col justify-between">
<van-image width="100%" radius="20rpx" :src="state.banner.areaBanner[3].iconpath"
@tap="changeTab(state.banner.areaBanner[3].josnContent, 'zq',state.banner.areaBanner[3].ifCanEnter)" />
<van-image width="100%" radius="20rpx" :src="state.banner.areaBanner[4].iconpath"
@tap="changeTab(state.banner.areaBanner[4].josnContent, 'zq',)" />
</van-col>
<van-col span="12">
<van-image width="100%" radius="20rpx" :src="state.banner.areaBanner[5].iconpath"
@tap="changeTab(state.banner.areaBanner[5].josnContent, 'zq',state.banner.areaBanner[5].ifCanEnter)" />
</van-col>
</van-row>
</view>
</view>
</template>
<van-image class="block_title" src="https://img.edsmall.com/ROOT/ETao/fenxiao/h5/recommend_title.png" /> <van-image class="block_title" src="https://img.edsmall.com/ROOT/ETao/fenxiao/h5/recommend_title.png" />
<van-list v-if="state.inited" :loading="state.good.loading" :finished="state.good.finished" finished-text="没有更多了" <van-list v-if="state.inited" :loading="state.good.loading" :finished="state.good.finished" finished-text="没有更多了"
offset="10" @load="onGoodLoad"> offset="10" @load="onGoodLoad">
...@@ -162,13 +130,13 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt ...@@ -162,13 +130,13 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import api from "@/api"; import api from "@/api";
import { Toast } from 'vant'; import { Toast } from 'vant';
import { onBeforeMount, onMounted, reactive,ref} from 'vue'; import { onBeforeMount, onMounted, reactive,ref} from 'vue';
import toTop from '@/components/tool/toTop.vue'; import toTop from '@/components/tool/toTop.vue';
import ShopCard from '@/components/ShopCard.vue'; import ShopCard from '@/components/ShopCard.vue';
import popupBanner from '@/components/tool/popupBanner.vue'; import popupBanner from '@/components/tool/popupBanner.vue';
const state = reactive({ const state = reactive({
show:false, show:false,
actHotSell:null, actHotSell:null,
actEight:null, actEight:null,
...@@ -203,14 +171,14 @@ const state = reactive({ ...@@ -203,14 +171,14 @@ const state = reactive({
}, },
mall: {} as any, mall: {} as any,
inited: false inited: false
}) })
onBeforeMount(() => { onBeforeMount(() => {
getBanner() getBanner()
getIndexEtaomall() getIndexEtaomall()
canUse() canUse()
}) })
const isAPP = ref(false) const isAPP = ref(false)
onMounted(() => { onMounted(() => {
window._wx.miniProgram.getEnv((res) => { window._wx.miniProgram.getEnv((res) => {
if (res.miniprogram) { if (res.miniprogram) {
isAPP.value=true isAPP.value=true
...@@ -221,9 +189,26 @@ onMounted(() => { ...@@ -221,9 +189,26 @@ onMounted(() => {
setTimeout(() => { setTimeout(() => {
state.inited = true state.inited = true
}, 1000) }, 1000)
}); });
function goUrl(type) {
function goPhoneBtn(val){ console.log(type);
if(type==1){
uni.navigateTo({
url: `/pages/goodList/index?sortType=0`,
});
}else if(type==3){
uni.navigateTo({
url: `/pages/goodList/index?sortType=1`,
});
}else if(type==2){
uni.navigateTo({
url: `/pages/goodList/index?search=套餐`,
});
}else {
Toast('正在筹备中,敬请期待!');
}
}
function goPhoneBtn(val){
uni.makePhoneCall({ uni.makePhoneCall({
// 手机号 // 手机号
phoneNumber: val, phoneNumber: val,
...@@ -234,8 +219,8 @@ function goPhoneBtn(val){ ...@@ -234,8 +219,8 @@ function goPhoneBtn(val){
fail: (res) => { fail: (res) => {
} }
}); });
} }
function searchImg() { function searchImg() {
const { token } = uni.getStorageSync("user") || {}; const { token } = uni.getStorageSync("user") || {};
uni.chooseImage({ uni.chooseImage({
count: 1, //默认3 count: 1, //默认3
...@@ -267,41 +252,41 @@ function searchImg() { ...@@ -267,41 +252,41 @@ function searchImg() {
}) })
} }
}); });
} }
function gotoU() { function gotoU() {
uni.redirectTo({ uni.redirectTo({
url: "/pages/my/technicalSupport?name=index", url: "/pages/my/technicalSupport?name=index",
}); });
} }
function goToAct(id) { function goToAct(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/goodList/index?actId=${id}`, url: `/pages/goodList/index?actId=${id}`,
}); });
} }
function setBgColor (bgColor) { function setBgColor (bgColor) {
return { return {
background: 'url(' + bgColor + ') no-repeat 0 0', background: 'url(' + bgColor + ') no-repeat 0 0',
'background-position':'center', 'background-position':'center',
'background-sizing':'100% 100%', 'background-sizing':'100% 100%',
'position':'relative' 'position':'relative'
} }
} }
function H() { function H() {
let url = 'https://etaoact.edstao.com/etaoappv3/?userId=1' let url = 'https://etaoact.edstao.com/etaoappv3/?userId=1'
const weburl = encodeURIComponent(url+ '/weixin/QRCode&&name=alisa1'+ '&from=wx'); const weburl = encodeURIComponent(url+ '/weixin/QRCode&&name=alisa1'+ '&from=wx');
window._wx.miniProgram.redirectTo({url:`/pages/index?weburl=${weburl}`}) window._wx.miniProgram.redirectTo({url:`/pages/index?weburl=${weburl}`})
} }
function goMe() { function goMe() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/good/contact", url: "/pages/good/contact",
}); });
} }
function goSearch() { function goSearch() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/topSearch/index", url: "/pages/topSearch/index",
}); });
} }
function getBanner() { function getBanner() {
api.indexModule().then((data: any) => { api.indexModule().then((data: any) => {
if (!data) return if (!data) return
const { indexBanners, indexClassify } = data const { indexBanners, indexClassify } = data
...@@ -333,23 +318,23 @@ function getBanner() { ...@@ -333,23 +318,23 @@ function getBanner() {
] ]
if (state.banner.popupCarousel.length > 0) state.banner.showPopup = true if (state.banner.popupCarousel.length > 0) state.banner.showPopup = true
}) })
} }
function getIndexEtaomall() { function getIndexEtaomall() {
api.getIndexEtaomall({ domain: uni.getStorageSync("subdomain") }).then((data: any) => { api.getIndexEtaomall({ domain: uni.getStorageSync("subdomain") }).then((data: any) => {
state.mall = data state.mall = data
uni.setStorageSync('mail', state.mall) uni.setStorageSync('mail', state.mall)
}) })
} }
function canUse() { function canUse() {
api.getCanUse({ domain: uni.getStorageSync("subdomain") }).then((data: any) => { api.getCanUse({ domain: uni.getStorageSync("subdomain") }).then((data: any) => {
if(data){ if(data){
state.showCertificates=true state.showCertificates=true
state.showCertificatesImg=data state.showCertificatesImg=data
} }
}) })
} }
function onGoodLoad() { function onGoodLoad() {
if (state.good.loading || state.good.fail) return if (state.good.loading || state.good.fail) return
state.good.loading = true state.good.loading = true
state.good.page += 1 state.good.page += 1
...@@ -366,19 +351,19 @@ function onGoodLoad() { ...@@ -366,19 +351,19 @@ function onGoodLoad() {
.finally(() => { .finally(() => {
state.good.loading = false state.good.loading = false
}) })
} }
function failReset() { function failReset() {
state.good.page -= 1 state.good.page -= 1
state.good.finished = false state.good.finished = false
state.good.fail = false state.good.fail = false
onGoodLoad() onGoodLoad()
} }
function goto(url: any) { function goto(url: any) {
url && uni.navigateTo({ url }) url && uni.navigateTo({ url })
} }
function changeTab(name: any, ZQ?: any,num?:any) { function changeTab(name: any, ZQ?: any,num?:any) {
if (num==0) { if (num==0) {
Toast('正在筹备中,敬请期待!'); Toast('正在筹备中,敬请期待!');
return return
...@@ -409,7 +394,7 @@ function changeTab(name: any, ZQ?: any,num?:any) { ...@@ -409,7 +394,7 @@ function changeTab(name: any, ZQ?: any,num?:any) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/goodList/index?${type}=${name}`, url: `/pages/goodList/index?${type}=${name}`,
}); });
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -468,21 +453,21 @@ function changeTab(name: any, ZQ?: any,num?:any) { ...@@ -468,21 +453,21 @@ function changeTab(name: any, ZQ?: any,num?:any) {
width: 85%; width: 85%;
background-color: #fff; background-color: #fff;
} }
.search_bar { .search_bar {
width: 100vw; width: 100vw;
} }
.banner_top { .banner_top {
height: 43.5vw; height: 43.5vw;
} }
.banner_afterTop, .banner_afterTop,
.banner_afterTap { .banner_afterTap {
height: 20vw; height: 20vw;
} }
.block_title { .block_title {
margin: 40rpx auto 25rpx auto; margin: 40rpx auto 25rpx auto;
width: 60vw; width: 60vw;
} }
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册