Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-uniapp

master
Chopper 2022-04-19 10:40:51 +08:00
commit b6782df565
11 changed files with 611 additions and 122 deletions

View File

@ -6,11 +6,11 @@ export default {
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址下载app的地址 downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址下载app的地址
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址也就是在h5中默认的复制地址 shareLink: "https://m-b2b2c.pickmall.cn", //分享地址也就是在h5中默认的复制地址
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态) appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转 scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看 iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址 logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
customerServiceMobile:"13161366885", //客服电话 customerServiceMobile:"13161366885", //客服电话
customerServiceEmail:"lili@lili.com" //客服邮箱 customerServiceEmail:"lili@lili.com", //客服邮箱
imWebSrc:"https://im.pickmall.cn" //IM地址
}; };

View File

@ -2,8 +2,8 @@
"name" : "lili商城", "name" : "lili商城",
"appid" : "__UNI__C100675", "appid" : "__UNI__C100675",
"description" : "", "description" : "",
"versionName" : "4.2.4", "versionName" : "4.2.4.1",
"versionCode" : 4000240, "versionCode" : 4000241,
"transformPx" : false, "transformPx" : false,
"app-plus" : { "app-plus" : {
"compatible" : { "compatible" : {

View File

@ -226,13 +226,18 @@
const paymentMethod = payment; const paymentMethod = payment;
// APP/NATIVE/JSAPI/H5 // APP/NATIVE/JSAPI/H5
const paymentClient = this.paymentClient; const paymentClient = this.paymentClient;
uni.showLoading({
title: "正在唤起支付...",
mask:true
});
// #ifdef APP-PLUS // #ifdef APP-PLUS
//APP pay //APP pay
// //
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then( await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
(signXml) => { (signXml) => {
uni.hideLoading();
// //
if (!signXml.data.success) { if (!signXml.data.success) {
uni.showToast({ uni.showToast({
@ -241,33 +246,39 @@
}); });
return; return;
} }
let payForm = signXml.data.result; let payForm = signXml.data.result;
let paymentType = paymentMethod === "WECHAT" ? "wxpay" : "alipay"; let paymentType = paymentMethod === "WECHAT" ? "wxpay" : "alipay";
uni.requestPayment({
provider: paymentType, if(paymentMethod === "WALLET"){
orderInfo: payForm, uni.showToast({
success: (e) => { icon: "none",
console.log(e); title: "支付成功!",
uni.showToast({ });
icon: "none", this.callback(paymentMethod)
title: "支付成功!", }
}); else{
uni.requestPayment({
this.callback(paymentMethod) provider: paymentType,
orderInfo: payForm || '',
success: (e) => {
}, uni.showToast({
fail: (e) => { icon: "none",
console.log(this); title: "支付成功!",
this.exception = e; });
uni.showModal({ this.callback(paymentMethod)
content: "支付失败,如果您已支付,请勿反复支付", },
showCancel: false, fail: (e) => {
}); console.log(this);
}, this.exception = e;
}); uni.showModal({
content: "支付失败,如果您已支付,请勿反复支付",
showCancel: false,
});
},
});
}
} }
); );
//APP pay //APP pay

View File

@ -68,6 +68,8 @@ export default {
params: { params: {
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
order: "desc",
sort: "updateTime",
}, },
trackList: [], // trackList: [], //

View File

@ -1,15 +1,43 @@
<template> <template>
<view class="content"> <view class="content">
<view class="navbar"> <view class="navbar">
<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view> <view
v-for="(item, index) in navList"
:key="index"
class="nav-item"
:class="{ current: tabCurrentIndex === index }"
@click="tabClick(index)"
>{{ item.text }}</view
>
</view> </view>
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab"> <swiper
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex"> :current="tabCurrentIndex"
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData(tabIndex)"> class="swiper-box"
duration="300"
@change="changeTab"
>
<swiper-item
class="tab-content"
v-for="(tabItem, tabIndex) in navList"
:key="tabIndex"
>
<scroll-view
class="list-scroll-content"
scroll-y
@scrolltolower="loadData(tabIndex)"
>
<!-- 空白页 --> <!-- 空白页 -->
<u-empty text="暂无订单" mode="list" v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty> <u-empty
text="暂无订单"
mode="list"
v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
></u-empty>
<!-- 订单列表 --> <!-- 订单列表 -->
<view class="seller-view" :key="oderIndex" v-for="(order, oderIndex) in tabItem.orderList"> <view
class="seller-view"
:key="oderIndex"
v-for="(order, oderIndex) in tabItem.orderList"
>
<!-- 店铺名称 --> <!-- 店铺名称 -->
<view class="seller-info u-flex u-row-between"> <view class="seller-info u-flex u-row-between">
<view class="seller-name" @click="navigateToStore(order)"> <view class="seller-name" @click="navigateToStore(order)">
@ -21,13 +49,32 @@
</view> </view>
<view> <view>
<view> <view>
<view class="goods-item-view" @click="navigateToOrderDetail(order.sn)"> <view
<view class="goods-img" v-for="(goods, goodsIndex) in order.orderItems" :key="goodsIndex"> class="goods-item-view"
<u-image border-radius="6" width="100%" height="100%" :src="goods.image"></u-image> @click="navigateToOrderDetail(order.sn)"
>
<view
class="goods-img"
v-for="(goods, goodsIndex) in order.orderItems"
:key="goodsIndex"
>
<u-image
border-radius="6"
width="100%"
height="100%"
:src="goods.image"
></u-image>
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view v-if="order.orderItems.length <= 1" class="goods-title u-line-2">{{ order.groupName }}</view> <view
<view v-if="order.orderItems.length <= 1" class="goods-price"> v-if="order.orderItems.length <= 1"
class="goods-title u-line-2"
>{{ order.groupName }}</view
>
<view
v-if="order.orderItems.length <= 1"
class="goods-price"
>
{{ order.flowPrice | unitPrice }} {{ order.flowPrice | unitPrice }}
</view> </view>
</view> </view>
@ -45,19 +92,56 @@
</view> </view>
<view> <view>
<!-- 全部 --> <!-- 全部 -->
<u-button ripple class="pay-btn" shape="circle" size="mini" v-if="order.allowOperationVO.pay" @click="waitPay(order)"></u-button> <u-button
ripple
class="pay-btn"
shape="circle"
size="mini"
v-if="order.allowOperationVO.pay"
@click="waitPay(order)"
>立即付款</u-button
>
<!-- 取消订单 --> <!-- 取消订单 -->
<u-button ripple class="cancel-btn" shape="circle" size="mini" v-if="order.allowOperationVO.cancel" @click="onCancel(order.sn)"> <u-button
ripple
class="cancel-btn"
shape="circle"
size="mini"
v-if="order.allowOperationVO.cancel"
@click="onCancel(order.sn)"
>
取消订单 取消订单
</u-button> </u-button>
<!-- 等待收货 --> <!-- 等待收货 -->
<u-button ripple shape="circle" class="rebuy-btn" size="mini" v-if="order.allowOperationVO.showLogistics" @click="navigateToLogistics(order)"> <u-button
ripple
shape="circle"
class="rebuy-btn"
size="mini"
v-if="order.allowOperationVO.showLogistics"
@click="navigateToLogistics(order)"
>
查看物流 查看物流
</u-button> </u-button>
<u-button ripple :customStyle="{'background':lightColor,'color':'#fff' }" shape="circle" class="pay-btn" size="mini" v-if="order.allowOperationVO.rog" @click="onRog(order.sn)"> <u-button
ripple
:customStyle="{ background: lightColor, color: '#fff' }"
shape="circle"
class="pay-btn"
size="mini"
v-if="order.allowOperationVO.rog"
@click="onRog(order.sn)"
>
确认收货 确认收货
</u-button> </u-button>
<u-button ripple shape="circle" class="cancel-btn" size="mini" v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')" @click="applyService(order)"> <u-button
ripple
shape="circle"
class="cancel-btn"
size="mini"
v-if="order.groupAfterSaleStatus.includes('NOT_APPLIED')"
@click="applyService(order)"
>
退款/售后 退款/售后
</u-button> </u-button>
<!-- TODO 后续完善 --> <!-- TODO 后续完善 -->
@ -75,26 +159,57 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<u-popup class="cancel-popup" v-model="cancelShow" mode="bottom" length="60%"> <u-popup
class="cancel-popup"
v-model="cancelShow"
mode="bottom"
length="60%"
>
<view class="header">取消订单</view> <view class="header">取消订单</view>
<view class="body"> <view class="body">
<view class="title">取消订单后本单享有的优惠可能会一并取消是否继续</view> <view class="title"
>取消订单后本单享有的优惠可能会一并取消是否继续</view
>
<view> <view>
<u-radio-group v-model="reason"> <u-radio-group v-model="reason">
<view class="value"> <view class="value">
<view class="radio-view" :key="index" v-for="(item, index) in cancelList"> <view
<u-radio :active-color="lightColor" label-size="25" shape="circle" :name="item.reason" @change="reasonChange">{{ item.reason }}</u-radio> class="radio-view"
:key="index"
v-for="(item, index) in cancelList"
>
<u-radio
:active-color="lightColor"
label-size="25"
shape="circle"
:name="item.reason"
@change="reasonChange"
>{{ item.reason }}</u-radio
>
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<u-button size="medium" ripple v-if="reason" shape="circle" @click="submitCancel"></u-button> <u-button
size="medium"
ripple
v-if="reason"
shape="circle"
@click="submitCancel"
>提交</u-button
>
</view> </view>
</u-popup> </u-popup>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<u-modal :confirm-color="lightColor" v-model="rogShow" :show-cancel-button="true" :content="'是否确认收货?'" @confirm="confirmRog"></u-modal> <u-modal
:confirm-color="lightColor"
v-model="rogShow"
:show-cancel-button="true"
:content="'是否确认收货?'"
@confirm="confirmRog"
></u-modal>
</view> </view>
</template> </template>
@ -203,10 +318,21 @@ export default {
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
if (this.tabCurrentIndex) {
this.initData(this.tabCurrentIndex);
} else {
this.initData(0);
}
this.loadData(this.status);
},
onShow() {
if (this.tabCurrentIndex) {
this.initData(this.tabCurrentIndex);
} else {
this.initData(0);
}
this.loadData(this.status); this.loadData(this.status);
}, },
onLoad(options) { onLoad(options) {
/** /**
@ -219,7 +345,6 @@ export default {
if (status == 0) { if (status == 0) {
this.loadData(status); this.loadData(status);
} }
}, },
watch: { watch: {
@ -236,16 +361,11 @@ export default {
}, },
}, },
methods: { methods: {
// //
applyService(order){ applyService(order) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}` url: `/pages/order/afterSales/afterSales?orderSn=${order.sn}`,
}); });
}, },
// //

View File

@ -382,7 +382,6 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
import popupAddress from "./product/popup/address"; // import popupAddress from "./product/popup/address"; //
import shares from "@/components/m-share/index"; // import shares from "@/components/m-share/index"; //
import popups from "@/components/popups/popups"; // import popups from "@/components/popups/popups"; //
import setup from "./product/popup/popup"; import setup from "./product/popup/popup";
export default { export default {
components: { components: {
@ -527,7 +526,8 @@ export default {
}; };
}, },
computed: { computed: {
// udesk IM
IM() { IM() {
return this.IMLink + this.storeDetail.merchantEuid; return this.IMLink + this.storeDetail.merchantEuid;
}, },
@ -708,40 +708,49 @@ export default {
}, },
linkMsgDetail() { linkMsgDetail() {
if (this.storeDetail.merchantEuid) { // lili
uni.navigateTo({
url: `/pages/tabbar/home/web-view?src=${this.IM}`, uni.navigateTo({
}); url: `/pages/tabbar/home/web-view?IM=${this.storeDetail.storeId}`,
} else { });
//
// #ifdef MP-WEIXIN // udesk
const params = { // if (this.storeDetail.merchantEuid) {
storeName: this.storeDetail.storeName, // uni.navigateTo({
goodsName: this.goodsDetail.goodsName, // url: `/pages/tabbar/home/web-view?src=${this.IM}`,
goodsId: this.goodsDetail.goodsId, // });
goodsImg: this.goodsDetail.thumbnail, // }
price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
uuid: storage.getUuid(), //
token: storage.getAccessToken(), // // #ifdef MP-WEIXIN
sign: this.storeDetail.yzfSign, // const params = {
mpSign: this.storeDetail.yzfMpSign, // storeName: this.storeDetail.storeName,
}; // goodsName: this.goodsDetail.goodsName,
uni.navigateTo({ // goodsId: this.goodsDetail.goodsId,
url: // goodsImg: this.goodsDetail.thumbnail,
"/pages/product/customerservice/index?params=" + // price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
encodeURIComponent(JSON.stringify(params)), // // originalPrice: this.goodsDetail.original || this.goodsDetail.price,
}); // uuid: storage.getUuid(),
// #endif // token: storage.getAccessToken(),
// #ifndef MP-WEIXIN // sign: this.storeDetail.yzfSign,
const sign = this.storeDetail.yzfSign; // mpSign: this.storeDetail.yzfMpSign,
uni.navigateTo({ // };
url: // uni.navigateTo({
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" + // url:
sign, // "/pages/product/customerservice/index?params=" +
}); // encodeURIComponent(JSON.stringify(params)),
// #endif // });
} // // #endif
// // #ifndef MP-WEIXIN
// const sign = this.storeDetail.yzfSign;
// uni.navigateTo({
// url:
// "/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
// sign,
// });
// // #endif
}, },
// 1999 --> [1999,00] // 1999 --> [1999,00]
formatPrice(val) { formatPrice(val) {

View File

@ -0,0 +1,49 @@
<template>
<div class="layout">
<div class="background">
<u-notice-bar mode="vertical" :bg-color="res.list[0].bk_color" :color="res.list[0].color" :list="list"></u-notice-bar>
</div>
</div>
</template>
<script>
export default {
title: "公告",
props: ["res"],
data() {
return {
list: []
}
},
mounted() {
this.list = this.res.list[0].title.map(i => i.context);
},
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.background {
position: absolute;
z-index: 2;
width: 100%;
height: 84rpx;
text-align: left;
font-size: 20rpx;
background-size: cover;
}
.layout {
text-align: center;
position: relative;
height: 84rpx;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
}
.title {
line-height: 84rpx;
font-size: 20px;
font-weight: bold;
}
</style>

View File

@ -0,0 +1,271 @@
<template>
<div class="layout">
<div class="join-list">
<div
v-for="(item, index) in res.list"
:key="index"
class="join-list-item"
@click="goToDetail(item.type)"
>
<div>
<div class="join-title">
<div>{{ item.title }}</div>
<div
class="sub"
v-if="item.type !== 'SECKILL'"
:style="{
backgroundColor: item.bk_color,
color: item.color1,
borderColor: item.bk_color,
}"
>
{{ item.title1 }}
</div>
<div class="sub-seckill" v-else>
<div class="sub-seckill-block flex">
<div class="sub-seckill-block-text">
{{ timeLine[0] ? timeLine[0].timeLine : "x" }}点场
</div>
{{ times.hours == "00" ? "0" : times.hours }}:{{
times.minutes
}}:{{ times.seconds }}
</div>
</div>
</div>
<div class="join-box">
<div
class="join-item"
v-for="(i, _index) in item.data"
:key="_index"
>
<div class="item-img-box">
<img
class="item-img"
:src="i.thumbnail ? i.thumbnail : i.goodsImage"
alt
/>
</div>
<div
class="ellipsis"
:class="{ 'max-width': res.list.length <= 1 }"
>
{{ i.goodsName ? i.goodsName : i.name }}
</div>
<div class="item-price">
<span>{{ i.price ? i.price : i.originalPrice }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import * as API_Promotions from "@/api/promotions";
import Foundation from "@/utils/Foundation.js";
export default {
props: ["res"],
data() {
return {
timeLine: "", //
resTime: 0, //
time: 0, //
times: {}, //
onlyOne: "", //
};
},
mounted() {
let params = {
pageNumber: 1,
pageSize: 2,
status: "START",
promotionStatus: "START",
};
this._setTimeInterval = setInterval(() => {
if (this.time <= 0) {
clearInterval(this._setTimeInterval);
} else {
this.times = Foundation.countTimeDown(this.time);
this.time--;
}
}, 1000);
this.res.list.forEach((ele) => {
switch (ele.type) {
case "PINTUAN":
API_Promotions.getAssembleList(params).then((response) => {
const data = response.data.result.records;
if (data) {
ele.data = data;
}
});
break;
case "SECKILL":
API_Promotions.getSeckillTimeLine().then((response) => {
if (response.data.success && response.data.result) {
ele.data = response.data.result[0].seckillGoodsList.slice(0, 2);
let timeLine = response.data.result.sort(
(x, y) => Number(x.timeLine) - Number(y.timeLine)
);
this.timeLine = timeLine.slice(0, 5);
this.resTime = parseInt(new Date().getTime() / 1000);
this.onlyOne = response.data.result.length === 1;
this.diffTime = parseInt(new Date().getTime() / 1000) - this.resTime;
this.time =
this.timeLine[0].distanceStartTime ||
(this.timeLine[1] && this.timeLine[1].distanceStartTime) ||
Foundation.theNextDayTime() - this.diffTime;
this.times = Foundation.countTimeDown(this.time);
console.log(this.timeLine);
}
});
break;
case "LIVE":
API_Promotions.getLiveList(params).then((response) => {
if (response.success && response.result.records) {
ele.data = response.result.records[0].commodityList.slice(0, 2);
}
});
break;
case "KANJIA":
API_Promotions.getBargainList(params).then((response) => {
if (response.success && response.result) {
ele.data = response.result.records(0, 2);
}
});
break;
default:
break;
}
});
},
methods: {
//
goToDetail(type) {
switch(type) {
case "SECKILL":
uni.navigateTo({
url: `/pages/promotion/seckill`,
});
break;
case "PINTUAN":
uni.navigateTo({
url: `/pages/promotion/joinGroup`,
});
break;
case "LIVE":
uni.navigateTo({
url: `/pages/promotion/lives`,
});
break;
case "KANJIA":
uni.navigateTo({
url: `/pages/promotion/bargain/list`,
});
break;
};
}
},
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.join-box {
display: flex;
}
.join-list {
width: 100%;
display: flex;
overflow: hidden;
}
.join-list-item {
flex: 1;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 108rpx; // 1
font-size: 22rpx;
}
.max-width {
width: 316rpx !important;
}
.item-price {
> span {
font-size: 28rpx;
font-weight: 500;
color: #e1212b;
}
}
.join-item {
flex: 1;
}
.item-img {
width: 150rpx;
height: 150rpx;
margin: 0 auto;
display: block;
}
.item-img-box {
position: relative;
}
.item-line-through {
> span {
font-size: 20rpx;
font-weight: 400;
text-decoration: line-through;
color: #999;
}
}
.item-position-tips {
position: absolute;
right: 0;
color: #fff;
font-size: 24rpx;
bottom: 0;
}
.join-title {
display: flex;
align-items: center;
background: #fff;
height: 100rpx;
> div:nth-of-type(1) {
font-size: 30rpx;
font-weight: bold;
}
> div:nth-of-type(2) {
font-size: 20rpx;
line-height: 1.75;
border-radius: 16rpx;
text-align: center;
padding: 0 16rpx;
margin-left: 20rpx;
}
.sub {
background-color: #e1212b;
margin-right: 80rpx;
}
.sub-seckill {
white-space: nowrap;
padding: 0 !important;
}
.sub-seckill-block {
background: rgba($main-color, 0.3);
border-radius: 100px !important;
color: rgba($main-color, 0.7);
overflow: hidden;
padding-right: 8rpx;
}
.sub-seckill-block-text {
background-color: $main-color;
color: #fff;
border-top-right-radius: 100px;
border-bottom-right-radius: 100px;
padding: 0 12rpx !important;
margin-right: 12rpx;
}
}
</style>

View File

@ -1,13 +1,17 @@
<template> <template>
<div class="layout"> <div class="layout" :style="{textAlign: res.list[0].textAlign}">
<div class="background"> <div class="background" :style="{ backgroundColor: res.list[0].bk_color}">
<div class="title" :style="{ color: res.list[0].color }"> <div class="title" :style="{ color: res.list[0].color }">
{{ res.list[0].title }} {{ res.list[0].title }}
</div> </div>
<div style="position: absolute;right: 10px;top:2px;color: #fff;line-height: 42px;font-size: 10px">
<a :href="res.list[0].url" :style="{ color: res.list[0].color1 }" style="text-decoration: none">{{ res.list[0].title1 }}</a>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
title: "标题栏", title: "标题栏",
@ -18,7 +22,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./tpl.scss"; @import "./tpl.scss";
.background { .background {
background: url("/static/title.png") no-repeat; // background: url("/static/title.png") no-repeat;
position: absolute; position: absolute;
z-index: 2; z-index: 2;
width: 100%; width: 100%;
@ -43,5 +47,6 @@ export default {
line-height: 84rpx; line-height: 84rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
margin-left: 8rpx;
} }
</style> </style>

View File

@ -1,10 +1,15 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<!-- uni 中不能使用 vue component 所以用if判断每个组件 --> <!-- uni 中不能使用 vue component 所以用if判断每个组件 -->
<div v-for="(item,index) in pageData.list" :key="index"> <div v-for="(item, index) in pageData.list" :key="index">
<!-- 搜索栏如果在楼层装修顶部则会自动浮动否则不浮动 --> <!-- 搜索栏如果在楼层装修顶部则会自动浮动否则不浮动 -->
<u-navbar class="navbar" v-if="item.type == 'search'" :is-back="false" :is-fixed="index ===1 ? false : true"> <u-navbar
<search style="width:100%" :res="item.options" /> class="navbar"
v-if="item.type == 'search'"
:is-back="false"
:is-fixed="index === 1 ? false : true"
>
<search style="width: 100%" :res="item.options" />
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<!-- 扫码功能 不兼容h5 详情文档: https://uniapp.dcloud.io/api/system/barcode?id=scancode --> <!-- 扫码功能 不兼容h5 详情文档: https://uniapp.dcloud.io/api/system/barcode?id=scancode -->
<div slot="right" class="navbar-right"> <div slot="right" class="navbar-right">
@ -14,10 +19,22 @@
</u-navbar> </u-navbar>
<carousel v-if="item.type == 'carousel'" :res="item.options" /> <carousel v-if="item.type == 'carousel'" :res="item.options" />
<titleLayout v-if="item.type == 'title'" :res="item.options" /> <titleLayout v-if="item.type == 'title'" :res="item.options" />
<leftOneRightTwo v-if="item.type == 'leftOneRightTwo'" :res="item.options" /> <leftOneRightTwo
<leftTwoRightOne v-if="item.type == 'leftTwoRightOne'" :res="item.options" /> v-if="item.type == 'leftOneRightTwo'"
<topOneBottomTwo v-if="item.type == 'topOneBottomTwo'" :res="item.options" /> :res="item.options"
<topTwoBottomOne v-if="item.type == 'topTwoBottomOne'" :res="item.options" /> />
<leftTwoRightOne
v-if="item.type == 'leftTwoRightOne'"
:res="item.options"
/>
<topOneBottomTwo
v-if="item.type == 'topOneBottomTwo'"
:res="item.options"
/>
<topTwoBottomOne
v-if="item.type == 'topTwoBottomOne'"
:res="item.options"
/>
<flexThree v-if="item.type == 'flexThree'" :res="item.options" /> <flexThree v-if="item.type == 'flexThree'" :res="item.options" />
<flexFive v-if="item.type == 'flexFive'" :res="item.options" /> <flexFive v-if="item.type == 'flexFive'" :res="item.options" />
<flexFour v-if="item.type == 'flexFour'" :res="item.options" /> <flexFour v-if="item.type == 'flexFour'" :res="item.options" />
@ -25,14 +42,13 @@
<textPicture v-if="item.type == 'textPicture'" :res="item.options" /> <textPicture v-if="item.type == 'textPicture'" :res="item.options" />
<menuLayout v-if="item.type == 'menu'" :res="item.options" /> <menuLayout v-if="item.type == 'menu'" :res="item.options" />
<flexOne v-if="item.type == 'flexOne'" :res="item.options" /> <flexOne v-if="item.type == 'flexOne'" :res="item.options" />
<goods v-if="item.type == 'goods'" :res="item.options" /> <goods v-if="item.type == 'goods'" :res="item.options" />
<group v-if="item.type == 'group'" :res="item.options" /> <group v-if="item.type == 'group'" :res="item.options" />
<notice v-if="item.type == 'notice'" :res="item.options" />
<promotions v-if="item.type == 'promotionDetail'" :res="item.options" />
<!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> --> <!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> -->
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> --> <!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
<!-- <spike v-if="item.type == 'spike'" :res="item.options" /> --> <!-- <spike v-if="item.type == 'spike'" :res="item.options" /> -->
</div> </div>
<u-no-network></u-no-network> <u-no-network></u-no-network>
</div> </div>
@ -60,10 +76,8 @@ import tpl_goods from "@/pages/tabbar/home/template/tpl_goods"; //商品分类
import { getFloorData } from "@/api/home"; // import { getFloorData } from "@/api/home"; //
import permision from "@/js_sdk/wa-permission/permission.js"; // import permision from "@/js_sdk/wa-permission/permission.js"; //
import config from "@/config/config"; import config from "@/config/config";
// TODO import tpl_notice from "@/pages/tabbar/home/template/tpl_notice"; //
// import tpl_join_group from "@/pages/tabbar/home/template/tpl_join_group"; import tpl_promotions from "@/pages/tabbar/home/template/tpl_promotions_detail"; //
// import tpl_integral from "@/pages/tabbar/home/template/tpl_integral";
// import tpl_spike from "@/pages/tabbar/home/template/tpl_spike";
export default { export default {
data() { data() {
@ -90,9 +104,8 @@ export default {
flexOne: tpl_flex_one, flexOne: tpl_flex_one,
goods: tpl_goods, goods: tpl_goods,
group: tpl_group, group: tpl_group,
// spike: tpl_spike, notice: tpl_notice,
// joinGroup: tpl_join_group, promotions: tpl_promotions,
// integral: tpl_integral,
}, },
mounted() { mounted() {
@ -131,7 +144,7 @@ export default {
// WX_CODE // WX_CODE
if (res.scanType == "WX_CODE") { if (res.scanType == "WX_CODE") {
console.log(res) console.log(res);
uni.navigateTo({ uni.navigateTo({
url: `/${res.path}`, url: `/${res.path}`,
}); });

View File

@ -5,9 +5,13 @@
</template> </template>
<script> <script>
import configs from "@/config/config";
import storage from "@/utils/storage";
export default { export default {
data() { data() {
return { return {
configs,
storage,
webviewStyles: { webviewStyles: {
progress: { progress: {
color: this.$lightColor, color: this.$lightColor,
@ -17,7 +21,12 @@ export default {
}; };
}, },
onLoad(params) { onLoad(params) {
this.src = decodeURIComponent(params.src); params.IM
? (this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}&id=${
params.IM
}`)
: (this.src = decodeURIComponent(params.src));
console.log(this.src);
}, },
}; };
</script> </script>
@ -29,4 +38,4 @@ export default {
margin: 0; margin: 0;
} }
} }
</style> </style>