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

测试

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