Feat(时令尝鲜):接口对接
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function () {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function () {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -17,10 +17,10 @@
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
/*每个页面公共css */
|
||||
@import "animate.css";
|
||||
@import "./assets/iconfont/iconfont.css";
|
||||
@import "./assets/css/base.less";
|
||||
@import "./assets/css/reset.less";
|
||||
@import "./assets/css/style.less";
|
||||
/*每个页面公共css */
|
||||
@import "animate.css";
|
||||
@import "./assets/iconfont/iconfont.css";
|
||||
@import "./assets/css/base.less";
|
||||
@import "./assets/css/reset.less";
|
||||
@import "./assets/css/style.less";
|
||||
</style>
|
||||
|
||||
+15
-4
@@ -23,27 +23,38 @@ export function getShopInfo() {
|
||||
return request.get("/merchantApply/info", {}, {login: true})
|
||||
}
|
||||
|
||||
// 4-采购批发商
|
||||
export function getWholesaler() {
|
||||
return request.get("/merchantApply/info/wholesaler", {}, {login: true})
|
||||
}
|
||||
|
||||
// 提交店铺入驻申请
|
||||
export function saveShop(hotelInfo, partnerId) {
|
||||
let param = {hotelInfo};
|
||||
export function saveShop(hotelInfo, captcha, partnerId) {
|
||||
let param = {hotelInfo, captcha: hotelInfo.captcha};
|
||||
if (partnerId && partnerId.length > 0) param.partnerId = partnerId;
|
||||
return request.post("/merchantApply/hotel/submit", param, {login: true})
|
||||
}
|
||||
|
||||
// 提交特产供应商入驻申请
|
||||
export function saveSupplier(hotelInfo, supplierInfo, partnerId) {
|
||||
let param = {hotelInfo, supplierInfo};
|
||||
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
||||
if (partnerId && partnerId.length > 0) param.partnerId = partnerId;
|
||||
return request.post("/merchantApply/goodSupplier/submit", param, {login: true})
|
||||
}
|
||||
|
||||
// 提交文玩供应商入驻申请
|
||||
export function saveWenwanSupplier(hotelInfo, supplierInfo, partnerId) {
|
||||
let param = {hotelInfo, supplierInfo};
|
||||
let param = {hotelInfo, supplierInfo, captcha: supplierInfo.captcha};
|
||||
if (partnerId && partnerId.length > 0) param.partnerId = partnerId;
|
||||
return request.post("/merchantApply/wenwanSupplier/submit", param, {login: true})
|
||||
}
|
||||
|
||||
// 提交采购批发商入驻申请
|
||||
export function saveWholesaler(wholesalerInfo) {
|
||||
let param = {wholesalerInfo, captcha: wholesalerInfo.captcha};
|
||||
return request.post("/merchantApply/wholesaler/submit", param, {login: true})
|
||||
}
|
||||
|
||||
// 撤销入驻申请
|
||||
export function removeApply() {
|
||||
return request.post("/merchantApply/revoke")
|
||||
|
||||
+22
-1
@@ -15,7 +15,7 @@ export function wellnessPlaceList(param) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 定制礼品首页
|
||||
* 特色礼品首页
|
||||
* */
|
||||
export function customizedGift() {
|
||||
return request.get("/customizedGift/index", {}, {login: true})
|
||||
@@ -41,3 +41,24 @@ export function getStoryList(page) {
|
||||
export function getStoryDetail(id) {
|
||||
return request.get("/countyFamous/content/" + id, {}, {login: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 时令尝鲜首页
|
||||
* */
|
||||
export function seasonHomeData() {
|
||||
return request.get("/seasonalFood/index", {}, {login: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 时令尝鲜
|
||||
* */
|
||||
export function getSeason(id) {
|
||||
return request.get("/seasonalFood/content/" + id, {}, {login: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 时令尝鲜
|
||||
* */
|
||||
export function getSeasonPoster(id) {
|
||||
return request.get("/seasonalFood/poster/" + id, {}, {login: true})
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function getSplashScreen() {
|
||||
return request.get("/splashScreen")
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页
|
||||
* @returns {*}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ export function fetchStore(page, cityName, name) {
|
||||
|
||||
/**
|
||||
* 获取商品城市列表
|
||||
* @param type 类型:0、特产;1、文玩;2、七彩云上;3、定制礼品;4、康养食材;5、千县名品;6、景点门票
|
||||
* @param type 类型:0、特产;1、文玩;2、七彩云上;3、特色礼品;4、康养食材;5、千县名品;6、景点门票
|
||||
* */
|
||||
export function fetchCity(type) {
|
||||
return request.get(`/wenwan/cityList/${type}`, {}, {
|
||||
|
||||
+76
-68
@@ -3,16 +3,16 @@ page {
|
||||
}
|
||||
|
||||
// ios底部安全距离-padding
|
||||
.savepadding{
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
box-sizing: content-box;
|
||||
.savepadding {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
// ios底部安全距离-bottom
|
||||
.savebottom{
|
||||
bottom: constant(safe-area-inset-bottom);
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
.savebottom {
|
||||
bottom: constant(safe-area-inset-bottom);
|
||||
bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.newsList .newsSwitch .van-hairline--top-bottom::after {
|
||||
@@ -323,7 +323,7 @@ page {
|
||||
padding-bottom: 0.25*100rpx;
|
||||
}
|
||||
|
||||
.evaluateWtapper .evaluateItem~.evaluateItem {
|
||||
.evaluateWtapper .evaluateItem ~ .evaluateItem {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ page {
|
||||
margin-top: 0.36*100rpx;
|
||||
}
|
||||
|
||||
.product-window .productWinList .item~.item {
|
||||
.product-window .productWinList .item ~ .item {
|
||||
margin-top: 0.36*100rpx;
|
||||
}
|
||||
|
||||
@@ -991,7 +991,7 @@ page {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.swiper .swiper-pagination-bullet~.swiper-pagination-bullet {
|
||||
.swiper .swiper-pagination-bullet ~ .swiper-pagination-bullet {
|
||||
margin-left: 0.12*100rpx;
|
||||
}
|
||||
|
||||
@@ -1215,14 +1215,14 @@ page {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
height: 0.64*100rpx;
|
||||
background-color: rgba(255,255,255,0.2);
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
// border-radius: 0.5*100rpx;
|
||||
padding: 0 0.28*100rpx;
|
||||
font-size: 0.28*100rpx;
|
||||
color: #fff;
|
||||
|
||||
border:1px solid rgba(255,255,255,1);
|
||||
border-radius:10*2rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 1);
|
||||
border-radius: 10*2rpx;
|
||||
}
|
||||
|
||||
.index .header .qr {
|
||||
@@ -1307,8 +1307,8 @@ page {
|
||||
box-shadow: 0 0.1*100rpx 0.3*100rpx #f5f5f5;
|
||||
-moz-box-shadow: 0 0.1*100rpx 0.3*100rpx #f5f5f5;
|
||||
-o-box-shadow: 0 0.1*100rpx 0.3*100rpx #f5f5f5;
|
||||
background:rgba(255,86,74,0.1);
|
||||
border-radius:0px 20*2rpx 20*2rpx 20*2rpx;
|
||||
background: rgba(255, 86, 74, 0.1);
|
||||
border-radius: 0px 20*2rpx 20*2rpx 20*2rpx;
|
||||
}
|
||||
|
||||
.index .news .pictrue {
|
||||
@@ -1440,7 +1440,7 @@ page {
|
||||
}
|
||||
}
|
||||
|
||||
.index .wrapper.hot+.wrapper {
|
||||
.index .wrapper.hot + .wrapper {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
@@ -1563,7 +1563,7 @@ page {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.index .wrapper .boutique .swiper-pagination-bullet~.swiper-pagination-bullet {
|
||||
.index .wrapper .boutique .swiper-pagination-bullet ~ .swiper-pagination-bullet {
|
||||
margin-left: 0.1*100rpx;
|
||||
}
|
||||
|
||||
@@ -1628,7 +1628,7 @@ page {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.index .hotList .list .item~.item {
|
||||
.index .hotList .list .item ~ .item {
|
||||
margin-left: 0.23*100rpx;
|
||||
}
|
||||
|
||||
@@ -1740,7 +1740,8 @@ page {
|
||||
height: 350rpx;
|
||||
}
|
||||
|
||||
.index .wrapper .newProducts {}
|
||||
.index .wrapper .newProducts {
|
||||
}
|
||||
|
||||
.index .wrapper.hot .newProducts .newProductsItem {
|
||||
width: 2.4*100rpx;
|
||||
@@ -1769,7 +1770,8 @@ page {
|
||||
flex: 0 2.4*100rpx;
|
||||
}
|
||||
|
||||
.index .wrapper .newProducts:nth-last-child(1) {}
|
||||
.index .wrapper .newProducts:nth-last-child(1) {
|
||||
}
|
||||
|
||||
.index .wrapper .newProducts .img-box {
|
||||
width: 100%;
|
||||
@@ -2214,15 +2216,15 @@ page {
|
||||
|
||||
}
|
||||
|
||||
.shoppingCart .footer-content{
|
||||
padding: 0 0.3*100rpx;
|
||||
margin-left: 0.3*100rpx;
|
||||
margin-right: 0.3*100rpx;
|
||||
height: 0.96*100rpx;
|
||||
box-sizing: border-box;
|
||||
.shoppingCart .footer-content {
|
||||
padding: 0 0.3*100rpx;
|
||||
margin-left: 0.3*100rpx;
|
||||
margin-right: 0.3*100rpx;
|
||||
height: 0.96*100rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
background:linear-gradient(139deg,rgba(255,149,141,1) 0%,rgba(255,92,138,1) 100%);
|
||||
border-radius:0.48*100rpx;
|
||||
background: linear-gradient(139deg, rgba(255, 149, 141, 1) 0%, rgba(255, 92, 138, 1) 100%);
|
||||
border-radius: 0.48*100rpx;
|
||||
|
||||
}
|
||||
|
||||
@@ -2263,7 +2265,7 @@ page {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shoppingCart .footer .button .bnt~.bnt {
|
||||
.shoppingCart .footer .button .bnt ~ .bnt {
|
||||
margin-left: 0.17*100rpx;
|
||||
}
|
||||
|
||||
@@ -2371,7 +2373,7 @@ page {
|
||||
|
||||
}
|
||||
|
||||
.user .wrapper .nav .item~.item:after {
|
||||
.user .wrapper .nav .item ~ .item:after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
left: 0;
|
||||
@@ -2728,22 +2730,22 @@ page {
|
||||
font-size: 0.28*100rpx;
|
||||
}
|
||||
|
||||
.product-con .footer .bnt>view {
|
||||
.product-con .footer .bnt > view {
|
||||
width: 2.22*100rpx;
|
||||
text-align: center;
|
||||
line-height: 0.76*100rpx;
|
||||
}
|
||||
|
||||
//.product-con .footer .bnt .joinCart {
|
||||
// border-radius: 0.5*100rpx 0 0 0.5*100rpx;
|
||||
// background-image: linear-gradient(to right, #fea10f 0%, #fea10f 100%);
|
||||
// background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
// border-radius: 0.5*100rpx 0 0 0.5*100rpx;
|
||||
// background-image: linear-gradient(to right, #fea10f 0%, #fea10f 100%);
|
||||
// background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
//}
|
||||
|
||||
//.product-con .footer .bnt .buy {
|
||||
// border-radius: 0 0.5*100rpx 0.5*100rpx 0;
|
||||
// background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
// background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
// border-radius: 0 0.5*100rpx 0.5*100rpx 0;
|
||||
// background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
// background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
//}
|
||||
|
||||
/*订单提交*/
|
||||
@@ -2910,7 +2912,7 @@ page {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.order-submission .moneyList .item~.item {
|
||||
.order-submission .moneyList .item ~ .item {
|
||||
margin-top: 0.2*100rpx;
|
||||
}
|
||||
|
||||
@@ -3263,7 +3265,7 @@ page {
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.my-order .list .item .bottom .bnt~.bnt {
|
||||
.my-order .list .item .bottom .bnt ~ .bnt {
|
||||
margin-left: 0.17*100rpx;
|
||||
}
|
||||
|
||||
@@ -3384,7 +3386,7 @@ page {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.order-details .wrapper .item~.item {
|
||||
.order-details .wrapper .item ~ .item {
|
||||
margin-top: 0.2*100rpx;
|
||||
}
|
||||
|
||||
@@ -3446,7 +3448,7 @@ page {
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.order-details .footer .bnt~.bnt {
|
||||
.order-details .footer .bnt ~ .bnt {
|
||||
margin-left: 0.18*100rpx;
|
||||
}
|
||||
|
||||
@@ -3622,7 +3624,7 @@ page {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.payment-status .wrapper .item~.item {
|
||||
.payment-status .wrapper .item ~ .item {
|
||||
margin-top: 0.2*100rpx;
|
||||
}
|
||||
|
||||
@@ -4277,7 +4279,7 @@ page {
|
||||
margin: 0.13*100rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.bargain .goodsDetails~.goodsDetails {
|
||||
.bargain .goodsDetails ~ .goodsDetails {
|
||||
margin-bottom: 0.5*100rpx;
|
||||
}
|
||||
|
||||
@@ -4452,7 +4454,7 @@ page {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.bargain-record .item .bottom .bnt~.bnt {
|
||||
.bargain-record .item .bottom .bnt ~ .bnt {
|
||||
margin-left: 0.18*100rpx;
|
||||
}
|
||||
|
||||
@@ -4764,7 +4766,7 @@ page {
|
||||
background-color: #e93323;
|
||||
}
|
||||
|
||||
.product-con .superior .slider-banner .swiper-container-horizontal>.swiper-pagination-bullets {
|
||||
.product-con .superior .slider-banner .swiper-container-horizontal > .swiper-pagination-bullets {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@@ -5061,7 +5063,7 @@ page {
|
||||
padding: 0.48*100rpx 0.3*100rpx 0.65*100rpx 0.3*100rpx;
|
||||
}
|
||||
|
||||
.evaluate-con .score .item~.item {
|
||||
.evaluate-con .score .item ~ .item {
|
||||
margin-top: 0.25*100rpx;
|
||||
}
|
||||
|
||||
@@ -5074,7 +5076,7 @@ page {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.evaluate-con .score .item .starsList .iconfont~.iconfont {
|
||||
.evaluate-con .score .item .starsList .iconfont ~ .iconfont {
|
||||
margin-left: 0.2*100rpx;
|
||||
}
|
||||
|
||||
@@ -5091,9 +5093,10 @@ page {
|
||||
}
|
||||
|
||||
.evaluate-con .score .textarea textarea {
|
||||
box-sizing: border-box;
|
||||
font-size: 0.28*100rpx;
|
||||
padding: 0.38*100rpx 0.3*100rpx 0 0.3*100rpx;
|
||||
width: 100%;
|
||||
width: 690rpx !important;
|
||||
height: 1.6*100rpx;
|
||||
}
|
||||
|
||||
@@ -5749,7 +5752,7 @@ page {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cash-withdrawal .nav .item~.item {
|
||||
.cash-withdrawal .nav .item ~ .item {
|
||||
border-left: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
@@ -5914,7 +5917,7 @@ page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.promoter-order .list .item .listn .itenm~.itenm {
|
||||
.promoter-order .list .item .listn .itenm ~ .itenm {
|
||||
margin-top: 0.12*100rpx;
|
||||
}
|
||||
|
||||
@@ -6468,7 +6471,7 @@ page {
|
||||
background-color: #efc58f;
|
||||
}
|
||||
|
||||
.flash-sale .timeLsit .item~.item {
|
||||
.flash-sale .timeLsit .item ~ .item {
|
||||
border-left: 1px solid #e3b06e;
|
||||
}
|
||||
|
||||
@@ -6524,7 +6527,8 @@ page {
|
||||
color: #fc4141;
|
||||
}
|
||||
|
||||
.flash-sale .countDown .text {}
|
||||
.flash-sale .countDown .text {
|
||||
}
|
||||
|
||||
.flash-sale .list.on {
|
||||
margin-top: 2.02*100rpx;
|
||||
@@ -6785,7 +6789,7 @@ page {
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.newsList .nav .item~.item {
|
||||
.newsList .nav .item ~ .item {
|
||||
margin-left: 0.46*100rpx;
|
||||
}
|
||||
|
||||
@@ -6968,7 +6972,7 @@ page {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.register .whiteBg .title .item~.item {
|
||||
.register .whiteBg .title .item ~ .item {
|
||||
margin-left: 0.85*100rpx;
|
||||
}
|
||||
|
||||
@@ -7134,7 +7138,7 @@ page {
|
||||
height: 1.85*100rpx;
|
||||
}
|
||||
|
||||
.pos-order-goods .goods~.goods {
|
||||
.pos-order-goods .goods ~ .goods {
|
||||
border-top: 1px dashed #e5e5e5;
|
||||
}
|
||||
|
||||
@@ -7388,7 +7392,7 @@ page {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item~.item {
|
||||
.pos-order-list .list .item ~ .item {
|
||||
margin-top: 0.24*100rpx;
|
||||
}
|
||||
|
||||
@@ -7464,7 +7468,7 @@ page {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .order .items~.items {
|
||||
.pos-order-list .list .item .operation .order .items ~ .items {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
@@ -7479,7 +7483,7 @@ page {
|
||||
line-height: 0.6*100rpx;
|
||||
}
|
||||
|
||||
.pos-order-list .list .item .operation .bnt~.bnt {
|
||||
.pos-order-list .list .item .operation .bnt ~ .bnt {
|
||||
margin-left: 0.14*100rpx;
|
||||
}
|
||||
|
||||
@@ -7604,7 +7608,7 @@ page {
|
||||
line-height: 0.77*100rpx;
|
||||
}
|
||||
|
||||
.pos-order-details .footer .more .order .item~.item {
|
||||
.pos-order-details .footer .more .order .item ~ .item {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
||||
@@ -7711,7 +7715,7 @@ page {
|
||||
margin-left: 0.13*100rpx;
|
||||
}
|
||||
|
||||
.deliver-goods .wrapper .item .mode .goods~.goods {
|
||||
.deliver-goods .wrapper .item .mode .goods ~ .goods {
|
||||
margin-left: 0.3*100rpx;
|
||||
}
|
||||
|
||||
@@ -7981,11 +7985,11 @@ page {
|
||||
border-top: 0.01*100rpx solid #eee;
|
||||
}
|
||||
|
||||
.yd-confirm-ft>a {
|
||||
.yd-confirm-ft > a {
|
||||
color: #e93323;
|
||||
}
|
||||
|
||||
.yd-confirm-ft>a.primary {
|
||||
.yd-confirm-ft > a.primary {
|
||||
border-left: 0.01*100rpx solid #eee;
|
||||
color: #e93323;
|
||||
}
|
||||
@@ -8043,7 +8047,8 @@ page {
|
||||
line-height: 0.9*100rpx;
|
||||
}
|
||||
|
||||
.swiper-wrapper {}
|
||||
.swiper-wrapper {
|
||||
}
|
||||
|
||||
.posterCanvasWarp {
|
||||
position: relative;
|
||||
@@ -8097,6 +8102,7 @@ rich-text {
|
||||
-webkit-box-orient: vertical;
|
||||
transition: all linear 0.2s;
|
||||
}
|
||||
|
||||
/* ==================
|
||||
flex布局(colorui里面也有相关基础样式)
|
||||
==================== */
|
||||
@@ -8176,18 +8182,20 @@ rich-text {
|
||||
}
|
||||
|
||||
// v4 custom
|
||||
.v4-nodata{
|
||||
.v4-nodata {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 60rpx;
|
||||
image{
|
||||
|
||||
image {
|
||||
width: 200rpx;
|
||||
height:188rpx;
|
||||
height: 188rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.text{
|
||||
color:#999;
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,22 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
goSupplierMini() {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: "wx9ca93d1f2a9c8156",
|
||||
path: "pages/auth/login",
|
||||
success(msg){
|
||||
console.log("success",msg)
|
||||
},
|
||||
fail(err){
|
||||
console.log("fail",err)
|
||||
},
|
||||
complete(msg){
|
||||
console.log("complete",msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
diffSSS: (date) => {
|
||||
if (typeof date !== "string") return 0;
|
||||
date = date.substring(0, 19);
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<view class="fixed-box">
|
||||
<view class="line-location flex ai-center" v-if="location">
|
||||
<image :src="webUrl+'/20220903142929759087.png'" mode="scaleToFill"></image>
|
||||
<text class="bold" @click="select(location)">当前定位:{{ location }}</text>
|
||||
<text class="bold">当前定位:{{ location }}</text>
|
||||
<!-- @click="select(location)"-->
|
||||
</view>
|
||||
|
||||
<image class="banner" :src="banner.icon" mode="scaleToFill" v-if="banner"
|
||||
@@ -45,7 +46,7 @@
|
||||
<view class="item" v-for="(item, index) in listCity" :key="index" @click="select(item)">
|
||||
<view class="has-goods" v-if="type===0 && item.hasData===0">暂无特产</view>
|
||||
<view class="has-goods" v-if="type>0 && type<6&& item.hasShop===0">暂无店铺</view>
|
||||
<view class="has-goods" v-if="type===6&& item.hasData===0">暂无景点</view>
|
||||
<view class="has-goods" v-if="type===6 && item.hasData===0">暂无景点</view>
|
||||
<image :src="item.icon" mode="scaleToFill"></image>
|
||||
<view class="one-t">{{ item.cityName }}</view>
|
||||
</view>
|
||||
@@ -171,6 +172,7 @@ export default {
|
||||
},
|
||||
select(item) {
|
||||
if (this.type === 0 && item.hasData === 0) return;
|
||||
if ((this.type === 1 || this.type === 2) && item.hasShop === 0) return;
|
||||
uni.setStorageSync("cityName", item.cityName)
|
||||
|
||||
switch (this.type) {
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
export const VUE_APP_API_URL = "https://shop.xdd618.com/api";
|
||||
// export const VUE_APP_API_URL = "https://www.xdd618.com/api";
|
||||
|
||||
export const SERVICE_API_URL = "https://service-test.xdd618.com/api";
|
||||
// export const SERVICE_API_URL = "https://service.xdd618.com/api";
|
||||
// export const SERVICE_API_URL = "https://service-test.xdd618.com/api";
|
||||
export const SERVICE_API_URL = "https://service.xdd618.com/api";
|
||||
|
||||
export const SOCKET_URL = "wss://service-test.xdd618.com/ws";
|
||||
// export const SOCKET_URL = "wss://service.xdd618.com/ws";
|
||||
// export const SOCKET_URL = "wss://service-test.xdd618.com/ws";
|
||||
export const SOCKET_URL = "wss://service.xdd618.com/ws";
|
||||
|
||||
export const VUE_APP_RESOURCES_URL = "https://www.xdd618.com/api/file/pic";
|
||||
export const STATIC_RESOURCE_URL = "https://resource.xdd618.com/image"
|
||||
|
||||
@@ -14,69 +14,10 @@ import {
|
||||
VUE_APP_RESOURCES_URL,
|
||||
WX_LIVE_APPID
|
||||
} from "@/config";
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
import uView from "uview-ui";
|
||||
|
||||
Vue.use(uView);
|
||||
Vue.mixin(mixin)
|
||||
uni.$u.setConfig({
|
||||
// 修改$u.config对象的属性
|
||||
config: {
|
||||
// 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx'
|
||||
unit: 'rpx'
|
||||
},
|
||||
// 修改$u.props对象的属性
|
||||
props: {
|
||||
// 修改radio组件的size参数的默认值,相当于执行 uni.$u.props.radio.size = 30
|
||||
radio: {
|
||||
size: 30,
|
||||
labelSize: 30,
|
||||
iconSize: 25
|
||||
},
|
||||
icon: {
|
||||
size: 40,
|
||||
fontSize: 30
|
||||
},
|
||||
picker: {
|
||||
fontSize: 30
|
||||
},
|
||||
button: {
|
||||
fontSize: 30,
|
||||
iconSize: 30
|
||||
},
|
||||
navbar: {
|
||||
leftIconSize: 40,
|
||||
titleStyle: {
|
||||
fontSize: '30rpx'
|
||||
}
|
||||
},
|
||||
tabbar: {
|
||||
size: 30
|
||||
},
|
||||
tabs: {
|
||||
lineWidth: 40
|
||||
},
|
||||
search: {
|
||||
searchIconSize: 40
|
||||
},
|
||||
codeInput: {
|
||||
size: 60
|
||||
},
|
||||
calendar: {
|
||||
rowHeight: 112
|
||||
},
|
||||
empty: {
|
||||
textSize: 28
|
||||
},
|
||||
checkbox: {
|
||||
fontSize: 30,
|
||||
size: 30,
|
||||
labelSize: 24,
|
||||
iconSize: 30
|
||||
}
|
||||
// 其他组件属性配置
|
||||
// ......
|
||||
}
|
||||
})
|
||||
|
||||
// 注册全局组件
|
||||
|
||||
|
||||
+39
-21
@@ -104,12 +104,12 @@
|
||||
"navigationBarTitleText": "404"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "pages/cloud/cloud",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "七彩云上"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "path": "pages/cloud/cloud",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "七彩云上"
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/cloud/haveFun",
|
||||
"style": {
|
||||
@@ -524,7 +524,7 @@
|
||||
{
|
||||
"path": "inn/innInfoDetail",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "资讯详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -578,6 +578,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "供应商入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/wholesaler",
|
||||
"style": {
|
||||
"navigationBarTitleText": "采购批发商入驻"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -604,7 +610,7 @@
|
||||
{
|
||||
"path": "views/giftList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "定制礼品",
|
||||
"navigationBarTitleText": "特色礼品",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
},
|
||||
@@ -651,6 +657,18 @@
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#FF564A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/seasonList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "时令尝鲜"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "views/season",
|
||||
"style": {
|
||||
"navigationBarTitleText": "时令尝鲜"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -869,25 +887,25 @@
|
||||
"condition": {
|
||||
"current": 0,
|
||||
"list": [
|
||||
{
|
||||
"name": "文玩店铺",
|
||||
"path": "wenwan/views/store",
|
||||
"query": "scene=id%3D74%26partnerId%3D5659"
|
||||
},
|
||||
{
|
||||
"name": "普通店铺",
|
||||
"path": "pagesInn/inn/innHome",
|
||||
"query": "scene=id%3D74%26partnerId%3D5659"
|
||||
},
|
||||
{
|
||||
"name": "商品详情",
|
||||
"path": "pages/shop/GoodsCon/index",
|
||||
"query": "scene=id%3D289%26partnerId%3D5675"
|
||||
"query": "id=369"
|
||||
},
|
||||
{
|
||||
"name": "DEBUG",
|
||||
"path": "pkg_product/views/giftList",
|
||||
"query": ""
|
||||
"path": "pages/shop/ShoppingCart/index",
|
||||
"query": "id=297"
|
||||
},
|
||||
{
|
||||
"name": "No.8",
|
||||
"path": "pages/shop/GoodsEvaluate/index",
|
||||
"query": "id=eb30f8a98b1c4952addbdccb1d37533d"
|
||||
},
|
||||
{
|
||||
"name": "时令尝鲜",
|
||||
"path": "pkg_product/views/season",
|
||||
"query": "id=20"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+99
-128
@@ -1,144 +1,115 @@
|
||||
<template>
|
||||
<view class="lottie-bg">
|
||||
<img class="start-img" :src="webUrl+'/20220929145109969605.png'" mode="scaleToFill">
|
||||
</view>
|
||||
<view class="lottie-bg" :style="{ backgroundImage: 'url(' + splashScreen + ')' }"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,
|
||||
mapMutations,
|
||||
mapActions
|
||||
} from "vuex";
|
||||
import {
|
||||
wxappAuth,
|
||||
getUser,
|
||||
userBindParent
|
||||
} from "@/api/user";
|
||||
import dayjs from "dayjs";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {
|
||||
parseQuery,
|
||||
login,
|
||||
handleQrCode,
|
||||
getCurrentPageUrl,
|
||||
handleUrlParam,
|
||||
checkAuth
|
||||
} from "@/utils";
|
||||
import {mapActions} from "vuex";
|
||||
import {userBindParent} from "@/api/user";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
import {checkAuth, getCurrentPageUrl, handleQrCode, handleUrlParam, login} from "@/utils";
|
||||
import {getSplashScreen} from "@/api/public";
|
||||
|
||||
export default {
|
||||
name: "Loading",
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
staticUrl: this.$STATIC_RESOURCE_URL
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
var url = handleQrCode();
|
||||
if (!url) {
|
||||
url = handleUrlParam(getCurrentPageUrl())
|
||||
}
|
||||
// 判断是否是分销
|
||||
if (url) {
|
||||
var spread = cookie.get("spread");
|
||||
let urlSpread = parseInt(url.spread);
|
||||
// if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||
if (!Number.isNaN(urlSpread)) {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
export default {
|
||||
name: "Loading",
|
||||
data() {
|
||||
return {
|
||||
splashScreen: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
getSplashScreen().then(({data}) => this.splashScreen = data);
|
||||
},
|
||||
onShow() {
|
||||
let url = handleQrCode();
|
||||
if (!url) {
|
||||
url = handleUrlParam(getCurrentPageUrl())
|
||||
}
|
||||
// 判断是否是分销
|
||||
if (url) {
|
||||
let spread = cookie.get("spread");
|
||||
let urlSpread = parseInt(url.spread);
|
||||
if (!Number.isNaN(urlSpread)) {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
|
||||
//绑定上级
|
||||
userBindParent({
|
||||
spread: urlSpread
|
||||
}).finally(() => {
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
})
|
||||
return;
|
||||
|
||||
// //如果是分销强制跳转到授权界面,来绑定关系
|
||||
// var path = "/pages/authorization/index";
|
||||
// this.$yrouter.reLaunch({path:path});
|
||||
// cookie.set('redirect', path)
|
||||
// return;
|
||||
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
}
|
||||
|
||||
}
|
||||
if (this.$store.getters.token) {
|
||||
// 注释下面一行,会停留在启动页
|
||||
setTimeout(() => {
|
||||
this.toLaunch();
|
||||
}, 2000)
|
||||
return;
|
||||
}
|
||||
cookie.get("spread");
|
||||
// this.toLaunch();
|
||||
if (this.$deviceType == "app") {
|
||||
// this.toLaunch();
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//检查授权信息
|
||||
this.checkUserInfo();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(["changeAuthorization", "setUserInfo"]),
|
||||
toLaunch() {
|
||||
this.changeAuthorization(false);
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
},
|
||||
checkUserInfo: async function() {
|
||||
//检查是否有授权信息
|
||||
var loginInfo = null;
|
||||
let authUserInfo = await checkAuth().catch(err => {});
|
||||
|
||||
console.log('authUserInfo:' + JSON.stringify(authUserInfo));
|
||||
|
||||
if (authUserInfo) {
|
||||
loginInfo = {
|
||||
userInfo: authUserInfo,
|
||||
iv: '',
|
||||
encryptedData: ''
|
||||
}
|
||||
}
|
||||
|
||||
login(loginInfo).finally(() => {
|
||||
//绑定上级
|
||||
userBindParent({
|
||||
spread: urlSpread
|
||||
}).finally(() => {
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
return;
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
if (this.$store.getters.token) {
|
||||
// 注释下面一行,会停留在启动页
|
||||
setTimeout(() => {
|
||||
this.toLaunch();
|
||||
}, 2000)
|
||||
return;
|
||||
}
|
||||
cookie.get("spread");
|
||||
// this.toLaunch();
|
||||
if (this.$deviceType == "app") {
|
||||
// this.toLaunch();
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//检查授权信息
|
||||
this.checkUserInfo();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(["changeAuthorization", "setUserInfo"]),
|
||||
toLaunch() {
|
||||
this.changeAuthorization(false);
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
},
|
||||
checkUserInfo: async function () {
|
||||
//检查是否有授权信息
|
||||
let loginInfo = null;
|
||||
let authUserInfo = await checkAuth().catch(err => {
|
||||
});
|
||||
|
||||
console.log('authUserInfo:' + JSON.stringify(authUserInfo));
|
||||
|
||||
if (authUserInfo) {
|
||||
loginInfo = {
|
||||
userInfo: authUserInfo,
|
||||
iv: '',
|
||||
encryptedData: ''
|
||||
}
|
||||
}
|
||||
|
||||
login(loginInfo).finally(() => {
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.lottie-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #C9151E;
|
||||
}
|
||||
|
||||
.start-img {
|
||||
position: fixed;
|
||||
bottom: 200rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 190rpx;
|
||||
height: 212rpx;
|
||||
}
|
||||
.lottie-bg {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100vw 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<image class="btn-close" :src="webUrl+'/20221230200935413332.png'" @click="show=false"/>
|
||||
<view class="content">
|
||||
<view class="title tc bold">《用户协议及隐私政策》</view>
|
||||
<view class="popup-content" v-html="agreeInfo.privacyPolicy"></view>
|
||||
<rich-text :nodes="agreeInfo.privacyPolicy"/>
|
||||
<view class="title tc">
|
||||
<button size="mini" @click="show=false">关闭</button>
|
||||
</view>
|
||||
@@ -41,7 +41,7 @@
|
||||
<view class="dialog-mask" v-if="showFillOut">
|
||||
<view class="dialog-fill flex flex-col ai-center">
|
||||
<view class="title bold">请完善您的头像和昵称</view>
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||
<button class="avatar-wrapper" open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">
|
||||
<image class="avatar" :src="avatarUrl"></image>
|
||||
</button>
|
||||
<input type="nickname" class="input-wrapper" placeholder="请输入昵称" @input="inputName" @confirm="inputName"
|
||||
@@ -207,7 +207,15 @@ export default {
|
||||
avatar: this.avatarUrl
|
||||
}
|
||||
postUserEdit(param).then(res => {
|
||||
this.doneRedirect()
|
||||
if (res.status === 200) {
|
||||
this.doneRedirect();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
|
||||
+2
-39
@@ -18,6 +18,7 @@ export default {
|
||||
this.getMapData();
|
||||
getHotelTypeList().then(({data}) => {
|
||||
this.typeList = data;
|
||||
console.log("getHotelTypeList")
|
||||
this.search();
|
||||
});
|
||||
},
|
||||
@@ -27,6 +28,7 @@ export default {
|
||||
if (memCityName.length) {
|
||||
this.cityName = memCityName;
|
||||
uni.removeStorageSync("cityName")
|
||||
console.log("memCityName if")
|
||||
this.search();
|
||||
}
|
||||
},
|
||||
@@ -56,45 +58,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// getCurAddress() {
|
||||
// let that = this;
|
||||
// //定位
|
||||
// uni.showLoading({
|
||||
// title: '定位中...'
|
||||
// });
|
||||
//
|
||||
// uni.getLocation({
|
||||
// type: 'wgs84',
|
||||
// success: function (res) {
|
||||
// let latitude = res.latitude;
|
||||
// let longitude = res.longitude;
|
||||
//
|
||||
// // #ifndef H5
|
||||
// uni.request({
|
||||
// url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude +
|
||||
// '&key=' + config.key,
|
||||
// success: function (res) {
|
||||
// uni.hideLoading();
|
||||
//
|
||||
// that.cityName = res.data.result.ad_info.city;
|
||||
// //定位成功刷新数据
|
||||
// that.search()
|
||||
// },
|
||||
// fail: function () {
|
||||
// uni.hideLoading();
|
||||
// },
|
||||
// complete: function () {
|
||||
// }
|
||||
// });
|
||||
// // #endif
|
||||
// },
|
||||
// fail: function (err) {
|
||||
// console.log("test",err)
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
|
||||
tapType(index) {
|
||||
if (this.typeIndex === index) return;
|
||||
this.typeIndex = index;
|
||||
|
||||
+35
-324
@@ -3,17 +3,7 @@
|
||||
<view class="header acea-row row-column row-left" style="position: absolute;left: 0;right: 0;"
|
||||
:style="{top:statusBarHeight+'px'}">
|
||||
|
||||
<view class="acea-row row-middle row-between" style="position: relative;z-index: 1;">
|
||||
<view class="avatar-box acea-row row-middle">
|
||||
<!-- 2023/4/13 隐藏,下方事件对应avatar-box-->
|
||||
<!-- @click="avatarClick"-->
|
||||
<!-- <image v-if="userInfo&&userInfo.avatar" class="avatar-img" :src="userInfo.avatar"></image>-->
|
||||
<!-- <image v-else class="avatar-img" :src="webUrl+'/20230304135955831196.png'"></image>-->
|
||||
<!-- <view class="acea-row row-middle"-->
|
||||
<!-- style="background: #1E131B;border: 1px solid #FFFFFF;border-radius: 0 28rpx 28rpx 0;padding: 4rpx 10rpx 4rpx 20rpx;margin-left: -10rpx;height: 40rpx;box-sizing: content-box;">-->
|
||||
<!-- <text style="" class="nickname-text">{{ userInfo.nickname || '' }}</text>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<view class="acea-row row-middle row-right" style="position: relative;z-index: 1;">
|
||||
<view style="position: relative;color: #FFF;margin-left: 20rpx;margin-right: 20rpx;"
|
||||
class="acea-row row-middle">
|
||||
<image style="width: 36rpx;height: 36rpx;" :src="webUrl+'/20210616184302174394.png'" mode="">
|
||||
@@ -21,12 +11,11 @@
|
||||
<view style="margin-left: 10rpx;font-size: 28rpx;color: #fff;">客服</view>
|
||||
<button class="cus-btn" open-type="contact"></button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fixed-header-box"></view> -->
|
||||
|
||||
<view class="slider-banner" style="position: relative;">
|
||||
<swiper style="height: 680rpx;" indicatorDots="true" indicator-color="rgba(255, 255, 255, .3)"
|
||||
<swiper style="height: 510rpx;" indicatorDots="true" indicator-color="rgba(255, 255, 255, .3)"
|
||||
indicator-active-color="#ffffff" v-if="banner.length > 0" autoplay circular>
|
||||
<block v-for="(item, bannerIndex) in banner" :key="bannerIndex">
|
||||
<swiper-item>
|
||||
@@ -41,10 +30,6 @@
|
||||
style="flex-wrap: nowrap;position: absolute;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,0.6);padding: 10rpx 32rpx;">
|
||||
<view class="news acea-row row-between-wrapper"
|
||||
style="box-shadow: none !important;flex-grow: 1;flex-wrap: nowrap;background:transparent !important;border: none !important;margin: 0 30rpx 0 0 !important;padding: 0 !important;height: auto !important;">
|
||||
|
||||
<!-- <view class="notice acea-row row-middle" style="color: #fff;font-size: 24rpx;margin-right: 10rpx !important;">
|
||||
欢迎新加入会员:
|
||||
</view> -->
|
||||
<view class="swiper-no-swiping new-banner" style="height: 34rpx !important;text-align: right;">
|
||||
<swiper class="swiper-wrapper" style="height: 34rpx !important;" v-if="userList.length > 0" :interval="3000"
|
||||
:indicator-dots="false" autoplay circular vertical>
|
||||
@@ -61,11 +46,6 @@
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="acea-row row-middle row-between" style="flex-shrink: 0;flex-wrap: nowrap;margin-right: 30rpx;">
|
||||
<view class="" style="color: #fff;font-size: 24rpx;margin-right: 10rpx;">香道滇会员总数:</view>
|
||||
<view class="" style="color: #fff;font-size: 24rpx;text-align: right;">{{userTotal}}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -85,31 +65,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 快捷跳转块v4end -->
|
||||
|
||||
<view style="padding-bottom:20rpx;background: #fff;">
|
||||
<!-- 转盘-->
|
||||
<!-- <image class="home-luck" :src="`${webUrl}/20220519145845818243.png`" mode="scaleToFill" @click="goLuck"></image>-->
|
||||
|
||||
<!-- 通知开始 -->
|
||||
<view v-if="showNotice" class="news acea-row row-between-wrapper" style="margin-top: 20rpx;margin-bottom: 20rpx;">
|
||||
<view class="notice acea-row row-middle">
|
||||
<image style="width: 102rpx;height:64rpx" :src="webUrl+'/20210609100702342165.png'" mode=""></image>
|
||||
</view>
|
||||
<view class="swiper-no-swiping new-banner">
|
||||
<swiper class="swiper-wrapper" v-if="roll.length > 0" :indicator-dots="false" autoplay circular vertical>
|
||||
<block v-for="(item, rollIndex) in roll" :key="rollIndex">
|
||||
<swiper-item class="swiper-slide">
|
||||
<view @click="goRoll(item)" class="swiper-item acea-row row-between-wrapper">
|
||||
<view class="text acea-row row-between-wrapper">
|
||||
<view class="label" v-if="item.show === '是'">最新</view>
|
||||
<view class="newsTitle line1">{{ item.info }}</view>
|
||||
</view>
|
||||
<!-- <view class="iconfont icon-xiangyou"></view> -->
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 伴手礼精品 -->
|
||||
@@ -246,9 +205,6 @@
|
||||
v-if="item.productPrice">¥{{ item.productPrice }}
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="shop flex"><text>{{item.merName}}</text>
|
||||
<image class="icon-fire" :src="webUrl+'/20221118092713277343.png'" mode="scaleToFill"></image>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -310,7 +266,6 @@
|
||||
<script>
|
||||
import {mapActions, mapGetters} from 'vuex';
|
||||
import {formatDateTime} from "@/utils";
|
||||
import {handleUrlParam} from '@/utils/index';
|
||||
import config from '@/utils/mapConfig';
|
||||
|
||||
import PromotionGood from '@/components/PromotionGood';
|
||||
@@ -321,13 +276,12 @@ import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||
import LsSwiper from '@/components//ls-swiper/index.vue'
|
||||
|
||||
import {noticeDetail, noticeList} from "@/api/user";
|
||||
import {getHomeData, getShareImage, getWxLiveList, wxLiveSynchro} from '@/api/public';
|
||||
import {getHomeData, getShareImage} from '@/api/public';
|
||||
import {getHomeHotelList} from "@/api/inn.js";
|
||||
import {getProducts} from "@/api/store";
|
||||
import {sharpBannar} from "@/api/goods";
|
||||
import NP from "number-precision";
|
||||
|
||||
const HAS_COUPON_WINDOW = 'has_coupon_window';
|
||||
var that;
|
||||
export default {
|
||||
name: 'Index',
|
||||
@@ -350,7 +304,6 @@ export default {
|
||||
duration: 60000,
|
||||
unReadMessageInfo: null,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
showNotice: true, //是否显示通知
|
||||
isLiving: true, //是否正在直播
|
||||
showCoupon: false,
|
||||
viewHeight: (750 * 3 / 4.0),
|
||||
@@ -502,14 +455,9 @@ export default {
|
||||
customBar = e.statusBarHeight + 45
|
||||
// #endif
|
||||
|
||||
// 这里你可以自己决定存放方式,建议放在store中,因为store是实时变化的
|
||||
// this.$store.commit('SET_STATUS_BAR', statusBar)
|
||||
// this.$store.commit('SET_CUSTOM_BAR', customBar)
|
||||
// this.$store.commit('SET_SYSTEM_INFO', e)
|
||||
that.statusBarHeight = customBar;
|
||||
//两列商品宽度
|
||||
that.hotGoodsColumnWidth = (e.screenWidth - uni.upx2px(90)) / 2 + 'px';
|
||||
//that.bslGoodsHeight = (e.screenWidth - uni.upx2px(90))/2*3/4+'px';
|
||||
//状态栏图片高度
|
||||
that.bgImgHeight = statusBar + 'px';
|
||||
|
||||
@@ -529,21 +477,13 @@ export default {
|
||||
this.getUnreadMsgList();
|
||||
}
|
||||
|
||||
//先同步后获取直播间列表
|
||||
//this.getLiveList();
|
||||
wxLiveSynchro().then(res => {
|
||||
// this.getLiveList();
|
||||
}).catch(err => {
|
||||
// this.getLiveList();
|
||||
})
|
||||
|
||||
//定位
|
||||
this.getCurAddress();
|
||||
this.init();
|
||||
//获取团购商品
|
||||
this.getGroupGoods();
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '云南香道滇官方商城',
|
||||
path: '/pages/home/index',
|
||||
@@ -571,7 +511,6 @@ export default {
|
||||
that.$set(that, 'roll', res.data.roll);
|
||||
that.$set(that, 'userList', res.data.lotteryRecord); //滚动会员信息
|
||||
that.$set(that, 'userTotal', res.data.userTotal); //会员总数信息
|
||||
//that.$set(that, 'activityOne', activityOne);
|
||||
that.$set(that, 'info', res.data.info);
|
||||
that.$set(that, 'firstList', res.data.firstList.map((item) => {
|
||||
item.price = that.$force2Decimal(item.price);
|
||||
@@ -606,7 +545,6 @@ export default {
|
||||
that.likeInfo.forEach((item) => {
|
||||
imgs.push(item.image);
|
||||
})
|
||||
// that.bslImglist = imgs;
|
||||
that.$set(that, 'bslImglist', imgs);
|
||||
|
||||
that.seriesWidth = 770 * imgs.length - 20;
|
||||
@@ -667,10 +605,6 @@ export default {
|
||||
swiperChange(e) {
|
||||
this.currentIndex = e.detail.current;
|
||||
},
|
||||
goMoreNewGoods: function () {
|
||||
//跳转到分类
|
||||
this.$yrouter.switchTab('/pages/shop/GoodsClass/index');
|
||||
},
|
||||
msgConfirm: function () {
|
||||
that.$refs.popup.close();
|
||||
},
|
||||
@@ -756,17 +690,10 @@ export default {
|
||||
q.cityName = this.cityName;
|
||||
}
|
||||
|
||||
|
||||
getHomeHotelList(q).then(res => {
|
||||
that.innArray = [];
|
||||
//that.innArray = res.data;
|
||||
that.innArray.push.apply(that.innArray, res.data);
|
||||
|
||||
}).catch((err) => {
|
||||
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
})
|
||||
},
|
||||
getShopList: function () {
|
||||
let that = this;
|
||||
@@ -784,14 +711,8 @@ export default {
|
||||
|
||||
getHomeHotelList(q).then(res => {
|
||||
that.shopArray = [];
|
||||
//that.innArray = res.data;
|
||||
that.shopArray.push.apply(that.shopArray, res.data);
|
||||
|
||||
}).catch((err) => {
|
||||
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
})
|
||||
},
|
||||
getRestaurantList: function () {
|
||||
let that = this;
|
||||
@@ -809,14 +730,8 @@ export default {
|
||||
|
||||
getHomeHotelList(q).then(res => {
|
||||
that.restaurantArray = [];
|
||||
//that.innArray = res.data;
|
||||
that.restaurantArray.push.apply(that.restaurantArray, res.data);
|
||||
|
||||
}).catch((err) => {
|
||||
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
})
|
||||
},
|
||||
goMoreBoutiqueGift: function () {
|
||||
//跳转伴手礼分类
|
||||
@@ -827,36 +742,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
goMoreGroupBuy: function () {
|
||||
//跳转伴手礼分类
|
||||
this.$yrouter.reLaunch({
|
||||
path: '/pages/shop/GoodsClass/index',
|
||||
query: {
|
||||
id: 19
|
||||
}
|
||||
});
|
||||
},
|
||||
goProducts: function () {
|
||||
//跳转伴手礼分类
|
||||
this.$yrouter.reLaunch({
|
||||
path: '/pages/shop/GoodsClass/index'
|
||||
});
|
||||
},
|
||||
goLiveList: function () {
|
||||
this.$yrouter.push('/pages/LiveBroadcastList/LiveBroadcastList');
|
||||
},
|
||||
goShotVideo: function () {
|
||||
this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackList');
|
||||
},
|
||||
goInnDetail: function (item) {
|
||||
//跳转到客栈详情
|
||||
this.$yrouter.push({
|
||||
path: "/pagesInn/inn/innHome",
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
});
|
||||
},
|
||||
goPreSale: function () {
|
||||
this.$yrouter.push("/v4/views/preSale/preSale")
|
||||
},
|
||||
@@ -866,88 +751,26 @@ export default {
|
||||
setMsgReaded: function (mid) {
|
||||
noticeDetail({
|
||||
id: mid
|
||||
}).then((res) => {
|
||||
|
||||
}).catch((err) => {
|
||||
|
||||
})
|
||||
},
|
||||
getLiveList: function () {
|
||||
|
||||
//直播间状态 101:直播中,102:未开始,103 已结束,104 禁播,105:暂停,106:异常,107:已过期
|
||||
var params = {
|
||||
limit: 1,
|
||||
page: 0,
|
||||
liveStatus: 101 //101-直播中
|
||||
}
|
||||
// mescroll.endByPage(0, 0);
|
||||
// return;
|
||||
let that = this;
|
||||
getWxLiveList(params)
|
||||
.then(res => {
|
||||
|
||||
if (res.data && res.data.content && res.data.content.length > 0) {
|
||||
|
||||
that.liveList = res.data.content;
|
||||
that.isLiving = true;
|
||||
} else {
|
||||
that.isLiving = false;
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
})
|
||||
},
|
||||
getUnreadMsgList: function () {
|
||||
var params = {
|
||||
limit: 10,
|
||||
page: 1
|
||||
}
|
||||
// mescroll.endByPage(0, 0);
|
||||
// return;
|
||||
let that = this;
|
||||
noticeList(params)
|
||||
.then(res => {
|
||||
|
||||
if (res.data && res.data.length > 0) {
|
||||
|
||||
var msg = res.data[0];
|
||||
if (msg.readFlag == 'RF0') {
|
||||
that.unReadMessageInfo = msg;
|
||||
that.$refs.popup.open();
|
||||
that.setMsgReaded(msg.id);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
})
|
||||
noticeList(params).then(res => {
|
||||
if (res.data && res.data.length > 0) {
|
||||
var msg = res.data[0];
|
||||
if (msg.readFlag == 'RF0') {
|
||||
that.unReadMessageInfo = msg;
|
||||
that.$refs.popup.open();
|
||||
that.setMsgReaded(msg.id);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
noticeClose: function () {
|
||||
this.showNotice = false;
|
||||
},
|
||||
//
|
||||
livingButtonClick: function () {
|
||||
// //是否在直播
|
||||
// if(this.isLiving){
|
||||
// //跳转到直播界面
|
||||
// var live = this.liveList[0];
|
||||
// var liveAppId = this.$WX_LIVE_APPID;
|
||||
// wx.navigateTo({
|
||||
// url: `plugin-private://${liveAppId}/pages/live-player-plugin?room_id=${live.roomId}`
|
||||
// });
|
||||
|
||||
// }else{
|
||||
// //跳转到视频回放界面
|
||||
// this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackList')
|
||||
// }
|
||||
|
||||
//跳转到视频回放界面
|
||||
this.$yrouter.push('/pages/LiveAndShortVideo/LiveAndShortVideo')
|
||||
},
|
||||
avatarClick: function () {
|
||||
this.$yrouter.switchTab('/pages/user/User/index');
|
||||
},
|
||||
call: function () {
|
||||
|
||||
if (this.companyTel != undefined && this.companyTel.length > 0) {
|
||||
@@ -971,32 +794,10 @@ export default {
|
||||
if (item.uniapp_url) {
|
||||
this.$yrouter.push(item.uniapp_url)
|
||||
}
|
||||
// this.$yrouter.push("/pages/shop/GoodsCon/index?id="+item.id)
|
||||
},
|
||||
goGoodSearch() {
|
||||
// this.$yrouter.push('/pages/shop/GoodsEvaluate/index');
|
||||
this.$yrouter.push('/pages/shop/GoodSearch/index');
|
||||
},
|
||||
goWxappUrl(item) {
|
||||
this.$yrouter.push(item.uniapp_url);
|
||||
},
|
||||
goHotNewGoods(type) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/HotNewGoods/index',
|
||||
query: {
|
||||
type
|
||||
}
|
||||
});
|
||||
},
|
||||
goBSLGoods(index) {
|
||||
var item = this.likeInfo[index];
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
});
|
||||
},
|
||||
goGoodsCon(item) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
@@ -1012,56 +813,6 @@ export default {
|
||||
id: item.productId,
|
||||
activityId: item.id,
|
||||
from
|
||||
}
|
||||
});
|
||||
},
|
||||
goGoodsPromotion() {
|
||||
this.$yrouter.push('/pages/shop/GoodsPromotion/index');
|
||||
},
|
||||
startQr: function () {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
let option = handleUrlParam(res.result)
|
||||
// {productId: "19", spread: "21", codeType: "routine"}
|
||||
// {productId: "19", spread: "21", pageType: "good", codeType: "routine"}
|
||||
switch (option.pageType) {
|
||||
case 'good':
|
||||
// 跳转商品详情
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
q: res.result
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'group':
|
||||
// 跳转团购
|
||||
this.$yrouter.push({
|
||||
path: '/pages/activity/GroupRule/index',
|
||||
query: {
|
||||
q: res.result
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'dargain':
|
||||
// 跳转砍价
|
||||
this.$yrouter.push({
|
||||
path: '/pages/activity/DargainDetails/index',
|
||||
query: {
|
||||
q: res.result
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
// 跳转分销
|
||||
this.$yrouter.push({
|
||||
path: '/pages/Loading/index',
|
||||
query: {}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1107,7 +858,6 @@ export default {
|
||||
.index .header {
|
||||
height: auto !important;
|
||||
background-color: transparent !important;
|
||||
|
||||
}
|
||||
|
||||
.swiper-item {
|
||||
@@ -1130,7 +880,6 @@ export default {
|
||||
|
||||
|
||||
.member-box {
|
||||
// padding: 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
@@ -1165,7 +914,6 @@ export default {
|
||||
box-sizing: border-box;
|
||||
margin-right: 16rpx;
|
||||
margin-left: -30rpx;
|
||||
// background:linear-gradient(90deg,rgba(196,199,255,1) 0%,rgba(56,104,253,1) 100%);
|
||||
background: rgba(138, 143, 203, 1);
|
||||
border-radius: 0px 16*2rpx 16*2rpx 0px;
|
||||
}
|
||||
@@ -1174,7 +922,6 @@ export default {
|
||||
width: 20*2rpx;
|
||||
height: 20*2rpx;
|
||||
margin-right: 5*2rpx;
|
||||
|
||||
}
|
||||
|
||||
.live-broadcast-box .living-box {
|
||||
@@ -1197,10 +944,6 @@ export default {
|
||||
|
||||
.slider-banner {
|
||||
-webkit-transform: rotate(0);
|
||||
// margin-top: -187rpx;
|
||||
// border-radius: 20rpx;
|
||||
// margin-left: 30rpx;
|
||||
// margin-right: 30rpx;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
@@ -1208,15 +951,12 @@ export default {
|
||||
.header {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
//height: 680rpx !important;
|
||||
}
|
||||
|
||||
.header .paper-cuts-img {
|
||||
position: absolute;
|
||||
width: 159*2rpx;
|
||||
height: 159*2rpx;
|
||||
// left: calc((100% - 159*2rpx)/2);
|
||||
// top: calc((100% - 159*2rpx)/2);
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
@@ -1235,16 +975,12 @@ export default {
|
||||
padding: 0 28rpx;
|
||||
font-size: 28rpx;
|
||||
color: #acacac;
|
||||
box-sizing: border-box;
|
||||
// border: 1px solid #ffffff;
|
||||
border-radius: 32rpx;
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.notice {
|
||||
margin-right: 24rpx;
|
||||
// background:linear-gradient(145deg,rgba(252,85,179,1) 0%,rgba(255,45,105,1) 100%);
|
||||
// border-radius:0px 4*2rpx 4*2rpx 8*2rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 12*2rpx;
|
||||
@@ -1268,7 +1004,7 @@ export default {
|
||||
|
||||
.company-hline {
|
||||
width: 28*2rpx;
|
||||
height: 0px;
|
||||
height: 0;
|
||||
border: 1px solid rgba(56, 104, 253, 1);
|
||||
}
|
||||
|
||||
@@ -1279,7 +1015,7 @@ export default {
|
||||
|
||||
.h-line {
|
||||
width: 28*2rpx;
|
||||
height: 0px;
|
||||
height: 0;
|
||||
border: 1px solid rgba(255, 121, 0, 1);
|
||||
}
|
||||
|
||||
@@ -1300,7 +1036,6 @@ export default {
|
||||
.hotGoodsList {
|
||||
position: relative;
|
||||
margin: 35rpx 0;
|
||||
// background-color: #fff;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -1355,7 +1090,6 @@ export default {
|
||||
|
||||
.pro-info {
|
||||
font-size: 14*2rpx;
|
||||
|
||||
}
|
||||
|
||||
.company-logo-box {
|
||||
@@ -1365,19 +1099,14 @@ export default {
|
||||
.company-info-box {
|
||||
padding: 24rpx 24rpx 32rpx 24rpx;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
//box-shadow:0px 6rpx 12rpx rgba(0,0,0,0.1);
|
||||
//border-radius:12rpx;
|
||||
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0px 12rpx 12rpx 12rpx;
|
||||
box-shadow: 0 6rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0 12rpx 12rpx 12rpx;
|
||||
flex-wrap: nowrap !important;
|
||||
// margin-top: 35*2rpx;
|
||||
|
||||
}
|
||||
|
||||
.company-info {
|
||||
flex: 1;
|
||||
margin-left: 16rpx;
|
||||
|
||||
}
|
||||
|
||||
.company-tel-box {
|
||||
@@ -1421,7 +1150,7 @@ export default {
|
||||
}
|
||||
|
||||
.line {
|
||||
height: 0px;
|
||||
height: 0;
|
||||
border: 1px solid rgba(235, 236, 240, 1);
|
||||
margin-top: 10*2rpx;
|
||||
margin-bottom: 10*2rpx;
|
||||
@@ -1433,7 +1162,6 @@ export default {
|
||||
}
|
||||
|
||||
.new-tag {
|
||||
// margin-right: 10rpx;
|
||||
padding: 1*2rpx 3*2rpx;
|
||||
width: 29*2rpx;
|
||||
height: 14*2rpx;
|
||||
@@ -1457,17 +1185,14 @@ export default {
|
||||
}
|
||||
|
||||
.index .wrapper.hot .newProducts {
|
||||
// margin: 25rpx 25rpx 35rpx 25rpx;
|
||||
margin: 10rpx 0rpx 0rpx 0rpx;
|
||||
box-shadow: none;
|
||||
background: none;
|
||||
padding: 0rpx 0rpx 0rpx 0rpx;
|
||||
// padding: 0;
|
||||
}
|
||||
|
||||
.index .news {
|
||||
margin: 0rpx 30rpx !important;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8rpx !important;
|
||||
background: #f7f7f7 !important;
|
||||
border: none !important;
|
||||
@@ -1482,10 +1207,6 @@ export default {
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
.index .wrapper .title .text {
|
||||
}
|
||||
|
||||
.index .wrapper .title .text .name {
|
||||
font-size: 18*2rpx !important;
|
||||
color: #fff !important;
|
||||
@@ -1524,7 +1245,6 @@ export default {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.msg_content {
|
||||
padding: 0.1*100rpx;
|
||||
color: #080F1A;
|
||||
@@ -1534,8 +1254,6 @@ export default {
|
||||
.msg_btn {
|
||||
padding: 10rpx;
|
||||
font-size: 34rpx;
|
||||
|
||||
// border: 1px solid #333;
|
||||
color: #38afef;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
@@ -1609,13 +1327,13 @@ export default {
|
||||
// v4
|
||||
.fast-nav {
|
||||
flex-wrap: wrap;
|
||||
padding: 40rpx 32rpx 0;
|
||||
padding: 40rpx 68rpx 0;
|
||||
background: #fff;
|
||||
|
||||
.item {
|
||||
width: 88rpx;
|
||||
margin-right: 60rpx;
|
||||
margin-bottom: 40rpx;
|
||||
width: 86rpx;
|
||||
margin-right: 46rpx;
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.item:nth-child(5n) {
|
||||
@@ -1623,17 +1341,16 @@ export default {
|
||||
}
|
||||
|
||||
image {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
width: 86rpx;
|
||||
height: 86rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.one-t {
|
||||
width: 110rpx;
|
||||
margin-top: 8rpx;
|
||||
color: #666666;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
color: #666;
|
||||
font-size: 26rpx;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@@ -1649,7 +1366,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
margin: 0 20rpx;
|
||||
padding-bottom: 14rpx;
|
||||
box-shadow: 0px 6rpx 16rpx rgba(148, 148, 148, 0.16);
|
||||
box-shadow: 0 6rpx 16rpx rgba(148, 148, 148, 0.16);
|
||||
}
|
||||
|
||||
.money {
|
||||
@@ -1826,7 +1543,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.desc-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1917,7 +1633,6 @@ export default {
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
width: 328rpx;
|
||||
// height: 528rpx;
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
|
||||
@@ -1932,10 +1647,6 @@ export default {
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
// position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
@@ -142,13 +142,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" style="z-index: -1">
|
||||
<view class="acea-row row-middle">
|
||||
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230836494421.png'"
|
||||
mode=""></image>
|
||||
<text class="">备注信息(150字以内</text>
|
||||
<text class="">备注信息(150字以内)</text>
|
||||
</view>
|
||||
<textarea v-model="mark"></textarea>
|
||||
<textarea v-model="mark" ></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wrapper" style="margin: 30rpx 0;border-radius: 16rpx;">
|
||||
|
||||
@@ -3,19 +3,16 @@
|
||||
<view class="goodWrapper" v-for="(order,orderListIndex) in orderList" :key="orderListIndex">
|
||||
<view class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === '-1'"></view>
|
||||
<view class="iconfont icon-yituikuan" v-if="order._status._type === '-2'"></view>
|
||||
<image class="iconfont" :src="webUrl+'/20230713110051999762.png'" v-if="order._status._type === '-3'"/>
|
||||
<view class="orderNum">订单号:{{ order.orderId }}</view>
|
||||
<!-- <view class="acea-row row-between row-middle orderNum" style="flex-wrap: nowrap;">
|
||||
<view class="orderNum">订单号:{{ order.orderId }}</view>
|
||||
<view class="font-color-red" style="flex-shrink: 0;font-size: 28rpx;">{{order._status._title}}</view>
|
||||
</view> -->
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
:key="cartInfoIndex"
|
||||
@click="goOrderDetails(order)"
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
:key="cartInfoIndex"
|
||||
@click="goOrderDetails(order)"
|
||||
>
|
||||
<view class="pictrue">
|
||||
<image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" />
|
||||
<image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)"/>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="acea-row row-between-wrapper">
|
||||
@@ -23,9 +20,10 @@
|
||||
<view class="num">x {{ cart.cartNum }}</view>
|
||||
</view>
|
||||
<view
|
||||
class="attr line1"
|
||||
v-if="cart.productInfo.attrInfo"
|
||||
>{{ cart.productInfo.attrInfo.sku }}</view>
|
||||
class="attr line1"
|
||||
v-if="cart.productInfo.attrInfo"
|
||||
>{{ cart.productInfo.attrInfo.sku }}
|
||||
</view>
|
||||
<view class="attr line1" v-else>{{ cart.productInfo.storeName }}</view>
|
||||
<view class="money">¥{{ cart.productInfo.price }}</view>
|
||||
</view>
|
||||
@@ -33,13 +31,14 @@
|
||||
<view class="totalSum">
|
||||
共{{ order.cartInfo.length || 0 }}件商品,总金额
|
||||
<text
|
||||
class="font-color-red price"
|
||||
>¥{{ order.payPrice }}</text>
|
||||
class="font-color-red price"
|
||||
>¥{{ order.payPrice }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="noCart" v-if="orderList.length === 0 && page > 1">
|
||||
<view class="pictrue">
|
||||
<image :src="webUrl+'/20210203155245713983.png'" />
|
||||
<image :src="webUrl+'/20210203155245713983.png'"/>
|
||||
</view>
|
||||
</view>
|
||||
<Loading :loaded="loaded" :loading="loading"></Loading>
|
||||
@@ -47,7 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrderList } from "@/api/order";
|
||||
import {getOrderList} from "@/api/order";
|
||||
import Loading from "@/components/Loading";
|
||||
|
||||
export default {
|
||||
@@ -57,7 +56,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
orderList: [],
|
||||
page: 1,
|
||||
limit: 20,
|
||||
@@ -69,17 +68,17 @@ export default {
|
||||
goGoodsCon(cart) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: cart.productInfo.id }
|
||||
query: {id: cart.productInfo.id}
|
||||
});
|
||||
},
|
||||
goOrderDetails(order) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: order.orderId }
|
||||
query: {id: order.orderId}
|
||||
});
|
||||
},
|
||||
getOrderList() {
|
||||
const { page, limit } = this;
|
||||
const {page, limit} = this;
|
||||
if (this.loading || this.loaded) return;
|
||||
this.loading = true;
|
||||
getOrderList({
|
||||
|
||||
@@ -400,11 +400,12 @@
|
||||
<!-- 商品详情开始 -->
|
||||
<view class="product-intro" style="margin-top: 24rpx">
|
||||
<!-- 原模块 -->
|
||||
<view class="conter" v-html="storeInfo.description" v-if="from!='pre' && from!='day'"></view>
|
||||
<!-- <view class="conter" v-html="storeInfo.description" ></view>-->
|
||||
<rich-text :nodes="storeInfo.description" v-if="from!='pre' && from!='day'"/>
|
||||
<!-- v4 预售详情 -->
|
||||
<view class="conter" v-html="preInfo.description" v-if="from==='pre'"></view>
|
||||
<rich-text :nodes="preInfo.description" v-if="from==='pre'"/>
|
||||
<!-- v4 每日特价详情 -->
|
||||
<view class="conter" v-html="dayInfo.description" v-if="from==='day'"></view>
|
||||
<rich-text :nodes="dayInfo.description" v-if="from==='day'"/>
|
||||
</view>
|
||||
<!-- 商品详情结束 -->
|
||||
|
||||
@@ -932,10 +933,11 @@ export default {
|
||||
});
|
||||
getProductDetail(that.id, from)
|
||||
.then(res => {
|
||||
res.data.storeInfo.description = res.data.storeInfo.description.replace(
|
||||
/\<img/gi,
|
||||
'<img style="max-width:100%;height:auto;"'
|
||||
);
|
||||
// 会造成两个style属性,并且生效的是后一个
|
||||
// res.data.storeInfo.description = res.data.storeInfo.description.replace(
|
||||
// /\<img/gi,
|
||||
// '<img style="display:block;max-width:100%;height:auto;"'
|
||||
// );
|
||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
||||
that.isWenwan = res.data.isWenwan;
|
||||
|
||||
|
||||
+103
-157
@@ -17,66 +17,43 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<view class="" style="position: relative;">
|
||||
<image style="width: 750rpx" :src="inn.cover" mode="widthFix"></image>
|
||||
<image style="width: 750rpx;position: absolute;left: 0;bottom: 0;" :src="webUrl+'/20210227115029488890.png'"
|
||||
mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
<view class="innInfoWrap">
|
||||
<view class="acea-row">
|
||||
<view class="inn-logo" style="flex-shrink: 0;margin-right: 10rpx;">
|
||||
<image :src="inn.logo" v-if="inn.logo"></image>
|
||||
<image :src="webUrl+'/20230609145651814148.png'" v-else/>
|
||||
</view>
|
||||
<view class="acea-row row-column" style="flex-grow: 1;">
|
||||
<view class="acea-row row-between row-middle" style="flex-wrap: nowrap;">
|
||||
<view class="inn-name" style="margin-right: 20rpx;flex-grow: 1;">{{ inn.name }}</view>
|
||||
<view class="acea-row row-center row-middle" style="flex-shrink: 0;">
|
||||
<view class="acea-row row-middle" v-if="inn.cityName != undefined && inn.cityName.length>0">
|
||||
<image style="width: 22rpx;height: 22rpx;margin-right: 8rpx;" :src="webUrl+'/20210807215539157727.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 24rpx;color: #fff;">{{ inn.cityName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="acea-row row-between" style="margin-top: 22rpx;">
|
||||
<view class="acea-row row-middle" style="flex-grow: 1;">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="inn-owner" style="flex-grow: 1;">{{ inn.ownerName }}/店主</view>
|
||||
|
||||
<!-- <view class="inn-tag-wrap acea-row row-left row-middle">
|
||||
<view class="zanmost-tag" v-if="inn.zanMostTag>0">点赞最多</view>
|
||||
<view class="latest-tag" v-if="inn.newTag>0">最新发布</view>
|
||||
<view class="location-tag" v-if="inn.cityName != undefined && inn.cityName.length>0">{{inn.cityName}}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view v-if="inn.qrcode.length>0" class="" @click="showQrcode" style="margin-left: 10rpx;width: 76rpx;height: 76rpx;">
|
||||
<image style="width: 100%;height: 100%;" mode="scaleToFill" :src="inn.qrcode"></image>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="guarantee" v-if="inn.guaranteeValue">保证金:{{ inn.guaranteeValue }}元</view>
|
||||
<view class="acea-row row-center row-middle" style="flex-shrink: 0;" @click="zanInn">
|
||||
<block v-if="inn.zanVo != null">
|
||||
<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" :src="webUrl+'/20210302161135069143.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 28rpx;color: #FF564A;">{{ inn.zan }}</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" :src="webUrl+'/20210807215657904755.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 28rpx;color: #333333;">{{ inn.zan }}</text>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="cover-box">
|
||||
<image class="full-img" :src="inn.cover" mode="widthFix"></image>
|
||||
<view class="box-mask flex jc-between ai-end">
|
||||
<view class="inn-name flex-0 more-t">{{ inn.name }}</view>
|
||||
<view class="city-section flex jc-end ai-center" v-if="inn.cityName != undefined && inn.cityName.length>0">
|
||||
<image style="width: 22rpx;height: 22rpx;margin-right: 8rpx;" :src="webUrl+'/20210807215539157727.png'"
|
||||
mode=""></image>
|
||||
<text class="one-t" style="font-size: 24rpx;color: #fff;">{{ inn.cityName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="innInfoWrap flex ai-end">
|
||||
<view class="inn-logo flex-0" style="">
|
||||
<image :src="inn.logo" v-if="inn.logo"></image>
|
||||
<image :src="webUrl+'/20230609145651814148.png'" v-else/>
|
||||
</view>
|
||||
|
||||
<view class="a3 flex jc-between ai-end" style="width:100%">
|
||||
<view class="inn-owner" style="flex-grow: 1;">{{ inn.ownerName }}/店主</view>
|
||||
|
||||
<view class="guarantee flex jc-center ai-center" v-if="inn.guaranteeValue">保证金:{{
|
||||
inn.guaranteeValue
|
||||
}}元
|
||||
</view>
|
||||
<view class="zan-box flex flex-0 ai-end" @click="zanInn">
|
||||
<template v-if="isLike">
|
||||
<image :src="webUrl+'/20230828095210280991.png'"/>
|
||||
<text style="font-size: 28rpx;color: #FF564A;">{{ inn.zan }}</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<image :src="webUrl+'/20230828095217616640.png'"/>
|
||||
<text style="font-size: 28rpx;color: #333333;">{{ inn.zan }}</text>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="padding: 0 32rpx;margin-top: 10rpx;">
|
||||
<view class="inn-signature">
|
||||
@@ -86,19 +63,8 @@
|
||||
|
||||
<view v-if="inn.desc != null && inn.desc.length>0" class="" style="padding: 0 32rpx;margin-top: 30rpx;">
|
||||
<view class="desc-box">
|
||||
<!-- <text class="fixed">简介:</text> -->
|
||||
<view v-html="handleRichText(inn.desc)"></view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="inn-intro">
|
||||
<text class="inn-intro-bold">简介:</text>
|
||||
<view class='conter' :class="isExpand ? 'show' : 'hide'" v-html="handleRichText(inn.desc)"></view>
|
||||
<view class="acea-row row-right row-middle" @click="doExpandDesc" style="margin-top: 10rpx;">
|
||||
<view class="">{{isExpand?"收起":"展开"}}</view>
|
||||
<image style="width: 40rpx;height: 40rpx;" v-if="isExpand" :src="webUrl+'/20210315103122759604.png'" mode=""></image>
|
||||
<image style="width: 40rpx;height: 40rpx;" v-if="!isExpand" :src="webUrl+'/20210315103104298188.png'" mode=""></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="map-wrap acea-row row-center">
|
||||
@@ -110,7 +76,8 @@
|
||||
</view>
|
||||
<view class="buttons-block acea-row row-middle">
|
||||
<!-- call 拨打电话-->
|
||||
<view class="phone-block acea-row row-middle" @click="goRoom">
|
||||
<!-- goRoom-->
|
||||
<view class="phone-block acea-row row-middle" @click="call">
|
||||
<image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/20220901223901017309.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 24rpx;color: #41454d;">联系客服</text>
|
||||
@@ -150,14 +117,9 @@
|
||||
<view v-show="activeIndex==3" class="btLine"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <block v-if="inn.qrcode.length>0">-->
|
||||
<!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="showQrcode"/>-->
|
||||
<!-- </block>-->
|
||||
<view v-if="activeIndex==0" class="pics-section" style="position: relative;">
|
||||
<!-- <view class="pics-box">-->
|
||||
<!-- <image :src="item" v-for="item in inn.pics" mode="widthFix"></image>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- 企业文化 -->
|
||||
<view v-if="activeIndex===0" class="pics-section" style="position: relative;">
|
||||
<view class="pics-list acea-row" v-if="inn.pics.length>0">
|
||||
<view :style="{width:picColumnWidth}" @click="showPic(index)" class="pics-item" v-for="(url, index) in inn.pics"
|
||||
:key="index">
|
||||
@@ -165,62 +127,43 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="activeIndex==1" class="info-section" style="position: relative;">
|
||||
<!-- <view v-if="inn.qrcode.length>0" class="" @click="showQrcode" style="position: absolute;top: 60rpx;right: 0;z-index: 20;">
|
||||
<image style="width: 116rpx;height: 116rpx;" mode="scaleToFill" :src="webUrl+'/20210809112551575811.png'"></image>
|
||||
</view> -->
|
||||
|
||||
<!-- 最新资讯 -->
|
||||
<view v-if="activeIndex===1" class="info-section" style="position: relative;">
|
||||
<view class="info-list acea-row row-column" v-if="infoArray.length>0">
|
||||
<view class="pics-item acea-row" style="flex-wrap: nowrap;" @click="infoDetail(info)"
|
||||
v-for="(info, index) in infoArray" :key="index">
|
||||
<view class="pics-item acea-row" style="flex-wrap: nowrap;" v-for="(info, index) in infoArray" :key="index">
|
||||
<view class="date-block" style="flex-shrink: 0;">
|
||||
<view class="month-day" :style="index==0?'color:#0DC5C5;':''">{{ info.monthDay }}</view>
|
||||
<view class="month-day" :style="index===0?'color:#0DC5C5;':''">{{ info.monthDay }}</view>
|
||||
<view class="year">{{ info.year }}</view>
|
||||
<view v-if="isMyInn" class="" style="margin-top: 10rpx;" @click="deleteInnInfo(info)">
|
||||
<image style="width:36rpx;height: 36rpx;" :src="webUrl+'/20210302150736618877.png'" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="separator-block acea-row row-column row-middle" style="flex-shrink: 0;">
|
||||
<view :class="['dot',index==0?'first-cell':'']" style="flex-shrink: 0;"></view>
|
||||
<view v-if="(index+1)!=infoArray.length" class="dash-line" style="flex-grow: 1;"></view>
|
||||
<view :class="['dot',index===0?'first-cell':'']" style="flex-shrink: 0;"></view>
|
||||
<view v-if="(index+1)!==infoArray.length" class="dash-line" style="flex-grow: 1;"></view>
|
||||
</view>
|
||||
<view class="info-card " style="flex-grow: 1;" @click="infoClick(info)">
|
||||
<view class="info-title line1">{{ info.name }}</view>
|
||||
<block v-if="info.type=='NT_TEXT'">
|
||||
<view class="info-card" style="flex-grow: 1;">
|
||||
<view class="info-title line1" @click="infoClick(info)">{{ info.name }}</view>
|
||||
|
||||
<template v-if="info.type==='NT_TEXT'">
|
||||
<img-box style="width: 100%;" :imgList='info.resources' :num='info.resources.length'></img-box>
|
||||
</block>
|
||||
</template>
|
||||
<view v-else style="width: 100%;margin-top: 10rpx;">
|
||||
<video style="width: 100%;height: 264rpx;" :src="info.resources[0]"></video>
|
||||
<video style="width: 100%;height: 264rpx;" :src="info.resources[0]" controls play-btn-position="center"/>
|
||||
</view>
|
||||
|
||||
<!-- <view v-if="info.type=='NT_TEXT'" class="info-pics-wrap acea-row" style="flex-wrap: nowrap;margin-top: 10rpx;position: relative;"> -->
|
||||
<!-- <block v-if="info.resources.length>2">
|
||||
<view class="acea-row" style="height: 264rpx;width: 50%;">
|
||||
<image style="width: 100%;height: 100%;border-radius: 8rpx;object-fit: cover;" :src="info.resources[0]" mode=""></image>
|
||||
</view>
|
||||
<view class="acea-row row-column" style="margin-left: 16rpx;width: 50%;;height: 264rpx;">
|
||||
<image style="height: 124rpx;width: 100%;flex: 1;border-radius: 8rpx;object-fit: cover;" :src="info.resources[1]" mode=""></image>
|
||||
<image style="margin-top: 16rpx;border-radius: 8rpx;height: 124rpx;width: 100%;flex: 1;object-fit: cover;" :src="info.resources[2]" mode=""></image>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image style="width: 100%;height: 264rpx;border-radius: 8rpx;object-fit: cover;" :src="info.resources[0]" mode=""></image>
|
||||
</block> -->
|
||||
<!-- <block v-if="info.resources != null && info.resources.length>0"> -->
|
||||
<!-- <img-box style="width: 100%;" :imgList='info.resources' :num='info.resources.length'></img-box> -->
|
||||
<!-- </block> -->
|
||||
<!-- </view> -->
|
||||
|
||||
<view class="info-media-wrap acea-row row-middle row-between" style="margin-top: 10rpx;">
|
||||
<view class="info-media-wrap acea-row row-middle row-between" style="margin-top: 10rpx;"
|
||||
@click="infoClick(info)">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="acea-row row-middle">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;"
|
||||
:src="webUrl+'/20220901224017781784.png'"
|
||||
mode=""></image>
|
||||
:src="webUrl+'/20230803152147141807.png'"/>
|
||||
<text class="seeNum-txt">{{ info.pv }}</text>
|
||||
</view>
|
||||
<view class="acea-row row-middle" style="margin-left: 20rpx;">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;"
|
||||
:src="webUrl+'/20220901224304100136.png'" mode=""></image>
|
||||
:src="webUrl+'/20230803151302213857.png'" mode=""></image>
|
||||
<text class="likeNum-txt">{{ info.zan }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -230,13 +173,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商家资质 -->
|
||||
<view style="padding: 32rpx" v-if="activeIndex==2">
|
||||
<view style="padding: 32rpx" v-if="activeIndex===2">
|
||||
<image class="store-img" :src="item.image" mode="widthFix" v-for="item in inn.qualifications"/>
|
||||
</view>
|
||||
|
||||
<!-- v4 商品列表 -->
|
||||
<view v-if="activeIndex==3" class="goods-section flex flex-wrap">
|
||||
<view v-if="activeIndex===3" class="goods-section flex flex-wrap">
|
||||
<view class="item" v-for="(item,index) in goodsList" :key="index" @click="goGoodsConByID(item)">
|
||||
<img class="cover" :src="item.image" alt="">
|
||||
<view class="">
|
||||
@@ -302,7 +246,8 @@ export default {
|
||||
showShare: false,
|
||||
posterUrl: "", // 分享海报
|
||||
id: null,
|
||||
partnerId: null
|
||||
partnerId: null,
|
||||
isLike: false //点赞
|
||||
}
|
||||
},
|
||||
//必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||
@@ -315,10 +260,6 @@ export default {
|
||||
this.loadend = false;
|
||||
},
|
||||
onLoad: function (options) {
|
||||
// test data
|
||||
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync());
|
||||
console.log("getEnterOptionsSync", uni.getEnterOptionsSync());
|
||||
|
||||
if (options.id) {
|
||||
this.id = options.id || null;
|
||||
this.partnerId = options.partnerId || null;
|
||||
@@ -360,9 +301,7 @@ export default {
|
||||
},
|
||||
// 上拉触底
|
||||
onReachBottom() {
|
||||
if (this.activeIndex == 0) {
|
||||
|
||||
} else if (this.activeIndex == 2) {
|
||||
if (this.activeIndex === 3) {
|
||||
this.goodsPage++;
|
||||
this.fetchGoods();
|
||||
} else {
|
||||
@@ -469,38 +408,19 @@ export default {
|
||||
});
|
||||
},
|
||||
zanInn: function () {
|
||||
let that = this;
|
||||
var id = this.inn.id;
|
||||
uni.showLoading();
|
||||
getHotelZan(id).then((res) => {
|
||||
uni.hideLoading();
|
||||
var msg = '操作成功!';
|
||||
if (res.msg.length > 0) {
|
||||
msg = res.msg;
|
||||
}
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
setTimeout(function () {
|
||||
//刷新界面
|
||||
that.fetchInnDetail();
|
||||
}, 1500);
|
||||
getHotelZan(this.inn.id).then(() => {
|
||||
this.isLike = !this.isLike;
|
||||
this.fetchInnDetail();
|
||||
}).catch((err) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg + '',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(() => {
|
||||
|
||||
})
|
||||
},
|
||||
infoClick: function (info) {
|
||||
return;
|
||||
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id);
|
||||
},
|
||||
publishBtnClick: function () {
|
||||
@@ -613,6 +533,7 @@ export default {
|
||||
if (this.isMyInn) {
|
||||
getHotelDetail(that.id).then((res) => {
|
||||
that.inn = res.data;
|
||||
that.isLike = res.data.zanVo !== null;
|
||||
}).catch((err) => {
|
||||
|
||||
}).finally(() => {
|
||||
@@ -621,6 +542,7 @@ export default {
|
||||
} else {
|
||||
getHomeHotelDetail(that.id).then((res) => {
|
||||
that.inn = res.data;
|
||||
that.isLike = res.data.zanVo !== null;
|
||||
}).catch((err) => {
|
||||
|
||||
}).finally(() => {
|
||||
@@ -631,13 +553,6 @@ export default {
|
||||
initPoster() {
|
||||
getPoster(this.id).then(({data}) => this.posterUrl = data);
|
||||
},
|
||||
infoDetail: function (info) {
|
||||
if (info.type == 'NT_TEXT') {
|
||||
|
||||
} else if (info.type == 'NT_VIDEO') {
|
||||
|
||||
}
|
||||
},
|
||||
showLocation: function () {
|
||||
// if (this.inn.position != null && this.inn.position.length > 0) {
|
||||
// var arr = this.inn.position.split(",");
|
||||
@@ -764,13 +679,43 @@ export default {
|
||||
<style scoped lang="less">
|
||||
@import "@/assets/css/store.less";
|
||||
|
||||
.cover-box {
|
||||
position: relative;
|
||||
.full-img {
|
||||
width: 750rpx;
|
||||
}
|
||||
.box-mask{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 596rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20rpx 12rpx;
|
||||
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000000 100%);
|
||||
|
||||
.city-section{
|
||||
width: 256rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.guarantee {
|
||||
margin-right: 16rpx;
|
||||
padding: 7rpx 16rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #0DC5C5;
|
||||
color: #fff;
|
||||
font-size: 22rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.zan-box {
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.store-img {
|
||||
@@ -852,15 +797,18 @@ export default {
|
||||
}
|
||||
|
||||
.innInfoWrap {
|
||||
padding: 0 18*2rpx;
|
||||
margin-top: -66rpx;
|
||||
position: relative;
|
||||
margin-top: -66rpx;
|
||||
padding: 0 18*2rpx;
|
||||
line-height: 1;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.inn-logo {
|
||||
flex-shrink: 0;
|
||||
width: 56*2rpx;
|
||||
height: 56*2rpx;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
|
||||
.inn-logo image {
|
||||
@@ -870,21 +818,19 @@ export default {
|
||||
}
|
||||
|
||||
.inn-name {
|
||||
width: 280rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 56rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.inn-owner {
|
||||
font-size: 24rpx;
|
||||
color: #8B8F99;
|
||||
// margin-top: 22rpx;
|
||||
}
|
||||
|
||||
|
||||
.inn-tag-wrap {
|
||||
margin-top: 10rpx;
|
||||
// margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.zanmost-tag {
|
||||
|
||||
+111
-372
@@ -1,387 +1,126 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<hx-navbar
|
||||
title=" "
|
||||
:fixed="true"
|
||||
statusBarFontColor="#ffffff"
|
||||
barPlaceholder="hidden"
|
||||
transparent="auto"
|
||||
color="#FFFFFF"
|
||||
:background-color="[[254,150,107],[255, 88, 75]]"
|
||||
:pageScroll.sync="scrollData"/>
|
||||
<!-- <block slot="right">
|
||||
<view class="">
|
||||
<text class="iconfont icon-fenxiang" style="font-size: 48rpx;"></text>
|
||||
<view class="" @click="like">
|
||||
<image v-if="innInfo.isLike==0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161110012686.png'" mode=""></image>
|
||||
<image v-if="innInfo.isLike>0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</block> -->
|
||||
</hx-navbar>
|
||||
<view class="pages-inn-info-detail">
|
||||
<view class="top-box">
|
||||
<view class="title more-t">{{ info.name }}</view>
|
||||
|
||||
<block v-if="innInfo">
|
||||
<view v-if="innInfo.type=='NT_TEXT'" class="banner">
|
||||
<swiper :current="swiperCurrentIndex" indicatorDots="true" indicator-active-color='rgba(255, 255, 255, 1)' indicator-color='rgba(255, 255, 255, 0.3)' v-if="innInfo.resources.length > 0" autoplay circular>
|
||||
<block v-for="(imgUrl, index) in innInfo.resources" :key="index">
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<image class="swiper-item-content" :src="imgUrl" style="object-fit: cover;" mode="aspectFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class="sub flex jc-between ai-center">
|
||||
<text class="datetime">{{ info.createdTime }}</text>
|
||||
<view class="flex ai-center">
|
||||
<view class="flex ai-center" style="margin-right: 28rpx">
|
||||
<image :src="webUrl+'/20230803152147141807.png'"/>
|
||||
<view class="num">{{ info.pv }}</view>
|
||||
</view>
|
||||
<view class="flex ai-center" @click="likeInfo">
|
||||
<image :src="webUrl+'/20230803151308999742.png'" v-if="info.zanVo != null"/>
|
||||
<image :src="webUrl+'/20230803151302213857.png'" v-else/>
|
||||
<view class="num">{{ info.zan }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="share-section" style="position: absolute;left: 0;right: 0;">
|
||||
<view class="acea-row row-middle row-right pad20" style="flex-shrink: 0;">
|
||||
<view class="" style="margin-right: 20rpx;"><image @click="shareInfo" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210304153545482917.png'" mode=""></image></view>
|
||||
|
||||
<view class="" @click="likeInfo">
|
||||
<image v-if="innInfo.isLike == null || parseInt(innInfo.isLike)==0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161110012686.png'" mode=""></image>
|
||||
<image v-if="innInfo.isLike != null && parseInt(innInfo.isLike)==1" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="cover">
|
||||
|
||||
</view>
|
||||
<view class="title-section acea-row row-middle">
|
||||
<view class="" style="font-size: 32rpx;color: #ffffff;flex-grow: 1;">{{innInfo.name}}</view>
|
||||
<!-- <view class="acea-row row-column pad20" style="flex-shrink: 0;">
|
||||
<image @click="shareInfo" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210304153545482917.png'" mode=""></image>
|
||||
|
||||
<view class="" @click="likeInfo">
|
||||
<image v-if="innInfo.isLike == null || parseInt(innInfo.isLike)==0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161110012686.png'" mode=""></image>
|
||||
<image v-else style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <image style="width: 750rpx;position: absolute;left: 0;bottom: 0;" :src="webUrl+'/20210227115029488890.png'" mode="widthFix"></image> -->
|
||||
</view>
|
||||
|
||||
<view v-if="innInfo.type=='NT_VIDEO'" class="banner">
|
||||
<block v-if="innInfo.resources.length > 0">
|
||||
<video style="width: 100%;height: 100%;" autoplay :src="innInfo.resources[0]"></video>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="hotel-section acea-row row-center">
|
||||
<view class="hotel-logo">
|
||||
<image :src="innInfo.hotelLogo" mode=""></image>
|
||||
</view>
|
||||
<view class="acea-row row-column" style="flex-grow: 1;">
|
||||
<view class="hotel-name">{{innInfo.hotelName}}</view>
|
||||
<view class="hotel-date">{{formattedDateStr(innInfo.createdTime)}}</view>
|
||||
</view>
|
||||
|
||||
<view class="enrollInnBtn acea-row row-center row-middle" @click="enrollInn">进入主页</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-section" v-html="innInfo.content">
|
||||
<!-- {{innInfo.content}} -->
|
||||
</view>
|
||||
|
||||
<view class="bottom-holder acea-row row-middle row-right savebottom">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="acea-row row-middle">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;" :src="webUrl+'/20220901224017781784.png'" mode=""></image>
|
||||
<text class="seeNum-txt">{{innInfo.pv}}</text>
|
||||
</view>
|
||||
<view class="acea-row row-middle" style="margin-left: 20rpx;" @click="likeInfo">
|
||||
<block v-if="innInfo.zanVo != null">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;" :src="webUrl+'/20220901224304100136.png'" mode=""></image>
|
||||
</block>
|
||||
<text class="likeNum-txt">{{innInfo.zan}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
||||
</view>
|
||||
<view class="video-box" v-if="info.type==='NT_VIDEO'">
|
||||
<video style="width: 100%;height: 320rpx;" :src="info.resources[0]" controls play-btn-position="center"/>
|
||||
</view>
|
||||
|
||||
<view class="content-box">
|
||||
<rich-text :nodes="info.content"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHotelNewsDetail,getHotelNewsZan} from "@/api/inn.js";
|
||||
import { formatDateTime,isNullOrEmpty} from "@/utils";
|
||||
import ShareInfo from "@/components/ShareInfo";
|
||||
var that;
|
||||
export default {
|
||||
components:{
|
||||
ShareInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
scrollData: {},
|
||||
shareInfoStatus: false,
|
||||
innInfo:null,
|
||||
swiperHeight:300,
|
||||
swiperCurrentIndex:0,
|
||||
// innInfo:{
|
||||
// isLike:0,
|
||||
// type:'NT_TEXT',
|
||||
// resources:[
|
||||
// 'http://resource.xdd618.com/黄精.jpg',
|
||||
// 'http://resource.xdd618.com/黄精.jpg',
|
||||
// ]
|
||||
// },
|
||||
innId:0
|
||||
}
|
||||
},
|
||||
//必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||
onPageScroll(e){
|
||||
this.scrollData = e;
|
||||
},
|
||||
onLoad:function(e){
|
||||
that = this;
|
||||
this.innId = e.id;
|
||||
import {getHotelNewsDetail, getHotelNewsZan} from "@/api/inn";
|
||||
|
||||
this.fetchInnInfoDetail();
|
||||
},
|
||||
methods: {
|
||||
// changeSwiper:function(e){
|
||||
// this.swiperCurrentIndex = e.detail.current;
|
||||
// this.getCurrentSwiperHeight('.swiper-item-content');
|
||||
// },
|
||||
// getCurrentSwiperHeight(element) {
|
||||
// let query = uni.createSelectorQuery().in(this);
|
||||
// query.selectAll(element).boundingClientRect();
|
||||
// query.exec((res) => {
|
||||
// that.swiperHeight = res[0][this.swiperCurrentIndex].height;
|
||||
// console.log("swiperHeight:"+that.swiperHeight);
|
||||
// })
|
||||
// },
|
||||
setShareInfoStatus: function() {
|
||||
this.shareInfoStatus = !this.shareInfoStatus;
|
||||
},
|
||||
shareInfo:function(){
|
||||
this.setShareInfoStatus();
|
||||
},
|
||||
likeInfo:function(){
|
||||
var id = this.innId;
|
||||
uni.showLoading();
|
||||
getHotelNewsZan(id).then((res)=>{
|
||||
uni.hideLoading();
|
||||
var msg = '操作成功!';
|
||||
if(res.msg.length>0){
|
||||
msg = res.msg;
|
||||
}
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
setTimeout(function(){
|
||||
//刷新界面
|
||||
that.fetchInnInfoDetail();
|
||||
},1500);
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
id: null,
|
||||
info: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id;
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
getHotelNewsDetail(this.id).then(({data}) => this.info = data);
|
||||
},
|
||||
|
||||
}).catch((err)=>{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg+'',
|
||||
icon:'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(()=>{
|
||||
likeInfo() {
|
||||
let that = this;
|
||||
uni.showLoading();
|
||||
getHotelNewsZan(this.id).then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
})
|
||||
},
|
||||
enrollInn:function(){
|
||||
//this.$yrouter.redirectTo('');
|
||||
var id = this.innInfo.hotelId;
|
||||
var pages = getCurrentPages();
|
||||
if (pages.length>1) {
|
||||
var prePage = pages[pages.length - 2];
|
||||
//判断上一页是不是客栈主页
|
||||
if(prePage.route == 'pagesInn/inn/innHome'){
|
||||
this.$yrouter.back();
|
||||
}else{
|
||||
this.$yrouter.replace({
|
||||
path: "/pagesInn/inn/innHome",
|
||||
query: { id: id }
|
||||
});
|
||||
}
|
||||
}else{
|
||||
this.$yrouter.replace({
|
||||
path: "/pagesInn/inn/innHome",
|
||||
query: { id: id }
|
||||
});
|
||||
}
|
||||
},
|
||||
formattedDateStr:function(str){
|
||||
return formatDateTime(str,'yyyy/MM/dd HH:mm:ss');
|
||||
},
|
||||
fetchInnInfoDetail:function(){
|
||||
|
||||
getHotelNewsDetail(this.innId).then((res)=>{
|
||||
that.innInfo = res.data;
|
||||
}).catch((err)=>{
|
||||
|
||||
uni.showToast({
|
||||
title: err.msg+'',
|
||||
icon:'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
},
|
||||
like:function(){
|
||||
uni.showLoading();
|
||||
getHotelNewsZan(this.innId).then((res)=>{
|
||||
uni.hideLoading();
|
||||
//刷新界面
|
||||
that.fetchInnDetail();
|
||||
|
||||
}).catch((err)=>{
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: err+'',
|
||||
icon:'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
mask: false,
|
||||
duration: 1500,
|
||||
success() {
|
||||
if (res.status === 200) that.info = res.data;
|
||||
}
|
||||
})
|
||||
}).catch((err) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg + '',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container{
|
||||
position: relative;
|
||||
background: #ffffff;
|
||||
}
|
||||
.cover{
|
||||
width: 100%;
|
||||
height: 218rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
||||
opacity: 0.6;
|
||||
// background-color:transparent;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.title-section{
|
||||
padding: 32rpx;
|
||||
// width: 100%;
|
||||
// height: 218rpx;
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
<style lang="less">
|
||||
.pages-inn-info-detail {
|
||||
.top-box {
|
||||
padding: 40rpx 32rpx 20rpx;
|
||||
box-shadow: 0 6rpx 12rpx rgba(0, 0, 0, 0.16);
|
||||
|
||||
.banner {
|
||||
height: 750rpx;
|
||||
-webkit-transform:rotate(0);
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.title {
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
line-height: 64rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.sub {
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
color: #333333;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 4rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.datetime {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.num {
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.video-box {
|
||||
box-sizing: border-box;
|
||||
padding: 40rpx 32rpx 0;
|
||||
}
|
||||
|
||||
.content-box {
|
||||
padding: 40rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.banner swiper{
|
||||
// height: 600rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.banner .swiper-item{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.banner image{
|
||||
width: 100%;
|
||||
// height: 600rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.hotel-section{
|
||||
padding: 32rpx;
|
||||
}
|
||||
|
||||
.hotel-logo{
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.hotel-logo image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.hotel-name{
|
||||
font-size: 28rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
.hotel-date{
|
||||
font-size: 22rpx;
|
||||
color: #C2C5CC;
|
||||
}
|
||||
|
||||
.enrollInnBtn{
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
width: 122rpx;
|
||||
height: 48rpx;
|
||||
background: #0DC5C5;
|
||||
opacity: 1;
|
||||
border-radius: 8rpx;
|
||||
font-size: 22rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.likeNum-txt{
|
||||
font-size: 22rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
.seeNum-txt{
|
||||
font-size: 22rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
|
||||
.detail-section{
|
||||
padding: 32rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #080F1A;
|
||||
margin-bottom: 114rpx;
|
||||
}
|
||||
|
||||
.bottom-holder{
|
||||
position: fixed;
|
||||
background-color: transparent;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 114rpx;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.share-section{
|
||||
top: var(--status-bar-height);
|
||||
padding-top: 44px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,387 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<hx-navbar
|
||||
title=" "
|
||||
:fixed="true"
|
||||
statusBarFontColor="#ffffff"
|
||||
barPlaceholder="hidden"
|
||||
transparent="auto"
|
||||
color="#FFFFFF"
|
||||
:background-color="[[254,150,107],[255, 88, 75]]"
|
||||
:pageScroll.sync="scrollData"/>
|
||||
<!-- <block slot="right">
|
||||
<view class="">
|
||||
<text class="iconfont icon-fenxiang" style="font-size: 48rpx;"></text>
|
||||
<view class="" @click="like">
|
||||
<image v-if="innInfo.isLike==0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161110012686.png'" mode=""></image>
|
||||
<image v-if="innInfo.isLike>0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</block> -->
|
||||
</hx-navbar>
|
||||
|
||||
<block v-if="innInfo">
|
||||
<view v-if="innInfo.type=='NT_TEXT'" class="banner">
|
||||
<swiper :current="swiperCurrentIndex" indicatorDots="true" indicator-active-color='rgba(255, 255, 255, 1)' indicator-color='rgba(255, 255, 255, 0.3)' v-if="innInfo.resources.length > 0" autoplay circular>
|
||||
<block v-for="(imgUrl, index) in innInfo.resources" :key="index">
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<image class="swiper-item-content" :src="imgUrl" style="object-fit: cover;" mode="aspectFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
<!-- <view class="share-section" style="position: absolute;left: 0;right: 0;">
|
||||
<view class="acea-row row-middle row-right pad20" style="flex-shrink: 0;">
|
||||
<view class="" style="margin-right: 20rpx;"><image @click="shareInfo" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210304153545482917.png'" mode=""></image></view>
|
||||
|
||||
<view class="" @click="likeInfo">
|
||||
<image v-if="innInfo.isLike == null || parseInt(innInfo.isLike)==0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161110012686.png'" mode=""></image>
|
||||
<image v-if="innInfo.isLike != null && parseInt(innInfo.isLike)==1" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="cover">
|
||||
|
||||
</view>
|
||||
<view class="title-section acea-row row-middle">
|
||||
<view class="" style="font-size: 32rpx;color: #ffffff;flex-grow: 1;">{{innInfo.name}}</view>
|
||||
<!-- <view class="acea-row row-column pad20" style="flex-shrink: 0;">
|
||||
<image @click="shareInfo" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210304153545482917.png'" mode=""></image>
|
||||
|
||||
<view class="" @click="likeInfo">
|
||||
<image v-if="innInfo.isLike == null || parseInt(innInfo.isLike)==0" style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161110012686.png'" mode=""></image>
|
||||
<image v-else style="width: 48rpx;height: 48rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <image style="width: 750rpx;position: absolute;left: 0;bottom: 0;" :src="webUrl+'/20210227115029488890.png'" mode="widthFix"></image> -->
|
||||
</view>
|
||||
|
||||
<view v-if="innInfo.type=='NT_VIDEO'" class="banner">
|
||||
<block v-if="innInfo.resources.length > 0">
|
||||
<video style="width: 100%;height: 100%;" autoplay :src="innInfo.resources[0]"></video>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="hotel-section acea-row row-center">
|
||||
<view class="hotel-logo">
|
||||
<image :src="innInfo.hotelLogo" mode=""></image>
|
||||
</view>
|
||||
<view class="acea-row row-column" style="flex-grow: 1;">
|
||||
<view class="hotel-name">{{innInfo.hotelName}}</view>
|
||||
<view class="hotel-date">{{formattedDateStr(innInfo.createdTime)}}</view>
|
||||
</view>
|
||||
|
||||
<view class="enrollInnBtn acea-row row-center row-middle" @click="enrollInn">进入主页</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-section" v-html="innInfo.content">
|
||||
<!-- {{innInfo.content}} -->
|
||||
</view>
|
||||
|
||||
<view class="bottom-holder acea-row row-middle row-right savebottom">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="acea-row row-middle">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;" :src="webUrl+'/20220901224017781784.png'" mode=""></image>
|
||||
<text class="seeNum-txt">{{innInfo.pv}}</text>
|
||||
</view>
|
||||
<view class="acea-row row-middle" style="margin-left: 20rpx;" @click="likeInfo">
|
||||
<block v-if="innInfo.zanVo != null">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;" :src="webUrl+'/20210302161135069143.png'" mode=""></image>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;" :src="webUrl+'/20220901224304100136.png'" mode=""></image>
|
||||
</block>
|
||||
<text class="likeNum-txt">{{innInfo.zan}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHotelNewsDetail,getHotelNewsZan} from "@/api/inn.js";
|
||||
import { formatDateTime,isNullOrEmpty} from "@/utils";
|
||||
import ShareInfo from "@/components/ShareInfo";
|
||||
var that;
|
||||
export default {
|
||||
components:{
|
||||
ShareInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl:this.$VUE_APP_RESOURCES_URL,
|
||||
scrollData: {},
|
||||
shareInfoStatus: false,
|
||||
innInfo:null,
|
||||
swiperHeight:300,
|
||||
swiperCurrentIndex:0,
|
||||
// innInfo:{
|
||||
// isLike:0,
|
||||
// type:'NT_TEXT',
|
||||
// resources:[
|
||||
// 'http://resource.xdd618.com/黄精.jpg',
|
||||
// 'http://resource.xdd618.com/黄精.jpg',
|
||||
// ]
|
||||
// },
|
||||
innId:0
|
||||
}
|
||||
},
|
||||
//必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||
onPageScroll(e){
|
||||
this.scrollData = e;
|
||||
},
|
||||
onLoad:function(e){
|
||||
that = this;
|
||||
this.innId = e.id;
|
||||
|
||||
this.fetchInnInfoDetail();
|
||||
},
|
||||
methods: {
|
||||
// changeSwiper:function(e){
|
||||
// this.swiperCurrentIndex = e.detail.current;
|
||||
// this.getCurrentSwiperHeight('.swiper-item-content');
|
||||
// },
|
||||
// getCurrentSwiperHeight(element) {
|
||||
// let query = uni.createSelectorQuery().in(this);
|
||||
// query.selectAll(element).boundingClientRect();
|
||||
// query.exec((res) => {
|
||||
// that.swiperHeight = res[0][this.swiperCurrentIndex].height;
|
||||
// console.log("swiperHeight:"+that.swiperHeight);
|
||||
// })
|
||||
// },
|
||||
setShareInfoStatus: function() {
|
||||
this.shareInfoStatus = !this.shareInfoStatus;
|
||||
},
|
||||
shareInfo:function(){
|
||||
this.setShareInfoStatus();
|
||||
},
|
||||
likeInfo:function(){
|
||||
var id = this.innId;
|
||||
uni.showLoading();
|
||||
getHotelNewsZan(id).then((res)=>{
|
||||
uni.hideLoading();
|
||||
var msg = '操作成功!';
|
||||
if(res.msg.length>0){
|
||||
msg = res.msg;
|
||||
}
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
setTimeout(function(){
|
||||
//刷新界面
|
||||
that.fetchInnInfoDetail();
|
||||
},1500);
|
||||
|
||||
}).catch((err)=>{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg+'',
|
||||
icon:'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
},
|
||||
enrollInn:function(){
|
||||
//this.$yrouter.redirectTo('');
|
||||
var id = this.innInfo.hotelId;
|
||||
var pages = getCurrentPages();
|
||||
if (pages.length>1) {
|
||||
var prePage = pages[pages.length - 2];
|
||||
//判断上一页是不是客栈主页
|
||||
if(prePage.route == 'pagesInn/inn/innHome'){
|
||||
this.$yrouter.back();
|
||||
}else{
|
||||
this.$yrouter.replace({
|
||||
path: "/pagesInn/inn/innHome",
|
||||
query: { id: id }
|
||||
});
|
||||
}
|
||||
}else{
|
||||
this.$yrouter.replace({
|
||||
path: "/pagesInn/inn/innHome",
|
||||
query: { id: id }
|
||||
});
|
||||
}
|
||||
},
|
||||
formattedDateStr:function(str){
|
||||
return formatDateTime(str,'yyyy/MM/dd HH:mm:ss');
|
||||
},
|
||||
fetchInnInfoDetail:function(){
|
||||
|
||||
getHotelNewsDetail(this.innId).then((res)=>{
|
||||
that.innInfo = res.data;
|
||||
}).catch((err)=>{
|
||||
|
||||
uni.showToast({
|
||||
title: err.msg+'',
|
||||
icon:'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
},
|
||||
like:function(){
|
||||
uni.showLoading();
|
||||
getHotelNewsZan(this.innId).then((res)=>{
|
||||
uni.hideLoading();
|
||||
//刷新界面
|
||||
that.fetchInnDetail();
|
||||
|
||||
}).catch((err)=>{
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: err+'',
|
||||
icon:'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container{
|
||||
position: relative;
|
||||
background: #ffffff;
|
||||
}
|
||||
.cover{
|
||||
width: 100%;
|
||||
height: 218rpx;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 100%);
|
||||
opacity: 0.6;
|
||||
// background-color:transparent;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.title-section{
|
||||
padding: 32rpx;
|
||||
// width: 100%;
|
||||
// height: 218rpx;
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.banner {
|
||||
height: 750rpx;
|
||||
-webkit-transform:rotate(0);
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.banner swiper{
|
||||
// height: 600rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.banner .swiper-item{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.banner image{
|
||||
width: 100%;
|
||||
// height: 600rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.hotel-section{
|
||||
padding: 32rpx;
|
||||
}
|
||||
|
||||
.hotel-logo{
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.hotel-logo image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.hotel-name{
|
||||
font-size: 28rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
.hotel-date{
|
||||
font-size: 22rpx;
|
||||
color: #C2C5CC;
|
||||
}
|
||||
|
||||
.enrollInnBtn{
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
width: 122rpx;
|
||||
height: 48rpx;
|
||||
background: #0DC5C5;
|
||||
opacity: 1;
|
||||
border-radius: 8rpx;
|
||||
font-size: 22rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.likeNum-txt{
|
||||
font-size: 22rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
.seeNum-txt{
|
||||
font-size: 22rpx;
|
||||
color: #080F1A;
|
||||
}
|
||||
|
||||
|
||||
.detail-section{
|
||||
padding: 32rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #080F1A;
|
||||
margin-bottom: 114rpx;
|
||||
}
|
||||
|
||||
.bottom-holder{
|
||||
position: fixed;
|
||||
background-color: transparent;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 114rpx;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.share-section{
|
||||
top: var(--status-bar-height);
|
||||
padding-top: 44px;
|
||||
}
|
||||
|
||||
</style>
|
||||
+44
-77
@@ -2,28 +2,22 @@
|
||||
<view class="pkg-join-index">
|
||||
<image class="img-banner" :src="images.topImage" mode="scaleToFill"/>
|
||||
|
||||
<view class="box flex flex-col ai-center">
|
||||
<image class="img-title" :src="webUrl+'/20230413103123003753.png'" mode="scaleToFill"/>
|
||||
<!-- <view class="content flex ai-center">-->
|
||||
<!-- <image class="img-fire" :src="webUrl+'/20230413103130660107.png'" mode="scaleToFill"/>-->
|
||||
<!-- <view class="txt flex ai-center">目前已有-->
|
||||
<!-- <text>{{ count }}</text>-->
|
||||
<!-- 人参加活动-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<!-- <view class="box flex flex-col ai-center">-->
|
||||
<!-- <image class="img-title" :src="webUrl+'/20230413103123003753.png'" mode="scaleToFill"/>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<image class="img-item" :src="images.goodSupplierImage"
|
||||
<image class="img-item" mode="widthFix" :src="images.goodSupplierImage"
|
||||
@click="goto('goods_supplier')" v-show="partnerType==='province_partner'||partnerType===''"/>
|
||||
<image class="img-item" :src="images.wenwanSupplierImage"
|
||||
<image class="img-item" mode="widthFix" :src="images.wenwanSupplierImage"
|
||||
@click="goto('wenwan_supplier')" v-show="partnerType==='pioneer'||partnerType===''"/>
|
||||
<image class="img-item" :src="images.hotelImage"
|
||||
<image class="img-item" mode="widthFix" :src="images.hotelImage"
|
||||
@click="goto('shop')" v-show="partnerType==='pioneer'||partnerType===''"/>
|
||||
<image class="img-item" mode="widthFix" :src="images.wholesalerImage" @click="goto('wholesaler')"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCount, getImages, getShopData} from "@/api/join";
|
||||
import {getImages, getShopData} from "@/api/join";
|
||||
|
||||
export default {
|
||||
name: "pkgJoinIndex",
|
||||
@@ -32,55 +26,72 @@ export default {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
partnerId: "",
|
||||
partnerType: "",
|
||||
count: 0,
|
||||
hotelId: null,
|
||||
hasHotel: null,
|
||||
hasSupplier: null,
|
||||
hasWholesaler: null,
|
||||
images: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.partnerId = options.partnerId || "";
|
||||
getCount().then(({data}) => this.count = data.count);
|
||||
getImages().then(({data}) => this.images = data);
|
||||
getShopData(this.partnerId).then(({data}) => {
|
||||
this.partnerType = data.partnerType;
|
||||
this.hotelId = data.hotelId;
|
||||
this.hasHotel = data.hasHotel;
|
||||
this.hasSupplier = data.hasSupplier;
|
||||
this.hasWholesaler = data.hasWholesaler;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
goto(target) {
|
||||
|
||||
switch (target) {
|
||||
case "goods_supplier":
|
||||
if (this.hasSupplier === 1) {
|
||||
uni.showToast({
|
||||
title: "您已成为供应商/员工,无需重复申请",
|
||||
icon: "none"
|
||||
})
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为供应商/员工,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/supplier?type=goods_supplier&partnerId=${this.partnerId}`)
|
||||
}
|
||||
break;
|
||||
case "wenwan_supplier":
|
||||
if (this.hasSupplier === 1) {
|
||||
uni.showToast({
|
||||
title: "您已成为供应商/员工,无需重复申请",
|
||||
icon: "none"
|
||||
})
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为供应商/员工,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/supplier?type=wenwan_supplier&partnerId=${this.partnerId}`)
|
||||
}
|
||||
break;
|
||||
case "shop":
|
||||
if (this.hasHotel === 1) {
|
||||
uni.showToast({
|
||||
title: "您已开通店铺,无需重复申请",
|
||||
icon: "none"
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: "您已开通店铺,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
this.$yrouter.push("/pagesInn/inn/innHome?id="+this.hotelId)
|
||||
} else {
|
||||
this.$yrouter.push('/pkg_join/views/shop?partnerId=' + this.partnerId)
|
||||
}
|
||||
break;
|
||||
case "wholesaler":
|
||||
if (this.hasWholesaler === 1) {
|
||||
this.$global.goSupplierMini();
|
||||
// uni.showToast({
|
||||
// title: "您已成为采购批发商,无需重复申请",
|
||||
// icon: "none"
|
||||
// })
|
||||
} else {
|
||||
this.$yrouter.push(`/pkg_join/views/wholesaler`)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,6 +100,8 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
.pkg-join-index {
|
||||
padding-bottom: 46rpx;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -98,57 +111,11 @@ export default {
|
||||
height: 378rpx;
|
||||
}
|
||||
|
||||
.img-title {
|
||||
width: 556rpx;
|
||||
height: 104rpx;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.img-fire {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.img-item {
|
||||
width: 682rpx;
|
||||
height: 320rpx;
|
||||
margin: 0 34rpx 46rpx;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 682rpx;
|
||||
//height: 240rpx;
|
||||
margin: 24rpx auto 30rpx;
|
||||
border-radius: 40rpx;
|
||||
background: rgba(255, 0, 85, 0.02);
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 516rpx;
|
||||
height: 64rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 28rpx;
|
||||
border-radius: 36rpx;
|
||||
background: rgba(255, 86, 74, 0.08);
|
||||
}
|
||||
|
||||
.txt {
|
||||
color: #FF564A;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 40rpx;
|
||||
margin: 0 8rpx;
|
||||
padding: 0 18rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #FF0055;
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
height: auto;
|
||||
margin: 40rpx 34rpx 0;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+151
-8
@@ -25,7 +25,7 @@
|
||||
</u-cell>
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('shop')">
|
||||
<view class="box-upload" @click="chooseLogoImg('cover')">
|
||||
<view class="btn-upload" v-if="form.cover.length===0 || form.cover==null">上传图片</view>
|
||||
<image class="img-preview" :src="form.cover" v-else/>
|
||||
</view>
|
||||
@@ -48,6 +48,44 @@
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="logo">
|
||||
<u-cell title="店铺logo" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
</u-cell>
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('logo')">
|
||||
<view class="btn-upload" v-if="form.logo.length===0 || form.logo==null">上传图片</view>
|
||||
<image class="img-preview" :src="form.logo" v-else/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<view class="full-title">
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view>
|
||||
<text class="required" style="margin-right: 10rpx">*</text>
|
||||
商家资质
|
||||
<text class="font-color-red">(请上传营业执照及行业相关资质证明)</text>
|
||||
</view>
|
||||
</template>
|
||||
<template #label>
|
||||
<u-upload
|
||||
:fileList="quaPics"
|
||||
@afterRead="quaAfterRead"
|
||||
@delete="quaDeletePic"
|
||||
name="quaPics"
|
||||
multiple
|
||||
:maxCount="9"
|
||||
></u-upload>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
|
||||
<u-form-item prop="typeText">
|
||||
<u-cell title="店铺类型" :border="false" isLink @click="showType=true">
|
||||
<template #icon>
|
||||
@@ -85,6 +123,32 @@
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="captcha">
|
||||
<u-cell title="验证码" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="form.captcha" border="none" placeholder="请填写验证码">
|
||||
<template slot="suffix">
|
||||
<u-code
|
||||
ref="uCode"
|
||||
@change="codeChange"
|
||||
seconds="30"
|
||||
changeText="X秒重新获取"
|
||||
></u-code>
|
||||
<u-button
|
||||
@tap="getCode"
|
||||
:text="tips"
|
||||
type="success"
|
||||
size="normal"
|
||||
></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="area">
|
||||
<u-cell title="省市区" :border="false" isLink>
|
||||
<template #icon>
|
||||
@@ -179,7 +243,7 @@
|
||||
<script>
|
||||
import CitySelect from "@/components/CitySelect";
|
||||
import {getShopData, getShopInfo, removeApply, saveShop} from "@/api/join";
|
||||
import {getCity} from "@/api/user";
|
||||
import {getCity, registerVerify} from "@/api/user";
|
||||
import {chooseImage, moreImage, uploadImage} from "@/utils";
|
||||
|
||||
export default {
|
||||
@@ -192,12 +256,17 @@ export default {
|
||||
partnerId: null,
|
||||
|
||||
pics: [],
|
||||
quaPics: [],
|
||||
tips: "",
|
||||
form: {
|
||||
name: "",
|
||||
cover: "",
|
||||
logo: "",
|
||||
qualification: "",
|
||||
type: 0,
|
||||
typeText: "",
|
||||
phone: "",
|
||||
captcha: "",
|
||||
area: "",
|
||||
address: "",
|
||||
position: "",
|
||||
@@ -216,6 +285,12 @@ export default {
|
||||
message: '请上传店铺封面图',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'logo': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请上传店铺LOGO',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'typeText': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
@@ -234,6 +309,12 @@ export default {
|
||||
message: '请填写联系方式',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'captcha': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写验证码',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'area': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
@@ -281,12 +362,36 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.partnerId = options.partnerId;
|
||||
this.init();
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.shopForm.setRules(this.rules);
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.form.phone.length === 0) return;
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
registerVerify({phone: this.form.phone, type: "merchantApply"}).then(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast(err.msg);
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
|
||||
init() {
|
||||
getCity().then(({data}) => {
|
||||
this.district = data;
|
||||
@@ -342,9 +447,9 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
chooseLogoImg() {
|
||||
chooseLogoImg(target) {
|
||||
chooseImage(img => {
|
||||
this.form.cover = img;
|
||||
this.form[target] = img;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -376,6 +481,21 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 删除图片
|
||||
quaDeletePic(event) {
|
||||
this[`${event.name}`].splice(event.index, 1)
|
||||
},
|
||||
|
||||
quaAfterRead(event) {
|
||||
let that = this;
|
||||
if (event.file.length > 0) {
|
||||
event.file.map(item => {
|
||||
uploadImage(item.url, img => {
|
||||
that.quaPics.push({url: img})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 回调参数为包含column indexs、value、values
|
||||
confirmType(e) {
|
||||
@@ -420,6 +540,13 @@ export default {
|
||||
|
||||
onSubmit() {
|
||||
if (this.reviewStatus === 0) return;
|
||||
if (this.quaPics.length === 0) {
|
||||
uni.showToast({
|
||||
title: "请上传营业执照",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.$refs.shopForm.validate().then(res => {
|
||||
// 校验通过
|
||||
this.show = true;
|
||||
@@ -434,11 +561,11 @@ export default {
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 3000,
|
||||
success:()=> {
|
||||
success: () => {
|
||||
this.showRemove = false;
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
},3000)
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -455,6 +582,12 @@ export default {
|
||||
})
|
||||
this.form.pics = this.form.pics.substring(0, this.form.pics.length - 1);
|
||||
|
||||
this.form.qualification = "";
|
||||
this.quaPics.map(item => {
|
||||
this.form.qualification += (item.url + ",");
|
||||
})
|
||||
this.form.qualification = this.form.qualification.substring(0, this.form.qualification.length - 1);
|
||||
|
||||
saveShop(this.form, this.partnerId).then(res => {
|
||||
if (res.status === 200) {
|
||||
uni.showToast({
|
||||
@@ -494,4 +627,14 @@ export default {
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .full-title {
|
||||
.u-cell__title {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.font-color-red {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
</style>
|
||||
+163
-24
@@ -51,26 +51,75 @@
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="qualification">
|
||||
<view class="licence-section">
|
||||
<u-cell title="营业执照" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
<view class="licence-image">
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('licence')">
|
||||
<view class="btn-upload" v-if="formSupplier.qualification.length===0">上传图片</view>
|
||||
<image class="img-preview" :src="formSupplier.qualification" v-else/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
<u-form-item prop="captcha">
|
||||
<u-cell title="验证码" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="formSupplier.captcha" border="none" placeholder="请填写验证码">
|
||||
<template slot="suffix">
|
||||
<u-code
|
||||
ref="uCode"
|
||||
@change="codeChange"
|
||||
seconds="30"
|
||||
changeText="X秒重新获取"
|
||||
></u-code>
|
||||
<u-button
|
||||
@tap="getCode"
|
||||
:text="tips"
|
||||
type="success"
|
||||
size="normal"
|
||||
></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<!-- <u-form-item prop="qualification">-->
|
||||
<!-- <view class="licence-section">-->
|
||||
<!-- <u-cell title="营业执照" :border="false">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <text class="required">*</text>-->
|
||||
<!-- </template>-->
|
||||
<!-- </u-cell>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="licence-image">-->
|
||||
<!-- <u-cell :border="false">-->
|
||||
<!-- <template #title>-->
|
||||
<!-- <view class="box-upload" @click="chooseLogoImg('licence')">-->
|
||||
<!-- <view class="btn-upload" v-if="formSupplier.qualification.length===0">上传图片</view>-->
|
||||
<!-- <image class="img-preview" :src="formSupplier.qualification" v-else/>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </u-cell>-->
|
||||
<!-- </view>-->
|
||||
<!-- </u-form-item>-->
|
||||
|
||||
<view class="full-title">
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view v-if="infoTitle==='特产'">商家资质
|
||||
<text class="font-color-red">(营业执照、食品经营许可证、生产许可证等行业资质)</text>
|
||||
</view>
|
||||
<view v-else>商家资质
|
||||
<text class="font-color-red">(请上传营业执照及行业相关资质证明)</text>
|
||||
</view>
|
||||
</template>
|
||||
<template #label>
|
||||
<u-upload
|
||||
:fileList="quaPics"
|
||||
@afterRead="quaAfterRead"
|
||||
@delete="quaDeletePic"
|
||||
name="quaPics"
|
||||
multiple
|
||||
:maxCount="9"
|
||||
></u-upload>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
|
||||
<!-- <u-form-item prop="typeText">-->
|
||||
<!-- <u-cell title="类型" :border="false" isLink @click="showSupplierType=true">-->
|
||||
<!-- <template #icon>-->
|
||||
@@ -149,7 +198,7 @@
|
||||
</u-cell>
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('shop')">
|
||||
<view class="box-upload" @click="chooseLogoImg('cover')">
|
||||
<view class="btn-upload" v-if="form.cover.length===0 || form.cover==null">上传图片</view>
|
||||
<image class="img-preview" :src="form.cover" v-else/>
|
||||
</view>
|
||||
@@ -172,6 +221,22 @@
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="logo">
|
||||
<u-cell title="店铺logo" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
</u-cell>
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('logo')">
|
||||
<view class="btn-upload" v-if="form.logo.length===0 || form.logo==null">上传图片</view>
|
||||
<image class="img-preview" :src="form.logo" v-else/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="typeText">
|
||||
<u-cell title="店铺类型" :border="false" isLink @click="showType=true">
|
||||
<template #icon>
|
||||
@@ -305,7 +370,7 @@
|
||||
<script>
|
||||
import CitySelect from "@/components/CitySelect";
|
||||
import {getShopData, getShopInfo, removeApply, saveSupplier, saveWenwanSupplier} from "@/api/join";
|
||||
import {getCity} from "@/api/user";
|
||||
import {getCity, registerVerify} from "@/api/user";
|
||||
import {chooseImage, moreImage, uploadImage} from "@/utils";
|
||||
|
||||
export default {
|
||||
@@ -316,14 +381,17 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
partnerId: "",
|
||||
tips: "",
|
||||
infoTitle: "",
|
||||
pics: [],
|
||||
quaPics: [],
|
||||
|
||||
formSupplier: {
|
||||
name: "",
|
||||
avatar: "",
|
||||
contact: "",
|
||||
phone: "",
|
||||
captcha: "",
|
||||
qualification: "",
|
||||
subType: "",
|
||||
area: "",
|
||||
@@ -333,6 +401,7 @@ export default {
|
||||
form: {
|
||||
name: "",
|
||||
cover: "",
|
||||
logo: "",
|
||||
type: 0,
|
||||
typeText: "",
|
||||
phone: "",
|
||||
@@ -360,6 +429,12 @@ export default {
|
||||
message: '请填写联系方式',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'captcha': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写验证码',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'qualification': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
@@ -404,6 +479,12 @@ export default {
|
||||
message: '请上传店铺封面图',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'logo': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请上传店铺LOGO',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'typeText': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
@@ -477,13 +558,37 @@ export default {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.infoTitle + "供应商入驻"
|
||||
})
|
||||
this.init();
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.shopForm.setRules(this.rules);
|
||||
this.$refs.supplierForm.setRules(this.rulesSupplier);
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.formSupplier.phone.length === 0) return;
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
registerVerify({phone: this.formSupplier.phone, type: "merchantApply"}).then(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast(err.msg);
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
|
||||
init() {
|
||||
getCity().then(({data}) => {
|
||||
this.district = data;
|
||||
@@ -559,9 +664,12 @@ export default {
|
||||
case "licence":
|
||||
this.formSupplier.qualification = img;
|
||||
break;
|
||||
case "shop":
|
||||
case "cover":
|
||||
this.form.cover = img;
|
||||
break;
|
||||
case "logo":
|
||||
this.form.logo = img;
|
||||
break;
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -594,6 +702,22 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 删除图片
|
||||
quaDeletePic(event) {
|
||||
this[`${event.name}`].splice(event.index, 1)
|
||||
},
|
||||
|
||||
quaAfterRead(event) {
|
||||
let that = this;
|
||||
if (event.file.length > 0) {
|
||||
event.file.map(item => {
|
||||
uploadImage(item.url, img => {
|
||||
that.quaPics.push({url: img})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 回调参数为包含column indexs、value、values
|
||||
confirmType(e) {
|
||||
this.indexType = e.indexs;
|
||||
@@ -685,9 +809,9 @@ export default {
|
||||
duration: 3000,
|
||||
success: () => {
|
||||
this.showRemove = false;
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
},3000)
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -703,6 +827,11 @@ export default {
|
||||
this.form.pics += (item.url + ",");
|
||||
})
|
||||
|
||||
this.formSupplier.qualification = "";
|
||||
this.quaPics.map(item => {
|
||||
this.formSupplier.qualification += (item.url + ",");
|
||||
})
|
||||
|
||||
if (this.infoTitle === "特产") {
|
||||
saveSupplier(this.form, this.formSupplier, this.partnerId).then(res => {
|
||||
if (res.status === 200) {
|
||||
@@ -777,4 +906,14 @@ export default {
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .full-title {
|
||||
.u-cell__title {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.font-color-red {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,416 @@
|
||||
<template>
|
||||
<u--form :model="form" errorType="toast" labelWidth="216rpx" ref="wholesalerForm">
|
||||
<view class="box-state" v-if="stateTitle && isDraft!==1 && applyType === 4">
|
||||
<u-alert :center="stateType==='primary'" :title="stateTitle" :type="stateType"/>
|
||||
</view>
|
||||
|
||||
<u-cell-group title="采购批发商基本信息" :border="false" :customStyle="{'fontSize':'40rpx'}">
|
||||
|
||||
<u-form-item prop="name">
|
||||
<u-cell title="批发商名称" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="form.name" border="none" placeholder="请填写批发商名称"/>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="avatar">
|
||||
<u-cell title="头像" :border="false"/>
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('avatar')">
|
||||
<view class="btn-upload" v-if="form.avatar.length===0">上传图片</view>
|
||||
<image class="img-preview" :src="form.avatar" v-else/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="contact">
|
||||
<u-cell title="联系人姓名" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="form.contact" border="none" placeholder="请填写联系人姓名"/>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="phone">
|
||||
<u-cell title="联系方式" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="form.phone" border="none" placeholder="请填写联系方式"/>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="captcha">
|
||||
<u-cell title="验证码" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="form.captcha" border="none" placeholder="请填写验证码">
|
||||
<template slot="suffix">
|
||||
<u-code
|
||||
ref="uCode"
|
||||
@change="codeChange"
|
||||
seconds="30"
|
||||
changeText="X秒重新获取"
|
||||
></u-code>
|
||||
<u-button
|
||||
@tap="getCode"
|
||||
:text="tips"
|
||||
type="success"
|
||||
size="normal"
|
||||
></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="qualification">
|
||||
<view class="licence-section">
|
||||
<u-cell :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #title>
|
||||
<view>商家资质<text class="font-color-red">(请上传营业执照及行业相关资质证明)</text></view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
<view class="licence-image">
|
||||
<u-cell :border="false">
|
||||
<template #title>
|
||||
<view class="box-upload" @click="chooseLogoImg('licence')">
|
||||
<view class="btn-upload" v-if="form.qualification.length===0">上传图片</view>
|
||||
<image class="img-preview" :src="form.qualification" v-else/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="area">
|
||||
<u-cell title="省市区" :border="false" isLink>
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<view class="u-text__value" :class="{'area-item':form.area.length===0}">
|
||||
<CitySelect ref="cityselect" :defaultValue="form.area" @callback="result" :items="district"/>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="address">
|
||||
<u-cell title="详细地址" :border="false">
|
||||
<template #icon>
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<template #value>
|
||||
<u-input v-model="form.address" border="none" placeholder="请填写详细地址"/>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
|
||||
</u-cell-group>
|
||||
<view class="btn-submit btn-remove" v-if="reviewStatus===0 && isDraft!==1" @click="showRemove=true">撤销申请</view>
|
||||
<view class="btn-submit" @click="onSubmit" v-else>提交申请</view>
|
||||
|
||||
<u-modal :show="showRemove" content="您确定撤销申请吗?" showCancelButton @cancel="showRemove=false"
|
||||
@confirm="onRemove"></u-modal>
|
||||
|
||||
<u-popup :show="show" mode="center" round="10" closeable @close="show=false">
|
||||
<view class="popup-body">
|
||||
<view class="tc bold">入驻申请须知</view>
|
||||
<view class="content" v-html="notice"></view>
|
||||
<view class="agree-box">
|
||||
<checkbox-group @change="changeAgree">
|
||||
<label>
|
||||
<checkbox value="yes" style="transform:scale(0.8)"/>
|
||||
</label>
|
||||
<text>我已仔细阅读并同意</text>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<u-button type="error" text="确定" :disabled="!isAgree" @click="save"></u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
</u--form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CitySelect from "@/components/CitySelect";
|
||||
import {getShopData, getWholesaler, removeApply, saveWholesaler} from "@/api/join";
|
||||
import {getCity, registerVerify} from "@/api/user";
|
||||
import {chooseImage} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: "pkgJoinWholesaler",
|
||||
components: {
|
||||
CitySelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tips: "",
|
||||
form: {
|
||||
name: "",
|
||||
avatar: "",
|
||||
contact: "",
|
||||
phone: "",
|
||||
captcha: "",
|
||||
qualification: "",
|
||||
area: "",
|
||||
address: ""
|
||||
},
|
||||
rules: {
|
||||
'name': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写批发商名称',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'contact': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写联系人姓名',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'phone': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写联系方式',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'captcha': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写验证码',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'qualification': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请上传营业执照',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'area': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请选择所在省市',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'address': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写详细地址',
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
},
|
||||
|
||||
district: [],
|
||||
address: {},
|
||||
|
||||
isAgree: false,
|
||||
show: false,
|
||||
notice: "",
|
||||
showRemove: false,
|
||||
|
||||
applyType: null,
|
||||
isDraft: null,
|
||||
reviewStatus: null,
|
||||
stateTitle: "",
|
||||
stateType: "primary",
|
||||
isPass: false
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.init();
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.wholesalerForm.setRules(this.rules);
|
||||
},
|
||||
methods: {
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
if (this.form.phone.length === 0) return;
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
registerVerify({phone: this.form.phone, type: "merchantApply"}).then(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}).catch(err => {
|
||||
uni.hideLoading();
|
||||
uni.$u.toast(err.msg);
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
|
||||
init() {
|
||||
getCity().then(({data}) => {
|
||||
this.district = data;
|
||||
});
|
||||
|
||||
getShopData().then(({data}) => {
|
||||
this.notice = data.merchantApplyNotice;
|
||||
this.initInfo();
|
||||
});
|
||||
},
|
||||
|
||||
initInfo() {
|
||||
getWholesaler().then(({data}) => {
|
||||
this.applyType = data.applyType;
|
||||
if (data.applyType === 4) {
|
||||
this.isDraft = data.isDraft;
|
||||
this.reviewStatus = data.reviewStatus;
|
||||
}
|
||||
|
||||
switch (data.reviewStatus) {
|
||||
case 0:
|
||||
this.stateTitle = "审核中";
|
||||
this.stateType = "primary";
|
||||
break;
|
||||
case 1:
|
||||
this.isPass = true;
|
||||
break;
|
||||
case 2:
|
||||
this.stateTitle = "审核驳回:" + data.reviewMsg;
|
||||
this.stateType = "error";
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.wholesalerInfo) {
|
||||
this.form = data.wholesalerInfo;
|
||||
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6);
|
||||
this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}`;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
chooseLogoImg(target) {
|
||||
chooseImage(img => {
|
||||
switch (target) {
|
||||
case "avatar":
|
||||
this.form.avatar = img;
|
||||
break;
|
||||
case "licence":
|
||||
this.form.qualification = img;
|
||||
break;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 省市区
|
||||
result(values) {
|
||||
this.address = {
|
||||
province: values.province.name || "",
|
||||
city: values.city.name || "",
|
||||
district: values.district.name || "",
|
||||
provinceId: values.province.id,
|
||||
cityId: values.city.id,
|
||||
areaId: values.district.id
|
||||
};
|
||||
this.form.area = `${this.address.province} ${this.address.city} ${this.address.district}`;
|
||||
this.form.provinceId = values.province.id;
|
||||
this.form.cityId = values.city.id;
|
||||
this.form.areaId = values.district.id;
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.wholesalerForm.validate().then(res => {
|
||||
// 校验通过
|
||||
this.show = true;
|
||||
}).catch(errors => {
|
||||
// 校验失败
|
||||
})
|
||||
},
|
||||
|
||||
onRemove() {
|
||||
removeApply().then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 3000,
|
||||
success: () => {
|
||||
this.showRemove = false;
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
changeAgree(event) {
|
||||
this.isAgree = event.detail.value.length > 0
|
||||
},
|
||||
|
||||
save() {
|
||||
saveWholesaler(this.form).then(res => {
|
||||
if (res.status === 200) {
|
||||
uni.showToast({
|
||||
title: "您的入驻申请已提交成功,请耐心等待审核",
|
||||
icon: "none",
|
||||
success: () => {
|
||||
this.initInfo();
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg,
|
||||
icon: "none",
|
||||
success: () => {
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "@/assets/css/pkg_join.less";
|
||||
|
||||
/deep/ .cityselect-nav {
|
||||
.item {
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .cityselect-item {
|
||||
.cityselect-item-box {
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .licence-section{
|
||||
.u-cell__title{
|
||||
width: 650rpx!important;
|
||||
}
|
||||
}
|
||||
.font-color-red{
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
+143
-31
@@ -1,40 +1,57 @@
|
||||
<template>
|
||||
<view class="pkg-product-list">
|
||||
<swiper class="swiper-box" indicator-dots indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff"
|
||||
autoplay circular v-if="bannerList.length>0">
|
||||
<swiper-item v-for="(item,index) in bannerList" :key="index">
|
||||
<image :src="item.pic" mode="scaleToFill" @click="$global.commonJump(item.uniappUrl)"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="fixed-header">
|
||||
<swiper class="swiper-box" indicator-dots indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff"
|
||||
autoplay circular v-if="bannerList.length>0">
|
||||
<swiper-item v-for="(item,index) in bannerList" :key="index">
|
||||
<image :src="item.pic" mode="scaleToFill" @click="$global.commonJump(item.uniappUrl)"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">
|
||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">
|
||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="body-box">
|
||||
<view class="aside-box flex-0">
|
||||
<view class="item flex jc-center ai-center" :class="index === asideIndex ? 'active' : ''"
|
||||
v-for="(item, index) in asideList" :key="index" @click="asideTap(index)">
|
||||
<text class="one-t">{{ item.label }}</text>
|
||||
</view>
|
||||
<view class="fixed-aside flex-0">
|
||||
<view class="item flex jc-center ai-center" :class="index === asideIndex ? 'active' : ''"
|
||||
v-for="(item, index) in asideList" :key="index" @click="asideTap(index)">
|
||||
<text class="one-t">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="article-box">
|
||||
<mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"
|
||||
@up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
<view class="list flex flex-wrap">
|
||||
<view v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item" @click="goGoods(item.id)">
|
||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
||||
<view class="name more-t">{{ item.storeName }}</view>
|
||||
<view class="price">¥{{ item.price }}</view>
|
||||
</view>
|
||||
<view class="conter">
|
||||
<mescroll-body ref="mescrollRef" top="0" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"
|
||||
@up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
|
||||
<view class="list flex flex-wrap">
|
||||
<view v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item" @click="goGoods(item.id)">
|
||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
||||
<view class="name more-t">{{ item.storeName }}</view>
|
||||
<view class="price">¥{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
|
||||
<!-- <view class="article-box">-->
|
||||
<!-- <mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"-->
|
||||
<!-- @up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">-->
|
||||
<!-- <view class="list flex flex-wrap">-->
|
||||
<!-- <view v-for="(item, index) in dataList" :key="index">-->
|
||||
<!-- <view class="item" @click="goGoods(item.id)">-->
|
||||
<!-- <image class="cover" :src="item.image" mode="scaleToFill"/>-->
|
||||
<!-- <view class="name more-t">{{ item.storeName }}</view>-->
|
||||
<!-- <view class="price">¥{{ item.price }}</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </mescroll-body>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -77,8 +94,6 @@ export default {
|
||||
let that = this;
|
||||
// 此时mescroll会携带page的参数:
|
||||
let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
console.log(pageNum,"test")
|
||||
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if (that.asideList.length > 0) {
|
||||
@@ -107,7 +122,7 @@ export default {
|
||||
});
|
||||
});
|
||||
}
|
||||
},500)
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
],
|
||||
@@ -140,9 +155,18 @@ export default {
|
||||
.pkg-product-list {
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding-top: 20rpx;
|
||||
background: #fff;
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 18rpx 0;
|
||||
background: #fff;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
@@ -152,5 +176,93 @@ export default {
|
||||
top: 472rpx;
|
||||
height: calc(100vh - 472rpx);
|
||||
}
|
||||
|
||||
.fixed-aside {
|
||||
position: fixed;
|
||||
width: 194rpx;
|
||||
left: 0;
|
||||
top: 472rpx;
|
||||
bottom: 0 !important;
|
||||
box-sizing: border-box;
|
||||
border-top: 2rpx solid #D2D2D2;
|
||||
border-right: 2rpx solid #DADCE0;
|
||||
background-color: #fff;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-scrolling: touch;
|
||||
|
||||
.item {
|
||||
height: 94rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2rpx solid #D2D2D2;
|
||||
color: #033333;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border-left: 6rpx solid #FD574B;
|
||||
color: #FD574B;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.conter {
|
||||
margin-left: 194rpx;
|
||||
margin-top: 472rpx;
|
||||
border-top: 2rpx solid #D2D2D2;
|
||||
|
||||
.empty {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
image {
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
color: gray;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
width: 242rpx;
|
||||
height: 376rpx;
|
||||
box-sizing: border-box;
|
||||
margin: 20rpx 0 0 20rpx;
|
||||
|
||||
.cover {
|
||||
width: 242rpx;
|
||||
height: 242rpx;
|
||||
margin-bottom: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
position: absolute;
|
||||
bottom: 4rpx;
|
||||
color: #DA0000;
|
||||
font-size: 28rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-store {
|
||||
height: 336rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view class="pkg-product-list">
|
||||
<swiper class="swiper-box" indicator-dots indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff"
|
||||
autoplay circular v-if="bannerList.length>0">
|
||||
<swiper-item v-for="(item,index) in bannerList" :key="index">
|
||||
<image :src="item.pic" mode="scaleToFill" @click="$global.commonJump(item.uniappUrl)"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">
|
||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
|
||||
</view>
|
||||
|
||||
<view class="body-box">
|
||||
<view class="aside-box flex-0">
|
||||
<view class="item flex jc-center ai-center" :class="index === asideIndex ? 'active' : ''"
|
||||
v-for="(item, index) in asideList" :key="index" @click="asideTap(index)">
|
||||
<text class="one-t">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="article-box">
|
||||
<mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"
|
||||
@up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
<view class="list flex flex-wrap">
|
||||
<view v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item" @click="goGoods(item.id)">
|
||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
||||
<view class="name more-t">{{ item.storeName }}</view>
|
||||
<view class="price">¥{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
import {customizedGift} from "@/api/product";
|
||||
import {fetchCity} from "@/api/wenwan";
|
||||
import {getProducts} from "@/api/store";
|
||||
|
||||
export default {
|
||||
name: "giftList",
|
||||
components: {
|
||||
MescrollBody
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
keyword: "",
|
||||
bannerList: [],
|
||||
asideList: [],
|
||||
asideIndex: 0,
|
||||
dataList: [], // 列表数据
|
||||
|
||||
upOption: {
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
auto: true,
|
||||
empty: {
|
||||
tip: '暂无商品' // 提示
|
||||
}
|
||||
},
|
||||
downOption: {
|
||||
auto: false
|
||||
}
|
||||
}
|
||||
},
|
||||
mixins: [
|
||||
MescrollMixins({
|
||||
getPageData(mescroll) {
|
||||
let that = this;
|
||||
// 此时mescroll会携带page的参数:
|
||||
let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
console.log(pageNum,"test")
|
||||
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if (that.asideList.length > 0) {
|
||||
clearInterval(timer);
|
||||
|
||||
let param = {
|
||||
isCustomizedGift: 1,
|
||||
page: pageNum,
|
||||
limit: 10,
|
||||
keyword: that.keyword,
|
||||
provinceId: that.asideList.length > 0 ? that.asideList[that.asideIndex].provinceId : ""
|
||||
}
|
||||
getProducts(param).then(({data}) => {
|
||||
if (mescroll.num === 1) {
|
||||
that.dataList = [];
|
||||
}
|
||||
that.dataList = that.dataList.concat(data);
|
||||
mescroll.endSuccess(data.length);
|
||||
}).catch(err => {
|
||||
mescroll.endErr();
|
||||
uni.showToast({
|
||||
title: err + '',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
});
|
||||
}
|
||||
},500)
|
||||
}
|
||||
})
|
||||
],
|
||||
onLoad() {
|
||||
customizedGift().then(({data}) => this.bannerList = data.banner);
|
||||
fetchCity(3).then(({data}) => this.asideList = data.group);
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
//触发加载请求
|
||||
this.mescroll.scrollTo(0, 0);
|
||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
||||
},
|
||||
asideTap(index) {
|
||||
this.asideIndex = index;
|
||||
this.search();
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/shop/GoodsCon/index?id=" + id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import "@/assets/css/product.less";
|
||||
|
||||
.pkg-product-list {
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding-top: 20rpx;
|
||||
background: #fff;
|
||||
|
||||
.search-box {
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.body-box {
|
||||
position: fixed;
|
||||
top: 472rpx;
|
||||
height: calc(100vh - 472rpx);
|
||||
}
|
||||
|
||||
/deep/ .u-list {
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<view class="pkg-product-list">
|
||||
<view class="fixed-header">
|
||||
<swiper class="swiper-box" indicator-dots indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff"
|
||||
autoplay circular v-if="bannerList.length>0">
|
||||
<swiper-item v-for="(item,index) in bannerList" :key="index">
|
||||
<image :src="item.pic" mode="scaleToFill" @click="$global.commonJump(item.uniappUrl)"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">
|
||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="body-box">-->
|
||||
<view class="aside flex-0">
|
||||
<view class="item flex jc-center ai-center" :class="index === asideIndex ? 'active' : ''"
|
||||
v-for="(item, index) in asideList" :key="index" @click="asideTap(index)">
|
||||
<text class="one-t">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="conter">
|
||||
<mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"
|
||||
@up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
|
||||
<view class="list flex flex-wrap">
|
||||
<view v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item" @click="goGoods(item.id)">
|
||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
||||
<view class="name more-t">{{ item.storeName }}</view>
|
||||
<view class="price">¥{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
|
||||
<!-- <view class="article-box">-->
|
||||
<!-- <mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"-->
|
||||
<!-- @up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">-->
|
||||
<!-- <view class="list flex flex-wrap">-->
|
||||
<!-- <view v-for="(item, index) in dataList" :key="index">-->
|
||||
<!-- <view class="item" @click="goGoods(item.id)">-->
|
||||
<!-- <image class="cover" :src="item.image" mode="scaleToFill"/>-->
|
||||
<!-- <view class="name more-t">{{ item.storeName }}</view>-->
|
||||
<!-- <view class="price">¥{{ item.price }}</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </mescroll-body>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins.js";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
import {customizedGift} from "@/api/product";
|
||||
import {fetchCity} from "@/api/wenwan";
|
||||
import {getProducts} from "@/api/store";
|
||||
|
||||
export default {
|
||||
name: "giftList",
|
||||
components: {
|
||||
MescrollBody
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
keyword: "",
|
||||
bannerList: [],
|
||||
asideList: [],
|
||||
asideIndex: 0,
|
||||
dataList: [], // 列表数据
|
||||
|
||||
upOption: {
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
auto: true,
|
||||
empty: {
|
||||
tip: '暂无商品' // 提示
|
||||
}
|
||||
},
|
||||
downOption: {
|
||||
auto: false
|
||||
}
|
||||
}
|
||||
},
|
||||
mixins: [
|
||||
MescrollMixins({
|
||||
getPageData(mescroll) {
|
||||
let that = this;
|
||||
// 此时mescroll会携带page的参数:
|
||||
let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if (that.asideList.length > 0) {
|
||||
clearInterval(timer);
|
||||
|
||||
let param = {
|
||||
isCustomizedGift: 1,
|
||||
page: pageNum,
|
||||
limit: 10,
|
||||
keyword: that.keyword,
|
||||
provinceId: that.asideList.length > 0 ? that.asideList[that.asideIndex].provinceId : ""
|
||||
}
|
||||
getProducts(param).then(({data}) => {
|
||||
if (mescroll.num === 1) {
|
||||
that.dataList = [];
|
||||
}
|
||||
that.dataList = that.dataList.concat(data);
|
||||
mescroll.endSuccess(data.length);
|
||||
}).catch(err => {
|
||||
mescroll.endErr();
|
||||
uni.showToast({
|
||||
title: err + '',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
});
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
],
|
||||
onLoad() {
|
||||
customizedGift().then(({data}) => this.bannerList = data.banner);
|
||||
fetchCity(3).then(({data}) => this.asideList = data.group);
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
//触发加载请求
|
||||
this.mescroll.scrollTo(0, 0);
|
||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
||||
},
|
||||
asideTap(index) {
|
||||
this.asideIndex = index;
|
||||
this.search();
|
||||
},
|
||||
goGoods(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/shop/GoodsCon/index?id=" + id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import "@/assets/css/product.less";
|
||||
|
||||
.pkg-product-list {
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding-top: 20rpx;
|
||||
background: #fff;
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.body-box {
|
||||
position: fixed;
|
||||
top: 472rpx;
|
||||
height: calc(100vh - 472rpx);
|
||||
}
|
||||
|
||||
.aside {
|
||||
position: fixed;
|
||||
width: 194rpx;
|
||||
left: 0;
|
||||
top: 472rpx;
|
||||
bottom: 0 !important;
|
||||
box-sizing: border-box;
|
||||
border-right: 2rpx solid #DADCE0;
|
||||
background-color: #fff;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-scrolling: touch;
|
||||
|
||||
.item {
|
||||
height: 94rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2rpx solid #D2D2D2;
|
||||
color: #033333;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border-left: 6rpx solid #FD574B;
|
||||
color: #FD574B;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.conter {
|
||||
margin-left: 194rpx;
|
||||
margin-top: 472rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -37,27 +37,30 @@
|
||||
</view>
|
||||
|
||||
<view class="article-box">
|
||||
<mescroll-body ref="mescrollRef" top="0" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption"
|
||||
@up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
|
||||
<view class="list flex flex-wrap">
|
||||
<view v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item item-store" @click="goStore(item.id)" v-if="tabIndex===0">
|
||||
<image class="cover" :src="item.cover" mode="scaleToFill"/>
|
||||
<view class="name one-t">{{ item.content }}</view>
|
||||
<view class="price store flex ai-center" style="width: 100%;">
|
||||
<image class="flex-0" :src="item.logo" mode="scaleToFill"/>
|
||||
<view class="one-t">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item" @click="goGoods(item.id)" v-else>
|
||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
||||
<view class="name more-t">{{ item.storeName }}</view>
|
||||
<view class="price">¥{{ item.price }}</view>
|
||||
<scroll-view class="list flex flex-wrap" :style="{'height':listHeight}" :enable-flex="true"
|
||||
:scroll-anchoring="true"
|
||||
:scroll-y="true"
|
||||
:scroll-with-animation="true" :enable-back-to-top="true" @scrolltolower="onLower" v-if="dataList.length>0">
|
||||
<view v-for="(item, index) in dataList" :key="index">
|
||||
<view class="item item-store" @click="goStore(item.id)" v-if="tabIndex===0">
|
||||
<image class="cover" :src="item.cover" mode="scaleToFill"/>
|
||||
<view class="name one-t">{{ item.content }}</view>
|
||||
<view class="price store flex ai-center" style="width: 100%;">
|
||||
<image class="flex-0" :src="item.logo" mode="scaleToFill"/>
|
||||
<view class="one-t">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item" @click="goGoods(item.id)" v-else>
|
||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
||||
<view class="name more-t">{{ item.storeName }}</view>
|
||||
<view class="price">¥{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</scroll-view>
|
||||
|
||||
<image class="img-nodata" :src="webUrl+'/20230912145123537792.png'" mode="scaleToFill" v-else-if="tabIndex===0"/>
|
||||
<image class="img-nodata" :src="webUrl+'/20230912145113749133.png'" mode="scaleToFill" v-else/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -67,80 +70,34 @@
|
||||
import {fetchCity} from "@/api/wenwan";
|
||||
import {wellnessFood, wellnessPlaceList} from "@/api/product";
|
||||
import {getProducts} from "@/api/store";
|
||||
import MescrollMixins from "@/mixins/mescroll-mixins";
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body";
|
||||
|
||||
export default {
|
||||
name: "healthList",
|
||||
components: {
|
||||
MescrollBody
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
tabIndex: 0,
|
||||
keyword: "",
|
||||
page: 1,
|
||||
listHeight: "auto",
|
||||
|
||||
bannerList: [],
|
||||
asideList: [],
|
||||
asideIndex: 0,
|
||||
dataList: [], // 列表数据
|
||||
|
||||
upOption: {
|
||||
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
|
||||
auto: true,
|
||||
empty: {
|
||||
tip: '暂无数据' // 提示
|
||||
}
|
||||
},
|
||||
downOption: {
|
||||
auto: false
|
||||
}
|
||||
}
|
||||
},
|
||||
mixins: [
|
||||
MescrollMixins({
|
||||
getPageData(mescroll) {
|
||||
let that = this;
|
||||
// 此时mescroll会携带page的参数:
|
||||
let pageNum = mescroll.num; // 页码, 默认从1开始
|
||||
|
||||
let timer = setInterval(() => {
|
||||
if (that.asideList.length > 0) {
|
||||
clearInterval(timer);
|
||||
|
||||
let param = {
|
||||
page: pageNum,
|
||||
limit: 10,
|
||||
keyword: that.keyword,
|
||||
provinceId: that.asideList.length > 0 ? that.asideList[that.asideIndex].provinceId : ""
|
||||
}
|
||||
|
||||
if (mescroll.num === 1) {
|
||||
that.dataList = [];
|
||||
}
|
||||
if (that.tabIndex === 0) {
|
||||
wellnessPlaceList(param).then(({data}) => {
|
||||
that.dataList = that.dataList.concat(data);
|
||||
mescroll.endSuccess(data.length);
|
||||
});
|
||||
} else {
|
||||
param.isWellnessFood = 1;
|
||||
getProducts(param).then(({data}) => {
|
||||
that.dataList = that.dataList.concat(data);
|
||||
mescroll.endSuccess(data.length);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
],
|
||||
onLoad() {
|
||||
wellnessFood().then(({data}) => this.bannerList = data.banner);
|
||||
fetchCity(4).then(({data}) => this.asideList = data.group);
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
wellnessFood().then(({data}) => this.bannerList = data.banner);
|
||||
fetchCity(4).then(({data}) => {
|
||||
this.asideList = data.group;
|
||||
this.search();
|
||||
});
|
||||
},
|
||||
changeTab(index) {
|
||||
if (this.asideList.length === 0) return;
|
||||
if (index === this.tabIndex) return;
|
||||
@@ -148,17 +105,11 @@ export default {
|
||||
this.tabIndex = index;
|
||||
this.search();
|
||||
},
|
||||
search() {
|
||||
if (this.asideList.length === 0) return;
|
||||
//触发加载请求
|
||||
this.mescroll.scrollTo(0, 0);
|
||||
this.mescroll && this.mescroll.resetUpScroll(false);
|
||||
},
|
||||
asideTap(index) {
|
||||
this.asideIndex = index;
|
||||
onLower() {
|
||||
this.page++;
|
||||
this.search();
|
||||
},
|
||||
fetchData() {
|
||||
search() {
|
||||
let param = {
|
||||
page: this.page,
|
||||
limit: 10,
|
||||
@@ -167,19 +118,41 @@ export default {
|
||||
}
|
||||
if (this.tabIndex === 0) {
|
||||
wellnessPlaceList(param).then(({data}) => {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.dataList.push(data[i]);
|
||||
}
|
||||
this.handleData(data);
|
||||
});
|
||||
} else {
|
||||
param.isWellnessFood = 1;
|
||||
getProducts(param).then(({data}) => {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.dataList.push(data[i]);
|
||||
}
|
||||
this.handleData(data);
|
||||
});
|
||||
}
|
||||
},
|
||||
handleData(data){
|
||||
let that = this;
|
||||
if (this.page === 1) {
|
||||
this.dataList = [];
|
||||
}
|
||||
this.dataList = this.dataList.concat(data);
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
let len = that.dataList.length;
|
||||
let {windowHeight} = res;
|
||||
console.log("test data",windowHeight)
|
||||
that.listHeight = "auto";
|
||||
if (windowHeight > 600 && len > 4) {
|
||||
that.listHeight = "100%";
|
||||
}
|
||||
if (windowHeight <= 600 && len > 2) {
|
||||
that.listHeight = "100%";
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
asideTap(index) {
|
||||
this.asideIndex = index;
|
||||
this.page = 1;
|
||||
this.search();
|
||||
},
|
||||
goStore(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesInn/inn/innHome?id=" + id
|
||||
@@ -198,7 +171,8 @@ export default {
|
||||
@import "@/assets/css/product.less";
|
||||
|
||||
.pkg-product-list {
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
overflow-y: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-top: 16rpx;
|
||||
background: #fff;
|
||||
@@ -241,6 +215,16 @@ export default {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.img-nodata{
|
||||
position: relative;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
width: 360rpx;
|
||||
height: 360rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
<script setup>
|
||||
import {getSeason, getSeasonPoster} from "@/api/product";
|
||||
import cookie from "@/utils/store/cookie";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
id: null,
|
||||
partnerId: null,
|
||||
info: null,
|
||||
current: 0,
|
||||
showShare: false,
|
||||
posterUrl: "", // 分享海报
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.id = options.id || null;
|
||||
this.partnerId = options.partnerId || null;
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync();
|
||||
if (options.scene || obj.query.scene) {
|
||||
let query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene);
|
||||
this.id = getUrlParam(query, "id") || null;
|
||||
this.partnerId = getUrlParam(query, "partnerId") || null;
|
||||
}
|
||||
}
|
||||
if (this.partnerId) cookie.set("spread", this.partnerId);
|
||||
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
getSeason(this.id).then(({data}) => {
|
||||
if (data.sliderImages) data.swiper = data.sliderImages.split(",");
|
||||
this.info = data;
|
||||
});
|
||||
|
||||
getSeasonPoster(this.id).then(({data}) => this.posterUrl = data);
|
||||
},
|
||||
tapLeft() {
|
||||
if (this.current === 0) return;
|
||||
this.current--;
|
||||
},
|
||||
tapRight() {
|
||||
if (this.current + 1 === this.info.swiper.length) return;
|
||||
this.current++;
|
||||
},
|
||||
|
||||
downloadImage() {
|
||||
let that = this;
|
||||
const randomID = () => Math.random().toString(36).substring(2);
|
||||
|
||||
uni.downloadFile({
|
||||
url: this.posterUrl, //网络图片的地址
|
||||
filePath: wx.env.USER_DATA_PATH + "/share_" + randomID() + ".png", //指定的本地文件路径
|
||||
success: downRes => {
|
||||
console.log(typeof downRes, downRes, "down")
|
||||
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: downRes.filePath, //临时文件地址
|
||||
success: function () {
|
||||
uni.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success",
|
||||
success() {
|
||||
that.showShare = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function (err) {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function (err) {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="product-season">
|
||||
<template v-if="info">
|
||||
<image class="img-top" :src="info.topImage" mode="widthFix"/>
|
||||
<view class="share-label flex jc-center ai-center" @click="showShare=true" v-if="posterUrl.length>0">
|
||||
<image class="icon-share" :src="webUrl+'/20230911105727684131.png'" mode="scaleToFill"/>
|
||||
分享好友
|
||||
</view>
|
||||
|
||||
<u-popup :show="showShare" mode="center" bgColor="transparent">
|
||||
<view class="box-share">
|
||||
<view class="box-img">
|
||||
<image class="icon" :src="webUrl+'/20230608112219219303.png'" @click="showShare=false"/>
|
||||
<image class="main-img" :src="posterUrl"/>
|
||||
</view>
|
||||
<image class="btn" :src="webUrl+'/20230608112210135038.png'" @click="saveImg"/>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<view class="scroll-item section">
|
||||
<u-swiper :autoplay="false" :current="current" :list="info.swiper" height="100vh" indicator
|
||||
imgMode="scaleToFill"></u-swiper>
|
||||
<image class="icon-direction icon-left" :src="webUrl+'/20230911105736198247.png'" mode="scaleToFill"
|
||||
@click="tapLeft"/>
|
||||
<image class="icon-direction icon-right" :src="webUrl+'/20230911105742958676.png'" mode="scaleToFill"
|
||||
@click="tapRight"/>
|
||||
</view>
|
||||
|
||||
<view class="scroll-item">
|
||||
<scroll-view scroll-y class="product-list" :style="{backgroundImage:'url(' + info.productImage + ')'}">
|
||||
<image class="item" :src="item.image" mode="scaleToFill" @click="$global.navToGoods(item.id)"
|
||||
v-for="(item,index) in info.products" :key="index"/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import "@/assets/css/store.less";
|
||||
|
||||
.product-season {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.scroll-item {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.img-top {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.share-label {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 32rpx;
|
||||
width: 200rpx;
|
||||
height: 56rpx;
|
||||
background: rgba(255, 255, 255, 0.39);
|
||||
border-radius: 8rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
z-index: 99;
|
||||
|
||||
.icon-share {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-direction {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 40rpx;
|
||||
height: 74rpx;
|
||||
}
|
||||
|
||||
.icon-left {
|
||||
left: 32rpx;
|
||||
}
|
||||
|
||||
.icon-right {
|
||||
right: 32rpx;
|
||||
}
|
||||
|
||||
.product-list {
|
||||
padding: 200rpx 32rpx 0;
|
||||
background-size: 100vw auto;
|
||||
|
||||
.item {
|
||||
width: 686rpx;
|
||||
height: 400rpx;
|
||||
margin-bottom: 46rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,194 @@
|
||||
<script>
|
||||
import {seasonHomeData} from "@/api/product";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
typeList: ["时令果蔬", "水产海鲜", "肉禽蛋白", "全部分类"],
|
||||
list: [],
|
||||
typeIndex: 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
seasonHomeData().then(({data}) => this.list = data.seasonalFoodType || []);
|
||||
},
|
||||
goDetail() {
|
||||
uni.navigateTo({
|
||||
url: "/pkg_product/views/season?id=" + this.list[this.typeIndex].contents[0].id
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="product-season">
|
||||
<template v-if="typeList.length">
|
||||
<view class="type-box">
|
||||
<u-grid col="4">
|
||||
<u-grid-item v-for="(item,index) in list" :key="index" @click="typeIndex=index">
|
||||
<image class="icon-logo" :class="{'choose-icon':typeIndex===index}" :src="item.logo" mode="scaleToFill"/>
|
||||
<text class="type-name" :class="{'choose-name':typeIndex===index}">{{ item.name }}</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<image class="icon-logo" :src="webUrl+'/20230913155700903114.png'" mode="scaleToFill"/>
|
||||
<text class="type-name">全部</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
|
||||
<view class="title-line flex ai-center">
|
||||
<image class="title-icon" :src="list[typeIndex].titleIcon" mode="scaleToFill"/>
|
||||
<text>{{ list[typeIndex].title }}</text>
|
||||
</view>
|
||||
|
||||
<image class="type-img" :src="list[typeIndex].contents[0].image" mode="widthFix" @click="goDetail"/>
|
||||
|
||||
<view class="goods-list flex flex-wrap">
|
||||
<view class="item flex flex-col ai-end" :style="{backgroundColor:list[typeIndex].backgroundColor}" v-for="item in list[typeIndex].products" :key="item"
|
||||
@click="$global.navToGoods(item.id)">
|
||||
<view class="img-box">
|
||||
<image :src="item.image" mode="scaleToFill"/>
|
||||
<view class="img-mask flex jc-center ai-center">
|
||||
<view class="name one-t">{{ item.storeName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="more-t">{{ item.storeInfo }}</view>
|
||||
<view class="price tc">¥{{ item.price }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.product-season {
|
||||
min-height: 100vh;
|
||||
background: #FFFFFF;
|
||||
color: #333333;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.type-box {
|
||||
padding: 32rpx 62rpx 0;
|
||||
|
||||
.icon-logo {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.type-name {
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.choose-icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
|
||||
.choose-name {
|
||||
color: #f66;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title-line {
|
||||
padding: 50rpx 32rpx 20rpx;
|
||||
|
||||
.title-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
line-height: 1;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.type-img {
|
||||
width: 690rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
padding: 24rpx 32rpx;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
width: 328rpx;
|
||||
height: 480rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
margin-right: 30rpx;
|
||||
padding: 16rpx;
|
||||
|
||||
.img-box {
|
||||
position: relative;
|
||||
width: 296rpx;
|
||||
height: 296rpx;
|
||||
|
||||
image {
|
||||
width: 296rpx;
|
||||
height: 296rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.img-mask {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 296rpx;
|
||||
height: 60rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20rpx;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
|
||||
.name {
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.more-t {
|
||||
width: 100%;
|
||||
margin-top: 10rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 38rpx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.price {
|
||||
position: absolute;
|
||||
bottom: 16rpx;
|
||||
right: 16rpx;
|
||||
display: inline-block;
|
||||
height: 48rpx;
|
||||
border-radius: 24rpx;
|
||||
margin-top: 8rpx;
|
||||
padding: 0 12rpx;
|
||||
background: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +1,9 @@
|
||||
<template>
|
||||
<view class="views-seckill pkg-product-list" :style="{'backgroundImage':`url(${webUrl}/20221222155058686606.png)`}">
|
||||
<!-- <hx-navbar :back="true" :fixed="false" leftText="天天秒杀" color="#fff" :statusBar="true" transparent="hidden"-->
|
||||
<!-- barPlaceholder="hidden"/>-->
|
||||
|
||||
<view class="search-box flex jc-between ai-center">
|
||||
<input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">
|
||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
|
||||
</view>
|
||||
<!-- <view class="search-box flex jc-between ai-center">-->
|
||||
<!-- <input type="text" v-model="keyword" placeholder="搜索商品" placeholder-style="color:#949494" @confirm="search">-->
|
||||
<!-- <image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<view class="img-box flex jc-between ai-end">
|
||||
<image class="img-seckill" :src="webUrl+'/20221222155145987590.png'" mode="scaleToFill"/>
|
||||
@@ -21,7 +18,8 @@
|
||||
<view class="flex jc-center">
|
||||
<image class="title" :src="webUrl+'/20221230201151585898.png'" mode="scaleToFill"/>
|
||||
</view>
|
||||
<view class="content">{{ ruleContent }}</view>
|
||||
<rich-text class="content" :nodes="ruleContent"/>
|
||||
<!-- <view class="content">{{ ruleContent }}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -66,7 +64,8 @@
|
||||
</view>
|
||||
|
||||
<view class="list-box">
|
||||
<view class="item flex" v-for="(item,index) in list" :key="index" @click="goGoodsConByProductID(item)">
|
||||
<view class="item flex" v-for="(item,index) in list" :key="index"
|
||||
@click="goGoodsConByProductID(item,seckillTime[seckillTimeIndex].status)">
|
||||
<image class="img-cover flex-0" :src="item.image"
|
||||
mode="scaleToFill"/>
|
||||
<view class="content flex flex-col jc-between">
|
||||
@@ -140,6 +139,7 @@ export default {
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.timeId = this.seckillTime[this.seckillTimeIndex].id;
|
||||
this.endReach = false;
|
||||
this.fetchList()
|
||||
},
|
||||
|
||||
@@ -175,7 +175,15 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
goGoodsConByProductID(item) {
|
||||
goGoodsConByProductID(item, status) {
|
||||
if (status > 1) {
|
||||
uni.showToast({
|
||||
title: "此商品秒杀活动还未开始哦",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
@@ -193,8 +201,8 @@ export default {
|
||||
@import "@/assets/css/product.less";
|
||||
|
||||
.views-seckill {
|
||||
padding-top: 40rpx;
|
||||
background-size: 750rpx auto;
|
||||
//padding-top: 40rpx;
|
||||
background-size: 750rpx 360rpx;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
.dialog-mask {
|
||||
@@ -248,8 +256,8 @@ export default {
|
||||
}
|
||||
|
||||
.img-box {
|
||||
margin-top: 40rpx;
|
||||
padding: 0 32rpx;
|
||||
//margin-top: 40rpx;
|
||||
padding: 40rpx 32rpx 0;
|
||||
|
||||
.img-seckill {
|
||||
width: 224.65rpx;
|
||||
|
||||
+4
-4
@@ -590,7 +590,8 @@ export async function routerPermissions(url, type) {
|
||||
if (!path) {
|
||||
path = '/' + getCurrentPageUrlWithArgs()
|
||||
}
|
||||
if (Vue.prototype.$deviceType == 'routine') {
|
||||
|
||||
if (Vue.prototype.$deviceType === 'routine') {
|
||||
// 如果是微信小程序,跳转到授权页
|
||||
// 先校验用户是否授权,如果授权了,进行自动登录
|
||||
//authorize('userInfo')因为小程序登录和授权接口的修改基本废了
|
||||
@@ -601,7 +602,6 @@ export async function routerPermissions(url, type) {
|
||||
//检查授权信息
|
||||
let authUserInfo = await checkAuth().catch(err => {
|
||||
});
|
||||
|
||||
if (authUserInfo) {
|
||||
var loginInfo = {
|
||||
userInfo: authUserInfo,
|
||||
@@ -646,7 +646,8 @@ export async function routerPermissions(url, type) {
|
||||
})
|
||||
} else {
|
||||
// 跳转到登录页面或者授权页面
|
||||
if (path == '/pages/shop/ShoppingCart/index' || path == '/pages/user/User/index') {
|
||||
// path == '/pages/shop/ShoppingCart/index' ||
|
||||
if ( path == '/pages/user/User/index') {
|
||||
switchTab({
|
||||
path,
|
||||
})
|
||||
@@ -893,7 +894,6 @@ export const handleLoginFailure = () => {
|
||||
let path = '/' + getCurrentPageUrlWithArgs()
|
||||
|
||||
let qrCode = handleQrCode()
|
||||
|
||||
if (qrCode) {
|
||||
// 当前是通过海报扫描进入的
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// 日期格式化
|
||||
export function formatterDate(date, flag = '-', mode = 'date') {
|
||||
const year = new Date(date).getFullYear()
|
||||
const month = new Date(date).getMonth() + 1
|
||||
const day = new Date(date).getDate()
|
||||
return `${year}${flag}${month > 9 ? month : '0' + month}${flag}${day > 9 ? day : '0' + day}`
|
||||
}
|
||||
|
||||
export function formatContent(html) {
|
||||
// 去掉img标签里的style、width、height属性
|
||||
let contentData = html.replace(/<img[^>]*>/gi, function(match, capture) {
|
||||
match = match.replace(`style=""`, '')
|
||||
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '')
|
||||
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '')
|
||||
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '')
|
||||
return match
|
||||
}) // 修改所有style里的width属性为max-width:100%
|
||||
contentData = contentData.replace(/style="[^"]+"/gi, function(match, capture) {
|
||||
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;'); return match
|
||||
}) // 去掉<br/>标签
|
||||
contentData = contentData.replace(/<br[^>]*\/>/gi, '') // img标签添加style属性:max-width:100%;height:auto
|
||||
contentData = contentData.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin:0 auto;"')
|
||||
return contentData
|
||||
}
|
||||
+31
-56
@@ -58,13 +58,13 @@
|
||||
|
||||
<view class="guarantee" v-if="inn.guaranteeValue">保证金:{{ inn.guaranteeValue }}元</view>
|
||||
<view class="acea-row row-center row-middle" style="flex-shrink: 0;" @click="zanInn">
|
||||
<block v-if="inn.zanVo != null">
|
||||
<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" :src="webUrl+'/20210302161135069143.png'"
|
||||
<block v-if="isLike">
|
||||
<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" :src="webUrl+'/20230828095210280991.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 28rpx;color: #FF564A;">{{ inn.zan }}</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" :src="webUrl+'/20210807215657904755.png'"
|
||||
<image style="width: 48rpx;height: 48rpx;margin-right: 10rpx;" :src="webUrl+'/20230828095217616640.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 28rpx;color: #333333;">{{ inn.zan }}</text>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<view class="" style="padding: 0 32rpx;margin-top: 10rpx;">
|
||||
<view class="inn-signature">
|
||||
<text style="font-size: 24rpx;color: #080F1A;">{{ inn.tips }}</text>
|
||||
<text style="font-size: 24rpx;color: #080F1A;">{{ inn.content }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<view class="phone-block acea-row row-middle" @click="call">
|
||||
<image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/20220901223901017309.png'"
|
||||
mode=""></image>
|
||||
<text style="font-size: 24rpx;color: #41454d;">拨打电话</text>
|
||||
<text style="font-size: 24rpx;color: #41454d;">联系客服</text>
|
||||
</view>
|
||||
<view class="vline"></view>
|
||||
<view class="map-block acea-row row-middle" @click="showLocation">
|
||||
@@ -153,7 +153,6 @@
|
||||
<!-- <drag-button :isDock="true" :existTabBar="true" @btnClick="showQrcode"/>-->
|
||||
<!-- </block>-->
|
||||
<view v-if="activeIndex==0" class="pics-section" style="position: relative;">
|
||||
|
||||
<view class="pics-list acea-row" v-if="inn.pics.length>0">
|
||||
<view :style="{width:picColumnWidth}" @click="showPic(index)" class="pics-item" v-for="(url, index) in inn.pics"
|
||||
:key="index">
|
||||
@@ -161,10 +160,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="activeIndex==1" class="info-section" style="position: relative;">
|
||||
<view class="info-list acea-row row-column" v-if="infoArray.length>0">
|
||||
<view class="pics-item acea-row" style="flex-wrap: nowrap;" @click="infoDetail(info)"
|
||||
v-for="(info, index) in infoArray" :key="index">
|
||||
<view class="pics-item acea-row" style="flex-wrap: nowrap;" v-for="(info, index) in infoArray" :key="index">
|
||||
<view class="date-block" style="flex-shrink: 0;">
|
||||
<view class="month-day" :style="index==0?'color:#0DC5C5;':''">{{ info.monthDay }}</view>
|
||||
<view class="year">{{ info.year }}</view>
|
||||
@@ -176,29 +175,27 @@
|
||||
<view :class="['dot',index==0?'first-cell':'']" style="flex-shrink: 0;"></view>
|
||||
<view v-if="(index+1)!=infoArray.length" class="dash-line" style="flex-grow: 1;"></view>
|
||||
</view>
|
||||
<view class="info-card " style="flex-grow: 1;" @click="infoClick(info)">
|
||||
<view class="info-title line1">
|
||||
{{ info.name }}
|
||||
</view>
|
||||
<view class="info-card" style="flex-grow: 1;">
|
||||
<view class="info-title line1" @click="infoClick(info)">{{ info.name }}</view>
|
||||
<block v-if="info.type=='NT_TEXT'">
|
||||
<img-box style="width: 100%;" :imgList='info.resources' :num='info.resources.length'></img-box>
|
||||
</block>
|
||||
|
||||
<view v-else class="video-wrap" style="margin-top: 10rpx;">
|
||||
<video style="width: 100%;height: 264rpx;" :src="info.resources[0]"></video>
|
||||
<video style="width: 100%;height: 264rpx;" :src="info.resources[0]" controls play-btn-position="center"/>
|
||||
</view>
|
||||
|
||||
<view class="info-media-wrap acea-row row-middle row-between" style="margin-top: 10rpx;">
|
||||
<view class="info-media-wrap acea-row row-middle row-between" style="margin-top: 10rpx;" @click="infoClick(info)">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="acea-row row-middle">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;"
|
||||
:src="webUrl+'/20220901224017781784.png'"
|
||||
:src="webUrl+'/20230803152147141807.png'"
|
||||
mode=""></image>
|
||||
<text class="seeNum-txt">{{ info.pv }}</text>
|
||||
</view>
|
||||
<view class="acea-row row-middle" style="margin-left: 20rpx;">
|
||||
<image style="width: 28rpx;height: 28rpx;margin-right: 4rpx;"
|
||||
:src="webUrl+'/20220901224304100136.png'" mode=""></image>
|
||||
:src="webUrl+'/20230803151302213857.png'" mode=""></image>
|
||||
<text class="likeNum-txt">{{ info.zan }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -280,7 +277,8 @@ export default {
|
||||
showShare: false,
|
||||
posterUrl: "", // 分享海报
|
||||
id: null,
|
||||
partnerId: null
|
||||
partnerId: null,
|
||||
isLike:false //点赞
|
||||
}
|
||||
},
|
||||
//必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||
@@ -288,8 +286,9 @@ export default {
|
||||
this.scrollData = e;
|
||||
},
|
||||
onShow: function () {
|
||||
this.goodsPage = 1;
|
||||
this.goodsList = [];
|
||||
// this.goodsPage = 1;
|
||||
// this.goodsList = [];
|
||||
// this.fetchGoods();
|
||||
|
||||
this.page = 1;
|
||||
this.loading = false;
|
||||
@@ -341,9 +340,7 @@ export default {
|
||||
},
|
||||
// 上拉触底
|
||||
onReachBottom() {
|
||||
if (this.activeIndex == 0) {
|
||||
|
||||
} else if (this.activeIndex == 2) {
|
||||
if (this.activeIndex === 3) {
|
||||
this.goodsPage++;
|
||||
this.fetchGoods();
|
||||
} else {
|
||||
@@ -452,38 +449,19 @@ export default {
|
||||
}
|
||||
,
|
||||
zanInn: function () {
|
||||
var id = this.inn.id;
|
||||
uni.showLoading();
|
||||
getHotelZan(id).then((res) => {
|
||||
uni.hideLoading();
|
||||
var msg = '操作成功!';
|
||||
if (res.msg.length > 0) {
|
||||
msg = res.msg;
|
||||
}
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
setTimeout(function () {
|
||||
//刷新界面
|
||||
that.fetchInnDetail();
|
||||
}, 1500);
|
||||
getHotelZan(this.inn.id).then(() => {
|
||||
this.isLike = !this.isLike;
|
||||
this.fetchInnDetail();
|
||||
}).catch((err) => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg + '',
|
||||
icon: 'none',
|
||||
mask: false,
|
||||
duration: 1500
|
||||
});
|
||||
}).finally(() => {
|
||||
|
||||
})
|
||||
}
|
||||
,
|
||||
},
|
||||
infoClick: function (info) {
|
||||
return;
|
||||
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id);
|
||||
}
|
||||
,
|
||||
@@ -599,6 +577,7 @@ export default {
|
||||
if (this.isMyInn) {
|
||||
getHotelDetail(this.id).then((res) => {
|
||||
that.inn = res.data;
|
||||
that.isLike = res.data.zanVo !== null;
|
||||
this.fetchInnInfoList();
|
||||
}).catch((err) => {
|
||||
|
||||
@@ -608,6 +587,7 @@ export default {
|
||||
} else {
|
||||
getHomeHotelDetail(this.id).then((res) => {
|
||||
that.inn = res.data;
|
||||
that.isLike = res.data.zanVo !== null;
|
||||
this.fetchInnInfoList();
|
||||
}).catch((err) => {
|
||||
|
||||
@@ -619,14 +599,6 @@ export default {
|
||||
initPoster() {
|
||||
getPoster(this.id).then(({data}) => this.posterUrl = data);
|
||||
},
|
||||
infoDetail: function (info) {
|
||||
if (info.type == 'NT_TEXT') {
|
||||
|
||||
} else if (info.type == 'NT_VIDEO') {
|
||||
|
||||
}
|
||||
}
|
||||
,
|
||||
showLocation: function () {
|
||||
if (!this.inn.latitude || !this.inn.longitude) {
|
||||
this.$dialog.error('暂无位置信息');
|
||||
@@ -970,10 +942,13 @@ export default {
|
||||
}
|
||||
|
||||
.info-card {
|
||||
background: #EBECF0;
|
||||
border-radius: 8rpx;
|
||||
padding: 24rpx;
|
||||
width: 500rpx;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 40rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #EBECF0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user