|
@ -94,43 +94,135 @@
|
|||
.btnBKS{height: 120rpx;}
|
||||
.lianShare{height: 90rpx;width: 220rpx;}
|
||||
.backH{width: 190rpx;height: 190rpx;top: -126rpx;}
|
||||
|
||||
.addCart-btn{border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;background-color: #3875F6;}
|
||||
.mai-btn{border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;background-color: #F85050;}
|
||||
/* 商城 */
|
||||
.activecate,.shopMo{width: 216rpx;height: 65rpx;border-radius: 20rpx;line-height: 65rpx;text-align: center;background-color: #f2f2f2;color: #333333;}
|
||||
.activecate{color: #FFFFFF;}
|
||||
.shopMo span::after,.activecate span::after{display: inline-block;content: '';width: 16rpx;height: 13rpx;margin-left: 6rpx;}
|
||||
.shopMo span::after{background: url(/static/public/shopSJ.png) no-repeat;background-size: 100% 90%;}
|
||||
.activecate span::after{background: url(/static/public/shopSJ-active.png) no-repeat;background-size: 100% 90%;transform: rotate(180deg);background-position: 0 2rpx;}
|
||||
.shop-nav-box input{border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;}
|
||||
.shop-nav-box>view:first-child view,.jf-input-box>view:first-child view{height: 80rpx;line-height: 80rpx;}
|
||||
.shop_list_box>view>view:last-child{margin-bottom: 200rpx;}
|
||||
|
||||
.shop-nav-box .pad-zy50 view:nth-child(n+2){background: #3875F6;color: #FFFFFF;border-radius: 30rpx;padding: 8rpx 20rpx;font-size: 24rpx;display: flex;align-items: center;margin-right: 20rpx;margin-top: 30rpx;}
|
||||
.shop-nav-box .mar-s40{height: 60rpx;border: 2rpx solid #E0E0E0;border-radius: 10rpx;width: 100%;box-sizing: border-box;padding-left: 20rpx;font-size: 24rpx;}
|
||||
.shop-nav-box .mar-x30 view{font-size: 28rpx;width: 294rpx;height: 60rpx;border-radius: 10rpx;text-align: center;line-height: 60rpx; }
|
||||
.shop-nav-box .mar-x30 view:first-child{background: #E6E6E6;color: #4D4D4D;}
|
||||
.shop-nav-box .mar-x30 view:last-child{background: #3875F6;color: #FFFFFF;}
|
||||
.activebcate,.shopBMo{border-radius: 20rpx;background-color: #f2f2f2;color: #333333;padding: 12rpx 24rpx;}
|
||||
.activebcate{color: #FFFFFF;}
|
||||
|
||||
|
||||
.jf-input-box input{border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;}
|
||||
.jf-input-box image{width: 16rpx;height: 13rpx;}
|
||||
.jf-input-box image:last-child{margin-top: 4rpx;}
|
||||
.cart-box{position: fixed;right: 30rpx;bottom: 200rpx;}
|
||||
.cart-box .posir,.cart-box .posir image,.detail-cart-box .posir,.detail-cart-box .posir image{width: 112rpx;height: 112rpx;}
|
||||
.cart-box .posia,.detail-cart-box .posia{background: #F85050;width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;color: #FFFFFF;font-size: 24rpx;text-align: center;top: 20rpx;right: 20rpx;}
|
||||
.cart-box .posia view,.detail-cart-box .posia view{transform: scale(.8);}
|
||||
.moban{background: rgba(0,0,0,.54);width: 100%;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 2;}
|
||||
.detail-cart-box{position: fixed;right: 30rpx;bottom: 300rpx;}
|
||||
/* 商品详情 */
|
||||
.activelei,.molei{border-radius: 20rpx;padding: 10rpx 24rpx;color: #333333;margin-left: 20rpx;}
|
||||
.activelei{color: #FFFFFF;}
|
||||
|
||||
|
||||
.shop-title-box view{display: inline-block;float: left;}
|
||||
.shop-title-box view span{padding: 6rpx 10rpx;}
|
||||
.shop-title-box view span:nth-child(n+2){background: #F85050;}
|
||||
.shop-price{color: #F85050;font-size: 40rpx;font-weight: bold;}
|
||||
.shop-price span:last-child{color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;margin-left: 20rpx;}
|
||||
.yuan-price{color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;}
|
||||
.shar-box{margin-top: -20rpx;padding-bottom: 20rpx;}
|
||||
.shar-box>view:first-child image{width: 42rpx;height: 30rpx;}
|
||||
.shop-swiper{height: 280rpx;padding-top: 20rpx;}
|
||||
.big-img{width: 70rpx;height: 70rpx; border-radius: 100%;}
|
||||
.shop-swiper .bold{width: 140rpx;height: 80rpx;line-height: 80rpx;text-align: center;background: #F85050;border-radius: 20rpx;}
|
||||
.duan-xian{border-bottom: 2rpx solid #E6E6E6;position: absolute;bottom: 0;width: 87%;right: 0;}
|
||||
.bottom-popu,.order-cancle-tk{border-radius: 40rpx 40rpx 0rpx 0rpx;}
|
||||
.bottom-popu>view:first-child image{width: 214rpx;height: 214rpx;border-radius: 15rpx;bottom: 0;flex-shrink: 0;margin-top: -107rpx;margin-right: 30rpx;}
|
||||
.bottom-popu>view:first-child .width100 image{width: 24px;height: 24px;margin-top: -20rpx;}
|
||||
.del-btn,.add-btn{width: 65rpx;height: 30px;}
|
||||
.num-input{width: 80rpx;height: 28px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;}
|
||||
.ev-btn{width: 294rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 10rpx;}
|
||||
.pd-tk-box{position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 6;background: rgba(0,0,0,.54);display: flex;justify-content: center;align-items: center;}
|
||||
.pd-tk-box .posir{font-weight: 500;text-align: center;margin: 0 85rpx;height: 458rpx;}
|
||||
.pd-tk-box .posir view:nth-child(1){margin: 34rpx 0 27rpx 0;}
|
||||
.pd-tk-box .posir view:nth-child(2){margin-bottom: 63rpx;}
|
||||
.pd-tk-box .posir view:nth-child(3){margin-bottom: 77rpx;}
|
||||
.pd-tk-box .posir view:nth-child(3) image:nth-child(1),.pd-tk-box .posir view:nth-child(3) image:nth-child(3){width: 100rpx;height: 100rpx;border-radius: 100%;}
|
||||
.pd-tk-box .posir view:nth-child(3) image:nth-child(2){width: 42rpx;height: 42rpx;margin: 0 47rpx;}
|
||||
.pd-tk-box .posir view:nth-child(4){width: 464rpx;height: 60rpx;line-height: 60rpx;color: #FFFFFF;background: #F85050;border-radius: 10rpx;margin: 0 auto;font-size: 28rpx;}
|
||||
.pd-tk-box .posir>image{width: 77rpx;height: 77rpx;right: -30rpx;top: -30rpx;}
|
||||
swiper-item view:last-child .duan-xian{border-bottom: none;}
|
||||
/* 准备下单 */
|
||||
.activeT,.expressT{width: 124rpx;height: 60rpx;line-height: 60rpx;text-align: center;margin-left: 20rpx;border-radius: 20rpx;}
|
||||
.activeT{color: #FFFFFF;}
|
||||
.activeQuan::before{content: '';display: block;width: 50%;height: 8rpx;background: #3875F6;position: absolute;bottom: -20rpx;left: 50%;transform: translateX(-50%);}
|
||||
|
||||
|
||||
|
||||
.xiaDan-next{width: 16px;height: 16px;flex-shrink: 0;}
|
||||
.there{width: 90rpx;height: 86rpx;flex-shrink: 0;}
|
||||
.order-image{width: 166rpx;height: 166rpx;border-radius: 15rpx;margin-right: 12rpx;}
|
||||
.order-sy{font-size: 22rpx;color: #808080;font-weight: 500;margin-top: 6rpx;}
|
||||
.order-item-price{color: #F85050;font-size: 32rpx;font-weight: bold;}
|
||||
.goPayment{color: #FFFFFF;font-size: 28rpx;font-weight: bold;width: 170rpx;height: 70rpx;line-height: 70rpx;text-align: center;background: #3875F6;border-radius: 35rpx;margin-left: 10rpx;}
|
||||
.quan-item-box{height: 200rpx;}
|
||||
.quan-item-box>view:first-child{width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;}
|
||||
.quan-item-box>view:first-child image{width: 218rpx;height: 200rpx;left: 0;top: 0;}
|
||||
.quan-item-box>view:last-child{display: flex;flex-direction: column;justify-content: space-between;width: 100%;height: 200rpx;padding: 0 20rpx;background-color: #F5F5F5;}
|
||||
.quan-item-box>view:last-child image{float: right;}
|
||||
.quan-list-box{max-height: 600rpx;}
|
||||
.quan-list-box .mar-x40:last-child{margin-bottom: 0rpx;}
|
||||
.ling-btn{font-size: 36rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin-top: 156rpx;margin-bottom: 20rpx;}
|
||||
/* 立即支付页面 */
|
||||
.chooseDX,.quan-item-box>view:last-child image{width: 40rpx;height: 40rpx;border-radius: 100%;}
|
||||
.dao-box{padding: 55rpx 0 64rpx 0;text-align: center;}
|
||||
.submit-pay{margin: 0 auto;color: #FFFFFF;font-weight: bold;font-size: 36rpx;text-align: center;width: 546rpx;height: 90rpx;line-height: 90rpx;background-color: #3875F6;border-radius: 20rpx;}
|
||||
.success-btn{margin-bottom: 150rpx;}
|
||||
.success-btn view{width: 244rpx;height: 70rpx;border-radius: 10rpx;text-align: center;line-height: 70rpx;}
|
||||
.success-btn view:first-child{background: #E9E9E9;color: #333333;}
|
||||
/* 购物车页面 */
|
||||
.edit-btn{width: 113rpx;height: 43rpx;border-radius: 20rpx;background: #3875F6;text-align: center;color: #FFFFFF;line-height: 43rpx;}
|
||||
.cart-list-box{overflow: hidden;}
|
||||
.cart-input-box{border-radius: 4rpx;overflow: hidden;}
|
||||
.cart-input-box image{width: 46rpx;height: 26px;}
|
||||
.cart-input-box input{width: 60rpx;height: 24px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;}
|
||||
.goBuy-btn{width: 170rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;}
|
||||
.chooseAll-box{width: 40rpx;height: 40rpx;border-radius: 100%;border: 2rpx solid #3875F6;flex-shrink: 0;display: flex;justify-content: center;align-items: center;}
|
||||
.chooseAll-box view{width: 24rpx;height: 24rpx;background-color: #3875F6;border-radius: 100%;}
|
||||
.item-del-btn{width: 117rpx;height: 205rpx;background: #F85050;line-height: 205rpx;text-align: center;color: #FFFFFF;font-size: 24rpx;flex-shrink: 0;position: absolute;right: 0;bottom: 40rpx;top: 2rpx;}
|
||||
/* 我的订单页面 */
|
||||
.order-item-box image{width: 166rpx;height: 166rpx;border-radius: 15rpx;margin-right: 12rpx;}
|
||||
.order-btn{width: 140rpx;height: 50rpx;line-height: 50rpx;text-align: center;border-radius: 10rpx;background: #F85050;color: #FFFFFF;margin-left: 45rpx;}
|
||||
.order-cancle{width: 140rpx;height: 50rpx;line-height: 50rpx;text-align: center;border-radius: 10rpx;background: #E9E9E9;color: #808080;}
|
||||
.heyan-close{width: 96rpx;height: 96rpx;left: 50%;transform: translateX(-50%);bottom: -150rpx;}
|
||||
.confirm-btn{font-size: 36rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin: 80rpx 100rpx 20rpx 100rpx;}
|
||||
/* 地址管理页面 */
|
||||
.address_active{width: 40rpx;height: 40rpx;}
|
||||
.address_add{font-size: 30rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin: 0 93rpx;}
|
||||
.xiao-sanj image{width: 14rpx;height: 11rpx;}
|
||||
.xiao-sanj image:last-child{margin-top: 4rpx;}
|
||||
.address-btn-add{font-size: 30rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin: 80rpx 76rpx 20rpx 76rpx;}
|
||||
.address-close-btn{width: 77rpx;height: 77rpx;right: -55rpx;top: -36rpx;}
|
||||
.info-box{background: #fff;left: 0;right: 0;top: 52rpx;height: 0rpx;transition: all 0.5s;border: 2rpx solid #E6E6E6;opacity: 0; z-index: 6;overflow: hidden;overflow-y: scroll;color: #666;}
|
||||
.info-box view{margin: 10rpx;font-size: 24rpx;}
|
||||
.dong {height: 200rpx;border: 2rpx solid #E6E6E6;opacity: 1;}
|
||||
/* 优惠券页面 */
|
||||
.quan-btn{width: 136rpx;height: 48rpx;line-height: 48rpx;text-align: center;border-radius: 30rpx;background: #FFFFFF;color: #3875F6;margin-right: -10rpx;}
|
||||
.quan-img{width: 218rpx;height: 200rpx;left: 0;top: 0;}
|
||||
.quan-right-box{display: flex;flex-direction: column;justify-content: space-between;width: 100%;height: 200rpx;padding: 0 20rpx;background-color: #FFFFFF;}
|
||||
.quan-use{width: 94rpx;height: 94rpx;right: 20rpx;top: 20rpx;}
|
||||
.quan-tk-box{position: fixed;top: 0;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,.54);z-index: 3;}
|
||||
.quan-tk-btn{width: 96rpx;height: 96rpx;left: 50%;transform: translateX(-50%);bottom: -150rpx;}
|
||||
|
||||
|
||||
.bottoc{margin-top: 6rpx;color: #414141;}
|
||||
.opc{opacity: 0.7;}
|
||||
.width100{width: 100%;}
|
||||
.width33{width: 33%;}
|
||||
.width45{width: 45%;}
|
||||
.width50{width: 50%;}
|
||||
.width55{width: 55%;}
|
||||
|
||||
.posAll{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.45);z-index: 12;}
|
||||
.posir{position: relative;}
|
||||
.posia{position: absolute;}
|
||||
.poszy{position: fixed;left: 0;right: 0;z-index: 3;}
|
||||
.posiszy{position: fixed;left: 0;right: 0;z-index: 5;}
|
||||
.posixzy{position: fixed;left: 0;right: 0;z-index: 2;bottom: 0;}
|
||||
.posia-op{position: absolute;top: 0;right: 0;left: 0;bottom: 0;opacity: 0;}
|
||||
.syxzo{top: 0;left: 0;right: 0;bottom: 0;opacity: 0;}
|
||||
|
||||
|
||||
|
@ -147,6 +239,9 @@
|
|||
.flexs{flex-shrink: 0;}
|
||||
|
||||
|
||||
.wh42{width: 42rpx;height: 42rpx;}
|
||||
.wh44{width: 44rpx;height: 44rpx;}
|
||||
|
||||
button:after{content: none!important;}
|
||||
.borbot{border-bottom: 2rpx solid #E6E6E6;}
|
||||
.borbot:last-child{border-bottom: none;}
|
||||
|
@ -154,11 +249,65 @@ button:after{content: none!important;}
|
|||
.borbot-df{border: 2rpx solid #DFDFDF;}
|
||||
.borbot-cc{border: 2rpx solid #CCCCCC;}
|
||||
|
||||
.line-h50{line-height: 50rpx;}
|
||||
|
||||
|
||||
.clips1{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;}
|
||||
.clips2{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;}
|
||||
.clips3{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;}
|
||||
|
||||
|
||||
/* 字体大小 */
|
||||
.fon20{font-size: 20rpx;}
|
||||
.fon24{font-size: 24rpx;}
|
||||
.fon25{font-size: 25rpx;}
|
||||
.fon26{font-size: 26rpx;}
|
||||
.fon27{font-size: 27rpx;}
|
||||
.fon28{font-size: 28rpx;}
|
||||
.fon30{font-size: 30rpx;}
|
||||
.fon32{font-size: 32rpx;}
|
||||
.fon34{font-size: 34rpx;}
|
||||
.fon36{font-size: 36rpx;}
|
||||
.fon38{font-size: 38rpx;}
|
||||
.fon40{font-size: 40rpx;}
|
||||
.fon56{font-size: 56rpx;}
|
||||
|
||||
/* 字体颜色 */
|
||||
.colf{color: #FFFFFF;}
|
||||
.colb{color: #000000;}
|
||||
.colc{color: #CCCCCC;}
|
||||
.col3{color: #333333;}
|
||||
.col6{color: #666666;}
|
||||
.colf8{color: #F85050;}
|
||||
.col9{color: #999999;}
|
||||
.pcol{color: #3875F6;}
|
||||
.col2c{color: #2C2C2C;}
|
||||
.col80{color: #808080;}
|
||||
.col7D{color: #7D7D7D;}
|
||||
.colB3{color: #B3B3B3;}
|
||||
/* 字体位置 */
|
||||
.tc{text-align: center;}
|
||||
.tright{text-align: right;}
|
||||
|
||||
/* 粗体 */
|
||||
.bold{font-weight: bold;}
|
||||
|
||||
|
||||
/* 背景颜色 */
|
||||
.pbackc{background-color: #3875F6;}
|
||||
.bacf{background-color: #FFFFFF;}
|
||||
.bcdb{background-color: #DBDBDB;}
|
||||
.bcf8{background: #F85050;}
|
||||
|
||||
/* 圆角 */
|
||||
.radius10{border-radius: 10rpx;}
|
||||
.radius15{border-radius: 15rpx;}
|
||||
.radius20{border-radius: 20rpx;}
|
||||
.radius30{border-radius: 30rpx;}
|
||||
.radius35{border-radius: 35rpx;}
|
||||
.radius40{border-radius: 40rpx;}
|
||||
.radius45{border-radius: 45rpx;}
|
||||
|
||||
/* 上下左右---外边距 */
|
||||
.mar10{margin: 10rpx;}
|
||||
.mar20{margin: 20rpx;}
|
||||
|
@ -289,50 +438,10 @@ button:after{content: none!important;}
|
|||
.pad-y40{padding-right: 40rpx;}
|
||||
.pad-y50{padding-right: 50rpx;}
|
||||
|
||||
|
||||
|
||||
/* 字体大小 */
|
||||
.fon20{font-size: 20rpx;}
|
||||
.fon24{font-size: 24rpx;}
|
||||
.fon25{font-size: 25rpx;}
|
||||
.fon26{font-size: 26rpx;}
|
||||
.fon27{font-size: 27rpx;}
|
||||
.fon28{font-size: 28rpx;}
|
||||
.fon30{font-size: 30rpx;}
|
||||
.fon32{font-size: 32rpx;}
|
||||
.fon34{font-size: 34rpx;}
|
||||
.fon36{font-size: 36rpx;}
|
||||
.fon38{font-size: 38rpx;}
|
||||
.fon40{font-size: 40rpx;}
|
||||
|
||||
/* 字体颜色 */
|
||||
.colf{color: #FFFFFF;}
|
||||
.colb{color: #000000;}
|
||||
.colc{color: #CCCCCC;}
|
||||
.col3{color: #333333;}
|
||||
.col6{color: #666666;}
|
||||
.col9{color: #999999;}
|
||||
.pcol{color: #3875F6;}
|
||||
.col2c{color: #2C2C2C;}
|
||||
.col80{color: #808080;}
|
||||
/* 字体位置 */
|
||||
.tc{text-align: center;}
|
||||
.tright{text-align: right;}
|
||||
|
||||
/* 粗体 */
|
||||
.bold{font-weight: bold;}
|
||||
|
||||
|
||||
/* 背景颜色 */
|
||||
.pbackc{background-color: #3875F6;}
|
||||
.bacf{background-color: #FFFFFF;}
|
||||
.bcdb{background-color: #DBDBDB;}
|
||||
|
||||
/* 圆角 */
|
||||
.radius10{border-radius: 10rpx;}
|
||||
.radius15{border-radius: 15rpx;}
|
||||
.radius20{border-radius: 20rpx;}
|
||||
.radius30{border-radius: 30rpx;}
|
||||
.pad-sx27-zy20{padding: 27rpx 20rpx;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -141,7 +141,8 @@
|
|||
if(!this.jieDuan){
|
||||
let isAuth = this.$toolAll.tools.returnAuth()
|
||||
if(!isAuth){
|
||||
uni.reLaunch({url:'/pages/tabbar/my/my'})
|
||||
// uni.reLaunch({url:'/pages/tabbar/my/my'})
|
||||
uni.reLaunch({url:'/pages/tabbar/my/staffDuan'})
|
||||
} else this.jieDuan = true
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1,98 +1,78 @@
|
|||
<template>
|
||||
<view class="pad20 shop_list_box">
|
||||
<view style="width: 48.6%;float: left;">
|
||||
<view class="bacf radius15 mar-x20" @tap="goPage">
|
||||
<image src="../../../static/public/wen-one.png" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view v-if="index1%2==0" v-for="(item1,index1) in dataList" :key="index1" class="bacf radius15 mar-x20" @tap="goPage(item1.id,index1)">
|
||||
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view class="pad-zy20 pad-s10 pad-x30">
|
||||
<view class="fon28 bold col3 clips2">【99皮皮节】【种植发际 线】1000单位FUE技术...</view>
|
||||
<view class="disac fon20 mar-sx20">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">秃顶种植</view>
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;background: #F85050;">团购</view>
|
||||
<view class="fon28 bold col3 clips2">{{item1.title}}</view>
|
||||
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
|
||||
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;">团购</view>
|
||||
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;">拼团活动</view>
|
||||
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;">限时促销</view>
|
||||
</view>
|
||||
<view class="disac">
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">¥3888</view>
|
||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥4205</view>
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
|
||||
<view v-if="item1.isIntegral" class="mar-s20">
|
||||
<view>积分:{{item1.integral}}</view>
|
||||
<view class="disac mar-s20" v-if="item1.grade!=0">
|
||||
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
|
||||
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<span v-if="item1.isPing">拼团价</span>
|
||||
<span v-if="item1.isXian">促销价</span>
|
||||
¥{{item1.zhePrice}}
|
||||
</view>
|
||||
<view class="bacf radius15 mar-x20">
|
||||
<image src="../../../static/public/wen-one.png" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view class="pad-zy20 pad-s10 pad-x30">
|
||||
<view class="fon28 bold col3 clips2">【99皮皮节】【种植发际 线】1000单位FUE技术...</view>
|
||||
<view class="disac fon20 mar-sx20">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">秃顶种植</view>
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;background: #F85050;">团购</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="disjbac">
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">拼团价¥3888</view>
|
||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥4205</view>
|
||||
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view>
|
||||
</view>
|
||||
<view class="disjbac mar-s20">
|
||||
<view class="fon24 col80">已拼团10组</view>
|
||||
<view v-if="item1.isPing" class="disjbac mar-s20">
|
||||
<view class="fon24 col80">已拼团{{item1.activity_group_num}}组</view>
|
||||
<view class="disac">
|
||||
<image src="../../../static/tabbar/mya.png" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;"></image>
|
||||
<image src="../../../static/tabbar/mym.png" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
|
||||
<image src="../../../static/tabbar/homeAc.png" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
|
||||
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bacf radius15 mar-x20">
|
||||
<image src="../../../static/public/wen-one.png" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view class="pad-zy20 pad-s10 pad-x30">
|
||||
<view class="fon28 bold col3 clips2">【99皮皮节】【种植发际 线】1000单位FUE技术...</view>
|
||||
<view class="disac fon20 mar-sx20">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">秃顶种植</view>
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;background: #F85050;">团购</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="disjbac">
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">促销价¥3888</view>
|
||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥4205</view>
|
||||
</view>
|
||||
<view class="fon24 col80 mar-s20">结束时间:15小时00分00秒</view>
|
||||
</view>
|
||||
<view v-if="item1.isXian" class="fon24 col80 mar-s20">结束时间:15小时00分00秒</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 48.6%;float: right;">
|
||||
<view class="bacf radius15 mar-x20">
|
||||
<image src="../../../static/public/wen-one.png" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view v-if="index1%2!=0" v-for="(item1,index1) in dataList" :key="index1" class="bacf radius15 mar-x20" @tap="goPage(item1.id,index1)">
|
||||
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view class="pad-zy20 pad-s10 pad-x30">
|
||||
<view class="fon28 bold col3 clips2">【99皮皮节】【种植发际 线】1000单位FUE技术...</view>
|
||||
<view class="disac fon20 mar-sx20">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">秃顶种植</view>
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;background: #F85050;">团购</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="disjbac">
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">拼团价¥3888</view>
|
||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥4205</view>
|
||||
</view>
|
||||
<view class="disjbac">
|
||||
<view class="fon24 col80">已拼团10组</view>
|
||||
<view>
|
||||
<image src="" mode="" style="width: 40rpx;height: 40rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bacf radius15 mar-x20">
|
||||
<image src="../../../static/public/wen-one.png" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||
<view class="pad-zy20 pad-s10 pad-x30">
|
||||
<view class="fon28 bold col3 clips2">【99皮皮节】【种植发际 线】1000单位FUE技术...</view>
|
||||
<view class="disac fon20 mar-sx20">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">秃顶种植</view>
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;background: #F85050;">团购</view>
|
||||
<view class="fon28 bold col3 clips2">{{item1.title}}</view>
|
||||
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
|
||||
<view class="radius10 colf" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
|
||||
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;margin-left: 10rpx;">团购</view>
|
||||
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;margin-left: 10rpx;">拼团活动</view>
|
||||
</view>
|
||||
<view class="disac">
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">¥3888</view>
|
||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥4205</view>
|
||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
|
||||
<view v-if="item1.isIntegral" class="mar-s20">
|
||||
<view>积分:{{item1.integral}}</view>
|
||||
<view class="disac mar-s20" v-if="item1.grade!=0">
|
||||
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
|
||||
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<span v-if="item1.isPing">拼团价</span>
|
||||
<span v-if="item1.isXian">促销价</span>
|
||||
¥{{item1.zhePrice}}
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view>
|
||||
</view>
|
||||
<view v-if="item1.isPing" class="disjbac mar-s20">
|
||||
<view class="fon24 col80">已拼团{{item1.activity_group_num}}组</view>
|
||||
<view class="disac">
|
||||
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item1.isXian" class="fon24 col80 mar-s20">结束时间:15小时00分00秒</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -101,15 +81,41 @@
|
|||
<script>
|
||||
export default {
|
||||
name:"shop-list",
|
||||
props:{
|
||||
dataList:{
|
||||
type:Array,
|
||||
default:function(){
|
||||
return [
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',//商品图片
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',//标题
|
||||
zhePrice:'3888',//折扣价
|
||||
yuanPrice:'4205',//原价
|
||||
integral:'2888',//积分
|
||||
isTuan:false,//是否团购
|
||||
isPing:false,//是否拼团
|
||||
isXian:false,//是否限时促销
|
||||
isIntegral:false,//是否是积分
|
||||
grade:0,//等级
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
publicColor:uni.getStorageSync('publicColor'),
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
goPage(){//进入商品详情事件
|
||||
goPage(id,index){//进入商品详情事件
|
||||
let isText = '';
|
||||
if(this.dataList[index].isTuan) isText = "团购"
|
||||
if(this.dataList[index].isPing) isText = "拼团"
|
||||
if(this.dataList[index].isXian) isText = "限时"
|
||||
if(this.dataList[index].integral) isText = "积分"
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/shopDetail/shopDetail'
|
||||
url:`/pagesB/shopDetail/shopDetail?id=${id}&isText=${isText}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<view class="status-nav" :style="{background:backgroudColor}">
|
||||
<!-- 返回键 -->
|
||||
<view @tap="backEvent" v-if="statusBack" style="height: 33rpx;width: 80rpx;flex-shrink: 0;position: absolute;">
|
||||
<image class="tab-back" src="/static/public/backBlackm.png"></image>
|
||||
<image v-if="backColor==0" class="tab-back" src="/static/public/backBlackm.png"></image>
|
||||
<image v-if="backColor==1" class="tab-back" src="/static/public/videoBack.png"></image>
|
||||
</view>
|
||||
<!-- 标题 -->
|
||||
<!-- <view v-if="statusTitle" :class="statusBack ? 'tcenter' : 'tleft'" class="tab-title" :style="{color:tabcolor}">{{titleVal}}</view> -->
|
||||
|
@ -41,6 +42,10 @@
|
|||
whereCome:{//来自哪个页面
|
||||
type:Number,
|
||||
default:0
|
||||
},
|
||||
backColor:{//返回键颜色
|
||||
type:Number,
|
||||
default:0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -4,7 +4,8 @@ console.log('当前环境', process.env.NODE_ENV)
|
|||
const apiHub = {
|
||||
//开发环境
|
||||
development: {
|
||||
BASE_URL: "https://hm.hmzfyy.cn/api/",
|
||||
BASE_URL: "https://hengmei.scdxtc.cn/api/",
|
||||
// BASE_URL: "https://hm.hmzfyy.cn/api/",
|
||||
IMG_URL: "https://xx",
|
||||
BASE_UPLOAD_URL: "",
|
||||
},
|
||||
|
|
|
@ -31,6 +31,38 @@ export function cancleCollectionEV(data){//取消收藏事件
|
|||
}
|
||||
},error=>{})
|
||||
}
|
||||
// 商品收藏、积分收藏
|
||||
export function collectionShopEV(data){//收藏事件
|
||||
console.log(data);
|
||||
return requst.post('spu/record',data).then(res=>{
|
||||
if(res.code==0) {
|
||||
let newMsg = ''
|
||||
let num = 0
|
||||
if(data.action=='collect'){
|
||||
num = 3
|
||||
newMsg = '收藏成功'
|
||||
}
|
||||
let maiOjb = {
|
||||
e:num,//内容收藏
|
||||
c:data.id*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
toolAll.tools.maiDian(maiOjb)
|
||||
toolAll.tools.showToast(newMsg,'none',1500)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
export function cancleCollectionShopEV(data){//取消收藏事件
|
||||
return requst.post('spu/un-record',data).then(res=>{
|
||||
if(res.code==0) {
|
||||
let newMsg = ''
|
||||
if(data.action=='collect'){
|
||||
newMsg = '已取消收藏'
|
||||
}
|
||||
toolAll.tools.showToast(newMsg,'none',1500)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
export function buriedPoint(){//查询埋点类型事件
|
||||
return requst.post('statistics/event').then(res=>{
|
||||
// console.log('查询所有需要埋点的类型:',res);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const domainName = 'https://hm.hmzfyy.cn/api/'//域名配置
|
||||
const domainName = 'https://hengmei.scdxtc.cn/api/'//域名配置
|
||||
// 统一给参数
|
||||
const dataObj = (url, params) => {
|
||||
let options = params
|
||||
|
|
|
@ -104,6 +104,11 @@ const tools = {
|
|||
hname = `${name.substr(0, 1)}****${name.substr(name.length-1)}`
|
||||
return hname
|
||||
},
|
||||
// 整数添加.00,小数就不添加
|
||||
addXiaoShu(num){
|
||||
let str = num.toString();
|
||||
return str.includes('.') ? num : num = num + '.00';
|
||||
},
|
||||
// 时间戳===>日期
|
||||
timestampToTime(timestamp) {
|
||||
var date = timestamp.toString().length==13 ? new Date(timestamp*1) : new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||||
|
@ -281,7 +286,7 @@ const tools = {
|
|||
language:obj.language
|
||||
}
|
||||
uni.request({
|
||||
url: `https://hm.hmzfyy.cn/api/user/login`,
|
||||
url: `https://hengmei.scdxtc.cn/api/user/login`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
|
@ -321,6 +326,18 @@ const tools = {
|
|||
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0 ){
|
||||
this.overdue()
|
||||
}
|
||||
},
|
||||
clickCopy(data){
|
||||
uni.setClipboardData({
|
||||
data: data,
|
||||
success: function() {
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
"compilerVersion" : 3,
|
||||
/* 5+App特有相关 */
|
||||
"modules" : {
|
||||
"Payment" : {}
|
||||
"Payment" : {},
|
||||
"Share" : {}
|
||||
},
|
||||
/* 模块配置 */
|
||||
"distribute" : {
|
||||
|
@ -48,7 +49,13 @@
|
|||
}
|
||||
},
|
||||
"push" : {},
|
||||
"geolocation" : {}
|
||||
"geolocation" : {},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wxa02e44170bc722cd",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
84
pages.json
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"pages": [
|
||||
{
|
||||
"path" : "pages/tabbar/my/staffDuan",
|
||||
"style" :{}
|
||||
},{
|
||||
"path" : "pages/tabbar/pagehome/pagehome",
|
||||
"style" :{}
|
||||
},{
|
||||
|
@ -72,6 +75,87 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "member/member",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "integralManage/integralManage",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "peacockCoin/peacockCoin",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "signIn/signIn",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "myOrder/myOrder",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "myAddress/myAddress",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "activityTask/activityTask",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "coupon/coupon",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pointsMall/pointsMall",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
<view class="bacf radius20 width100 tank-box">
|
||||
<view class="tc tank-box-itemone">请授权绑定手机号</view>
|
||||
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
|
||||
<view @tap="refuse" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
|
||||
<!-- <view @tap="refuse" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view> -->
|
||||
<view class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
|
||||
<view :style="{background:publicColor}" class="pad-sx10 radius10 tank-btn posir">
|
||||
立即绑定
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
|
||||
|
@ -57,7 +58,7 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
refuse(){
|
||||
refuse(){//暂不绑定事件
|
||||
this.isShowP=false
|
||||
this.$toolAll.tools.showToast('登录成功','success')
|
||||
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
||||
|
@ -93,7 +94,7 @@
|
|||
desc: '登录',
|
||||
lang: 'zh_CN',
|
||||
success: (res) => {
|
||||
// console.log('res',res);
|
||||
console.log('res',res);
|
||||
ya.userInfo = res.userInfo;
|
||||
// console.log('可用用户信息:',ya.userInfo);
|
||||
try {
|
||||
|
|
|
@ -0,0 +1,441 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :backgroudColor="publicColor" :tabcolor="publicColor" :statusTitle="true" :statusBack="false"></status-nav>
|
||||
<image src="/static/public/staff-head.png" style="position: absolute;top: 0;left: 0;right: 0;height: 436rpx;width: 100%;"></image>
|
||||
<view class="mar-zy32 posir pad-x260" :style="{paddingTop:statusHNH+'px'}">
|
||||
<view class="radius20 posir gao">
|
||||
<view class="posia" :style="{top:`-${gaoh*0.4}px`,height:gaoh+'px'}" style="left: -32rpx;right: -32rpx;z-index: -1;"></view>
|
||||
<view class="disjbac">
|
||||
<view class="disac colf">
|
||||
<!-- 头像 -->
|
||||
<image class="mar-sx30" :src="userInfo.headimgurl || ''" style="width:120rpx;height: 120rpx;border-radius: 100%;margin-left: 15rpx;z-index: 1;" mode="aspectFill"></image>
|
||||
<view class="mar-z30">
|
||||
<!-- 昵称 -->
|
||||
<view class="disac">
|
||||
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
|
||||
<view style="background: #FFBD39;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFFFFF;padding: 5rpx 16rpx;margin-left: 10rpx;">黄金</view>
|
||||
</view>
|
||||
<view class="disac mar-s10" v-if="userInfo.mobile!==''">
|
||||
<image src="/static/public/phone-02.png" style="width: 14rpx;height: 20rpx;" mode=""></image>
|
||||
<!-- 手机号 -->
|
||||
<view class="fon24 mar-z10">{{userInfo.mobile}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mar-y25 disac">
|
||||
<!-- 二维码 -->
|
||||
<image @tap="isQrcode=true" src="/static/public/staff-qro.png" style="width: 43rpx;height: 43rpx;z-index: 1;" mode=""></image>
|
||||
<!-- 前进键 -->
|
||||
<view @tap="goNodifyData" style="width: 50rpx;position: relative;z-index: 1;justify-content: flex-end;" class="disac">
|
||||
<image class="" src="/static/public/next-white.png" style="width: 35rpx;height: 35rpx;z-index: 1;" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
|
||||
<view>
|
||||
<view class="disac"><span style="font-weight: bold;margin-right: 20rpx;">VIP</span>黄金会员</view>
|
||||
</view>
|
||||
<navigator url="/pagesA/member/member" hover-class="none">
|
||||
<view class="disac">
|
||||
<view>更多权益</view>
|
||||
<image src="/static/public/next-yellow.png" style="width: 22rpx;height: 22rpx;" mode=""></image>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disja posir" style="z-index: 1;margin-top: 75rpx;">
|
||||
<view @tap="choosesjf(indext)" class="disac fc flexs" style="width: 33%;" v-for="(itemt,indext) in tongList" :key="indext">
|
||||
<view class="fon28 bold mar-sx20 clips1">{{itemt.num}}<text v-if="indext==2">天</text></view>
|
||||
<view class="fon28 mar-x25">{{itemt.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 员工功能 v-if="userInfo.is_staff && yuanList.length!=0" -->
|
||||
<view v-if="userInfo.is_staff==1" class="bacf radius20 mar-s20 pad20">
|
||||
<view class="bacf radius20 mar-s20 pad20">
|
||||
<view class="mar-x30 fon28 bold col3">员工功能</view>
|
||||
<view class="disac yuan-box">
|
||||
<view @tap="chooseYitem(indexy)" style="width: 33%;display: flex;justify-content: center;align-items: center;position: relative;" v-for="(itemy,indexy) in yuanList" :key="indexy">
|
||||
<view class="disac fc">
|
||||
<image :src="itemy.src" style="width: 54rpx;height: 54rpx;" mode="aspectFill"></image>
|
||||
<view class="fon28 mar-s20 mar-x10">{{itemy.title}}</view>
|
||||
</view>
|
||||
<view v-if="indexy<(yuanList.length-1)" style="height: 58rpx;border: 2rpx solid #E6E6E6;position: absolute;right: 0;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的订单 -->
|
||||
<view class="bacf radius20 mar-s20 pad20">
|
||||
<view class="mar-x30 fon28 col3 disjbac">
|
||||
<view>我的订单</view>
|
||||
<navigator url="/pagesA/myOrder/myOrder?index=0" hover-class="none">
|
||||
<view class="disac">
|
||||
<view class="fon24 col9">全部</view>
|
||||
<image src="/static/public/nextM.png" style="width: 22rpx;height: 22rpx;" mode=""></image>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="disja fon28 col3">
|
||||
<view @tap="chooseOrderStatus(indexo)" v-for="(itemo,indexo) in myOrderList" :key="indexo">
|
||||
<view class="disac fc posir">
|
||||
<image :src="itemo.src" style="width: 60rpx;height: 60rpx;" mode="aspectFill"></image>
|
||||
<view class="mar-s20 mar-x10">{{itemo.title}}</view>
|
||||
<view class="posia" style="width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;background: #F96969;right: 0;top: 0;font-size: 22rpx;color: #FFFFFF;text-align: center;">19</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 广告 -->
|
||||
<image @tap="goPage" class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image>
|
||||
<!-- 功能列表① -->
|
||||
<view class="bacf radius20 mar-s20">
|
||||
<view class="disjbac fon28 col3 fw">
|
||||
<view @tap="goPageNew(indexm)" v-for="(itemm,indexm) in moneyList" :key="indexm" class="mar-s20 mar-x20" style="width: 25%;">
|
||||
<view class="disac fc">
|
||||
<image :src="itemm.src" style="width: 60rpx;height: 60rpx;" mode="aspectFill"></image>
|
||||
<view class="mar-s20 mar-x10">{{itemm.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 功能列表② -->
|
||||
<view class="bacf radius20 mar-s20">
|
||||
<view class="disac fon28 col3 fw">
|
||||
<view @tap="goPageTwo(indexf)" v-for="(itemf,indexf) in toolsList" :key="indexf" class="mar-s20 mar-x20" style="width: 25%;">
|
||||
<view class="disac fc posir">
|
||||
<image :src="itemf.src" style="width: 60rpx;height: 60rpx;" mode="aspectFill"></image>
|
||||
<view class="mar-s20 mar-x10">{{itemf.title}}</view>
|
||||
<view v-if="indexf==4" class="posia" style="width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;background: #F96969;right: 50rpx;top: 0;font-size: 22rpx;color: #FFFFFF;text-align: center;">19</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 我的二维码弹框 -->
|
||||
<view v-if="isQrcode" class="posAll disjcac">
|
||||
<view>
|
||||
<view class="bacf radius20" style="margin: 0 130rpx;">
|
||||
<view class="fon28 col3 tc pad-s40">我的二维码</view>
|
||||
<image :src="myqr" style="width: 325rpx;height: 325rpx;margin: 30rpx 86rpx 68rpx 86rpx;" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="disjcac">
|
||||
<image @tap="isQrcode=false" class="mar-s50" src="/static/public/qrcodec.png" style="width: 96rpx;height: 96rpx;border-radius: 100%;" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部tab -->
|
||||
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
|
||||
<!-- 弹框授权 -->
|
||||
<empower :vision="vision" @cancleEv="cancleEv"></empower>
|
||||
<view v-if="isQian" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);">
|
||||
<view style="padding: 20rpx 40rpx;background-color: rgba(0,0,0,.6);color: #FFFFFF;border-radius: 6rpx;">签到成功</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {base64ToPath} from '@/jsFile/base64-src.js';
|
||||
import empower from '@/components/empower.vue';
|
||||
import {checkBanner} from '@/jsFile/publicAPI.js';
|
||||
export default {
|
||||
components:{empower},
|
||||
data() {
|
||||
return {
|
||||
vision:false,
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),
|
||||
tongList:[
|
||||
{num:'0',title:'我的积分'},
|
||||
{num:'0',title:'孔雀币'},
|
||||
{num:'0',title:'连续签到'}
|
||||
],
|
||||
yuanList:[], //'customer-list','footmarks','scan'
|
||||
zanCyuanList:[
|
||||
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
|
||||
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
|
||||
{src:'/static/public/scan.png',title:'扫码签到',rule:'scan'},
|
||||
],
|
||||
myOrderList:[//我的订单状态
|
||||
{src:'/static/public/dai-fu60.png',title:'待付款'},
|
||||
{src:'/static/public/dai-fa60.png',title:'待发货'},
|
||||
{src:'/static/public/dai-shou60.png',title:'待收货'},
|
||||
{src:'/static/public/wan-60.png',title:'已完成'},
|
||||
],
|
||||
moneyList:[
|
||||
{src:'/static/public/integral60.png',title:'积分商城'},
|
||||
{src:'/static/public/address60.png',title:'地址管理'},
|
||||
{src:'/static/public/day60.png',title:'日程提醒'},
|
||||
{src:'/static/public/ren60.png',title:'活动任务'},
|
||||
{src:'/static/public/quan60.png',title:'优惠券'},
|
||||
{src:'/static/public/kong60.png',title:'孔雀币'},
|
||||
{src:'/static/public/scor60.png',title:'积分管理'},
|
||||
{src:'/static/public/signIn.png',title:'签到记录'},
|
||||
],
|
||||
toolsList:[
|
||||
{src:'/static/public/staff-yue60.png',title:'自助预约',num:''},
|
||||
{src:'/static/public/staff-hai60.png',title:'个人海报',num:''},
|
||||
{src:'/static/public/staff-collection60.png',title:'收藏',num:''},
|
||||
{src:'/static/public/staff-share.png',title:'分享中心',num:''},
|
||||
{src:'/static/public/staff-msg60.png',title:'消息通知',num:''},
|
||||
{src:'/static/public/staff-tou60.png',title:'投诉与建议',num:''},
|
||||
{src:'/static/public/staff-about60.png',title:'关于我们',num:''},
|
||||
],
|
||||
isQrcode:false,//是否显示我的二维码
|
||||
userInfo:{},//用户信息
|
||||
gaoh:uni.getStorageSync('gao'),
|
||||
myqr:'/static/public/qrcode.png',
|
||||
is_worker:'',//是否为职工账号,0否(客户), 1是
|
||||
is_doctor:'',//是否为医生,0否,1是
|
||||
is_servicer:'',//是否为客服,0否,1是
|
||||
is_staff:'',//是否为普通员工,0否,1是
|
||||
titleList:[],
|
||||
imgList:[],
|
||||
isQian:false,
|
||||
bannerList:[],
|
||||
guangImg:'',
|
||||
isAuth:'',
|
||||
guanggao:'',
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
//相当于监听返回按钮
|
||||
let pages = getCurrentPages();
|
||||
// console.log('pages:',pages);
|
||||
},
|
||||
onShow() {
|
||||
uni.removeStorageSync('uinfo')//清空用户缓存信息
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.checkInfo()
|
||||
uni.removeStorageSync('shareAll')//清空分享中心里的统计信息
|
||||
this.$requst.post('index/mini-program-setting').then(res=>{
|
||||
// log('数据:',res);
|
||||
if(res.code==0){
|
||||
if(res.data.length!=0){
|
||||
if(res.data.footBar.length!=0){//底部导航
|
||||
res.data.footBar.forEach(item=>{
|
||||
let newName = item.name
|
||||
let newObj = {
|
||||
iconPath:this.$http + item.icon[0],
|
||||
selectedIconPath:this.$http + item.icon[1],
|
||||
}
|
||||
if(item.key=="home"){
|
||||
this.imgList[0] = newObj
|
||||
this.titleList[0] = newName
|
||||
}
|
||||
if(item.key=="category"){
|
||||
this.imgList[1] = newObj
|
||||
this.titleList[1] = newName
|
||||
}
|
||||
if(item.key=="service"){
|
||||
this.imgList[2] = newObj
|
||||
this.titleList[2] = newName
|
||||
}
|
||||
if(item.key=="shop"){
|
||||
this.imgList[3] = newObj
|
||||
this.titleList[3] = newName
|
||||
}
|
||||
if(item.key=="my"){
|
||||
this.imgList[4] = newObj
|
||||
this.titleList[4] = newName
|
||||
}
|
||||
})
|
||||
uni.setStorageSync('footTitle',this.titleList)
|
||||
uni.setStorageSync('footimg',this.imgList)
|
||||
this.titleList = uni.getStorageSync('footTitle')
|
||||
this.imgList = uni.getStorageSync('footimg')
|
||||
}
|
||||
}
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
onLoad() {
|
||||
if(uni.getStorageSync('gao')==''){
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.gao').boundingClientRect((rect) => {
|
||||
uni.setStorageSync('gao',rect.height)
|
||||
this.gaoh = rect.height
|
||||
}).exec()
|
||||
}
|
||||
this.checkSwi()
|
||||
this.checkGM()
|
||||
},
|
||||
methods: {
|
||||
goPageNew(index){
|
||||
if(index==0){uni.navigateTo({url:'/pagesA/pointsMall/pointsMall'})}
|
||||
if(index==1){uni.navigateTo({url:'/pagesA/myAddress/myAddress'})}
|
||||
if(index==2){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter?index=true'})}
|
||||
if(index==3){uni.navigateTo({url:'/pagesA/activityTask/activityTask'})}
|
||||
if(index==4){uni.navigateTo({url:'/pagesA/coupon/coupon'})}
|
||||
if(index==5){uni.navigateTo({url:'/pagesA/peacockCoin/peacockCoin'})}
|
||||
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
|
||||
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
||||
},
|
||||
goPageTwo(index){
|
||||
if(index==0){uni.navigateTo({url:'/pagesA/makeAnPppointment/makeAnPppointment'})}
|
||||
if(index==1){uni.navigateTo({url:'/pagesB/personalPoster/personalPoster'})}
|
||||
if(index==2){uni.navigateTo({url:'/pagesB/myCollection/myCollection'})}
|
||||
if(index==3){uni.navigateTo({url:'/pagesB/sharingCenter/sharingCenter'})}
|
||||
if(index==4){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter'})}
|
||||
if(index==5){uni.navigateTo({url:'/pagesA/suggestions/suggestions'})}
|
||||
if(index==6){uni.navigateTo({url:'/pagesB/aboutUs/aboutUs'})}
|
||||
},
|
||||
chooseOrderStatus(index){
|
||||
let statusIndex = ''
|
||||
if(index==0) statusIndex = 1;
|
||||
if(index==1) statusIndex = 2;
|
||||
if(index==2) statusIndex = 4;
|
||||
if(index==3) statusIndex = 5;
|
||||
uni.navigateTo({
|
||||
url:'/pagesA/myOrder/myOrder?index='+statusIndex
|
||||
})
|
||||
},
|
||||
goPage(){
|
||||
uni.navigateTo({
|
||||
url:this.guanggao
|
||||
})
|
||||
},
|
||||
checkSwi(){
|
||||
checkBanner({position:'personal-center-banner'}).then(res=>{
|
||||
// console.log('res',res);
|
||||
if(res.code==0){
|
||||
if(res.data.length!=0){
|
||||
this.guangImg = this.$http + res.data[0].src
|
||||
this.guanggao = res.data[0].url
|
||||
// res.data.forEach(item=>{
|
||||
// let isVideo = false
|
||||
// if(item.type!='img') isVideo = true
|
||||
// let banObj = {
|
||||
// imgSrc:this.$http + item.src,
|
||||
// url:item.url,
|
||||
// isVideo:isVideo,
|
||||
// poster:this.$http + item.src,
|
||||
// }
|
||||
// this.bannerList.push(banObj)
|
||||
// })
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
cancleEv(e){
|
||||
if(e==0) this.vision = false
|
||||
},
|
||||
checkGM(){//查询个人二维码事件
|
||||
this.$requst.post('user/personal-qr').then(res=>{
|
||||
// console.log('个人二维码:',res);
|
||||
if(res.code==0){
|
||||
base64ToPath(res.data.qr).then(path => {
|
||||
this.myqr = path
|
||||
uni.setStorageSync('imgSrc',path)
|
||||
}).catch(error => {})
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
checkInfo(){
|
||||
this.$requst.post('user/info').then(res=>{
|
||||
// console.log('用户信息:',res);
|
||||
if(res.code==0 && res.data.length!=0) {
|
||||
this.userInfo = res.data;
|
||||
this.userInfo.mobile = this.$toolAll.tools.hideMPhone(this.userInfo.mobile);
|
||||
this.tongList[1].num = res.data.score//个人积分
|
||||
this.tongList[0].num = res.data.collects//收藏总数
|
||||
this.tongList[2].num = res.data.share_users.total//分享人总数
|
||||
this.toolsList[4].num = res.data.unread_messages//分享人总数
|
||||
this.is_worker = res.data.is_worker//是否为职工账号,0否(客户), 1是
|
||||
this.is_doctor = res.data.is_doctor//是否为医生,0否,1是
|
||||
this.is_servicer = res.data.is_servicer//是否为客服,0否,1是
|
||||
this.is_staff = res.data.is_staff//是否为普通员工,0否,1是
|
||||
if(res.data.is_staff==1){
|
||||
if(this.toolsList.length!=8){
|
||||
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
|
||||
}
|
||||
}
|
||||
uni.setStorageSync('shareAll',res.data)
|
||||
if(res.data.rules.length!=0){
|
||||
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
|
||||
this.yuanList = result
|
||||
uni.setStorageSync('rules',res.data.rules)
|
||||
} else this.yuanList = []
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
chooseItem(index){//列表事件
|
||||
// console.log('当前选项:',this.toolsList[index].title);
|
||||
let newUrl = ''
|
||||
if(index==0) newUrl = '/pagesA/makeAnPppointment/makeAnPppointment'
|
||||
if(index==1) newUrl = '/pagesB/personalPoster/personalPoster'
|
||||
if(index==2) newUrl = '/pagesB/myCollection/myCollection'
|
||||
if(index==3) newUrl = '/pagesB/sharingCenter/sharingCenter'
|
||||
if(index==4) newUrl = '/pagesB/messagecenter/messagecenter'
|
||||
if(index==5) newUrl = '/pagesA/suggestions/suggestions'
|
||||
if(index==6) newUrl = '/pagesB/aboutUs/aboutUs'
|
||||
if(index==7) newUrl = '/pagesB/customer/customer'
|
||||
uni.navigateTo({
|
||||
url:newUrl
|
||||
})
|
||||
},
|
||||
chooseYitem(index){//员工功能事件
|
||||
// console.log('当前选项:',this.yuanList[index].title);
|
||||
switch (index){
|
||||
case 0:
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/customerList/customerList'
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
uni.navigateTo({
|
||||
url:'/pagesB/userFootprint/userFootprint'
|
||||
})
|
||||
break;
|
||||
case 2:
|
||||
wx.scanCode({ // 微信扫码 调起客户端扫码界面进行扫码
|
||||
complete: (res) => {}, //接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
fail: (res) => {}, //接口调用失败的回调函数
|
||||
onlyFromCamera: false, //是否只能从相机扫码,不允许从相册选择图片,这里是只允许相机扫码
|
||||
scanType: ['qrCode'], // scanType:扫码类型 : 二维码
|
||||
success: (rt) => { // 接口调用成功的回调函数
|
||||
let uc = JSON.parse(rt.result).user_coding
|
||||
this.$requst.post('user/sign-in',{user_coding:uc}).then(res=>{
|
||||
// console.log('执行扫码事件:',res);
|
||||
if(res.code==0){
|
||||
this.isQian = true
|
||||
setTimeout(()=>{
|
||||
this.isQian = false
|
||||
},2000)
|
||||
}
|
||||
},error=>{})
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
choosesjf(index){//文章收藏事件、积分、我的分享
|
||||
// console.log('当前选项:',this.tongList[index].title);
|
||||
switch (index){
|
||||
case 0:
|
||||
uni.navigateTo({//我的收藏
|
||||
url:'/pagesB/myCollection/myCollection'
|
||||
})
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
uni.navigateTo({//客户列表
|
||||
url:'/pagesB/mysharer/mysharer'
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
goNodifyData(){//去修改资料页面
|
||||
uni.setStorageSync('uinfo',this.userInfo)
|
||||
uni.navigateTo({
|
||||
url:'/pagesA/nodifyData/nodifyData'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -3,12 +3,12 @@
|
|||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'商城'" :statusBack="false" :statusTitle="true"></status-nav>
|
||||
<!-- 搜索输入框 -->
|
||||
<view class="search-input-box bacf" :style="{top: statusHNH+'px'}" style="position: fixed;left: 0;right: 0;">
|
||||
<view class="search-input-box bacf poszy shop-nav-box" :style="{top: statusHNH+'px'}">
|
||||
<view class="disac pad-zy30 mar-s20">
|
||||
<!-- 输入框 -->
|
||||
<input style="border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;" class="width100 fon34 radius10" type="text" v-model="searchVal" placeholder="请输入商品名称"/>
|
||||
<input class="width100 fon34 radius10" type="text" @confirm="searchEv" v-model="searchVal" placeholder="请输入商品名称"/>
|
||||
<!-- 搜索 -->
|
||||
<view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" style="height: 80rpx;line-height: 80rpx;" :style="{background:publicColor}">搜索</view>
|
||||
<view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" @tap="searchEv" :style="{background:publicColor}">搜索</view>
|
||||
</view>
|
||||
<!-- 分类标题 -->
|
||||
<view style="background: #FFFFFF;font-size: 24rpx;" class="disjbac pad-zy20 pad-s20">
|
||||
|
@ -17,39 +17,40 @@
|
|||
<!-- 筛选结果 -->
|
||||
<view v-if="isClick" class="pad-zy50 disac fw pad-x20">
|
||||
<view class="col3 fon28 mar-s30">筛选:</view>
|
||||
<view v-for="(item,indexx) in shaiList" :key="indexx" style="background: #3875F6;color: #FFFFFF;border-radius: 30rpx;padding: 8rpx 20rpx;font-size: 24rpx;display: flex;align-items: center;margin-right: 20rpx;margin-top: 30rpx;">{{item}} <view class="mar-z10" @tap="deleteSX(indexx)">×</view></view>
|
||||
<view v-for="(item,indexx) in shaiList" :key="indexx">{{item}} <view class="mar-z10" @tap="deleteSX(indexx)">×</view></view>
|
||||
</view>
|
||||
<view v-if="isXiao">
|
||||
<view class="pad-zy30">
|
||||
<view class="mar-s50 mar-x20 fon28 bold">{{cateTitle}}</view>
|
||||
<view class="disac fw">
|
||||
<view @tap="chooseBing(indexb)" v-for="(itemb,indexb) in bingzList" class="mar-y30 fon26 mar-s30" :key="indexb" :class="bingIndex==indexb?'activebcate':'shopBMo'" :style="{background:bingIndex==indexb?publicColor:'#F2F2F2'}">{{itemb}}</view>
|
||||
<view @tap="chooseBing(indexb)" v-for="(itemb,indexb) in bingzList" class="mar-y30 fon26 mar-s30" :key="indexb" :class="itemb.isActive?'activebcate':'shopBMo'" :style="{background:itemb.isActive?publicColor:'#F2F2F2'}">{{itemb.title}}</view>
|
||||
</view>
|
||||
<view v-if="activeIndex==1">
|
||||
<view class="fon28 bold mar-sx40">医生选择</view>
|
||||
<input type="text" class="mar-x40" value="" style="height: 60rpx;border: 2rpx solid #E0E0E0;border-radius: 10rpx;width: 100%;box-sizing: border-box;padding-left: 20rpx;font-size: 24rpx;" placeholder="请输入医生姓名并选择" />
|
||||
<input type="text" class="mar-x40" value="" placeholder="请输入医生姓名并选择" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 重置、筛选 -->
|
||||
<view class="disjbac pad-zy20 mar-s50 mar-x30 pad-s20">
|
||||
<view @tap="chongz" style="font-size: 28rpx;width: 294rpx;height: 60rpx;border-radius: 10rpx;text-align: center;line-height: 60rpx; background: #E6E6E6;color: #4D4D4D;">重置</view>
|
||||
<view @tap="shaix" style="font-size: 28rpx;width: 294rpx;height: 60rpx;border-radius: 10rpx;text-align: center;line-height: 60rpx; background: #3875F6;color: #FFFFFF;">筛选</view>
|
||||
</view>
|
||||
<view @tap="isXiao=false" style="background: rgba(0,0,0,.54);width: 100%;height: 600rpx;float: left;position: relative;"></view>
|
||||
<view @tap="chongz">重置</view>
|
||||
<view @tap="shaix">筛选</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="isXiao" @tap="isXiao=false" class="moban"></view>
|
||||
<!-- 数据列表 -->
|
||||
<view :style="{marginTop:statusHNH+titleHeight+'px'}">
|
||||
<shopList></shopList>
|
||||
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
|
||||
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}商品`"></nothing-page>
|
||||
</view>
|
||||
<!-- 底部tab -->
|
||||
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='3'></foot-tab>
|
||||
<!-- 购物车 -->
|
||||
<navigator url="/pagesA/shopCart/shopCart" hover-class="none">
|
||||
<view style="position: fixed;right: 30rpx;bottom: 200rpx;">
|
||||
<view class="posir" style="width: 112rpx;height: 112rpx;">
|
||||
<image src="/static/public/cart.png" mode="aspectFill" style="width: 112rpx;height: 112rpx;"></image>
|
||||
<view class="posia" style="background: #F85050;width: 28rpx;height: 28rpx;border-radius: 100%;color: #FFFFFF;font-size: 24rpx;text-align: center;line-height: 28rpx;top: 20rpx;right: 20rpx;"><view style="transform: scale(.8);">99</view></view>
|
||||
<navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none">
|
||||
<view class="cart-box">
|
||||
<view class="posir">
|
||||
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
||||
<view class="posia"><view>99</view></view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
|
@ -71,12 +72,18 @@
|
|||
activeIndex:'-1',
|
||||
shopCate:['全部病种','全部医生','全部活动'],
|
||||
cateTitle:'',
|
||||
bingIndex:0,
|
||||
bingzList:[],//小分类列表
|
||||
zanBingArr:[],//暂存小分类
|
||||
isXiao:false,//
|
||||
titleHeight:'',//标题高度
|
||||
shaiList:[],//筛选后的结果列表
|
||||
isClick:false,//是否点击了筛选
|
||||
dataList:[],
|
||||
searchVal:'',//关键词
|
||||
doctor_role:'',//医生从职位标识 从商品筛选条件接口获取 目前为doctor=医生 design=设计师
|
||||
doctor_name:'',//医生姓名 模糊搜索
|
||||
activity:'',//活动类型 不填为普通商品+活动商品 normal=普通商品;group_make=拼团;group_buy=团购;limit_time=限时促销
|
||||
disease_id:'',//病种ID
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
@ -91,50 +98,148 @@
|
|||
// console.log('状态栏+标题栏:',rect.height);
|
||||
this.titleHeight = rect.height
|
||||
}).exec()
|
||||
this.checkSX();
|
||||
},
|
||||
methods: {
|
||||
chooseShopCate(index){//大分类选择事件
|
||||
this.activeIndex = index;
|
||||
this.isClick = false;
|
||||
this.bingIndex = 0;
|
||||
if(!this.isXiao) {
|
||||
this.isXiao = true;
|
||||
async checkSX(){//商品筛选条件
|
||||
this.$requst.get('spu/condition').then(res=>{
|
||||
if(res.code==0){
|
||||
this.zanBingArr = res.data;
|
||||
}
|
||||
})
|
||||
await this.checkShopList();
|
||||
},
|
||||
chooseShopCate(index){//大分类选择事件
|
||||
if(this.activeIndex==index && this.isXiao) {
|
||||
this.isXiao = false;
|
||||
} else this.isXiao = true;
|
||||
this.shaiList = []
|
||||
this.bingzList = [];
|
||||
this.isClick = false;
|
||||
this.activeIndex = index;
|
||||
let arr = [];
|
||||
let obj = {};
|
||||
if(this.activeIndex==0) {
|
||||
this.cateTitle = '病种选择';
|
||||
this.bingzList = ['全部','秃顶植发','眉毛种植','发际线种植','耳发种植','胡须种植','植发失败修复','其他'];
|
||||
this.zanBingArr.disease.forEach(item=>{
|
||||
obj = {
|
||||
pid: item.pid,
|
||||
title: item.name,
|
||||
id: item.id,
|
||||
sort: item.sort,
|
||||
isActive:false
|
||||
}
|
||||
arr.push(obj);
|
||||
})
|
||||
this.bingzList = arr;
|
||||
this.bingzList.unshift({pid: '', title: "全部", id: '', sort: '',isActive:true});
|
||||
this.bingzList.push({pid: '', title: "其他", id: '', sort: ''});
|
||||
}
|
||||
if(this.activeIndex==1) {
|
||||
this.cateTitle = '职位选择';
|
||||
this.bingzList = ['全部','植发','医师','主任'];
|
||||
this.zanBingArr.doctor_roles.forEach(item=>{
|
||||
obj = {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
title: item.title,
|
||||
pid: item.pid,
|
||||
is_group: item.is_group,
|
||||
isActive:false
|
||||
}
|
||||
arr.push(obj);
|
||||
})
|
||||
this.bingzList = arr;
|
||||
this.bingzList.unshift({id: '', name: '', title: "全部", pid: '', is_group: '',isActive:true});
|
||||
}
|
||||
if(this.activeIndex==2) {
|
||||
this.cateTitle = '活动选择';
|
||||
this.bingzList = ['全部','拼团活动','团购活动','限时促销'];
|
||||
this.zanBingArr.activity.forEach(item=>{
|
||||
obj = {
|
||||
name: item.name,
|
||||
title: item.title,
|
||||
isActive:false
|
||||
}
|
||||
arr.push(obj);
|
||||
})
|
||||
this.bingzList = arr;
|
||||
this.bingzList.unshift({name: '', title: "全部",isActive:true});
|
||||
}
|
||||
},
|
||||
checkShopList(){
|
||||
let params = {
|
||||
keyword:this.searchVal,//商品关键字 支持模糊搜索
|
||||
page:1,
|
||||
size:10,
|
||||
doctor_role:this.doctor_role,//医生从职位标识 从商品筛选条件接口获取 目前为doctor=医生 design=设计师
|
||||
doctor_name:this.doctor_name,//医生姓名 模糊搜索
|
||||
activity:this.activity,//活动类型 不填为普通商品+活动商品 normal=普通商品;group_make=拼团;group_buy=团购;limit_time=限时促销
|
||||
disease_id:this.disease_id//病种ID
|
||||
}
|
||||
this.$requst.post('spu/list',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.dataList = [];
|
||||
if(res.data.list.length!=0){
|
||||
res.data.list.forEach(item=>{
|
||||
let tuan = false,ping = false,xian = false,integral = false;
|
||||
if(item.activity_type=='group_make') ping = true;
|
||||
if(item.activity_type=='group_buy') tuan = true;
|
||||
if(item.activity_type=='limit_time') xian = true;
|
||||
let group_cover = [];
|
||||
if(item.activity_group_cover.length!=0) {
|
||||
item.activity_group_cover.forEach(item=>{
|
||||
group_cover.push(this.$http + item)
|
||||
})
|
||||
}
|
||||
let obj = {
|
||||
id:item.id,
|
||||
imgSrc: this.$http + item.cover,
|
||||
title: item.name,
|
||||
zhePrice:item.price/100,
|
||||
yuanPrice:item.original_price/100,
|
||||
integral:'',
|
||||
isTuan:tuan,
|
||||
isPing:ping,
|
||||
isXian:xian,
|
||||
isIntegral:integral,
|
||||
grade:'',
|
||||
disease_name:item.disease_name,//病种名称
|
||||
disease_id:item.disease_id,//病种ID
|
||||
activity_end_at:item.activity_end_at,//限时结束时间
|
||||
activity_group_cover:group_cover,//参团人的头像
|
||||
activity_group_num:item.activity_group_num//已经参团人数
|
||||
}
|
||||
this.dataList.push(obj)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseBing(index){//小分类选择事件
|
||||
this.bingIndex = index;
|
||||
let cun = this.shaiList.indexOf(this.bingzList[index]);
|
||||
this.bingzList[index].isActive = !this.bingzList[index].isActive;
|
||||
let cun = this.shaiList.indexOf(this.bingzList[index].id);
|
||||
if(cun==-1){
|
||||
this.shaiList.push(this.bingzList[index]);
|
||||
this.shaiList.push(this.bingzList[index].title);
|
||||
}
|
||||
console.log(this.shaiList);
|
||||
this.searchVal = this.shaiList.join(',');
|
||||
console.log(this.searchVal);
|
||||
},
|
||||
chongz(){//重置
|
||||
this.bingIndex = 0
|
||||
this.isClick = false;
|
||||
this.shaiList = []
|
||||
},
|
||||
shaix(){//筛选
|
||||
this.isXiao = false
|
||||
this.isClick = true;
|
||||
this.checkShopList();
|
||||
},
|
||||
deleteSX(index){//删除筛选
|
||||
this.shaiList.splice(index,1);
|
||||
if(this.shaiList.length==0){
|
||||
this.isClick = false;
|
||||
}
|
||||
},
|
||||
searchEv(){//搜索事件
|
||||
this.checkShopList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,4 +247,9 @@
|
|||
|
||||
<style>
|
||||
page{background: #F5F5F5;}
|
||||
.activecate,.shopMo{width: 216rpx;height: 65rpx;border-radius: 20rpx;line-height: 65rpx;text-align: center;background-color: #f2f2f2;color: #333333;}
|
||||
.activecate{color: #FFFFFF;}
|
||||
.shopMo span::after,.activecate span::after{display: inline-block;content: '';width: 16rpx;height: 13rpx;margin-left: 6rpx;}
|
||||
.shopMo span::after{background: url(/static/public/shopSJ.png) no-repeat;background-size: 100% 90%;}
|
||||
.activecate span::after{background: url(/static/public/shopSJ-active.png) no-repeat;background-size: 100% 90%;transform: rotate(180deg);background-position: 0 2rpx;}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'活动任务'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32 pad-x20">
|
||||
<!-- 签到领积分 -->
|
||||
<view class="bacf radius20 pad20 mar-s20">
|
||||
<view class="bold col3 disjbac">
|
||||
<view class="disac">
|
||||
<image src="/static/public/task-01-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
|
||||
<view class="fon28">签到领积分</view>
|
||||
</view>
|
||||
<view><span style="color: #3875F6;">0</span>/7</view>
|
||||
</view>
|
||||
<view class="fon24" style="color: #808080;">
|
||||
<view class="mar-s30">活动要求:七天签到可领取7000个积分</view>
|
||||
<view class="mar-s20">获得奖励:10积分</view>
|
||||
<view class="mar-s20">会员:暂无</view>
|
||||
<view class="mar-s20">结束时间:2021-09-10 10:30</view>
|
||||
</view>
|
||||
<view class="disjcac">
|
||||
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即签到</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分享孔雀币 -->
|
||||
<view class="bacf radius20 pad20 mar-s20">
|
||||
<view class="bold col3 disjbac">
|
||||
<view class="disac">
|
||||
<image src="/static/public/task-02-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
|
||||
<view class="fon28">分享孔雀币</view>
|
||||
</view>
|
||||
<view><span style="color: #3875F6;">0</span>/7</view>
|
||||
</view>
|
||||
<view class="fon24" style="color: #808080;">
|
||||
<view class="mar-s30">活动要求:成功分享并注册成为会员9人可获得30孔雀币</view>
|
||||
<view class="mar-s20">获得奖励:10孔雀币</view>
|
||||
<view class="mar-s20">会员:暂无</view>
|
||||
<view class="mar-s20">结束时间:2021-09-10 10:30</view>
|
||||
</view>
|
||||
<view class="disjcac">
|
||||
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即参与</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分享领积分 -->
|
||||
<view class="bacf radius20 pad20 mar-s20">
|
||||
<view class="bold col3 disjbac">
|
||||
<view class="disac">
|
||||
<image src="/static/public/task-03-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
|
||||
<view class="fon28">分享领积分</view>
|
||||
</view>
|
||||
<view><span style="color: #3875F6;">0</span>/7</view>
|
||||
</view>
|
||||
<view class="fon24" style="color: #808080;">
|
||||
<view class="mar-s30">活动要求:成功分享并注册成为会员2人可获得100积分</view>
|
||||
<view class="mar-s20">获得奖励:10孔雀币</view>
|
||||
<view class="mar-s20">会员:暂无</view>
|
||||
<view class="mar-s20">结束时间:2021-09-10 10:30</view>
|
||||
</view>
|
||||
<view class="disjcac">
|
||||
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即参与</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分享至朋友圈 -->
|
||||
<view class="bacf radius20 pad20 mar-s20">
|
||||
<view class="bold col3 disjbac">
|
||||
<view class="disac">
|
||||
<image src="/static/public/task-04-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
|
||||
<view class="fon28">分享至朋友圈</view>
|
||||
</view>
|
||||
<view><span style="color: #3875F6;">1</span>/1</view>
|
||||
</view>
|
||||
<view class="fon24" style="color: #808080;">
|
||||
<view class="mar-s30">活动要求:成功分享并上传截图,认证通过后获得</view>
|
||||
<view class="mar-s20">获得奖励:20积分</view>
|
||||
<view class="mar-s20">会员:暂无</view>
|
||||
<view class="mar-s20">结束时间:2021-09-10 10:30</view>
|
||||
</view>
|
||||
<view class="disjcac">
|
||||
<view @tap="isScreenshot=true" :style="{background:!isScreenshot?publicColor:'#CCCCCC'}" class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;">{{!isScreenshot?'立即参与':'审核中...'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 上传截图弹框 -->
|
||||
<view v-if="isScreenshot" @tap.stop="isScreenshot=false,upImg=''" class="posAll disjcac" style="padding: 0 85rpx;z-index: 3;">
|
||||
<view class="bacf width100" @tap.stop="isScreenshot=true" style="padding: 0 33rpx;border-radius: 20rpx;">
|
||||
<view class=" disjcac fc">
|
||||
<view class="fon32 col3 mar-s30 mar-x40">截图上传</view>
|
||||
<view v-if="upImg==''" @tap="chooseImg" class=" disjcac fc" style="width: 340rpx;height: 348rpx;background: #F0F0F0;border-radius: 10rpx;margin-bottom: 70rpx;">
|
||||
<view class="posir disjcac mar-s50">
|
||||
<view class="posia" style="width: 100rpx;height: 6rpx;background: #B3B3B3;border-radius: 10rpx;transform: rotate(90deg);"></view>
|
||||
<view class="posia" style="width: 100rpx;height: 6rpx;background: #B3B3B3;border-radius: 10rpx;"></view>
|
||||
</view>
|
||||
<view class="fon28 col9" style="margin-top: 120rpx;">点击上传截图</view>
|
||||
</view>
|
||||
<image v-else @tap="chooseImg" :src="upImg" style="width: 340rpx;height: 348rpx;border-radius: 10rpx;margin-bottom: 70rpx;" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="disjbac mar-x20" style="text-align: center;">
|
||||
<view @tap.stop="isScreenshot=false,upImg=''" style="width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;background: #E6E6E6;color: #FFFFFF;">取消</view>
|
||||
<view @tap.stop="shareEv" style="width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;background: #3875F6;color: #FFFFFF;position: relative;">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
isScreenshot:false,
|
||||
upImg:''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
this.checkList();
|
||||
},
|
||||
methods: {
|
||||
checkList(){//查询任务列表
|
||||
this.$requst.post('task/task/task-list').then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseImg(){//选择图片事件
|
||||
uni.chooseImage({
|
||||
count:1,
|
||||
sourceType:['album'],
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.upImg = res.tempFilePaths[0]
|
||||
}
|
||||
})
|
||||
},
|
||||
shareEv(){//确认上传凭证
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.isWen{color: #3875F6;}
|
||||
.isWen::after{
|
||||
content: '';
|
||||
display: block;
|
||||
height: 8rpx;
|
||||
width: 80%;
|
||||
position: absolute;
|
||||
bottom: -20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: #3875F6;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,154 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'优惠券'" :statusTitle="true"></status-nav>
|
||||
<view id="daoh" class="bacf pad-zy40 pad-sx20 isTopf fon28 col3 disjbac" :style="{top:statusHNH+'px'}">
|
||||
<view @tap="chooseNav(indexn)" :class="isStatus==indexn?'isWen bold':''" class="posir" v-for="(itemn,indexn) in navList" :key="indexn">{{itemn}}</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view :style="{paddingTop: (statusHNH+chuTop+15)+'px'}" class="pad-zy32">
|
||||
<view class="pad-x30">
|
||||
<view v-if="dataList.length!=0" class="mar-x20" v-for="(item,index) in dataList" :key="index">
|
||||
<view style="height: 200rpx;" class="disjbac posir">
|
||||
<view class="posir disjcac fc" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
|
||||
<image v-if="item.statusNum!=0 && item.statusNum!=2" class="posia quan-img" src="/static/public/quan-left-two.png" mode=""></image>
|
||||
<image v-else class="posia quan-img" src="/static/public/quan-left.png" mode=""></image>
|
||||
<view class="posir disjcac fc" style="z-index: 1;">
|
||||
<view class="fon28 mar-s20 mar-x36"><span v-if="!item.isTiyan && !item.isZhek">¥</span><span class="bold" style="font-size: 56rpx;">{{item.num}}</span></view>
|
||||
<view v-if="item.statusNum==0 || item.statusNum==2" @tap="useEv(index)" class="fon24 quan-btn">{{item.statusNum==2?'立即领取':'立即使用'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="quan-right-box">
|
||||
<view class="fon28 col3 mar-s20">{{item.title}}</view>
|
||||
<view class="fon24 col80">满{{item.manPrice}}元可使用</view>
|
||||
<view class="fon20 col80 mar-x20">有效期:{{item.startTime}}至{{item.endTime}}</view>
|
||||
</view>
|
||||
<image v-if="item.statusNum==1" class="posia quan-use" src="/static/public/quan-use.png" mode=""></image>
|
||||
<image v-if="item.statusNum==3" class="posia quan-use" src="/static/public/quan-over.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="loading">
|
||||
<nothing-page v-if="dataList.length==0" :content="['暂无可使用优惠券','暂无已使用优惠券','暂无可领取优惠券','暂无已过期优惠券'][isStatus]"></nothing-page>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 体验券使用弹框 -->
|
||||
<view v-if="isTY" @tap="isTY=false" class="disjcac tc quan-tk-box">
|
||||
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isTY=true">
|
||||
<view class="fon28 col3">体验券使用</view>
|
||||
<view class="mar-sx30">
|
||||
<image :src="tyImg" class="quan-tk-em" style="width: 325rpx;height: 325rpx;" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="fon24 col3 mar-s40 mar-x20">工作人员扫码使用体验券</view>
|
||||
<image @tap.stop="isTY=false" src="/static/public/closequan.png" class="posia quan-tk-btn" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
chuTop:'',
|
||||
navList:['未使用','已使用','可领取','已过期'],
|
||||
isStatus:0,
|
||||
dataList:[],
|
||||
zcList:[],
|
||||
isTY:false,
|
||||
page:1,
|
||||
size:10,
|
||||
quanStatus:'normal',//优惠券状态
|
||||
loading:false,
|
||||
tyImg:''//立即使用体验券时,弹框中的img
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('#daoh').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect);
|
||||
this.chuTop = rect.height;
|
||||
}).exec()
|
||||
this.zcList = this.dataList;
|
||||
this.checkAllList(0);
|
||||
},
|
||||
methods: {
|
||||
checkAllList(index){//查询所有优惠券列表
|
||||
let params = {
|
||||
status: this.quanStatus,//留空默获取全部 normal=正常(未使用) used=已使用 invalid=已失效 waiting=待领取
|
||||
page:this.page,
|
||||
size:this.size
|
||||
}
|
||||
this.$requst.post('user/get-coupon-list',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.dataList = [];
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
let leix = false;
|
||||
if(item.type=='taste') leix = true;
|
||||
let obj = {
|
||||
id:item.id,
|
||||
num:item.amount,
|
||||
title:item.name,
|
||||
cover:this.$http + item.cover,
|
||||
manPrice:item.condition,
|
||||
startTime:item.begin_at,
|
||||
endTime:item.end_at,
|
||||
isTiyan:leix,
|
||||
isZhek:false,
|
||||
statusNum:index
|
||||
}
|
||||
this.zcList = this.dataList.push(obj);
|
||||
})
|
||||
this.checkList(index);
|
||||
}
|
||||
this.loading = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseNav(index){
|
||||
this.isStatus = index;
|
||||
if(index==0) this.quanStatus = 'normal';//未使用
|
||||
if(index==1) this.quanStatus = 'used';//已使用
|
||||
if(index==2) this.quanStatus = 'waiting';//待领取
|
||||
if(index==3) this.quanStatus = 'invalid';//已过期
|
||||
this.loading = false;
|
||||
this.checkAllList(index);
|
||||
},
|
||||
checkList(index){
|
||||
this.dataList = this.zcList.filter(item=>item.statusNum==index);
|
||||
},
|
||||
useEv(index){
|
||||
if(this.dataList[index].statusNum==2) {
|
||||
this.$requst.post('user/get-coupon',{coupon_id:this.dataList[index].id}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('领取成功');
|
||||
this.checkAllList(this.isStatus);
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.dataList[index].isTiyan==true && this.dataList[index].statusNum==0){this.isTY = true;this.tyImg = this.dataList[index].cover;}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.isWen{color: #3875F6;}
|
||||
.isWen::after{
|
||||
content: '';
|
||||
display: block;
|
||||
height: 8rpx;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: -20rpx;
|
||||
background: #3875F6;
|
||||
}
|
||||
</style>
|
|
@ -2,126 +2,125 @@
|
|||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'购物车'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
|
||||
<view class="bacf radius20 mar-s20 disjbac" style="padding: 27rpx 20rpx;">
|
||||
<view v-if="loading" :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
|
||||
<view class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
|
||||
<view class="bold">配送方式</view>
|
||||
<view class="fon26 col3 disac">
|
||||
<view @tap="isExpress=true" :class="isExpress?'activeT':'expressT'" :style="{background:isExpress?publicColor:''}">快递</view>
|
||||
<view @tap="isExpress=false" :class="!isExpress?'activeT':'expressT'" :style="{background:isExpress?'':publicColor}">自提</view>
|
||||
<view @tap="expressEv(0)" :class="isExpress?'activeT':'expressT'" :style="{background:isExpress?publicColor:''}">快递</view>
|
||||
<view @tap="expressEv(1)" :class="!isExpress?'activeT':'expressT'" :style="{background:isExpress?'':publicColor}">自提</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 地址信息 -->
|
||||
<view v-if="isExpress" class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
|
||||
<view v-if="isExpress" class="bacf radius20 mar-s20 pad-sx27-zy20">
|
||||
<view class="bold">收件人信息</view>
|
||||
<view class="fon26 col3 disjbac">
|
||||
<navigator url="/pagesA/myAddress/myAddress?isWhere=0" hover-class="none">
|
||||
<view class="fon26 col3 disjbac pad-s50">
|
||||
<view>
|
||||
<view class="fon28 col3 bold" style="margin: 52rpx 0 20rpx 0;">蒋灰灰 <span>188****0362</span></view>
|
||||
<view class="fon24 col9">四川省成都市成华区中环路双店路段奥园广场</view>
|
||||
<view class="fon28 col3 bold mar-x20">{{addressInfo.name}} <span class="mar-z20">{{userPphone}}</span></view>
|
||||
<view class="fon24 col9">{{addressInfo.province_str}}{{addressInfo.city_str}}{{addressInfo.county_str || ''}}{{addressInfo.address || ''}}</view>
|
||||
</view>
|
||||
<image src="/static/public/nextM.png" style="width: 16px;height: 16px;flex-shrink: 0;" mode="aspectFill"></image>
|
||||
<image src="/static/public/nextM.png" class="xiaDan-next" mode="aspectFill"></image>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<!-- 自提地址 -->
|
||||
<view v-else class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
|
||||
<view v-else class="bacf radius20 mar-s20 pad-sx27-zy20">
|
||||
<view class="bold">自提地址</view>
|
||||
<view class="fon26 col3 disjbac" style="margin-top: 50rpx;">
|
||||
<input type="number" maxlength="11" :focus="isFocus" @blur="blurEv" v-model="zPhone" class="mar-s50 mar-x20" style="border: 2rpx solid #E0E0E0;padding: 20rpx;border-radius: 10rpx;font-size: 24rpx;" placeholder="请输入收货人手机号" />
|
||||
<view class="fon26 col3 disjbac">
|
||||
<view>
|
||||
<view class="fon28 col3 bold" style="margin-bottom: 20rpx;">恒美植发</view>
|
||||
<view class="fon24 col9">四川省成都市青羊区青羊大道213号</view>
|
||||
<view class="fon28 col3 bold mar-x20">恒美植发</view>
|
||||
<view class="fon24 col9">{{goAddress}}</view>
|
||||
</view>
|
||||
<image @tap="goThere" src="/static/public/daoh.png" style="width: 96rpx;height: 93rpx;flex-shrink: 0;" mode="aspectFill"></image>
|
||||
<!-- 立即导航 -->
|
||||
<image @tap="goThere(goAddress)" src="/static/public/daoh.png" class="there" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单信息 -->
|
||||
<view class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
|
||||
<view class="bacf radius20 mar-s20 pad-sx27-zy20">
|
||||
<view class="bold">订单信息</view>
|
||||
<view class="fon26 col3 disjbac pad-sx50 disjbac bbot">
|
||||
<image src="/static/public/banner.png" class="flexs" style="width: 166rpx;height: 166rpx;border-radius: 15rpx;margin-right: 12rpx;" mode="aspectFill"></image>
|
||||
<view class="width100">
|
||||
<view class="fon28 col3 bold clips2">【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人</view>
|
||||
<view style="font-size: 22rpx;color: #808080;font-weight: 500;">试用</view>
|
||||
<view class="disjbac mar-s10">
|
||||
<view style="color: #F85050;font-size: 32rpx;font-weight: bold;">¥3888</view>
|
||||
<view class="fon28 col6">x2</view>
|
||||
<view v-for="(item,index) in orderList" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<image :src="item.imgSrc" class="flexs order-image" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="width100 disjb fw" style="height: 166rpx;">
|
||||
<view>
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<view class="fon28 col3 bold clips2">{{item.title}}</view>
|
||||
</navigator>
|
||||
<view class="order-sy">试用</view>
|
||||
</view>
|
||||
<view class="disjbac mar-s10 width100">
|
||||
<view class="order-item-price" v-if="isNei!=3">¥{{item.price}}</view>
|
||||
<view class="order-item-price" v-else>积分:{{item.price}}</view>
|
||||
<view class="fon28 col6">x{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 优惠 -->
|
||||
<view class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
|
||||
<view v-if="isNei!=3" class="bacf radius20 mar-s20 pad-sx27-zy20">
|
||||
<view class="bold">优惠</view>
|
||||
<view @tap="showQuan=true" class="fon28 col3 disjbac mar-sx40">
|
||||
<view @tap="quanEv(1)" class="fon28 col3 disjbac mar-sx40">
|
||||
<view>优惠券</view>
|
||||
<view class="disac">
|
||||
<view style="color: #F85050;font-weight: bold;">-¥99.00</view>
|
||||
<image src="/static/public/nextM.png" style="width: 16px;height: 16px;flex-shrink: 0;" mode="aspectFill"></image>
|
||||
<view class="colf8 bold">-¥{{youQuan.youPrice}}.00</view>
|
||||
<image src="/static/public/nextM.png" class="xiaDan-next" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fon28 col3 disjbac">
|
||||
<!-- <view class="fon28 col3 disjbac">
|
||||
<view>立减优惠</view>
|
||||
<view style="color: #F85050;font-weight: bold;">-¥99.00</view>
|
||||
</view>
|
||||
<view class="colf8 bold">-¥{{delPrice}}.00</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 快递费用 -->
|
||||
<view class="bacf radius20 mar-s20 disjbac" style="padding: 27rpx 20rpx;">
|
||||
<view v-if="isExpress" class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
|
||||
<view class="bold">快递费用</view>
|
||||
<view class="fon28" style="color: #F85050;font-weight: bold;">¥10.00</view>
|
||||
<view class="fon28 colf8 bold">¥{{expressInfo.default_price}}.00</view>
|
||||
</view>
|
||||
<view class="disjbac posixzy bacf" style="height: 124rpx;line-height: 124rpx;padding: 0 32rpx;">
|
||||
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
|
||||
<!-- 去支付 -->
|
||||
<view class="fon40 bold" style="color: #F85050;">合计:¥7166.00</view>
|
||||
<view @tap="goPayment" style="color: #FFFFFF;font-size: 28rpx;font-weight: bold;width: 170rpx;height: 70rpx;line-height: 70rpx;text-align: center;background: #3875F6;border-radius: 35rpx;margin-left: 10rpx;">去支付</view>
|
||||
<view class="fon40 colf8 bold" v-if="isNei!=3">合计:¥{{allPrice}}</view>
|
||||
<view class="fon40 colf8 bold dis" v-else><span class="col3 fon28">合计积分:</span>{{allPrice}}<span v-if="isExpress">+ ¥{{expressInfo.default_price}}</span></view>
|
||||
<view @tap="goPayment" v-if="isNei!=3" class="goPayment">去支付</view>
|
||||
<view @tap="goPayment" v-else class="goPayment">去兑换</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="showQuan" @tap.stop="showQuan=false" class="posAll">
|
||||
<view class="bacf posixzy" style="border-radius: 40rpx 40rpx 0rpx 0rpx;" @tap.stop="showQuan=true">
|
||||
<view style="padding: 20rpx 50rpx;">
|
||||
<view class="pad-sx20 pad-zy50">
|
||||
<view class="disjbac">
|
||||
<view class="fon28 bold col3">优惠券</view>
|
||||
<view class="fon28 bold col3">可用优惠券({{quanList.length}})</view>
|
||||
<image @tap.stop="showQuan=false" src="/static/public/cha-close.png" style="width: 30rpx;height: 30rpx;" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="fon28 bold col3" style="display: flex;justify-content: space-around;align-items: center;padding: 50rpx 0 16rpx 0;">
|
||||
<!-- <view class="fon28 bold col3 disja pad-s50" style="padding-bottom: 16rpx;">
|
||||
<view class="posir" :class="switchQuan?'activeQuan':''" @tap="switchQuan=true">可用优惠券(1)</view>
|
||||
<view class="posir" :class="!switchQuan?'activeQuan':''" @tap="switchQuan=false">失效优惠券(0)</view>
|
||||
</view>
|
||||
<view class="mar-s40">
|
||||
<view style="height: 200rpx;" class="disjbac">
|
||||
<view class="posir" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
|
||||
<image class="posia" src="/static/public/quan-left.png" style="width: 218rpx;height: 200rpx;left: 0;top: 0;" mode=""></image>
|
||||
</view> -->
|
||||
<scroll-view scroll-y class="mar-s40 quan-list-box">
|
||||
<view @tap.stop="chooseQuan(index)" v-for="(item,index) in quanList" :key="index" class="mar-x40">
|
||||
<view class="disjbac quan-item-box">
|
||||
<view class="posir">
|
||||
<image class="posia" src="/static/public/quan-left.png" mode=""></image>
|
||||
<view class="posir" style="z-index: 1;">
|
||||
<view style="margin: 40rpx 0 30rpx 0rpx;" class="fon28">¥<span style="font-size: 56rpx;font-weight: bold;">10</span></view>
|
||||
<view class="fon24">满300元可使用</view>
|
||||
<view class="pad-s40 pad-x30 fon28">¥<span class="bold fon56">{{item.youPrice}}</span></view>
|
||||
<view class="fon24" style="padding-left: 12rpx;">满{{item.manPrice}}元可使用</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;height: 200rpx;padding: 0 20rpx;background-color: #F5F5F5;">
|
||||
<view class="fon28 col3 mar-s20">黄金会员专属优惠券</view>
|
||||
<view>
|
||||
<image src="/static/public/chooseQuan.png" style="width: 40rpx;height: 40rpx;border-radius: 100%;float: right;"></image>
|
||||
</view>
|
||||
<view class="fon20 col3 mar-x20">有效期:2021-09-06至2021-09-15</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mar-s40">
|
||||
<view style="height: 200rpx;" class="disjbac">
|
||||
<view class="posir" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
|
||||
<image class="posia" src="/static/public/quan-left.png" style="width: 218rpx;height: 200rpx;left: 0;top: 0;" mode=""></image>
|
||||
<view class="posir" style="z-index: 1;">
|
||||
<view style="margin: 40rpx 0 30rpx 0rpx;" class="fon28">¥<span style="font-size: 56rpx;font-weight: bold;">10</span></view>
|
||||
<view class="fon24">满300元可使用</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;height: 200rpx;padding: 0 20rpx;background-color: #F5F5F5;">
|
||||
<view class="fon28 col3 mar-s20">黄金会员专属优惠券</view>
|
||||
<!-- <view class="fon28 col3 mar-s20">{{['黄金','白银'][item.isGrade]}}会员专属优惠券</view> -->
|
||||
<view class="fon28 col3 mar-s20">{{item.name}}</view>
|
||||
<view>
|
||||
<image src="/static/public/cancleQuan.png" style="width: 40rpx;height: 40rpx;border-radius: 100%;float: right;"></image>
|
||||
<image v-if="item.isStatus" src="/static/public/chooseQuan.png"></image>
|
||||
<image v-else src="/static/public/cancleQuan.png"></image>
|
||||
</view>
|
||||
<view class="fon20 col3 mar-x20">有效期:2021-09-06至2021-09-15</view>
|
||||
<view class="fon20 col3 mar-x20">有效期:{{item.startTime.slice(0,10)}}至{{item.endTime.slice(0,10)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 领取优惠券按钮 -->
|
||||
<view @tap.stop="showQuan=false" style="font-size: 36rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin-top: 156rpx;margin-bottom: 20rpx;">领取优惠券</view>
|
||||
<view @tap.stop="goCoupon" class="ling-btn">领取优惠券</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -147,36 +146,244 @@
|
|||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
isExpress:true,
|
||||
switchQuan:true,
|
||||
showQuan:false,
|
||||
isDui:false
|
||||
showQuan:false,//是否显示优惠券弹框
|
||||
isDui:false,
|
||||
orderList:uni.getStorageSync('orderList'),
|
||||
quanList:[],
|
||||
goAddress:'四川省成都市青羊区青羊大道213号',
|
||||
youQuan:{
|
||||
id:0,
|
||||
youPrice:0
|
||||
},//优惠券
|
||||
delPrice:0,//立减优惠(限时活动的)
|
||||
allPrice:0,//合计
|
||||
allNum:0,//总数量
|
||||
zanAllPrice:0,//暂存合计
|
||||
isNei:0,
|
||||
expressInfo:{},//快递信息
|
||||
addressInfo:{},//地址信息
|
||||
userPphone:'',
|
||||
zPhone:'',//自提时的手机号
|
||||
page:1,
|
||||
size:10,
|
||||
isFocus:false,
|
||||
loading:false
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.$toolAll.tools.isLogin();
|
||||
this.checkexpress();//查询快递
|
||||
this.checkAddress();//查询地址
|
||||
this.quanEv(0);//查询优惠券列表
|
||||
uni.removeStorageSync('orderInfo');
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onLoad(options) {
|
||||
this.checkeList();//查询订单列表
|
||||
this.checkOrderDetail();//查询订单信息
|
||||
this.isNei = options.isNei;
|
||||
},
|
||||
methods: {
|
||||
goThere(){
|
||||
goPayment(){//去付款
|
||||
this.isFocus = false;
|
||||
let nphone = '';
|
||||
if(this.isExpress) {
|
||||
nphone = this.addressInfo.phone;//默认地址的手机号
|
||||
} else nphone = this.zPhone;//自提时的手机号
|
||||
let self = 0;//快递的配送方式
|
||||
if(!this.isExpress) self = 1;//自提的方式
|
||||
let nsku_list = [];
|
||||
this.orderList.forEach(item=>{
|
||||
let obj = {
|
||||
sku_coding:item.coding,
|
||||
num:item.num
|
||||
}
|
||||
nsku_list.push(obj);
|
||||
})
|
||||
let parmas = {
|
||||
sku_list: nsku_list,//商品单号和数量数组
|
||||
total: this.allPrice,//总金额
|
||||
address_id: this.addressInfo.id,//地址ID
|
||||
express_code: this.expressInfo.code,//快递编码
|
||||
coupon_id: this.youQuan.id,//优惠券ID
|
||||
coupon_price: this.youQuan.youPrice,//优惠券可用
|
||||
pick_self: self,//是否自提0 快递, 1自提
|
||||
pick_self_phone: nphone,//联系电话
|
||||
original_total: 0,//原价总金额
|
||||
freight: this.expressInfo.default_price,
|
||||
remarks: ""//备注
|
||||
}
|
||||
if(nphone=='') {
|
||||
this.$toolAll.tools.showToast('请填写收货人手机号');
|
||||
this.focusEv();
|
||||
} else if(this.$toolAll.tools.isPhone(nphone)) {
|
||||
this.$toolAll.tools.showToast('请正确填写收货人手机号');
|
||||
this.focusEv();
|
||||
} else {
|
||||
this.$requst.post('order/create',parmas).then(res=>{
|
||||
if(res.code==0){
|
||||
uni.setStorageSync('orderList',this.orderList);
|
||||
uni.setStorageSync('orderInfo',res.data);
|
||||
console.log(res.data);
|
||||
uni.navigateTo({
|
||||
url:`/pagesA/immediatePayment/immediatePayment?allPrice=${this.allPrice}&allNum=${this.allNum}`
|
||||
})
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
goThere(val){//去这里
|
||||
wx.getLocation({//获取当前经纬度
|
||||
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
success: function (res) {
|
||||
wx.openLocation({//使用微信内置地图查看位置。
|
||||
latitude: 22.5542080000,//要去的纬度-地址
|
||||
longitude: 113.8878770000,//要去的经度-地址
|
||||
name: "宝安中心A地铁口",
|
||||
address:'宝安中心A地铁口'
|
||||
name: val,
|
||||
address: val
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goPayment(){
|
||||
uni.navigateTo({
|
||||
url:'/pagesA/immediatePayment/immediatePayment'
|
||||
checkAddress(){//默认地址查询
|
||||
this.$requst.post('user/address').then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
if(item.is_default==1) {
|
||||
this.addressInfo = item;
|
||||
}
|
||||
})
|
||||
this.userPphone = this.$toolAll.tools.hideMPhone(this.addressInfo.phone);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
checkexpress(){//查询快递费
|
||||
if(this.isExpress) {
|
||||
this.$requst.post('common/express-list').then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
if(item.is_default==1){
|
||||
this.expressInfo = item;
|
||||
this.expressInfo.default_price = this.expressInfo.default_price/100;
|
||||
}
|
||||
})
|
||||
this.totalEv();
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.totalEv();
|
||||
}
|
||||
},
|
||||
expressEv(index){//快递自取切换事件
|
||||
if(index==0) {
|
||||
this.isExpress = true;
|
||||
}
|
||||
if(index==1) {
|
||||
this.isExpress = false;
|
||||
}
|
||||
this.checkexpress();
|
||||
},
|
||||
totalEv(){//合计运算
|
||||
if(this.isNei!=3 && this.isExpress){
|
||||
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice + this.expressInfo.default_price;//合计 = 总价 - 优惠券 - 立减券 + 快递费
|
||||
}
|
||||
if(this.isNei!=3 && !this.isExpress){
|
||||
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;//合计 = 总价 - 优惠券 - 立减券
|
||||
}
|
||||
this.allPrice = this.$toolAll.tools.addXiaoShu(this.allPrice);
|
||||
this.loading = true;
|
||||
},
|
||||
checkOrderDetail(){//查询订单准备信息
|
||||
let nsku_list = [];
|
||||
this.orderList.forEach(item=>{
|
||||
let obj = {
|
||||
sku_coding:item.coding,
|
||||
num:item.num
|
||||
}
|
||||
nsku_list.push(obj)
|
||||
})
|
||||
let parmas = {
|
||||
sku_list: nsku_list,
|
||||
pick_self: 0
|
||||
}
|
||||
this.$requst.post('order/prepare-info',parmas).then(res=>{
|
||||
if(res.code==0){
|
||||
|
||||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
})
|
||||
},
|
||||
checkeList(){
|
||||
this.orderList.forEach(item=>{
|
||||
this.allPrice += item.price*item.num;
|
||||
this.allNum += item.num;
|
||||
})
|
||||
this.zanAllPrice = this.allPrice;
|
||||
},
|
||||
quanEv(index){//调起优惠券弹框事件
|
||||
if(index==1){
|
||||
this.showQuan = true
|
||||
}
|
||||
this.youQuan.id = 0;
|
||||
this.youQuan.youPrice = 0;
|
||||
this.allPrice = this.zanAllPrice + this.expressInfo.default_price;
|
||||
this.checkQuan();
|
||||
},
|
||||
checkQuan(){//查询可用优惠券事件
|
||||
this.$requst.post('user/get-coupon-list',{status:'normal',page:this.page,size:this.size}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.quanList = [];
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
if(item.type!='taste'){//如果不等于体验券
|
||||
let obj = {
|
||||
id:item.id,
|
||||
youPrice:item.amount/100,
|
||||
manPrice:item.condition/100,
|
||||
isGrade:0,
|
||||
name:item.name,
|
||||
startTime:item.begin_at,
|
||||
endTime:item.end_at,
|
||||
isStatus:false
|
||||
}
|
||||
this.quanList.push(obj);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseQuan(index){//选择可用优惠券事件
|
||||
if(this.zanAllPrice <= this.quanList[index].manPrice){//如果满减大于合计
|
||||
this.$toolAll.tools.showToast('未达到使用条件')
|
||||
} else {
|
||||
this.quanList.forEach(item=>{
|
||||
item.isStatus = false;
|
||||
});
|
||||
this.quanList[index].isStatus = true;
|
||||
this.showQuan = false;
|
||||
this.youQuan = this.quanList[index];
|
||||
this.allPrice = this.zanAllPrice - this.quanList[index].youPrice + this.expressInfo.default_price;//合计 = 暂存合计 - 选中的优惠券
|
||||
}
|
||||
},
|
||||
goCoupon(){//去领取优惠券
|
||||
this.showQuan = false;
|
||||
uni.navigateTo({
|
||||
url:'/pagesA/coupon/coupon'
|
||||
})
|
||||
},
|
||||
focusEv(){//获取焦点
|
||||
this.isFocus = true;
|
||||
},
|
||||
blurEv(){//失去焦点
|
||||
this.isFocus = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -7,48 +7,52 @@
|
|||
<!-- 订单信息 -->
|
||||
<view class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
|
||||
<view class="bold fon28">订单支付</view>
|
||||
<view class="fon26 col3 disjbac pad-sx50 disjbac bbot">
|
||||
<image src="/static/public/banner.png" class="flexs" style="width: 166rpx;height: 166rpx;border-radius: 15rpx;margin-right: 12rpx;" mode="aspectFill"></image>
|
||||
<view class="width100">
|
||||
<view class="fon28 col3 bold clips2">【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人</view>
|
||||
<view style="font-size: 22rpx;color: #808080;font-weight: 500;">试用</view>
|
||||
<view class="disjbac mar-s10">
|
||||
<view style="color: #F85050;font-size: 32rpx;font-weight: bold;">¥3888</view>
|
||||
<view class="fon28 col6">x2</view>
|
||||
<view v-for="(item,index) in orderList" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<image :src="item.imgSrc" class="flexs order-image" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="width100 disjb fw" style="height: 166rpx;">
|
||||
<view>
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<view class="fon28 col3 bold clips2">{{item.title}}</view>
|
||||
</navigator>
|
||||
<view class="order-sy">试用</view>
|
||||
</view>
|
||||
<view class="disjbac mar-s10 width100">
|
||||
<view class="order-item-price">¥{{item.price}}</view>
|
||||
<view class="fon28 col6">x{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fon28 disjbac" style="margin: 60rpx 0 20rpx 0;">
|
||||
<view class="col6">共4件</view>
|
||||
<view style="font-weight: bold;color: #F85050;">应付款:3888.00+300孔雀币</view>
|
||||
<view class="fon28 disjbac mar-s50 pad-s10 mar-x20">
|
||||
<view class="col6">共{{zf_allNum}}件</view>
|
||||
<view class="bold colf8">应付款:{{zf_allPrice}}<span v-if="isKq">+{{zf_kqPrice}}孔雀币</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付方式 -->
|
||||
<view class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;font-size: 28rpx;color: #333333;">
|
||||
<view class="bacf radius20 mar-s20 fon28 col3 pad-sx30 pad-zy20">
|
||||
<view class="bold fon28">选择支付方式</view>
|
||||
<view @tap="chooseFS(index)" v-for="(item,index) in payFS" :key="index" class="disjbac mar-s30">
|
||||
<view class="disac">
|
||||
<image src="/static/public/chooseFS.png" style="width: 40rpx;height: 40rpx;border-radius: 100%;" mode=""></image>
|
||||
<view style="margin-left: 26rpx;">微信支付</view>
|
||||
<image v-if="item.isActive" src="/static/public/chooseFS.png" class="chooseDX" mode=""></image>
|
||||
<image v-else src="/static/public/cancle-FS.png" class="chooseDX" mode=""></image>
|
||||
<view class="mar-z25">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="disjbac" style="margin-top: 30rpx;">
|
||||
<view class="disac">
|
||||
<image src="/static/public/cancle-FS.png" style="width: 40rpx;height: 40rpx;border-radius: 100%;" mode=""></image>
|
||||
<view style="margin-left: 26rpx;">孔雀币</view>
|
||||
</view>
|
||||
<view>余3000</view>
|
||||
<view v-if="item.num!=0">余{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fon28 col3" style="padding: 55rpx 0 64rpx 0;text-align: center;">请在<span style="color: #F85050;font-weight: bold;">23时25分36秒</span>完成支付</view>
|
||||
<view class="fon28 col3 dao-box">请在<span class="colf8 bold">23时25分36秒</span>完成支付</view>
|
||||
<!-- 确认支付 -->
|
||||
<view @tap="payment" style="margin: 0 auto;color: #FFFFFF;font-weight: bold;font-size: 36rpx;text-align: center;width: 546rpx;height: 90rpx;line-height: 90rpx;background-color: #3875F6;border-radius: 20rpx;">确认支付</view>
|
||||
<view @tap="payment" class="submit-pay">确认支付</view>
|
||||
</view>
|
||||
<!-- 支付成功 -->
|
||||
<view v-if="isSuccess" class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;text-align: center;">
|
||||
<image src="/static/public/pay-success.png" style="width: 194rpx;height: 194rpx;" mode=""></image>
|
||||
<view class="fon28 col3" style="margin: 20rpx 0 40rpx 0;">支付成功</view>
|
||||
<view class="" style="font-size: 46rpx;margin-bottom: 120rpx;color: #F85050;">¥3888.00</view>
|
||||
<view class="disja" style="margin-bottom: 150rpx;">
|
||||
<view @tap="goDetail" style="width: 244rpx;height: 70rpx;border-radius: 10rpx;text-align: center;line-height: 70rpx;background: #E9E9E9;color: #333333;">查看订单</view>
|
||||
<view @tap="goShop" style="width: 244rpx;height: 70rpx;border-radius: 10rpx;text-align: center;line-height: 70rpx;background: #3875F6;color: #FFFFFF;">再逛一逛</view>
|
||||
<view class="fon28 col3 pad-s20 pad-x40">支付成功</view>
|
||||
<view class="" style="font-size: 46rpx;margin-bottom: 120rpx;color: #F85050;">¥{{jsPrice}}</view>
|
||||
<view class="disja success-btn">
|
||||
<view @tap="goDetail" style="">查看订单</view>
|
||||
<view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -61,18 +65,105 @@
|
|||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
isSuccess:false
|
||||
isSuccess:false,
|
||||
orderList:uni.getStorageSync('orderList'),
|
||||
zf_allNum:0,//总数量
|
||||
zf_allPrice:0,//实际付款
|
||||
zf_kqPrice:0,//孔雀币
|
||||
payFS:[
|
||||
{title:'微信支付',isActive:true,num:0},
|
||||
{title:'孔雀币',isActive:false,num:3000},
|
||||
],
|
||||
isKq:false,
|
||||
jsPrice:0,//结算时的金额,
|
||||
zc_allPrice:0,//暂存实际总金额
|
||||
orderInfo:uni.getStorageSync('orderInfo')
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onUnload() {
|
||||
uni.removeStorageSync('orderInfo');
|
||||
},
|
||||
onLoad(options) {
|
||||
this.zc_allPrice = this.zf_allPrice = options.allPrice;
|
||||
this.zf_allPrice = this.$toolAll.tools.addXiaoShu(this.zf_allPrice);
|
||||
this.zf_allNum = options.allNum;
|
||||
},
|
||||
methods: {
|
||||
chooseFS(index){
|
||||
this.payFS[index].isActive = !this.payFS[index].isActive;
|
||||
if(index==0){
|
||||
if(this.payFS[0].isActive && this.payFS[1].isActive){//选择了微信支付+选择了孔雀币
|
||||
this.isKq = true;
|
||||
return;
|
||||
}
|
||||
if(!this.payFS[0].isActive && this.payFS[1].isActive){//取消了微信支付+选择了孔雀币
|
||||
this.$toolAll.tools.showToast('孔雀币不足');
|
||||
return;
|
||||
}
|
||||
if(!this.payFS[0].isActive && !this.payFS[1].isActive){//取消了微信支付+取消了孔雀币
|
||||
this.$toolAll.tools.showToast('请选择支付方式');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(index==1) {
|
||||
if(this.payFS[0].isActive && this.payFS[1].isActive) {//选择了微信支付+选择了孔雀币
|
||||
this.isKq = true;
|
||||
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
|
||||
this.zf_kqPrice = this.payFS[index].num;
|
||||
return;
|
||||
}
|
||||
if(this.payFS[0].isActive && !this.payFS[1].isActive) {//选择了微信支付+取消了孔雀币
|
||||
this.isKq = false;
|
||||
this.zf_allPrice = this.zc_allPrice;
|
||||
return;
|
||||
}
|
||||
if(!this.payFS[0].isActive && this.payFS[1].isActive && this.zc_allPrice*1 > this.zf_kqPrice*1){//取消了微信支付+选择了孔雀币+孔雀币不足以抵扣应付款
|
||||
this.$toolAll.tools.showToast('孔雀币不足')
|
||||
this.isKq = true;
|
||||
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
|
||||
this.zf_kqPrice = this.payFS[index].num;
|
||||
return;
|
||||
}
|
||||
if(!this.payFS[0].isActive && !this.payFS[1].isActive){//取消了微信支付+取消了孔雀币
|
||||
this.$toolAll.tools.showToast('请选择支付方式')
|
||||
this.isKq = false;
|
||||
this.zf_allPrice = this.zc_allPrice;
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
payment(){
|
||||
this.isSuccess = true
|
||||
if(!this.payFS[0].isActive && !this.payFS[1].isActive) {
|
||||
this.$toolAll.tools.showToast('请选择支付方式')
|
||||
} else if(!this.payFS[0].isActive && this.zc_allPrice*1 > this.zf_kqPrice*1){
|
||||
this.$toolAll.tools.showToast('孔雀币不足')
|
||||
} else {
|
||||
console.log(this.orderInfo.needPay);
|
||||
if(this.orderInfo.needPay){
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
appId:this.orderInfo.payment_params.appId,//appId
|
||||
timeStamp: this.orderInfo.payment_params.timeStamp,//时间戳
|
||||
nonceStr: this.orderInfo.payment_params.nonceStr,//随机字符串
|
||||
package: this.orderInfo.payment_params.package,//package
|
||||
signType: this.orderInfo.payment_params.signType,//MD5
|
||||
paySign: this.orderInfo.payment_params.sign,//签名
|
||||
success:(res)=> {
|
||||
this.$requst.post('order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
|
||||
this.isSuccess = true;
|
||||
},error=>{this.$toolAll.tools.showToast(res.msg);})
|
||||
},
|
||||
fail: (err)=> {}
|
||||
});
|
||||
} else {
|
||||
this.$requst.post('order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
|
||||
this.isSuccess = true;
|
||||
},error=>{this.$toolAll.tools.showToast(res.msg);})
|
||||
}
|
||||
}
|
||||
},
|
||||
goDetail(){
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'积分管理'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3">
|
||||
<view class="mar-s20 bacf pad20 radius20 bold">
|
||||
<view class="mar-x30">当前积分</view>
|
||||
<view style="font-size: 56rpx;">3000</view>
|
||||
</view>
|
||||
<view class="mar-s20 disjbac">
|
||||
<view class="disjbac pad20 bacf radius20" style="width: 48%;box-sizing: border-box;">
|
||||
<image src="../../static/public/integral-01-108.png" style="width: 108rpx;height: 108rpx;flex-shrink: 0;" mode=""></image>
|
||||
<view class="width100" style="display: flex;justify-content: space-between;flex-direction: column;height: 108rpx;">
|
||||
<view style="font-weight: 400;">我的分享人</view>
|
||||
<view class="fon36 bold">100 <span style="font-size: 26rpx;font-weight: 400;">人</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disjbac pad20 bacf radius20" style="width: 48%;box-sizing: border-box;">
|
||||
<image src="../../static/public/integral-02-108.png" style="width: 108rpx;height: 108rpx;flex-shrink: 0;" mode=""></image>
|
||||
<view class="disjbac fc width100"style="display: flex;justify-content: space-between;flex-direction: column;height: 108rpx;">
|
||||
<view style="font-weight: 400;">签到记录</view>
|
||||
<view style="width: 140rpx;height: 40rpx;line-height: 40rpx;text-align: center;color: #FFFFFF;background: #F6C338;border-radius: 30rpx;font-size: 24rpx;font-weight: 400;">立即签到</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 积分列表,消费列表 -->
|
||||
<view class="mar-s20 bacf pad20 radius20">
|
||||
<view class="mar-x50 fon28 disja">
|
||||
<view @tap="switchState(true)" :class="activeJF?'col3 bold':'col9'">积分列表</view>
|
||||
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">消费列表</view>
|
||||
</view>
|
||||
<!-- 积分列表 -->
|
||||
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
|
||||
<view>
|
||||
<view class="fon26 col3">{{item.title}}</view>
|
||||
<view class="mar-s10 fon20 col9">{{item.time}}</view>
|
||||
</view>
|
||||
<view v-show="activeJF" class="fon36 bold" style="color: #3875F6;">+{{item.num}}</view>
|
||||
<view v-show="!activeJF" class="fon36 bold">-{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分享按钮 -->
|
||||
<view class="disjcac" style="width: 588rpx;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 20rpx;background: #38CE51;position: fixed;bottom: 76rpx;left: 50%;transform: translateX(-50%);">
|
||||
<image src="/static/public/bottom-shear.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
|
||||
<view class="fon40 colf bold mar-z10">分享给好友</view>
|
||||
<button class="posia" open-type="share" style="top: 0;left: 0;right: 0;bottom: 0;opacity: 0;"></button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
activeJF:true,
|
||||
dataList:[
|
||||
{title:'签到兑换',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'分享注册',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'二级分销',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
methods: {
|
||||
switchState(flag){
|
||||
this.activeJF = flag;
|
||||
if(flag) {
|
||||
this.dataList = [
|
||||
{title:'签到兑换',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'分享注册',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'二级分销',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
||||
]
|
||||
} else {
|
||||
this.dataList = [
|
||||
{title:'兑换商品',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'商品购买',time:'2021.09.06 10:30:10',num:'1'},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :backgroudColor="publicColor" :tabcolor="publicColor" :statusTitle="true" :backColor="1"></status-nav>
|
||||
<image src="/static/public/member-head.png" style="position: absolute;top: 0;left: 0;right: 0;height: 436rpx;width: 100%;"></image>
|
||||
<view class="mar-zy32 posir" :style="{paddingTop:statusHNH+26+'px'}">
|
||||
<view class="radius30 posir gao mar-zy40 fon24 pad-x20" style="box-shadow: 0px 16rpx 30rpx rgba(141, 141, 141, 0.26);">
|
||||
<view class="posir pad-zy20" style="z-index: 2;">
|
||||
<view class="disjb">
|
||||
<view class="disac">
|
||||
<!-- 头像 -->
|
||||
<image class="mar-sx20" src="/static/public/like.png" style="width:90rpx;height: 90rpx;border-radius: 100%;" mode="aspectFill"></image>
|
||||
<view class="mar-z20">
|
||||
<!-- 昵称 -->
|
||||
<view class="fon28 bold disac">昵称<view style="background: #FFFFFF;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFBD39;padding: 5rpx 16rpx;margin-left: 10rpx;">VIP</view></view>
|
||||
<view class="mar-s10" style="color: #C27417;">黄金会员</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mar-s30 " style="color: #C27417;">当前等级</view>
|
||||
</view>
|
||||
<view style="margin-top: 62rpx;color: #C27417;">还差1200积分升级</view>
|
||||
<view class="fon28 mar-s10" style="color: #C49F74;">升级到钻石会员享有更多权益</view>
|
||||
</view>
|
||||
<image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/member.png" mode=""></image>
|
||||
</view>
|
||||
<!-- 功能列表 -->
|
||||
<view class="bacf radius20 mar-s20">
|
||||
<view class="disac fon28 fw pad-x20" style="color: #C27417;">
|
||||
<view v-for="(itemh,indexh) in huiList" :key="indexh" class="mar-s20" style="width: 25%;">
|
||||
<view class="disac fc">
|
||||
<image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image>
|
||||
<view class="mar-s20 mar-x10">{{itemh.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 当前权益介绍 -->
|
||||
<view class="bacf radius20 mar-s20 pad20">
|
||||
<view class="mar-x30 fon32 bold" style="color: #C27417;">当前权益介绍</view>
|
||||
<image src="../../static/public/dang-quan.png" style="width: 100%;" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view>
|
||||
</view>
|
||||
<shopList :dataList="dataList"></shopList>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shopList from '@/components/shop-list.vue';
|
||||
export default {
|
||||
components:{
|
||||
shopList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
vision:false,
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),
|
||||
huiList:[
|
||||
{src:'/static/public/ru-hui50.png',title:'入会权益'},
|
||||
{src:'/static/public/birthday50.png',title:'生日礼物'},
|
||||
{src:'/static/public/member-scor50.png',title:'积分权益'},
|
||||
{src:'/static/public/te-quan50.png',title:'特权日'},
|
||||
{src:'/static/public/share-hai50.png',title:'分享海报'},
|
||||
],
|
||||
dataList:[
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:1,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:0,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:1,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:0,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:0,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:0,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,352 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'地址管理'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop:statusHNH+'px'}" class="mar-sx20 pad-zy32" style="padding-bottom: 150rpx;">
|
||||
<view v-if="loading">
|
||||
<view v-for="(item,index) in dataList" :key="index" class="bacf radius20 pad20 mar-x20">
|
||||
<view class="pad-y20 disjbac">
|
||||
<view class="fon28 col3 bold">{{item.userName}} {{item.userPhone}}</view>
|
||||
<image v-if="item.isActive" src="/static/public/chooseQuan.png" class="address_active" mode=""></image>
|
||||
</view>
|
||||
<view class="fon24 col9 mar-s25">{{item.userAddress}}</view>
|
||||
<view class="disjbac fon28 col3 mar-s32">
|
||||
<view @tap="setMo(index)" class="disac">
|
||||
<image v-if="item.isActive" src="/static/public/chooseQuan.png" class="address_active" mode=""></image>
|
||||
<image v-else src="/static/public/cancle-FS.png" class="address_active" mode=""></image>
|
||||
<view class="mar-z10" :class="item.isActive?'':'col9'">设为默认地址</view>
|
||||
</view>
|
||||
<view class="disac" style="color: #808080;">
|
||||
<view @tap="editAddress(index)">编辑</view>
|
||||
<view @tap="delAddress(index)" class="mar-y10 mar-z50">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view @tap.stop="obtainLngLat" class="posixzy address_add" style="bottom: 20rpx;">添加地址</view>
|
||||
<nothing-page v-if="dataList.length==0" :content="'暂无可用地址'"></nothing-page>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加地址、修改地址 -->
|
||||
<view v-if="idEdit" @tap.stop="idEdit=false" class="posAll disjcac" style="padding: 0 46rpx;z-index: 3;">
|
||||
<view class="bacf width100" @tap.stop="idEdit=true" style="padding: 0 55rpx;border-radius: 23rpx;">
|
||||
<view class="pad-sx20 posir">
|
||||
<view class="fon28 bold col3 width100 tc">收件人地址</view>
|
||||
<image class="posia address-close-btn" @tap.stop="idEdit=false" src="/static/public/addressClose.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="pad-sx20 fon28 col3">
|
||||
<view class="fon26 col9 mar-s30">收件人</view>
|
||||
<view class="bbot mar-s30 pad-x10">
|
||||
<input type="text" class="width100" v-model="userName" placeholder="请输入姓名" />
|
||||
</view>
|
||||
<view class="fon26 col9 mar-s30">手机号码</view>
|
||||
<view class="bbot mar-s30 pad-x10">
|
||||
<input type="text" class="width100" v-model="userPhone" placeholder="请输入联系电话" />
|
||||
</view>
|
||||
<view class="fon26 col9 mar-s30">地址</view>
|
||||
<view class="disjbac">
|
||||
<view class="bbot mar-s30 pad-x10 posir disac" @tap="chooseProvinceCityCounty(0)">
|
||||
<input type="text" class="width100 pad-y20" disabled v-model="userProvince" placeholder="四川" />
|
||||
<view class="posia disjcac fc xiao-sanj" style="right: 0;">
|
||||
<image src="/static/public/address-top.png" mode=""></image>
|
||||
<image src="/static/public/address-down.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="isAddress==1?'dong':''" class="posia info-box">
|
||||
<view @tap.stop="chooseProvince(index)" class="clips1" v-for="(item,index) in provinceArr" :key="index">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bbot mar-s30 pad-x10 posir disac mar-zy30" @tap="chooseProvinceCityCounty(1)">
|
||||
<input type="text" class="width100 pad-y20" disabled v-model="userCity" placeholder="成都" />
|
||||
<view class="posia disjcac fc xiao-sanj" style="right: 0;">
|
||||
<image src="/static/public/address-top.png" mode=""></image>
|
||||
<image src="/static/public/address-down.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="isAddress==2?'dong':''" class="posia info-box">
|
||||
<view @tap.stop="chooseCity(index)" class="clips1" v-for="(item,index) in cityArr" :key="index">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bbot mar-s30 pad-x10 posir disac" @tap="chooseProvinceCityCounty(2)">
|
||||
<input type="text" class="width100 pad-y20" disabled v-model="userCounty" placeholder="成华区" />
|
||||
<view class="posia disjcac fc xiao-sanj" style="right: 0;">
|
||||
<image src="/static/public/address-top.png" mode=""></image>
|
||||
<image src="/static/public/address-down.png" mode=""></image>
|
||||
</view>
|
||||
<view :class="isAddress==3?'dong':''" class="posia info-box">
|
||||
<view @tap.stop="chooseCounty(index)" class="clips1" v-for="(item,index) in countyArr" :key="index">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fon26 col9 mar-s30">详细地址</view>
|
||||
<view class="bbot mar-s30 pad-x10">
|
||||
<input type="text" class="width100" v-model="userAddress" placeholder="请输入详细地址" />
|
||||
</view>
|
||||
<!-- 确认保存按钮 -->
|
||||
<view @tap.stop="addAddress" class="address-btn-add">确认保存</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {lotusAddressJson} from '@/components/city/city.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
dataList:[],
|
||||
idEdit:false,
|
||||
userName:'',
|
||||
userPhone:'',
|
||||
userProvince:'',
|
||||
userCity:'',
|
||||
userCounty:'',
|
||||
userAddress:'',
|
||||
isChoose:'',//选中的id
|
||||
delNum:0,//删除条件
|
||||
loading:false,
|
||||
provinceArr:[],
|
||||
cityArr:[],
|
||||
countyArr:[],
|
||||
isAddress:0,
|
||||
isWhere:1
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad(options) {
|
||||
this.checkList();
|
||||
this.isWhere = options.isWhere;
|
||||
},
|
||||
methods: {
|
||||
obtainLngLat(){//添加地址事件
|
||||
this.idEdit = true;
|
||||
this.clearAll();
|
||||
// 获取当前位置的经纬度
|
||||
wx.getLocation({
|
||||
success:(res)=> {
|
||||
// 逆解析经纬度
|
||||
this.getDistrict(res.latitude, res.longitude)
|
||||
},
|
||||
})
|
||||
|
||||
},
|
||||
getDistrict(latitude, longitude) {//获取当前位置的省市区县
|
||||
let ya = this
|
||||
wx.request({
|
||||
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=B2ABZ-SIDKS-WD2O3-6CJ2U-CDZOT-U3FKF`,
|
||||
header: {
|
||||
'Content-Type':'application/json'
|
||||
},
|
||||
success:function(res) {
|
||||
// console.log('地址数据:',res)
|
||||
ya.userProvince = res.data.result.address_component.province
|
||||
ya.userCity = res.data.result.address_component.city
|
||||
ya.userCounty = res.data.result.address_component.district
|
||||
lotusAddressJson.forEach((itema,index)=>{
|
||||
if(ya.userProvince==itema.name) {
|
||||
ya.chooseProvinceCityCounty(0);
|
||||
ya.chooseProvince(index);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseProvinceCityCounty(index){
|
||||
if(index==0){//获取省数据
|
||||
this.isAddress = 1;
|
||||
this.provinceArr = []
|
||||
lotusAddressJson.forEach((item,index)=>{
|
||||
if(item.value.slice(2) =='0000'){
|
||||
this.provinceArr.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
if(index==1){//获取市数据
|
||||
if(this.cityArr.length!=0){
|
||||
this.isAddress = 2;
|
||||
}
|
||||
}
|
||||
if(index==2){//获取区数据
|
||||
if(this.countyArr.length==0){
|
||||
this.$toolAll.tools.showToast('暂无可选项');
|
||||
} else {
|
||||
this.isAddress = 3;
|
||||
}
|
||||
}
|
||||
},
|
||||
chooseProvince(index){//选择省
|
||||
this.countyArr = this.cityArr = [];
|
||||
this.userProvince = this.provinceArr[index].name;
|
||||
lotusAddressJson.forEach(itema=>{
|
||||
if(this.provinceArr[index].value==itema.parent) {
|
||||
this.cityArr.push(itema)
|
||||
}
|
||||
})
|
||||
this.isAddress = 0;
|
||||
this.userCity = this.cityArr[0].name;//默认市的第一个
|
||||
this.chooseCity(0);
|
||||
},
|
||||
chooseCity(index){//选择市
|
||||
this.countyArr = [];
|
||||
this.userCity = this.cityArr[index].name;
|
||||
lotusAddressJson.forEach(itema=>{
|
||||
if(this.cityArr[index].value==itema.parent) {
|
||||
this.countyArr.push(itema)
|
||||
}
|
||||
})
|
||||
this.isAddress = 0;
|
||||
if(this.countyArr.length!=0) {
|
||||
this.userCounty = this.countyArr[0].name;//默认选中第一个区
|
||||
} else this.userCounty = '未知';
|
||||
},
|
||||
chooseCounty(index){//选择区
|
||||
this.isAddress = 0;
|
||||
this.userCounty = this.countyArr[index].name;
|
||||
},
|
||||
async checkList(){//查询地址列表
|
||||
this.$requst.post('user/address').then(res=>{
|
||||
if(res.code==0){
|
||||
this.dataList = [];
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
let newActive = false;
|
||||
if(item.is_default==1) newActive = true
|
||||
let obj = {
|
||||
id:item.id,
|
||||
user_id:item.user_id,
|
||||
userName:item.name,
|
||||
userPhone:item.phone,
|
||||
userAddress:item.province_str + item.city_str + item.county_str + item.address,
|
||||
province:item.province_str,
|
||||
city:item.city_str,
|
||||
county:item.county_str,
|
||||
address:item.address,
|
||||
isActive:newActive
|
||||
}
|
||||
this.dataList.push(obj);
|
||||
})
|
||||
this.loading = true;
|
||||
this.checkActive();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
checkActive(){//把默认地址放到第一位
|
||||
let have = this.dataList.findIndex((res)=>{
|
||||
return res.isActive == true;
|
||||
});
|
||||
this.dataList.unshift(this.dataList[have]);
|
||||
this.dataList.splice(have+1,1);
|
||||
},
|
||||
async addAddress(){//新增编辑地址
|
||||
if(this.userName=='') {
|
||||
this.$toolAll.tools.showToast('请输入姓名');
|
||||
} else if(this.userPhone=='') {
|
||||
this.$toolAll.tools.showToast('请输入联系电话');
|
||||
} else if(this.$toolAll.tools.isPhone(this.userPhone)) {
|
||||
this.$toolAll.tools.showToast('请输入正确的联系电话');
|
||||
} else if(this.userAddress=='') {
|
||||
this.$toolAll.tools.showToast('请输入详细地址');
|
||||
} else {
|
||||
let params = {
|
||||
id:this.isChoose,
|
||||
name:this.userName,
|
||||
phone:this.userPhone,
|
||||
city:'',//城市编码
|
||||
county:'',//区县编码
|
||||
province_str:this.userProvince,//省
|
||||
city_str:this.userCity,//市
|
||||
county_str:this.userCounty,//区
|
||||
address:this.userAddress,
|
||||
is_default:1//是否默认
|
||||
}
|
||||
this.$requst.post('user/address-save',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.idEdit = false;
|
||||
if(this.isChoose!='') {
|
||||
this.$toolAll.tools.showToast('地址修改成功');
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('新增地址成功');
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.checkList();
|
||||
this.clearAll();
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
setMo(index){//设置默认地址
|
||||
let params = {
|
||||
id:this.dataList[index].id,
|
||||
name:this.dataList[index].userName,
|
||||
phone:this.dataList[index].userPhone,
|
||||
city:'',//城市编码
|
||||
county:'',//区县编码
|
||||
province_str:this.dataList[index].province,//省
|
||||
city_str:this.dataList[index].city,//市
|
||||
county_str:this.dataList[index].county,//区
|
||||
address:this.dataList[index].address,
|
||||
is_default:1//是否默认
|
||||
}
|
||||
this.$requst.post('user/address-save',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('设置默认地址成功');
|
||||
this.dataList.forEach(item=>{
|
||||
item.isActive = false;
|
||||
});
|
||||
this.dataList[index].isActive = true;
|
||||
this.checkActive();
|
||||
if(this.isWhere==0) {
|
||||
uni.navigateBack({delta:1})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
editAddress(index){//编辑按钮
|
||||
this.idEdit = true;
|
||||
this.isChoose = this.dataList[index].id,
|
||||
this.userName = this.dataList[index].userName;
|
||||
this.userPhone = this.dataList[index].userPhone;
|
||||
this.userProvince = this.dataList[index].province;
|
||||
this.userCity = this.dataList[index].city;
|
||||
this.userCounty = this.dataList[index].county;
|
||||
this.userAddress = this.dataList[index].address;
|
||||
},
|
||||
delAddress(index){//删除地址事件
|
||||
this.delNum++
|
||||
setTimeout(()=>{
|
||||
this.delNum = 0;
|
||||
},3000)
|
||||
if(this.delNum==1) {
|
||||
this.$toolAll.tools.showToast('双击即可删除');
|
||||
}
|
||||
if(this.delNum==2) {
|
||||
this.$requst.post('user/address-del',{id:this.dataList[index].id}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('删除成功');
|
||||
setTimeout(()=>{
|
||||
this.checkList();
|
||||
},1500)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
clearAll(){//清空输入框
|
||||
this.isChoose = '',
|
||||
this.userName = '';
|
||||
this.userPhone = '';
|
||||
this.userProvince = '';
|
||||
this.userCity = '';
|
||||
this.userCounty = '';
|
||||
this.userAddress = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'订单管理'" :statusTitle="true"></status-nav>
|
||||
<!-- 自定义二级分类 -->
|
||||
<view class="isTopf bacf" :style="{top:statusHNH+'px'}">
|
||||
<scroll-view scroll-x>
|
||||
<view id="daoh" class="disjbac pad-s20 mar-zy30">
|
||||
<view @tap="chooseNav(indexn)" class="posir pad-s20 pad-zy20 pad-x30 flexs mar-y10" style="text-align: center;" :class="activeIndex==indexn?'activeD':''" :style="{color:activeIndex==indexn?'#3875F6':'#000000'}" v-for="(itemn,indexn) in statusList" :key="indexn">{{itemn}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view :style="{paddingTop:(statusHNH+12+chuTop)+'px'}" class="pad-sx20 pad-zy32">
|
||||
<view v-for="(item,index) in orderList" :key="index" class="radius20 bacf pad20 mar-x20 order-item-box">
|
||||
<view class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view><view class="fon24 col9">{{item.establish}}</view></view>
|
||||
<view class="disjbac fon24"><view class="col3">订单号:{{item.orderNum}}</view><view class="bold" :class="(item.orderStatus==1 || item.orderStatus==2 || item.orderStatus==3) ? 'colf8':'col9'">{{['','待付款','待发货','待核验','待收货','交易完成'][item.orderStatus]}}</view></view>
|
||||
<view v-for="(itemc,indexc) in item.childrenList" :key="indexc" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<image :src="itemc.imgSrc" class="flexs" mode="aspectFill"></image>
|
||||
</navigator>
|
||||
<view class="width100 disjb fc" style="height: 166rpx;">
|
||||
<view>
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<view class="fon28 col3 bold clips2">{{itemc.title}}</view>
|
||||
</navigator>
|
||||
<view class="order-sy">试用</view>
|
||||
</view>
|
||||
<view class="disjbac mar-s10">
|
||||
<view class="colf8 fon32 bold"><span v-if="item.isShop==0">¥</span>{{itemc.price}}</view>
|
||||
<view class="fon28 col6 mar-y40">x{{itemc.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fon28 col3 pad-s20 disjbac">
|
||||
<view class="flexs"><span v-if="item.isShop==0">合计:{{item.total}}.00</span><span v-else>合计积分:{{item.total}}</span></view>
|
||||
<view class="width100 disac" style="justify-content: flex-end;">
|
||||
<view @tap="isCancle=true" v-if="item.orderStatus != 0 && item.orderStatus != 5" class="order-cancle">取消订单</view>
|
||||
<view v-if="item.orderStatus == 1" class="order-btn">付款</view>
|
||||
<view @tap="isHeyan=true" v-if="item.orderStatus == 3" class="order-btn">线下核销</view>
|
||||
<!-- <view class="order-btn">单人拼团</view> -->
|
||||
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn">确认收货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 待核验弹框 -->
|
||||
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
|
||||
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
|
||||
<view class="fon28 col3">订单二维码</view>
|
||||
<view class="mar-sx30">
|
||||
<image src="/static/public/member-head.png" style="width: 325rpx;height: 325rpx;" mode=""></image>
|
||||
</view>
|
||||
<view class="fon24 col3">
|
||||
<view class=" mar-s40 mar-x20">工作人员扫码核销订单</view>
|
||||
<view>订单未完成前请勿出示二维码</view>
|
||||
</view>
|
||||
<image @tap.stop="isHeyan=false" src="/static/public/closequan.png" class="posia heyan-close" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 取消订单弹框 -->
|
||||
<view v-if="isCancle" @tap.stop="isCancle=false" class="posAll">
|
||||
<view class="bacf posixzy order-cancle-tk" @tap.stop="isCancle=true">
|
||||
<view>
|
||||
<view class="bbot pad-sx20 posir">
|
||||
<view class="fon28 bold col3 width100" style="text-align: center;">取消订单</view>
|
||||
<image class="posia" @tap.stop="isCancle=false" src="/static/public/cha-close.png" style="width: 40rpx;height: 40rpx;right: 50rpx;top: 20rpx;" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="pad-zy32 pad-sx20" style="color: #5B5B5B;">
|
||||
<view class="fon24" style="line-height: 40rpx;">
|
||||
<view>温馨提示:</view>
|
||||
<view>订单取消需要提交工作人员审核,商品金额将原路径返还账户,订单一旦取消,系统无法恢复。</view>
|
||||
</view>
|
||||
<view @tap.stop="chooseReason(indexy)" v-for="(itemy,indexy) in reasonList" :key="indexy" class="disac mar-s40">
|
||||
<image v-if="itemy.isActive" src="/static/public/chooseFS.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
|
||||
<image v-else src="/static/public/cancle-FS.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
|
||||
<view class="mar-z20 fon28">{{itemy.title}}</view>
|
||||
</view>
|
||||
<!-- 确认取消按钮 -->
|
||||
<view @tap.stop="confirmEv" class="confirm-btn">确认取消</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
chuTop:'',//导航高度
|
||||
activeIndex:'',
|
||||
statusList:['全部','待付款','待发货','待核验','待收货','已完成'],
|
||||
// 取消订单原因
|
||||
reasonList:[
|
||||
{title:'不想要了/买多了/买错了',isActive:true},
|
||||
{title:'地址信息填写错误',isActive:false},
|
||||
{title:'其他原因',isActive:false},
|
||||
],
|
||||
isHeyan:false,//是否线下审核
|
||||
isCancle:false,//是否取消订单
|
||||
orderList:[
|
||||
{
|
||||
id:1,
|
||||
establish:'2021-09-06 20:30',//创建时间
|
||||
orderNum:'1234567890',//订单号
|
||||
childrenList:[
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
],
|
||||
orderStatus:5,//1 待付款,2 待发货,3 待核验,4 待收货,5 交易已完成
|
||||
isShop:0,//0 商城订单,1 积分商城订单
|
||||
total: 15552//合计
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
establish:'2021-09-06 20:30',//创建时间
|
||||
orderNum:'1234567890',//订单号
|
||||
childrenList:[
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
],
|
||||
orderStatus:3,//1 待付款,2 待发货,3 待核验,4 待收货,5 交易已完成
|
||||
isShop:0,//0 商城订单,1 积分商城订单
|
||||
total: 15552//合计
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
establish:'2021-09-06 20:30',//创建时间
|
||||
orderNum:'1234567890',//订单号
|
||||
childrenList:[
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
],
|
||||
orderStatus:4,//1 待付款,2 待发货,3 待核验,4 待收货,5 交易已完成
|
||||
isShop:0,//0 商城订单,1 积分商城订单
|
||||
total: 15552//合计
|
||||
},
|
||||
{
|
||||
id:4,
|
||||
establish:'2021-09-06 20:30',//创建时间
|
||||
orderNum:'1234567890',//订单号
|
||||
childrenList:[
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】100美人',price:3888,num:2},
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
],
|
||||
orderStatus:1,//1 待付款,2 待发货,3 待核验,4 待收货,5 交易已完成
|
||||
isShop:0,//0 商城订单,1 积分商城订单
|
||||
total: 15552//合计
|
||||
},
|
||||
{
|
||||
id:5,
|
||||
establish:'2021-09-06 20:30',//创建时间
|
||||
orderNum:'1234567890',//订单号
|
||||
childrenList:[
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
|
||||
],
|
||||
orderStatus:2,//1 待付款,2 待发货,3 待核验,4 待收货,5 交易已完成
|
||||
isShop:1,//0 商城订单,1 积分商城订单
|
||||
total: 15552//合计
|
||||
}
|
||||
],
|
||||
zanList:[],//暂存列表数据
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad(options) {
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('#daoh').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect);
|
||||
this.chuTop = rect.height
|
||||
}).exec()
|
||||
options.index==undefined ? this.activeIndex = 0 : this.activeIndex = options.index;
|
||||
this.zanList = this.orderList;
|
||||
this.checkList(this.activeIndex);
|
||||
},
|
||||
methods: {
|
||||
chooseNav(index){
|
||||
this.activeIndex = index;
|
||||
this.checkList(index)
|
||||
},
|
||||
checkList(index){//查询订单列表
|
||||
if(index==0) {
|
||||
this.orderList = this.zanList;
|
||||
} else {
|
||||
this.orderList = this.zanList.filter(item=>{
|
||||
return item.orderStatus==index;
|
||||
});
|
||||
}
|
||||
},
|
||||
chooseReason(index){//取消订单原因选择事件
|
||||
this.reasonList.forEach(item=>item.isActive = false);
|
||||
this.reasonList[index].isActive = true;
|
||||
},
|
||||
confirmEv(){//确认取消订单事件
|
||||
this.isCancle = false;
|
||||
let con = '';
|
||||
this.reasonList.forEach(item=>{
|
||||
if(item.isActive) con = item.title;
|
||||
})
|
||||
},
|
||||
confirmReceipt(id){//确认收货事件
|
||||
console.log(id);
|
||||
this.$requst.post('order/accepted',{order_id:id}).then(res=>{
|
||||
if(res.code==0){
|
||||
|
||||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.activeD::after{
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 8rpx;
|
||||
background: #3875F6;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,103 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'孔雀币管理'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3">
|
||||
<view class="mar-s20 bacf pad20 radius20">
|
||||
<view class="mar-x30">当前孔雀币</view>
|
||||
<view class="disjbac">
|
||||
<view class="disjcac fc width33" style="align-items: flex-start;">
|
||||
<view class="fon36 bold mar-z20">3000</view>
|
||||
<view class="mar-s36" @tap="isTiX=true" style="width: 152rpx;height: 60rpx;line-height: 60rpx;text-align: center;color: #FFFFFF;background: #3875F6;border-radius: 30rpx;font-size: 26rpx;">提现</view>
|
||||
</view>
|
||||
<view class="disjcac fc width33">
|
||||
<view class="fon36 bold">300 <span style="font-size: 26rpx;font-weight: 400;">元</span></view>
|
||||
<view class="mar-s36 fon26 col3" style="height: 60rpx;line-height: 60rpx;">审核中</view>
|
||||
</view>
|
||||
<view class="disjcac fc width33">
|
||||
<view class="fon36 bold">0 <span style="font-size: 26rpx;font-weight: 400;">元</span></view>
|
||||
<view class="mar-s36 fon26 col3" style="height: 60rpx;line-height: 60rpx;">已提现</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 获取列表,提现列表 -->
|
||||
<view class="mar-s20 bacf pad20 radius20">
|
||||
<view class="mar-x50 fon28 disja">
|
||||
<view @tap="switchState(true)" :class="activeJF?'col3 bold':'col9'">获取列表</view>
|
||||
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">提现列表</view>
|
||||
</view>
|
||||
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
|
||||
<view>
|
||||
<view class="fon26 col3">{{item.title}}</view>
|
||||
<view class="mar-s10 fon20 col9">{{item.time}}</view>
|
||||
</view>
|
||||
<view v-show="activeJF" class="fon36 bold" style="color: #3875F6;">+{{item.num}}</view>
|
||||
<view v-show="!activeJF" class="fon36 bold">-{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分享按钮 -->
|
||||
<view class="disjcac" style="width: 588rpx;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 20rpx;background: #38CE51;position: fixed;bottom: 76rpx;left: 50%;transform: translateX(-50%);">
|
||||
<image src="/static/public/bottom-shear.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
|
||||
<view class="fon40 colf bold mar-z10">分享给好友</view>
|
||||
<button class="posia" open-type="share" style="top: 0;left: 0;right: 0;bottom: 0;opacity: 0;"></button>
|
||||
</view>
|
||||
<!-- 提现弹框 -->
|
||||
<view v-if="isTiX" @tap="isTiX=false" class="disjcac tc" style="position: fixed;top: 0;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,.54);">
|
||||
<view class="bacf width100 radius20 pad30" style="margin: 0 85rpx;" @tap.stop="isTiX=true">
|
||||
<view class="fon28 bold" style="color: #343434;">孔雀币提现</view>
|
||||
<view class="fon28 mar-sx30" style="color: #343434;font-weight: 500;">兑换比例100孔雀币兑换1元人民币</view>
|
||||
<input type="text" value="" placeholder="请输入提现金额" class="width100 radius10" style="border: 2rpx solid #E0E0E0;margin-bottom: 80rpx;height: 60rpx;"/>
|
||||
<view class="disjbac">
|
||||
<view @tap.stop="isTiX=false" style="width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;border-radius: 10rpx;font-size: 28rpx;color: #FFFFFF;background-color: #3875F6;">立即提现</view>
|
||||
<view @tap.stop="isTiX=false" style="width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;border-radius: 10rpx;font-size: 28rpx;color: #FFFFFF;background-color: #C8C8C8;">暂不提现</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
activeJF:true,
|
||||
dataList:[
|
||||
{title:'积分兑换',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'分享订单',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'订单分享',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
||||
],
|
||||
isTiX:true
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
methods: {
|
||||
switchState(flag){
|
||||
this.activeJF = flag;
|
||||
if(flag) {
|
||||
this.dataList = [
|
||||
{title:'积分兑换',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'分享订单',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'订单分享',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
||||
]
|
||||
} else {
|
||||
this.dataList = [
|
||||
{title:'孔雀币提现',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'分享订单',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
|
@ -0,0 +1,166 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'积分商城'" :statusTitle="true"></status-nav>
|
||||
<!-- 搜索输入框 -->
|
||||
<view class="search-input-box bacf poszy jf-input-box" :style="{top: statusHNH+'px'}">
|
||||
<view class="disac pad-zy30 mar-s20">
|
||||
<!-- 输入框 -->
|
||||
<input class="width100 fon34 radius10" @confirm="searchKey" type="text" v-model="searchVal" placeholder="请输入商品名称"/>
|
||||
<!-- 搜索 -->
|
||||
<view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" @tap="searchKey" :style="{background:publicColor}">搜索</view>
|
||||
</view>
|
||||
<!-- 分类标题 -->
|
||||
<view class="disjbac pad-zy20 pad-s20 bacf fon24">
|
||||
<view v-for="(item,index) in shopCate" class="disjcac" @tap="chooseShopCate(index)" :class="activeIndex==index?'activecate':'shopMo'" :style="{background:activeIndex==index?publicColor:'#F2F2F2'}" :key="index">
|
||||
<span>{{item}}</span>
|
||||
<view class="disjcac fc mar-z10" v-if="index==2 || index==3">
|
||||
<image src="/static/public/address-top.png" mode=""></image>
|
||||
<image src="/static/public/address-down.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据列表 -->
|
||||
<view :style="{marginTop:statusHNH+titleHeight+'px'}">
|
||||
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
|
||||
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}积分商品`"></nothing-page>
|
||||
</view>
|
||||
<!-- 底部tab -->
|
||||
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
|
||||
<!-- 购物车 -->
|
||||
<navigator url="/pagesA/shopCart/shopCart?isScore=score" hover-class="none">
|
||||
<view class="cart-box">
|
||||
<view class="posir">
|
||||
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
||||
<view class="posia"><view>99</view></view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shopList from '@/components/shop-list.vue';
|
||||
export default {
|
||||
components:{
|
||||
shopList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
titleList:[],
|
||||
imgList:[],
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),
|
||||
activeIndex:0,
|
||||
shopCate:['综合','最新','兑换量','积分'],
|
||||
titleHeight:'',//标题高度
|
||||
dataList:[],
|
||||
searchVal:'',//关键词搜索
|
||||
type:'normal',//type=normal综合 newest=最新
|
||||
sort_field:'',//排序字段 score=积分 num=兑换量
|
||||
sort_value:'asc',//排序值 asc=升序 desc=降序
|
||||
cishu:0
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
this.titleList = uni.getStorageSync('footTitle')
|
||||
this.imgList = uni.getStorageSync('footimg')
|
||||
// 缓存状态栏+标题栏的高度
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.search-input-box').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect.height);
|
||||
this.titleHeight = rect.height
|
||||
}).exec()
|
||||
this.checkList();
|
||||
},
|
||||
methods: {
|
||||
checkList(){//查询列表事件
|
||||
let params = {
|
||||
keyword:this.searchVal,//商品关键字 支持模糊搜索
|
||||
page:1,
|
||||
size:10,
|
||||
type:this.type,//type=normal综合 newest=最新
|
||||
sort_field:this.sort_field,//排序字段 score=积分 num=兑换量
|
||||
sort_value:this.sort_value//排序值 asc=升序 desc=降序
|
||||
}
|
||||
this.$requst.post('spu/score',params).then(res=>{
|
||||
if(res.code==0){
|
||||
this.dataList = [];
|
||||
if(res.data.list.length!=0){
|
||||
res.data.list.forEach(item=>{
|
||||
let obj = {
|
||||
id:item.id,
|
||||
imgSrc: this.$http + item.cover,
|
||||
saleable:item.saleable,//是否下架
|
||||
stock:item.stock,//库存
|
||||
title: item.name,
|
||||
zhePrice:item.price,
|
||||
yuanPrice:item.original_price,
|
||||
integral:item.score,
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:true,
|
||||
grade:item.level_id,
|
||||
published_at:item.published_at,//发布时间
|
||||
amount:item.amount,//销量
|
||||
level_text:item.level_text//会员限制提示 如青铜会员可购买
|
||||
}
|
||||
this.dataList.push(obj)
|
||||
})
|
||||
} else {
|
||||
this.$toolAll.tools.showToast('暂无更多积分商品')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
searchKey(){//搜索事件
|
||||
if(this.activeIndex==0) {
|
||||
this.clearVal();
|
||||
this.type = 'normal';
|
||||
}
|
||||
if(this.activeIndex==2 || this.activeIndex==3) this.sort_value = 'asc';
|
||||
this.checkList();
|
||||
},
|
||||
chooseShopCate(index){//大分类选择事件
|
||||
this.activeIndex = index;
|
||||
this.type = '';
|
||||
this.sort_field = '';
|
||||
if(index==0) this.type = 'normal';
|
||||
if(index==1) this.type = 'newest';
|
||||
this.cishu++
|
||||
if(index==2) {
|
||||
this.sort_field = 'amount';
|
||||
if(this.cishu%2==0) {
|
||||
this.sort_value = 'asc';
|
||||
} else this.sort_value = 'desc';
|
||||
}
|
||||
if(index==3) {
|
||||
this.sort_field = 'score';
|
||||
if(this.cishu%2==0) {
|
||||
this.sort_value = 'asc';
|
||||
} else this.sort_value = 'desc';
|
||||
}
|
||||
this.checkList();
|
||||
},
|
||||
clearVal(){
|
||||
this.type = '';
|
||||
this.sort_field = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{background: #F5F5F5;}
|
||||
.activecate,.shopMo{border-radius: 20rpx;text-align: center;background-color: #f2f2f2;color: #333333;padding: 16rpx 25rpx;}
|
||||
.activecate{color: #FFFFFF;}
|
||||
.activecate image{
|
||||
-webkit-filter: invert(1); /* Chrome, Safari, Opera */
|
||||
filter: invert(1);
|
||||
}
|
||||
</style>
|
|
@ -3,71 +3,58 @@
|
|||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'购物车'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
|
||||
<view class="bacf radius20 mar-s20 pad20">
|
||||
<view class="bacf radius20 mar-s20 pad20" v-if="cartList.length!=0">
|
||||
<view class="fon28 col3 disjbac" style="height: 43rpx;">
|
||||
<view class="bold">订单信息</view>
|
||||
<view v-if="!cancle_del" @tap="cancle_del=true">管理</view>
|
||||
<view v-else @tap="cancle_del=false" style="width: 113rpx;height: 43rpx;border-radius: 20rpx;background: #3875F6;text-align: center;color: #FFFFFF;line-height: 43rpx;">管理 ×</view>
|
||||
<view v-if="!cancle_del && cartList.length!=0" @tap="guanEv(0)">管理</view>
|
||||
<view v-if="cancle_del && cartList.length!=0" @tap="guanEv(1)" class="edit-btn">管理 ×</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="disjbac pad-sx40 bbot posir" style="overflow: hidden;" @touchstart="moveStart" @touchend="moveEnd">
|
||||
<view class="disjbac" :style="{marginLeft:showDel?'-70px':'',paddingRight:showDel?'70px':''}">
|
||||
<view v-for="(item,index) in cartList" :key="index" class="disjbac pad-sx40 bbot posir cart-list-box" @touchstart="moveStart(index,$event)" @touchend="moveEnd">
|
||||
<view class="disjbac width100" :style="{marginLeft:(showDel && isDang==index)?'-70px':'',paddingRight:(showDel && isDang==index)?'70px':''}">
|
||||
<!-- 圈 -->
|
||||
<image src="/static/public/chooseFS.png" style="width: 40rpx;height: 40rpx;flex-shrink: 0;" mode=""></image>
|
||||
<image src="/static/tabbar/mya.png" style="width: 166rpx;height: 166rpx;border-radius: 15rpx;flex-shrink: 0;margin: 0 12rpx 0 24rpx;" mode=""></image>
|
||||
<view>
|
||||
<view class="fon28 col3 bold clips2">【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人</view>
|
||||
<view style="font-size: 22rpx;color: #808080;">试用</view>
|
||||
<view class="disjbac mar-s10">
|
||||
<view style="font-size: 32rpx;color: #F85050;font-weight: bold;">¥3888</view>
|
||||
<view class="fon26 col3 disac bold" style="border-radius: 4rpx;overflow: hidden;">
|
||||
<image src="/static/public/del.png" mode="" style="width: 46rpx;height: 26px;"></image>
|
||||
<input type="text" value="1" style="width: 60rpx;height: 24px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;"/>
|
||||
<image src="/static/public/add.png" mode="" style="width: 46rpx;height: 26px;"></image>
|
||||
<view @tap="chooseItem(index)">
|
||||
<image v-if="item.isActive" src="/static/public/chooseFS.png" class="flexs chooseDX" mode=""></image>
|
||||
<image v-else src="/static/public/cancle-FS.png" class="flexs chooseDX" mode=""></image>
|
||||
</view>
|
||||
<image @tap="chooseItem(index)" :src="item.imgSrc" class="order-image mar-z25 flexs" mode="aspectFill"></image>
|
||||
<view class="width100 disjbac fc" style="height: 166rpx;">
|
||||
<view class="width100">
|
||||
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
|
||||
<view class="fon28 col3 bold clips2">{{item.title}}</view>
|
||||
</navigator>
|
||||
<view class="order-sy">试用</view>
|
||||
</view>
|
||||
<view class="disjbac width100 mar-s10">
|
||||
<view class="order-item-price"><span v-if="item.is_score!=1">¥</span><span v-else>积分:</span>{{item.price}}</view>
|
||||
<view class="fon26 col3 disac bold cart-input-box">
|
||||
<image @tap="deladdEvent(index , 0)" src="/static/public/del.png" mode=""></image>
|
||||
<input type="text" v-model="item.num"/>
|
||||
<image @tap="deladdEvent(index , 1)" src="/static/public/add.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="showDel" style="width: 117rpx;height: 205rpx;background: #F85050;line-height: 205rpx;text-align: center;color: #FFFFFF;font-size: 24rpx;flex-shrink: 0;position: absolute;right: 0;bottom: 40rpx;top: 2rpx;">删除</view>
|
||||
</view>
|
||||
<view class="disjbac pad-sx40 bbot posir" style="overflow: hidden;" @touchstart="moveStart" @touchend="moveEnd">
|
||||
<view class="disjbac" :style="{marginLeft:showDel?'-70px':'',paddingRight:showDel?'70px':''}">
|
||||
<!-- 圈 -->
|
||||
<image src="/static/public/cancle-FS.png" style="width: 40rpx;height: 40rpx;flex-shrink: 0;" mode=""></image>
|
||||
<image src="/static/tabbar/mya.png" style="width: 166rpx;height: 166rpx;border-radius: 15rpx;flex-shrink: 0;margin: 0 12rpx 0 24rpx;" mode=""></image>
|
||||
<view>
|
||||
<view class="fon28 col3 bold clips2">【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人</view>
|
||||
<view style="font-size: 22rpx;color: #808080;">试用</view>
|
||||
<view class="disjbac mar-s10">
|
||||
<view style="font-size: 32rpx;color: #F85050;font-weight: bold;">¥3888</view>
|
||||
<view class="fon26 col3 disac bold" style="border-radius: 4rpx;overflow: hidden;">
|
||||
<image src="/static/public/del.png" mode="" style="width: 46rpx;height: 26px;"></image>
|
||||
<input type="text" value="1" style="width: 60rpx;height: 24px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;"/>
|
||||
<image src="/static/public/add.png" mode="" style="width: 46rpx;height: 26px;"></image>
|
||||
<view v-if="showDel && isDang==index" @tap="deltItem(index)" class="item-del-btn">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="showDel" style="width: 117rpx;height: 205rpx;background: #F85050;line-height: 205rpx;text-align: center;color: #FFFFFF;font-size: 24rpx;flex-shrink: 0;position: absolute;right: 0;bottom: 40rpx;top: 2rpx;">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disjbac posixzy bacf" style="height: 124rpx;line-height: 124rpx;padding: 0 32rpx;">
|
||||
<view class="disac">
|
||||
<view style="width: 40rpx;height: 40rpx;border-radius: 100%;border: 2rpx solid #3875F6;flex-shrink: 0;display: flex;justify-content: center;align-items: center;">
|
||||
<!-- <view style="width: 24rpx;height: 24rpx;background-color: #3875F6;border-radius: 100%;"></view> -->
|
||||
<nothing-page v-if="cartList.length==0" :content="'暂无更多商品'"></nothing-page>
|
||||
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
|
||||
<view class="disac" @tap="chooseAll">
|
||||
<view class="chooseAll-box">
|
||||
<view v-if="isChooseAll"></view>
|
||||
</view>
|
||||
<view class="fon28 col3 mar-z10">全选</view>
|
||||
</view>
|
||||
<!-- 去支付 -->
|
||||
<view v-if="!cancle_del" class="disjbac">
|
||||
<view>
|
||||
<view class="fon28">合计:<span class="fon40 bold" style="color: #F85050;">¥7166.00</span></view>
|
||||
<view class="fon28" v-if="isScore!='score'">合计:<span class="fon40 bold colf8">¥{{allPrice}}.00</span></view>
|
||||
<view class="fon28" v-else>合计:<span class="fon40 bold colf8">{{allPrice}}</span></view>
|
||||
</view>
|
||||
<view @tap="goGetReadyDan" style="color: #FFFFFF;font-size: 28rpx;font-weight: bold;width: 170rpx;height: 70rpx;line-height: 70rpx;text-align: center;background: #3875F6;border-radius: 35rpx;margin-left: 10rpx;">去支付</view>
|
||||
<view @tap="goGetReadyDan" class="colf fon28 bold mar-z10 goBuy-btn" style="background: #3875F6;">{{cartList.length==0?'去购物':'去支付'}}</view>
|
||||
</view>
|
||||
<!-- 删除 -->
|
||||
<view v-else style="color: #FFFFFF;font-size: 28rpx;font-weight: bold;width: 170rpx;height: 70rpx;line-height: 70rpx;text-align: center;background: #F85050;border-radius: 35rpx;">删除</view>
|
||||
<view @tap="delBtn" v-else class="colf fon28 bold goBuy-btn" style="background: #F85050;">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -82,31 +69,155 @@
|
|||
showDel:false,
|
||||
startX:'',//开始位置
|
||||
endX:'',//结束位置
|
||||
cancle_del:false
|
||||
cancle_del:false,
|
||||
cartList:[],//购物车列表
|
||||
isChooseAll:false,//是否全选
|
||||
isDang:0,//当前抹动的item
|
||||
newList:[],//暂存准备购买商品
|
||||
delIndex:[],//待删除商品的ID
|
||||
page:1,
|
||||
size:10,
|
||||
isScore:''
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.$toolAll.tools.isLogin();
|
||||
uni.removeStorageSync('orderList');
|
||||
},
|
||||
onLoad(options) {
|
||||
options.isScore=='score' ? this.isScore = 'score' : ''
|
||||
this.checkList();
|
||||
},
|
||||
computed:{
|
||||
allPrice(){
|
||||
let sum = 0
|
||||
this.cartList.forEach(item=>{
|
||||
if(item.isActive) sum += item.price*1 * item.num
|
||||
})
|
||||
return sum;
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
clickGL(){
|
||||
console.log('管理');
|
||||
checkList(){//查询列表事件
|
||||
this.$requst.post('order/shopping-cart',{page:this.page,size:this.size,type:this.isScore}).then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.length!=0){
|
||||
res.data.forEach(item=>{
|
||||
let nprice = '';
|
||||
item.is_score ==1 ? nprice = item.score : nprice = item.sku.sku_price;
|
||||
let obj = {
|
||||
id:item.id,
|
||||
imgSrc:this.$http + item.spu.spu_cover,
|
||||
coding:item.sku.coding,
|
||||
title:item.sku.sku_name,
|
||||
price:nprice,//实际价格
|
||||
num:item.num,
|
||||
isActive:false,
|
||||
is_score:item.is_score
|
||||
}
|
||||
this.cartList.push(obj)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
moveStart(e){
|
||||
deltItem(index){//删除购物车
|
||||
this.$requst.post('order/shopping-cart-del',{id:this.cartList[index].id}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.cartList.splice(index,1);
|
||||
this.$toolAll.tools.showToast('删除成功');
|
||||
}
|
||||
})
|
||||
},
|
||||
deladdEvent(cur,index){//数量加减事件
|
||||
if(index==0){//减少数量
|
||||
if(this.cartList[cur].num>1) this.cartList[cur].num--;
|
||||
} else {//增加数量
|
||||
this.cartList[cur].num++;
|
||||
}
|
||||
this.$requst.post('order/shopping-cart-change-num',{id:this.cartList[cur].id,num:this.cartList[cur].num}).then(res=>{})
|
||||
this.zanList();
|
||||
},
|
||||
chooseItem(index){//单选事件
|
||||
this.cartList[index].isActive = !this.cartList[index].isActive;
|
||||
let one = this.cartList.filter(function(item){
|
||||
return item.isActive == false;
|
||||
})
|
||||
one.length==0 ? this.isChooseAll = true : this.isChooseAll = false
|
||||
this.zanList();
|
||||
},
|
||||
chooseAll(){//全选事件
|
||||
this.isChooseAll = !this.isChooseAll;
|
||||
this.cartList.forEach(item=>{
|
||||
this.isChooseAll ? item.isActive = true : item.isActive = false;
|
||||
})
|
||||
this.zanList();
|
||||
},
|
||||
zanList(){//暂存选中商品事件
|
||||
this.delIndex = []
|
||||
this.newList = this.cartList.filter(item=>item.isActive==true);
|
||||
if(this.cancle_del){
|
||||
this.cartList.filter((item,index)=>{
|
||||
if(item.isActive) {
|
||||
this.delIndex.push(item.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
delBtn(){//底部删除事件
|
||||
this.delIndex.forEach(item=>{
|
||||
this.cartList.forEach((item1,index)=>{
|
||||
if(item==item1.id){
|
||||
this.cartList.splice(index,1);
|
||||
this.$requst.post('order/shopping-cart-del',{id:item1.id}).then(res=>{
|
||||
if(res.code==0){
|
||||
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
this.isChooseAll = false;
|
||||
if(this.cartList.length==0){
|
||||
this.cancle_del = false;
|
||||
}
|
||||
},
|
||||
guanEv(index){//管理切换事件
|
||||
index==0 ? this.cancle_del = true : this.cancle_del = false;
|
||||
this.cartList.forEach(item=>item.isActive=false);
|
||||
this.isChooseAll = false;
|
||||
},
|
||||
moveStart(index,e){//移动开始
|
||||
this.isDang = index;
|
||||
this.startX = e.touches[0].pageX
|
||||
},
|
||||
moveEnd(e){
|
||||
moveEnd(e){//移动结束
|
||||
this.endX = e.changedTouches[0].pageX
|
||||
if(this.startX-this.endX>0){
|
||||
this.showDel = true;
|
||||
} else this.showDel = false;
|
||||
},
|
||||
goGetReadyDan(){
|
||||
let newUrl = '';
|
||||
let isNei = '';
|
||||
if(this.isScore=='score') {
|
||||
isNei = 3
|
||||
}
|
||||
if(this.cartList.length == 0) {
|
||||
if(isNei==3){
|
||||
newUrl = '/pagesA/pointsMall/pointsMall';
|
||||
} else {
|
||||
newUrl = '/pages/tabbar/shop/shop';
|
||||
}
|
||||
}
|
||||
if(this.cartList.length > 0) {
|
||||
uni.setStorageSync('orderList',this.newList);
|
||||
newUrl = `/pagesA/getReadyDan/getReadyDan?isNei=${isNei}`;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'/pagesA/getReadyDan/getReadyDan'
|
||||
url:newUrl
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'签到管理'" :statusTitle="true"></status-nav>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class=" fon28 col3">
|
||||
<view class="posir">
|
||||
<image class="posia width100" src="/static/public/sign-01.png" mode="widthFix"></image>
|
||||
<view class="posir tc pad-sx20" style="z-index: 5;">
|
||||
<image src="/static/public/sign-02.png" mode="" style="width: 218rpx;height: 202rpx;margin: 0 auto;"></image>
|
||||
<view class="fon20 colf mar-s20">在连续签到6天,就可以获得额外300积分哦~加油吧</view>
|
||||
<view class="disjcac mar-sx30">
|
||||
<image src="/static/public/sign-03.png" style="width: 31rpx;height: 30rpx;margin-top: 20rpx;" mode=""></image>
|
||||
<view class="bold colf mar-z10" style="font-size: 56rpx;">1000</view>
|
||||
</view>
|
||||
<view class="disjb pad-zy30">
|
||||
<view v-for="(item,index) in timeList" :key="index" class="disjcac fc">
|
||||
<view class="disjcac fon24 posir" :style="{color:item.isSign?'#789CFB':'#FFFFFF',background:item.isSign?'#FFFFFF':''}" style="width: 66rpx;height: 66rpx;border-radius: 100%;border: 2rpx solid #FFFFFF;">
|
||||
+{{item.num}}
|
||||
<view v-if="index==1" class="posia" style="width: 27rpx;height: 27rpx;border-radius: 100%;border: 1rpx solid #759FFD;text-align: center;line-height: 27rpx;color: #759FFD;background: #FFFFFF;font-size: 20rpx;right: 0rpx;bottom: -8rpx;">√</view>
|
||||
</view>
|
||||
<view class="fon28 colf mar-s20">{{item.day}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 获取列表,提现列表 -->
|
||||
<view class="pad-zy30">
|
||||
<view class="mar-s20 bacf pad20 radius20">
|
||||
<view class="mar-x20 fon28 col3 bold">签到记录</view>
|
||||
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
|
||||
<view>
|
||||
<view class="fon26 col3">{{item.title}}</view>
|
||||
<view class="mar-s10 fon20 col9">{{item.time}}</view>
|
||||
</view>
|
||||
<view class="fon36 bold" style="color: #3875F6;">+{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
timeList:[
|
||||
{num:'10',day:'3.21',isSign:true},
|
||||
{num:'10',day:'今天',isSign:true},
|
||||
{num:'20',day:'明天',isSign:false},
|
||||
{num:'20',day:'9.11',isSign:false},
|
||||
{num:'20',day:'9.12',isSign:false},
|
||||
{num:'20',day:'9.13',isSign:false},
|
||||
{num:'20',day:'9.14',isSign:false},
|
||||
],
|
||||
dataList:[
|
||||
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
|
||||
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{background-color: #FFFFFF;}
|
||||
</style>
|
|
@ -1,9 +1,13 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'消息中心'" :statusTitle="true"></status-nav>
|
||||
<status-nav :titleVal="'消息'" :statusTitle="true"></status-nav>
|
||||
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf fon28 col3 disja" :style="{top:statusHNH+'px'}">
|
||||
<view @tap="isWen=true" :class="isWen?'isWen bold':'col9'" class="posir">日程提醒</view>
|
||||
<view @tap="isWen=false" :class="!isWen?'isWen bold':'col9'" class="posir">消息中心</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32">
|
||||
<view :style="{paddingTop: (statusHNH+chuTop+15)+'px'}" class="pad-zy32">
|
||||
<view v-if="dataList.length!=0">
|
||||
<view v-for="(item,index) in dataList" :key="index">
|
||||
<view class="fon24 col6 tc mar-sx50">{{item.time}}</view>
|
||||
|
@ -56,6 +60,8 @@
|
|||
// }
|
||||
],
|
||||
showTop:false,//是否显示返回顶部
|
||||
chuTop:'',
|
||||
isWen:true,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -77,7 +83,13 @@
|
|||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('#daoh').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect);
|
||||
this.chuTop = rect.height
|
||||
}).exec()
|
||||
if(options.index==undefined){this.isWen = false}
|
||||
this.checkMsg()
|
||||
},
|
||||
methods: {
|
||||
|
@ -117,5 +129,16 @@
|
|||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.isWen{color: #3875F6;}
|
||||
.isWen::after{
|
||||
content: '';
|
||||
display: block;
|
||||
height: 8rpx;
|
||||
width: 80%;
|
||||
position: absolute;
|
||||
bottom: -20rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: #3875F6;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 状态栏 -->
|
||||
<status-nav :titleVal="'文章收藏'" :statusTitle="true"></status-nav>
|
||||
<status-nav :titleVal="'收藏'" :statusTitle="true"></status-nav>
|
||||
<!-- 自定义二级分类 -->
|
||||
<!-- 列表 -->
|
||||
<view>
|
||||
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf" :style="{top:statusHNH+'px'}">
|
||||
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" :isCenter="false" :newbmo="'#E0E0E0'" @choosecateEv="chooseTwo" :newcateList="cateList"></cate-pu>
|
||||
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf fon28 col3 disja" :style="{top:statusHNH+'px'}">
|
||||
<view @tap="isWen=true" :class="isWen?'isWen':''" class="posir">文章收藏</view>
|
||||
<view @tap="isWen=false" :class="!isWen?'isWen':''" class="posir">商品收藏</view>
|
||||
</view>
|
||||
<view :style="{paddingTop:(statusHNH+chuTop+15)+'px'}">
|
||||
<view v-if="isWen">
|
||||
<view class="pad-zy32 mar-x20">
|
||||
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" :isCenter="false" :newbmo="'#F2F2F2'" @choosecateEv="chooseTwo" :newcateList="cateList"></cate-pu>
|
||||
</view>
|
||||
<view :style="{paddingTop:(statusHNH+chuTop+30)+'px'}">
|
||||
<view v-if="dataList.length!=0" class="pad-zy20 pad-s20">
|
||||
<list-pu :radiu="true" @comfirmev="comfirmev" :list="dataList"></list-pu>
|
||||
</view>
|
||||
|
@ -17,6 +22,16 @@
|
|||
<view class="fon24 col3">您还没有收藏,快去收藏吧</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view v-if="shopList.length!=0" style="margin-top: -20rpx;">
|
||||
<shopList :dataList="shopList"></shopList>
|
||||
</view>
|
||||
<view v-else class="disjcac fc" style="margin-top: 50%;">
|
||||
<image class="zanw-img" src="/static/public/collection.png" style="" mode="aspectFill"></image>
|
||||
<view class="fon24 col3">您还没有收藏,快去收藏吧</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 返回顶部 -->
|
||||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||
|
@ -27,7 +42,11 @@
|
|||
|
||||
<script>
|
||||
import {cancleCollectionEV} from '@/jsFile/publicAPI.js';
|
||||
import shopList from '@/components/shop-list.vue';
|
||||
export default {
|
||||
components:{
|
||||
shopList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
|
@ -44,6 +63,57 @@
|
|||
isZanw:true,
|
||||
category_id:0,//栏目ID
|
||||
chuTop:'',
|
||||
isWen:true,
|
||||
shopList:[
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:true,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:false,
|
||||
grade:0,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:true,
|
||||
isXian:false,
|
||||
isIntegral:false,
|
||||
grade:0,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:true,
|
||||
isIntegral:false,
|
||||
grade:0,
|
||||
},
|
||||
{
|
||||
imgSrc:'/static/public/wen-one.png',
|
||||
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
|
||||
zhePrice:'3888',
|
||||
yuanPrice:'4205',
|
||||
integral:'2888',
|
||||
isTuan:false,
|
||||
isPing:false,
|
||||
isXian:false,
|
||||
isIntegral:false,
|
||||
grade:0,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
@ -161,5 +231,14 @@
|
|||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.isWen{color: #3875F6;}
|
||||
.isWen::after{
|
||||
content: '';
|
||||
display: block;
|
||||
height: 4rpx;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: -20rpx;
|
||||
background: #3875F6;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
|
||||
<view class="bold">物流信息</view>
|
||||
<view class="bold col3 mar-s40 fon26 disjbac">
|
||||
<view>韵达快递:2983625984729</view>
|
||||
<view>复制</view>
|
||||
<view>{{express}}</view>
|
||||
<view @tap="copyCont">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 地址信息 -->
|
||||
|
@ -146,7 +146,8 @@
|
|||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
isExpress:true,
|
||||
switchQuan:true,
|
||||
showQuan:false
|
||||
showQuan:false,
|
||||
express:'韵达快递:2983625984729'
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
@ -173,6 +174,9 @@
|
|||
uni.navigateTo({
|
||||
url:'/pagesA/immediatePayment/immediatePayment'
|
||||
})
|
||||
},
|
||||
copyCont(){
|
||||
this.$toolAll.tools.clickCopy(this.express)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,26 +4,30 @@
|
|||
<status-nav :titleVal="'二维码海报'" :statusTitle="true"></status-nav>
|
||||
<!-- 自定义二级分类 -->
|
||||
<!-- 列表 -->
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy36 pad-x20">
|
||||
<view v-show="imgSrc!=''">
|
||||
<view class="mar-s20">
|
||||
<image class="width100 radius20" :src="imgSrc" mode="widthFix" lazy-load></image>
|
||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20">
|
||||
<view v-if="imgList.length!=0">
|
||||
<view class="mar-s20 disjbac fw">
|
||||
<image @tap="chooseImg(index)" v-for="(item,index) in imgList" :key="index" class="width100 radius20 mar-x20" :src="item" style="width: 48.5%;max-height: 474rpx" mode="aspectFill" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="disjcac fc" style="margin-top: 50%;">
|
||||
<image class="zanw-img mar-x50" src="/static/public/zanwn.png" mode="aspectFill"></image>
|
||||
<view class="fon24 col3 mar-s50" style="margin-top: 30%;">暂无内容</view>
|
||||
</view>
|
||||
<!-- 预览弹框 -->
|
||||
<view v-if="showBtn" @tap.stop="showBtn=false" class="posAll disjcac fc pad-zy50" style="z-index: 3;">
|
||||
<image :src="imgSrc" @tap.stop="showBtn=true" class="radius20" style="width: 80%;" mode="widthFix"></image>
|
||||
<!-- 分享按钮 -->
|
||||
<view v-if="showBtn" @tap="shareEv" class="disjcac radius20 posir" style="height: 90rpx;margin: 20rpx 80rpx 0 80rpx;background-color: #38CE51;line-height: 90rpx;">
|
||||
<view v-if="haved" @tap.stop="shareEv" class="disjcac radius20 posixzy" style="height: 90rpx;margin: 20rpx 80rpx;background-color: #38CE51;line-height: 90rpx;bottom: 40rpx;">
|
||||
<view class="disac">
|
||||
<image src="/static/public/sharef.png" style="width: 54rpx;height: 54rpx;" mode=""></image>
|
||||
<view class="fon40 bold colf mar-z10">分享给好友</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="imgSrc==''" class="disjcac fc" style="margin-top: 50%;">
|
||||
<image class="zanw-img mar-x50" src="/static/public/zanwn.png" mode="aspectFill"></image>
|
||||
<view class="fon24 col3 mar-s50" style="margin-top: 30%;">暂无内容</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 弹框 -->
|
||||
<pu-po :isShowT="imgSrc==''" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
|
||||
<pu-po :isShowT="imgList.length==0 && isHaib" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
|
||||
<!-- 底部客服 -->
|
||||
<public-customer :nbottom="100"></public-customer>
|
||||
</view>
|
||||
|
@ -37,27 +41,36 @@
|
|||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
||||
isShowT:true,
|
||||
imgSrc:uni.getStorageSync('imgSrcP'),
|
||||
isHaib:false,
|
||||
showBtn:false
|
||||
imgList:uni.getStorageSync('imgSrcList'),
|
||||
imgSrc:'',
|
||||
showBtn:false,
|
||||
isHaib:true,
|
||||
haved:true
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.haved = true
|
||||
},
|
||||
onLoad() {
|
||||
// uni.removeStorageSync('imgSrcList')
|
||||
//如果还没有生成海报
|
||||
this.imgSrc = uni.getStorageSync('imgSrcP')//弹框关闭
|
||||
if(this.imgSrc!='') {
|
||||
setTimeout(()=>{
|
||||
this.showBtn = true
|
||||
},500)
|
||||
}
|
||||
if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')//弹框关闭
|
||||
else this.imgList = []
|
||||
console.log(this.imgList.length);
|
||||
},
|
||||
methods: {
|
||||
chooseImg(index){
|
||||
this.haved = this.showBtn = true;
|
||||
this.imgSrc = this.imgList[index]
|
||||
},
|
||||
shareEv(){
|
||||
this.haved = false
|
||||
wx.showShareImageMenu({
|
||||
path: this.imgSrc
|
||||
path: this.imgSrc,
|
||||
fail:(res=>{//取消分享
|
||||
this.haved = true
|
||||
})
|
||||
})
|
||||
this.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})
|
||||
let maiOjb = {
|
||||
|
@ -72,14 +85,17 @@
|
|||
this.$requst.get('user/personal-poster').then(res=>{
|
||||
// console.log('生成个人海报成功:',res);
|
||||
if(res.code==0){
|
||||
this.imgSrc = res.data.poster
|
||||
let newArr = [];
|
||||
newArr.push(res.data.poster)
|
||||
uni.hideToast()
|
||||
this.$toolAll.tools.showToast('生成海报成功')
|
||||
base64ToPath(this.imgSrc).then(path => {
|
||||
this.imgSrc = path
|
||||
this.showBtn = true
|
||||
uni.setStorageSync('imgSrcP',path)
|
||||
newArr.forEach(item=>{
|
||||
base64ToPath(item).then(path => {
|
||||
this.imgList.push(path)
|
||||
uni.setStorageSync('imgSrcList',this.imgList)
|
||||
}).catch(error => {})
|
||||
})
|
||||
this.$toolAll.tools.showToast('生成海报成功');
|
||||
this.isHaib = false
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
|
|
|
@ -3,73 +3,78 @@
|
|||
<!-- 状态栏 -->
|
||||
<status-nav v-if="invite_code==''" :titleVal="'商品详情'" :statusTitle="true"></status-nav>
|
||||
<!-- 列表 -->
|
||||
<view :style="{top: statusHNH+'px'}" class="posiszy" style="height: 50px;">
|
||||
<view :style="{top: statusHNH+'px'}" v-if="isNei!=3" class="posiszy" style="height: 50px;">
|
||||
<view class="bacf pad-zy32 pad-sx20">
|
||||
<cate-pu @choosecateEv="choosecateEv" :activeb="invite_code!=''?'#3875F6':publicColor" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pad-x180" :style="{paddingTop: (statusHNH+50)+'px'}">
|
||||
<view :style="{top: statusHNH+'px'}" v-else class="posiszy" style="height: 50px;"></view>
|
||||
<view class="pad-x180" :style="{paddingTop: isNei!=3?(statusHNH+60)+'px':statusHNH+'px'}">
|
||||
<!-- 自定义轮播 -->
|
||||
<swiper-pu :browseP="true" :bannerList="bannerList" :newHeight="'250'" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
|
||||
<view v-if="isLoading">
|
||||
<swiper-pu :browseP="true" :bannerList="bannerList" :newHeight="'250'" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
|
||||
<view v-if="isNei==3" style="width: 100%;height: 90rpx;line-height: 90rpx;padding-left: 62rpx;background: #3875F6;color: #FFFFFF;font-size: 40rpx;font-weight: bold;">积分:{{detailObj.score}}</view>
|
||||
<view v-show="cateCurrent==isNum">
|
||||
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
|
||||
<!-- 标题 -->
|
||||
<view class="mar-x20 fon36 col3 bold clips3">
|
||||
<span class="radius15 colf fon20" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">秃顶种植</span>
|
||||
<span class="radius15 colf fon20 mar-z10" style="padding: 6rpx 10rpx;background: #F85050;">团购</span>
|
||||
<span class="radius15 colf fon20 mar-z10" style="padding: 6rpx 10rpx;background: #F85050;">拼团活动</span>
|
||||
<span class="radius15 colf fon20 mar-z10" style="padding: 6rpx 10rpx;background: #F85050;">促销活动</span>
|
||||
<span style="line-height: 50rpx;">【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人尖/头顶加密/微针/纤维/脱发</span>
|
||||
<view class="mar-x20 fon36 col3 bold clips3 shop-title-box line-h50">
|
||||
<view style="margin-top: -8rpx;margin-right: 10rpx;">
|
||||
<span v-if="isNei!=3" class="radius15 colf fon20" :style="{background:publicColor}">{{detailObj.disease_name}}</span>
|
||||
<span v-if="isNei==0" class="radius15 colf fon20 mar-z10">团购</span>
|
||||
<span v-if="isNei==1" class="radius15 colf fon20 mar-z10">拼团活动</span>
|
||||
<span v-if="isNei==2" class="radius15 colf fon20 mar-z10">促销活动</span>
|
||||
</view>
|
||||
<view class="fon24" style="color: #7D7D7D;">无任何额外消费</view>
|
||||
<span>{{detailObj.name}}</span>
|
||||
</view>
|
||||
<view class="fon24 col7D">无任何额外消费</view>
|
||||
<!-- 团购商品详情时显示 -->
|
||||
<view class="disjbac fon24 mar-s20" style="color: #7D7D7D;">
|
||||
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
|
||||
<view>团购累计参与人员:300人</view>
|
||||
<view>还剩余:60人</view>
|
||||
</view>
|
||||
<view class="mar-s20" style="color: #F85050;font-size: 40rpx;font-weight: bold;"><span>团购价:</span>¥3888 <span style="color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;margin-left: 20rpx;">¥4205</span></view>
|
||||
<view class="mar-s20" style="color: #F85050;font-size: 40rpx;font-weight: bold;"><span>拼团价:</span>¥3888 <span style="color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;margin-left: 20rpx;">¥4205</span></view>
|
||||
<view class="disjbac" style="align-items: flex-end;margin-top: -20rpx;padding-bottom: 20rpx;">
|
||||
<view class="disac">
|
||||
<image class="flexs" src="/static/public/huiy.png" style="width: 42rpx;height: 30rpx;" mode="aspectFill"></image>
|
||||
<view class="fon24 col9">黄金会员可购买</view>
|
||||
<view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">团购价:</span><span v-if="isNei==1">拼团价:</span>¥{{detailObj.price/100}} <span v-if="isNei!=10">¥{{detailObj.original_price/100}}</span></view>
|
||||
<view class="mar-s20 shop-price" v-else>积分:{{detailObj.score}}</view>
|
||||
<view class="disjbac shar-box" style="align-items: flex-end;">
|
||||
<view>
|
||||
<view class="disac" v-if="detailObj.level_text!=''">
|
||||
<image class="flexs" src="/static/public/huiy.png" mode="aspectFill"></image>
|
||||
<view class="fon24 col9">{{detailObj.level_text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disac flexs">
|
||||
<view @tap="shareEv" class="disac fc mar-zy36 posir">
|
||||
<image src="/static/public/weix.png" style="width: 42rpx;height: 42rpx;" mode=""></image>
|
||||
<image src="/static/public/weix.png" class="wh42" mode=""></image>
|
||||
<view class="fon24 col9">分享</view>
|
||||
<button class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
|
||||
<!-- <button v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button> -->
|
||||
<button class="posia-op" open-type="share">分享</button>
|
||||
</view>
|
||||
<view class="disac fc" @tap="tapConllection">
|
||||
<image v-if="isDetailConllection" src="/static/public/yconllection.png" style="width: 44rpx;height: 44rpx;" mode=""></image>
|
||||
<image v-else src="/static/public/conllection.png" style="width: 44rpx;height: 44rpx;" mode=""></image>
|
||||
<image v-if="isDetailConllection" src="/static/public/yconllection.png" class="wh44" mode=""></image>
|
||||
<image v-else src="/static/public/conllection.png" class="wh44" mode=""></image>
|
||||
<view class="fon24 col9">收藏</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pad-x30 pad-s10" style="border-bottom: 2rpx solid #E6E6E6;">
|
||||
<view class="fon36 colf bold pbackc tc pad-sx20" style="border-radius: 45rpx;">倒计时:25小时35分26秒</view>
|
||||
<view class="pad-x30 pad-s10 borbot" v-if="isNei==2">
|
||||
<view class="fon36 colf bold pbackc tc pad-sx20 radius45">倒计时:25小时35分26秒</view>
|
||||
</view>
|
||||
<!-- 规格 -->
|
||||
<view class="disjbac tc mar-s20">
|
||||
<view class="disjcac fon28 col3">规格:</view>
|
||||
<view>
|
||||
<view class="fon26 col3 mar-x20">上市时间</view>
|
||||
<view class="fon24" style="color: #B3B3B3;">2021.02.01</view>
|
||||
<view class="fon24 colB3">2021.02.01</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="fon26 col3 mar-x20">有效期</view>
|
||||
<view class="fon24" style="color: #B3B3B3;">三个月</view>
|
||||
<view class="fon24 colB3">三个月</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="fon26 col3 mar-x20">可用时间</view>
|
||||
<view class="fon24" style="color: #B3B3B3;">正常使用</view>
|
||||
<view class="fon24 colB3">正常使用</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="fon26 col3 mar-x20">术前须知</view>
|
||||
<view class="fon24" style="color: #B3B3B3;">无</view>
|
||||
<view class="fon24 colB3">无</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -77,60 +82,32 @@
|
|||
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
|
||||
<view class="fon28 disjbac">
|
||||
<view class="col3">销量:</view>
|
||||
<view style="color: #B3B3B3;">已售30件</view>
|
||||
<view class="colB3">已售{{detailObj.amount}}件</view>
|
||||
</view>
|
||||
<view class="fon28 disjbac mar-s40">
|
||||
<view class="col3">库存:</view>
|
||||
<view style="color: #B3B3B3;">剩余3000件</view>
|
||||
<view class="colB3">剩余{{detailObj.stock}}件</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 拼团 -->
|
||||
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
|
||||
<view class="fon28 col3">2人正在拼团,可以直接参与</view>
|
||||
<swiper :autoplay="true" :interval="3000" :duration="1000" circular="true" vertical="true" style="height: 176px;">
|
||||
<swiper-item>
|
||||
<view class="disjbac posir pad-sx20">
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs" style="width: 70rpx;height: 70rpx; border-radius: 100%;"></image>
|
||||
<view v-if="isNei==1" class="pad20 bacf mar-zy20 radius20 mar-s20">
|
||||
<view class="fon28 col3">{{len}}人正在拼团,可以直接参与</view>
|
||||
<swiper :autoplay="true" :interval="3000" :duration="1000" circular="true" class="shop-swiper" vertical="true">
|
||||
<swiper-item v-for="(item,index) in pingArr" :key="index">
|
||||
<view class="disjbac posir pad-x20" v-for="(itemt,indext) in item" :key="indext">
|
||||
<image :src="itemt.imgSrc" mode="aspectFill" class="flexs big-img"></image>
|
||||
<view class="disjbac width100 mar-z20 pad-sx20">
|
||||
<view class="fon28 col3" style="width: 45%;">廖恒利</view>
|
||||
<view class="fon28 disjbac" style="color: #7D7D7D;width: 55%;">
|
||||
<view>
|
||||
<view class="fon28 col3 width45">{{itemt.name}}</view>
|
||||
<view class="fon28 disjbac width100 col7D">
|
||||
<view class="flexs">
|
||||
<view>还差1人拼成</view>
|
||||
<view style="margin-top: 7rpx;">剩余19:47:28</view>
|
||||
<view style="margin-top: 7rpx;">{{itemt.time_text}}</view>
|
||||
</view>
|
||||
<view @tap="comeTuan" class="colf bold" style="width: 140rpx;height: 80rpx;line-height: 80rpx;text-align: center;background: #F85050;border-radius: 20rpx;">去拼单</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="border-bottom: 2rpx solid #E6E6E6;position: absolute;bottom: 0;width: 87%;right: 0;"></view>
|
||||
</view>
|
||||
<view class="disjbac posir pad-sx20">
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs" style="width: 70rpx;height: 70rpx; border-radius: 100%;"></image>
|
||||
<view class="disjbac width100 mar-z20 pad-sx20">
|
||||
<view class="fon28 col3" style="width: 45%;">廖恒利</view>
|
||||
<view class="fon28 disjbac" style="color: #7D7D7D;width: 55%;">
|
||||
<view>
|
||||
<view>还差1人拼成</view>
|
||||
<view style="margin-top: 7rpx;">剩余19:47:28</view>
|
||||
</view>
|
||||
<view @tap="comeTuan" class="colf bold" style="width: 140rpx;height: 80rpx;line-height: 80rpx;text-align: center;background: #F85050;border-radius: 20rpx;">去拼单</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="border-bottom: 2rpx solid #E6E6E6;position: absolute;bottom: 0;width: 87%;right: 0;"></view> -->
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="disjbac posir pad-sx20">
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs" style="width: 70rpx;height: 70rpx; border-radius: 100%;"></image>
|
||||
<view class="disjbac width100 mar-z20 pad-sx20">
|
||||
<view class="fon28 col3" style="width: 45%;">廖恒利</view>
|
||||
<view class="fon28 disjbac" style="color: #7D7D7D;width: 55%;">
|
||||
<view>
|
||||
<view>还差1人拼成</view>
|
||||
<view style="margin-top: 7rpx;">剩余19:47:28</view>
|
||||
</view>
|
||||
<view @tap="comeTuan" class="colf bold" style="width: 140rpx;height: 80rpx;line-height: 80rpx;text-align: center;background: #F85050;border-radius: 20rpx;">去拼单</view>
|
||||
<view @tap="comeTuan(itemt.id,index,indext)" class="colf bold flexs">去拼单</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 短线 -->
|
||||
<view class="duan-xian"></view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
@ -146,24 +123,24 @@
|
|||
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
|
||||
<view class="fon28 col3 bold">医生</view>
|
||||
<view class="disjbac posir pad-sx20">
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs" style="width: 70rpx;height: 70rpx; border-radius: 100%;"></image>
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs big-img"></image>
|
||||
<view class="disjbac width100 mar-z20 pad-sx20">
|
||||
<view class="fon28 col3" style="width: 50%;">廖恒利医生</view>
|
||||
<view class="fon24" style="color: #7D7D7D;width: 50%;">擅长:毛发种植</view>
|
||||
<view class="fon28 col3 width50">廖恒利医生</view>
|
||||
<view class="fon24 width50 col7D">擅长:毛发种植</view>
|
||||
</view>
|
||||
<view style="border-bottom: 2rpx solid #E6E6E6;position: absolute;bottom: 0;width: 87%;right: 0;"></view>
|
||||
<view class="duan-xian"></view>
|
||||
</view>
|
||||
<view class="disjbac pad-sx20">
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs" style="width: 70rpx;height: 70rpx; border-radius: 100%;"></image>
|
||||
<image src="/static/public/like.png" mode="aspectFill" class="flexs big-img"></image>
|
||||
<view class="disjbac width100 mar-z20 pad-sx20">
|
||||
<view class="fon28 col3" style="width: 50%;">廖恒利医生</view>
|
||||
<view class="fon24" style="color: #7D7D7D;width: 50%;">擅长:毛发种植</view>
|
||||
<view class="fon28 col3 width50">廖恒利医生</view>
|
||||
<view class="fon24 width50 col7D">擅长:毛发种植</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 产品推荐 -->
|
||||
<view class="fon30 bold mar-s40 mar-x10 pad-zy50" style="color: #3875F6;">产品推荐</view>
|
||||
<shopList></shopList>
|
||||
<view class="fon30 bold mar-s40 mar-x10 pad-zy50 pcol">产品推荐</view>
|
||||
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部导航 -->
|
||||
|
@ -172,89 +149,91 @@
|
|||
<image @tap="backHome" class="posia backH" src="/static/public/back-home.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="disac fon26 colf">
|
||||
<view @tap="showTK=true" class="disjcac lianShare" style="background-color: #3875F6; border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;">加入购物车</view>
|
||||
<view @tap="showTK=true" class="disjcac lianShare" style="background-color: #F85050;border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;">立即购买</view>
|
||||
<view @tap="chooseShop" class="disjcac lianShare addCart-btn">加入购物车</view>
|
||||
<view @tap="chooseShop" class="disjcac lianShare mai-btn">立即购买</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 购物车 -->
|
||||
<navigator url="/pagesA/shopCart/shopCart" hover-class="none">
|
||||
<view style="position: fixed;right: 30rpx;bottom: 300rpx;">
|
||||
<view class="posir" style="width: 112rpx;height: 112rpx;">
|
||||
<image src="/static/public/cart.png" mode="aspectFill" style="width: 112rpx;height: 112rpx;"></image>
|
||||
<view class="posia" style="background: #F85050;width: 28rpx;height: 28rpx;border-radius: 100%;color: #FFFFFF;font-size: 24rpx;text-align: center;line-height: 28rpx;top: 20rpx;right: 20rpx;"><view style="transform: scale(.8);">99</view></view>
|
||||
<view @tap="goShopCart" class="detail-cart-box">
|
||||
<view class="posir">
|
||||
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
||||
<view class="posia"><view>99</view></view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 客服 -->
|
||||
<view style="position: fixed;right: 16rpx;bottom: 140rpx;">
|
||||
<view class="posir" style="width: 142rpx;height: 142rpx;">
|
||||
<image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image>
|
||||
<button open-type="share" class="posia syxzo"></button>
|
||||
<button open-type="share" class="posia-op"></button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 立即购买,加入购物车弹框 -->
|
||||
<view v-if="showTK" class="posAll" @tap="showTK=false">
|
||||
<view class="bacf posixzy" @tap.stop="showTK=true" style="border-radius: 40rpx 40rpx 0rpx 0rpx;">
|
||||
<view class="bacf posixzy bottom-popu" @tap.stop="showTK=true">
|
||||
<view class="disjb pad-zy50">
|
||||
<image src="/static/public/like.png" mode="aspectFill" style="width: 214rpx;height: 214rpx;border-radius: 15rpx;bottom: 0;flex-shrink: 0;margin-top: -107rpx;margin-right: 30rpx;"></image>
|
||||
<view class="disjb width100">
|
||||
<view>
|
||||
<view class="fon40 mar-sx10" style="color: #F85050;">¥3888</view>
|
||||
<view><span style="color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;">¥4205</span></view>
|
||||
<image :src="zhuImg" mode="aspectFill"></image>
|
||||
<view class="disjbac width100">
|
||||
<view v-if="isNei!=3">
|
||||
<view class="fon40 mar-sx10 colf8">¥{{skuDetail.price/100}}</view>
|
||||
<view v-if="isNei!=10"><span class="yuan-price">¥{{skuDetail.original_price/100}}</span></view>
|
||||
</view>
|
||||
<image @tap.stop="showTK=false" src="../../static/public/cha-close.png" style="width: 24px;height: 24px;margin-top: 20rpx;" mode=""></image>
|
||||
<view v-else><view class="fon40 mar-sx10 colf8">积分:{{skuDetail.score}}</view></view>
|
||||
<image @tap.stop="showTK=false" src="/static/public/cha-close.png" style="margin-right: 0rpx;" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 标题 -->
|
||||
<view class="fon36 col3 bold clips3 pad-zy30 mar-s20">
|
||||
<span class="radius10 colf fon20" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">秃顶种植</span>
|
||||
<span class="radius10 colf fon20 mar-z10" style="padding: 6rpx 10rpx;background: #F85050;">团购</span>
|
||||
<span class="radius10 colf fon20 mar-z10" style="padding: 6rpx 10rpx;background: #F85050;">拼团活动</span>
|
||||
<span class="radius10 colf fon20 mar-z10" style="padding: 6rpx 10rpx;background: #F85050;">促销活动</span>
|
||||
<span style="line-height: 50rpx;">【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人尖/头顶加密/微针/纤维/脱发</span>
|
||||
<view class="fon36 col3 bold clips3 pad-zy30 mar-s20 shop-title-box line-h50">
|
||||
<view style="margin-top: -8rpx;margin-right: 10rpx;">
|
||||
<span class="radius15 colf fon20" :style="{background:publicColor}">{{detailObj.disease_name}}</span>
|
||||
<span class="radius15 colf fon20 mar-z10" v-if="isNei==0">团购</span>
|
||||
<span class="radius15 colf fon20 mar-z10" v-if="isNei==1">拼团活动</span>
|
||||
<span class="radius15 colf fon20 mar-z10" v-if="isNei==2">促销活动</span>
|
||||
</view>
|
||||
<span>{{skuDetail.title}}</span>
|
||||
</view>
|
||||
<view class="disjbac mar-sx40 pad-zy30 col3">
|
||||
<view class="fon28">类型:</view>
|
||||
<view class="fon26 disac">
|
||||
<view @tap="chooselei(indexl)" v-for="(item,indexl) in leiList" :key="indexl" :class="leiIndex==indexl?'activelei':'molei'" :style="{background:leiIndex==indexl?publicColor:'#F2F2F2'}">{{item}}</view>
|
||||
<view @tap="chooselei(indexl)" v-for="(item,indexl) in allRes.sku" :key="indexl" :class="leiIndex==indexl?'activelei':'molei'" :style="{background:leiIndex==indexl?publicColor:'#F2F2F2'}">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disjbac mar-sx40 pad-zy30 fon28">
|
||||
<view class="col3">库存:</view>
|
||||
<view class="fon26 col3" style="color: #5B5B5B;">1000件</view>
|
||||
<view class="fon26 col3" style="color: #5B5B5B;">{{skuDetail.stock}}件</view>
|
||||
</view>
|
||||
<view class="disjbac mar-sx40 pad-zy30 fon28">
|
||||
<view class="col3">购买数量:</view>
|
||||
<view class="fon26 col3 disac bold">
|
||||
<image src="../../static/public/del.png" mode="" style="width: 65rpx;height: 30px;"></image>
|
||||
<input type="text" value="1" style="width: 100rpx;height: 28px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;"/>
|
||||
<image src="../../static/public/add.png" mode="" style="width: 65rpx;height: 30px;"></image>
|
||||
<image @tap="buyNum!=1?buyNum--:''" src="/static/public/del.png" class="del-btn" mode=""></image>
|
||||
<input type="text" v-model="buyNum" class="num-input"/>
|
||||
<image @tap="buyNum++" src="/static/public/add.png" class="add-btn" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 加入购物车,立即购买 -->
|
||||
<view class="disjbac pad-zy30 colf fon28 mar-x20">
|
||||
<view style="width: 294rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 10rpx; background: #3875F6;">加入购物车</view>
|
||||
<view style="width: 294rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 10rpx; background: #F85050;">立即购买</view>
|
||||
<view v-if="isNei!=1" class="disjbac pad-zy30 colf fon28 mar-x20">
|
||||
<view @tap="addCart" class="ev-btn pbackc">加入购物车</view>
|
||||
<view v-if="isNei!=3" @tap.stop="goGetReadyDan" class="ev-btn bcf8">立即购买</view>
|
||||
<view v-else @tap.stop="goGetReadyDan" class="ev-btn bcf8">立即兑换</view>
|
||||
</view>
|
||||
<!-- 单独购买,立即拼团 -->
|
||||
<view class="disjbac pad-zy30 colf fon28 mar-x20">
|
||||
<view style="width: 294rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 10rpx; background: #C8C8C8;">单独购买</view>
|
||||
<view style="width: 294rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 10rpx; background: #F85050;">立即拼团</view>
|
||||
<view v-else class="disjbac pad-zy30 colf fon28 mar-x20">
|
||||
<view class="ev-btn" style="background: #C8C8C8;">单独购买</view>
|
||||
<view class="ev-btn bcf8">立即拼团</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 去拼单弹框 -->
|
||||
<view v-if="showPD" @tap.stop="showPD=false" style="position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 6;background: rgba(0,0,0,.54);display: flex;justify-content: center;align-items: center;">
|
||||
<view class="bacf radius20 width100 posir" @tap.stop="showPD=true" style="font-weight: 500;text-align: center;margin: 0 85rpx;height: 458rpx;">
|
||||
<view class="fon28 col3" style="margin: 34rpx 0 27rpx 0;">参与廖恒利的拼单</view>
|
||||
<view class="fon24 col3" style="margin-bottom: 63rpx;">仅剩1个名额,19:05:28后结束</view>
|
||||
<view class="disjcac" style="margin-bottom: 77rpx;">
|
||||
<image src="/static/public/like.png" mode="" style="width: 100rpx;height: 100rpx;border-radius: 100%;"></image>
|
||||
<image src="/static/public/pin-jie.png" mode="" style="width: 42rpx;height: 42rpx;margin: 0 47rpx;"></image>
|
||||
<image src="/static/public/weiz.png" mode="" style="width: 100rpx;height: 100rpx;border-radius: 100%;"></image>
|
||||
<view v-if="showPD" class="pd-tk-box" @tap.stop="showPD=false">
|
||||
<view class="bacf radius20 width100 posir" @tap.stop="showPD=true">
|
||||
<view class="fon28 col3">参与{{pinInfo.name}}的拼单</view>
|
||||
<view class="fon24 col3">仅剩1个名额,{{pinInfo.time_text.slice(3)}}后结束</view>
|
||||
<view class="disjcac">
|
||||
<image :src="pinInfo.imgSrc" mode="aspectFill"></image>
|
||||
<image src="/static/public/pin-jie.png" mode=""></image>
|
||||
<image src="/static/public/weiz.png" mode=""></image>
|
||||
</view>
|
||||
<view style="width: 464rpx;height: 60rpx;line-height: 60rpx;color: #FFFFFF;background: #F85050;border-radius: 10rpx;margin: 0 auto;font-size: 28rpx;">参与拼单</view>
|
||||
<image @tap.stop="showPD=false" src="../../static/public/pin-close.png" class="posia" style="width: 77rpx;height: 77rpx;right: -30rpx;top: -30rpx;" mode=""></image>
|
||||
<view>参与拼单</view>
|
||||
<image @tap.stop="showPD=false" src="/static/public/pin-close.png" class="posia" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 返回顶部 -->
|
||||
|
@ -281,7 +260,7 @@
|
|||
<script>
|
||||
import listDoctor from '@/components/list-doctor.vue';
|
||||
import swiperPu from '@/components/swiper-pu.vue';
|
||||
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
|
||||
import {cancleCollectionShopEV,collectionShopEV} from '@/jsFile/publicAPI.js';
|
||||
import empower from '@/components/empower.vue';
|
||||
import shopList from '@/components/shop-list.vue';
|
||||
export default {
|
||||
|
@ -294,95 +273,58 @@
|
|||
data() {
|
||||
return {
|
||||
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
|
||||
isLoading:true,
|
||||
isLoading:false,
|
||||
vision:false,
|
||||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
publicColor:uni.getStorageSync('publicColor') || '#3875F6',//主题颜色
|
||||
cateCurrent:0,
|
||||
haveImg:true,
|
||||
cateList:[
|
||||
{
|
||||
cateList:[{
|
||||
id:1,
|
||||
title:'商品详情',
|
||||
pid:11,
|
||||
sort:4
|
||||
},{
|
||||
id:2,
|
||||
title:'问题',
|
||||
pid:22,
|
||||
sort:4
|
||||
},{
|
||||
id:3,
|
||||
title:'案例日记',
|
||||
pid:33,
|
||||
sort:4
|
||||
},{
|
||||
id:4,
|
||||
title:'效果模拟',
|
||||
pid:33,
|
||||
sort:4
|
||||
},{
|
||||
id:5,
|
||||
title:'科普视频',
|
||||
pid:33,
|
||||
sort:4
|
||||
}],
|
||||
bannerList:[
|
||||
{imgSrc:'/static/public/banner.png',url:'',isVideo:true,poster:''},
|
||||
{imgSrc:'/static/public/banner.png',url:'',isVideo:false,poster:''}
|
||||
],//轮播
|
||||
xgList:[//相关推荐
|
||||
],
|
||||
dataList:[//推荐医生
|
||||
],
|
||||
bannerList:[],//轮播
|
||||
//相关推荐
|
||||
xgList:[],
|
||||
//产品推荐
|
||||
dataList:[],
|
||||
showTop:false,
|
||||
isDetailConllection:false,//是否已收藏
|
||||
isNum:0,
|
||||
listArrone:[],//问题
|
||||
listArrtwo:[//案例日记
|
||||
],
|
||||
listArrthree:[//效果模拟
|
||||
],
|
||||
listArrfour:[//科普视频
|
||||
],
|
||||
//案例日记
|
||||
listArrtwo:[],
|
||||
//效果模拟
|
||||
listArrthree:[],
|
||||
//科普视频
|
||||
listArrfour:[],
|
||||
detailObj:{},//详情
|
||||
detailInfo:'',//富文本
|
||||
category_id:'',//栏目ID
|
||||
active:'',//是否是详情页
|
||||
// jieDuan:false,
|
||||
share_id:0,
|
||||
invite_code:'',
|
||||
isShowP:false,
|
||||
showTK:false,
|
||||
leiIndex:0,
|
||||
leiList:['体验装','正式装'],
|
||||
showPD:false
|
||||
showPD:false,
|
||||
orderId:'',//订单ID
|
||||
isNei:'',//什么类型的商品
|
||||
pingArr:[],//拼团列表
|
||||
len:0,//正在拼团人数
|
||||
pinInfo:{},//拼单人信息
|
||||
allRes:{},//所有订单信息
|
||||
zhuImg:'',//cover图
|
||||
skuDetail:{},//sku详情
|
||||
buyNum:1,//购买数量
|
||||
isScore:''
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
||||
},
|
||||
onReachBottom() {//触底事件
|
||||
// for (let i = 0; i < 4; i++) {
|
||||
// if(this.cateCurrent==0) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:0}
|
||||
// this.listArrone.push(obj)
|
||||
// }
|
||||
// if(this.cateCurrent==1) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:1}
|
||||
// this.listArrtwo.push(obj)
|
||||
// }
|
||||
// if(this.cateCurrent==2) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:2}
|
||||
// this.listArrthree.push(obj)
|
||||
// }
|
||||
// if(this.cateCurrent==3) {
|
||||
// let obj = {status:false,main_img:'',title:'恒美小课堂',content:'饺子会吃肉?',head_img:'/static/public/like.png',name:'吃肉的饺子',isCate:3}
|
||||
// this.listArrfour.push(obj)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
onShareTimeline() {},
|
||||
onShareAppMessage(res) {
|
||||
var ya = this;
|
||||
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
|
||||
|
@ -392,9 +334,10 @@
|
|||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
if(ya.detailObj.share_img==null) ya.detailObj.share_img = ya.detailObj.cover;
|
||||
var shareObj = {
|
||||
title: `${ya.detailObj.title}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
title: `${ya.detailObj.name}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ya.$http + ya.detailObj.share_img//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
|
@ -439,14 +382,53 @@
|
|||
c:this.conid*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
this.$toolAll.tools.maiDian(maiOjb);
|
||||
this.orderId = options.id;
|
||||
if(options.isText=='团购') this.isNei = 0;
|
||||
if(options.isText=='拼团') this.isNei = 1;
|
||||
if(options.isText=='限时') this.isNei = 2;
|
||||
if(options.isText=='积分') this.isNei = 3;
|
||||
if(options.isText=='') this.isNei = 10;
|
||||
this.checkDetail(this.orderId);
|
||||
},
|
||||
methods: {
|
||||
comeTuan(){//去拼单
|
||||
goGetReadyDan(){//弹框中的立即购买
|
||||
this.showTK = false;
|
||||
// {id:1,imgSrc:'/static/tabbar/mya.png',title:'【99皮皮节】【种植发际线】',price:3888,num:1,isActive:false},
|
||||
let nprice = '';
|
||||
if(this.isNei==3) {
|
||||
nprice = this.detailObj.score;
|
||||
} else nprice = this.skuDetail.price/100;
|
||||
let params = {
|
||||
id:this.skuDetail.id,
|
||||
imgSrc:this.$http + this.detailObj.cover,
|
||||
coding:this.skuDetail.coding,
|
||||
price:nprice,
|
||||
num:this.buyNum,
|
||||
title:this.detailObj.name,
|
||||
is_score:this.detailObj.is_score
|
||||
}
|
||||
let newList = [params];
|
||||
uni.setStorageSync('orderList',newList);
|
||||
uni.navigateTo({
|
||||
url:`/pagesA/getReadyDan/getReadyDan?isNei=${this.isNei}`
|
||||
})
|
||||
},
|
||||
addCart(){//添加购物车事件
|
||||
this.$requst.post('order/shopping-cart-add',{sku_id:this.skuDetail.id,num:this.buyNum}).then(res=>{
|
||||
if(res.code==0) {
|
||||
this.showTK = false;
|
||||
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
|
||||
}
|
||||
})
|
||||
},
|
||||
comeTuan(pinId,index,index2){//去拼单
|
||||
this.showPD = true;
|
||||
this.pinInfo = this.pingArr[index][index2];
|
||||
},
|
||||
chooselei(index){//类型选择
|
||||
this.leiIndex = index
|
||||
this.skuDetail = this.allRes.sku[index];
|
||||
},
|
||||
moveHandle(){//禁止底层滑动
|
||||
return false
|
||||
|
@ -465,7 +447,6 @@
|
|||
}
|
||||
},
|
||||
chooseLike(e){//收藏事件
|
||||
// console.log(this.dataList[e].is_collected);
|
||||
let cateId = ''
|
||||
let newArr = []
|
||||
if(this.cateCurrent==0) {
|
||||
|
@ -487,7 +468,7 @@
|
|||
if(newArr[e].is_collected==0){
|
||||
newArr[e].is_collected = 1
|
||||
// 调用收藏事件
|
||||
collectionEV({action:'collect',archive_id:cateId})
|
||||
collectionShopEV({action:'collect',id:cateId})
|
||||
}
|
||||
},
|
||||
comfirmev(e){//确认取消收藏事件
|
||||
|
@ -510,20 +491,20 @@
|
|||
}
|
||||
this.$toolAll.tools.showToast('正在取消...','loading')
|
||||
// 调用取消收藏事件
|
||||
cancleCollectionEV({action:'collect',archive_id:cateId})
|
||||
cancleCollectionShopEV({action:'collect',id:cateId})
|
||||
},
|
||||
chooseLikex(e){//收藏事件
|
||||
if(this.xgList[e].is_collected==0){
|
||||
this.xgList[e].is_collected = 1
|
||||
// 调用收藏事件
|
||||
collectionEV({action:'collect',archive_id:this.xgList[e].id})
|
||||
collectionShopEV({action:'collect',id:this.xgList[e].id})
|
||||
}
|
||||
},
|
||||
comfirmevx(e){//确认取消收藏事件
|
||||
this.xgList[e].is_collected = 0
|
||||
this.$toolAll.tools.showToast('正在取消...','loading')
|
||||
// 调用取消收藏事件
|
||||
cancleCollectionEV({action:'collect',archive_id:this.xgList[e].id})
|
||||
cancleCollectionShopEV({action:'collect',id:this.xgList[e].id})
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
this.haveImg = e
|
||||
|
@ -545,114 +526,145 @@
|
|||
this.vision = true
|
||||
}
|
||||
},
|
||||
// checkDetail(newId){
|
||||
// this.$requst.post('archives/detail',{id:newId,share_id:this.share_id}).then(res=>{
|
||||
// // console.log('详情数据:',res);
|
||||
// if(res.code==0){
|
||||
// this.isLoading=true
|
||||
// // 栏目类别
|
||||
// if(res.data.category.length!=0){
|
||||
// res.data.category.forEach((item,index)=>{
|
||||
// let cateObj = {
|
||||
// id:item.id,//栏目ID
|
||||
// title:item.title,//栏目名称
|
||||
// active:item.active,//是否选中
|
||||
// model_id:item.model_id,//模型ID
|
||||
// model_name:item.model_name,//模型标识
|
||||
// sort:item.sort
|
||||
// }
|
||||
// this.cateList.push(cateObj)
|
||||
// // 默认选中的栏目
|
||||
// if(item.active==1) this.active = this.cateCurrent = index
|
||||
// // 默认展示栏目详情
|
||||
// if(this.category_id==item.id) this.isNum = index
|
||||
// })
|
||||
// }
|
||||
// if(this.invite_code!='' && this.invite_code!=undefined){
|
||||
// const query = wx.createSelectorQuery()
|
||||
// query.select('.statusHNH').boundingClientRect((rect) => {
|
||||
// // console.log('状态栏+标题栏:',rect);
|
||||
// this.statusHNH = rect.height
|
||||
// // console.log(this.statusHNH );
|
||||
// }).exec()
|
||||
// }
|
||||
// // 详情
|
||||
// this.detailObj = res.data.detail
|
||||
// let maiOjb = {
|
||||
// e:1,//内容访问
|
||||
// c:this.detailObj.id*1,
|
||||
// t:new Date().getTime()//当前时间戳
|
||||
// }
|
||||
// this.$toolAll.tools.maiDian(maiOjb)
|
||||
// // 轮播
|
||||
// // 图片字符串转数组
|
||||
// let arrImg = this.detailObj.images.split(',')
|
||||
// arrImg.forEach(item=>{
|
||||
// let newImgObj = {
|
||||
// imgSrc:this.$http + item,
|
||||
// url:'',
|
||||
// isVideo:false,
|
||||
// poster:'',
|
||||
// }
|
||||
// // 存图片
|
||||
// this.bannerList.push(newImgObj)
|
||||
// })
|
||||
// // 存视频
|
||||
// if(this.detailObj.video!=''){
|
||||
// this.bannerList[0] = {
|
||||
// imgSrc:this.$http + arrImg[0],
|
||||
// url:this.$http + this.detailObj.video,
|
||||
// isVideo:true,
|
||||
// poster:'',
|
||||
// }
|
||||
// }
|
||||
// // 默认显示是否收藏
|
||||
// if(this.detailObj.is_collected==0) this.isDetailConllection = false
|
||||
// if(this.detailObj.is_collected==1) this.isDetailConllection = true
|
||||
// // 富文本
|
||||
// this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
|
||||
// // 相关推荐xgList
|
||||
// if(res.data.diary.length!=0){
|
||||
// res.data.diary.forEach(item=>{
|
||||
// let tObj = {
|
||||
// category_id:item.category_id,//栏目ID
|
||||
// id:item.id,
|
||||
// is_collected:item.is_collected,//是否已收藏
|
||||
// collects:item.collects,//收藏量
|
||||
// views:item.views,//查看量
|
||||
// main_img:this.$http + item.cover,//封面图
|
||||
// video:this.$http + item.video,//视频地址
|
||||
// title:item.title,//标题
|
||||
// content:item.subtitle,//副标题
|
||||
// head_img:'/static/public/logo.png',//发布者头像
|
||||
// name:'恒美植发',//发布者昵称
|
||||
// isVideo:item.video.includes(".mp4")//是否是视频
|
||||
// }
|
||||
// if(item.cover!='' && item.video==''){
|
||||
// this.xgList.push(tObj)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// // 推荐医生
|
||||
// if(res.data.doctor.length!=0){
|
||||
// res.data.doctor.forEach(item=>{
|
||||
// let doObj = {
|
||||
// id:item.id,
|
||||
// imgSrc: item.headimg!=null ? item.headimg : '',
|
||||
// name:item.name,
|
||||
// cyear:parseFloat(item.work_time),
|
||||
// bmen:item.dept_name,
|
||||
// zcheng:'主任医师',
|
||||
// goodAt:item.diseases,
|
||||
// show_detail:item.show_detail
|
||||
// }
|
||||
// this.dataList.push(doObj)
|
||||
// })
|
||||
// }
|
||||
// this.choosecateEv(this.cateCurrent)
|
||||
// }
|
||||
// },error=>{})
|
||||
// },
|
||||
checkDetail(newId){
|
||||
this.$requst.post('spu/detail',{id:newId}).then(res=>{
|
||||
// console.log('详情数据:',res);
|
||||
if(res.code==0){
|
||||
this.allRes = res.data;
|
||||
this.zhuImg = this.$http + res.data.detail.cover;
|
||||
// 默认显示的sku
|
||||
if(res.data.sku.length!=0){
|
||||
res.data.sku.forEach(item=>{
|
||||
if(item.is_default==1) {
|
||||
this.skuDetail = item;
|
||||
}
|
||||
})
|
||||
}
|
||||
this.isLoading = true;
|
||||
// 栏目类别
|
||||
if(res.data.category.length!=0){
|
||||
res.data.category.forEach((item,index)=>{
|
||||
let cateObj = {
|
||||
id:item.id,//栏目ID
|
||||
title:item.title,//栏目名称
|
||||
active:item.active,//是否选中
|
||||
model_id:item.model_id,//模型ID
|
||||
model_name:item.model_name,//模型标识
|
||||
sort:item.sort
|
||||
}
|
||||
this.cateList.push(cateObj)
|
||||
// 默认选中的栏目
|
||||
if(item.active==1) this.active = this.cateCurrent = index
|
||||
// 默认展示栏目详情
|
||||
if(this.category_id==item.id) this.isNum = index
|
||||
})
|
||||
}
|
||||
if(this.invite_code!='' && this.invite_code!=undefined){
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.statusHNH').boundingClientRect((rect) => {
|
||||
// console.log('状态栏+标题栏:',rect);
|
||||
this.statusHNH = rect.height
|
||||
// console.log(this.statusHNH );
|
||||
}).exec()
|
||||
}
|
||||
// 详情
|
||||
this.detailObj = res.data.detail
|
||||
let maiOjb = {
|
||||
e:1,//内容访问
|
||||
c:this.detailObj.id*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
}
|
||||
this.$toolAll.tools.maiDian(maiOjb)
|
||||
// 轮播
|
||||
// 图片字符串转数组
|
||||
let arrImg = this.detailObj.images.split(',')
|
||||
arrImg.forEach(item=>{
|
||||
let newImgObj = {
|
||||
imgSrc:this.$http + item,
|
||||
url:'',
|
||||
isVideo:false,
|
||||
poster:'',
|
||||
}
|
||||
// 存图片
|
||||
this.bannerList.push(newImgObj)
|
||||
})
|
||||
// 存视频
|
||||
if(this.detailObj.video!=''){
|
||||
this.bannerList[0] = {
|
||||
imgSrc:this.$http + arrImg[0],
|
||||
url:this.$http + this.detailObj.video,
|
||||
isVideo:true,
|
||||
poster:'',
|
||||
}
|
||||
}
|
||||
// 默认显示是否收藏
|
||||
if(this.detailObj.is_collected==0) this.isDetailConllection = false
|
||||
if(this.detailObj.is_collected==1) this.isDetailConllection = true
|
||||
// 富文本
|
||||
this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
|
||||
// 正在平团人数
|
||||
if(this.isNei==1 && this.detailObj.activity_going.length!=0) {
|
||||
this.detailObj.activity_going.forEach(item=>{
|
||||
let pObj = {
|
||||
id:item.id,
|
||||
imgSrc:this.$http + item.cover,
|
||||
name:item.name,
|
||||
num:item.num,//剩余拼团数量
|
||||
time:item.time,//拼团截止时间
|
||||
time_text:item.time_text//拼团截止时间展示文本
|
||||
}
|
||||
this.pingArr.push(pObj);
|
||||
})
|
||||
this.len = this.pingArr.length;
|
||||
let n = 2; //假设每行显示2个
|
||||
let lineNum = this.len % 2 === 0 ? this.len / 2 : Math.floor( (this.len / 2) + 2 );
|
||||
let newPArr = [];
|
||||
for (let i = 0; i < lineNum; i++) {
|
||||
let temp = this.pingArr.slice(i*n, i*n+n);
|
||||
newPArr.push(JSON.parse(JSON.stringify(temp)));
|
||||
}
|
||||
this.pingArr = newPArr;
|
||||
// 产品推荐
|
||||
if(res.data.product.length!=0){
|
||||
res.data.product.forEach(item=>{
|
||||
let tuan = false,ping = false,xian = false,integral = false;
|
||||
if(item.activity_type=='group_make') ping = true;
|
||||
if(item.activity_type=='group_buy') tuan = true;
|
||||
if(item.activity_type=='limit_time') xian = true;
|
||||
let obj = {
|
||||
id:item.id,
|
||||
imgSrc: this.$http + item.cover,
|
||||
title: item.name,
|
||||
zhePrice:item.price/100,
|
||||
yuanPrice:item.original_price/100,
|
||||
integral:'',
|
||||
isTuan:tuan,
|
||||
isPing:ping,
|
||||
isXian:xian,
|
||||
isIntegral:integral,
|
||||
grade:'',
|
||||
disease_name:item.disease_name,//病种名称
|
||||
disease_id:item.disease_id,//病种ID
|
||||
activity_end_at:'',//限时结束时间
|
||||
activity_group_cover:[],//参团人的头像
|
||||
activity_group_num:''//已经参团人数
|
||||
}
|
||||
this.dataList.push(obj)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
chooseShop(){//加入购物车,立即购买调起弹框事件
|
||||
this.showTK = true;
|
||||
},
|
||||
goShopCart(){//去购物车事件
|
||||
if(this.isNei==3) this.isScore = 'score';
|
||||
uni.navigateTo({
|
||||
url:`/pagesA/shopCart/shopCart?isScore=${this.isScore}`
|
||||
})
|
||||
},
|
||||
choosecateEv(e){
|
||||
this.cateCurrent = e
|
||||
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{
|
||||
|
@ -694,16 +706,11 @@
|
|||
},
|
||||
tapConllection(){//收藏、取消收藏事件
|
||||
let isLikeCon = 'collect'
|
||||
// if(!this.jieDuan){
|
||||
// let isAuth = this.$toolAll.tools.returnAuth()
|
||||
// if(!isAuth){
|
||||
// 调用收藏事件
|
||||
if(!this.isDetailConllection) collectionEV({action:isLikeCon,archive_id:this.detailObj.id})
|
||||
if(!this.isDetailConllection) collectionShopEV({action:isLikeCon,id:this.detailObj.id})
|
||||
// 调用取消收藏事件
|
||||
else cancleCollectionEV({action:isLikeCon,archive_id:this.detailObj.id})
|
||||
else cancleCollectionShopEV({action:isLikeCon,id:this.detailObj.id})
|
||||
this.isDetailConllection = !this.isDetailConllection
|
||||
// } else this.jieDuan = true
|
||||
// }
|
||||
},
|
||||
backTop(){//回到顶部事件
|
||||
uni.pageScrollTo({
|
||||
|
|
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 882 B |
After Width: | Height: | Size: 823 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 970 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 294 B |
After Width: | Height: | Size: 255 B |
After Width: | Height: | Size: 325 B |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 966 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 889 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 889 B |
After Width: | Height: | Size: 609 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 935 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.2 KiB |