接口调用

master
chen 2022-02-23 19:08:25 +08:00
parent 68df077c46
commit 2b7618a36e
54 changed files with 1680 additions and 2375 deletions

24
App.vue
View File

@ -11,11 +11,11 @@
let windowHeight = uni.getSystemInfoSync().windowHeight;
//
let statusHeight = uni.getSystemInfoSync().statusBarHeight;
uni.setStorageSync('hostapi','https://peili.scdxtc.cn/api/'); //
uni.setStorageSync('hostapi','https://peili.scdxtc.cn'); //
uni.setStorageSync('statusBar',statusHeight); //
toolAll.tools.networkStatus(); //
toolAll.tools.clearClog(); //
toolAll.tools.overdue(); //
// toolAll.tools.overdue(); //
uni.setStorageSync('publicColor','#000000'); //
// scroll-view
uni.setStorageSync('scrollHeight-one',windowHeight - (statusHeight + 50 + 59)); // +
@ -32,16 +32,16 @@
uni.setStorageSync('footTitle',['首页','分类','我的','购物车'])
uni.setStorageSync('footimg',[
{
iconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b284c96dd7.png",
selectedIconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b284c9704a.png"
iconPath: "/static/public/mo-home.png",
selectedIconPath: "/static/public/active-home.png"
},
{
iconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b2865a344f.png",
selectedIconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b28659f34f.png"
iconPath: "/static/public/mo-function.png",
selectedIconPath: "/static/public/active-function.png"
},
{
iconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b286da1ddc.png",
selectedIconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b286da2073.png"
iconPath: "/static/public/mo-person.png",
selectedIconPath: "/static/public/active-person.png"
},
{
iconPath: "https://s6.jpg.cm/2022/02/17/LBETnT.png",
@ -50,13 +50,11 @@
])
},
onShow: function() {
if(uni.getStorageSync('token')!='') {
//
toolAll.tools.daoTime();
}
//
toolAll.tools.overdue();
},
onHide: function() {
toolAll.tools.closeTimer();//
uni.removeStorageSync('isorderDetail');
}
};
</script>

View File

