mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 16:35:53 +08:00
Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp into test-lmr
This commit is contained in:
@@ -65,8 +65,14 @@ export default {
|
||||
* 清除缓存重新登录
|
||||
*/
|
||||
async confirm() {
|
||||
await logout();
|
||||
this.clear();
|
||||
try{
|
||||
await logout();
|
||||
this.clear();
|
||||
}catch(e){
|
||||
//TODO handle the exception
|
||||
this.clear();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
<div class="sale" v-if="current === 0 && sku.afterSaleStatus">
|
||||
<div
|
||||
v-if="
|
||||
order.flowPrice != 0 &&
|
||||
sku.afterSaleStatus.includes('NOT_APPLIED') ||
|
||||
sku.afterSaleStatus.includes('PART_AFTER_SALE')
|
||||
"
|
||||
|
||||
@@ -335,12 +335,6 @@ export default {
|
||||
type: "error",
|
||||
});
|
||||
return false;
|
||||
} else if (checkBankno(this.form.bankAccountNumber) === false) {
|
||||
this.$refs.uToast.show({
|
||||
title: "银行卡卡号不正确",
|
||||
type: "error",
|
||||
});
|
||||
return false;
|
||||
} else if (this.$u.test.chinese(this.form.bankAccountName) === false) {
|
||||
this.$refs.uToast.show({
|
||||
title: "银行开户名输入错误",
|
||||
|
||||
@@ -605,15 +605,7 @@ export default {
|
||||
this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
|
||||
}
|
||||
},
|
||||
// #ifdef MP-WEIXIN
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
path: this.share(),
|
||||
title: `[好友推荐]${this.goodsDetail.goodsName}`,
|
||||
imageUrl: this.goodsDetail.goodsGalleryList[0],
|
||||
};
|
||||
},
|
||||
// #endif
|
||||
|
||||
methods: {
|
||||
share() {
|
||||
return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/** 配置楼层模块的跳转 */
|
||||
export function modelNavigateTo(item) {
|
||||
let val = item.url;
|
||||
|
||||
switch (val.___type) {
|
||||
let val = item.url || item;
|
||||
console.log(item);
|
||||
// return;
|
||||
switch (val.___type || item.type) {
|
||||
case "goods":
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/goods?id=" + val.id + "&goodsId=" + val.goodsId,
|
||||
@@ -36,7 +37,7 @@ export function modelNavigateTo(item) {
|
||||
});
|
||||
break;
|
||||
case "other":
|
||||
switch (val.title) {
|
||||
switch (val.title || item.title) {
|
||||
case "首页":
|
||||
uni.switchTab({
|
||||
url: `/pages/tabbar/home/index`,
|
||||
@@ -102,12 +103,12 @@ export function modelNavigateTo(item) {
|
||||
url: `/pages/product/shopList`,
|
||||
});
|
||||
break;
|
||||
case "外部链接":
|
||||
default:
|
||||
// #ifdef H5
|
||||
window.location.href = val.url;
|
||||
window.location.href = val.url || item.link;
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(val.url) //不需要拼接\
|
||||
plus.runtime.openURL(val.url || item.link) //不需要拼接\
|
||||
// #endif
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="flex-one" @click="modelNavigateTo(res.list[0])">
|
||||
<u-image width="100%" mode="aspectFit" height="280rpx" :src="res.list[0].img" alt=""></u-image>
|
||||
<div class="flex-one">
|
||||
<!-- <u-image width="100%" mode="aspectFit" height="280rpx" :src="res.list[0].img" alt=""></u-image> -->
|
||||
<hotzone :res="res"></hotzone>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
import hotzone from "@/pages/tabbar/home/template/tpl_hot_zone.vue";
|
||||
|
||||
export default {
|
||||
title: "单行图片模块",
|
||||
components: {
|
||||
hotzone,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
|
||||
57
pages/tabbar/home/template/tpl_hot_zone.vue
Normal file
57
pages/tabbar/home/template/tpl_hot_zone.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div class="flex-one hot-image">
|
||||
<image mode="widthFix" :src="res.list[0].img" alt=""></image>
|
||||
|
||||
<image
|
||||
v-for="(area, index) in res.list[0].zoneInfo"
|
||||
:key="index"
|
||||
@click="modelNavigateTo(area)"
|
||||
mode="widthFix"
|
||||
class="hot-area"
|
||||
:style="{
|
||||
left: area.leftPer * 100 + '%',
|
||||
top: area.topPer * 100 + '%',
|
||||
width: area.widthPer * 100 + '%',
|
||||
height: area.heightPer * 100 + '%',
|
||||
}"
|
||||
:src="area.img"
|
||||
alt=""
|
||||
></image>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { modelNavigateTo } from "./tpl";
|
||||
|
||||
export default {
|
||||
title: "热区模块",
|
||||
data() {
|
||||
return {
|
||||
modelNavigateTo,
|
||||
};
|
||||
},
|
||||
props: ["res"],
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./tpl.scss";
|
||||
.hot-image {
|
||||
position: relative;
|
||||
}
|
||||
.hot-area {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
}
|
||||
.flex-one {
|
||||
width: 100%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
image {
|
||||
width: 100%;
|
||||
|
||||
min-height: 200rpx;
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -39,8 +39,10 @@
|
||||
:key="_index"
|
||||
>
|
||||
<div class="item-img-box">
|
||||
<img
|
||||
<u-image
|
||||
class="item-img"
|
||||
width="156rpx"
|
||||
height="156rpx"
|
||||
:src="i.thumbnail ? i.thumbnail : i.goodsImage"
|
||||
alt
|
||||
/>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
|
||||
<!-- <spike v-if="item.type == 'spike'" :res="item.options" /> -->
|
||||
</div>
|
||||
<u-no-network @retry='init' @isConnected='isConnected'></u-no-network>
|
||||
<u-no-network @retry="init" @isConnected="isConnected"></u-no-network>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -125,6 +125,7 @@ export default {
|
||||
getFloorData().then((res) => {
|
||||
if (res.data.success) {
|
||||
this.pageData = JSON.parse(res.data.result.pageData);
|
||||
console.log(this.pageData);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user