@ -1,34 +1,3 @@
/* 首页 */
.status-box{position: fixed;top: 0;left: 0;right: 0;z-index: 10;}
.status-nav{width: 100%;position: relative;display: flex;align-items: center;}
/* .status-nav{width: 100%;position: relative;padding: 30rpx 0;display: flex;align-items: center;} */
.tab-title{font-size: 36rpx;font-weight: bold;color: #333333;width: 100%;}
.tcenter{text-align: center;}
.input-box{width: 100%;}
.input-box>view{background-color: #FFFFFF;margin: 0 40rpx;height: 80rpx;border-radius: 10rpx;padding: 0 17rpx;}
.searchImg{width: 28rpx;height: 28rpx;margin-right: 12rpx;}
.linev{height: 39rpx;border: 2rpx dashed rgba(136, 136, 136, 1);}
.searchT{font-size: 27rpx;margin: 0 23rpx 0 31rpx;}
.gongg-box{width: 25%;color: #2C2C2C;}
.gongg-box .img-box image{width: 108rpx;height: 108rpx;}
.zou> image{height: auto;}
.fawen-img{width: 335rpx;height: 400rpx;}
.fawen-itemImg{height: 190rpx;}
.kitemm{background-color: #E0E0E0;}
.reitem-box{background: #F4F4F4;margin-right: 18rpx;padding: 20rpx;}
.reitem-box>image{width: 20rpx;height: 23rpx;margin-right: 18rpx;}
.reitem{width: 146rpx;height: 65rpx;border-radius: 20rpx;line-height: 65rpx;text-align: center;}
.list-box{width: 48.4%;}
.list-like-box{top: 18rpx;right: 18rpx;z-index: 1;}
.list-like-box>image:first-child {opacity: 0.5;}
.list-like-box>image{width: 69rpx;height: 69rpx;}
.list-cont-box{bottom: 10rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 30rpx;border-bottom-right-radius: 30rpx;}
.list-cont-box15{bottom: 10rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 15rpx;border-bottom-right-radius: 15rpx;}
.list-headimg{width: 28rpx;height: 28rpx;margin-right: 6rpx;border-radius: 100%;}
.home-quan-box{background: rgba(0,0,0,.54);position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11;display: flex;justify-content: center;flex-direction: column;align-items: center;}
.home-quan-box image:first-child{width: 542rpx;height: 600rpx;}
.home-quan-box image:last-child{width: 96rpx;height: 96rpx;margin-top: 56rpx;}
.shopKf{position: fixed;right: 16rpx;bottom: 140rpx;z-index: 999;}
/* 分类 */
.sort-box {background-color: #ececee;position: sticky;z-index: 6;}
.screen-box{position: fixed;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.5);z-index: 12;}
@ -38,141 +7,13 @@
.screen-btn view {height: 80rpx;width: 229rpx;text-align: center;line-height: 80rpx;}
.screen-btn view:first-child{border: 2rpx solid #8c8c9b;}
.screen-btn view:last-child{border: 2rpx solid #000000;background-color: #000000;}
/* 搜索 */
.search-input-box{width: 100%;padding-bottom: 20rpx;}
.tank-box{margin: 0 85rpx;}
.tank-box-itemone{font-size: 32rpx;color: #343434;margin: 90rpx 0;}
.tank-btn{width: 240rpx;}
/* 我的页面 */
.icon-box>image:nth-child(1){width: 37rpx;height: 38rpx;}
.icon-box>image:nth-child(2){width: 32rpx;height: 34rpx;}
.icon-box>image:nth-child(3){width: 31rpx;height: 37rpx;}
.icon-box>image:nth-child(4){width: 32rpx;height: 33rpx;}
.icon-box>image:nth-child(5){width: 33rpx;height: 35rpx;}
.icon-box>image:nth-child(6){width: 35rpx;height: 32rpx;}
.icon-box>image:nth-child(7){width: 36rpx;height: 35rpx;}
.sigin-box{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);}
.sigin-box view{padding: 20rpx 40rpx;background-color: rgba(0,0,0,.6);color: #FFFFFF;border-radius: 6rpx;}
.person-m{width: 325rpx;height: 325rpx;margin: 30rpx 86rpx 68rpx 86rpx;}
.close-m{width: 96rpx;height: 96rpx;border-radius: 100%;}
.red-num{width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;background: #F96969;right: 50rpx;top: 0;font-size: 22rpx;color: #FFFFFF;text-align: center;}
.icon-img{width: 60rpx;height: 60rpx;}
.white-next{width: 22rpx;height: 22rpx;}
.yuan-box>view{width: 100%;display: flex;justify-content: center;align-items: center;position: relative;}
.yuan-box .xian-right{height: 58rpx;width: 2rpx;background-color: #E6E6E6;right: 0;position: absolute;}
.yuan-box image{width: 54rpx;height: 54rpx;}
.blue-img{position: absolute;top: 0;left: 0;right: 0;height: 436rpx;width: 100%;}
.gao .posia{left: -32rpx;right: -32rpx;z-index: -1;}
.gao .mar-sx30{width:120rpx;height: 120rpx;border-radius: 100%;margin-left: 15rpx;z-index: 1;}
.gao-name{background: #FFBD39;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFFFFF;padding: 5rpx 16rpx;margin-left: 10rpx;}
.gao-phone{width: 14rpx;height: 20rpx;}
.gao-m{width: 43rpx;height: 43rpx;z-index: 1;}
.gao-next-box{width: 50rpx;position: relative;z-index: 1;justify-content: flex-end;}
.gao-next-box image{width: 35rpx;height: 35rpx;z-index: 1;}
/* 暂无内容时,显示的图片大小 */
.zanw-img{width: 474rpx;height: 273rpx;}
/* 修改资料页面 */
.head_img{width: 140rpx;height: 140rpx;border-radius: 100%;}
.nic{color: #101010;}
.head_next{width: 19rpx;height: 19rpx;}
/* 自主预约 */
.xiala{border: 2rpx solid #CECECE;height: 80rpx;line-height: 80rpx;}
.xiala image{width: 35rpx;height: 24rpx;}
.yutime{width: 160rpx;height: 130rpx;}
.timed{width: 210rpx;height: 80rpx;line-height: 80rpx;}
.titlel{width: 18%;}
.titlel2{width: 20%;}
.height-68{height: 80rpx;}
.btnl{margin: 50rpx 80rpx;height: 90rpx;line-height: 90rpx;}
/* 客户列表 */
.xialak{height: 60rpx;line-height: 60rpx;border: 2rpx solid #E0E0E0;}
.xialak image{width: 35rpx;height: 24rpx;}
.customer-btn{height: 60rpx;width: 143rpx;line-height: 60rpx;}
/* 医生 */
.qdoctor:before{
content: '';
display: block;
width: 10rpx;height: 40rpx;
border-radius: 10rpx;
background-color: #3875F6;
margin-right: 10rpx;
}
.doctoritem:before{
content: '';
display: block;
height: 20rpx;
border-radius: 10rpx;
border: 4rpx solid #3875F6;
background-color: #3875F6;
margin-right: 6rpx;
}
/* .zhuan{transition: all 1s;transform: rotate(90deg);} */
.nozhuan{transition: all 1s;transform: rotate(0deg);}
.xial-box{top: 80rpx;left: 0;right: 0;z-index: 4;border: 2rpx solid #E0E0E0;}
.xial-item-box{max-height: 400rpx;overflow-y: scroll; overflow-x: hidden;}
.doctorx{margin: 0 15rpx;height: 18rpx;border: 2rpx solid #E6E6E6;}
.doctorImg{width: 100%;height: 285rpx;border-top-left-radius: 10rpx;border-top-right-radius: 10rpx;}
.isTop{background-color: #FFFFFF;box-shadow: 0rpx 3rpx 10rpx rgba(0,0,0,.6);}
.isTops{position: sticky;left: 0;right: 0;z-index: 2;}
.isTopf{position: fixed;left: 0;right: 0;z-index: 2;}
/* 底部联系客服、分享、返回首页 */
.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;}
/* 商城 */
.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;z-index: 999;}
/* 商品详情 */
.activity-img{background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;}
.activelei,.molei{border-radius: 20rpx;padding: 10rpx 24rpx;color: #333333;margin-left: 20rpx;}
.activelei{color: #FFFFFF;}
.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: 80rpx;line-height: 80rpx;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;}
.score-box{width: 100%;height: 90rpx;line-height: 90rpx;padding-left: 62rpx;background: #3875F6;color: #FFFFFF;font-size: 40rpx;font-weight: bold;}
.activity-img{background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;}
/* 准备下单 */
.activeT,.expressT{width: 124rpx;height: 60rpx;line-height: 60rpx;text-align: center;margin-left: 20rpx;border-radius: 20rpx;}
.activeT{color: #FFFFFF;}
@ -199,75 +40,26 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.success-box image{width: 194rpx;height: 194rpx;}
.success-hj{font-size: 46rpx;margin-bottom: 120rpx;color: #F85050;}
/* 立即支付页面 */
.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: 200rpx;height: 80rpx;line-height: 80rpx;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-hx-img{width: 325rpx;height: 325rpx;}
.order-close-btn{width: 40rpx;height: 40rpx;right: 50rpx;top: 20rpx;}
.order-btn{width: 210rpx;height: 75rpx;line-height: 75rpx;text-align: center;border-radius: 10rpx;background: #F85050;color: #FFFFFF;margin-left: 45rpx;}
.order-cancle{width: 210rpx;height: 75rpx;line-height: 75rpx;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;}
.address_add{font-size: 30rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 30rpx;height: 98rpx;line-height: 98rpx;text-align: center;margin: 0 30rpx;}
.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;}
.address-btn-add{font-size: 30rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 30rpx;height: 98rpx;line-height: 98rpx;text-align: center;margin: 80rpx 0rpx 20rpx 0rpx;}
.address-close-btn{width: 77rpx;height: 77rpx;right: -80rpx;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;}
.receive-left{width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;}
/* 活动任务 */
.activity-dai{width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;}
.activity-mo{width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #CCCCCC;}
.task-cancle-btn,.task-confrim-btn{width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;}
.task-cancle-btn{background: #E6E6E6;color: #FFFFFF;}
.task-confrim-btn{background: #3875F6;color: #FFFFFF;}
.imgIng{width: 340rpx;height: 348rpx;border-radius: 10rpx;margin-bottom: 70rpx;}
.task-add-box{width: 340rpx;height: 348rpx;background: #F0F0F0;border-radius: 10rpx;margin-bottom: 70rpx;}
.task-add{width: 100rpx;height: 6rpx;background: #B3B3B3;border-radius: 10rpx;}
/* 签到页面 */
.sigin-img{width: 218rpx;height: 202rpx;margin: 0 auto;}
.sigin-success{width: 31rpx;height: 30rpx;margin-top: 20rpx;}
.sigin-day{width: 66rpx;height: 66rpx;border-radius: 100%;border: 2rpx solid #FFFFFF;}
.sigin-day image{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;}
/* 孔雀币页面 */
.coin-tx-btn{width: 152rpx;height: 60rpx;line-height: 60rpx;text-align: center;color: #FFFFFF;background: #3875F6;border-radius: 30rpx;font-size: 26rpx;}
.coin-yuan{font-size: 26rpx;font-weight: 400;}
.coin-miao{height: 60rpx;line-height: 60rpx;}
.coin-share-box{width: 588rpx;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 20rpx;background: #38CE51;position: fixed;bottom: 76rpx;left: 50%;transform: translateX(-50%);}
.coin-share-box image {width: 50rpx;height: 50rpx;}
.tx-tk-box{position: fixed;top: 0;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,.54);}
.tx-tk-box input{border: 2rpx solid #E0E0E0;margin-bottom: 80rpx;height: 60rpx;}
.tk-btn{width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;border-radius: 10rpx;font-size: 28rpx;color: #FFFFFF;}
.tk-btn:last-child{background-color: #C8C8C8;}
/* 我的订单页面 */
.order-hx-img{width: 325rpx;height: 325rpx;}
.order-close-btn{width: 40rpx;height: 40rpx;right: 50rpx;top: 20rpx;}
/* 订单详情 */
.orderInfo-btn{width: 249rpx;height: 70rpx;border-radius: 35rpx;line-height: 70rpx;text-align: center;font-size: 28rpx;font-weight: bold;background: #3875F6;color: #FFFFFF;margin-left: 20rpx;}
.paid-btn-box view{width: 249rpx;height: 70rpx;border-radius: 35rpx;line-height: 70rpx;text-align: center;font-size: 28rpx;font-weight: bold;}
@ -279,21 +71,17 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.orderDetail-sku{font-size: 22rpx;color: #808080;font-weight: 500;}
.orderDetail-bottom-box{height: 124rpx;padding: 0 32rpx;display: flex;align-items: center;border-top: 2rpx solid #F5F5F5;}
.orderDetail-bottom-box image{width: 56rpx;height: 56rpx;}
/* 积分管理页面 */
.score-img{width: 108rpx;height: 108rpx;flex-shrink: 0;}
.score-people-box{display: flex;justify-content: space-between;flex-direction: column;height: 108rpx;}
.score-sigin-btn{width: 140rpx;height: 40rpx;line-height: 40rpx;text-align: center;color: #FFFFFF;background: #F6C338;border-radius: 30rpx;font-size: 24rpx;font-weight: 400;}
.score-share-box{width: 588rpx;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 20rpx;background: #38CE51;position: fixed;bottom: 76rpx;left: 50%;transform: translateX(-50%);}
.score-share-box image{width: 50rpx;height: 50rpx;}
/* 消息页面 */
.message-img{width:46rpx;height:56rpx;}
.message-status{border-radius: 5rpx;font-size: 24rpx;color: #FFFFFF;padding: 2rpx 8rpx 4rpx 6rpx;transform: scale(.8);}
.order-btn{
width: 150rpx;height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 20rpx;
background-color: #f6f6f6;
color: #8c8c9b;
border: 1rpx solid #d3d3d3;
}
/* 关于我们 */
.navigate-to-where {height: 98rpx;line-height: 98rpx;}
/* 分销中心 */
.withdrawal-btn{height: 98rpx;line-height: 98rpx;}
.withdrawal-box{position: fixed;top: 0;bottom: 0;left: 0;right: 0;background-color: rgba(0,0,0,.2);}
@ -303,19 +91,15 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
@media screen and (height:812px){
.blue-img{height: 500rpx;}
/* @media screen and (height:812px){
}
@media screen and (height:844px){
.blue-img{height: 496rpx;}
}
@media screen and (height:896px){
.blue-img{height: 486rpx;}
}
@media screen and (min-height:926px){
.blue-img{height: 490rpx;}
}
*/
@ -485,6 +269,9 @@ button:after{content: none!important;}
.peili-backColor{background-color: #fe2525;}
/* 文本居中方式 */
.tcenter{text-align: center;}
/* 圆角 */
.radius10{border-radius: 10rpx;}
@ -537,6 +324,10 @@ button:after{content: none!important;}
.mar-s80{margin-top: 80rpx;}
.mar-s90{margin-top: 90rpx;}
.mar-s100{margin-top: 100rpx;}
.mar-s120{margin-top: 120rpx;}
.mar-s140{margin-top: 140rpx;}
.mar-s160{margin-top: 160rpx;}
.mar-s180{margin-top: 180rpx;}
/* 下---外边距 */
.mar-x10{margin-bottom: 10rpx;}
.mar-x20{margin-bottom: 20rpx;}
@ -546,6 +337,15 @@ button:after{content: none!important;}
.mar-x36{margin-bottom: 36rpx;}
.mar-x40{margin-bottom: 40rpx;}
.mar-x50{margin-bottom: 50rpx;}
.mar-x60{margin-bottom: 60rpx;}
.mar-x70{margin-bottom: 70rpx;}
.mar-x80{margin-bottom: 80rpx;}
.mar-x90{margin-bottom: 90rpx;}
.mar-x100{margin-bottom: 100rpx;}
.mar-x120{margin-bottom: 120rpx;}
.mar-x140{margin-bottom: 140rpx;}
.mar-x160{margin-bottom: 160rpx;}
.mar-x180{margin-bottom: 180rpx;}
/* 左---外边距 */
.mar-z10{margin-left: 10rpx;}
.mar-z20{margin-left: 20rpx;}

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3180711 */
src: url('https://at.alicdn.com/t/font_3180711_o717yf8virj.woff2?t=1645176467979') format('woff2'),
url('https://at.alicdn.com/t/font_3180711_o717yf8virj.woff?t=1645176467979') format('woff'),
url('https://at.alicdn.com/t/font_3180711_o717yf8virj.ttf?t=1645176467979') format('truetype');
src: url('https://at.alicdn.com/t/font_3180711_ox3eswimm9g.woff2?t=1645410881050') format('woff2'),
url('https://at.alicdn.com/t/font_3180711_ox3eswimm9g.woff?t=1645410881050') format('woff'),
url('https://at.alicdn.com/t/font_3180711_ox3eswimm9g.ttf?t=1645410881050') format('truetype');
}
.icon {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-address-check:before {
content: "\e6c2";
}
.icon-address-unchecked:before {
content: "\e623";
}
.icon-navigate-now:before {
content: "\e640";
}

View File

@ -100,7 +100,7 @@
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
this.$requst.post('/api/user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.visible = true;
@ -174,7 +174,7 @@
is_active:1,
channel:uni.getStorageSync('channel')
}
this.$requst.post('user/login',params).then(res => {
this.$requst.post('/api/user/login',params).then(res => {
if(res.data.token!=''){
uni.setStorageSync('params',params);
uni.setStorageSync('userId',res.data.account_id);

View File

@ -1,55 +0,0 @@
<template>
<view class="posixzy disjbac bacf pad-zy32 btnBKS">
<view class="posir">
<image @tap="backHome" class="posia backH" src="/static/public/back-home-02.png" mode="aspectFill"></image>
</view>
<view class="disac fon26 colf">
<view @tap="lianK" class="disac posir lianShare" style="background-color: #3875F6; border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;">
<image src="/static/public/bottom-customer.png" class="mar-zy20" style="width: 47rpx;height: 47rpx;" mode="aspectFill"></image>
<view>联系客服</view>
<button class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact">客服</button>
</view>
<view class="disac posir lianShare" style="background-color: #38CE51;border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;">
<image src="/static/public/bottom-shear.png" style="width: 47rpx;height: 47rpx;margin-left: 15rpx;margin-right: 8rpx;" mode="aspectFill">
</image>
<view>分享给好友</view>
<button class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
</view>
</view>
</view>
</template>
<script>
export default {
name:"bottom-tab",
data() {
return {
haveImg: true,
};
},
methods:{
backHome() {
uni.reLaunch({
url: '/pages/tabbar/pagehome/pagehome'
})
},
lianK() { //
this.$requst.post('user/rand-bind-service').then(res => {})
this.$requst.post('user/record', {
type: 'other',
action: 'ask',
id: 0
}).then(res => {}, error => {})
let maiOjb = {
e: 5, //
t: new Date().getTime() //
}
this.$toolAll.tools.maiDian(maiOjb);
},
}
}
</script>
<style>
</style>

View File

@ -1,38 +1,36 @@
<template>
<view class="pad-x140" :class="dataList.length ? '' : 'display-center-center'">
<scroll-view scroll-y v-if="dataList.length">
<view>
<view v-for="(item,index) in dataList" :key="index"
class="item-box display-between-center">
<view @tap="chooseItem(index)" class="display-center-center flex-shrink">
<!-- 勾选按钮 -->
<view class="circle-box display-center-center flex-shrink" :class="item.isActive ? 'circle-box-active' : ''"></view>
<!-- 商品图片 -->
<image class="shop-img" :src="item.imgSrc" mode="aspectFill"></image>
</view>
<view class="item-right-box display-between-column">
<view>
<!-- 商品标题 -->
<view class="clips2 item-title">{{item.title}}</view>
<!-- 规格 -->
<view class="item-specs">
<view>{{item.specs1}}</view>
</view>
<scroll-view scroll-y v-if="dataList.length" @scrolltolower="touchBottomEv">
<view v-for="(item,index) in dataList" :key="index"
class="item-box display-between-center">
<view @tap="chooseItem(index)" class="display-center-center flex-shrink">
<!-- 勾选按钮 -->
<view class="circle-box display-center-center flex-shrink" :class="item.isActive ? 'circle-box-active' : ''"></view>
<!-- 商品图片 -->
<image class="shop-img" :src="item.imgSrc" mode="aspectFill"></image>
</view>
<view class="item-right-box display-between-column width100">
<view @tap="goDetail(item.id)">
<!-- 商品标题 -->
<view class="clips2 item-title">{{item.title}}</view>
<!-- 规格 -->
<view class="item-specs">
<view>{{item.specs1}}</view>
</view>
</view>
<view class="display-between-center">
<!-- 价格 -->
<view class="item-price">{{item.price}}</view>
<!-- 加减按钮 -->
<view class="display-between-center">
<!-- 价格 -->
<view class="item-price">{{item.price}}</view>
<!-- 加减按钮 -->
<view class="display-between-center">
<!-- -->
<button @tap="deladdEvent( item.id , index , 0)" :disabled="item.num==1" class="item-btn display-center-center">­­­­­­­­­­­­</button>
<!-- 输入框 -->
<view class="input-box display-center-center">
<input type="text" v-model="item.num" />
</view>
<!-- -->
<button @tap="deladdEvent( item.id , index , 1)" class="item-btn display-center-center"></button>
<!-- -->
<button @tap="deladdEvent( item.id , index , 0)" :disabled="item.num==1" class="item-btn display-center-center">­­­­­­­­­­­­-</button>
<!-- 输入框 -->
<view class="input-box display-center-center">
<input type="text" v-model="item.num" />
</view>
<!-- -->
<button @tap="deladdEvent( item.id , index , 1)" class="item-btn display-center-center">+</button>
</view>
</view>
</view>
@ -42,15 +40,15 @@
<!-- 底部导航 -->
<view class="display-between-center cart-foot-box">
<!-- 全选 -->
<view @tap="chooseAll" class="display--center check-all-box">
<view @tap="chooseAll" class="display--center">
<view class="circle-check-all display-center-center"
:class="ifCheckAll ? 'circle-check-all-active' : ''"></view>
全选
</view>
<!-- 合计 -->
<view>合计{{totalPrice}}</view>
<view class="allprice-box">合计{{totalPrice}}</view>
<!-- 立即结算 -->
<view class="cart-settlement">{{dataList.length ? '立即结算' : '去购物'}}</view>
<view class="cart-settlement" @tap="gopageEv">{{dataList.length ? '' : ''}}</view>
</view>
</view>
</template>
@ -66,7 +64,7 @@
totalPrice(){
let totalPrice = 0;
this.dataList.forEach(item=>{
if(item.isActive) totalPrice += item.price*1 * item.num*1;
if(item.isActive) totalPrice += item.reckonPrice*1 * item.num*1;
})
return totalPrice;
}
@ -144,14 +142,78 @@
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// price:3000,
// num:1
// }
// ],
ifCheckAll:false
ifCheckAll:false,
page:1, //
size:10, //
total:0, //
pitera:false, //
};
},
//
beforeCreate(){
},
//
mounted() {
//
this.checkList();
},
methods:{
//
goDetail(id){
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
},
//
gopageEv(){
if(this.dataList.length){
if(this.totalPrice){
let newList = [];
this.dataList.forEach(item=>{
if(item.isActive){
let obj = {
id:item.id,//id
imgSrc:item.imgSrc,//
coding:item.coding,//coding
price:item.reckonPrice,//
num:item.num,//
title:item.title,//
}
newList.push(obj);
}
})
uni.setStorageSync('orderList',newList);
uni.navigateTo({url:'/pagesA/getReadyDan/getReadyDan'});
} else {
this.$toolAll.tools.showToast('请选择要购买的商品');
}
} else {
uni.navigateTo({url:'/pages/tabbar/cate/cate'});
}
},
//
setShopNum(id,num,type){
let parmas = {
id,// id:id
num,// num:
type// type:downup
}
this.$requst.post('/api/order/shopping-cart-change-num',parmas).then(res=>{
if(res.code==0){} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
touchBottomEv(){// scroll-view
console.log(169);
},
chooseItem(index){//
this.dataList[index].isActive = !this.dataList[index].isActive
let one = this.dataList.filter(function(item){
@ -169,12 +231,42 @@
},
deladdEvent(id,cur,index){//
if(index==0){//
this.dataList[cur].num--
this.dataList[cur].num--;
this.setShopNum(id,this.dataList[cur].num,'down');
} else {//
this.dataList[cur].num++
this.dataList[cur].num++;
this.setShopNum(id,this.dataList[cur].num,'up');
}
// this.changeNum()//
},
checkList(){//
this.$requst.post('/api/order/shopping-cart',{page:this.page,size:this.size}).then(res=>{
if(res.code==0){
if(res.data.length){
res.data.forEach(item=>{
let obj = {
id:item.id,
coding:item.sku.coding,
isActive:false,
imgSrc:item.spu.spu_cover,
title:item.spu_name,
specs1:'',
price:this.$toolAll.tools.changeNum(item.price*1),
reckonPrice:item.price,
num:item.num
}
this.dataList.push(obj);
})
} else {
this.dataList = [];
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
}
}
}
</script>
@ -199,18 +291,18 @@
width: 18rpx;height: 18rpx;background-color: #000000;border-radius: 100%;
}
.shop-img {width: 223rpx;height: 223rpx;border-radius: 30rpx;margin: 0 20rpx;}
.allprice-box{width: 30%;}
.item-right-box{font-size: 24rpx;height: 223rpx;}
.item-title {color: #000000;}
.item-specs{color: #8c8c9b;}
.item-price{font-size: 30rpx;}
.input-box {width: 78rpx;height: 40rpx;border-radius: 16rpx;margin: 0 6rpx; border: 1rpx solid #000000;overflow: hidden;}
.input-box {width: 78rpx;height: 40rpx;border-radius: 10rpx;margin: 0 6rpx; border: 1rpx solid #000000;overflow: hidden;}
input {text-align: center;}
.item-btn {width: 40rpx;height: 40rpx;border-radius: 12rpx;background-color: #000000;color: #FFFFFF;padding: 0rpx;}
.item-btn {width: 40rpx;height: 40rpx;border-radius: 10rpx;background-color: #000000;color: #FFFFFF;padding: 0rpx;}
/* 底部导航 */
.cart-foot-box{position: fixed;bottom: 0;left: 0;right: 0;height: 130rpx;background-color: #efefef;font-size: 30rpx;}
.cart-foot-box{position: fixed;bottom: 0;left: 0;right: 0;z-index: 2; height: 130rpx;background-color: #efefef;font-size: 30rpx;}
.circle-check-all {width: 33rpx;height: 33rpx;margin: 0 10rpx 0 30rpx;}
.circle-check-all-active::after{
width: 19rpx;height: 19rpx;

View File

@ -1,20 +0,0 @@
<template>
<view :style="{paddingTop: statusBarHeight +'px'}" class="pad-zy30">
<slot></slot>
</view>
</template>
<script>
export default {
name:"container-subgroup",
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
};
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,82 @@
<template>
<view>
<view v-if="loading" class="container-loading">
<view class="loading-box">
<span></span>
<span></span>
<span></span>
<span></span>
</view>
</view>
<view v-else :style="{paddingTop: statusBarHeight +'px'}" class="pad-zy30">
<slot></slot>
</view>
</view>
</template>
<script>
export default {
name:"container-subgroup",
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
loading:true,
exist:''
};
},
//
beforeCreate(){
//
this.$toolAll.tools.overdue();
this.exist = uni.getStorageSync('token');
this.exist ? this.loading = false : this.loading = true;
},
//
created(){
},
//
beforeMount(){
},
//
mounted(){
this.log(uni.getStorageSync('token'),4)
setTimeout(()=>{
this.loading = false;
},500)
},
//
beforeUpdate(){
},
//
updated(){
},
//
beforeDestroy(){
},
//
destroyed(){
}
}
</script>
<style scoped>
.container-loading {position: fixed;top: 0;left: 0;bottom: 0;right: 0;display: flex;justify-content: center;align-items: center;}
.container-loading .loading-box {width: 80rpx;display: flex;flex-wrap: wrap;animation: rotate 3s linear infinite;}
@keyframes rotate{
to{transform: rotateZ(360deg);}
}
.container-loading .loading-box span {width: 32rpx;height: 32rpx;background-color: #000000;margin: 4rpx;animation: scale 1.5s linear infinite;}
@keyframes scale{
50%{transform: scale(1);}
}
.container-loading .loading-box span:nth-child(1){border-radius: 50% 50% 0 50%;transform-origin: bottom right;}
.container-loading .loading-box span:nth-child(2){border-radius: 50% 50% 50% 0;transform-origin: bottom left;animation-delay: .5s;}
.container-loading .loading-box span:nth-child(3){border-radius: 50% 0 50% 50%;transform-origin: top right;animation-delay: 1.5s;}
.container-loading .loading-box span:nth-child(4){border-radius: 0 50% 50% 50%;transform-origin: top left;animation-delay: 1s;}
</style>

View File

@ -2,23 +2,23 @@
<view>
<!-- 底部按钮 -->
<view class="bottom-nav-box display-between-center">
<button type="default" @tap="showFrame=true"></button>
<button type="default" @tap="immediatelyBuy"></button>
<button type="default" @tap="showFrame=true"></button>
</view>
<!-- 底部按钮弹框 -->
<view v-show="showFrame" class="frame-box" @tap="showFrame=false">
<view @tap.stop="showFrame=true">
<view class="frame-top">
<image src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" mode="aspectFill" lazy-load></image>
<image :src="shopImg" mode="aspectFill" lazy-load></image>
<view>
<!-- 商品标题 -->
<view class="clips2 frame-title">阿什拉夫开机爱上了就干了阿什拉夫开机爱上了就干了阿什拉夫开机爱上了就干了</view>
<view class="clips2 frame-title">{{detailObj.detail.name}}</view>
<!-- 商品价格 -->
<view class="frame-price">
<!-- 折扣价 -->
<view>2,000</view>
<view>{{discountPrice}}</view>
<!-- 原价 -->
<view style="text-decoration: line-through;">3,000</view>
<view style="text-decoration: line-through;">{{originalPrice}}</view>
</view>
</view>
</view>
@ -30,24 +30,24 @@
<drop-down :dropObj="dropObj" @chooseItem="chooseItem"></drop-down>
</view>
<!-- 商品库存 -->
<view class="frame-stock">库存99</view>
<view class="frame-stock">库存{{detailObj.detail.stock}}</view>
<!-- 加减按钮 -->
<view class="frame-add-del">
<view class="display-between-center add-del-box">
<!-- -->
<button @tap="deladdEvent(0)" :disabled="buyNum==1" class="item-btn display-center-center">­­­­­­­­­­­­</button>
<button @tap="deladdEvent(0)" :disabled="buyNum==1" class="item-btn display-center-center">-</button>
<!-- 输入框 -->
<view class="input-box display-center-center">
<input type="text" v-model="buyNum" />
</view>
<!-- -->
<button @tap="deladdEvent(1)" class="item-btn display-center-center"></button>
<button @tap="deladdEvent(1)" class="item-btn display-center-center">+</button>
</view>
</view>
<!-- 立即购买加入购物车按钮 -->
<view class="frame-btn-box">
<button type="default" @tap="immediatelyBuy"></button>
<button type="default">加入购物</button>
<button type="default" @tap="addCartEv"></button>
</view>
</view>
</view>
@ -61,6 +61,14 @@
components:{
dropDown
},
props:{
detailObj:{
type:Object,
default:()=>{
return {}
}
}
},
data() {
return {
showFrame:false,
@ -77,18 +85,65 @@
}
]
},
buyNum:1
buyNum:1,//
originalPrice:0,//
discountPrice:0,//
shopImg:''//
};
},
mounted() {
//
this.originalPrice = this.detailObj.detail.original_price;
//
this.discountPrice = this.detailObj.detail.price;
//
this.shopImg = this.$http + this.detailObj.detail.cover;
},
methods:{
//
immediatelyBuy(){
let params = {};
if(this.showFrame) {
params = {
id:this.detailObj.detail.id,//id
imgSrc:this.detailObj.detail.cover,//
coding:this.detailObj.sku[0].coding,//coding
price:this.discountPrice,//
num:this.buyNum || 1,//
title:this.detailObj.detail.name,//
}
} else {
//
params = {
id:this.detailObj.detail.id,//id
imgSrc:this.detailObj.detail.cover,//
coding:this.detailObj.sku[0].coding,//coding
price:this.discountPrice,//
num:this.buyNum || 1,//
title:this.detailObj.detail.name,//
}
}
uni.setStorageSync('orderList',[params]);
uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan`
})
},
//
chooseItem(e){
this.log(e)
},
//
addCartEv(){
this.$requst.post('/api/order/shopping-cart-add',{sku_id:this.detailObj.sku[0].id,num:this.buyNum}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('添加成功');
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
//
deladdEvent(index){
if(index==0){//
@ -108,7 +163,7 @@
button{
width: 310rpx;
height: 100rpx;
line-height: 100rpx;
line-height: 100rpx!important;
border-radius: 30rpx;
font-size: 36rpx;
border: 1rpx solid #FFFFFF;
@ -129,7 +184,7 @@
.frame-price view:last-child{font-size: 28rpx;color: #868695;}
.frame-color-box{margin-top: 20rpx;}
.frame-btn-box{display: flex;align-items: center;justify-content: space-around;margin-top: 100rpx;}
.frame-btn-box button{height: 80rpx;line-height: 80rpx;border-radius: 20rpx;}
.frame-btn-box button{height: 80rpx;line-height: 80rpx!important;border-radius: 20rpx;}
.frame-stock{font-size: 24rpx;color: #000000;text-align: right;}
/* 加减按钮 */
.frame-add-del{display: flex;justify-content: flex-end;}

View File

@ -77,7 +77,7 @@
.display-between-center{display: flex;justify-content: space-between;align-items: center;}
.drop-box{position: relative; border: 1rpx solid #8c8c9b;padding: 20rpx;box-sizing: border-box;margin: 20rpx 0;font-size: 24rpx;color: #000000;}
.drop{
position: absolute;top:34px;left: -4rpx;right: -4rpx;z-index: 2;
position: absolute;top:39px;left: -1rpx;right: -1rpx;z-index: 2;
max-height: 280rpx;
overflow: hidden;
overflow-y: scroll;

View File

@ -115,7 +115,7 @@
language:userInfo.language,//
is_active:1
}
this.$requst.post('user/login',params).then(res => {
this.$requst.post('/api/user/login',params).then(res => {
if(res.data.token!=''){
uni.setStorageSync('params',params)
uni.setStorageSync('userId',res.data.account_id)

View File

@ -13,15 +13,15 @@
:class="index == isIcon ? 'centerBox' : ''"
v-for="(itemi,index) in imgList" :key="index">
<view class="posir" :class="index == isIcon ? 'centerBox-item':''">
<image :class="index == isIcon ? 'centerImg':'moImg'" v-if="newcurrent == index" :src="itemi.selectedIconPath"></image>
<image :class="index == isIcon ? 'centerImg':'moImg'" v-else :src="itemi.iconPath"></image>
<image :class="index == isIcon ? 'centerImg':'moImg'" v-if="newcurrent == index" :src="itemi.selectedIconPath" :style="{width: [39,41,32,120][index]+'rpx',height: [40,41,38,120][index]+'rpx'}"></image>
<image :class="index == isIcon ? 'centerImg':'moImg'" v-else :src="itemi.iconPath" :style="{width: [39,41,32,120][index]+'rpx',height: [40,41,38,120][index]+'rpx'}"></image>
<button v-if="index == isIcon && isCustomerService" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact"></button>
</view>
</view>
</view>
<!-- tab-标题列表 -->
<view class="item-box">
<view @tap="choosefoot(index)"
<view @tap="choosefoot(index)" class="foot-title"
:style="{width:100 / imgList.length +'%', color:newcurrent == index ? colorActive : colorMo}"
v-for="(itemt,index) in titleList" :key="index">{{itemt}}</view>
</view>
@ -60,7 +60,7 @@
//
backgroundImage:{
type:String,
default:'/static/public/member-head.png'
default:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg'
},
//
backgroundColor:{
@ -105,7 +105,7 @@
//
marginBottomNum:{
type:Number,
default:4
default:0
},
//
colorMo:{
@ -121,6 +121,7 @@
data() {
return {
isCustomerService:false,//
check:uni.getStorageSync('is_active')
};
},
mounted() {
@ -128,29 +129,38 @@
},
methods:{
choosefoot(index){
switch (index){
case 0:
if(index==0){
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
break;
case 1:
uni.reLaunch({url:'/pages/tabbar/cate/cate'})
break;
case 2:
uni.reLaunch({url:'/pages/tabbar/my/my'})
break;
case 3:
uni.reLaunch({url:'/pages/tabbar/cart/cart'})
break;
return
} else {
if(this.check) {
switch (index){
case 1:
uni.reLaunch({url:'/pages/tabbar/cate/cate'})
break;
case 2:
uni.reLaunch({url:'/pages/tabbar/my/my'})
break;
case 3:
uni.reLaunch({url:'/pages/tabbar/cart/cart'})
break;
}
} else {
uni.navigateTo({
url:'/pages/login/login',
animationType:'slide-in-bottom'
})
}
}
}
}
}
</script>
<style>
<style scoped>
/* 外框样式 start */
.foot-boxtwo{
height: 140rpx;
height: 120rpx;
font-size: 24rpx;
position: fixed;bottom: 0;left: 0;right: 0;z-index: 10;
display: flex;flex-direction: column;justify-content: center;
@ -159,17 +169,20 @@
/* 外框样式 end */
/* 公共 start*/
.moImg{width: 64rpx;height: 64rpx;}
.moImg{width: 64rpx;height: 64rpx;vertical-align: bottom;}
/* 公共 end*/
/* 图标-文字外框样式 start */
.item-box{display: flex;justify-content: space-around;align-items: center;}
.item-box>view{text-align: center;}
.item-box>view{text-align: center;box-sizing: border-box;}
/* 图标-文字外框样式 end */
/* 突出的图标样式 start */
.centerBox{display: flex;justify-content: center;align-items: center;}
.centerBox-item{margin-top: -80rpx;}
.centerImg{width: 140rpx;height: 140rpx;}
.centerBox{display: flex;justify-content: center;align-items: center;vertical-align: bottom;}
.centerBox-item{margin-top: -80rpx;vertical-align: bottom;margin-left: -50rpx;}
.centerImg{width: 140rpx;height: 140rpx;vertical-align: bottom;}
/* 突出的图标样式 end */
.item-box .foot-title{padding-top: 16rpx;}
.item-box .foot-title:last-child{text-align: left;padding-left: 40rpx;}
</style>

View File

@ -3,7 +3,7 @@
<view @tap="chooseItem(index)" v-for="(item,index) in list" :key="index"
class="item-box display-between-center">
<view class="display-between-center">
<image v-if="item.leftImg!=''" class="left-img" :src="item.leftImg" mode="widthFix"></image>
<image v-if="item.leftImg!=''" :style="{width:[26,38,40,33][index]+'rpx',height:[36,38,40,31][index]+'rpx'}" class="left-img" :src="item.leftImg" mode="widthFix"></image>
<view class="item-title">{{item.title}}</view>
</view>
<view class="display-between-center">

View File

@ -1,60 +0,0 @@
<template>
<view class="disjb fw">
<view @tap="chooseDoctor(index)" class="radius10 dis fc bacf mar-x20" style="width: 48.6%;" v-for="(item,index) in list" :key="index">
<image :src="item.imgSrc" class="doctorImg" mode="aspectFill"></image>
<view class="col3 mar-s10 mar-x20 mar-z10">
<view class="fon28 bold doctoritem disac">{{item.name}}</view>
<!-- <view class="fon26 mar-sx10 disac">
<view>从业{{item.cyear}}</view>
<view v-if="item.bmen!=''" class="doctorx"></view>
<view>{{item.bmen}}</view>
</view>
<view class="fon26 mar-x10">职称{{item.zcheng}}</view> -->
<!-- <view class="fon24 disac">
<view class="flexs">擅长</view>
<scroll-view scroll-x style="width: 250rpx;">
<view class="disac">
<view class="flexs" v-for="(itemt,indext) in item.goodAt" :key="indext">
<text class="bold mar-y10 pcol">{{itemt.disease_name}}</text>
</view>
</view>
</scroll-view>
</view> -->
<view class="fon24 disac fw mar-s10" style="width: 166px;">
<view class="flexs">擅长</view>
<view class="flexs" v-for="(itemt,indext) in item.goodAt" :key="indext">
<text class="bold mar-y10 pcol">{{itemt.disease_name}}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"list-doctor",
props:{
list:{
type:Array,
default:function(){
return []
}
}
},
data() {
return {
};
},
methods:{
chooseDoctor(index){//
},
}
}
</script>
<style>
</style>

View File

@ -1,26 +1,28 @@
<template>
<view>
<view class="swiper-item mar-x40" v-for="(item,index) in list" :key="index">
<!-- <view class="mar-x40" v-for="(item,index) in list" :key="index"> -->
<!-- 活动商品 start -->
<h1 class="fon36 bold">{{item.title}}</h1>
<view class="colpeili fon26 mar-s20 mar-x40 clips1">{{item.content}}</view>
<view class="posir" @tap="goDetail(item.id)">
<image class="radius30 animated fadeIn" :src="item.mainImg" mode="aspectFill" lazy-load style="height: 425rpx;width: 100%;"></image>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
<view v-for="(item,index) in activityList" :key="index" class="mar-x50">
<h1 class="fon36 bold">{{item.name}}</h1>
<view class="colpeili fon26 mar-s20 mar-x40 clips1">{{item.subtitle}}</view>
<view class="posir" @tap="goDetail(item.id)">
<image class="radius30 animated fadeIn" :src="item.cover" mode="aspectFill" lazy-load style="height: 425rpx;width: 100%;"></image>
<view v-if="item.tag!=''" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 活动商品 end -->
<!-- 子商品 start -->
<view class="disjbac fw">
<view @tap="goDetail(childrenitem.id)" class="width47 mar-s50 posir" v-for="(childrenitem,childrenindex) in item.childrenList" :key="childrenindex">
<image :src="childrenitem.childrenImg" mode="aspectFill" lazy-load style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{childrenitem.childrenTitle}}</view>
<view class="fon30 colpeili">{{childrenitem.childrenPrice}}</view>
<view v-if="childrenitem.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
<view @tap="goDetail(item.id)" class="width47 mar-x50 posir" v-for="(item,index) in list" :key="index">
<image :src="item.cover" mode="aspectFill" lazy-load style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.name}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.tag!=''" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 子商品 end -->
</view>
<!-- </view> -->
</view>
</template>
@ -31,111 +33,32 @@
list:{
type:Array,
default:()=>{
return [
{
id:1,
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻',
childrenPrice:'2,000',
isActivity:true,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
}
]
},
{
id:1,
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
}
]
},
{
id:1,
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
}
]
}
]
return []
}
},
activityList:{
type:Array,
default:()=>{
return []
}
}
},
data() {
return {
check:uni.getStorageSync('is_active')
};
},
methods:{
goDetail(id){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
if(this.check){
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
} else {
uni.navigateTo({
url:`/pages/login/login`
})
}
}
}
}

View File

@ -2,19 +2,30 @@
<!-- 底部导航 -->
<view class="display-between-center payment-foot-box">
<!-- 合计 -->
<view class="payment-price">合计2,000</view>
<view class="payment-price">合计{{totalPrice}}</view>
<!-- 立即结算 -->
<view class="payment-settlement">立即支付</view>
<view @tap="immediatePaymentEv" class="payment-settlement">立即支付</view>
</view>
</template>
<script>
export default {
name:"payment",
props:{
totalPrice:{
type:String,
default: '0'
}
},
data() {
return {
};
},
methods:{
immediatePaymentEv(){
this.$emit('immediatePayment');
}
}
}
</script>

View File

@ -90,7 +90,7 @@
}
</script>
<style>
<style scoped>
.customer-box {
position: fixed;z-index: 2;
display: flex;justify-content: center;align-items: center;flex-wrap: wrap;

View File

@ -1,127 +0,0 @@
<template>
<view class="pad20 shop_list_box">
<view style="width: 48.6%;float: left;">
<view v-if="index1%2==0" v-for="(item1,index1) in dataList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn" @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">{{item1.title}}</view>
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
<view class="radius10 colf mar-y10" 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;"></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;">
<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 v-else class="fon24 col3 mar-s20">所有人可买</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">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
<view style="width: 48.6%;float: right;">
<view v-if="index1%2!=0" v-for="(item1,index1) in dataList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn" @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">{{item1.title}}</view>
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
<view class="radius10 colf mar-y10" 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;"></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;">
<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 v-else class="fon24 col3 mar-s20">所有人可买</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">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
</view>
</template>
<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'),
newList:[],
timeList:[]//
};
},
methods:{
goPage(id,index){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataList[index].isIntegral}`
})
}
}
}
</script>
<style>
</style>

View File

@ -117,6 +117,6 @@
.img-box{position: relative;display: flex;justify-content: center;align-items: center;}
.img{width:100%;vertical-align: bottom;}
.dot-box{position: absolute;bottom: 36rpx;display: flex;justify-content: center;width: 100%;}
.dotActive{width: 22rpx;height: 12rpx;margin-right: 10rpx;border-radius: 20rpx; background-color: rgba(56, 117, 246, .5);}
.dotMo{width: 12rpx;height: 12rpx;margin-right: 10rpx;border-radius: 100%;background-color: rgba(191, 191, 191, 0.5);}
.dotActive{width: 20rpx;height: 20rpx;margin-right: 10rpx;border-radius: 20rpx; background-color: rgba(255, 255, 255, 1);}
.dotMo{width: 20rpx;height: 20rpx;margin-right: 10rpx;border-radius: 100%;background-color: rgba(191, 191, 191, 0.8);}
</style>

View File

@ -8,7 +8,7 @@
:style="{color: (currentIndex === index ? `${itemColor}`: '')}" id="tab_item"
@click="select(item, index)">
<!-- 标题 -->
<view><slot name="title" :title="item.title"></slot></view>
<!-- <view><slot name="title" :title="item.title"></slot></view> -->
<!-- 标题 -->
<view v-if="!showTitleSlot">{{item.title}}</view>
</view>
@ -132,8 +132,9 @@
padding-bottom: 15rpx;
white-space: nowrap;
&__item {
flex: 1;
// width: 30%;
// flex: 1;
width: 20%;
flex-shrink: 0;
text-align: center;
line-height: 90rpx;
color: #868695;

View File

@ -2,7 +2,7 @@ import requst from './requst.js';
import toolAll from './tools.js';
export function collectionEV(data){//收藏事件
return requst.post('archives/record',data).then(res=>{
return requst.post('/api/archives/record',data).then(res=>{
if(res.code==0) {
let newMsg = '点赞成功'
let num = 2
@ -21,7 +21,7 @@ export function collectionEV(data){//收藏事件
},error=>{})
}
export function cancleCollectionEV(data){//取消收藏事件
return requst.post('archives/un-record',data).then(res=>{
return requst.post('/api/archives/un-record',data).then(res=>{
if(res.code==0) {
let newMsg = '已取消点赞'
if(data.action=='collect'){
@ -34,7 +34,7 @@ export function cancleCollectionEV(data){//取消收藏事件
// 商品收藏、积分收藏
export function collectionShopEV(data){//收藏事件
console.log(data);
return requst.post('spu/record',data).then(res=>{
return requst.post('/api/spu/record',data).then(res=>{
if(res.code==0) {
let newMsg = ''
let num = 0
@ -53,7 +53,7 @@ export function collectionShopEV(data){//收藏事件
},error=>{})
}
export function cancleCollectionShopEV(data){//取消收藏事件
return requst.post('spu/un-record',data).then(res=>{
return requst.post('/api/spu/un-record',data).then(res=>{
if(res.code==0) {
let newMsg = ''
if(data.action=='collect'){
@ -64,14 +64,14 @@ export function cancleCollectionShopEV(data){//取消收藏事件
},error=>{})
}
export function buriedPoint(){//查询埋点类型事件
return requst.post('statistics/event').then(res=>{
return requst.post('/api/statistics/event').then(res=>{
// console.log('查询所有需要埋点的类型:',res);
if(res.code==0) uni.setStorageSync('buriedPoint',res.data)
},error=>{})
}
export function reportBuriedPoint(data){//上报埋点事件
// console.log('埋点的数据:',data);
return requst.post('statistics/report',data).then(res=>{},error=>{})
return requst.post('/api/statistics/report',data).then(res=>{},error=>{})
}
// export function zhuColor(){//查询主题色
// return requst.post('index/mini-program-setting').then(res=>{
@ -81,14 +81,19 @@ export function reportBuriedPoint(data){//上报埋点事件
// }
// },error=>{})
// }
export function checkSwip(){//查询主题色
return requst.post('common/slide-positions').then(res=>{
// 查询轮播图位置
export function checkCarouselLocation(){
return requst.post('/api/common/slide-positions').then(res=>{
if(res.code==0){
console.log(res);
}
},error=>{})
}
export function checkBanner(data){//查询主题色
return requst.post('common/slides',data)
// 查询轮播图列表
export function checkBanner(data){
return requst.post('/api/common/slides',data)
}

View File

@ -104,16 +104,123 @@ const tools = {
// if(num==2) hname = `${name.substr(0, 1)}****${name.substr(name.length-1)}`
// return hname
// },
// 昵称从第一个字开始,后面的都用"*"代替
hideName(name,num){
let hname = ''
hname = `${name.substr(0, 1)}****${name.substr(name.length-1)}`
return hname
},
// 金额转换各三位数使用英文","隔开
changeNum(num){
if (num) {
// 针对整数部分进行格式化处理,这是此方法的核心,也是稍难理解的一个地方,逆向的来思考或者采用简单的事例来实现就容易多了
/*
也可以这样想象现在有一串数字字符串在你面前如果让你给他家千分位的逗号的话你是怎么来思考和操作的?
字符串长度为0/1/2/3时都不用添加
字符串长度大于3的时候从右往左数有三位字符就加一个逗号然后继续往前数直到不到往前数少于三位字符为止
*/
num = num+''; // 数字转换为字符串,数字是没有.length属性的
for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++) {
num = num.substring(0, num.length - (4 * i + 3)) + ',' + num.substring(num.length - (4 * i + 3))
}
// 将数据(符号、整数部分、小数部分)整体组合返回
return num;
}
},
// 整数添加.00,小数就不添加
addXiaoShu(num){
let str = num.toString();
return str.includes('.') ? num : num = num + '.00';
},
// type:+加、-减、*乘、/除
// len:小数后保留几位
operationEv(num1,num2,type,len=0){
// 将数字转化成字符串
num1 = num1.toString();
num2 = num2.toString();
// 获取小数点的位置
var index1 = num1.indexOf(".");
var index2 = num2.indexOf(".");
// 如果小数点存在,那么就再获取各自的小数位数
var ws1 = 0;
var ws2 = 0;
if(index1 != -1){
ws1 = num1.split(".")[1].length;
}
if(index2 != -1){
ws2 = num2.split(".")[1].length;
}
// 看谁的小数位数大,谁的小数位数小
var bigger = (ws1 > ws2) ? ws1 : ws2;
var smaller = (ws1 < ws2) ? ws1 : ws2;
// 计算得到需要补齐的0的个数
var zerosCount = bigger - smaller;
// 好了,现在不管三七二十,全部去除小数点
num1 = num1.replace(".","");
num2 = num2.replace(".","");
// 比较num1和num2谁大比较方法就是看谁是smaller是smaller的一方就补0
if(ws1 == smaller){
for (var i = 0; i < zerosCount; i++) {
num1 += "0";
}
} else {
for (var i = 0; i < zerosCount; i++) {
num2 += "0";
}
}
// 开始计算
var sum = "";
if(type=="+"){
// 加
sum = parseInt(num1) + parseInt(num2);
}
if(type=="-"){
// 减
sum = parseInt(num1) - parseInt(num2);
}
if(type=="*"){
// 乘
sum = parseInt(num1) * parseInt(num2);
}
if(type=="/"){
// 除
sum = parseInt(num1) / parseInt(num2);
}
// 根据较大的小数位数计算倍数
var beishu = 1;
for (var i = 0; i < bigger; i++) {
beishu = beishu*10;
}
sum = sum/beishu;
if(type=="*"){
switch (bigger){
case 1:
sum = sum / 10;
break;
case 2:
sum = sum / 100;
break;
case 3:
sum = sum / 1000;
break;
}
}
if(type=="/"){
switch (bigger){
case 1:
sum = sum * 10;
break;
case 2:
sum = sum * 100;
break;
case 3:
sum = sum * 1000;
break;
}
}
len!=0 ? sum = sum.toFixed(len) : '';
return sum;
},
// 时间戳===>日期
timestampToTime(timestamp) {
var date = timestamp.toString().length==13 ? new Date(timestamp*1) : new Date(timestamp * 1000);//时间戳为10位需*1000时间戳为13位的话不需乘1000
@ -205,6 +312,7 @@ const tools = {
var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' };
return str.replace(/&(lt|gt|nbsp|amp|quot|src);/ig, function (all, t) { return arrEntities[t]; }).replace('<section', '<div').replace(/\<img/g, '<img @tap="pre" style="max-width:100%!important;height:auto" ').replace(/src=\"/g,'src="https://oss.hmzfyy.cn');
},
// 延迟跳转
setTime(url,title,time){
// console.log(url,title,time);
if(url=='' && title==''){
@ -264,35 +372,31 @@ const tools = {
overdue(){//查询过期时间和是否有token并调用登录事件
var date = new Date();
var timestamp = date.getTime();//精确到毫秒
if((uni.getStorageSync('expire')*1000) - 10000 < timestamp){
this.loginEv()
} else if(uni.getStorageSync('token')==''){
this.loginEv()
} else if(uni.getStorageSync('is_active')=='' || uni.getStorageSync('is_active')==0){
this.loginEv()
if((uni.getStorageSync('expire')*1000) - 10000 < timestamp || uni.getStorageSync('token')==''){
this.loginEv();
}
},
loginEv(){//执行登录事件
let that = this;
uni.login({
provider: 'weixin',
success: function(res) {
success: (res)=> {
if (res.code) {
let code = res.code;
let obj = uni.getStorageSync('params')
var params = {
invite_code:'',
invite_code: uni.getStorageSync('is_active')=='' ? uni.getStorageSync('invite_code') : '',
code:code,
nickname: obj.nickname,
avatar: obj.avatarUrl,
country: obj.country,
province: obj.province,
city: obj.city,
gender: obj.gender,
language:obj.language
nickname: obj.nickname || '',
avatar: obj.avatarUrl || '',
country: obj.country || '',
province: obj.province || '',
city: obj.city || '',
gender: obj.gender || '',
language:obj.language || ''
}
uni.request({
url: `${uni.getStorageSync('hostapi')}user/login`,
url: `${uni.getStorageSync('hostapi')}/api/user/login`,
method: 'post',
data: params,
header: {
@ -309,7 +413,6 @@ const tools = {
uni.setStorageSync('phone_active',res.data.data.phone_active)//是否绑定手机号
uni.setStorageSync('userId',res.data.data.account_id)
uni.setStorageSync('invite_code',res.data.data.invite_code)
// console.log('is_active',uni.getStorageSync('is_active'));
}
}
})
@ -317,23 +420,6 @@ const tools = {
},
});
},
returnAuth(){//是否第一次授权
let auth = false
// if(uni.getStorageSync('is_active')==0 || uni.getStorageSync('phone_active')==0) {
if(uni.getStorageSync('is_active')==0) {
// this.showToast('您目前是游客,请授权登录')
// setTimeout(()=>{
uni.navigateTo({url:'/pages/login/login'})
// },1500)
auth = true
}
return auth
},
isLogin(){//是否已经登录
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0 && uni.getStorageSync('phone_active') !=0){
this.overdue()
}
},
// 文本复制
clickCopy(data){
uni.setClipboardData({
@ -389,7 +475,6 @@ const tools = {
method: 'get',
header: {
'Content-Type': 'application/json; charset=UTF-8',
// "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: res => {

120
main.js
View File

@ -1,114 +1,36 @@
import Vue from 'vue'
import App from './App'
import statusNav from './components/status-nav.vue';//引入状态栏组件
Vue.component('status-nav',statusNav)//全局注册状态栏组件
import footTab from './components/foot-tab.vue';//引入底部tab组件
Vue.component('foot-tab',footTab)//全局注册底部tab组件
import backTop from './components/backTop.vue';//引入返回顶部组件
Vue.component('back-top',backTop)//全局注册返回顶部组件
import catePu from './components/cate-items/cate-pu.vue';//引入分类组件
Vue.component('cate-pu',catePu)//全局注册分类组件
import listPu from './components/list-pu.vue';//引入视频、图片列表组件
Vue.component('list-pu',listPu)//全局注册视频、图片列表组件
import pupo from './components/pupo.vue';//引入弹框组件
Vue.component('pu-po',pupo)//全局注册弹框组件
import nothingPage from './components/nothing-page.vue'//引入无内容组件
Vue.component('nothing-page',nothingPage)//全局注册无内容组件
import publicCustomer from './components/public-customer.vue'//引入客服组件
Vue.component('public-customer',publicCustomer)//全局注册客服组件
import authPhone from './components/auth-phone.vue'//引入手机授权组件
Vue.component('auth-phone',authPhone)//全局注册手机授权组件
import empower from './components/empower.vue'//引入用户授权组件
Vue.component('empower',empower)//全局注册用户授权组件
import authUserInfoMobile from './components/auth-userInfo-mobile.vue'//引入授权用户信息,授权手机号组件
Vue.component('auth-userInfo-mobile',authUserInfoMobile)//全局注册授权用户信息,授权手机号组件
import Vue from 'vue';
import App from './App';
import containerSubgroup from './components/container-subgroup.vue'//引入容器组件
Vue.component('container-subgroup',containerSubgroup)//全局注册容器组件
// 全局注册分享事件
import share from './jsFile/share.js'
Vue.mixin(share)
import statusNav from './components/status-nav.vue';//引入状态栏组件
Vue.component('status-nav',statusNav);//全局注册状态栏组件
import nothingPage from './components/nothing-page.vue';//引入无内容组件
Vue.component('nothing-page',nothingPage);//全局注册无内容组件
import authUserInfoMobile from './components/auth-userInfo-mobile.vue';//引入授权用户信息,授权手机号组件
Vue.component('auth-userInfo-mobile',authUserInfoMobile);//全局注册授权用户信息,授权手机号组件
import containerSubgroup from './components/containers/container-subgroup.vue';//引入容器组件
Vue.component('container-subgroup',containerSubgroup);//全局注册容器组件
import share from './jsFile/share.js';// 全局注册分享事件
Vue.mixin(share);
// 常用工具
import tools from '@/jsFile/tools.js'
import tools from '@/jsFile/tools.js';
Vue.prototype.$toolAll = tools;
// 响应数据
import requst from '@/jsFile/requst.js'
import requst from '@/jsFile/requst.js';
Vue.prototype.$requst = requst;
// 域名专治后台仔没有返回http/https的图片
// Vue.prototype.$http = 'https://hm.hmzfyy.cn'
// 图片域名专治后台仔没有返回http/https的图片
Vue.prototype.$http = 'https://oss.hmzfyy.cn';
Vue.prototype.$hostapi = 'https://hengmei.scdxtc.cn/api/';
const {log} = console;
Vue.prototype.log = log;
Vue.config.productionTip = false;
// // 动态获取手机电量栏,并设置状态栏高度
// Vue.prototype.statusBarH = function(){
// uni.getSystemInfo({
// success: (e) => {
// // 定义电量栏
// let statusBar = 0;
// // 定义状态栏
// let customBar = 0;
// // #ifdef APP-PLUS
// // app时执行
// // 设置电量栏高度
// Vue.prototype.statusBar = e.statusBarHeight;
// // 设置状态栏高度
// Vue.prototype.customBar = e.statusBarHeight + 45;
// // #endif
// // 网页
// // #ifdef H5
// statusBar = 0
// customBar = e.statusBarHeight + 45
// // #endif
// // 小程序
// // #ifdef MP
// statusBar = e.statusBarHeight
// customBar = e.statusBarHeight + 45
// if (e.platform === 'android') {
// this.$store.commit('SET_SYSTEM_IOSANDROID', false)
// customBar = e.statusBarHeight + 50
// }
// // #endif
// // 微信小程序
// // #ifdef MP-WEIXIN
// statusBar = e.statusBarHeight;
// // @ts-ignore
// const custom = wx.getMenuButtonBoundingClientRect()
// customBar = custom.bottom + custom.top - e.statusBarHeight;
// // #endif
// // 这里你可以自己决定存放方式建议放在store中因为store是实时变化的
// uni.setStorageSync('statusBar',statusBar);
// uni.setStorageSync('customBar',customBar);
// // 全局配置域名
// uni.setStorageSync('hostapi',`https://hengmei.scdxtc.cn/api/`);
// }
// })
// }
Vue.config.productionTip = false
App.mpType = 'app'
App.mpType = 'app';
const app = new Vue({
...App

View File

@ -68,7 +68,7 @@
/* */
"mp-weixin" : {
/* */
"appid" : "wx2654bc27c419ada6",
"appid" : "wxa02e44170bc722cd",
"setting" : {
"urlCheck" : true,
"es6" : false

View File

@ -1,9 +1,15 @@
<template>
<view>
<status-nav :titleVal="'协议'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="mar20">
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'登录'"></status-nav>
<!-- 容器 -->
<container-subgroup>
<rich-text :nodes="content"></rich-text>
</view>
</container-subgroup>
</view>
</template>
@ -11,7 +17,6 @@
export default {
data(){
return {
statusHNH:uni.getStorageSync('statusHNH'),
content:'<p>1.用户协议谢谢洗诶诶黑货币的宁波</p>'
}
},

View File

@ -1,37 +1,46 @@
<template>
<view>
<status-nav :titleVal="'登录'" :tabcolor="'rgba(244, 244, 244,1)'" :whereCome="1*1" :statusTitle="true" :backgroudColor="'rgba(244, 244, 244,1)'"></status-nav>
<view class='login-header'>
<image class="infoImg" :style="{boxShadow: '0px 0px 20px '+ publicColor}" mode="aspectFit" :src="userInfo.avatarUrl || imgSrc"></image>
<view class="logo-name">恒美植发</view>
</view>
<view class="login-box">
<button class='login-btn' :style="{background:publicColor}" type='primary' @click="bindGetUserInfo"></button>
<view class="xie-box">登录代表您已同意<text @tap="goAgreement" class="xieCon">用户服务协议</text></view>
</view>
<!-- 弹框 -->
<view v-if="isShowP" class="disjcac posAll">
<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 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>
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'登录'"></status-nav>
<!-- 容器 -->
<container-subgroup>
<view class='login-header'>
<image class="infoImg" :style="{boxShadow: '0px 0px 20px '+ publicColor}" mode="aspectFit" :src="userInfo.avatarUrl || imgSrc"></image>
<view class="logo-name">{{appletName}}</view>
</view>
<view class="login-box">
<button class='login-btn' :style="{background:publicColor}" type='primary' @click="bindGetUserInfo"></button>
<view class="xie-box">登录代表您已同意<text @tap="goAgreement" class="xieCon">用户服务协议</text></view>
</view>
<!-- 弹框 -->
<view v-if="isShowP" class="disjcac posAll">
<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 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>
</view>
</view>
</view>
</view>
</view>
</container-subgroup>
</view>
</template>
<script>
export default {
data() {
return {
appletName: getApp().globalData.appletName,
userInfo: {},//
publicColor:uni.getStorageSync('publicColor'),
canIGetUserProfile: false,
imgSrc: '/static/public/logo.png',//logo
imgSrc: '',//logo
isShowP:false,
};
},
@ -61,7 +70,6 @@
getphonenumber(e){//
let ya = this;
if(e.detail.errMsg=="getPhoneNumber:ok"){
console.log(e);
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
console.log('手机号信息:',res);
if(res.code==0){
@ -82,31 +90,24 @@
},
//
bindGetUserInfo(e) {
let ya = this;
//
uni.getUserProfile({
desc: '登录',
lang: 'zh_CN',
success: (res) => {
console.log('res',res);
ya.userInfo = res.userInfo;
// console.log('',ya.userInfo);
try {
ya.login();
} catch (e) {}
this.userInfo = res.userInfo;
this.login();
},
fail: (res) => {}
});
},
login() {
let ya = this;
// code
uni.login({
provider: 'weixin',
success: function(res) {
success: (res)=> {
if (res.code) {
let code = res.code;
ya.updateUserInfo(code);
this.updateUserInfo(res.code);
} else {
uni.showToast({
title: '登录失败!',
@ -118,7 +119,6 @@
},
//
updateUserInfo(code) {
let ya = this;
uni.showToast({
title: '登录中...',
icon:'loading',
@ -126,17 +126,17 @@
})
var params = {
code:code,
nickname: ya.userInfo.nickName,//
headimgurl: ya.userInfo.avatarUrl,//
country: ya.userInfo.country,//
province: ya.userInfo.province,//
city: ya.userInfo.city,//
gender: ya.userInfo.gender,//
language:ya.userInfo.language,//
nickname: this.userInfo.nickName,//
headimgurl: this.userInfo.avatarUrl,//
country: this.userInfo.country,//
province: this.userInfo.province,//
city: this.userInfo.city,//
gender: this.userInfo.gender,//
language:this.userInfo.language,//
is_active:1
}
this.$requst.post('user/login',params).then(res => {
// console.log(res);
this.log(params,138)
this.$requst.post('/api/user/login',params).then(res => {
if(res.data.token!=''){
uni.setStorageSync('params',params)
uni.setStorageSync('userId',res.data.account_id)
@ -145,8 +145,11 @@
uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('phone_active',res.data.phone_active)//
uni.setStorageSync('invite_code',res.data.invite_code)
uni.hideToast()
this.isShowP = true;
uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome'
})
// uni.hideToast();
// this.isShowP = true;
}
},error => {})
}

View File

@ -1,15 +1,16 @@
<template>
<view>
<view class="pad-x180">
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="false"
:ifCenter="true"
:navBarTitle="'分类'"></status-nav>
<view :style="{paddingTop: statusBarHeight+'px'}" class="pad-x140">
<view class="pad30 sort-box" :style="{top: statusBarHeight+'px'}">
<!-- 容器 -->
<container-subgroup>
<view class="pad30 sort-box mar-x20" style="margin-left: -30rpx;margin-right: -30rpx;" :style="{top: statusBarHeight+'px'}">
<view class="col0 fon38 disjbac fon50">
<view class="bold">分类筛选</view>
<view>分类筛选</view>
<i @tap="clikScreenIcon" class="icon icon-screen" style="font-size: 50rpx;"></i>
</view>
<view v-if="chooseCateList.length" class="disac fw fon24">
@ -21,7 +22,16 @@
</view>
</view>
<!-- 列表 -->
<list-two :scrollCate="4"></list-two>
<view class="disjbac fw">
<view @tap="goDetail(item.id)" class="width47 mar-s50 posir" v-for="(item,index) in dataList" :key="index">
<image :src="item.imgSrc" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.title}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 无更多 -->
<pitera v-if="total==dataList.length"></pitera>
<!-- 筛选框 -->
<view v-show="isScreen" @tap="isScreen=false" class="screen-box" :style="{top:statusBarHeight+'px'}">
<view @tap.stop="isScreen=true" class="posir">
@ -54,26 +64,25 @@
</view>
</view>
</view>
</view>
<!-- 全局客服 -->
<public-customer :nbottom="520"></public-customer>
</container-subgroup>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='1'></foot-tab>
<!-- 全局客服 -->
<public-customer :nbottom="320"></public-customer>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
</template>
<script>
import swiperPu from '@/components/swiper-pu.vue';
import cateTu from '@/components/cate-items/cate-tu.vue';
import listTwo from '@/components/list/list-two.vue';
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
import pitera from '@/components/nothing/pitera.vue';
//
import publicCustomer from '@/components/public-customer.vue';
//
import footTab from '@/components/foot-tab.vue';
export default {
components:{
swiperPu,
cateTu,
listTwo
footTab,
publicCustomer,
pitera
},
data() {
return {
@ -129,34 +138,17 @@
],
minPrice:'',//
maxPrice:'',//
ccurrent:0,
cateList:[],
cateListTwo:[//
],
dataList:[//
dataList:[//
],
showTop:false,//
tuList:[],
newCurrent:0,
cateW:'',//
isLoading:false,
page:1,
size:10,
total:'',//
isZanw:true,
category_id:'',//ID
disease_id:'',//ID
bannerList:[],
titleList:uni.getStorageSync('footTitle'), //
imgList:uni.getStorageSync('footimg'), //
zanArr:[],
dataShopList:[],
timeList:[],
isHot:false,
isAutoPlay:false,
optionObj:{}
activityStr:'',
categoryId:''
}
},
onPageScroll(e) {
@ -165,20 +157,9 @@
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
if(!this.isHot){
this.checkCate(this.category_id)//
}
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
this.implementEv();
}
},
onUnload() {
this.isAutoPlay = false;
},
onHide() {
this.isAutoPlay = false;
},
onShareAppMessage() {
var shareObj = {
path: `/pages/tabbar/cate/cate?invite_code=${uni.getStorageSync('invite_code')}`, // /
@ -186,9 +167,44 @@
return shareObj;
},
onLoad(options) {
//
this.obtainScreen();
//
this.implementEv();
},
methods: {
//
obtainScreen(){
this.$requst.post('/api/spu/condition').then(res=>{
if(res.code==0){
this.screenList = [];
if(res.data.length){
res.data.forEach((item,index)=>{
let obj = {};
let newlist = [];
item.children.forEach((item1,index1)=>{
let childObj = {
id:item1.value,
title:item1.name,
isCheck:index1==0 ? true : false
}
newlist.push(childObj)
})
obj = {
mainTitle:item.title,
childrenList:newlist
}
this.screenList.push(obj)
})
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
//
clikScreenIcon(){
this.isScreen = true;
@ -199,6 +215,10 @@
this.screenList[mainIndex].childrenList.forEach((item,index)=>{
item.isCheck = false;
})
// id
this.categoryId = this.screenList[0].childrenList[childrenIndex].id;
//
this.activityStr = this.screenList[1].childrenList[childrenIndex].id;
//
this.temporaryCate[mainIndex] = [];
// true
@ -257,6 +277,12 @@
})
})
this.temporaryCate = [];
// id
this.categoryId = '';
//
this.activityStr = '';
//
this.implementEv();
}
},
//
@ -272,285 +298,52 @@
}
})
this.isScreen = false;
this.page = 1;
//
this.implementEv();
},
checkSwi(){
checkBanner({position:'category-hot-banner'}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
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)
})
}
}
})
},
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
this.dataList[e].is_collected = 1
//
collectionEV({action:'collect',archive_id:this.dataList[e].id})
}
},
comfirmev(e){//
this.dataList[e].is_collected = 0
this.$toolAll.tools.showToast('正在取消...','loading')
//
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id})
},
checkBZ(){//
this.$requst.post('archives/disease').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0){
this.cateList=[]
res.data.forEach(item=>{
let obj = {
id:item.id,
title:item.name,
pid:item.pid,
sort:item.sort
}
this.cateList.push(obj)
})
let reObj = {
id:this.cateList[0].id,
title:'热门推荐',
pid:this.cateList[0].pid,
sort:this.cateList[0].sort
}
this.cateList.unshift(reObj)
this.checkCate(this.category_id)//
setTimeout(()=>{this.isLoading = true},500)
}
},error=>{})
},
checkCate(category_id){//
this.dataShopList = [];
// this.$toolAll.tools.showToast('...')
this.$requst.post('archives/hot',{category_id:category_id,page:this.page,size:this.size}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.category_id==''){
if(res.data.category.length!=0){
this.cateListTwo = []
res.data.category.forEach(item=>{
let cateObj = {
id:item.id,
model:item.model,
model_id:item.model_id,
sort:item.sort,
title:item.title
}
this.cateListTwo.push(cateObj)
})
this.cateListTwo.push({title:'热门商品'})
this.cateListTwo.push({title:'筛选'})
this.category_id = this.cateListTwo[0].id
}
}
//
if(this.page==1) {
this.dataList = [];
uni.pageScrollTo({
scrollTop:0,
duration:0
})
}
if(res.data.list.list.length!=0){
this.total = res.data.list.total
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
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: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(tObj);
})
}
}
},error=>{})
},
checkData(disease_id){//
this.$requst.post('archives/disease-question',{disease_id:disease_id}).then(res=>{
// console.log('',res);
if(res.code==0){
this.tuList = []
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let arr = []
if(item.children.length!=0){
item.children.forEach(itemt=>{
let objt = {
category_id:itemt.category_id,
content:itemt.title,
id:itemt.id,
disease_id:itemt.disease_id,//ID 1
disease_second_id:itemt.disease_second_id,//ID 12
subtitle:itemt.subtitle//
}
arr.push(objt)
})
}
let obj = {
title:item.name,
src:'',
list:arr
// {content:''},
// {content:''},
// {content:''},
// {content:''},
// ]
}
this.tuList.push(obj)
})
}
}
},error=>{})
},
chooseTwo(index){//
this.newCurrent = index
this.isZanw = true;
this.isHot = false;
this.page = 1
this.category_id = this.cateListTwo[index].id
// console.log('',this.cateListTwo[index].title);
if(this.cateListTwo[index].title=='筛选'){
uni.navigateTo({
url:'/pagesB/searchPage/searchPage'
})
} else if(this.cateListTwo[index].title=='热门商品'){
this.isHot = true;
this.checkSotList()
} else {
this.checkCate(this.cateListTwo[index].id)
}
},
checkSotList(){
this.dataList = [];
//
implementEv(){
this.$toolAll.tools.showToast('搜索中...')
let params = {
page:1,
size:2000,
is_hot:1
keyword:'', //
page:this.page, //
size: this.size, //
activity:this.activityStr,// normal=limit_time=
category_id:this.categoryId,// ID
price_from:this.minPrice,// 0
price_to:this.maxPrice,// 0
}
uni.request({
url:`${uni.getStorageSync('hostapi')}spu/list`,
data:params,
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
clearInterval(this.timer);
// if(this.page==1) {
this.zanArr = [];
this.dataShopList = [];
this.timeList = [];
// }
this.total = res.data.total;
if(res.data.data.list.length!=0){
res.data.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,//
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
this.zanArr.push(obj)
})
this.zanArr.forEach((item,index)=>{
if(item.activity_end_at!='') {
let obj = {
id:item.id,
reponseTime:item.reponseTime,
time:item.activity_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
this.$toolAll.tools.showToast('加载中...')
this.timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.zanArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
this.timeList[index].reponseTime = new Date(this.timeList[index].reponseTime).getTime() + 1000;//
if(this.timeList[index].reponseTime - endTime >=0) {// - >= 0
this.zanArr[item.nIndex].activity_end_at = "活动已结束";
} else {
//
this.zanArr[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.dataShopList = this.zanArr;
},1000)
} else {
this.dataShopList = this.zanArr;
this.$requst.post('/api/spu/list',params).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
//
this.total = res.data.total;
if(res.data.list.length){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
imgSrc:item.cover,
title:item.name,
// price:this.$toolAll.tools.changeNum(item.price*1),
price:item.price,
isActivity:item.tag == '' ? false : true,
}
}
this.dataList.push(obj);
})
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
goPage(id,index){//
goDetail(id){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataShopList[index].isIntegral}`
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>

View File

@ -9,8 +9,8 @@
<!-- 容器 -->
<container-subgroup>
<view class="disjcac fc">
<image class="mar-sx20" src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" mode="aspectFill" style="width: 224rpx;height: 224rpx;border-radius: 60rpx;"></image>
<view class="fon36 bold">Anita Rose</view>
<image class="mar-sx20" :src="userInfo.headimgurl" mode="aspectFill" style="width: 224rpx;height: 224rpx;border-radius: 60rpx;"></image>
<view class="fon36 bold">{{userInfo.nickname}}</view>
</view>
<!-- 我的订单状态 -->
<view style="margin-top: 100rpx;">
@ -26,7 +26,7 @@
<view class="disjbac fon28 col3 mar-x50">
<view @tap="chooseOrderStatus(indexo)" v-for="(itemo,indexo) in orderStatus" :key="indexo">
<view class="disac fc posir">
<image :src="itemo.src" class="icon-img" mode="widthFix"></image>
<image :src="itemo.src" :style="{width:[50,46,48,49,49][indexo]+'rpx',height:[44,40,42,44,45][indexo]+'rpx'}" class="icon-img" mode="widthFix"></image>
<view class="mar-sx10 fon24 col0">{{itemo.title}}</view>
<view class="posia red-num" style="right: 0;top: 0;" v-if="itemo.num!=0">{{itemo.num}}</view>
</view>
@ -38,19 +38,17 @@
</container-subgroup>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='2'></foot-tab>
<!-- 弹框授权 -->
<!-- <auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> -->
</view>
</template>
<script>
import functionList from '@/components/function-list/function-list.vue';
//
import footTab from '@/components/foot-tab.vue';
export default {
components:{functionList},
components:{functionList,footTab},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
orderStatus:[//
{src:'/static/public/icon-payment.png',title:'待付款',num:0},
{src:'/static/public/icon-send-goods.png',title:'待发货',num:0},
@ -98,7 +96,8 @@
}
},
onShow() {
// this.checkInfo();
//
this.checkInfo();
},
onShareAppMessage() {
var shareObj = {
@ -114,17 +113,21 @@
let statusIndex = ''
if(index==0) statusIndex = 1;
if(index==1) statusIndex = 2;
if(index==2) statusIndex = 4;
if(index==3) statusIndex = 5;
if(index==2) statusIndex = 3;
if(index==3) statusIndex = 4;
if(index==4) statusIndex = 5;
uni.navigateTo({
url:'/pagesA/myOrder/myOrder?index='+statusIndex
})
},
checkInfo(){
this.$requst.post('user/info').then(res=>{
this.$requst.post('/api/user/info').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0) {
this.userInfo = res.data;
this.orderStatus[0].num = this.userInfo.order_count.waiting;//
this.orderStatus[1].num = this.userInfo.order_count.paid;//
this.orderStatus[2].num = this.userInfo.order_count.shipped;//
}
},error=>{})
}

View File

@ -9,30 +9,49 @@
<view :style="{paddingTop: statusBarHeight +'px'}">
<view class="pad-sx20 pad-zy40">
<!-- 搜索输入框 start -->
<view class="radius30 disac pad-zy40 pad-sx20 mar-x40" style="background-color: #f2f1f7;">
<image src="/static/public/icon-search.png" mode="widthFix" style="width: 60rpx;height: 60rpx;"></image>
<input @confirm="searchEv" class="pad-z20 width100" type="text" v-model="searchText" placeholder="搜索" placeholder-style="font-weight: bold;" />
<view class="radius30 disac pad-zy40 pad-sx30 mar-x40" style="background-color: #f2f1f7;">
<image src="/static/public/icon-search.png" mode="widthFix" style="width: 40rpx;height: 40rpx;"></image>
<input @confirm="searchEv" class="pad-z20 width100 fon36" type="text" v-model="searchText" placeholder="搜索" />
</view>
<!-- 搜索输入框 end -->
<!-- 轮播图 start -->
<swiper-pu :bannerList="bannerList" :isplay="isAutoPlay" :newHeight="'230'" :newRadius="'15'" :newBottom="'10'"></swiper-pu>
<!-- 轮播图 end -->
<!-- 轮播图 end -->
</view>
<view style="position: sticky;z-index: 10;" :style="{ top: statusBarHeight +'px'}">
<swiper-tab id="tab" :list="type" v-model="current" @input="clickTab" itemColor="#000000" lineColor="#000000">
<swiper-tab id="tab" :list="classifyList" v-model="current" @input="clickTab" itemColor="#000000" lineColor="#000000">
<!-- 自定义tabs样式 -->
<!-- <view slot="title">其其</view> -->
<!-- <view slot="title"></view> -->
</swiper-tab>
</view>
<view class="pad-zy40 pad-s40">
<swiper class="swiper-page pad-x140" :style="{ height: swiperHeight - statusBarHeight +'px'}" :current="current" @change="swiperChange">
<swiper-item v-for="item in type" :key="index">
<view class="pad-zy40 mar-x160">
<swiper class="swiper-page pad-s40" :style="{ height: swiperHeight - statusBarHeight +'px'}" :current="current" @change="swiperChange">
<swiper-item v-for="(item,index) in classifyList" :key="index">
<scroll-view scroll-y @scrolltolower="scrollBottomEv" style="height: 100%;">
<!-- 列表数据 -->
<list-one></list-one>
<!-- 活动商品 start -->
<view v-for="(item,index) in dataList[index][0]" :key="index" class="mar-x50">
<h1 class="fon36 bold">{{item.name}}</h1>
<view class="colpeili fon26 mar-s20 mar-x40 clips1">{{item.subtitle}}</view>
<view class="posir" @tap="goDetail(item.id)">
<image class="radius30 animated fadeIn" :src="item.cover" mode="aspectFill" lazy-load style="height: 425rpx;width: 100%;"></image>
<view v-if="item.tag!=''" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 活动商品 end -->
<!-- 子商品 start -->
<view class="disjbac fw">
<view @tap="goDetail(item.id)" class="width47 mar-x50 posir" v-for="(item,index) in dataList[index][1]" :key="index">
<image :src="item.cover" mode="aspectFill" lazy-load style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.name}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.tag!=''" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 子商品 end -->
<!-- 暂无更多数据 -->
<pitera v-if="pitera"></pitera>
<pitera v-if="noMore"></pitera>
</scroll-view>
</swiper-item>
</swiper>
@ -53,38 +72,35 @@
//
import listOne from '@/components/list/list-one.vue';
//
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
import {checkBanner} from '@/jsFile/publicAPI.js';
//
import footTab from '@/components/foot-tab.vue';
export default {
components:{
swiperPu,
pitera,
swiperTab,
listOne
listOne,
footTab
},
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
searchText:'',//
type: [{
title: '翡翠'
}, {
title: '白玉'
}, {
title: '彩宝'
}, {
title: '琥珀'
}, {
title: '其他'
}],
classifyList: [
// {//
// id:1,
// title: ''
// }
],
current:0, // tabswiper
swiperHeight:uni.getSystemInfoSync().windowHeight,
publicColor:'', //
showTop:false, //
dataList:[], //
page:1, //
size:10, //
size:5, //
total:0, //
pitera:false, //
titleList:uni.getStorageSync('footTitle'), //
imgList:uni.getStorageSync('footimg'), //
ifNet:true,
@ -93,7 +109,9 @@
refNum:0, //
bannerList:[], //
isAutoPlay:false,//
blockIng:true, //
check:uni.getStorageSync('is_active'),
classifyId:'',//id
noMore:false,
}
},
onPageScroll(e) {
@ -110,7 +128,7 @@
onReady() {
// IDtab
uni.createSelectorQuery().in(this).select('#tab').boundingClientRect().exec(rect => {
this.swiperHeight = this.swiperHeight - rect[0].height
this.swiperHeight = this.swiperHeight - rect[0].height - 150
});
},
onShow() {
@ -126,21 +144,21 @@
  return shareObj;
},
onLoad(options) {
if(options.q!=undefined){
// unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1")
// decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
let str = unescape(options.q);
// console.log(str);
let len1 = str.indexOf('invite_code=');
let len2 = str.indexOf('channel=');
let len3 = str.indexOf('source_code=');
let newInvite = '';
let newChanel = '';
let newsource_code = '';
if(len1!=-1) newInvite = str.slice((len1+12),(len1+12+32));
if(len2!=-1) newChanel = str.slice((len2+8),(len2+8+8));
if(len3!=-1) newsource_code = str.slice((len3+12),(len3+12+32));
}
// if(options.q!=undefined){
// // unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1")
// // decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
// let str = unescape(options.q);
// // console.log(str);
// let len1 = str.indexOf('invite_code=');
// let len2 = str.indexOf('channel=');
// let len3 = str.indexOf('source_code=');
// let newInvite = '';
// let newChanel = '';
// let newsource_code = '';
// if(len1!=-1) newInvite = str.slice((len1+12),(len1+12+32));
// if(len2!=-1) newChanel = str.slice((len2+8),(len2+8+8));
// if(len3!=-1) newsource_code = str.slice((len3+12),(len3+12+32));
// }
// const query = wx.createSelectorQuery()
// query.select('.statusHNH').boundingClientRect((rect) => {
// // log('+',rect.height);
@ -148,39 +166,103 @@
// this.statusHNH = rect.height
// }).exec()
this.checkSwi();//
this.checkUserInfo();//
this.classifyEv();//
},
methods: {
goDetail(id){//
if(this.check){
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
} else {
uni.navigateTo({
url:`/pages/login/login`
})
}
},
//
classifyEv(){
this.$requst.post('/api/spu/category').then(res=>{
if(res.code==0){
this.classifyList = res.data;
if(this.classifyList.length){
// id
this.classifyId = this.classifyList[0].id;
this.classifyList.forEach(item=>{
this.dataList.push([[],[]]);
})
this.$nextTick(()=>{
//
this.checkList();
})
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
//
scrollBottomEv(){
//
if(this.total!=this.dataList.length){
if(this.total!=(this.dataList[this.current][0].length+this.dataList[this.current][1].length)){
// +1
this.page++
// this.checkList(); //
this.checkList(); //
} else {
//
this.pitera = true;
this.noMore = true;
}
},
// tab
clickTab(index){
this.current = index
},
//
swiperChange(e){
this.current = e.detail.current
},
//
async checkUserInfo(){
this.$requst.post('user/info').then(res=>{
//
checkList(){
let params = {
page:this.page,
size:this.size,
category_id: this.classifyId,//id
}
if(this.page!=1){
uni.showLoading({
title:'加载中...'
})
}
this.$requst.post('/api/spu/home',params).then(res=>{
if(res.code==0){
if(res.data.phone_active!=0){
uni.setStorageSync('phone_active',res.data.phone_active);
if(this.page==1) {
this.dataList[this.current] = [[],[]];
}
//
this.total = res.data.total;
if(res.data.list.length){
res.data.list.forEach(item=>{
if(item.home_display=='big'){
this.dataList[this.current][0].push(item);
} else {
let twoObj = {
amount: item.amount,
cover: item.cover,
home_display: item.home_display,
id: item.id,
name: item.name,
original_price: this.$toolAll.tools.changeNum(item.original_price),
price: this.$toolAll.tools.changeNum(item.price),
stock: item.stock,
subtitle: item.subtitle,
tag: item.tag
}
this.dataList[this.current][1].push(item);
}
})
}
if(this.total == (this.dataList[this.current][0].length + this.dataList[this.current][1].length)){
this.noMore = true;
}
uni.hideLoading();
} else {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
//
@ -204,10 +286,14 @@
})
},
searchEv(){//
if(this.blockIng){
if(this.check){
uni.navigateTo({
url:`/pagesB/searchPage/searchPage?keyWorld=${ this.searchText }`
})
} else {
uni.navigateTo({
url:'/pages/login/login'
})
}
},
//
@ -241,12 +327,24 @@
this.checkNet()
},1000)
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
// tab
clickTab(index){
//
this.current = index;
},
//
swiperChange(e){
this.current = e.detail.current;
//
this.executeCheckList();
},
//
executeCheckList(){
this.page = 1;
this.classifyId = this.classifyList[this.current].id
//
this.checkList();
}
}
}
</script>

View File

@ -2,7 +2,8 @@
<view>
<!-- 状态栏 -->
<status-nav :navBarTitle="'分销中心'"></status-nav>
<view class="pad-zy30" :style="{paddingTop: statusBarHeight+'px'}">
<!-- 容器 -->
<container-subgroup>
<!-- 标题 -->
<view class="fon30 col0 mar-s30 mar-x10 tcenter">我的佣金</view>
<!-- 佣金 -->
@ -11,15 +12,15 @@
<view class="disja mar-s30">
<view class="disjcac fc">
<view class="fon24 colpeili">累计收益</view>
<view class="fon36 col0 bold mar-s20">2000</view>
<view class="fon36 col0 bold mar-s20">{{distributionInfo.commission_total}}</view>
</view>
<view class="disjcac fc">
<view class="fon24 colpeili">累计提现</view>
<view class="fon36 col0 bold mar-s20">2000</view>
<view class="fon36 col0 bold mar-s20">{{distributionInfo.withdrawal_total}}</view>
</view>
<view class="disjcac fc">
<view class="fon24 colpeili">分享好友</view>
<view class="fon36 col0 bold mar-s10">2000</view>
<view class="fon36 col0 bold mar-s10">{{distributionInfo.invite_count}}</view>
</view>
</view>
<!-- 提现按钮 -->
@ -27,32 +28,34 @@
<!-- 佣金记录 -->
<view class="fon36 col0 bold pad-sx20 bbot">佣金记录</view>
<!-- 列表 -->
<view>
<view v-if="dataList.length">
<view class="bbot pad-sx20" v-for="(item,index) in dataList" :key="index">
<view class="disjbac">
<view class="fon30 col0 bold">{{item.title}}</view>
<view class="fon24 colpeili">{{item.status}}</view>
<view class="fon30 col0 bold">{{item.name}}</view>
<!-- <view class="fon24 colpeili">{{item.status}}</view> -->
</view>
<view class="disjbac mar-s20">
<view class="fon24 colpeili">{{item.time}}</view>
<view class="fon24 colpeili">{{item.created_at}}</view>
<view class="fon30 peili-colorRed bold">-{{item.price}}</view>
</view>
</view>
</view>
</view>
<!-- 暂无 -->
<pitera v-if="total==dataList.length"></pitera>
</container-subgroup>
<!-- 提现弹框 -->
<view v-show="showwithdrawal" :style="{top: statusBarHeight+'px'}" @tap="showwithdrawal=false" class="withdrawal-box">
<view @tap.stop="showwithdrawal=true" class="bacf radius20 pad30 posir fon30 col0 mar-zy50 mar-s100">
<view class="tcenter">提现申请</view>
<view class="mar-s20">
<view class="fon24 colpeili">提现金额</view>
<input type="text" class="pad-sx10 width100 bbot" value="" placeholder="请输入金额" placeholder-style="color:#000000;" />
<input type="text" class="pad-sx10 width100 bbot" v-model="commissionPrice" placeholder="请输入金额" placeholder-style="color:#000000;" />
</view>
<view class="mar-s20">
<view class="fon24 colpeili">微信号码</view>
<input type="text" class="pad-sx10 width100 bbot" value="" placeholder="请输入微信号码" placeholder-style="color:#000000;" />
<input type="text" class="pad-sx10 width100 bbot" v-model="wechatStr" placeholder="请输入微信号码" placeholder-style="color:#000000;" />
</view>
<view class="withdrawal-btn radius30 colf fon36 tcenter peili-backColor mar-s70">立即提现</view>
<view @tap="commissionExchange" class="withdrawal-btn radius30 colf fon36 tcenter peili-backColor mar-s70">立即提现</view>
<!-- 关闭按钮 -->
<image @tap.stop="showwithdrawal=false" src="/static/public/icon-close-01.png" mode="" lazy-load></image>
</view>
@ -61,62 +64,126 @@
</template>
<script>
import pitera from '@/components/nothing/pitera.vue';
export default {
components:{
pitera
},
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
commission:1000,
commission:0, //
dataList:[
{
title:'提现',
time:'2022-2-19 16:56:18',
price:300,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:300,
},
{
title:'提现',
time:'2022-2-19 16:56:18',
price:300,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:300,
},
{
title:'提现',
time:'2022-2-19 16:56:18',
price:300,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:300,
},
{
title:'提现',
time:'2022-2-19 16:56:18',
price:300,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:300,
},
{
title:'提现',
time:'2022-2-19 16:56:18',
price:300,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:300,
},
{
title:'提现',
time:'2022-2-19 16:56:18',
price:300,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:300,
},
{
title:'提现',
time:'2022-2-19 16:56:18',
price:600,
status:'成功'
name:'提现',
created_at:'2022-2-19 16:56:18',
num:600,
}
],
showwithdrawal:false
showwithdrawal:false, //
distributionInfo:{}, //
commissionPrice:'' ,//
wechatStr:'',//
page:1,
size:10,
total:0
}
},
onReachBottom() {
if(this.total!=this.dataList){
this.page++;
//
this.checkCommissionEv();
}
},
onLoad() {
//
this.checkCommissionEv();
},
methods: {
//
checkCommissionEv(){
this.$requst.post('/api/user/commission').then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
//
this.distributionInfo = res.data;
//
this.commission = this.distributionInfo.commission;
//
this.dataList = this.dataList.concat(this.distributionInfo.log.list);
//
this.total = this.distributionInfo.log.total;
this.log(this.total,this.dataList.length)
} else {
this.$toolAll.tools.showToast(err.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
//
tuneEv(){
this.showwithdrawal = true;
if(this.commission*1 == 0 ){
this.$toolAll.tools.showToast('剩余佣金不足')
} else {
this.showwithdrawal = true;
}
},
//
commissionExchange(){
if(!this.commissionPrice || this.commissionPrice==0){
this.$toolAll.tools.showToast('请输入提现金额');
} else if(!this.wechatStr){
this.$toolAll.tools.showToast('请输入微信号');
} else {
this.$requst.post('/api/user/commission-withdrawal',{commission:this.commissionPrice,wechat:this.wechatStr}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('申请提现已提交');
this.page = 1;
setTimeout(()=>{
//
this.showwithdrawal = false;
// -
this.checkCommissionEv();
},2000)
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
}
}
}
}

View File

@ -1,5 +1,5 @@
<template>
<view>
<view class="pad-x160">
<!-- 状态栏 -->
<status-nav :navBarTitle="'确认订单'"></status-nav>
<!-- 容器 -->
@ -7,7 +7,7 @@
<view class="bacf6 fon30 col3 radius20 mar-s20 disjbac pad-sx27-zy20">
<view class="bold">配送方式</view>
<view class="disac">
<view v-if="!isVirtual" @tap="expressEv(0)" :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>
@ -16,9 +16,9 @@
<view class="bold">收件人信息</view>
<navigator url="/pagesA/myAddress/myAddress?isWhere=0" hover-class="none">
<view class="disjbac pad-s30">
<view v-if="addressInfo==''">
<view class="fon28 bold mar-x10">吃肉的饺子 <span class="mar-z20">17366921088</span></view>
<view class="fon24 col9">四川省成都市成华区双店路B口</view>
<view v-if="addressInfo!=''">
<view class="fon28 bold mar-x10">{{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>
<view v-else class="fon24 col9">请完善收件人信息</view>
<i class="icon icon-next col0"></i>
@ -28,11 +28,11 @@
<!-- 自提地址 -->
<view v-else class="bacf6 fon30 col3 radius20 mar-s20 pad-sx27-zy20">
<view class="bold">自提地址</view>
<!-- <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="请输入收货人手机号" /> -->
<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="disjbac mar-s50">
<view>
<view class="fon28 bold mar-x20">佩丽饰品</view>
<view class="fon24 col9">四川省成都市成华区双店路B口</view>
<view class="fon24 col9">{{goAddress}}</view>
</view>
<!-- 立即导航 -->
<view @tap="goThere(goAddress)" class="disjcac fc col0 fon24">
@ -50,87 +50,44 @@
<view class="width100 disjb fw" style="height: 166rpx;">
<view>
<view @tap="goShopDetail(item.id)" class="fon30 col3 bold clips2">{{item.title}}</view>
<view class="order-sy">{{item.sku_name}}</view>
<!-- <view class="order-sy">{{item.sku_name}}</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="order-item-price">{{item.price}}</view>
<view class="fon30 col6">x{{item.num}}</view>
</view>
</view>
</view>
<view class="fon30 disjbac mar-s20 pad-s10">
<view class="col6">{{allNum}}</view>
<view class="bold colf8" v-if="isNei!=3">{{zanAllPrice}}</view>
<view class="bold colf8" v-else>{{allPrice}}</view>
<view class="bold colf8">应付款{{allPrice}}</view>
</view>
</view>
<!-- 优惠 -->
<view v-if="isNei!=3" class="bacf6 fon30 col3 radius20 mar-s20 pad-sx27-zy20 disjbac">
<view class="bacf6 fon30 col3 radius20 mar-s20 pad-sx27-zy20 disjbac">
<view class="bold">折扣优惠</view>
<view class="colf8 bold">0</view>
<view class="colf8 bold">{{discountPrice}}</view>
</view>
<!-- 快递费用 -->
<view v-if="isExpress" class="bacf6 fon30 radius20 mar-s20 disjbac pad-sx27-zy20">
<view class="bold">快递费用</view>
<view class="colf8 bold">0</view>
<view class="colf8 bold">{{expressInfo.default_price}}</view>
</view>
</container-subgroup>
<payment></payment>
<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 class="pad-sx20 pad-zy50">
<view class="disjbac">
<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 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> -->
<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 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>
<!-- <view class="fon28 col3 mar-s20">{{['黄金','白银'][item.isGrade]}}会员专属优惠券</view> -->
<view class="fon28 col3 mar-s20">{{item.name}}</view>
<view>
<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">有效期{{item.startTime.slice(0,10)}}{{item.endTime.slice(0,10)}}</view>
</view>
</view>
</view>
</scroll-view>
<!-- 领取优惠券按钮 -->
<view @tap.stop="goCoupon" class="ling-btn">领取优惠券</view>
</view>
</view>
</view>
<!-- 底部导航 -->
<payment :totalPrice="totalPrice" @immediatePayment="goPayment"></payment>
<!-- 支付成功 -->
<view v-if="isSuccess" class="posAll" :style="{top:statusHNH+'px'}" style="z-index: 3;background-color: #F5F5F5;">
<view v-if="isSuccess" class="posAll" style="z-index: 3;background-color: #F5F5F5;">
<view class="bacf radius20 mar-s20 mar-zy20 success-box">
<image src="/static/public/pay-success.png" mode=""></image>
<view class="fon28 col3 pad-s20 pad-x40">支付成功</view>
<view class="success-hj"><span v-if="isNei!=3">{{jsPrice<0?0:jsPrice}}</span><span v-else>{{jsPrice}}</span></view>
<view class="success-hj"><span>{{jsPrice<0?0:jsPrice}}</span></view>
<view class="disja success-btn">
<view @tap="goDetail"></view>
<view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view>
</view>
</view>
</view>
<!-- 弹框授权 -->
<!-- <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower> -->
<!-- 弹框 -->
<!-- <auth-phone v-if="isShowP"></auth-phone> -->
</view>
</template>
@ -142,135 +99,74 @@
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isExpress:true,
switchQuan:true,
showQuan:false,//
isDui:false,
orderList:uni.getStorageSync('orderList'),
quanList:[],
goAddress:'四川省成都市青羊区青羊大道213号',
youQuan:{
id:0,
youPrice:0
},//
delPrice:0,//
allPrice:0,//
allNum:0,//
zanAllPrice:0,//
goAddress:'四川省成都市青羊区草堂东路88号',
discountPrice:0,//
isNei:0,
expressInfo:{},//
addressInfo:'',//
userPphone:'请完善信息',
zPhone:'',//
page:1,
size:10,
isFocus:false,
loading:false,
zf_allPrice:0,//
zf_kqPrice:0,//
payFS:[
{title:'微信支付',isActive:true,num:0},
{title:'孔雀币',isActive:false,num:100},
{title:'积分',isActive:false,num:100},
],
isKq:false,
jsPrice:0,//,
zc_allPrice:0,//
coin_price:0,//
isSuccess:false,//
ntype:'money',//money coin
times:0,//
isCurrent:2,
vision:false,
isShowP:false,
isfen:false,
checkGrounpId:0,
expressInfo:{
default_price:0
code:'',//
default_price:0 //
},
isVirtual:false//
userPphone:'', //
}
},
computed:{
//
allNum(){
let num = 0;
this.orderList.forEach(item=>{
num += item.num;
})
return num;
},
//
allPrice(){
let newPrice = 0;
this.orderList.forEach(item=>{
newPrice += item.num * item.price;
})
return this.$toolAll.tools.addXiaoShu(newPrice);
},
//
totalPrice(){
let price1 = this.$toolAll.tools.operationEv(this.allPrice, this.discountPrice, '-', 2);
//
let expressPrice = 0;
this.isExpress ? expressPrice = this.expressInfo.default_price : expressPrice = 0;
return this.$toolAll.tools.operationEv(price1, expressPrice, '+', 2);
}
},
onShareAppMessage(res) {
var ya = this;
this.$requst.post('user/record',{type:'content',action:'share',id:this.orderList[0].id}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
c:this.orderList[0].id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb);
if(ya.addressInfo.share_img==null) ya.addressInfo.share_img = ya.addressInfo.cover;
var shareObj = {
title: `${ya.orderList[0].title}`, // (slogan)
title: ``, // (slogan)
path: `/pagesB/shopDetail/shopDetail?id=${this.orderList[0].id}&category_id=${this.orderList[0].category_id}&share_id=${this.checkGrounpId}&invite_code=${uni.getStorageSync('invite_code')}&shareCate=${this.orderList[0].cateNum}&checkGrounpId=${this.orderList[0].checkGrounpId}`, // /
imageUrl: ya.orderList[0].imgSrc//PNGJPG imageUrl 使 5:4
imageUrl: ''//PNGJPG imageUrl 使 5:4
};
return shareObj;
},
onShow() {
this.$toolAll.tools.isLogin();
this.checkChoose();//
uni.removeStorageSync('orderInfo');
this.checkChoose();//
},
onLoad(options) {
//
this.zPhone = uni.getStorageSync('phone');
//
options.isVirtual == "virtual" ? this.isVirtual = true : this.isVirtual = false
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkexpress();//
this.checkeList(options.isNei);//
this.checkOrderDetail();//
this.isNei = options.isNei;
if(this.isNei==3) {
this.payFS[0].isActive = false;
this.payFS[2].isActive = true;
this.isCurrent = 1;
}
//
this.checkexpress();
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
//
checkChoose(){
console.log(uni.getStorageSync('chooseAddress'),165);
if(uni.getStorageSync('chooseAddress')==''){
this.checkAddress();//
} else {
console.log(uni.getStorageSync('chooseAddress'));
let naddress = uni.getStorageSync('chooseAddress');
this.addressInfo = {
id:naddress.id,
@ -284,146 +180,18 @@
this.userPphone = this.$toolAll.tools.hideMPhone(naddress.userPhone);
}
},
obtainCoin(coinNum){//
this.$requst.post('user/get-coin-price',{amount:coinNum,get_type:this.ntype}).then(res=>{
if(res.code==0){
if(this.ntype=='money'){
this.coin_price = res.data.amount/100;
} else {
this.zf_kqPrice = res.data.amount;
this.isKq = true;
}
}
})
},
goShopDetail(id){
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
},
chooseFS(index){
this.payFS[index].isActive = !this.payFS[index].isActive;
if(this.isNei==3){//
if(!this.payFS[0].isActive && !this.payFS[2].isActive){
this.$toolAll.tools.showToast('请选择支付方式');
this.allPrice = this.zanAllPrice;
this.isKq = false;
return;
}
} else {//
if(!this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式')
this.allPrice = this.zanAllPrice;
this.isKq = false;
this.zf_kqPrice = this.payFS[1].num;
return;
}
}
if(this.payFS[index].title=='微信支付'){
if(this.isNei!=3){
//+
if(this.payFS[0].isActive && this.payFS[1].isActive){
if(this.zanAllPrice - this.coin_price >=0){//
this.allPrice = this.$toolAll.tools.addXiaoShu(this.zanAllPrice - this.coin_price);
this.zf_kqPrice = this.payFS[1].num;
} else {//
this.allPrice = 0;
this.ntype = 'coin';
this.obtainCoin(this.zanAllPrice*100);
}
return;
}
//+
if(!this.payFS[0].isActive && this.payFS[1].isActive){
if(this.zanAllPrice - this.coin_price>0){
this.$toolAll.tools.showToast('孔雀币不足');
}
return;
}
//+
if(this.payFS[0].isActive && !this.payFS[1].isActive){
this.isKq = false;
this.zf_kqPrice = 0;
return;
}
} else {
if(this.expressInfo.default_price==0){
this.$toolAll.tools.showToast('暂不可微信支付');
this.payFS[index].isActive = false;
}
}
}
if(this.payFS[index].title=='孔雀币') {
if(this.youQuan.youPrice!=0){
this.payFS[1].isActive = false;
this.$toolAll.tools.showToast('无法使用孔雀币支付');
} else {
if(this.coin_price!=0){
//+
if(this.payFS[0].isActive && this.payFS[1].isActive) {
if(this.zanAllPrice - this.coin_price<=0){//
this.ntype = 'coin';
this.obtainCoin(this.zanAllPrice*100);
this.allPrice = 0;
} else {//
this.allPrice = (this.$toolAll.tools.addXiaoShu(this.zanAllPrice - this.coin_price)*1).toFixed(2);
this.zf_kqPrice = this.payFS[1].num;
}
return;
}
//+
if(this.payFS[0].isActive && !this.payFS[1].isActive) {
this.isKq = false;
this.zf_kqPrice = 0;
// 0
if(this.youQuan.youPrice==0){
this.allPrice = (this.$toolAll.tools.addXiaoShu(this.zanAllPrice)*1).toFixed(2);
} else {
this.allPrice = (this.$toolAll.tools.addXiaoShu(this.zanAllPrice - this.youQuan.youPrice)*1).toFixed(2);
}
return;
}
//+
if(!this.payFS[0].isActive && this.payFS[1].isActive){
if(this.zanAllPrice - this.coin_price<=0){//
this.ntype = 'coin'
this.obtainCoin(this.allPrice*100);
this.allPrice = 0;
}
if(this.zanAllPrice - this.coin_price>0){//
this.$toolAll.tools.showToast('孔雀币不足')
this.allPrice = (this.$toolAll.tools.addXiaoShu(this.zanAllPrice - this.coin_price)*1).toFixed(2);
this.zf_kqPrice = this.payFS[1].num;
}
return;
}
//+
if(!this.payFS[0].isActive && !this.payFS[1].isActive){
this.isKq = false;
this.allPrice = (this.$toolAll.tools.addXiaoShu(this.zanAllPrice)*1).toFixed(2);
return;
}
} else {
this.$toolAll.tools.showToast('暂无可用孔雀币');
this.payFS[index].isActive = false;
}
}
}
if(this.payFS[index].title=='积分') {
}
},
goPayment(){//
this.isFocus = false;
this.isDui = false;
let nphone = '';
if(this.isExpress) {
nphone = this.addressInfo.phone;//
} else nphone = this.zPhone;//
let self = 0;//
if(!this.isExpress) self = 1;//
let nphone = this.zPhone; //
if(this.isExpress) nphone = this.addressInfo.phone; //
let self = 1; //
if(this.isExpress) self = 0; //
let nsku_list = [];
let is_only = 0;
this.orderList.forEach(item=>{
let obj = {
sku_coding:item.coding,
@ -431,32 +199,19 @@
group_id:item.pin_user_id
}
nsku_list.push(obj);
is_only = item.is_only;
})
let is_score = 0;
if(this.isNei == 3) {is_score = 1}
if(this.zf_kqPrice!=0) {
this.jsPrice = `${this.allPrice} +${this.zf_kqPrice}孔雀币`;
} else {
this.jsPrice = this.allPrice;
}
let parmas = {
sku_list: nsku_list,//
total: this.allPrice*100,//
address_id: this.addressInfo.id || 0,//ID
express_code: this.expressInfo.code || 0,//
coupon_id: this.youQuan.id,//ID
coupon_price: this.youQuan.youPrice*100,//
total: this.totalPrice,//
address_id: this.isExpress ? this.addressInfo.id : 0,//ID
express_code: this.isExpress ? this.expressInfo.code : '',//
pick_self: self,//0 1
pick_self_phone: nphone,//
original_total: this.zanAllPrice*100,//
freight: this.expressInfo.default_price || 0,//
remarks: "",//
is_only:is_only,//0 12
is_score:is_score,//0 1
coin:this.zf_kqPrice//
original_total: this.allPrice,//
freight: this.isExpress ? this.expressInfo.default_price : 0,//
discount:0
}
if(this.addressInfo=='' && self!=1){
if(this.addressInfo=='' && self==1){
this.$toolAll.tools.showToast('请完善收件人信息');
} else if(nphone=='') {
this.$toolAll.tools.showToast('请填写收货人手机号');
@ -464,14 +219,6 @@
} else if(this.$toolAll.tools.isPhone(nphone)) {
this.$toolAll.tools.showToast('请正确填写收货人手机号');
this.focusEv();
} else if(this.isNei == 3 && !this.payFS[2].isActive){//
this.$toolAll.tools.showToast('请选择积分付款方式');
} else if(this.isNei == 3 && this.expressInfo.default_price!=0 && this.expressInfo.default_price!=undefined && !this.payFS[0].isActive){//
this.$toolAll.tools.showToast('请添加微信支付方式');
} else if(this.isNei != 3 && !this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式')
} else if(this.isNei != 3 && !this.payFS[0].isActive && this.allPrice*1 > this.coin_price*1){
this.$toolAll.tools.showToast('孔雀币不足');
} else {
if(this.times==0){
this.times++;
@ -480,28 +227,16 @@
} else {
this.$toolAll.tools.showToast('正在调起支付','loading',1500);
}
uni.request({
url:`${uni.getStorageSync('hostapi')}order/create`,
data:parmas,
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
this.times = 0;
this.payment(res.data.data);
// uni.setStorageSync('orderList',this.orderList);
// uni.setStorageSync('orderInfo',res.data.data);
// uni.navigateTo({
// url:`/pagesA/immediatePayment/immediatePayment?allPrice=${this.allPrice}&allNum=${this.allNum}&startTime=${new Date(res.header.Date).getTime()}`
// })
} else {
this.$toolAll.tools.showToast(res.data.msg,'none',3000);
this.times = 0;
}
this.$requst.post('/api/order/create',parmas).then(res=>{
if(res.code==0){
//
this.payment(res.data);
} else {
this.$toolAll.tools.showToast(res.msg);
this.times = 0;
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
}
}
@ -517,46 +252,39 @@
signType: info.payment_params.signType,//MD5
paySign: info.payment_params.sign,//
success:(res)=> {
this.$requst.post('order/paid',{order_coding:info.coding}).then(res=>{
this.times = 0;
//
this.$requst.post('/api/order/paid',{order_coding:info.coding}).then(res=>{
if(res.code==0){
this.suseeceEv(info.coding);
this.$toolAll.tools.showToast('支付成功');
setTimeout(()=>{
uni.navigateTo({
url:'/pagesA/myOrder/myOrder'
})
},2000)
} else this.$toolAll.tools.showToast(res.msg);
})
},
fail:()=> {
fail:(err)=> {
this.$toolAll.tools.showToast('取消支付');
uni.navigateTo({
url:'/pagesA/myOrder/myOrder'
})
}
});
} else {
this.$requst.post('order/paid',{order_coding:info.coding}).then(res=>{
//
this.$requst.post('/api/order/paid',{order_coding:info.coding}).then(res=>{
if(res.code==0){
this.suseeceEv(info.coding);
this.$toolAll.tools.showToast('支付成功');
} else this.$toolAll.tools.showToast(res.msg);
})
}
},
suseeceEv(coding){
uni.removeStorageSync('chooseAddress')
this.isSuccess = true;
if(this.orderList[0].cateNum==1 && this.orderList.pin_user_id!=0){
this.isfen = true;
this.$requst.post('order/get-group-id',{order_coding:coding}).then(res=>{
if(res.code==0){
this.checkGrounpId = res.data.group_id;
}
})
}
},
goThere(val){//
wx.getLocation({//
type: 'wgs84', //wx.openLocationbug: iOS 6.3.30 type wgs84
success: function (res) {
wx.openLocation({//使
latitude: 30.67554,//-
longitude: 104.010642,//-
latitude: 30.657707,//-
longitude: 104.036007,//-,
name: val,
address: val
})
@ -564,9 +292,9 @@
})
},
checkAddress(){//
this.$requst.post('user/address').then(res=>{
this.$requst.post('/api/user/address').then(res=>{
if(res.code==0){
if(res.data.length!=0){
if(res.data.length){
res.data.forEach(item=>{
if(item.is_default==1) {
this.addressInfo = item;
@ -577,56 +305,36 @@
}
})
this.userPphone = this.$toolAll.tools.hideMPhone(this.addressInfo.phone);
} else {
this.addressInfo = '';
}
}
})
},
checkexpress(){//
//
checkexpress(){
if(this.isExpress) {
this.$requst.post('common/express-list').then(res=>{
this.$requst.post('/api/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;
}
//
item.is_default==1 ? this.expressInfo = item : this.expressInfo = res.data[0];
})
this.totalEv();
}
}
})
} else {
this.totalEv();
}
},
expressEv(index){//
if(index==0) {
this.isExpress = true;
this.checkexpress();
if(this.addressInfo==''){this.$toolAll.tools.showToast('请完善收件人信息','none',1500);}
}
if(index==1) {
this.isExpress = false;
this.expressInfo.default_price = 0;
}
},
totalEv(){//
if(this.isNei!=3 && this.isExpress && !this.payFS[1].isActive){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;// = - - +
}
if(this.isNei!=3 && !this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;// = - -
}
this.allPrice = parseInt(this.$toolAll.tools.addXiaoShu(this.allPrice));
if(this.isNei ==3 && this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;// = - - +
}
if(this.isNei ==3 && !this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;// = - -
}
this.loading = true;
},
checkOrderDetail(){//
let nsku_list = [];
this.orderList.forEach(item=>{
@ -640,95 +348,14 @@
sku_list: nsku_list,
pick_self: 0
}
this.$requst.post('order/prepare-info',parmas).then(res=>{
this.$requst.post('/api/order/prepare-info',parmas).then(res=>{
if(res.code==0){
this.payFS[1].num = res.data.account.coin;
this.obtainCoin(res.data.account.coin);
this.payFS[2].num = res.data.account.score;
} else this.$toolAll.tools.showToast(res.msg);
})
},
checkeList(isJfen){
this.allPrice = this.allPrice*1;
this.orderList.forEach(item=>{
this.allPrice += item.price*item.num;
this.allNum += item.num;
})
if(isJfen==3){
this.zanAllPrice = this.allPrice;
} else {
this.zanAllPrice = this.$toolAll.tools.addXiaoShu(this.allPrice);
}
this.quanEv(0);//
this.totalEv();
},
quanEv(index){//
if(this.payFS[1].isActive){
this.$toolAll.tools.showToast('无法使用优惠券减免');
// this.allPrice = this.$toolAll.tools.addXiaoShu(this.zanAllPrice*1 + this.expressInfo.default_price*1);
} else {
if(index==1){
this.showQuan = true
}
this.youQuan.id = 0;
this.youQuan.youPrice = 0;
this.allPrice = (this.zanAllPrice*1 - this.expressInfo.default_price*1).toFixed(2);
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 {
if(this.allPrice==0){
this.$toolAll.tools.showToast('此订单费用为 0');
// this.$requst.post('user/get-coin-price',{amount:this.quanList[index].youPrice,get_type:'coin'}).then(res=>{
// if(res.code==0){
// this.zf_kqPrice = this.zf_kqPrice - res.data.amount;
// this.showQuan = false;
// }
// })
} else {
this.quanList.forEach(item=>{
item.isStatus = false;
});
this.quanList[index].isStatus = true;
this.showQuan = false;
this.quanList[index].youPrice = this.$toolAll.tools.addXiaoShu(this.quanList[index].youPrice);
this.youQuan = this.quanList[index];
this.allPrice = this.zanAllPrice*1 - this.quanList[index].youPrice*1 + this.expressInfo.default_price*1;// = -
this.allPrice = this.allPrice.toFixed(2)*1;
}
}
},
goCoupon(){//
this.showQuan = false;
goDetail(){//
uni.navigateTo({
url:'/pagesA/coupon/coupon'
url:'/pagesA/myOrder/myOrder'
})
},
focusEv(){//
@ -737,13 +364,6 @@
blurEv(){//
this.isFocus = false;
},
goDetail(){//
uni.navigateTo({
url:'/pagesA/myOrder/myOrder'
})
},
goShop(){//
}
}
}
</script>

View File

@ -2,29 +2,30 @@
<view>
<!-- 状态栏 -->
<status-nav :navBarTitle="'地址管理'"></status-nav>
<view :style="{paddingTop:statusHNH+'px'}" class="mar-sx20 pad-zy32" style="padding-bottom: 150rpx;">
<view v-if="loading">
<view @tap="goBack(index)" 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.stop="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 class="pad-x140">
<container-subgroup>
<view v-if="loading">
<view @tap="goBack(index)" v-for="(item,index) in dataList" :key="index" class="bacf6 radius20 pad30 mar-s30">
<view class="pad-y20 disjbac">
<view class="fon28 col3 bold">{{item.userName}} {{item.userPhone}}</view>
</view>
<view class="disac" style="color: #808080;">
<view @tap.stop="editAddress(index)">编辑</view>
<view @tap.stop="delAddress(index)" class="mar-y10 mar-z50">删除</view>
<view class="fon24 col9 mar-s25">{{item.userAddress}}</view>
<view class="disjbac fon28 col3 mar-s32">
<view @tap.stop="setMo(index)" class="disac">
<i class="icon" :class="item.isActive ? 'icon-address-check' : 'icon-address-unchecked'" style="font-size: 36rpx;"></i>
<view class="mar-z10" :class="item.isActive?'':'col0'">设为默认地址</view>
</view>
<view class="disac col0">
<view @tap.stop="editAddress(index)">编辑</view>
<view @tap.stop="delAddress(index)" class="mar-y10 mar-z50">删除</view>
</view>
</view>
</view>
<view @tap.stop="obtainLngLat" class="posixzy address_add" :style="{backgroundColor:publicColor}" style="bottom: 20rpx;">新增地址</view>
<nothing-page v-if="dataList.length==0" :content="'暂无可用地址'"></nothing-page>
</view>
<view @tap.stop="obtainLngLat" class="posixzy address_add" :style="{backgroundColor:publicColor}" style="bottom: 20rpx;">添加地址</view>
<nothing-page v-if="dataList.length==0" :content="'暂无可用地址'"></nothing-page>
</view>
</container-subgroup>
</view>
<!-- 添加地址修改地址 -->
<view v-if="idEdit" @tap.stop="idEdit=false" class="posAll disjcac" style="padding: 0 46rpx;z-index: 3;">
@ -110,11 +111,12 @@
countyArr:[],
isAddress:0,
isWhere:1,
isMo:0
isMo:0,
flag:true
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad(options) {
this.checkList();
@ -147,7 +149,7 @@
header: {
'Content-Type':'application/json'
},
success:function(res) {
success:(res)=> {
// console.log('',res)
ya.userProvince = res.data.result.address_component.province
ya.userCity = res.data.result.address_component.city
@ -214,10 +216,11 @@
this.userCounty = this.countyArr[index].name;
},
async checkList(){//
this.$requst.post('user/address').then(res=>{
this.$requst.post('/api/user/address').then(res=>{
if(res.code==0){
this.flag = true;
this.dataList = [];
if(res.data.length!=0){
if(res.data.length){
res.data.forEach(item=>{
let newActive = false;
if(item.is_default==1) newActive = true
@ -237,6 +240,8 @@
this.dataList.push(obj);
})
this.checkActive();
} else {
uni.removeStorageSync('chooseAddress');
}
this.loading = true;
}
@ -249,7 +254,7 @@
this.dataList.unshift(this.dataList[have]);
this.dataList.splice(have+1,1);
},
async addAddress(){//
async addAddress(){//
if(this.userName=='') {
this.$toolAll.tools.showToast('请输入姓名');
} else if(this.userPhone=='') {
@ -271,20 +276,33 @@
address:this.userAddress,
is_default:this.isMo//
}
this.$requst.post('user/address-save',params).then(res=>{
if(res.code==0){
this.idEdit = false;
if(this.isChoose!='') {
this.$toolAll.tools.showToast('地址修改成功');
if(this.flag){
this.flag = false;
this.$requst.post('/api/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)
} else {
this.$toolAll.tools.showToast('新增地址成功');
this.$toolAll.tools.showToast(res.msg);
setTimeout(()=>{
this.flag = false;
},3000)
}
}).catch(res=>{
this.$toolAll.tools.showToast(res.msg);
setTimeout(()=>{
this.checkList();
this.clearAll();
},1000)
}
})
this.flag = false;
},3000)
})
}
}
},
setMo(index){//
@ -300,7 +318,7 @@
address:this.dataList[index].address,
is_default:1//
}
this.$requst.post('user/address-save',params).then(res=>{
this.$requst.post('/api/user/address-save',params).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('设置默认地址成功');
this.dataList.forEach(item=>{
@ -331,14 +349,28 @@
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(this.delNum==2 && this.flag) {
this.flag = false;
this.$requst.post('/api/user/address-del',{id:this.dataList[index].id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('删除成功');
if(uni.getStorageSync('chooseAddress').id==this.dataList[index].id) {
uni.removeStorageSync('chooseAddress');
}
setTimeout(()=>{
this.checkList();
},1500)
} else {
this.$toolAll.tools.showToast(res.msg);
setTimeout(()=>{
this.flag = true;
},2000)
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
setTimeout(()=>{
this.flag = true;
},2000)
})
}
},

View File

@ -1,5 +1,5 @@
<template>
<view>
<view class="pad-x20">
<!-- 状态栏 -->
<status-nav :navBarTitle="'我的订单'"></status-nav>
<view :style="{paddingTop: statusBarHeight +'px'}">
@ -8,31 +8,38 @@
<swiper-tab id="tab" :list="navList" v-model="current" @input="clickTab" itemColor="#000000" lineColor="#000000"></swiper-tab>
</view>
<swiper :style="{ height: swiperHeight - statusBarHeight +'px'}" class="pad-zy30 fon30" :current="current" @change="swiperChange">
<swiper-item v-for="item in navList.length" :key="index">
<swiper-item v-for="(item,index) in navList.length" :key="index">
<scroll-view scroll-y @scrolltolower="scrollBottomEv" style="height: 100%;">
<!-- 列表数据 -->
<view class="radius20 mar-s20" style="background-color: #f6f6f6;">
<view @tap="goDetail" class="disjbac col0 pad30" style="border-bottom: 1rpx solid #d3d3d3;">
<view>订单号123412351234123</view>
<view class="bold">{{['','待付款','待发货','待核验','待收货','交易完成'][1]}}</view>
<view class="radius20 mar-s20 bacf6" v-for="(item1,index1) in orderList[index]" :key="index1">
<view @tap="goDetail(item1.id)" class="disjbac col0 fon30 pad30" style="border-bottom: 1rpx solid #d3d3d3;">
<view>订单号{{item1.coding}}</view>
<view class="" :style="{color: ['','#f83030','#f83030','#61cf00','#8c8c9b','#8c8c9b'][item1.status]}">{{['','待付款','待发货','待收货','已完成','已取消'][item1.status]}}</view>
</view>
<view class="fon26 col3 disjbac pad-sx50 mar-zy30 disjbac borbot posir">
<image @tap="goDetail" src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" class="flexs mar-y20 radius30" style="width: 224rpx;height: 224rpx;" mode="aspectFill"></image>
<view @tap="goDetail" class="width100 disjb fc" style="height: 224rpx;">
<view class="fon28 col3 bold clips2 line-h50">就阿斯蒂芬我就阿斯蒂芬我就阿斯蒂芬我就阿斯蒂芬我就阿斯蒂芬我</view>
<view class="order-sy"><span>颜色粉色</span><span>尺寸12.2</span></view>
<view class="colpeili disjbac"><span class="order-price">2,000</span><span class="fon24">x1</span></view>
<view v-for="(item2,index2) in item1.skuList" :key="index2" class="fon26 col3 disjbac pad-sx50 mar-zy30 disjbac borbot posir">
<image @tap="goDetail(item1.id)" :src="item2.sku_cover" class="flexs mar-y20 radius30" style="width: 224rpx;height: 224rpx;" mode="aspectFill"></image>
<view @tap="goDetail(item1.id)" class="width100 disjb fc" style="height: 224rpx;">
<view class="fon28 col3 bold clips2 line-h50">{{item2.spu_name}}</view>
<view class="order-sy" v-if="item2.tag!=''"><span>颜色粉色</span><span>尺寸12.2</span></view>
<view class="colpeili disjbac"><span class="order-price">{{item2.price}}</span><span class="fon24">x{{item2.num}}</span></view>
</view>
</view>
<view class="colpeili pad30 disjbac" style="border-top: 1rpx solid #d3d3d3;">
<view class="order-price">合计2,000</view>
<view class="order-price">合计{{item1.totalPrice}}</view>
<view class="disjbac">
<view @tap="transferFrame(index)" class="order-btn">取消订单</view>
<!-- 取消订单 -->
<view @tap="transferFrame(index1)" v-if="item1.status==1 || item1.status==2" class="order-btn"></view>
<!-- 立即支付 -->
<view @tap="payMentEv(item1.coding)" v-if="item1.status==1" class="order-btn" style="background-color: #f83030;color: #FFFFFF;"></view>
<!-- 确认收获 -->
<view @tap="confirmReceipt(item1.id)" v-if="item1.status==3" class="order-btn" style="background-color: #000000;color: #FFFFFF;"></view>
<!-- 再次购买 -->
<view @tap="againBuy(index1)" v-if="item1.status==4 || item1.status==5" class="order-btn"></view>
</view>
</view>
</view>
<!-- 暂无更多数据 -->
<pitera v-if="pitera"></pitera>
<pitera v-if="total==orderList[current].length"></pitera>
</scroll-view>
</swiper-item>
</swiper>
@ -65,12 +72,10 @@
</template>
<script>
import swiperTab from '@/components/swiper-tab/swiper-tab.vue';
import yzQr from '@/components/yz-qr/yz-qr.vue';
import pitera from '@/components/nothing/pitera.vue';
export default {
components:{
yzQr,
swiperTab
pitera
},
data() {
return {
@ -78,7 +83,6 @@
swiperHeight:uni.getSystemInfoSync().windowHeight,
publicColor:uni.getStorageSync('publicColor'),//
chuTop:'',//
activeIndex:'',
navList:[{title:'全部'},{title:'待付款'},{title:'待发货'},{title:'待收货'},{title:'已完成'},{title:'已取消'}],
//
reasonList:[
@ -87,39 +91,29 @@
{title:'其他原因',isActive:false},
],
isCancle:false,//
orderList:[],
orderList:[[],[],[],[],[],[]],
zanList:[],//
page:1,
size:10,
size:200,
total:'',//
isZanw:true,
tag:'',// waiting= paid= shipped= completed= check=
current:0,//
remarks:'',//
times:0,//
canvasQrPath: '',
timer:null,
zanArr:[],
timeList:[],
orderInfo:{},
checkGrounpId:0,
orderCoding:''//
}
},
onShareAppMessage(res) {
var ya = this;
let orderIndex = res.target.dataset.id;
this.orderInfo = this.orderList[orderIndex];
this.$requst.post('user/record',{type:'content',action:'share',id:this.orderInfo.childrenList[0].spu_id}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
c:this.orderInfo.childrenList[0].spu_id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb);
var shareObj = {
     title: `${ya.orderInfo.childrenList[0].title}`, // (slogan)
     path: `/pagesB/shopDetail/shopDetail?id=${ya.orderInfo.childrenList[0].spu_activity_id}&category_id=0&share_id=${ya.orderInfo.group_id}&invite_code=${uni.getStorageSync('invite_code')}&shareCate=1&checkGrounpId=${ya.orderInfo.childrenList[0].spu_activity_id}&is_activity=1`, // /
     imageUrl: ya.orderInfo.childrenList[0].imgSrc//PNGJPG imageUrl 使 5:4
     title: ``, // (slogan)
     path: ``, // /
     imageUrl: ''//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
},
@ -129,179 +123,115 @@
this.swiperHeight = this.swiperHeight - rect[0].height
});
},
onReachBottom() {
if(this.total!=this.orderList.length){
this.page++
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
onUnload() {
uni.removeStorageSync('isorderDetail')
},
onShow() {
this.$toolAll.tools.isLogin();
if(uni.getStorageSync('isorderDetail')==1){
//
this.checkList();
}
this.$toolAll.tools.overdue();
},
onLoad(options) {
options.index==undefined ? this.activeIndex = 0 : this.activeIndex = options.index;
options.index==undefined ? this.current = 0 : this.current = options.index;
if(this.current==0){
//
this.checkList();
}
},
methods: {
//
scrollBottomEv(){
if(this.total!=this.orderList[this.current].length){
this.page++
this.checkList();
}
},
//
statejubEv(){
if(this.current == 0) this.tag = "";
if(this.current == 1) this.tag = "waiting";
if(this.current == 2) this.tag = "paid";
if(this.current == 3) this.tag = "shipped";
if(this.current == 4) this.tag = "completed";
if(this.current == 5) this.tag = "closed";
//
this.checkList();
},
// tab
clickTab(index){
this.current = index
this.current = index;
this.statejubEv();
},
//
swiperChange(e){
this.current = e.detail.current
this.current = e.detail.current;
this.statejubEv();
},
checkList(index){//
this.$requst.post('user/order',{page:this.page,size:this.size,tag:this.tag}).then(res=>{
checkList(){//
this.$requst.post('/api/user/order',{page:this.page,size:this.size,tag:this.tag}).then(res=>{
if(res.code==0){
if(this.page==1) {
uni.pageScrollTo({//
scrollTop: 0,
duration: 0
});
this.orderList = [];
this.zanArr = [];
this.timeList = [];
}
if(this.page==1) this.orderList[this.current] = [];
//
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let statusNum = 0;
if(item.status=="waiting") statusNum = 1;
// if(item.status=="paid" && item.has_virtual==1) {
// statusNum = 3;
// }
if(item.status=="paid") {
statusNum = 2;
}
// if(item.status=="check")
if(item.status=="shipped") statusNum = 4;
if(item.status=="completed") statusNum = 5;
let nprice = '';
if(item.is_score==0) nprice = this.$toolAll.tools.addXiaoShu(item.price/100);
if(item.is_score==1) nprice = item.score;
let nchildren = [];
item.skus.forEach(items=>{
let childrenPrice = '';
if(item.is_score==0) childrenPrice = items.price/100
if(item.is_score==1) childrenPrice = items.score
let objs = {
id:items.id,
imgSrc:this.$http + items.spu_cover,
title:items.spu_name,
sku_name:items.sku_name,
price:childrenPrice,
num:items.num,
not_check_num:items.not_check_num,
check_type:items.check_type,
is_virtual:items.is_virtual,
activity_type:items.activity_type,
spu_id:items.spu_id,
spu_activity_id:items.spu_activity_id
}
nchildren.push(objs);
})
if(item.status=="paid") statusNum = 2;
if(item.status=="shipped") statusNum = 3;
if(item.status=="completed") statusNum = 4;
if(item.status=="closed") statusNum = 5;
let obj = {
id:item.id,
establish:item.created_at,//
orderNum:item.coding,//
childrenList:nchildren,
orderStatus:statusNum,//1 2 3 4 5
isShop:item.is_score,//0 ,1
total: nprice,//
coin:item.coin,//
is_only:item.is_only,//,1
virtual_check:item.virtual_check,
open_one:item.open_one,
is_group_make:item.is_group_make,
open_one_success:item.open_one_success,
group_make_end_at:item.group_make_end_at,
group_id:item.group_id
skuList:item.skus,
totalPrice:item.price,
status:statusNum,
coding:item.skus[0].coding
}
this.zanArr.push(obj);
this.orderList[this.current].push(obj);
})
this.zanArr.forEach((item,index)=>{
if(item.group_make_end_at!='' && item.group_make_end_at!=null) {
let obj = {
id:item.id,
time:item.group_make_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
uni.showToast({
title:'加载中...',
icon:'none',
duration:100000
})
this.timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.zanArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
let startTime = new Date().getTime() + 1000;//
if(startTime - endTime >=0) {// - >= 0
// this.checkList(this.activeIndex);
} else {
//
this.zanArr[item.nIndex].group_make_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,startTime);
}
}
})
}
},1000)
setTimeout(()=>{
uni.hideToast();
this.orderList = this.zanArr;
// this.search_result = true;
},1000)
} else {
uni.hideToast();
this.orderList = this.zanArr;
}
this.zanList = this.orderList;
if(index==0) {
this.orderList = this.zanList;
} else if(index==3){
} else {
this.orderList = this.zanList.filter(item=>{
return item.orderStatus==index;
});
}
}
}
})
},
payMentEv(index){//
this.$requst.post('order/pay',{order_coding:this.orderList[this.current].orderNum}).then(res=>{
if(res.code==0){
uni.requestPayment({
provider: 'wxpay',
appId:res.data.payment_params.appId,//appId
timeStamp: res.data.payment_params.timeStamp,//
nonceStr: res.data.payment_params.nonceStr,//
package: res.data.payment_params.package,//package
signType: res.data.payment_params.signType,//MD5
paySign: res.data.payment_params.sign,//
success:(res)=> {
this.$requst.post('order/paid',{order_coding:this.orderList[this.current].orderNum}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('付款成功');
this.checkList(this.activeIndex)
} else this.$toolAll.tools.showToast(res.msg);
})
}
});
}
})
payMentEv(coding){//
if(this.times==0){
this.times++;
this.$requst.post('/api/order/pay',{order_coding:coding}).then(res=>{
if(res.code==0){
uni.requestPayment({
provider: 'wxpay',
appId:res.data.payment_params.appId,//appId
timeStamp: res.data.payment_params.timeStamp,//
nonceStr: res.data.payment_params.nonceStr,//
package: res.data.payment_params.package,//package
signType: res.data.payment_params.signType,//MD5
paySign: res.data.payment_params.sign,//
success:(res)=> {
this.$requst.post('/api/order/paid',{order_coding:this.orderList[this.current][index].coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('付款成功');
//
this.implementListEv();
} else this.$toolAll.tools.showToast(res.msg);
})
},
fail:()=> {
this.$toolAll.tools.showToast('取消支付');
//
this.implementListEv();
}
});
}
})
}
},
transferFrame(index){//
this.isCancle = true;
this.current = index;
this.orderCoding = this.orderList[this.current][index].coding;
this.reasonList.forEach(item=>{
item.isActive = false;
})
@ -316,23 +246,22 @@
if(this.times==0){
this.times++;
this.$toolAll.tools.showToast('正在取消...');
this.$requst.post('order/cancel',{order_coding:this.orderList[this.current].orderNum,remarks:this.remarks}).then(res=>{
this.$requst.post('/api/order/cancel',{order_coding:this.orderCoding,remarks:this.remarks}).then(res=>{
if(res.code==0){
this.isCancle = false;
this.orderList.splice(this.current,1);
this.page = 1;
this.checkList(this.activeIndex);
this.$toolAll.tools.showToast('取消成功');
this.times = 0;
//
this.implementListEv();
} else this.$toolAll.tools.showToast(res.msg);
})
}
},
confirmReceipt(id){//
this.$requst.post('order/accepted',{order_id:id}).then(res=>{
this.$requst.post('/api/order/accepted',{order_id:id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('收货成功');
this.checkList(this.activeIndex);
//
this.implementListEv();
} else this.$toolAll.tools.showToast(res.msg);
})
},
@ -340,7 +269,32 @@
uni.navigateTo({
url:`/pagesB/orderDetail/orderDetail?id=${id}`
})
}
},
//
implementListEv(){
setTimeout(()=>{
this.times = 0;
this.page = 1;
this.checkList();
},2000)
},
//
againBuy(index){
let newList = [];
this.orderList[this.current][index].skuList.forEach(item=>{
let obj = {
id:item.spu_id,//id
imgSrc:item.spu_cover,//
coding:item.coding,//coding
price:item.price,//
num:item.num,//
title:item.spu_name,//
}
newList.push(obj);
})
uni.setStorageSync('orderList',newList);
uni.navigateTo({url:'/pagesA/getReadyDan/getReadyDan'});
},
}
}
</script>
@ -358,13 +312,5 @@
}
.order-price{color: #f83030;}
.order-btn{
width: 150rpx;height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 20rpx;
background-color: #f6f6f6;
color: #8c8c9b;
border: 1rpx solid #d3d3d3;
}
</style>

View File

@ -113,7 +113,7 @@
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onUnload() {
uni.removeStorageSync('firstInfo')

View File

@ -2,18 +2,18 @@
<view>
<!-- 状态栏 -->
<status-nav :navBarTitle="'关于我们'"></status-nav>
<!-- 输入框 -->
<view class="pad-zy30" :style="{paddingTop: statusBarHeight+'px'}">
<!-- 容器 -->
<container-subgroup>
<!-- 地图 -->
<view class="radius30" style="overflow: hidden;">
<map :latitude="lat" :longitude="lng" :enable-scroll="enableScroll" :enable-zoom="enableZoom" style="height: 390rpx;width: 100%;"></map>
<view class="radius30" style="overflow: hidden;border: 2rpx solid #8c8c9b;">
<map :latitude="lat" :longitude="lng" :enable-scroll="enableScroll" :enable-zoom="enableZoom" scale="11" style="height: 390rpx;width: 100%;"></map>
</view>
<!-- 导航按钮 -->
<view class="navigate-to-where mar-s30 radius30 bac0 colf fon36 tcenter">导航至佩丽</view>
<view @tap="goThere" class="navigate-to-where mar-s30 radius30 bac0 colf fon36 tcenter">导航至佩丽</view>
<!-- 关于佩丽 -->
<view class="fon48 col0 mar-sx50">关于佩丽</view>
<rich-text :nodes="richText"></rich-text>
</view>
<rich-text :nodes="richText" class="fon30 colpeili line-h50"></rich-text>
</container-subgroup>
</view>
</template>
@ -30,14 +30,55 @@
lng:100.211328,
enableZoom:true,//
enableScroll:true,//
richText:''//
richText:'',//
address:'',//
flag:true
}
},
onLoad(options) {
//
this.checkAboutUs();
},
methods: {
//
checkAboutUs(){
this.$requst.post('/api/index/about').then(res=>{
if(res.code==0){
this.lat = res.data.lat;
this.lng = res.data.lon;
this.richText = this.$toolAll.tools.escape2Html(res.data.content);
this.address = res.data.address;
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
goThere(){//
if(this.flag){
this.flag = false;
wx.getLocation({//
type: 'wgs84', //wx.openLocationbug: iOS 6.3.30 type wgs84
success: (res)=> {
wx.openLocation({//使
latitude: this.lat*1,//-
longitude: this.lng*1,//-
name: this.address,
address: this.address,
fail:err=>{
this.$toolAll.tools.showToast('地址信息错误');
}
})
}
})
setTimeout(()=>{
this.flag = true;
},2000)
} else {
this.$toolAll.tools.showToast('请勿多次点击');
}
},
}
}
</script>

View File

@ -2,19 +2,21 @@
<view>
<!-- 状态栏 -->
<status-nav :navBarTitle="'免责声明'"></status-nav>
<view class="pad-zy30" :style="{paddingTop: statusBarHeight+'px'}">
<!-- 容器 -->
<container-subgroup>
<rich-text :nodes="disclaimerRich" class="fon24 colpeili line-h46"></rich-text>
<!-- 标题 -->
<view class="fon30 col0 mar-sx30 tcenter">责任条款</view>
<!-- <view class="fon30 col0 mar-sx30 tcenter">责任条款</view> -->
<!-- 内容 -->
<view class="fon24 colpeili line-h40">
<!-- <view class="fon24 colpeili line-h40">
<view>本网站所提供的信息只供参考之用</view>
<view class="mar-sx30">本网站及其雇员一概毋须以任何方式就任何信息传递或传送的失误不准确或错误对用户或任何其他人士负任何直接或间接的责任</view>
<view class="mar-sx30">在法律允许的范围内本网站在此声明,不承担用户或任何人士就使用或未能使用本网站所提供的信息或任何链接或项目所引致的任何直接间接附带从属特殊惩罚性或惩戒性的损害赔偿包括但不限于收益预期利润的损失或失去的业务未实现预期的节省</view>
<view class="mar-sx30">本网站所提供的信息若在任何司法管辖地区供任何人士使用或分发给任何人士时会违反该司法管辖地区的法律或条例的规定或会导致本网站或其第三方代理人受限于该司法管辖地区内的任何监管规定时则该等信息不宜在该司法管辖地区供该等任何人士使用或分发给该等任何人士用户须自行保证不会受限于任何限制或禁止用户使用或分发本网站所提供信息的当地的规定</view>
<view class="mar-sx30">本网站图片文字之类版权申明因为网站可以由注册用户自行上传图片或文字本网站无法鉴别所上传图片或文字的知识版权如果侵犯请及时通知我们本网站将在第一时间及时删除</view>
<view class="mar-sx30">凡以任何方式登录本网站或直接间接使用本网站资料者视为自愿接受本网站声明的约束</view>
</view>
</view>
</view> -->
</container-subgroup>
</view>
</template>
@ -23,10 +25,26 @@
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
disclaimerRich:''
}
},
onLoad() {
//
this.checkDisclaimerEv();
},
methods: {
//
checkDisclaimerEv(){
this.$requst.post('/api/index/statement').then(res=>{
if(res.code==0){
this.disclaimerRich = this.$toolAll.tools.escape2Html(res.data.content);
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
}
}
}
</script>

View File

@ -1,127 +1,118 @@
<template>
<view>
<view class="pad-x160">
<!-- 状态栏 -->
<status-nav :navBarTitle="'订单详情'"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
<!-- 容器 -->
<container-subgroup>
<!-- 订单类型 -->
<block v-if="loading">
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
<view class="bacf6 radius20 mar-s20 fon30 line-h50 pad30">
<view class="disjbac">
<view class="bold">{{['商城订单','积分商城订单'][orderInfo.is_score]}}</view>
<view v-if="orderInfo.status=='waiting'" class="colf8 bold"></view>
<view v-if="orderInfo.status=='paid' && orderInfo.has_virtual!=1" class="colf8 bold"></view>
<view v-if="orderInfo.status=='shipped' && orderInfo.has_virtual!=1" class="colf8 bold"></view>
<view v-if="orderInfo.status=='completed'" class="col9 bold"></view>
<view v-if="orderInfo.virtual_check==0 && orderInfo.has_virtual==1" class="colf8 bold"></view>
<view v-if="orderInfo.virtual_check==1 && orderInfo.has_virtual==1" class="col9 bold"></view>
<view v-if="orderInfo.status=='closed'" class="col9 bold"></view>
<view>订单编号</view>
<view class="bold">{{orderInfo.coding}}</view>
</view>
<view class="disjbac">
<view>下单时间</view>
<view class="bold">{{orderInfo.created_at}}</view>
</view>
<view class="disjbac">
<view>订单状态</view>
<view class="bold">
<view v-if="orderInfo.status=='waiting'" class="colf8"></view>
<view v-if="orderInfo.status=='paid'" class="colf8"></view>
<view v-if="orderInfo.status=='shipped'" style="color: #61cf00;"></view>
<view v-if="orderInfo.status=='completed'" class="col0"></view>
<view v-if="orderInfo.status=='closed'" class="col9"></view>
</view>
</view>
</view>
<!-- 订单信息 -->
<view class="bacf6 radius20 mar-s20 orderDetail-box">
<view v-for="(item,index) in orderInfo.skus" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<image :src="item.sku_cover" class="flexs" mode="aspectFill" style="width: 224rpx; height: 224rpx;"></image>
<view class="width100 disjb fc" style="height: 224rpx;">
<view class="fon28 col3 bold clips2">{{item.spu_name}}</view>
<view class="orderDetail-sku" v-if="item.tag!=''">{{item.tag}}</view>
<view class="mar-s10">
<view class="colf8 fon32 bold disjbac width100"><span>{{item.price}}</span><span class="fon28 col6 mar-z20 font4">x{{item.num}}</span></view>
</view>
</view>
</view>
<view class="fon28 disjbac mar-s40 mar-x20">
<view class="col6">{{allNum}}</view>
<view class="colf8 bold">共计{{orderInfo.original_price}}</view>
</view>
<view class="bold col3 mar-s40 mar-x20">订单号{{orderInfo.coding}}</view>
<view class="fon24 col9" v-if="orderInfo.is_only==0 && orderInfo.open_one==1 && orderInfo.is_group_make==1 && orderInfo.open_one_success==0 ">{{daoTime}}</view>
<view class="fon24 col9" v-else>{{orderInfo.created_at}}</view>
</view>
<!-- 物流信息 -->
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
<view v-if="orderInfo.address!='自提'" class="bacf6 radius20 mar-s20 fon28 pad30">
<view class="bold">物流信息</view>
<view class="bold col3 mar-s40 fon26 disjbac">
<view>{{orderInfo.express_name}}{{orderInfo.express_number||'暂无快递单号'}}</view>
<view @tap="copyCont"></view>
<view v-if="orderInfo.express_number" @tap="copyCont"></view>
</view>
</view>
<!-- 地址信息 -->
<view v-if="orderInfo.address!='自提'" class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
<view v-if="orderInfo.address!='自提'" class="bacf6 radius20 mar-s20 pad30">
<view class="bold">收件人信息</view>
<view class="fon26 col3">
<view class="fon28 col3 bold" style="margin: 52rpx 0 20rpx 0;">{{addressInfo.userName}}<span class="mar-z10">{{addressInfo.userPhone}}</span></view>
<view class="fon24 col9">{{addressInfo.userAddress}}</view>
</view>
</view>
<view v-else class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
<view class="bold">商家地址信息</view>
<view v-else class="bacf6 radius20 mar-s20 pad30">
<view class="disjbac">
<view>配送方式</view>
<view>自提</view>
</view>
<view class="fon26 col3 disjbac mar-s30">
<view>
<view class="fon28 col3 bold mar-x20">恒美植发</view>
<view class="fon28 col3 bold mar-x20">{{appletName}}</view>
<view class="fon24 col9">{{goAddress}}</view>
</view>
<!-- 立即导航 -->
<image @tap="goThere(goAddress)" src="/static/public/daoh.png" class="there" mode="aspectFill"></image>
</view>
</view>
<!-- 订单信息 -->
<view class="bacf radius20 mar-s20 orderDetail-box">
<view v-for="(item,index) in orderInfo.skus" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<image :src="item.spu_cover" class="flexs" mode="aspectFill"></image>
<view class="width100">
<view class="fon28 col3 bold clips2">{{item.spu_name}}</view>
<view class="orderDetail-sku">{{item.sku_name}}</view>
<view class="disjbac mar-s10">
<view class="colf8 fon32 bold"><span v-if="orderInfo.is_score==0">{{item.price/100}}</span><span v-else>{{item.score}}</span><span class="fon28 col6 mar-z20 font4">x{{item.num}}</span></view>
<view @tap.stop="make(index)" v-if="orderInfo.virtual_check==0 && orderInfo.has_virtual==1 && item.check_type=='frontend'" class="order-btn">线</view>
<view v-if="orderInfo.virtual_check==0 && orderInfo.has_virtual==1 && item.check_type!='frontend'" class="order-btn" style="background-color: #CCCCCC;">线</view>
</view>
<view @tap="goThere(goAddress)" class="disjcac fc col0 fon24">
<i class="icon icon-navigate-now " style="font-size: 50rpx;"></i>
<view>立即导航</view>
</view>
</view>
<view class="fon28 disjbac mar-s40 mar-x20">
<view class="col6">{{allNum}}</view>
<view class="colf8 bold">共计{{allPrice}}</view>
</view>
<!-- 金额详情 -->
<view class="bacf6 radius20 mar-s20 fon30 col0 line-h60 pad30">
<view class="disjbac">
<view>商品总金额</view>
<view class="colf8">{{orderInfo.original_price}}</view>
</view>
<view class="disjbac">
<view>折扣优惠</view>
<view class="colf8">0</view>
</view>
<view class="disjbac" v-if="orderInfo.address!='自提'">
<view>快递费用</view>
<view class="colf8">{{orderInfo.freight}}</view>
</view>
<view class="disjbac">
<view class="width100" style="text-align: right;">实付</view>
<view class="colf8 flexs bold">{{orderInfo.price}}</view>
</view>
</view>
<!-- 快递费用 -->
<view v-if="isExpress" class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
<view class="bold">快递费用</view>
<view class="fon28 colf8 bold">{{orderInfo.freight}}.00</view>
</view>
<!-- 消费 -->
<view class="fon28 col3 consumption-box">消费<span class="fon36 bold colf8"><span v-if="orderInfo.is_score==0">{{orderInfo.price/100}}</span><span v-else>{{orderInfo.score}}</span> <span v-if="orderInfo.coin!=0">+{{orderInfo.coin}}</span></span></view>
<view class="disjbac posixzy bacf orderDetail-bottom-box">
<view class="posir">
<image src="/static/public/weix.png" mode=""></image>
<view class="fon28 col3">分享</view>
<button open-type="share" class="posia-op"></button>
</view>
<view @tap="comeing(orderInfo.coding)" v-if="orderInfo.is_only==0 && orderInfo.open_one==1 && orderInfo.is_group_make==1 && orderInfo.open_one_success==0 " class="orderInfo-btn"></view>
<!-- 待付款 -->
<view class="disac paid-btn-box" v-if="orderInfo.status=='waiting'">
<view @tap="cancleEv"></view>
<view @tap="paymentEv"></view>
</view>
<!-- 待发货 -->
<view class="disac paid-btn-box" v-if="orderInfo.status=='paid' && orderInfo.virtual_check==0">
<view @tap="cancleEv"></view>
</view>
<!-- 确认收货 -->
<view @tap="confirmReceipt(orderInfo.id)" class="orderInfo-btn" v-if="orderInfo.status=='shipped'"></view>
</view>
<!-- 待核验弹框 -->
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;" catchtouchmove="return">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
<view class="fon28 col3">订单二维码</view>
<view class="mar-sx30">
<yz-qr ref="qrPath" :text="text" :size="size" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
<!-- <image src="/static/public/member-head.png" class="order-hx-img" mode="aspectFill"></image> -->
</view>
<view class="fon24 col3">
<view class=" mar-s40 mar-x20">工作人员扫码核销订单</view>
<view>订单未完成前请勿出示二维码</view>
</view>
<image @tap.stop="closeEv" src="/static/public/closequan.png" class="posia heyan-close" mode=""></image>
</view>
<!-- 底部导航 -->
<view class="posixzy disja fe bacf pad-sx20 pad-y40">
<!-- 取消订单 -->
<view @tap="cancleEv" v-if="orderInfo.status=='paid' || orderInfo.status=='waiting'" class="order-btn"></view>
<!-- 立即支付 -->
<view @tap="paymentEv" v-if="orderInfo.status=='waiting'" class="order-btn" style="background-color: #f83030;color: #FFFFFF;"></view>
<!-- 确认收获 -->
<view @tap="confirmReceipt(orderInfo.id)" v-if="orderInfo.status=='shipped'" class="order-btn" style="background-color: #000000;color: #FFFFFF;"></view>
<!-- 再次购买 -->
<view @tap="againBuy" v-if="orderInfo.status=='completed' || orderInfo.status=='closed'" class="order-btn" style="background-color: #f83030;color: #FFFFFF;"></view>
</view>
</block>
</view>
<!-- 弹框授权 -->
<!-- <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower> -->
<!-- 弹框 -->
<!-- <auth-phone v-if="isShowP"></auth-phone> -->
</container-subgroup>
</view>
</template>
<script>
import yzQr from '@/components/yz-qr/yz-qr.vue';
export default {
components:{
yzQr
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
@ -130,13 +121,14 @@
isExpress:true,
switchQuan:true,
showQuan:false,
express:'韵达快递2983625984729',
express:'',
orderInfo:'',//
addressInfo:'',//
allPrice:0,//
allNum:0,//
times:0,//
goAddress:'四川省成都市青羊区青羊大道213号',
appletName:'佩丽饰品',
goAddress:'四川省成都市青羊区草堂东路88号',
isHeyan:false,
canvasQrPath: '',
text: 'hello',
@ -146,74 +138,24 @@
timer:null,
daoTime:'',
timerDao:null,
vision:false,
isShowP:false,
}
},
onShareAppMessage(res) {
var ya = this;
let maiOjb = {
e:6,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
var shareObj = {
     title: '成都恒美毛发', // (slogan)
     title: '', // (slogan)
     path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}}` // 默认是当前页面,必须是以‘/开头的完整路径
  };
  return shareObj;
},
onUnload() {
this.closeEv();
uni.setStorageSync('isorderDetail',1);
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin();}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkInfo(options.id);
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
comeing(coding){
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('免拼成功');
this.checkInfo(this.orderInfo.id);
}
})
},
confirmReceipt(id){//
this.$requst.post('order/accepted',{order_id:id}).then(res=>{
this.$requst.post('/api/order/accepted',{order_id:id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('收货成功');
this.checkInfo(this.orderInfo.id);
@ -229,7 +171,7 @@
not_check_num:this.orderInfo.skus[index].not_check_num
}
this.timer = setInterval(()=>{
this.$requst.post('order/check-result',params).then(res=>{
this.$requst.post('/api/order/check-result',params).then(res=>{
if(res.code==0){
if(res.data.result==1){
this.isHeyan = false;
@ -241,15 +183,10 @@
})
},3000)
},
closeEv(){
this.isHeyan = false;
clearInterval(this.timer);
clearInterval(this.timerDao);
},
cancleEv(){//
this.times++;
if(this.times==2){
this.$requst.post('order/cancel',{order_coding:this.orderInfo.coding}).then(res=>{
this.$requst.post('/api/order/cancel',{order_coding:this.orderInfo.coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('取消订单成功');
this.checkInfo(this.orderInfo.id);
@ -267,7 +204,7 @@
if(this.times==0){
this.$toolAll.tools.showToast('正在调起支付','loading',1500)
this.times++;
this.$requst.post('order/pay',{order_coding:this.orderInfo.coding}).then(res=>{
this.$requst.post('/api/order/pay',{order_coding:this.orderInfo.coding}).then(res=>{
if(res.code==0){
uni.requestPayment({
provider: 'wxpay',
@ -278,7 +215,7 @@
signType: res.data.payment_params.signType,//MD5
paySign: res.data.payment_params.sign,//
success:(res)=> {
this.$requst.post('order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
this.$requst.post('/api/order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
if(res.code==0){
this.times = 0;
this.$toolAll.tools.showToast('支付成功');
@ -293,7 +230,7 @@
}
},
checkInfo(id){//
this.$requst.post('user/order-detail',{id:id}).then(res=>{
this.$requst.post('/api/user/order-detail',{id:id}).then(res=>{
if(res.code==0){
this.allPrice = 0;
this.allNum = 0;
@ -308,23 +245,7 @@
}
this.allNum += item.num;
})
if(narr.is_score==0){//
this.allPrice = this.allPrice/100;
} else {//
this.allPrice = this.allPrice;
}
this.orderInfo = narr;
if(this.orderInfo.group_make_end_at!=null){
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
this.timerDao = setInterval(()=>{
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
this.checkInfo(this.orderInfo.id);
clearInterval(this.timerDao)
} else {
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
}
},1000)
}
let naddress = this.orderInfo.address.split(',');
if(naddress[0]!='自提'){
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())
@ -338,6 +259,23 @@
}
})
},
//
againBuy(){
let newList = [];
this.orderInfo.skus.forEach(item=>{
let obj = {
id:item.spu_id,//id
imgSrc:item.spu_cover,//
coding:item.coding,//coding
price:item.price,//
num:item.num,//
title:item.spu_name,//
}
newList.push(obj);
})
uni.setStorageSync('orderList',newList);
uni.navigateTo({url:'/pagesA/getReadyDan/getReadyDan'});
},
copyCont(){//
if(this.times==0){
this.times++;
@ -355,8 +293,8 @@
type: 'wgs84', //wx.openLocationbug: iOS 6.3.30 type wgs84
success: function (res) {
wx.openLocation({//使
latitude: 30.67554,//-
longitude: 104.010642,//-
latitude: 30.657707,//-
longitude: 104.036007,//-,
name: val,
address: val
})
@ -368,7 +306,5 @@
</script>
<style>
page {
background-color: #F5F5F5;
}
</style>

View File

@ -1,10 +1,10 @@
<template>
<view>
<view class="pad-x20">
<!-- 状态栏 -->
<status-nav :navBarTitle="'搜索'"></status-nav>
<!-- 输入框 -->
<view class="search-input-box bacf" :style="{paddingTop: statusBarHeight+'px'}">
<view class="disac pad-zy30 mar-s20">
<view class="disac pad-zy30 mar-s20 pad-x20">
<!-- 输入框 -->
<input @confirm="searchEv" v-model="searchStr" placeholder="请输入关键词" class="width100 fon34 radius10" type="text"/>
<!-- 搜索 -->
@ -12,44 +12,36 @@
</view>
</view>
<!-- 列表 -->
<!-- <view v-if="dataList.length!=0"> -->
<list-two :scrollCate="1"></list-two>
<!-- </view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view> -->
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<!-- <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower> -->
<!-- 弹框 -->
<auth-phone v-if="showAuthPhone"></auth-phone>
<view class="disjbac fw pad-zy30">
<view @tap="goDetail(item.id)" class="width47 mar-s50 posir" v-for="(item,index) in dataList" :key="index">
<image :src="item.imgSrc" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.title}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 无更多 -->
<pitera v-if="total==dataList.length"></pitera>
</view>
</template>
<script>
import listTwo from '@/components/list/list-two.vue';
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
import pitera from '@/components/nothing/pitera.vue';
export default {
components:{
listTwo
pitera
},
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
searchStr:'',//
publicColor:uni.getStorageSync('publicColor'),//
dataList:[//
],
dataList:[],
showTop:false,//
page:1, //
size:10, //
total:0, //
pitera:false, //
vision:false,
showAuthPhone:false,
}
},
onPageScroll(e) {
@ -58,72 +50,63 @@
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.searchEv()//
this.implementEv()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/searchPage/searchPage?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
onShow() {
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchStr = options.keyWorld
this.searchEv()
}
},
onShow() {
this.$toolAll.tools.isLogin()
if(this.searchStr!=undefined && this.searchStr!='') this.searchEv()
this.searchStr = options.keyWorld;
this.searchEv()
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.showAuthPhone = true
}
},
searchEv(){//
this.page = 1;
//
this.implementEv();
},
//
implementEv(){
this.$toolAll.tools.showToast('搜索中...')
let params = {
keyword:this.searchStr, //
page:this.page, //
size: this.size, //
}
this.$requst.post('/api/spu/list',params).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
//
this.total = res.data.total;
if(res.data.list.length){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
imgSrc:item.cover,
title:item.name,
// price:this.$toolAll.tools.changeNum(item.price*1),
price:item.price,
isActivity:item.tag == '' ? false : true,
}
this.dataList.push(obj);
})
}
} else {
this.$toolAll.tools.showToast(res.msg);
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
goDetail(id){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
}
}
}
</script>

View File

@ -3,36 +3,40 @@
<!-- 状态栏 -->
<status-nav :navBarTitle="'商品详情'"></status-nav>
<!-- 容器 -->
<view class="pad-x140">
<view class="pad-x140" style="background-color: #fafafa;">
<container-subgroup>
<view style="margin: 0 -30rpx;">
<swiper-pu v-if="cateCurrent==0" :isplay="isAutoPlay" :browseP="true" :bannerList="bannerList" :newHeight="swiperHeight" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
</view>
<!-- 标题 -->
<view class="mar-s30 mar-x20 fon36 bold clips2 line-h50">New Farandole项链小号New Farandole项链小号New Farandole项链小号New Farandole项链小号</view>
<view class="mar-s30 mar-x20 fon36 bold clips2 line-h50">{{detailObj.name}}</view>
<!-- 描述 -->
<view class="colpeili fon30 clips3 line-h50">于亿年宝藏中臻选1的宝石级钻石每年开采数亿克拉的钻石中 仅有1%的宝石级钻石才可作为...LOVE100 星座极光的原石挑选 </view>
<view class="colpeili fon30 clips3 line-h50">{{detailObj.subtitle}}</view>
<view class="disac mar-s20">
<!-- 是否限时优惠 -->
<view class="fon24 colf pad-zy10 pad-s10 pad-x20 activity-img">限时优</view>
<view v-if="detailObj.tag!=''" class="fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
<!-- 价格 -->
<view class="disac">
<view class="fon40 bold col0 mar-y10">20,000</view>
<view class="fon30 colpeili" style="text-decoration: line-through;">16,000</view>
<view class="fon40 bold col0 mar-y10">{{discountPrice}}</view>
<view class="fon30 colpeili" style="text-decoration: line-through;">{{originalPrice}}</view>
</view>
</view>
<!-- 颜色 -->
<view class="mar-s50"><drop-down></drop-down></view>
<!-- 尺寸 -->
<drop-down :dropObj="dropObj" @chooseItem="chooseItem"></drop-down>
<!-- 作品介绍 -->
<view class="mar-s100 mar-x30 fon36 bold col0 tcenter">作品介绍</view>
<!-- 富文本 -->
<rich-text :nodes="shopRich"></rich-text>
<view style="background-color: #FFFFFF;margin: 0 -30rpx;">
<!-- 作品介绍 -->
<view class="mar-s100 mar-x30 fon36 bold col0 tcenter pad-s50">作品介绍</view>
<!-- 富文本 -->
<rich-text :nodes="shopRich"></rich-text>
</view>
</container-subgroup>
</view>
<!-- 底部导航 -->
<bottom-nav></bottom-nav>
<view v-if="shopDetail!=''">
<bottom-nav :detailObj="shopDetail"></bottom-nav>
</view>
<!-- 全局客服 -->
<public-customer
:nbottom="180"
@ -49,12 +53,15 @@
import shopList from '@/components/shop-list.vue';
import dropDown from '@/components/drop-downs/drop-down.vue';
import bottomNav from '@/components/detail-bottom-nav/bottom-nav.vue';
//
import publicCustomer from '@/components/public-customer.vue';
export default {
components:{
swiperPu,
shopList,
dropDown,
bottomNav
bottomNav,
publicCustomer
},
data() {
return {
@ -74,14 +81,12 @@
]
},
shopRich:'',//
bannerList:[{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
url:'',
isVideo:false,
poster:'',
}],//
bannerList:[],//
originalPrice:0,//
discountPrice:0,//
detailObj:{},//
skuDetail:{},//sku
shopDetail:'',
buyNum:1,//
csNum:0,//,
isAutoPlay:false,
@ -90,7 +95,7 @@
onShareAppMessage(res) {
var shareObj = {
     title: ``, // (slogan)
     path: `/pagesB/shopDetail/shopDetail?id=}`, // /
     path: `/pagesB/shopDetail/shopDetail?id=`, // /
     imageUrl: ''//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
@ -106,31 +111,59 @@
this.isAutoPlay = false;
},
onLoad(options) {
//
this.checkDetail(options.id);
},
methods: {
//
checkDetail(id){
this.$requst.post('/api/spu/detail',{id}).then(res=>{
if(res.code==0){
//
this.detailObj = res.data.detail;
this.shopDetail = res.data;
//
//
let arrImg = this.detailObj.images.split(',')
arrImg.forEach(item=>{
let newImgObj = {
imgSrc:item,
url:'',
isVideo:false,
poster:'',
}
//
this.bannerList.push(newImgObj)
})
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
imgSrc:arrImg[0],
url:this.detailObj.video,
isVideo:true,
poster:'',
}
}
//
// this.originalPrice = this.$toolAll.tools.changeNum(this.detailObj.original_price);
this.originalPrice = this.detailObj.original_price;
//
// this.discountPrice = this.$toolAll.tools.changeNum(this.detailObj.price);
this.discountPrice = this.detailObj.price;
//
this.shopRich = this.$toolAll.tools.escape2Html(res.data.detail.content);
} else {
}
}).catch(err=>{
this.$toolAll.tools.showToast(err.msg);
})
},
//
chooseItem(e){
this.log(e);
},
goGetReadyDan(index){//
// {id:1,imgSrc:'/static/tabbar/mya.png',title:'99线',price:3888,num:1,isActive:false},
let params = {
id:this.detailObj.spu_id,
imgSrc:this.$http + this.detailObj.cover,
coding:this.skuDetail.coding,
price:'',
num:this.buyNum || 1,
title:this.detailObj.name,
sku_name:this.skuDetail.title,
}
let newList = [params];
uni.setStorageSync('orderList',newList);
uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan?isNei=${this.isNei}&isVirtual=${this.detailObj.spu_type}`
})
},
addCart(){//
if(this.csNum==0){
this.csNum++;
@ -144,12 +177,6 @@
})
}
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/public/cancle-FS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/public/mo-home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/public/mo-person.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB