master
chen 2021-11-02 18:23:53 +08:00
parent f8c127a6cf
commit 0da5ee3496
65 changed files with 4449 additions and 1024 deletions

18
App.vue
View File

@ -3,23 +3,27 @@
// import {checkSwip} from '@/jsFile/publicAPI.js'
export default {
onLaunch: function() {
toolAll.tools.clearClog()//
toolAll.tools.clearClog();//
},
onShow: function() {
toolAll.tools.zhuColorT()
toolAll.tools.zhuColorT();
// uni.clearStorageSync()
if(uni.getStorageSync('token')!='') {
toolAll.tools.daoTime()
toolAll.tools.networkStatus()//
toolAll.tools.updaX()//
toolAll.tools.daoTime();
toolAll.tools.networkStatus();//
toolAll.tools.updaX();//
}
setTimeout(()=>{
toolAll.tools.overdue()//
toolAll.tools.overdue();//
},3000)
// checkSwip()//
toolAll.tools.checkQuan();
},
onHide: function() {
toolAll.tools.closeTimer()//
toolAll.tools.closeTimer();//
uni.removeStorageSync('isQuan');
uni.removeStorageSync('quanImg');
uni.removeStorageSync('quanId');
}
};
</script>

View File

@ -36,7 +36,6 @@
.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;}
@ -44,6 +43,24 @@
.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;}
/* 修改资料页面 */
@ -137,7 +154,7 @@
.bottom-popu>view:first-child .width100 image{width: 24px;height: 24px;margin-top: -20rpx;}
.del-btn,.add-btn{width: 65rpx;height: 30px;}
.num-input{width: 80rpx;height: 28px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;}
.ev-btn{width: 294rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 10rpx;}
.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;}
@ -148,6 +165,7 @@
.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;}
/* 准备下单 */
.activeT,.expressT{width: 124rpx;height: 60rpx;line-height: 60rpx;text-align: center;margin-left: 20rpx;border-radius: 20rpx;}
.activeT{color: #FFFFFF;}
@ -166,6 +184,13 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.quan-list-box{max-height: 600rpx;}
.quan-list-box .mar-x40:last-child{margin-bottom: 0rpx;}
.ling-btn{font-size: 36rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin-top: 156rpx;margin-bottom: 20rpx;}
.zhun-dui-box{display: flex;justify-content: center;align-items: center;padding: 0 85rpx;}
.zhun-dui-btn view{width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;font-size: 28rpx;font-weight: 500;border-radius: 10rpx;color: #FFFFFF;}
.zhun-dui-btn view:first-child{background: #C8C8C8;}
.zhun-dui-btn view:last-child{background: #3875F6;}
.success-box{padding: 27rpx 20rpx;text-align: center;}
.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;}
@ -179,7 +204,7 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.cart-input-box{border-radius: 4rpx;overflow: hidden;}
.cart-input-box image{width: 46rpx;height: 26px;}
.cart-input-box input{width: 60rpx;height: 24px;text-align: center;border-top: 2rpx solid #3875F6;border-bottom: 2rpx solid #3875F6;}
.goBuy-btn{width: 170rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;}
.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;}
@ -206,15 +231,89 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.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;}
.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;}
.paid-btn-box view:first-child{background: #E9E9E9;color: #808080;}
.paid-btn-box view:last-child{background: #3875F6;color: #FFFFFF;margin-left: 20rpx;}
.consumption-box{margin: 40rpx 0 40rpx 0;text-align: right;}
.orderDetail-box{padding: 0rpx 20rpx 27rpx 20rpx;}
.orderDetail-box image{width: 166rpx;height: 166rpx;border-radius: 15rpx;margin-right: 12rpx;}
.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);}
@media screen and (height:812px){
.blue-img{height: 500rpx;}
}
@media screen and (height:844px){
.blue-img{height: 496rpx;}
}
@media screen and (height:896px){
.blue-img{height: 486rpx;}
}
.bottoc{margin-top: 6rpx;color: #414141;}
.opc{opacity: 0.7;}
.width100{width: 100%;}
.width33{width: 33%;}
.width45{width: 45%;}
.width50{width: 50%;}
.width55{width: 55%;}
.width50{width: 50%;}
.width48{width: 48%;}
.width45{width: 45%;}
.width33{width: 33%;}
.width25{width: 25%;}
.posAll{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.45);z-index: 12;}
.posir{position: relative;}
@ -277,6 +376,7 @@ button:after{content: none!important;}
.colb{color: #000000;}
.colc{color: #CCCCCC;}
.col3{color: #333333;}
.col34{color: #343434;}
.col6{color: #666666;}
.colf8{color: #F85050;}
.col9{color: #999999;}
@ -285,12 +385,18 @@ button:after{content: none!important;}
.col80{color: #808080;}
.col7D{color: #7D7D7D;}
.colB3{color: #B3B3B3;}
.col5b{color: #5B5B5B;}
/* 字体位置 */
.tc{text-align: center;}
.tright{text-align: right;}
/* 行间距 */
.linh40{line-height: 40rpx;}
/* 粗体 */
.bold{font-weight: bold;}
.font5{font-weight: 500;}
.font4{font-weight: 400;}
/* 背景颜色 */
@ -298,6 +404,7 @@ button:after{content: none!important;}
.bacf{background-color: #FFFFFF;}
.bcdb{background-color: #DBDBDB;}
.bcf8{background: #F85050;}
.bacf5{background: #F5F5F5;}
/* 圆角 */
.radius10{border-radius: 10rpx;}
@ -335,6 +442,7 @@ button:after{content: none!important;}
.mar-zy36{margin-left: 36rpx;margin-right: 36rpx;}
.mar-zy40{margin-left: 40rpx;margin-right: 40rpx;}
.mar-zy50{margin-left: 50rpx;margin-right: 50rpx;}
.mar-zy85{margin-left: 85rpx;margin-right: 85rpx;}
/* 上---外边距 */
.mar-s10{margin-top: 10rpx;}
.mar-s20{margin-top: 20rpx;}
@ -417,6 +525,7 @@ button:after{content: none!important;}
.pad-x36{padding-bottom: 36rpx;}
.pad-x40{padding-bottom: 40rpx;}
.pad-x50{padding-bottom: 50rpx;}
.pad-x160{padding-bottom: 160rpx;}
.pad-x180{padding-bottom: 180rpx;}
.pad-x260{padding-bottom: 260rpx;}
/* 左---内边距 */

View File

@ -116,6 +116,7 @@
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
// uni.navigateTo({url:'/pages/tabbar/pagehome/pagehome'})
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})

View File

@ -36,6 +36,7 @@
},
methods:{
lianK(){
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:this.nid}).then(res=>{},error=>{})
let maiOjb = {

125
components/score-list.vue Normal file
View File

@ -0,0 +1,125 @@
<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>
<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>
<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

@ -1,12 +1,12 @@
<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" @tap="goPage(item1.id,index1)">
<view v-if="index1%2==0" v-for="(item1,index1) in newList" :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" style="padding: 6rpx 10rpx;margin-right: 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<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>
@ -34,19 +34,20 @@
<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">150000</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" 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" @tap="goPage(item1.id,index1)">
<view v-if="index1%2!=0" v-for="(item1,index1) in newList" :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" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;margin-left: 10rpx;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;margin-left: 10rpx;"></view>
<view 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;">
@ -71,7 +72,7 @@
<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">150000</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
@ -100,24 +101,62 @@
}
]
}
},
iswhere:{
type:Number,
default:0
}
},
data() {
return {
publicColor:uni.getStorageSync('publicColor'),
newList:[],
timeList:[],//
};
},
mounted() {
if(this.dataList.length!=0){
this.dataList.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);
}
})
this.$toolAll.tools.showToast('加载中...','none',1000);
if(this.timeList!=0){
let timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.dataList[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.dataList[item.nIndex].activity_end_at = "活动已结束";
} else {
//
this.dataList[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.newList = this.dataList;
},1000)
}
}
},
methods:{
goPage(id,index){//
let isText = '';
if(this.dataList[index].isTuan) isText = "团购"
if(this.dataList[index].isPing) isText = "拼团"
if(this.dataList[index].isXian) isText = "限时"
if(this.dataList[index].integral) isText = "积分"
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isText=${isText}`
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataList[index].isIntegral}`
})
}
},
}
}
</script>

View File

@ -0,0 +1,86 @@
## 功能描述
根据内容生成二维码,并返回图片地址
## 平台兼容性
兼容APP、H5及微信小程序。其他平台未测试
## 安装方式
安装到components文件夹支持[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)组件模式。
## 使用方式
**<font color=#FF0000 >可根据属性自定义二维码</font>**
``` javascript
<yz-qr></yz-qr>
```
## 属性说明
|属性名 |类型 |默认值 |说明 |
|-- |-- |-- |-- |
|text |String |'hello' |二维码内容 |
|size |Number |340 |单位是px |
|colorDark |String |'#000000' |黑色二维码 |
|colorLight |String |'#ffffff' |白色背景 |
## 示例代码
``` javascript
<template>
<view class="content">
<!-- 通过 ref 为子组件赋予一个 ID 引用,访问子组件实例 -->
<yz-qr ref="qrPath" :text="text" :size="size" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
<view class="text">
二维码内容:<text>{{text}}</text>
</view>
<view class="text">
图片地址:<text>{{canvasQrPath}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
canvasQrPath: '',
text: 'hello',
size: 200,
colorDark: '#ff0000',
colorLight: '#ffffff'
}
},
onLoad() {
this.getQrPath()
},
methods: {
getQrPath() {
var that = this;
setTimeout(function() {
that.canvasQrPath = that.$refs.qrPath.canvasQrPath;
console.log('获取二维码地址:', that.canvasQrPath)
}, 1000)
}
}
}
</script>
<style>
.text {
background-color: #f3f3f3;
margin: 24rpx;
padding: 24rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.text text {
font-weight: 700;
margin-left: 16rpx;
}
</style>
```
## <font color=#FF0000 >canvas踩坑</font>
1. uni-app中的canvas的width、height的值依赖于父元素的宽高。canvas的父级如果被隐藏。canvas的width、height则都为0。
2. 当父元素出现canvas的高度也就有了。但是canvas并不会绘制显示。解决方法可以将绘制方法写在异步方法中同时要注意组件的生命周期确保实例挂载成功之后再执行。

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
<template>
<view>
<view class="qrcode">
<canvas :style="{width:size+ 'px', height:size+ 'px', background:bgc}" canvas-id="couponQrcode"></canvas>
</view>
</view>
</template>
<script>
const qrCode = require('./weapp-qrcode.js')
export default {
data() {
return {
bgc: 'rgba(200, 200, 200, 0.1)', //
canvasQrPath: '', //
}
},
props: {
text: {
type: String,
default: 'hello'
},
size: {
type: Number,
default: 340
},
colorDark: {
type: String,
default: '#000000'
},
colorLight: {
type: String,
default: '#ffffff'
},
},
//
created() {
setTimeout(() => {
this.couponQrCode()
}, 50)
},
methods: {
//
couponQrCode() {
var that = this;
new qrCode('couponQrcode', {
text: this.text,
width: this.size,
height: this.size,
showLoading: true, // loading
loadingText: '二维码生成中', // loading
colorDark: this.colorDark, //
colorLight: this.colorLight, //
correctLevel: qrCode.CorrectLevel.H, //L/M/Q/H
usingIn: this //this
})
//
uni.canvasToTempFilePath({
canvasId: 'couponQrcode',
success: function(res) {
// H5tempFilePath base64
console.log('yz-qr图片路径:',res.tempFilePath)
that.canvasQrPath = res.tempFilePath
}
}, this)
this.$emit('update:canvasQrPath', that.canvasQrPath)
}
}
}
</script>
<style>
.qrcode {
padding: 24rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>

View File

@ -91,4 +91,17 @@ export function checkSwip(){//查询主题色
export function checkBanner(data){//查询主题色
return requst.post('common/slides',data)
}
export function checkQuan(){//查询优惠券
return requst.post('user/home-coupon').then(res=>{
if(res.code==0){
if(res.data.has_coupon==1){
uni.setStorageSync('isQuan',true);
uni.setStorageSync('quanImg','https://oss.hmzfyy.cn' + res.data.home_coupon.cover);
uni.setStorageSync('quanId',res.data.home_coupon.id);
} else {
uni.setStorageSync('isQuan',false);
}
}
})
}

View File

@ -98,7 +98,8 @@ const request = (method, url, options) => {
fail: e => {
checkError(e, reject)
},
complete: () => {
complete: rest => {
// console.log(rest);
!hideLoading && uni.hideToast()
}
})

View File

@ -1,4 +1,4 @@
import {buriedPoint,reportBuriedPoint,zhuColor} from './publicAPI.js';
import {buriedPoint,reportBuriedPoint,zhuColor,checkQuan} from './publicAPI.js';
const tools = {
timer:'',
timerNot:'',
@ -16,7 +16,7 @@ const tools = {
uni.removeStorageSync('daoTime')//清空倒计时
clearInterval(this.timer)//关闭倒计时
// console.log('上/报,埋点');
reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
// reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
uni.removeStorageSync('maiList')//清空上报参数
this.daoTime()//重新倒计时
}
@ -30,7 +30,7 @@ const tools = {
uni.removeStorageSync('daoTime')//清空倒计时
clearInterval(this.timer)//关闭倒计时
// console.log('上报,埋点');
reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
// reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
uni.removeStorageSync('maiList')//清空上报参数
this.daoTime()//重新倒计时
}
@ -40,6 +40,10 @@ const tools = {
zhuColorT(){//调用主色调
zhuColor()
},
// 查券
checkQuan(){
checkQuan();
},
networkStatus(){//检查网络状态
uni.getNetworkType({
success: function (res) {
@ -338,7 +342,40 @@ const tools = {
});
}
});
}
},
dayTime(endTime,startTime=''){//开启倒计时
let totalSecond = '';
// 本地倒计时
// if(startTime=='') totalSecond = Math.floor((new Date(endTime).getTime() - new Date().getTime())/1000);
// 服务器倒计时
if(startTime!='') totalSecond = Math.floor((new Date(endTime).getTime() - startTime)/1000);
// 总秒数
let second = totalSecond;
// 天数
let day = Math.floor(second / 3600 / 24);
let dayStr = day.toString();
if(dayStr.length == 1) dayStr = '0' + dayStr;
// 小时
let hr = Math.floor((second - day * 3600 * 24) / 3600);
let hrStr = hr.toString();
if(hrStr.length == 1) hrStr = '0' + hrStr;
// 分钟
let min = Math.floor((second - day * 3600 * 24 - hr * 3600) / 60);
let minStr = min.toString();
if(minStr.length == 1) minStr = '0' + minStr;
// 秒
let sec = second - day * 3600 * 24 - hr * 3600 - min * 60;
let secStr = sec.toString();
if(secStr.length == 1) secStr = '0' + secStr;
let newTime = '';
if(dayStr==0) {
newTime = hrStr +'时'+ minStr +'分'+ secStr +'秒';
} else {
newTime = dayStr +'天'+ hrStr +'时'+ minStr +'分'+ secStr +'秒';
}
return newTime;
},
}

View File

@ -1,10 +1,10 @@
{
"pages": [
{
"path" : "pages/tabbar/my/staffDuan",
"path" : "pages/tabbar/pagehome/pagehome",
"style" :{}
},{
"path" : "pages/tabbar/pagehome/pagehome",
"path" : "pages/tabbar/my/staffDuan",
"style" :{}
},{
"path" : "pages/login/login",
@ -238,6 +238,24 @@
"enablePullDownRefresh": false
}
}
,{
"path" : "customerCheck/customerCheck",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "shopSearch/shopSearch",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
}

View File

@ -2,22 +2,22 @@
<view>
<!-- 状态栏 -->
<status-nav :backgroudColor="publicColor" :tabcolor="publicColor" :statusTitle="true" :statusBack="false"></status-nav>
<image src="/static/public/staff-head.png" style="position: absolute;top: 0;left: 0;right: 0;height: 436rpx;width: 100%;"></image>
<image src="/static/public/staff-head.png" class="blue-img"></image>
<view class="mar-zy32 posir pad-x260" :style="{paddingTop:statusHNH+'px'}">
<view class="radius20 posir gao">
<view class="posia" :style="{top:`-${gaoh*0.4}px`,height:gaoh+'px'}" style="left: -32rpx;right: -32rpx;z-index: -1;"></view>
<view class="posia" :style="{top:`-${gaoh*0.4}px`,height:gaoh+'px'}"></view>
<view class="disjbac">
<view class="disac colf">
<!-- 头像 -->
<image class="mar-sx30" :src="userInfo.headimgurl || ''" style="width:120rpx;height: 120rpx;border-radius: 100%;margin-left: 15rpx;z-index: 1;" mode="aspectFill"></image>
<image class="mar-sx30" :src="userInfo.headimgurl || ''" mode="aspectFill"></image>
<view class="mar-z30">
<!-- 昵称 -->
<view class="disac">
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
<view style="background: #FFBD39;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFFFFF;padding: 5rpx 16rpx;margin-left: 10rpx;">黄金</view>
<view class="gao-name">黄金</view>
</view>
<view class="disac mar-s10" v-if="userInfo.mobile!==''">
<image src="/static/public/phone-02.png" style="width: 14rpx;height: 20rpx;" mode=""></image>
<image src="/static/public/phone-02.png" class="gao-phone" mode=""></image>
<!-- 手机号 -->
<view class="fon24 mar-z10">{{userInfo.mobile}}</view>
</view>
@ -25,43 +25,43 @@
</view>
<view class="mar-y25 disac">
<!-- 二维码 -->
<image @tap="isQrcode=true" src="/static/public/staff-qro.png" style="width: 43rpx;height: 43rpx;z-index: 1;" mode=""></image>
<image @tap="isQrcode=true" src="/static/public/staff-qro.png" class="gao-m" mode=""></image>
<!-- 前进键 -->
<view @tap="goNodifyData" style="width: 50rpx;position: relative;z-index: 1;justify-content: flex-end;" class="disac">
<image class="" src="/static/public/next-white.png" style="width: 35rpx;height: 35rpx;z-index: 1;" mode="aspectFill"></image>
<view @tap="goNodifyData" class="disac gao-next-box">
<image class="" src="/static/public/next-white.png" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
<view>
<view class="disac"><span style="font-weight: bold;margin-right: 20rpx;">VIP</span>黄金会员</view>
<view class="disac"><span class="bold mar-y20">VIP</span>黄金会员</view>
</view>
<navigator url="/pagesA/member/member" hover-class="none">
<view class="disac">
<view>更多权益</view>
<image src="/static/public/next-yellow.png" style="width: 22rpx;height: 22rpx;" mode=""></image>
<image src="/static/public/next-yellow.png" class="white-next" mode=""></image>
</view>
</navigator>
</view>
</view>
<view class="disja posir" style="z-index: 1;margin-top: 75rpx;">
<view @tap="choosesjf(indext)" class="disac fc flexs" style="width: 33%;" v-for="(itemt,indext) in tongList" :key="indext">
<view @tap="chooseone(indext)" class="disac fc flexs width33" v-for="(itemt,indext) in tongList" :key="indext">
<view class="fon28 bold mar-sx20 clips1">{{itemt.num}}<text v-if="indext==2"></text></view>
<view class="fon28 mar-x25">{{itemt.title}}</view>
</view>
</view>
<!-- 员工功能 v-if="userInfo.is_staff && yuanList.length!=0" -->
<view v-if="userInfo.is_staff==1" class="bacf radius20 mar-s20 pad20">
<view class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon28 bold col3">员工功能</view>
<view class="disac yuan-box">
<view @tap="chooseYitem(indexy)" style="width: 33%;display: flex;justify-content: center;align-items: center;position: relative;" v-for="(itemy,indexy) in yuanList" :key="indexy">
<view class="disac fc">
<image :src="itemy.src" style="width: 54rpx;height: 54rpx;" mode="aspectFill"></image>
<view class="fon28 mar-s20 mar-x10">{{itemy.title}}</view>
</view>
<view v-if="indexy<(yuanList.length-1)" style="height: 58rpx;border: 2rpx solid #E6E6E6;position: absolute;right: 0;"></view>
<view class="mar-x30 fon28 bold col3">员工功能</view>
<view class="disja yuan-box">
<view @tap="chooseYitem(indexy)" v-for="(itemy,indexy) in yuanList" :key="indexy">
<view class="disac fc">
<image :src="itemy.src" mode="aspectFill"></image>
<view class="fon28 mar-s20 mar-x10">{{itemy.title}}</view>
</view>
<block v-if="indexy<yuanList.length-1">
<view class="xian-right"></view>
</block>
</view>
</view>
</view>
@ -72,16 +72,16 @@
<navigator url="/pagesA/myOrder/myOrder?index=0" hover-class="none">
<view class="disac">
<view class="fon24 col9">全部</view>
<image src="/static/public/nextM.png" style="width: 22rpx;height: 22rpx;" mode=""></image>
<image src="/static/public/nextM.png" class="white-next" mode=""></image>
</view>
</navigator>
</view>
<view class="disja fon28 col3">
<view @tap="chooseOrderStatus(indexo)" v-for="(itemo,indexo) in myOrderList" :key="indexo">
<view class="disac fc posir">
<image :src="itemo.src" style="width: 60rpx;height: 60rpx;" mode="aspectFill"></image>
<image :src="itemo.src" class="icon-img" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemo.title}}</view>
<view class="posia" style="width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;background: #F96969;right: 0;top: 0;font-size: 22rpx;color: #FFFFFF;text-align: center;">19</view>
<view class="posia red-num" style="right: 0;top: 0;" v-if="itemo.num!=0">{{itemo.num}}</view>
</view>
</view>
</view>
@ -89,11 +89,11 @@
<!-- 广告 -->
<image @tap="goPage" class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image>
<!-- 功能列表① -->
<view class="bacf radius20 mar-s20">
<view class="bacf radius20">
<view class="disjbac fon28 col3 fw">
<view @tap="goPageNew(indexm)" v-for="(itemm,indexm) in moneyList" :key="indexm" class="mar-s20 mar-x20" style="width: 25%;">
<view @tap="goPageNew(indexm)" v-for="(itemm,indexm) in moneyList" :key="indexm" class="mar-s20 mar-x20 width25">
<view class="disac fc">
<image :src="itemm.src" style="width: 60rpx;height: 60rpx;" mode="aspectFill"></image>
<image :src="itemm.src" class="icon-img" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemm.title}}</view>
</view>
</view>
@ -102,11 +102,11 @@
<!-- 功能列表② -->
<view class="bacf radius20 mar-s20">
<view class="disac fon28 col3 fw">
<view @tap="goPageTwo(indexf)" v-for="(itemf,indexf) in toolsList" :key="indexf" class="mar-s20 mar-x20" style="width: 25%;">
<view @tap="goPageTwo(indexf)" v-for="(itemf,indexf) in toolsList" :key="indexf" class="mar-s20 mar-x20 width25">
<view class="disac fc posir">
<image :src="itemf.src" style="width: 60rpx;height: 60rpx;" mode="aspectFill"></image>
<image :src="itemf.src" class="icon-img" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemf.title}}</view>
<view v-if="indexf==4" class="posia" style="width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;background: #F96969;right: 50rpx;top: 0;font-size: 22rpx;color: #FFFFFF;text-align: center;">19</view>
<view v-if="indexf==4 && itemf.num!=0" class="posia red-num">{{itemf.num}}</view>
</view>
</view>
</view>
@ -117,10 +117,10 @@
<view>
<view class="bacf radius20" style="margin: 0 130rpx;">
<view class="fon28 col3 tc pad-s40">我的二维码</view>
<image :src="myqr" style="width: 325rpx;height: 325rpx;margin: 30rpx 86rpx 68rpx 86rpx;" mode="aspectFill"></image>
<image :src="myqr" class="person-m" mode="aspectFill"></image>
</view>
<view class="disjcac">
<image @tap="isQrcode=false" class="mar-s50" src="/static/public/qrcodec.png" style="width: 96rpx;height: 96rpx;border-radius: 100%;" mode="aspectFill"></image>
<image @tap="isQrcode=false" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
</view>
</view>
</view>
@ -128,8 +128,8 @@
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
<!-- 弹框授权 -->
<empower :vision="vision" @cancleEv="cancleEv"></empower>
<view v-if="isQian" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);">
<view style="padding: 20rpx 40rpx;background-color: rgba(0,0,0,.6);color: #FFFFFF;border-radius: 6rpx;">签到成功</view>
<view v-if="isQian" class="sigin-box">
<view>签到成功</view>
</view>
</view>
</template>
@ -155,12 +155,14 @@
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
{src:'/static/public/scan.png',title:'扫码签到',rule:'scan'},
{src:'/static/public/customer-check.png',title:'客服查询',rule:'customer-list'},
{src:'/static/public/scan.png',title:'核销扫码',rule:'check-scan'},
],
myOrderList:[//
{src:'/static/public/dai-fu60.png',title:'待付款'},
{src:'/static/public/dai-fa60.png',title:'待发货'},
{src:'/static/public/dai-shou60.png',title:'待收货'},
{src:'/static/public/wan-60.png',title:'已完成'},
{src:'/static/public/dai-fu60.png',title:'待付款',num:0},
{src:'/static/public/dai-fa60.png',title:'待发货',num:0},
{src:'/static/public/dai-shou60.png',title:'待收货',num:0},
{src:'/static/public/wan-60.png',title:'已完成',num:0},
],
moneyList:[
{src:'/static/public/integral60.png',title:'积分商城'},
@ -261,6 +263,9 @@
this.checkGM()
},
methods: {
chooseone(index){
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
},
goPageNew(index){
if(index==0){uni.navigateTo({url:'/pagesA/pointsMall/pointsMall'})}
if(index==1){uni.navigateTo({url:'/pagesA/myAddress/myAddress'})}
@ -337,14 +342,18 @@
if(res.code==0 && res.data.length!=0) {
this.userInfo = res.data;
this.userInfo.mobile = this.$toolAll.tools.hideMPhone(this.userInfo.mobile);
this.tongList[1].num = res.data.score//
this.tongList[0].num = res.data.collects//
this.tongList[2].num = res.data.share_users.total//
this.toolsList[4].num = res.data.unread_messages//
this.is_worker = res.data.is_worker//0 1
this.is_doctor = res.data.is_doctor//01
this.is_servicer = res.data.is_servicer//01
this.is_staff = res.data.is_staff//01
this.tongList[0].num = res.data.score;//
this.tongList[1].num = res.data.coin;//
this.tongList[2].num = res.data.continuity_sign;//
this.toolsList[4].num = res.data.unread_messages;//
this.myOrderList[0].num = res.data.order_count.waiting;//
this.myOrderList[1].num = res.data.order_count.paid;//
this.myOrderList[2].num = res.data.order_count.shipped;//
this.myOrderList[3].num = res.data.order_count.completed;//
this.is_worker = res.data.is_worker;//0 1
this.is_doctor = res.data.is_doctor;//01
this.is_servicer = res.data.is_servicer;//01
this.is_staff = res.data.is_staff;//01
if(res.data.is_staff==1){
if(this.toolsList.length!=8){
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
@ -376,18 +385,17 @@
},
chooseYitem(index){//
// console.log('',this.yuanList[index].title);
switch (index){
case 0:
if(this.yuanList[index].title=='客户列表') {
uni.navigateTo({
url:'/pagesB/customerList/customerList'
})
break;
case 1:
}
if(this.yuanList[index].title=='用户足迹') {
uni.navigateTo({
url:'/pagesB/userFootprint/userFootprint'
})
break;
case 2:
}
if(this.yuanList[index].title=='扫码签到') {
wx.scanCode({ //
complete: (res) => {}, //
fail: (res) => {}, //
@ -406,24 +414,27 @@
},error=>{})
}
})
break;
}
},
choosesjf(index){//
// console.log('',this.tongList[index].title);
switch (index){
case 0:
uni.navigateTo({//
url:'/pagesB/myCollection/myCollection'
if(this.yuanList[index].title=='核销扫码') {
wx.scanCode({ //
complete: (res) => {}, //
fail: (res) => {}, //
onlyFromCamera: false, //,
scanType: ['qrCode'], // scanType :
success: (rt) => { //
let narr = rt.result.split(',');
this.$requst.post('order/check',{order_coding:narr[0],id:narr[1],check_user:this.userInfo.id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('核销成功...');
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
}
})
break;
case 1:
break;
case 2:
uni.navigateTo({//
url:'/pagesB/mysharer/mysharer'
}
if( this.yuanList[index].title=='客服查询') {
uni.navigateTo({
url:'/pagesB/customerCheck/customerCheck'
})
break;
}
},
goNodifyData(){//

View File

@ -80,7 +80,7 @@
<!-- <public-customer></public-customer> -->
<!-- 弹框优惠券 -->
<view class="" v-if="isQuan" style="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;">
<image src="../../../static/public/yquan.png" style="width: 542rpx;height: 600rpx;" mode="aspectFill"></image>
<image @tap="recerveEv" :src="quanImg" style="width: 542rpx;height: 600rpx;" mode="aspectFill"></image>
<image @tap="closeEv" src="../../../static/public/closequan.png" style="width: 96rpx;height: 96rpx;margin-top: 56rpx;" mode=""></image>
</view>
</view>
@ -132,7 +132,8 @@
bannerList:[],//
jieDuan:false,
isNewRenderDone:false ,//
isQuan:true
isQuan:uni.getStorageSync('isQuan'),
quanImg:uni.getStorageSync('quanImg'),
}
},
onPageScroll(e) {
@ -210,15 +211,46 @@
uni.setStorageSync('statusHNH',rect.height)
this.statusHNH = rect.height
}).exec()
this.checkBCate()
this.checkKey()
this.checkSwi()//
this.checkBCate();
this.checkKey();
this.checkSwi();//
// this.checkBanner()//
this.$toolAll.tools.buriedPointAll()//id
this.$toolAll.tools.buriedPointAll();//id
// this.checkQ();
setTimeout(()=>{
this.isQuan = uni.getStorageSync('isQuan');
this.quanImg= uni.getStorageSync('quanImg');
this.quanId = uni.getStorageSync('quanId');
},3000)
},
methods: {
checkQ(){//
this.$requst.post('user/home-coupon').then(res=>{
if(res.code==0){
if(res.data.has_coupon==1){
this.isQuan = true;
this.quanImg = this.$http + res.data.home_coupon.cover;
this.quanId = res.data.home_coupon.id;
}
}
})
},
recerveEv(){//
this.$requst.post('user/get-coupon',{coupon_id:uni.getStorageSync('quanId')}).then(res=>{
if(res.code==0){
this.isQuan = false;
this.$toolAll.tools.showToast('领取成功');
setTimeout(()=>{
uni.navigateTo({
url:'/pagesA/coupon/coupon'
})
},1000)
}
})
},
closeEv(){
this.isQuan = false;
uni.setStorageSync('isQuan',false);
},
checkSwi(){
checkBanner({position:'home-banner'}).then(res=>{

View File

@ -6,7 +6,7 @@
<view class="search-input-box bacf poszy shop-nav-box" :style="{top: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20">
<!-- 输入框 -->
<input class="width100 fon34 radius10" type="text" @confirm="searchEv" v-model="searchVal" placeholder="请输入商品名称"/>
<input @focus="focusEv" class="width100 fon34 radius10" type="text" @confirm="searchEv" v-model="searchVal" placeholder="请输入商品名称"/>
<!-- 搜索 -->
<view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" @tap="searchEv" :style="{background:publicColor}">搜索</view>
</view>
@ -39,7 +39,7 @@
</view>
<view v-if="isXiao" @tap="isXiao=false" class="moban"></view>
<!-- 数据列表 -->
<view :style="{marginTop:statusHNH+titleHeight+'px'}">
<view v-if="loading" :style="{marginTop:statusHNH+titleHeight+'px'}">
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}商品`"></nothing-page>
</view>
@ -50,7 +50,7 @@
<view class="cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
<view class="posia"><view>99</view></view>
<view class="posia" v-if="cartNum!=0"><view>{{cartNum}}</view></view>
</view>
</view>
</navigator>
@ -59,6 +59,7 @@
<script>
import shopList from '@/components/shop-list.vue';
import {cartNum} from '@/jsFile/publicAPI.js';
export default {
components:{
shopList
@ -84,10 +85,13 @@
doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:'',//ID
loading:false,
cartNum:0
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.cartNumEv();//
},
onLoad() {
this.titleList = uni.getStorageSync('footTitle')
@ -101,6 +105,13 @@
this.checkSX();
},
methods: {
cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
async checkSX(){//
this.$requst.get('spu/condition').then(res=>{
if(res.code==0){
@ -113,7 +124,6 @@
if(this.activeIndex==index && this.isXiao) {
this.isXiao = false;
} else this.isXiao = true;
this.shaiList = []
this.bingzList = [];
this.isClick = false;
this.activeIndex = index;
@ -169,59 +179,69 @@
let params = {
keyword:this.searchVal,//
page:1,
size:10,
size:2000,
doctor_role:this.doctor_role,// doctor= design=
doctor_name:this.doctor_name,//
activity:this.activity,// + normal=group_make=group_buy=;limit_time=
disease_id:this.disease_id//ID
}
this.$requst.post('spu/list',params).then(res=>{
if(res.code==0){
this.dataList = [];
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let tuan = false,ping = false,xian = false,integral = false;
if(item.activity_type=='group_make') ping = true;
if(item.activity_type=='group_buy') tuan = true;
if(item.activity_type=='limit_time') xian = true;
let group_cover = [];
if(item.activity_group_cover.length!=0) {
item.activity_group_cover.forEach(item=>{
group_cover.push(this.$http + item)
})
}
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
title: item.name,
zhePrice:item.price/100,
yuanPrice:item.original_price/100,
integral:'',
isTuan:tuan,
isPing:ping,
isXian:xian,
isIntegral:integral,
grade:'',
disease_name:item.disease_name,//
disease_id:item.disease_id,//ID
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num//
}
this.dataList.push(obj)
})
uni.request({
url:'https://hengmei.scdxtc.cn/api/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){
this.dataList = [];
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,//
disease_id:item.disease_id,//ID
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
this.dataList.push(obj)
})
this.loading = true;
}
}
}
})
},
chooseBing(index){//
this.bingzList[index].isActive = !this.bingzList[index].isActive;
let cun = this.shaiList.indexOf(this.bingzList[index].id);
if(cun==-1){
this.shaiList.push(this.bingzList[index].title);
}
this.searchVal = this.shaiList.join(',');
console.log(this.searchVal);
this.bingzList.forEach(item=>{
item.isActive = false;
})
this.bingzList[index].isActive = true;
this.shaiList[this.activeIndex] = this.bingzList[index].title;
console.log(this.shaiList);
},
chongz(){//
this.isClick = false;
@ -238,8 +258,16 @@
this.isClick = false;
}
},
focusEv(){
uni.navigateTo({
url:'/pagesB/shopSearch/shopSearch'
})
},
searchEv(){//
this.checkShopList();
// uni.navigateTo({
// url:'/pagesB/shopSearch/shopSearch'
// })
// this.checkShopList();
}
}
}

View File

@ -4,26 +4,38 @@
<status-nav :titleVal="'活动任务'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32 pad-x20">
<!-- 签到领积分 -->
<view class="bacf radius20 pad20 mar-s20">
<view v-for="(item,index) in activityList" :key="index" class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-01-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
<view class="fon28">签到领积分</view>
<image :src="item.imgSrc" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
<view class="fon28">{{item.title}}</view>
</view>
<view><span style="color: #3875F6;">0</span>/7</view>
<view><span style="color: #3875F6;">{{item.danc}}</span>/{{item.allc}}</view>
</view>
<view class="fon24" style="color: #808080;">
<view class="mar-s30">活动要求七天签到可领取7000个积分</view>
<view class="mar-s20">获得奖励10积分</view>
<view class="mar-s30">活动要求{{item.description}}</view>
<view class="mar-s20">获得奖励{{item.amount}} <span v-if="item.isIcon!=1"></span><span v-else></span></view>
<view class="mar-s20">会员暂无</view>
<view class="mar-s20">结束时间2021-09-10 10:30</view>
<view class="mar-s20">结束时间{{item.endTime}}</view>
</view>
<view class="disjcac">
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即签到</view>
<!-- 线下签到 -->
<view v-if="item.ntype=='offline_sign_in'">
<view @tap="btnEv(index)" class="mar-s30" :class="item.isStatus!=0?'activity-dai':'activity-mo'"><span>{{partakeVal}}</span></view>
</view>
<view v-if="item.ntype=='sign_in'" class="disja">
<view @tap="goTosigin" class="mar-s30" :class="item.isStatus!=0?'activity-dai':'activity-mo'" :style="{width:(item.danc==item.allc)?'260rpx':'546rpx'}">{{siginVal}}</view>
<view v-if="item.danc==item.allc" @tap="btnEv(index)" class="mar-s30 mar-z20" :class="item.isStatus!=0?'activity-dai':'activity-mo'" style="width: 260rpx;background: #f8bf2c;">{{partakeVal}}</view>
</view>
<view v-if="item.ntype!='offline_sign_in' && item.ntype!='sign_in'">
<view @tap="btnEv(index)" class="mar-s30" :class="item.isStatus!=0?'activity-dai':'activity-mo'" :style="{background:item.account_status==0?'#ccc':''}">
<span>{{['审核中...','立即完成','审核不通过','立即完成'][item.account_status]}}</span>
</view>
</view>
</view>
</view>
<!-- 分享孔雀币 -->
<view class="bacf radius20 pad20 mar-s20">
<!-- <view class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-02-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
@ -40,9 +52,9 @@
<view class="disjcac">
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即参与</view>
</view>
</view>
</view> -->
<!-- 分享领积分 -->
<view class="bacf radius20 pad20 mar-s20">
<!-- <view class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-03-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
@ -59,9 +71,9 @@
<view class="disjcac">
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即参与</view>
</view>
</view>
</view> -->
<!-- 分享至朋友圈 -->
<view class="bacf radius20 pad20 mar-s20">
<!-- <view class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-04-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
@ -78,24 +90,24 @@
<view class="disjcac">
<view @tap="isScreenshot=true" :style="{background:!isScreenshot?publicColor:'#CCCCCC'}" class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;">{{!isScreenshot?'立即参与':'审核中...'}}</view>
</view>
</view>
</view> -->
<!-- 上传截图弹框 -->
<view v-if="isScreenshot" @tap.stop="isScreenshot=false,upImg=''" class="posAll disjcac" style="padding: 0 85rpx;z-index: 3;">
<view class="bacf width100" @tap.stop="isScreenshot=true" style="padding: 0 33rpx;border-radius: 20rpx;">
<view class=" disjcac fc">
<view class="fon32 col3 mar-s30 mar-x40">截图上传</view>
<view v-if="upImg==''" @tap="chooseImg" class=" disjcac fc" style="width: 340rpx;height: 348rpx;background: #F0F0F0;border-radius: 10rpx;margin-bottom: 70rpx;">
<view v-if="upImg==''" @tap="chooseImg" class="task-add-box disjcac fc">
<view class="posir disjcac mar-s50">
<view class="posia" style="width: 100rpx;height: 6rpx;background: #B3B3B3;border-radius: 10rpx;transform: rotate(90deg);"></view>
<view class="posia" style="width: 100rpx;height: 6rpx;background: #B3B3B3;border-radius: 10rpx;"></view>
<view class="posia task-add" style="transform: rotate(90deg);"></view>
<view class="posia task-add"></view>
</view>
<view class="fon28 col9" style="margin-top: 120rpx;">点击上传截图</view>
</view>
<image v-else @tap="chooseImg" :src="upImg" style="width: 340rpx;height: 348rpx;border-radius: 10rpx;margin-bottom: 70rpx;" mode="aspectFill"></image>
<image v-else @tap="chooseImg" class="imgIng" :src="upImg" mode="aspectFill"></image>
</view>
<view class="disjbac mar-x20" style="text-align: center;">
<view @tap.stop="isScreenshot=false,upImg=''" style="width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;background: #E6E6E6;color: #FFFFFF;">取消</view>
<view @tap.stop="shareEv" style="width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;background: #3875F6;color: #FFFFFF;position: relative;">确定</view>
<view class="disjbac mar-x20 tc">
<view @tap.stop="isScreenshot=false,upImg=''" class="task-cancle-btn">取消</view>
<view @tap.stop="shareEv" class="task-confrim-btn">确定</view>
</view>
</view>
</view>
@ -110,24 +122,96 @@
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isScreenshot:false,
upImg:''
upImg:'',
chooseIndex:0,
activityList:[],//
isNum:0,
siginVal:'立即签到',
partakeVal:'立即完成'
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
},
onLoad() {
this.checkList();
},
methods: {
btnEv(index){
this.chooseIndex = index;
if(this.activityList[index].isIcon!=3 && this.activityList[index].account_status==1 || this.activityList[index].account_status==3) {
if(this.isNum==0) {
this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{
if(res.code==0){
this.isNum = 0;
} else {
setTimeout(()=>{
this.isNum = 0;
},2000)
this.$toolAll.tools.showToast(res.msg);
}
})
}
} else {
if(this.activityList[index].account_status==1 || this.activityList[index].account_status==3){
this.isScreenshot = true;
}
}
},
checkList(){//
this.$requst.post('task/task/task-list').then(res=>{
if(res.code==0){
this.activityList = [];
if(res.data.length!=0){
res.data.forEach(item=>{
let nIcon = 0;
let nimg = '/static/public/task-01-60.png';
if(item.icon==1) {
nimg = '/static/public/task-02-60.png';
nIcon = 1;
}
if(item.icon==2) {
nimg = '/static/public/task-03-60.png';
nIcon = 2;
}
if(item.icon==3) {
nimg = '/static/public/task-04-60.png';
nIcon = 3;
}
let obj = {
id:item.id,
imgSrc:nimg,//icon
title:item.title,//
danc:item.completed_quantity,//
allc:item.cycle,//
description:item.description,//
amount:item.reward_number,//
account_status:item.account_status,
member:'',//
isStatus:item.status,
endTime:item.end_at,//
isIcon:nIcon,// 0 1 2 3
ntype:item.type//
}
this.activityList.push(obj);
})
}
// account_status: 1 0 1 2 3
// completed_quantity: 0
// create_time: "2021-10-20 18:12:37"
// cycle: 1
// description: ""
// end_at: "2021-10-30"
// id: 4 id
// long_term: 0 0
// repeat: 0
// reward_number: 10
// reward_type: "coin"
// start_at: "2020-10-20"
// status: 1 1 0
// title: ""
// type: "share_screenshots" 'share','sign_in','offline_sign_in','share_screenshots' 线
}
})
},
@ -142,8 +226,29 @@
})
},
shareEv(){//
if(this.isNum==0) {
this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[this.chooseIndex].id,image:this.upImg}).then(res=>{
if(res.code==0){
this.isNum = 0;
this.isScreenshot = false;
this.upImg = '';
this.$toolAll.tools.showToast('截图已上传');
this.checkList();
} else {
setTimeout(()=>{
this.isNum = 0;
},2000)
this.$toolAll.tools.showToast(res.msg);
}
})
}
},
goTosigin(){
uni.navigateTo({
url:'/pagesA/signIn/signIn'
})
}
}
}
</script>

View File

@ -8,9 +8,9 @@
<!-- 列表 -->
<view :style="{paddingTop: (statusHNH+chuTop+15)+'px'}" class="pad-zy32">
<view class="pad-x30">
<view v-if="dataList.length!=0" class="mar-x20" v-for="(item,index) in dataList" :key="index">
<view v-if="dataList.length!=0" class="mar-x20 animated fadeInLeft" v-for="(item,index) in dataList" :key="index">
<view style="height: 200rpx;" class="disjbac posir">
<view class="posir disjcac fc" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
<view class="disjcac fc recerve-left" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
<image v-if="item.statusNum!=0 && item.statusNum!=2" class="posia quan-img" src="/static/public/quan-left-two.png" mode=""></image>
<image v-else class="posia quan-img" src="/static/public/quan-left.png" mode=""></image>
<view class="posir disjcac fc" style="z-index: 1;">
@ -74,7 +74,6 @@
// console.log('+',rect);
this.chuTop = rect.height;
}).exec()
this.zcList = this.dataList;
this.checkAllList(0);
},
methods: {
@ -87,23 +86,25 @@
this.$requst.post('user/get-coupon-list',params).then(res=>{
if(res.code==0){
this.dataList = [];
this.zcList = [];
if(res.data.length!=0){
res.data.forEach(item=>{
let leix = false;
if(item.type=='taste') leix = true;
let obj = {
id:item.id,
num:item.amount,
num:item.amount/100,
title:item.name,
cover:this.$http + item.cover,
manPrice:item.condition,
startTime:item.begin_at,
endTime:item.end_at,
manPrice:item.condition/100,
startTime:item.begin_at.slice(0,10),
endTime:item.end_at.slice(0,10),
isTiyan:leix,
isZhek:false,
statusNum:index
}
this.zcList = this.dataList.push(obj);
this.dataList.push(obj);//
this.zcList.push(obj);//
})
this.checkList(index);
}

View File

@ -15,10 +15,11 @@
<view class="bold">收件人信息</view>
<navigator url="/pagesA/myAddress/myAddress?isWhere=0" hover-class="none">
<view class="fon26 col3 disjbac pad-s50">
<view>
<view v-if="addressInfo!=''">
<view class="fon28 col3 bold mar-x20">{{addressInfo.name}} <span class="mar-z20">{{userPphone}}</span></view>
<view class="fon24 col9">{{addressInfo.province_str}}{{addressInfo.city_str}}{{addressInfo.county_str || ''}}{{addressInfo.address || ''}}</view>
</view>
<view v-else class="fon24 col9">请完善收件人信息</view>
<image src="/static/public/nextM.png" class="xiaDan-next" mode="aspectFill"></image>
</view>
</navigator>
@ -40,15 +41,11 @@
<view class="bacf radius20 mar-s20 pad-sx27-zy20">
<view class="bold">订单信息</view>
<view v-for="(item,index) in orderList" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<image :src="item.imgSrc" class="flexs order-image" mode="aspectFill"></image>
</navigator>
<image @tap="goShopDetail(item.id)" :src="item.imgSrc" class="flexs order-image" mode="aspectFill"></image>
<view class="width100 disjb fw" style="height: 166rpx;">
<view>
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<view class="fon28 col3 bold clips2">{{item.title}}</view>
</navigator>
<view class="order-sy">试用</view>
<view @tap="goShopDetail(item.id)" class="fon28 col3 bold clips2">{{item.title}}</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>
@ -57,6 +54,23 @@
</view>
</view>
</view>
<view class="fon28 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>
</view>
<!-- 选择支付方式 -->
<view class="bacf radius20 mar-s20 fon28 col3 pad-sx30 pad-zy20">
<view class="bold fon28">选择支付方式</view>
<view @tap="chooseFS(index)" v-for="(item,index) in payFS" :key="index" v-if="isCurrent!=index" class="disjbac mar-s30">
<view class="disac">
<image v-if="item.isActive" src="/static/public/chooseFS.png" class="chooseDX" mode=""></image>
<image v-else src="/static/public/cancle-FS.png" class="chooseDX" mode=""></image>
<view class="mar-z25">{{item.title}}</view>
</view>
<view v-if="item.num!=0">{{item.num}}</view>
</view>
</view>
<!-- 优惠 -->
<view v-if="isNei!=3" class="bacf radius20 mar-s20 pad-sx27-zy20">
@ -64,7 +78,7 @@
<view @tap="quanEv(1)" class="fon28 col3 disjbac mar-sx40">
<view>优惠券</view>
<view class="disac">
<view class="colf8 bold">-{{youQuan.youPrice}}.00</view>
<view class="colf8 bold">-{{youQuan.youPrice}}</view>
<image src="/static/public/nextM.png" class="xiaDan-next" mode="aspectFill"></image>
</view>
</view>
@ -80,10 +94,10 @@
</view>
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
<!-- 去支付 -->
<view class="fon40 colf8 bold" v-if="isNei!=3">{{allPrice}}</view>
<view class="fon40 colf8 bold dis" v-else><span class="col3 fon28">合计积分</span>{{allPrice}}<span v-if="isExpress">+ {{expressInfo.default_price}}</span></view>
<view class="fon36 colf8 bold" v-if="isNei!=3">{{allPrice}}<span v-if="isKq">+{{zf_kqPrice}}</span></view>
<view class="fon40 colf8 bold dis" v-else><span class="col3 fon28">合计积分</span>{{allPrice}}<span v-if="isExpress && expressInfo.default_price!=0">+ {{expressInfo.default_price}}</span></view>
<view @tap="goPayment" v-if="isNei!=3" class="goPayment"></view>
<view @tap="goPayment" v-else class="goPayment">去兑换</view>
<view @tap="isDui=true" v-else class="goPayment">去兑换</view>
</view>
</view>
<view v-if="showQuan" @tap.stop="showQuan=false" class="posAll">
@ -125,13 +139,25 @@
</view>
</view>
<!-- 确认兑换弹框 -->
<view v-if="isDui" @tap.stop="isDui=false" class="posAll" style="display: flex;justify-content: center;align-items: center;padding: 0 85rpx;">
<view v-if="isDui" @tap.stop="isDui=false" class="posAll zhun-dui-box">
<view class="bacf radius20 width100 tc fon28 col3 pad20" @tap.stop="isDui=true">
<view class="bold" style="margin: 0rpx 0 56rpx 0;">兑换商品</view>
<view style="margin: 0rpx 0 66rpx 0;">您确定使用7666积分兑换吗</view>
<view class="disjbac mar-x20 pad-zy20">
<view @tap.stop="isDui=false" style="width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;font-size: 28rpx;font-weight: 500;border-radius: 10rpx;background: #C8C8C8;color: #FFFFFF;">暂不兑换</view>
<view @tap.stop="isDui=false" style="width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;font-size: 28rpx;font-weight: 500;border-radius: 10rpx;background: #3875F6;color: #FFFFFF;">立即兑换</view>
<view style="margin: 0rpx 0 66rpx 0;">您确定使用{{allPrice}}积分兑换吗</view>
<view class="disjbac mar-x20 pad-zy20 zhun-dui-btn">
<view @tap.stop="isDui=false">暂不兑换</view>
<view @tap.stop="goPayment">立即兑换</view>
</view>
</view>
</view>
<!-- 支付成功 -->
<view v-if="isSuccess" class="posAll" :style="{top:statusHNH+'px'}" 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}}</span><span v-else>{{jsPrice}}</span></view>
<view class="disja success-btn">
<view @tap="goDetail"></view>
<view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view>
</view>
</view>
</view>
@ -161,30 +187,191 @@
zanAllPrice:0,//
isNei:0,
expressInfo:{},//
addressInfo:{},//
userPphone:'',
addressInfo:'',//
userPphone:'请完善信息',
zPhone:'',//
page:1,
size:10,
isFocus:false,
loading: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
}
},
onShow() {
this.$toolAll.tools.isLogin();
this.checkexpress();//
this.checkAddress();//
this.quanEv(0);//
this.checkChoose();//
uni.removeStorageSync('orderInfo');
setTimeout(()=>{
if(this.addressInfo==''){this.$toolAll.tools.showToast('请完善收件人信息','none',1500);}
},2000)
},
onLoad(options) {
this.checkeList();//
this.checkOrderDetail();//
this.isNei = options.isNei;
if(this.isNei==3) {
this.payFS[0].isActive = false;
this.payFS[2].isActive = true;
this.isCurrent = 1;
}
},
methods: {
checkChoose(){
if(uni.getStorageSync('chooseAddress')==''){
this.checkAddress();//
} else {
let naddress = uni.getStorageSync('chooseAddress');
this.addressInfo = {
id:naddress.id,
name:naddress.userName,
phone:naddress.userPhone,
province_str:naddress.province,
city_str:naddress.city,
county_str:naddress.county,
address:naddress.address
}
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;
}
}
}
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).toFixed(2);
this.zf_kqPrice = this.payFS[1].num;
}
return;
}
//+
if(this.payFS[0].isActive && !this.payFS[1].isActive) {
this.isKq = false;
if(this.youQuan.youPrice==0){
this.allPrice = this.$toolAll.tools.addXiaoShu(this.zanAllPrice).toFixed(2);
} else {
this.allPrice = this.$toolAll.tools.addXiaoShu(this.zanAllPrice-this.youQuan.youPrice).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;
} else {//
this.$toolAll.tools.showToast('孔雀币不足')
this.allPrice = this.$toolAll.tools.addXiaoShu(this.zanAllPrice - this.coin_price).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).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;//
@ -192,44 +379,121 @@
let self = 0;//
if(!this.isExpress) self = 1;//
let nsku_list = [];
let is_only = 0;
this.orderList.forEach(item=>{
let obj = {
sku_coding:item.coding,
num:item.num
num:item.num,
group_id:item.group_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,//
total: this.allPrice*100,//
address_id: this.addressInfo.id,//ID
express_code: this.expressInfo.code,//
coupon_id: this.youQuan.id,//ID
coupon_price: this.youQuan.youPrice,//
coupon_price: this.youQuan.youPrice*100,//
pick_self: self,//0 1
pick_self_phone: nphone,//
original_total: 0,//
freight: this.expressInfo.default_price,
remarks: ""//
original_total: this.zanAllPrice*100,//
freight: this.expressInfo.default_price,//
remarks: "",//
is_only:is_only,//0 2
is_score:is_score,//0 1
coin:this.zf_kqPrice//
}
if(nphone=='') {
if(this.addressInfo=='' && self!=1){
this.$toolAll.tools.showToast('请完善收件人信息');
} else if(nphone=='') {
this.$toolAll.tools.showToast('请填写收货人手机号');
this.focusEv();
} 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.$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 {
this.$requst.post('order/create',parmas).then(res=>{
if(res.code==0){
uni.setStorageSync('orderList',this.orderList);
uni.setStorageSync('orderInfo',res.data);
console.log(res.data);
uni.navigateTo({
url:`/pagesA/immediatePayment/immediatePayment?allPrice=${this.allPrice}&allNum=${this.allNum}`
})
if(this.times==0){
this.times++;
if(this.allPrice==0){
this.$toolAll.tools.showToast('正在支付','loading',1500);
} else {
this.$toolAll.tools.showToast(res.msg);
this.$toolAll.tools.showToast('正在调起支付','loading',1500);
}
uni.request({
url:'https://hengmei.scdxtc.cn/api/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);
this.times = 0;
}
}
})
}
}
},
payment(info){
if(info.needPay){
uni.requestPayment({
provider: 'wxpay',
appId:info.payment_params.appId,//appId
timeStamp: info.payment_params.timeStamp,//
nonceStr: info.payment_params.nonceStr,//
package: info.payment_params.package,//package
signType: info.payment_params.signType,//MD5
paySign: info.payment_params.sign,//
success:(res)=> {
this.$requst.post('order/paid',{order_coding:info.coding}).then(res=>{
if(res.code==0){
uni.removeStorageSync('chooseAddress')
this.isSuccess = true;
} else this.$toolAll.tools.showToast(res.msg);
})
},
fail() {
this.times = 0;
}
});
} else {
this.$requst.post('order/paid',{order_coding:info.coding}).then(res=>{
if(res.code==0){
uni.removeStorageSync('chooseAddress')
this.isSuccess = true;
} else this.$toolAll.tools.showToast(res.msg);
})
}
},
@ -238,8 +502,8 @@
type: 'wgs84', //wx.openLocationbug: iOS 6.3.30 type wgs84
success: function (res) {
wx.openLocation({//使
latitude: 22.5542080000,//-
longitude: 113.8878770000,//-
latitude: 30.67554,//-
longitude: 104.010642,//-
name: val,
address: val
})
@ -269,6 +533,7 @@
if(item.is_default==1){
this.expressInfo = item;
this.expressInfo.default_price = this.expressInfo.default_price/100;
this.quanEv(0);//
}
})
this.totalEv();
@ -289,13 +554,19 @@
this.checkexpress();
},
totalEv(){//
if(this.isNei!=3 && this.isExpress){
if(this.isNei!=3 && this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice + this.expressInfo.default_price;// = - - +
}
if(this.isNei!=3 && !this.isExpress){
if(this.isNei!=3 && !this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;// = - -
}
this.allPrice = this.$toolAll.tools.addXiaoShu(this.allPrice);
if(this.isNei ==3 && this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice + this.expressInfo.default_price;// = - - +
}
if(this.isNei ==3 && !this.isExpress){//
this.allPrice = this.zanAllPrice - this.youQuan.youPrice - this.delPrice;// = - -
}
this.loading = true;
},
checkOrderDetail(){//
@ -313,7 +584,9 @@
}
this.$requst.post('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);
})
},
@ -322,16 +595,21 @@
this.allPrice += item.price*item.num;
this.allNum += item.num;
})
this.zanAllPrice = this.allPrice;
this.zanAllPrice = this.$toolAll.tools.addXiaoShu(this.allPrice);
},
quanEv(index){//
if(index==1){
this.showQuan = true
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();//
}
this.youQuan.id = 0;
this.youQuan.youPrice = 0;
this.allPrice = this.zanAllPrice + this.expressInfo.default_price;
this.checkQuan();
},
checkQuan(){//
this.$requst.post('user/get-coupon-list',{status:'normal',page:this.page,size:this.size}).then(res=>{
@ -361,13 +639,25 @@
if(this.zanAllPrice <= this.quanList[index].manPrice){//
this.$toolAll.tools.showToast('未达到使用条件')
} else {
this.quanList.forEach(item=>{
item.isStatus = false;
});
this.quanList[index].isStatus = true;
this.showQuan = false;
this.youQuan = this.quanList[index];
this.allPrice = this.zanAllPrice - this.quanList[index].youPrice + this.expressInfo.default_price;// = -
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(){//
@ -381,8 +671,20 @@
},
blurEv(){//
this.isFocus = false;
},
goDetail(){//
uni.navigateTo({
url:'/pagesA/myOrder/myOrder'
})
},
goShop(){//
let nurl = '';
if(this.isNei==3) nurl = '/pagesA/pointsMall/pointsMall';
else nurl = '/pages/tabbar/shop/shop';
uni.reLaunch({
url:nurl
})
}
}
}
</script>

View File

@ -41,7 +41,8 @@
<view v-if="item.num!=0">{{item.num}}</view>
</view>
</view>
<view class="fon28 col3 dao-box">请在<span class="colf8 bold">23时25分36秒</span>完成支付</view>
<view v-if="isGuo" class="fon28 col3 dao-box"></view>
<view v-else class="fon28 col3 dao-box">请在<span class="colf8 bold">{{daoTime}}</span>完成支付</view>
<!-- 确认支付 -->
<view @tap="payment" class="submit-pay">确认支付</view>
</view>
@ -77,7 +78,9 @@
isKq:false,
jsPrice:0,//,
zc_allPrice:0,//
orderInfo:uni.getStorageSync('orderInfo')
orderInfo:uni.getStorageSync('orderInfo'),
daoTime:'',//
isGuo:false//
}
},
onShow() {
@ -90,44 +93,76 @@
this.zc_allPrice = this.zf_allPrice = options.allPrice;
this.zf_allPrice = this.$toolAll.tools.addXiaoShu(this.zf_allPrice);
this.zf_allNum = options.allNum;
let endTime = this.orderInfo.expired_at;
let endChuo = new Date(this.orderInfo.expired_at).getTime();
this.daoTime = this.$toolAll.tools.dayTime(endTime,options.startTime);
let timer = setInterval(()=>{
if(options.startTime - endChuo>=0){
this.isGuo = true;
clearInterval(timer);
} else {
options.startTime = options.startTime*1 + 1000;
this.daoTime = this.$toolAll.tools.dayTime(endTime,options.startTime)
}
},1000)
},
methods: {
chooseFS(index){
this.payFS[index].isActive = !this.payFS[index].isActive;
if(index==0){
if(this.payFS[0].isActive && this.payFS[1].isActive){//+
//+
if(this.payFS[0].isActive && this.payFS[1].isActive){
this.isKq = true;
return;
}
if(!this.payFS[0].isActive && this.payFS[1].isActive){//+
//+
if(!this.payFS[0].isActive && this.payFS[1].isActive){
this.$toolAll.tools.showToast('孔雀币不足');
return;
}
if(!this.payFS[0].isActive && !this.payFS[1].isActive){//+
//+
if(!this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式');
return;
}
//+
if(this.payFS[0].isActive && this.payFS[1].isActive){
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
}
if(index==1) {
if(this.payFS[0].isActive && this.payFS[1].isActive) {//+
//+
if(this.payFS[0].isActive && this.payFS[1].isActive) {
this.isKq = true;
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
if(this.payFS[0].isActive && !this.payFS[1].isActive) {//+
//+
if(this.payFS[0].isActive && !this.payFS[1].isActive) {
this.isKq = false;
this.zf_allPrice = this.zc_allPrice;
return;
}
if(!this.payFS[0].isActive && this.payFS[1].isActive && this.zc_allPrice*1 > this.zf_kqPrice*1){//++
//++
if(!this.payFS[0].isActive && this.payFS[1].isActive && this.zc_allPrice*1 > this.zf_kqPrice*1){
this.$toolAll.tools.showToast('孔雀币不足')
this.isKq = true;
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
if(!this.payFS[0].isActive && !this.payFS[1].isActive){//+
//++
if(!this.payFS[0].isActive && this.payFS[1].isActive && this.zc_allPrice*1 < this.zf_kqPrice*1){
this.isKq = true;
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
//+
if(!this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式')
this.isKq = false;
this.zf_allPrice = this.zc_allPrice;

View File

@ -5,21 +5,21 @@
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3">
<view class="mar-s20 bacf pad20 radius20 bold">
<view class="mar-x30">当前积分</view>
<view style="font-size: 56rpx;">3000</view>
<view style="font-size: 56rpx;">{{dangScore}}</view>
</view>
<view class="mar-s20 disjbac">
<view class="disjbac pad20 bacf radius20" style="width: 48%;box-sizing: border-box;">
<image src="../../static/public/integral-01-108.png" style="width: 108rpx;height: 108rpx;flex-shrink: 0;" mode=""></image>
<view class="width100" style="display: flex;justify-content: space-between;flex-direction: column;height: 108rpx;">
<view style="font-weight: 400;">我的分享人</view>
<view class="fon36 bold">100 <span style="font-size: 26rpx;font-weight: 400;"></span></view>
<view class="disjbac pad20 bacf radius20 width48" style="box-sizing: border-box;">
<image src="../../static/public/integral-01-108.png" class="score-img" mode=""></image>
<view class="width100 score-people-box">
<view class="font4">我的分享人</view>
<view class="fon36 bold">{{sharePeople}}<span class="fon26 font4"></span></view>
</view>
</view>
<view class="disjbac pad20 bacf radius20" style="width: 48%;box-sizing: border-box;">
<image src="../../static/public/integral-02-108.png" style="width: 108rpx;height: 108rpx;flex-shrink: 0;" mode=""></image>
<view class="disjbac fc width100"style="display: flex;justify-content: space-between;flex-direction: column;height: 108rpx;">
<view style="font-weight: 400;">签到记录</view>
<view style="width: 140rpx;height: 40rpx;line-height: 40rpx;text-align: center;color: #FFFFFF;background: #F6C338;border-radius: 30rpx;font-size: 24rpx;font-weight: 400;">立即签到</view>
<view class="disjbac pad20 bacf radius20" style="box-sizing: border-box;">
<image src="../../static/public/integral-02-108.png" class="score-img" mode=""></image>
<view class="width100 score-people-box">
<view class="font4">签到记录</view>
<view @tap="goSigin" class="score-sigin-btn">立即签到</view>
</view>
</view>
</view>
@ -30,20 +30,23 @@
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">消费列表</view>
</view>
<!-- 积分列表 -->
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
<block v-if="dataList.length!=0">
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
</view>
<view v-show="activeJF" class="fon36 bold pcol">+{{item.num}}</view>
<view v-show="!activeJF" class="fon36 bold">{{item.num}}</view>
</view>
<view v-show="activeJF" class="fon36 bold" style="color: #3875F6;">+{{item.num}}</view>
<view v-show="!activeJF" class="fon36 bold">-{{item.num}}</view>
</view>
</block>
<view v-if="isHave" class="disjcac fon24 col9 bold"></view>
</view>
<!-- 分享按钮 -->
<view class="disjcac" style="width: 588rpx;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 20rpx;background: #38CE51;position: fixed;bottom: 76rpx;left: 50%;transform: translateX(-50%);">
<image src="/static/public/bottom-shear.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
<view class="disjcac score-share-box">
<image src="/static/public/bottom-shear.png" mode=""></image>
<view class="fon40 colf bold mar-z10">分享给好友</view>
<button class="posia" open-type="share" style="top: 0;left: 0;right: 0;bottom: 0;opacity: 0;"></button>
<button class="posia-op" open-type="share"></button>
</view>
</view>
</view>
@ -57,32 +60,78 @@
publicColor:uni.getStorageSync('publicColor'),//
activeJF:true,
dataList:[
{title:'签到兑换',time:'2021.09.06 10:30:10',num:'1'},
{title:'分享注册',time:'2021.09.06 10:30:10',num:'1'},
{title:'二级分销',time:'2021.09.06 10:30:10',num:'1'},
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
]
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
],
dangScore:0,//
sharePeople:0,//
page:1,
size:10,
total:0,
isZanw:true,
ntype:'in',
isHave:false
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkList(this.ntype)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
},
onLoad() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.checkInfo();
this.checkList();
},
methods: {
switchState(flag){
checkList(){//
this.$requst.post('user/score-log',{page:this.page,size:this.size,type:this.ntype}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
title:item.name,
time:item.created_at,
num:item.num
}
this.dataList.push(obj);
})
}
if(this.dataList.length==0)this.isHave = true;
}
})
},
checkInfo(){//
this.$requst.post('user/score-load').then(res=>{
if(res.code==0){
this.dangScore = res.data.score;
this.sharePeople = res.data.share.total;
}
})
},
switchState(flag){//
this.dataList = [];
this.activeJF = flag;
this.page =1;
this.isZanw = true;
if(flag) {
this.dataList = [
{title:'签到兑换',time:'2021.09.06 10:30:10',num:'1'},
{title:'分享注册',time:'2021.09.06 10:30:10',num:'1'},
{title:'二级分销',time:'2021.09.06 10:30:10',num:'1'},
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
]
this.ntype ='in';
this.checkList(this.ntype);
} else {
this.dataList = [
{title:'兑换商品',time:'2021.09.06 10:30:10',num:'1'},
{title:'商品购买',time:'2021.09.06 10:30:10',num:'1'},
]
this.ntype ='out';
this.checkList(this.ntype);
}
},
goSigin(){
uni.navigateTo({url:'/pagesA/signIn/signIn'})
}
}
}

View File

@ -14,7 +14,7 @@
<!-- 昵称 -->
<view class="fon28 bold disac">昵称<view style="background: #FFFFFF;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFBD39;padding: 5rpx 16rpx;margin-left: 10rpx;">VIP</view></view>
<view class="mar-s10" style="color: #C27417;">黄金会员</view>
</view>
</view>
</view>
<view class="mar-s30 " style="color: #C27417;">当前等级</view>
</view>
@ -41,15 +41,15 @@
</view>
<view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view>
</view>
<shopList :dataList="dataList"></shopList>
<scoreList :dataList="dataList"></scoreList>
</view>
</template>
<script>
import shopList from '@/components/shop-list.vue';
import scoreList from '@/components/score-list.vue';
export default {
components:{
shopList
scoreList
},
data() {
return {
@ -63,87 +63,62 @@
{src:'/static/public/te-quan50.png',title:'特权日'},
{src:'/static/public/share-hai50.png',title:'分享海报'},
],
dataList:[
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:1,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:0,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:1,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:0,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:0,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:0,
}
]
dataList:[]
}
},
onLoad() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.checkList();
this.checkInfo();
},
methods: {
checkInfo(){
this.$requst.post('level/index').then(res=>{
if(res.code==0){
}
})
},
checkList(){//
let params = {
keyword:'',//
page:1,
size:10,
type:'normal',//type=normal newest=
sort_field:'',// score= num=
sort_value:''// asc= desc=
}
this.$requst.post('spu/score',params).then(res=>{
if(res.code==0){
this.dataList = [];
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
saleable:item.saleable,//
stock:item.stock,//
title: item.name,
zhePrice:item.price,
yuanPrice:item.original_price,
integral:item.score,
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:item.level_id,
published_at:item.published_at,//
amount:item.amount,//
level_text:item.level_text//
}
this.dataList.push(obj)
})
} else {
this.$toolAll.tools.showToast('暂无更多积分商品')
}
}
})
},
}
}
</script>

View File

@ -4,21 +4,21 @@
<status-nav :titleVal="'地址管理'" :statusTitle="true"></status-nav>
<view :style="{paddingTop:statusHNH+'px'}" class="mar-sx20 pad-zy32" style="padding-bottom: 150rpx;">
<view v-if="loading">
<view v-for="(item,index) in dataList" :key="index" class="bacf radius20 pad20 mar-x20">
<view @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="setMo(index)" class="disac">
<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>
<view class="disac" style="color: #808080;">
<view @tap="editAddress(index)"></view>
<view @tap="delAddress(index)" class="mar-y10 mar-z50">删除</view>
<view @tap.stop="editAddress(index)"></view>
<view @tap.stop="delAddress(index)" class="mar-y10 mar-z50">删除</view>
</view>
</view>
</view>
@ -40,7 +40,7 @@
</view>
<view class="fon26 col9 mar-s30">手机号码</view>
<view class="bbot mar-s30 pad-x10">
<input type="text" class="width100" v-model="userPhone" placeholder="请输入联系电话" />
<input type="num" maxlength="11" class="width100" v-model="userPhone" placeholder="请输入联系电话" />
</view>
<view class="fon26 col9 mar-s30">地址</view>
<view class="disjbac">
@ -109,7 +109,8 @@
cityArr:[],
countyArr:[],
isAddress:0,
isWhere:1
isWhere:1,
isMo:0
}
},
onShow() {
@ -120,8 +121,15 @@
this.isWhere = options.isWhere;
},
methods: {
goBack(index){//
if(this.isWhere==0) {
uni.setStorageSync('chooseAddress',this.dataList[index]);
uni.navigateBack({delta:1})
}
},
obtainLngLat(){//
this.idEdit = true;
this.isMo = 0;
this.clearAll();
//
wx.getLocation({
@ -223,13 +231,14 @@
city:item.city_str,
county:item.county_str,
address:item.address,
isActive:newActive
isActive:newActive,
is_default:item.is_default
}
this.dataList.push(obj);
})
this.loading = true;
this.checkActive();
}
this.loading = true;
}
})
},
@ -260,7 +269,7 @@
city_str:this.userCity,//
county_str:this.userCounty,//
address:this.userAddress,
is_default:1//
is_default:this.isMo//
}
this.$requst.post('user/address-save',params).then(res=>{
if(res.code==0){
@ -298,10 +307,8 @@
item.isActive = false;
});
this.dataList[index].isActive = true;
this.dataList[index].is_default = 1;
this.checkActive();
if(this.isWhere==0) {
uni.navigateBack({delta:1})
}
}
})
},
@ -314,6 +321,7 @@
this.userCity = this.dataList[index].city;
this.userCounty = this.dataList[index].county;
this.userAddress = this.dataList[index].address;
this.isMo = this.dataList[index].is_default
},
delAddress(index){//
this.delNum++

View File

@ -3,52 +3,63 @@
<!-- 状态栏 -->
<status-nav :titleVal="'订单管理'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<view class="isTopf bacf" :style="{top:statusHNH+'px'}">
<view class="isTopf bacf pad-zy30" :style="{top:statusHNH+'px'}">
<scroll-view scroll-x>
<view id="daoh" class="disjbac pad-s20 mar-zy30">
<view id="daoh" class="disjbac pad-s20">
<view @tap="chooseNav(indexn)" class="posir pad-s20 pad-zy20 pad-x30 flexs mar-y10" style="text-align: center;" :class="activeIndex==indexn?'activeD':''" :style="{color:activeIndex==indexn?'#3875F6':'#000000'}" v-for="(itemn,indexn) in statusList" :key="indexn">{{itemn}}</view>
</view>
</scroll-view>
</view>
<view :style="{paddingTop:(statusHNH+12+chuTop)+'px'}" class="pad-sx20 pad-zy32">
<view v-for="(item,index) in orderList" :key="index" class="radius20 bacf pad20 mar-x20 order-item-box">
<view class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view><view class="fon24 col9">{{item.establish}}</view></view>
<view class="disjbac fon24"><view class="col3">订单号{{item.orderNum}}</view><view class="bold" :class="(item.orderStatus==1 || item.orderStatus==2 || item.orderStatus==3) ? 'colf8':'col9'">{{['','待付款','待发货','待核验','待收货','交易完成'][item.orderStatus]}}</view></view>
<view v-if="orderList.length!=0" v-for="(item,index) in orderList" :key="index" class="radius20 bacf pad20 mar-x20 order-item-box">
<view @tap="goDetail(item.id)" class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view><view class="fon24 col9">{{item.establish}}</view></view>
<view @tap="goDetail(item.id)" class="disjbac fon24">
<view class="col3">订单号{{item.orderNum}}</view>
<view v-if="item.virtual_check==0" class="bold" :class="(item.orderStatus==1 || item.orderStatus==2 || item.orderStatus==3) ? 'colf8':'col9'">{{['','','','','',''][item.orderStatus]}}</view>
<view v-if="item.virtual_check==1" class="bold col9"></view>
</view>
<view v-for="(itemc,indexc) in item.childrenList" :key="indexc" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<image :src="itemc.imgSrc" class="flexs" mode="aspectFill"></image>
</navigator>
<view class="width100 disjb fc" style="height: 166rpx;">
<image @tap="goDetail(item.id)" :src="itemc.imgSrc" class="flexs" mode="aspectFill"></image>
<view @tap="goDetail(item.id)" class="width100 disjb fc" style="height: 166rpx;">
<view>
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<view class="fon28 col3 bold clips2">{{itemc.title}}</view>
</navigator>
<view class="order-sy">试用</view>
<view class="fon28 col3 bold clips2">{{itemc.title}}</view>
<view class="order-sy">{{itemc.sku_name}}</view>
</view>
<view class="disjbac mar-s10">
<view class="colf8 fon32 bold"><span v-if="item.isShop==0"></span>{{itemc.price}}</view>
<view class="fon28 col6 mar-y40">x{{itemc.num}}</view>
<view class="colf8 fon32 bold"><span v-if="item.isShop==0"></span><span v-else></span>{{itemc.price}}<span class="fon28 col6 mar-z20 font4">x{{itemc.num}}</span></view>
<view @tap.stop="make(index,indexc)" v-if="item.orderStatus == 3 && item.virtual_check==0" class="order-btn">线</view>
</view>
</view>
</view>
<view class="fon28 col3 pad-s20 disjbac">
<view class="flexs"><span v-if="item.isShop==0">{{item.total}}.00</span><span v-else>{{item.total}}</span></view>
<!-- <view class="fon28 col3 pad-s20 disjbac">
<view class="flexs"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> +<span v-if="item.coin!=0">{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
<view class="width100 disac" style="justify-content: flex-end;">
<view @tap="isCancle=true" v-if="item.orderStatus != 0 && item.orderStatus != 5" class="order-cancle"></view>
<view v-if="item.orderStatus == 1" class="order-btn"></view>
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5" class="order-cancle"></view>
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view>
<view @tap="isHeyan=true" v-if="item.orderStatus == 3" class="order-btn">线</view>
<!-- <view class="order-btn">单人拼团</view> -->
<view class="order-btn">单人拼团</view>
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn"></view>
</view>
</view> -->
<view class="fon28 col3">
<view class="mar-sx20 disje"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> <span v-if="item.coin!=0">+{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
<view class="width100 disje">
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0" class="order-cancle"></view>
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view>
<view class="order-btn" v-if="item.is_only==1"></view>
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn"></view>
</view>
</view>
</view>
<nothing-page v-if="orderList.length==0" :content="`暂无更多订单列表`"></nothing-page>
</view>
<!-- 待核验弹框 -->
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
<view class="fon28 col3">订单二维码</view>
<view class="mar-sx30">
<image src="/static/public/member-head.png" style="width: 325rpx;height: 325rpx;" mode=""></image>
<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>
@ -63,10 +74,10 @@
<view>
<view class="bbot pad-sx20 posir">
<view class="fon28 bold col3 width100" style="text-align: center;">取消订单</view>
<image class="posia" @tap.stop="isCancle=false" src="/static/public/cha-close.png" style="width: 40rpx;height: 40rpx;right: 50rpx;top: 20rpx;" mode="aspectFill"></image>
<image class="posia order-close-btn" @tap.stop="isCancle=false" src="/static/public/cha-close.png" mode="aspectFill"></image>
</view>
<view class="pad-zy32 pad-sx20" style="color: #5B5B5B;">
<view class="fon24" style="line-height: 40rpx;">
<view class="pad-zy32 pad-sx20 col5b">
<view class="fon24 linh40">
<view>温馨提示</view>
<view>订单取消需要提交工作人员审核商品金额将原路径返还账户订单一旦取消系统无法恢复</view>
</view>
@ -85,7 +96,11 @@
</template>
<script>
import yzQr from '@/components/yz-qr/yz-qr.vue';
export default {
components:{
yzQr
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
@ -101,72 +116,36 @@
],
isHeyan:false,//线
isCancle:false,//
orderList:[
{
id:1,
establish:'2021-09-06 20:30',//
orderNum:'1234567890',//
childrenList:[
{imgSrc:'/static/public/member-head.png',title:'【99募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
],
orderStatus:5,//1 2 3 4 5
isShop:0,//0 ,1
total: 15552//
},
{
id:2,
establish:'2021-09-06 20:30',//
orderNum:'1234567890',//
childrenList:[
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
],
orderStatus:3,//1 2 3 4 5
isShop:0,//0 ,1
total: 15552//
},
{
id:3,
establish:'2021-09-06 20:30',//
orderNum:'1234567890',//
childrenList:[
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
],
orderStatus:4,//1 2 3 4 5
isShop:0,//0 ,1
total: 15552//
},
{
id:4,
establish:'2021-09-06 20:30',//
orderNum:'1234567890',//
childrenList:[
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】100美人',price:3888,num:2},
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
],
orderStatus:1,//1 2 3 4 5
isShop:0,//0 ,1
total: 15552//
},
{
id:5,
establish:'2021-09-06 20:30',//
orderNum:'1234567890',//
childrenList:[
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
{imgSrc:'/static/public/member-head.png',title:'【99皮皮节】【种植发际线】1000单位FUE技术案例招募门美人1000单位FUE技术案例招募门美人',price:3888,num:2},
],
orderStatus:2,//1 2 3 4 5
isShop:1,//0 ,1
total: 15552//
}
],
orderList:[],
zanList:[],//
page:1,
size:10,
total:'',//
isZanw:true,
tag:'',// waiting= paid= shipped= completed= check=
current:0,//
remarks:'',//
times:0,//
canvasQrPath: '',
text: 'hello',
size: 162,
colorDark: '#000000',
colorLight: '#ffffff'
}
},
onReachBottom() {
if(this.total!=this.orderList.length){
this.page++
this.checkList(this.activeIndex)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.checkZT(this.activeIndex);
this.checkList(this.activeIndex);
},
onLoad(options) {
const query = wx.createSelectorQuery()
@ -175,41 +154,171 @@
this.chuTop = rect.height
}).exec()
options.index==undefined ? this.activeIndex = 0 : this.activeIndex = options.index;
this.zanList = this.orderList;
this.checkList(this.activeIndex);
},
methods: {
make(index,index2){
this.isHeyan = true;
this.text = `${this.orderList[index].orderNum},${this.orderList[index].childrenList[index2].id}`;
console.log(this.text);
// var that = this;
// setTimeout(function() {
// that.canvasQrPath = that.$refs.qrPath.canvasQrPath;
// console.log(':', that.canvasQrPath)
// }, 1000)
},
checkZT(index){
if(index==0){this.tag=""}
if(index==1){this.tag="waiting"}
if(index==2){this.tag="paid"}
if(index==3){this.tag="check"}
if(index==4){this.tag="shipped"}
if(index==5){this.tag="completed"}
},
chooseNav(index){
this.page =1;
this.activeIndex = index;
this.checkList(index)
this.checkZT(index);
this.checkList(index);
},
checkList(index){//
if(index==0) {
this.orderList = this.zanList;
} else {
this.orderList = this.zanList.filter(item=>{
return item.orderStatus==index;
});
}
this.$requst.post('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.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" && item.has_virtual==0) {
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,
}
nchildren.push(objs);
})
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,//
virtual_check:item.virtual_check
}
this.orderList.push(obj);
})
this.zanList = this.orderList;
if(index==0) {
this.orderList = this.zanList;
} 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);
})
}
});
}
})
},
hexiaoEv(){//
this.$requst.post('order/check').then(res=>{
if(res.code==0){
}
})
},
transferFrame(index){//
this.isCancle = true;
this.current = index;
this.reasonList.forEach(item=>{
item.isActive = false;
})
this.reasonList[0].isActive = true;
},
chooseReason(index){//
this.reasonList.forEach(item=>item.isActive = false);
this.reasonList[index].isActive = true;
this.remarks = this.reasonList[index].title;
},
confirmEv(){//
this.isCancle = false;
let con = '';
this.reasonList.forEach(item=>{
if(item.isActive) con = item.title;
})
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=>{
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;
} else this.$toolAll.tools.showToast(res.msg);
})
}
},
confirmReceipt(id){//
console.log(id);
this.$requst.post('order/accepted',{order_id:id}).then(res=>{
if(res.code==0){
} else this.$toolAll.tools.showToast(res.msg);
})
},
goDetail(id){//
uni.navigateTo({
url:`/pagesB/orderDetail/orderDetail?id=${id}`
})
}
}
}

View File

@ -2,21 +2,21 @@
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'孔雀币管理'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3">
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3 pad-x180">
<view class="mar-s20 bacf pad20 radius20">
<view class="mar-x30">当前孔雀币</view>
<view class="disjbac">
<view class="disjcac fc width33" style="align-items: flex-start;">
<view class="fon36 bold mar-z20">3000</view>
<view class="mar-s36" @tap="isTiX=true" style="width: 152rpx;height: 60rpx;line-height: 60rpx;text-align: center;color: #FFFFFF;background: #3875F6;border-radius: 30rpx;font-size: 26rpx;"></view>
<view class="fon36 bold mar-z20">{{dangKQ}}</view>
<view class="mar-s36 coin-tx-btn" @tap="isTiX=true"></view>
</view>
<view class="disjcac fc width33">
<view class="fon36 bold">300 <span style="font-size: 26rpx;font-weight: 400;"></span></view>
<view class="mar-s36 fon26 col3" style="height: 60rpx;line-height: 60rpx;">审核中</view>
<view class="fon36 bold">{{shenHZ}}<span class="coin-yuan"></span></view>
<view class="mar-s36 fon26 col3 coin-miao">审核中</view>
</view>
<view class="disjcac fc width33">
<view class="fon36 bold">0 <span style="font-size: 26rpx;font-weight: 400;"></span></view>
<view class="mar-s36 fon26 col3" style="height: 60rpx;line-height: 60rpx;">已提现</view>
<view class="fon36 bold">{{yiTKQ}}<span class="coin-yuan"></span></view>
<view class="mar-s36 fon26 col3 coin-miao">已提现</view>
</view>
</view>
</view>
@ -24,32 +24,32 @@
<view class="mar-s20 bacf pad20 radius20">
<view class="mar-x50 fon28 disja">
<view @tap="switchState(true)" :class="activeJF?'col3 bold':'col9'">获取列表</view>
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">提现列表</view>
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">支出列表</view>
</view>
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
</view>
<view v-show="activeJF" class="fon36 bold" style="color: #3875F6;">+{{item.num}}</view>
<view v-show="!activeJF" class="fon36 bold">-{{item.num}}</view>
<view v-show="activeJF" class="fon36 bold pcol">+{{item.num}}</view>
<view v-show="!activeJF" class="fon36 bold">{{item.num}}</view>
</view>
</view>
<!-- 分享按钮 -->
<view class="disjcac" style="width: 588rpx;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 20rpx;background: #38CE51;position: fixed;bottom: 76rpx;left: 50%;transform: translateX(-50%);">
<image src="/static/public/bottom-shear.png" style="width: 50rpx;height: 50rpx;" mode=""></image>
<view class="disjcac coin-share-box">
<image src="/static/public/bottom-shear.png" mode=""></image>
<view class="fon40 colf bold mar-z10">分享给好友</view>
<button class="posia" open-type="share" style="top: 0;left: 0;right: 0;bottom: 0;opacity: 0;"></button>
<button class="posia-op" open-type="share"></button>
</view>
<!-- 提现弹框 -->
<view v-if="isTiX" @tap="isTiX=false" class="disjcac tc" style="position: fixed;top: 0;left: 0;bottom: 0;right: 0;background: rgba(0,0,0,.54);">
<view class="bacf width100 radius20 pad30" style="margin: 0 85rpx;" @tap.stop="isTiX=true">
<view class="fon28 bold" style="color: #343434;">孔雀币提现</view>
<view class="fon28 mar-sx30" style="color: #343434;font-weight: 500;">兑换比例100孔雀币兑换1元人民币</view>
<input type="text" value="" placeholder="请输入提现金额" class="width100 radius10" style="border: 2rpx solid #E0E0E0;margin-bottom: 80rpx;height: 60rpx;"/>
<view v-if="isTiX" @tap="isTiX=false" class="disjcac tc tx-tk-box">
<view class="bacf width100 radius20 pad30 mar-zy85" @tap.stop="isTiX=true">
<view class="fon28 bold col34">孔雀币提现</view>
<view class="fon28 mar-sx30 col34 font5">兑换比例{{kqbl}}孔雀币兑换{{whatPrice}}元人民币</view>
<input type="number" v-model="kNum" placeholder="请输入孔雀币" class="width100 radius10"/>
<view class="disjbac">
<view @tap.stop="isTiX=false" style="width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;border-radius: 10rpx;font-size: 28rpx;color: #FFFFFF;background-color: #3875F6;">立即提现</view>
<view @tap.stop="isTiX=false" style="width: 196rpx;height: 60rpx;line-height: 60rpx;text-align: center;border-radius: 10rpx;font-size: 28rpx;color: #FFFFFF;background-color: #C8C8C8;">暂不提现</view>
<view @tap.stop="confrimT" class="tk-btn pbackc">立即提现</view>
<view @tap.stop="isTiX=false" class="tk-btn">暂不提现</view>
</view>
</view>
</view>
@ -64,40 +64,112 @@
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
activeJF:true,
kNum:'',//
dataList:[
{title:'积分兑换',time:'2021.09.06 10:30:10',num:'1'},
{title:'分享订单',time:'2021.09.06 10:30:10',num:'1'},
{title:'订单分享',time:'2021.09.06 10:30:10',num:'1'},
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
],
isTiX:true
isTiX:false,
dangKQ:3000,//
shenHZ:300 ,//
yiTKQ:0 ,//
kqbl:0,//
whatPrice:0,//
ntype:'in',//coin: withdrawal
times:0,//
page:1,
size:10,
total:'',//
isZanw:true,
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkList(this.ntype)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
},
onLoad() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.checkInfo();
this.checkList(this.ntype);
},
methods: {
switchState(flag){
this.activeJF = flag;
if(flag) {
this.dataList = [
{title:'积分兑换',time:'2021.09.06 10:30:10',num:'1'},
{title:'分享订单',time:'2021.09.06 10:30:10',num:'1'},
{title:'订单分享',time:'2021.09.06 10:30:10',num:'1'},
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
]
confrimT(){//
if(this.kNum=='' || this.kNum<=0){
this.$toolAll.tools.showToast('请输入孔雀币数量');
} else if(this.kNum>this.dangKQ){
this.$toolAll.tools.showToast('请输入正确的孔雀币数量');
} else {
this.dataList = [
{title:'孔雀币提现',time:'2021.09.06 10:30:10',num:'1'},
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
{title:'分享订单',time:'2021.09.06 10:30:10',num:'1'},
{title:'任务完成',time:'2021.09.06 10:30:10',num:'1'},
]
if(this.times==0){
this.times++;
this.$requst.post('user/withdrawal-coin',{coin:this.kNum}).then(res=>{
if(res.code==0){
this.isTiX = false;
this.$toolAll.tools.showToast('提现已提交审核');
setTimeout(()=>{
this.dataList = [];
this.page =1;
this.isZanw = true;
this.ntype = 'out';
this.checkInfo();//
this.checkList(this.ntype);//
this.activeJF = false;
this.times = 0;//
this.kNum = '';//
},1500)
} else this.$toolAll.tools.showToast(res.msg);
})
}
}
}
},
checkList(ntype){//
this.$requst.post('user/coin-log',{type:ntype,page:this.page,size:this.size}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
title:item.name,
time:item.created_at,
num:item.num
}
this.dataList.push(obj);
})
}
}
})
},
checkInfo(){//
this.$requst.post('user/coin-load').then(res=>{
if(res.code==0){
this.dangKQ = res.data.coin;//
this.shenHZ = res.data.withdrawal_ing;//
this.yiTKQ = res.data.withdrawald;//
this.kqbl = res.data.withdrawal_proportion.coin;//
this.whatPrice = res.data.withdrawal_proportion.money;//
}
})
},
switchState(flag){//
this.dataList = [];
this.activeJF = flag;
this.page =1;
this.isZanw = true;
if(flag) {
this.ntype ='in';
this.checkList(this.ntype);
} else {
this.ntype ='out';
this.checkList(this.ntype);
}
},
}
}
</script>
<style>
</style>
</script>

View File

@ -23,7 +23,7 @@
</view>
<!-- 数据列表 -->
<view :style="{marginTop:statusHNH+titleHeight+'px'}">
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
<score-list id="myComponent" :dataList="dataList" v-if="dataList.length!=0"></score-list>
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}积分商品`"></nothing-page>
</view>
<!-- 底部tab -->
@ -33,7 +33,7 @@
<view class="cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
<view class="posia"><view>99</view></view>
<view class="posia" v-if="cartNum!=0"><view>{{cartNum}}</view></view>
</view>
</view>
</navigator>
@ -41,10 +41,10 @@
</template>
<script>
import shopList from '@/components/shop-list.vue';
import scoreList from '@/components/score-list.vue';
export default {
components:{
shopList
scoreList
},
data() {
return {
@ -60,11 +60,13 @@
type:'normal',//type=normal newest=
sort_field:'',// score= num=
sort_value:'asc',// asc= desc=
cishu:0
cishu:0,
cartNum:0
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.cartNumEv();
},
onLoad() {
this.titleList = uni.getStorageSync('footTitle')
@ -78,6 +80,13 @@
this.checkList();
},
methods: {
cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'score'}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
checkList(){//
let params = {
keyword:this.searchVal,//
@ -157,7 +166,7 @@
<style>
page{background: #F5F5F5;}
.activecate,.shopMo{border-radius: 20rpx;text-align: center;background-color: #f2f2f2;color: #333333;padding: 16rpx 25rpx;}
.activecate,.shopMo{border-radius: 20rpx;text-align: center;background-color: #f2f2f2;color: #333333;padding: 16rpx 25rpx;width: 100rpx;}
.activecate{color: #FFFFFF;}
.activecate image{
-webkit-filter: invert(1); /* Chrome, Safari, Opera */

View File

@ -2,14 +2,14 @@
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'购物车'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 pad-x160">
<view class="bacf radius20 mar-s20 pad20" v-if="cartList.length!=0">
<view class="fon28 col3 disjbac" style="height: 43rpx;">
<view class="bold">订单信息</view>
<view v-if="!cancle_del && cartList.length!=0" @tap="guanEv(0)"></view>
<view v-if="cancle_del && cartList.length!=0" @tap="guanEv(1)" class="edit-btn"> ×</view>
</view>
<view v-for="(item,index) in cartList" :key="index" class="disjbac pad-sx40 bbot posir cart-list-box" @touchstart="moveStart(index,$event)" @touchend="moveEnd">
<view v-for="(item,index) in cartList" :key="index" class="disjbac pad-sx40 borbot posir cart-list-box" @touchstart="moveStart(index,$event)" @touchend="moveEnd">
<view class="disjbac width100" :style="{marginLeft:(showDel && isDang==index)?'-70px':'',paddingRight:(showDel && isDang==index)?'70px':''}">
<!-- -->
<view @tap="chooseItem(index)">
@ -19,10 +19,8 @@
<image @tap="chooseItem(index)" :src="item.imgSrc" class="order-image mar-z25 flexs" mode="aspectFill"></image>
<view class="width100 disjbac fc" style="height: 166rpx;">
<view class="width100">
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<view class="fon28 col3 bold clips2">{{item.title}}</view>
</navigator>
<view class="order-sy">试用</view>
<view @tap="goShoptDetail(item.spu_id,item.spu_activity_id)" class="fon28 col3 bold clips2">{{item.title}}</view>
<view class="order-sy">{{item.sku_name}}</view>
</view>
<view class="disjbac width100 mar-s10">
<view class="order-item-price"><span v-if="item.is_score!=1"></span><span v-else></span>{{item.price}}</view>
@ -48,10 +46,10 @@
<!-- 去支付 -->
<view v-if="!cancle_del" class="disjbac">
<view>
<view class="fon28" v-if="isScore!='score'"><span class="fon40 bold colf8">{{allPrice}}.00</span></view>
<view class="fon28" v-if="isScore!='score'"><span class="fon40 bold colf8">{{allPrice}}</span></view>
<view class="fon28" v-else><span class="fon40 bold colf8">{{allPrice}}</span></view>
</view>
<view @tap="goGetReadyDan" class="colf fon28 bold mar-z10 goBuy-btn" style="background: #3875F6;">{{cartList.length==0?'去购物':'去支付'}}</view>
<view @tap="goGetReadyDan" class="colf fon30 bold mar-z10 goBuy-btn" style="background: #3875F6;">{{cartList.length==0?'去购物':'去支付'}}</view>
</view>
<!-- 删除 -->
<view @tap="delBtn" v-else class="colf fon28 bold goBuy-btn" style="background: #F85050;">删除</view>
@ -104,16 +102,20 @@
if(res.data.length!=0){
res.data.forEach(item=>{
let nprice = '';
item.is_score ==1 ? nprice = item.score : nprice = item.sku.sku_price;
item.is_score ==1 ? nprice = item.score : nprice = item.sku.sku_price/100;
let obj = {
id:item.id,
spu_id:item.spu.id,
spu_activity_id:item.spu_activity_id,//id
imgSrc:this.$http + item.spu.spu_cover,
coding:item.sku.coding,
title:item.sku.sku_name,
title:item.spu_name,
sku_name:item.sku.sku_name,
price:nprice,//
num:item.num,
isActive:false,
is_score:item.is_score
is_score:item.is_score,//
group_id:0//0 1 2
}
this.cartList.push(obj)
})
@ -211,14 +213,32 @@
} else {
newUrl = '/pages/tabbar/shop/shop';
}
uni.navigateTo({
url:newUrl
})
}
if(this.cartList.length > 0) {
uni.setStorageSync('orderList',this.newList);
newUrl = `/pagesA/getReadyDan/getReadyDan?isNei=${isNei}`;
if(this.newList.length==0){
this.$toolAll.tools.showToast('请选择要支付的商品');
} else {
uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan?isNei=${isNei}`
})
}
}
uni.navigateTo({
url:newUrl
})
},
goShoptDetail(id,is_activity){
// &isIntegral=${this.dataList[index].isIntegral}
if(this.isScore=='score'){
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=true`
})
} else {
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&is_activity=${is_activity}`
})
}
}
}
}

View File

@ -2,21 +2,23 @@
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'签到管理'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class=" fon28 col3">
<view v-if="loading" :style="{paddingTop: statusHNH+'px'}" class=" fon28 col3">
<view class="posir">
<image class="posia width100" src="/static/public/sign-01.png" mode="widthFix"></image>
<view class="posir tc pad-sx20" style="z-index: 5;">
<image src="/static/public/sign-02.png" mode="" style="width: 218rpx;height: 202rpx;margin: 0 auto;"></image>
<view class="fon20 colf mar-s20">在连续签到6天就可以获得额外300积分哦~加油吧</view>
<image v-if="isSigin==0" @tap="siginEv" src="/static/public/sign-02.png" mode="" class="sigin-img"></image>
<image v-else src="/static/public/sigined.png" mode="" class="sigin-img"></image>
<view class="fon20 colf mar-s20">在连续签到可获得积分</view>
<view class="disjcac mar-sx30">
<image src="/static/public/sign-03.png" style="width: 31rpx;height: 30rpx;margin-top: 20rpx;" mode=""></image>
<view class="bold colf mar-z10" style="font-size: 56rpx;">1000</view>
<image src="/static/public/sign-03.png" class="sigin-success" mode=""></image>
<view class="bold colf mar-z10 fon56">{{user_score}}</view>
</view>
<view class="disjb pad-zy30">
<view v-for="(item,index) in timeList" :key="index" class="disjcac fc">
<view class="disjcac fon24 posir" :style="{color:item.isSign?'#789CFB':'#FFFFFF',background:item.isSign?'#FFFFFF':''}" style="width: 66rpx;height: 66rpx;border-radius: 100%;border: 2rpx solid #FFFFFF;">
<view class="disjcac fon24 posir sigin-day" :style="{color:item.isSign?'#789CFB':'#FFFFFF',background:item.isSign?'#FFFFFF':''}">
+{{item.num}}
<view v-if="index==1" class="posia" style="width: 27rpx;height: 27rpx;border-radius: 100%;border: 1rpx solid #759FFD;text-align: center;line-height: 27rpx;color: #759FFD;background: #FFFFFF;font-size: 20rpx;right: 0rpx;bottom: -8rpx;"></view>
<!-- <view></view> -->
<image v-if="item.isSign==1" class="posia" src="/static/public/gou.png" mode=""></image>
</view>
<view class="fon28 colf mar-s20">{{item.day}}</view>
</view>
@ -32,7 +34,7 @@
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
</view>
<view class="fon36 bold" style="color: #3875F6;">+{{item.num}}</view>
<view class="fon36 bold pcol">+{{item.num}}</view>
</view>
</view>
</view>
@ -46,28 +48,74 @@
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
timeList:[
{num:'10',day:'3.21',isSign:true},
{num:'10',day:'今天',isSign:true},
{num:'20',day:'明天',isSign:false},
{num:'20',day:'9.11',isSign:false},
{num:'20',day:'9.12',isSign:false},
{num:'20',day:'9.13',isSign:false},
{num:'20',day:'9.14',isSign:false},
],
timeList:[],
dataList:[
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
{title:'签到积分',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
],
user_score:0,//
page:1,
size:10,
isSigin:0,
loading:false
}
},
onLoad() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
this.checkTime();
this.checkList();
},
methods: {
siginEv(){
this.$toolAll.tools.showToast('正在签到...');
this.$requst.post('sign/online-singIn').then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('签到成功');
this.checkTime();
this.checkList();
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
checkTime(){
this.$requst.post('sign/online-sign-record',{page:this.page,size:this.size}).then(res=>{
if(res.code==0){
this.dataList = [];
if(res.data.length!=0){
res.data.forEach(item=>{
let obj = {
title:'签到积分',
time:item.created_at,
num:item.score
}
this.dataList.push(obj);
})
}
}
})
},
checkList(){
this.$requst.post('sign/mini-load').then(res=>{
if(res.code==0){
this.timeList = [];
for (let key in res.data.sign_record) {
let obj = {
num:res.data.sign_record[key].record,
day:res.data.sign_record[key].key,
isSign:res.data.sign_record[key].is_sign
}
this.timeList.push(obj)
// console.log(key);
}
this.isSigin = res.data.today_sign_in;//0 1
this.user_score = res.data.user_score;
setTimeout(()=>{
this.loading = true;
},1000)
}
// console.log(res);
})
}
}
}
</script>

View File

@ -0,0 +1,124 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'客服查询'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
<input class="fon28 width100" type="text" @confirm="searchEv" v-model="keyword" placeholder="客户的手机号/微信昵称查找" placeholder-style="color: #B3B3B3;" />
</view>
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
<!-- 列表 -->
<view class="bacf radius10 pad20 mar-x20 fon28" v-for="(item,index) in dataList" :key="index">
<view class="col3 bold">客户信息</view>
<view class="mar-sx20 fon24 disjbac col6">
<text>昵称{{item.customer_name}}</text>
<text><text v-if="item.customer_phone!=''">{{item.customer_phone}}</text><text v-else></text></text>
</view>
<view class="col3 bold">绑定的客服</view>
<view v-if="item.staff!=null" class="mar-s20 fon24 disjbac col6">
<text>昵称{{item.staff.name}}</text>
<text v-if="item.staff.phone!=''">{{item.staff.phone}}</text>
</view>
<view v-else class="mar-s20 fon24 disjbac col6">
<text>昵称{{item.account.nickname}}</text>
<text><text v-if="item.account.mobile!=''">{{item.account.mobile}}</text><text v-else></text></text>
</view>
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<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>
</view>
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
dataList:[],//
showTop:false,//
keyword:'',//
page:1,
size:10,
total:'',//
isZanw:true,
ntype:''// mine=
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkList()
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多客服数据')
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkList()
},
methods: {
searchEv(){//
if(this.keyword!='') this.ntype = ''
this.page = 1
this.isZanw = true
this.checkList()
},
checkList(){//
let params = {
page:this.page,
size:this.size,
type:this.ntype,//ID
keyword:this.keyword
}
this.$requst.post('user/get-bind-service-list',params).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
id:item.account_id,
customer_name:item.customer.nickname,
customer_phone:item.customer.mobile,
staff:item.staff,//
account:item.account//staff
}
this.dataList.push(obj)
})
}
}
},error=>{})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
</style>

View File

@ -23,7 +23,7 @@
<!-- 列表 -->
<view v-if="dataList.length!=0" class="dis bacf radius10 pad20 mar-x20 posir" v-for="(item,index) in dataList" :key="index">
<image class="mar-y20 flexs" :src="item.imgSrc" style="width: 98rpx;height: 98rpx;" mode="aspectFill"></image>
<view class="fon24 col3 width100">
<view class="fon24 col3 width100 mar-x40">
<view class="bold disjbac">
<view class="fon28 clips1">{{item.name}}</view>
<view class="flexs">来源{{item.come}}</view>
@ -35,8 +35,8 @@
<view class="col3">{{item.qudao}}</view>
</view>
</view>
<view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn"
style="right: 20rpx;bottom: 70rpx;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}">分配客服</view>
<view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;top: 80rpx;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}"></view>
<view class="fon24 col3 posia clips1 bold" style="bottom: 20rpx;left: 20rpx;right: 20rpx;">详细来源{{item.source_detail}}</view>
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
@ -86,7 +86,7 @@
// }
if(this.total!=this.dataList.length){
this.page++
this.checkCL()
this.checkCL(this.ntype)
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表数据')
this.isZanw = false
@ -119,8 +119,8 @@
},error=>{})
},
searchEv(){//
this.page = 1
this.isZanw = true
this.page = 1;
this.isZanw = true;
this.checkCL(this.ntype)
},
checkLY(){//
@ -156,7 +156,8 @@
customer:item.service[0],
time:item.created_at,
qudao:item.tag[0],
service:item.service
service:item.service,
source_detail:item.source_detail
}
this.dataList.push(cuObj)
})
@ -197,9 +198,10 @@
// console.log('');
},
chooseXia(index){
this.xialCurrent = index
this.ntype = this.xialone[index].name
this.category = this.xialone[index].title
this.xialCurrent = index;
this.ntype = this.xialone[index].name;
console.log(this.ntype);
this.category = this.xialone[index].title;
},
chooseXiaT(e){
this.staff_id = e.id

View File

@ -3,8 +3,8 @@
<!-- 状态栏 -->
<status-nav :titleVal="'消息'" :statusTitle="true"></status-nav>
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf fon28 col3 disja" :style="{top:statusHNH+'px'}">
<view @tap="isWen=true" :class="isWen?'isWen bold':'col9'" class="posir">日程提醒</view>
<view @tap="isWen=false" :class="!isWen?'isWen bold':'col9'" class="posir">消息中心</view>
<view @tap="switchEv(true)" :class="isWen?'isWen bold':'col9'" class="posir">日程提醒</view>
<view @tap="switchEv(false)" :class="!isWen?'isWen bold':'col9'" class="posir">消息中心</view>
</view>
<!-- 列表 -->
<view :style="{paddingTop: (statusHNH+chuTop+15)+'px'}" class="pad-zy32">
@ -13,10 +13,10 @@
<view class="fon24 col6 tc mar-sx50">{{item.time}}</view>
<view class="radius10 bacf pad20 mar-x20" v-for="(iteml,indexl) in item.list" :key="indexl">
<view class="disac">
<image v-if="iteml.is_read==0" style="width:46rpx;height:56rpx;" src="/static/public/unread.png" mode=""></image>
<image v-if="iteml.is_read==1" style="width:46rpx;height:56rpx;" src="/static/public/read.png" mode=""></image>
<image v-if="iteml.is_read==0" class="message-img" src="/static/public/unread.png" mode=""></image>
<image v-if="iteml.is_read==1" class="message-img" src="/static/public/read.png" mode=""></image>
<view class="fon28 col3 bold mar-zy10">{{iteml.title}}</view>
<view :style="{background:iteml.is_read==1?'rgba(204, 204, 204,1)':'#FF4D4D'}" style="border-radius: 5rpx;font-size: 24rpx;color: #FFFFFF;padding: 2rpx 8rpx 4rpx 6rpx;transform: scale(.8);">{{iteml.is_read==1?'已读':'未读'}}</view>
<view :style="{background:iteml.is_read==1?'rgba(204, 204, 204,1)':'#FF4D4D'}" class="message-status">{{iteml.is_read==1?'已读':'未读'}}</view>
</view>
<view v-if="iteml.content!=''" class="fon26 col3 mar-s20">{{iteml.content}}</view>
</view>
@ -62,26 +62,27 @@
showTop:false,//
chuTop:'',
isWen:true,
page:1,
size:10,
total:0,
isZanw:true,
ntype:'reminders'//
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
// for (let i = 0; i < 4; i++) {
// let obj = {
// status:false,
// main_img:'/static/public/main_img.png',
// title:'',
// content:'',
// head_img:'/static/public/like.png',
// name:''
// }
// this.dataList.push(obj)
// }
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkList()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多消息','none',1000)
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
},
onLoad(options) {
const query = wx.createSelectorQuery()
@ -89,14 +90,16 @@
// console.log('+',rect);
this.chuTop = rect.height
}).exec()
if(options.index==undefined){this.isWen = false}
this.checkMsg()
if(options.index==undefined){this.isWen = false;this.ntype = 'message';}
this.checkMsg();
},
methods: {
checkMsg(){
this.$requst.post('user/messages').then(res=>{
this.$requst.post('user/messages',{page:this.page,size:this.size,type:this.ntype}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let titleMsg = ''
@ -118,6 +121,18 @@
}
},error=>{})
},
switchEv(flag){
this.isWen = flag;
this.isZanw = true;
this.page = 1;
if(flag){
this.ntype = 'reminders';
this.checkMsg();
} else {
this.ntype = 'message';
this.checkMsg();
}
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,

View File

@ -7,7 +7,7 @@
<view>
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf fon28 col3 disja" :style="{top:statusHNH+'px'}">
<view @tap="isWen=true" :class="isWen?'isWen':''" class="posir">文章收藏</view>
<view @tap="isWen=false" :class="!isWen?'isWen':''" class="posir">商品收藏</view>
<view @tap="shopCollection" :class="!isWen?'isWen':''" class="posir">商品收藏</view>
</view>
<view :style="{paddingTop:(statusHNH+chuTop+15)+'px'}">
<view v-if="isWen">
@ -24,7 +24,92 @@
</view>
<view v-else>
<view v-if="shopList.length!=0" style="margin-top: -20rpx;">
<shopList :dataList="shopList"></shopList>
<view class="pad20">
<view style="width: 48.6%;float: left;">
<view v-if="index1%2==0" v-for="(item1,index1) in shopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @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="posia list-like-box" @tap.stop="chooseLike(index1)">
<image class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<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>
<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 shopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @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="posia list-like-box" @tap.stop="chooseLike(index1)">
<image class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<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>
<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>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="pu_content" @comfirmev="submitQu" @cancleev="isShowT=false"></pu-po>
</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/collection.png" style="" mode="aspectFill"></image>
@ -41,7 +126,7 @@
</template>
<script>
import {cancleCollectionEV} from '@/jsFile/publicAPI.js';
import {cancleCollectionEV,cancleCollectionShopEV} from '@/jsFile/publicAPI.js';
import shopList from '@/components/shop-list.vue';
export default {
components:{
@ -64,56 +149,13 @@
category_id:0,//ID
chuTop:'',
isWen:true,
shopList:[
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:true,
isPing:false,
isXian:false,
isIntegral:false,
grade:0,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:true,
isXian:false,
isIntegral:false,
grade:0,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:true,
isIntegral:false,
grade:0,
},
{
imgSrc:'/static/public/wen-one.png',
title:'【99皮皮节】【种植发际 线】1000单位FUE技术...',
zhePrice:'3888',
yuanPrice:'4205',
integral:'2888',
isTuan:false,
isPing:false,
isXian:false,
isIntegral:false,
grade:0,
}
]
shopList:[],
activeIndex:0,
isShowT:false,
pu_content:'是否需要取消收藏?',
page:1,
size:10,
timeList:[],//
}
},
onPageScroll(e) {
@ -143,6 +185,95 @@
}).exec()
},
methods: {
shopCollection(){//
this.isWen = false;
uni.request({
url:'https://hengmei.scdxtc.cn/api/spu/collection',
data:{page:this.page,size:this.size},
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
this.shopList = [];
let nArr = [];
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,//
disease_id:item.disease_id,//ID
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
nArr.push(obj)
})
this.loading = true;
}
console.log(nArr);
nArr.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('加载中...')
let timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==nArr[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
nArr[item.nIndex].activity_end_at = "活动已结束";
} else {
//
nArr[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.shopList = nArr;
},1000)
} else {
this.shopList = nArr;
}
}
}
})
},
checkConList(category_id){//
// this.$toolAll.tools.showToast('...')
let params = {
@ -212,6 +343,18 @@
},300)
this.dataList[e].is_collected = 0
},
chooseLike(index){
this.activeIndex = index;
this.isShowT = true;
},
submitQu(){
this.$toolAll.tools.showToast('正在取消...','loading');
//
cancleCollectionShopEV({action:'collect',id:this.shopList[this.activeIndex].id});
this.isShowT = false;
this.shopList.splice(this.activeIndex,1);
// this.shopCollection();
},
chooseTwo(index){//
this.newCurrent = index
this.isZanw = true
@ -226,6 +369,11 @@
duration: 300
});
},
goPage(id,index){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.shopList[index].isIntegral}`
})
}
}
}
</script>

View File

@ -6,133 +6,87 @@
<!-- 订单类型 -->
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
<view class="disjbac">
<view class="bold">商城订单</view>
<view style="color: #F85050;font-weight: bold;">待付款</view>
<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'" 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 class="bold col3 mar-s40 mar-x20">订单号1234567890</view>
<view class="fon24 col9">2021-09-06 10:30</view>
<view class="bold col3 mar-s40 mar-x20">订单号{{orderInfo.coding}}</view>
<view class="fon24 col9">{{orderInfo.created_at}}</view>
</view>
<!-- 物流信息 -->
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
<view class="bold">物流信息</view>
<view class="bold col3 mar-s40 fon26 disjbac">
<view>{{express}}</view>
<view>{{orderInfo.express_name}}{{orderInfo.express_number||'暂无快递单号'}}</view>
<view @tap="copyCont"></view>
</view>
</view>
<!-- 地址信息 -->
<view v-if="isExpress" class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
<view v-if="orderInfo.address!='自提'" class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
<view class="bold">收件人信息</view>
<view class="fon26 col3">
<view class="fon28 col3 bold" style="margin: 52rpx 0 20rpx 0;">蒋灰灰 <span>188****0362</span></view>
<view class="fon24 col9">四川省成都市成华区中环路双店路段奥园广场</view>
<view class="fon28 col3 bold" 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 class="fon26 col3 disjbac mar-s30">
<view>
<view class="fon28 col3 bold mar-x20">恒美植发</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" style="padding: 27rpx 20rpx;">
<view class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<image src="/static/public/banner.png" class="flexs" style="width: 166rpx;height: 166rpx;border-radius: 15rpx;margin-right: 12rpx;" mode="aspectFill"></image>
<view class="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">99皮皮节种植发际线1000单位FUE技术案例招募门美人</view>
<view style="font-size: 22rpx;color: #808080;font-weight: 500;">试用</view>
<view class="fon28 col3 bold clips2">{{item.spu_name}}</view>
<view class="orderDetail-sku">{{item.sku_name}}</view>
<view class="disjbac mar-s10">
<view style="color: #F85050;font-size: 32rpx;font-weight: bold;">3888</view>
<view class="fon28 col6">x2</view>
<view class="colf8 fon32 bold"><span v-if="orderInfo.is_score==0">{{item.price/100}}</span><span v-else>{{item.score}}</span></view>
<view class="fon28 col6">x{{item.num}}</view>
</view>
</view>
</view>
<view class="fon28 disjbac" style="margin: 60rpx 0 20rpx 0;">
<view class="col6">共4件</view>
<view style="font-weight: bold;color: #F85050;">应付款3888.00+300孔雀币</view>
</view>
</view>
<!-- 优惠 -->
<view class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
<view class="bold">优惠</view>
<view @tap="showQuan=true" class="fon28 col3 disjbac mar-sx40">
<view>优惠券</view>
<view class="disac">
<view style="color: #F85050;font-weight: bold;">-99.00</view>
<image src="/static/public/nextM.png" style="width: 16px;height: 16px;flex-shrink: 0;" mode="aspectFill"></image>
</view>
</view>
<view class="fon28 col3 disjbac">
<view>立减优惠</view>
<view style="color: #F85050;font-weight: bold;">-99.00</view>
<view class="fon28 disjbac mar-s40 mar-x20">
<view class="col6">{{allNum}}</view>
<view class="colf8 bold">共计{{allPrice}}</view>
</view>
</view>
<!-- 快递费用 -->
<view class="bacf radius20 mar-s20 disjbac" style="padding: 27rpx 20rpx;">
<view v-if="isExpress" class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
<view class="bold">快递费用</view>
<view class="fon28" style="color: #F85050;font-weight: bold;">10.00</view>
<view class="fon28 colf8 bold">{{orderInfo.freight}}.00</view>
</view>
<!-- 消费 -->
<view class="fon28 col3" style="margin: 40rpx 0 40rpx 0;text-align: right;">消费<span style="font-size: 36rpx;font-weight: bold;color: #F85050;">3898+300孔雀币</span></view>
<view class="disjbac posixzy bacf" style="height: 124rpx;padding: 0 32rpx;display: flex;align-items: center;">
<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" style="width: 56rpx;height: 56rpx;" mode=""></image>
<image src="/static/public/weix.png" mode=""></image>
<view class="fon28 col3">分享</view>
<button open-type="share" class="posia" style="top: 0;left: 0;right: 0;bottom: 0;opacity: 0;"></button>
<button open-type="share" class="posia-op"></button>
</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'">
<view @tap="cancleEv"></view>
</view>
<!-- 待收货 -->
<!-- <view class="disac">
<view style="width: 249rpx;height: 70rpx;border-radius: 35rpx;line-height: 70rpx;text-align: center;font-size: 28rpx;font-weight: bold;background: #E9E9E9;color: #808080;">取消订单</view>
<view style="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;">立即支付</view>
</view> -->
<!-- 确认收货 -->
<view style="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;">确认收货</view>
</view>
</view>
<view v-if="showQuan" @tap.stop="showQuan=false" class="posAll">
<view class="bacf posixzy" style="border-radius: 40rpx 40rpx 0rpx 0rpx;" @tap.stop="showQuan=true">
<view style="padding: 20rpx 50rpx;">
<view class="disjbac">
<view class="fon28 bold col3">优惠券</view>
<image @tap.stop="showQuan=false" src="/static/public/cha-close.png" style="width: 30rpx;height: 30rpx;" mode="aspectFill"></image>
</view>
<view class="fon28 bold col3" style="display: flex;justify-content: space-around;align-items: center;padding: 50rpx 0 16rpx 0;">
<view class="posir" :class="switchQuan?'activeQuan':''" @tap="switchQuan=true">(1)</view>
<view class="posir" :class="!switchQuan?'activeQuan':''" @tap="switchQuan=false">(0)</view>
</view>
<view class="mar-s40">
<view style="height: 200rpx;" class="disjbac">
<view class="posir" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
<image class="posia" src="/static/public/quan-left.png" style="width: 218rpx;height: 200rpx;left: 0;top: 0;" mode=""></image>
<view class="posir" style="z-index: 1;">
<view style="margin: 40rpx 0 30rpx 0rpx;" class="fon28"><span style="font-size: 56rpx;font-weight: bold;">10</span></view>
<view class="fon24">满300元可使用</view>
</view>
</view>
<view style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;height: 200rpx;padding: 0 20rpx;background-color: #F5F5F5;">
<view class="fon28 col3 mar-s20">黄金会员专属优惠券</view>
<view>
<image src="/static/public/chooseQuan.png" style="width: 40rpx;height: 40rpx;border-radius: 100%;float: right;"></image>
</view>
<view class="fon20 col3 mar-x20">有效期2021-09-06至2021-09-15</view>
</view>
</view>
</view>
<view class="mar-s40">
<view style="height: 200rpx;" class="disjbac">
<view class="posir" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
<image class="posia" src="/static/public/quan-left.png" style="width: 218rpx;height: 200rpx;left: 0;top: 0;" mode=""></image>
<view class="posir" style="z-index: 1;">
<view style="margin: 40rpx 0 30rpx 0rpx;" class="fon28"><span style="font-size: 56rpx;font-weight: bold;">10</span></view>
<view class="fon24">满300元可使用</view>
</view>
</view>
<view style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;height: 200rpx;padding: 0 20rpx;background-color: #F5F5F5;">
<view class="fon28 col3 mar-s20">黄金会员专属优惠券</view>
<view>
<image src="/static/public/cancleQuan.png" style="width: 40rpx;height: 40rpx;border-radius: 100%;float: right;"></image>
</view>
<view class="fon20 col3 mar-x20">有效期2021-09-06至2021-09-15</view>
</view>
</view>
</view>
<!-- 领取优惠券按钮 -->
<view @tap.stop="showQuan=false" style="font-size: 36rpx;color: #FFFFFF;font-weight: bold;margin: 0 auto;background: #3875F6;border-radius: 20rpx;height: 90rpx;line-height: 90rpx;text-align: center;margin-top: 156rpx;margin-bottom: 20rpx;">领取优惠券</view>
</view>
<view class="orderInfo-btn" v-if="orderInfo.status=='shipped'"></view>
</view>
</view>
</view>
@ -147,37 +101,127 @@
isExpress:true,
switchQuan:true,
showQuan:false,
express:'韵达快递2983625984729'
express:'韵达快递2983625984729',
orderInfo:'',//
addressInfo:'',//
allPrice:0,//
allNum:0,//
times:0,//
goAddress:'四川省成都市青羊区青羊大道213号',
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.$toolAll.tools.isLogin();
},
onLoad() {
onLoad(options) {
this.checkInfo(options.id);
},
methods: {
goThere(){
cancleEv(){//
this.times++;
if(this.times==2){
this.$requst.post('order/cancel',{order_coding:this.orderInfo.coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('取消订单成功');
this.checkInfo(this.orderInfo.id);
this.times = 0;
}
})
} else {
setTimeout(()=>{
this.times = 0;
},1500)
this.$toolAll.tools.showToast('双击即可取消订单');
}
},
paymentEv(){//
if(this.times==0){
this.$toolAll.tools.showToast('正在调起支付','loading',1500)
this.times++;
this.$requst.post('order/pay',{order_coding:this.orderInfo.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('order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
if(res.code==0){
this.times = 0;
this.$toolAll.tools.showToast('支付成功');
this.checkInfo(this.orderInfo.id);
} else this.$toolAll.tools.showToast(res.msg);
})
}
});
}
})
}
},
checkInfo(id){//
this.$requst.post('user/order-detail',{id:id}).then(res=>{
if(res.code==0){
this.allPrice = 0;
this.allNum = 0;
let narr = res.data;
narr.skus.forEach(item=>{
item.spu_cover = this.$http + item.spu_cover;
//
if(narr.is_score==0){
this.allPrice += item.price*item.num;
} else {
this.allPrice += item.score*item.num;
}
this.allNum += item.num;
})
if(narr.is_score==0){//
this.allPrice = this.allPrice/100;
} else {//
this.allPrice = this.allPrice;
}
this.orderInfo = narr;
let naddress = this.orderInfo.address.split(',');
if(naddress[0]!='自提'){
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())
this.addressInfo = {
userName:naddress[0].trim(),
userPhone:nphone,
userAddress:naddress[2].trim()
}
}
}
})
},
copyCont(){//
if(this.times==0){
this.times++;
if(this.orderInfo.express_number!=null){
this.$toolAll.tools.clickCopy(this.orderInfo.express_number);
this.$toolAll.tools.showToast('复制快递单号成功');
} else this.$toolAll.tools.showToast('暂无可查询的快递信息');
setTimeout(()=>{
this.times = 0;
},2000)
}
},
goThere(val){//
wx.getLocation({//
type: 'wgs84', //wx.openLocationbug: iOS 6.3.30 type wgs84
success: function (res) {
wx.openLocation({//使
latitude: 22.5542080000,//-
longitude: 113.8878770000,//-
name: "宝安中心A地铁口",
address:'宝安中心A地铁口'
latitude: 30.67554,//-
longitude: 104.010642,//-
name: val,
address: val
})
}
})
},
goPayment(){
uni.navigateTo({
url:'/pagesA/immediatePayment/immediatePayment'
})
},
copyCont(){
this.$toolAll.tools.clickCopy(this.express)
}
}
}
</script>

View File

@ -57,31 +57,56 @@
//
if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')//
else this.imgList = []
console.log(this.imgList.length);
this.checkPoster();
},
methods: {
chooseImg(index){
checkPoster(){//
this.$requst.get('user/poster').then(res=>{
if(res.code==0){
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
this.imgList.push(this.$http + item);
})
}
}
},error=>{})
},
chooseImg(index){//
this.haved = this.showBtn = true;
this.imgSrc = this.imgList[index]
this.$toolAll.tools.showToast('正在生成海报...','loading',10000);
this.$requst.post('user/poster-info',{poster_src:this.imgList[index]}).then(res=>{
if(res.code==0){
base64ToPath(res.data.poster).then(path => {
this.imgSrc = path;
}).catch(error => {})
this.$toolAll.tools.showToast('海报生成成功','none',1500);
} else {
this.$toolAll.tools.showToast('海报生成失败','none',1500);
this.haved = this.showBtn = false;
}
})
},
shareEv(){
this.haved = false
this.haved = false;
wx.showShareImageMenu({
path: this.imgSrc,
success:(res=>{
this.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb);
}),
fail:(res=>{//
this.haved = true
})
})
this.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
},
comfirmev(){//
this.$toolAll.tools.showToast('生成中...')
this.isShowT = false
//
this.$requst.get('user/personal-poster').then(res=>{
// console.log('',res);
if(res.code==0){

View File

@ -43,7 +43,7 @@
<view @tap="shareEv" class="disac fc mar-zy36 posir">
<image src="/static/public/weix.png" style="width: 42rpx;height: 42rpx;" mode=""></image>
<view class="fon24 col9">分享</view>
<button class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
<button class="posia-op" open-type="share">分享</button>
<!-- <button v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;"></button> -->
</view>
<view class="disac fc" @tap="tapConllection">
@ -127,7 +127,7 @@
<view @tap="shareEv" 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 v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;"></button>
<button v-if="haveImg" class="posia-op" open-type="share"></button>
</view>
</view>
</view>
@ -382,6 +382,7 @@
if(this.haveImg == false) {
this.vision = true
} else {
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
let maiOjb = {

View File

@ -12,8 +12,8 @@
<view class="pad-x180" :style="{paddingTop: isNei!=3?(statusHNH+60)+'px':statusHNH+'px'}">
<!-- 自定义轮播 -->
<view v-if="isLoading">
<swiper-pu :browseP="true" :bannerList="bannerList" :newHeight="'250'" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
<view v-if="isNei==3" style="width: 100%;height: 90rpx;line-height: 90rpx;padding-left: 62rpx;background: #3875F6;color: #FFFFFF;font-size: 40rpx;font-weight: bold;">{{detailObj.score}}</view>
<swiper-pu v-if="cateCurrent==0" :browseP="true" :bannerList="bannerList" :newHeight="'250'" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
<!-- <view v-if="isNei==3" class="score-box">{{detailObj.score}}</view> -->
<view v-show="cateCurrent==isNum">
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
<!-- 标题 -->
@ -40,6 +40,7 @@
<image class="flexs" src="/static/public/huiy.png" mode="aspectFill"></image>
<view class="fon24 col9">{{detailObj.level_text}}</view>
</view>
<view v-else class="fon24 col9">全部人员可买</view>
</view>
<view class="disac flexs">
<view @tap="shareEv" class="disac fc mar-zy36 posir">
@ -54,28 +55,32 @@
</view>
</view>
</view>
<view class="pad-x30 pad-s10 borbot" v-if="isNei==2">
<view class="fon36 colf bold pbackc tc pad-sx20 radius45">倒计时25小时35分26秒</view>
<view class="pad-x30 pad-s10 borbot" v-if="isNei==0 || isNei==1 ||isNei==2">
<view class="fon36 colf bold pbackc tc pad-sx20 radius45" v-if="daoTime!='活动已结束'">{{daoTime}}</view>
<view class="fon36 colf bold pbackc tc pad-sx20 radius45" v-else>{{daoTime}}</view>
</view>
<!-- 规格 -->
<view class="disjbac tc mar-s20">
<view class="disjcac fon28 col3">规格</view>
<view>
<view class="dis tc mar-s20 fon28">
<view class="col3 flexs" style="margin-top: 6rpx;">类型</view>
<view class="width100 disac fw" style="justify-content: flex-end;">
<view class="col6 mar-z30 mar-x20 molei" style="background: #F2F2F2;" v-for="(item,index) in skuCate" :key="index">{{item.title}}</view>
</view>
<!-- <view>
<view class="fon26 col3 mar-x20">上市时间</view>
<view class="fon24 colB3">2021.02.01</view>
<view class="fon24 colB3">{{detailObj.param_maket_time||'今年'}}</view>
</view>
<view>
<view class="fon26 col3 mar-x20">有效期</view>
<view class="fon24 colB3">三个月</view>
<view class="fon24 colB3">{{detailObj.param_validity_time||'永久'}}</view>
</view>
<view>
<view class="fon26 col3 mar-x20">可用时间</view>
<view class="fon24 colB3">正常使用</view>
<view class="fon24 colB3">{{detailObj.param_use_time||'长期'}}</view>
</view>
<view>
<view class="fon26 col3 mar-x20">术前须知</view>
<view class="fon24 colB3"></view>
</view>
<view class="fon24 colB3">{{detailObj.param_notice||''}}</view>
</view> -->
</view>
</view>
<!-- 销量库存 -->
@ -90,17 +95,17 @@
</view>
</view>
<!-- 拼团 -->
<view v-if="isNei==1" class="pad20 bacf mar-zy20 radius20 mar-s20">
<view v-if="isNei==1 && len!=0" class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 col3">{{len}}人正在拼团可以直接参与</view>
<swiper :autoplay="true" :interval="3000" :duration="1000" circular="true" class="shop-swiper" vertical="true">
<swiper-item v-for="(item,index) in pingArr" :key="index">
<swiper :autoplay="true" :interval="3000" :duration="1000" circular="true" class="shop-swiper" :style="{height: (len==1 && pingArr[0].length==1)?'110rpx':'280rpx'}" vertical="true">
<swiper-item v-if="pingArr[index].length!=0" v-for="(item,index) in pingArr" :key="index">
<view class="disjbac posir pad-x20" v-for="(itemt,indext) in item" :key="indext">
<image :src="itemt.imgSrc" mode="aspectFill" class="flexs big-img"></image>
<view class="disjbac width100 mar-z20 pad-sx20">
<view class="fon28 col3 width45">{{itemt.name}}</view>
<view class="fon28 disjbac width100 col7D">
<view class="flexs">
<view>还差1人拼成</view>
<view>还差{{itemt.num}}人拼成</view>
<view style="margin-top: 7rpx;">{{itemt.time_text}}</view>
</view>
<view @tap="comeTuan(itemt.id,index,indext)" class="colf bold flexs">去拼单</view>
@ -120,28 +125,61 @@
</view>
</view>
<!-- 医生 -->
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
<view v-if="doctorList.length!=0" class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 col3 bold">医生</view>
<view class="disjbac posir pad-sx20">
<image src="/static/public/like.png" mode="aspectFill" class="flexs big-img"></image>
<view @tap="goDoctor(item.id)" v-for="(item,index) in doctorList" :key="index" class="disjbac posir pad-sx20">
<image :src="item.imgSrc" mode="aspectFill" class="flexs big-img"></image>
<view class="disjbac width100 mar-z20 pad-sx20">
<view class="fon28 col3 width50">廖恒利医生</view>
<view class="fon24 width50 col7D">擅长毛发种植</view>
</view>
<view class="duan-xian"></view>
</view>
<view class="disjbac pad-sx20">
<image src="/static/public/like.png" mode="aspectFill" class="flexs big-img"></image>
<view class="disjbac width100 mar-z20 pad-sx20">
<view class="fon28 col3 width50">廖恒利医生</view>
<view class="fon24 width50 col7D">擅长毛发种植</view>
<view class="fon28 col3 width50">{{item.name}}</view>
<view class="fon24 width50 col7D">擅长{{item.goodAt}}</view>
</view>
<view v-if="(doctorList.length-1)!=index" class="duan-xian"></view>
</view>
</view>
<!-- 产品推荐 -->
<view class="fon30 bold mar-s40 mar-x10 pad-zy50 pcol">产品推</view>
<view v-if="dataList.length!=0" class="fon30 bold mar-s40 mar-x10 pad-zy50 pcol"></view>
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
</view>
<!-- 案例日记 -->
<view v-show="cateCurrent==1" class="pad-zy20">
<view v-if="listArrone.length!=0">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrone"></list-pu>
</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>
</view>
<!-- 案例日记 -->
<view v-show="cateCurrent==2" class="pad-zy20">
<view v-if="listArrtwo.length!=0">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrtwo"></list-pu>
</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>
</view>
<!-- 效果模拟 -->
<view v-show="cateCurrent==3" class="pad-zy20">
<view v-if="listArrthree.length!=0">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrthree"></list-pu>
</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>
</view>
<!-- 科普视频 -->
<view v-show="cateCurrent==4" class="pad-zy20">
<view v-if="listArrfour.length!=0">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="listArrfour"></list-pu>
</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>
</view>
</view>
<!-- 底部导航 -->
<view class="posixzy disjbac bacf pad-zy32 btnBKS">
@ -149,22 +187,22 @@
<image @tap="backHome" class="posia backH" src="/static/public/back-home.png" mode="aspectFill"></image>
</view>
<view class="disac fon26 colf">
<view @tap="chooseShop" class="disjcac lianShare addCart-btn">加入购物车</view>
<view @tap="chooseShop" class="disjcac lianShare mai-btn">立即购买</view>
<view @tap="showTK = true" class="disjcac lianShare addCart-btn"><span v-if="isNei!=1"></span><span v-else></span></view>
<view @tap="showTK = true" class="disjcac lianShare mai-btn"><span v-if="isNei!=1"></span><span v-else></span></view>
</view>
</view>
<!-- 购物车 -->
<view @tap="goShopCart" class="detail-cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
<view class="posia"><view>99</view></view>
<view class="posia" v-if="cartNum!=0"><view>{{cartNum}}</view></view>
</view>
</view>
<!-- 客服 -->
<view style="position: fixed;right: 16rpx;bottom: 140rpx;">
<view @tap="lianK" style="position: fixed;right: 16rpx;bottom: 140rpx;">
<view class="posir" style="width: 142rpx;height: 142rpx;">
<image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image>
<button open-type="share" class="posia-op"></button>
<button v-if="haveImg" open-type="contact" class="posia-op"></button>
</view>
</view>
<!-- 立即购买加入购物车弹框 -->
@ -189,12 +227,12 @@
<span class="radius15 colf fon20 mar-z10" v-if="isNei==1"></span>
<span class="radius15 colf fon20 mar-z10" v-if="isNei==2"></span>
</view>
<span>{{skuDetail.title}}</span>
<span>{{detailObj.name}}</span>
</view>
<view class="disjbac mar-sx40 pad-zy30 col3">
<view class="fon28">类型</view>
<view class="fon26 disac">
<view @tap="chooselei(indexl)" v-for="(item,indexl) in allRes.sku" :key="indexl" :class="leiIndex==indexl?'activelei':'molei'" :style="{background:leiIndex==indexl?publicColor:'#F2F2F2'}">{{item.title}}</view>
<view class="dis mar-sx40 pad-zy30 col3">
<view class="fon28 flexs" style="margin-top: 6rpx;">类型</view>
<view class="fon26 disac fw width100" style="justify-content: flex-end;">
<view @tap="chooselei(indexl)" class="mar-x20" v-for="(item,indexl) in allRes.sku" :key="indexl" :class="leiIndex==indexl?'activelei':'molei'" :style="{background:leiIndex==indexl?publicColor:'#F2F2F2'}">{{item.title}}</view>
</view>
</view>
<view class="disjbac mar-sx40 pad-zy30 fon28">
@ -210,15 +248,15 @@
</view>
</view>
<!-- 加入购物车立即购买 -->
<view v-if="isNei!=1" class="disjbac pad-zy30 colf fon28 mar-x20">
<view v-if="isNei!=1" class="disjbac pad-zy30 colf fon32 mar-x50">
<view @tap="addCart" class="ev-btn pbackc">加入购物车</view>
<view v-if="isNei!=3" @tap.stop="goGetReadyDan" class="ev-btn bcf8"></view>
<view v-else @tap.stop="goGetReadyDan" class="ev-btn bcf8">立即兑换</view>
<view v-if="isNei!=3" @tap.stop="goGetReadyDan(0)" class="ev-btn bcf8"></view>
<view v-else @tap.stop="goGetReadyDan(0)" class="ev-btn bcf8">立即兑换</view>
</view>
<!-- 单独购买立即拼团 -->
<view v-else class="disjbac pad-zy30 colf fon28 mar-x20">
<view class="ev-btn" style="background: #C8C8C8;">单独购买</view>
<view class="ev-btn bcf8">立即拼团</view>
<view v-else class="disjbac pad-zy30 colf fon32 mar-x50">
<view @tap.stop="goGetReadyDan(2)" class="ev-btn" style="background: #C8C8C8;">单独购买</view>
<view @tap.stop="goGetReadyDan(0)" class="ev-btn bcf8">发起拼团</view>
</view>
</view>
</view>
@ -226,7 +264,7 @@
<view v-if="showPD" class="pd-tk-box" @tap.stop="showPD=false">
<view class="bacf radius20 width100 posir" @tap.stop="showPD=true">
<view class="fon28 col3">参与{{pinInfo.name}}的拼单</view>
<view class="fon24 col3">仅剩1个名额{{pinInfo.time_text.slice(3)}}后结束</view>
<view class="fon24 col3">仅剩{{pinInfo.num}}个名额{{pinInfo.time_text.slice(3)}}后结束</view>
<view class="disjcac">
<image :src="pinInfo.imgSrc" mode="aspectFill"></image>
<image src="/static/public/pin-jie.png" mode=""></image>
@ -300,6 +338,8 @@
listArrthree:[],
//
listArrfour:[],
//
doctorList:[],
detailObj:{},//
detailInfo:'',//
category_id:'',//ID
@ -310,7 +350,6 @@
showTK:false,
leiIndex:0,
showPD:false,
orderId:'',//ID
isNei:'',//
pingArr:[],//
len:0,//
@ -319,7 +358,13 @@
zhuImg:'',//cover
skuDetail:{},//sku
buyNum:1,//
isScore:''
daoTime:'',//
csNum:0,//,
isBuy:0,//
ispt:0,//01 2
isScore:0,//
cartNum:0,
skuCate:[]//
}
},
onPageScroll(e) {
@ -327,22 +372,23 @@
},
onShareAppMessage(res) {
var ya = this;
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.spu_id}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
c:this.detailObj.id*1,
c:this.detailObj.spu_id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
if(ya.detailObj.share_img==null) ya.detailObj.share_img = ya.detailObj.cover;
var shareObj = {
     title: `${ya.detailObj.name}`, // (slogan)
     path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
     path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.spu_id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
     imageUrl: ya.$http + ya.detailObj.share_img//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
},
onShow() {
uni.removeStorageSync('chooseAddress');
},
onLoad(options) {
if(options.category_id!=undefined) {
@ -383,30 +429,68 @@
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb);
this.orderId = options.id;
if(options.isText=='团购') this.isNei = 0;
if(options.isText=='拼团') this.isNei = 1;
if(options.isText=='限时') this.isNei = 2;
if(options.isText=='积分') this.isNei = 3;
if(options.isText=='') this.isNei = 10;
this.checkDetail(this.orderId);
if(options.isIntegral=="true"){this.isScore = 3;}
this.checkDetail(options.id,options.is_activity);
this.cartNumEv();
},
methods: {
goGetReadyDan(){//
cartNumEv(){//
let ntype = 'spu'
if(this.isScore==3) ntype = 'score';
this.$requst.post('order/shopping-cart-count',{type:ntype}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
checkPTList(id){//
this.$requst.post('spu/group-list',{id:id}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let pObj = {
id:item.id,
imgSrc:item.cover,
name:item.name,
num:item.num,//
time:item.time,//
time_text:item.time_text//
}
this.pingArr.push(pObj);
})
this.len = this.pingArr.length;
let n = 2; //2
let lineNum = this.len % 2 === 0 ? this.len / 2 : Math.floor( (this.len / 2) + 2 );
let newPArr = [];
for (let i = 0; i < lineNum; i++) {
let temp = this.pingArr.slice(i*n, i*n+n);
newPArr.push(JSON.parse(JSON.stringify(temp)));
}
this.pingArr = newPArr;
}
} else this.$toolAll.tools.showToast(res.msg);
})
},
goGetReadyDan(index){//
this.showTK = false;
// {id:1,imgSrc:'/static/tabbar/mya.png',title:'99线',price:3888,num:1,isActive:false},
let nprice = '';
if(this.isNei==3) {
nprice = this.detailObj.score;
} else nprice = this.skuDetail.price/100;
this.ispt = index;
if(index==2){nprice = this.skuDetail.original_price/100;}
let params = {
id:this.skuDetail.id,
id:this.detailObj.spu_id,
imgSrc:this.$http + this.detailObj.cover,
coding:this.skuDetail.coding,
price:nprice,
num:this.buyNum,
title:this.detailObj.name,
is_score:this.detailObj.is_score
sku_name:this.skuDetail.title,
is_score:this.detailObj.is_score,
group_id:this.ispt,//0 1 2
is_only:this.ispt
}
let newList = [params];
uni.setStorageSync('orderList',newList);
@ -415,12 +499,18 @@
})
},
addCart(){//
this.$requst.post('order/shopping-cart-add',{sku_id:this.skuDetail.id,num:this.buyNum}).then(res=>{
if(res.code==0) {
this.showTK = false;
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
}
})
if(this.csNum==0){
this.csNum++;
this.$toolAll.tools.showToast('正在加入购物车...');
this.$requst.post('order/shopping-cart-add',{sku_id:this.skuDetail.id,num:this.buyNum}).then(res=>{
if(res.code==0) {
this.showTK = false;
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
this.cartNumEv();
this.csNum = 0;
}
})
}
},
comeTuan(pinId,index,index2){//
this.showPD = true;
@ -433,6 +523,25 @@
moveHandle(){//
return false
},
lianK(){//
// if(!this.jieDuan){
// let isAuth = this.$toolAll.tools.returnAuth()
// if(!isAuth){
if(this.haveImg == false) {
this.vision = true
} else {
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
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)
}
// } else this.jieDuan = true
// }
},
getphonenumber(e){//
if(e.detail.errMsg=="getPhoneNumber:ok"){
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
@ -449,19 +558,19 @@
chooseLike(e){//
let cateId = ''
let newArr = []
if(this.cateCurrent==0) {
if(this.cateCurrent==1) {
newArr = this.listArrone
cateId = newArr[e].id
}
if(this.cateCurrent==1) {
if(this.cateCurrent==2) {
newArr = this.listArrtwo
cateId = newArr[e].id
}
if(this.cateCurrent==2) {
if(this.cateCurrent==3) {
newArr = this.listArrthree
cateId = newArr[e].id
}
if(this.cateCurrent==3) {
if(this.cateCurrent==4) {
newArr = this.listArrfour
cateId = newArr[e].id
}
@ -473,19 +582,19 @@
},
comfirmev(e){//
let cateId = ''
if(this.cateCurrent==0) {
if(this.cateCurrent==1) {
this.listArrone[e].is_collected = 0
cateId = this.listArrone[e].id
}
if(this.cateCurrent==1) {
if(this.cateCurrent==2) {
this.listArrtwo[e].is_collected = 0
cateId = this.listArrtwo[e].id
}
if(this.cateCurrent==2) {
if(this.cateCurrent==3) {
this.listArrthree[e].is_collected = 0
cateId = this.listArrthree[e].id
}
if(this.cateCurrent==3) {
if(this.cateCurrent==4) {
this.listArrfour[e].is_collected = 0
cateId = this.listArrfour[e].id
}
@ -493,19 +602,6 @@
//
cancleCollectionShopEV({action:'collect',id:cateId})
},
chooseLikex(e){//
if(this.xgList[e].is_collected==0){
this.xgList[e].is_collected = 1
//
collectionShopEV({action:'collect',id:this.xgList[e].id})
}
},
comfirmevx(e){//
this.xgList[e].is_collected = 0
this.$toolAll.tools.showToast('正在取消...','loading')
//
cancleCollectionShopEV({action:'collect',id:this.xgList[e].id})
},
buttonH(e){//
this.haveImg = e
if(e) {
@ -514,7 +610,7 @@
}
},
cancleEv(e){//
if(e==0) this.vision = false
// if(e==0) this.vision = false
},
backHome(){
uni.navigateTo({
@ -526,111 +622,165 @@
this.vision = true
}
},
checkDetail(newId){
this.$requst.post('spu/detail',{id:newId}).then(res=>{
// console.log('',res);
if(res.code==0){
this.allRes = res.data;
this.zhuImg = this.$http + res.data.detail.cover;
// sku
if(res.data.sku.length!=0){
res.data.sku.forEach(item=>{
if(item.is_default==1) {
this.skuDetail = item;
}
})
}
this.isLoading = true;
//
if(res.data.category.length!=0){
res.data.category.forEach((item,index)=>{
let cateObj = {
id:item.id,//ID
title:item.title,//
active:item.active,//
model_id:item.model_id,//ID
model_name:item.model_name,//
sort:item.sort
}
this.cateList.push(cateObj)
//
if(item.active==1) this.active = this.cateCurrent = index
//
if(this.category_id==item.id) this.isNum = index
})
}
if(this.invite_code!='' && this.invite_code!=undefined){
const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => {
// console.log('+',rect);
this.statusHNH = rect.height
// console.log(this.statusHNH );
}).exec()
}
//
this.detailObj = res.data.detail
let maiOjb = {
e:1,//访
c:this.detailObj.id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
//
//
let arrImg = this.detailObj.images.split(',')
arrImg.forEach(item=>{
let newImgObj = {
imgSrc:this.$http + item,
url:'',
isVideo:false,
poster:'',
checkDetail(newId,is_activity){
uni.request({
url:'https://hengmei.scdxtc.cn/api/spu/detail',
data:{id:newId,is_activity:is_activity},
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
this.allRes = res.data.data;
this.zhuImg = this.$http + res.data.data.detail.cover;
// sku
if(res.data.data.sku.length!=0){
res.data.data.sku.forEach(item=>{
if(item.is_default==1) {
this.skuDetail = item;
}
})
}
//
this.bannerList.push(newImgObj)
})
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
imgSrc:this.$http + arrImg[0],
url:this.$http + this.detailObj.video,
isVideo:true,
poster:'',
this.isLoading = true;
//
if(res.data.data.category.length!=0){
res.data.data.category.forEach((item,index)=>{
let cateObj = {
id:item.id,//ID
title:item.title,//
active:item.active,//
model_id:item.model_id,//ID
model_name:item.model_name,//
sort:item.sort
}
this.cateList.push(cateObj)
//
if(item.active==1) this.active = this.cateCurrent = index
//
if(this.category_id==item.id) this.isNum = index
})
}
}
//
if(this.detailObj.is_collected==0) this.isDetailConllection = false
if(this.detailObj.is_collected==1) this.isDetailConllection = true
//
this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
//
if(this.isNei==1 && this.detailObj.activity_going.length!=0) {
this.detailObj.activity_going.forEach(item=>{
let pObj = {
id:item.id,
imgSrc:this.$http + item.cover,
name:item.name,
num:item.num,//
time:item.time,//
time_text:item.time_text//
if(this.invite_code!='' && this.invite_code!=undefined){
const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => {
// console.log('+',rect);
this.statusHNH = rect.height
// console.log(this.statusHNH );
}).exec()
}
//
this.detailObj = res.data.data.detail;
//
this.skuCate = res.data.data.sku;
if(this.detailObj.activity_type=='group_buy') this.isNei = 0;
if(this.detailObj.activity_type=='group_make') this.isNei = 1;
if(this.detailObj.activity_type=='limit_time') this.isNei = 2;
if(this.detailObj.activity_type=='normal') {
console.log(this.isScore);
if(this.isScore==3) {
this.isNei = this.isScore;
} else this.isNei = 10;
}
let startTime = new Date(res.header.Date).getTime();
let endTime = new Date(res.data.data.detail.activity_end_at).getTime();
if(startTime - endTime >=0) {// - >= 0
this.daoTime = "活动已结束";
} else {
this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);//
let timer = setInterval(()=>{//
startTime = startTime + 1000;
this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);
},1000)
}
let maiOjb = {
e:1,//访
c:this.detailObj.spu_id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
//
//
let arrImg = this.detailObj.images.split(',')
arrImg.forEach(item=>{
let newImgObj = {
imgSrc:this.$http + item,
url:'',
isVideo:false,
poster:'',
}
this.pingArr.push(pObj);
//
this.bannerList.push(newImgObj)
})
this.len = this.pingArr.length;
let n = 2; //2
let lineNum = this.len % 2 === 0 ? this.len / 2 : Math.floor( (this.len / 2) + 2 );
let newPArr = [];
for (let i = 0; i < lineNum; i++) {
let temp = this.pingArr.slice(i*n, i*n+n);
newPArr.push(JSON.parse(JSON.stringify(temp)));
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
imgSrc:this.$http + arrImg[0],
url:this.$http + this.detailObj.video,
isVideo:true,
poster:'',
}
}
this.pingArr = newPArr;
//
if(res.data.product.length!=0){
res.data.product.forEach(item=>{
//
if(this.detailObj.is_collected==0) this.isDetailConllection = false
if(this.detailObj.is_collected==1) this.isDetailConllection = true
//
this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
//
if(res.data.data.doctor.length!=0){
res.data.data.doctor.forEach(item=>{
let docObj = {
id:item.id,
imgSrc:item.headimg,
name:item.name,
goodAt:item.skill
}
this.doctorList.push(docObj);
})
}
//
if(this.isNei==1 && this.detailObj.activity_going.length!=0) {
this.checkPTList(this.detailObj.id);//
}
this.checkShopList();
}
}
})
},
checkShopList(){//
let params = {
keyword:'',//
page:1,
size:10,
doctor_role:'',// doctor= design=
doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:''//ID
}
uni.request({
url:'https://hengmei.scdxtc.cn/api/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){
this.dataList = [];
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,
@ -638,31 +788,35 @@
zhePrice:item.price/100,
yuanPrice:item.original_price/100,
integral:'',
isTuan:tuan,
isPing:ping,
isXian:xian,
isIntegral:integral,
isTuan:tuan,//
isPing:ping,//
isXian:xian,//
isIntegral:integral,//
grade:'',
disease_name:item.disease_name,//
disease_id:item.disease_id,//ID
activity_end_at:'',//
activity_group_cover:[],//
activity_group_num:''//
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
this.dataList.push(obj)
})
}
}
}
},error=>{})
},
chooseShop(){//
this.showTK = true;
})
},
goShopCart(){//
if(this.isNei==3) this.isScore = 'score';
let isScore = '';
if(this.isNei==3) isScore = 'score';
uni.navigateTo({
url:`/pagesA/shopCart/shopCart?isScore=${this.isScore}`
url:`/pagesA/shopCart/shopCart?isScore=${isScore}`
})
},
goDoctor(id){
uni.navigateTo({
url:`/pagesB/doctorDetail/doctorDetail?doctor_id=${id}`
})
},
choosecateEv(e){
@ -670,10 +824,10 @@
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{
// console.log('',res);
if(res.code==0){
if(e==0 && this.active!=e) this.listArrone = []
if(e==1 && this.active!=e) this.listArrtwo = []
if(e==2 && this.active!=e) this.listArrthree = []
if(e==3 && this.active!=e) this.listArrfour = []
if(e==1 && this.active!=e) this.listArrone = []
if(e==2 && this.active!=e) this.listArrtwo = []
if(e==3 && this.active!=e) this.listArrthree = []
if(e==4 && this.active!=e) this.listArrfour = []
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4")
@ -694,10 +848,10 @@
isVideo:isVideo//
}
if(item.cover!=''){
if(e==0 && this.active!=e) this.listArrone.push(arrObj)
if(e==1 && this.active!=e) this.listArrtwo.push(arrObj)
if(e==2 && this.active!=e) this.listArrthree.push(arrObj)
if(e==3 && this.active!=e) this.listArrfour.push(arrObj)
if(e==1 && this.active!=e) this.listArrone.push(arrObj)
if(e==2 && this.active!=e) this.listArrtwo.push(arrObj)
if(e==3 && this.active!=e) this.listArrthree.push(arrObj)
if(e==4 && this.active!=e) this.listArrfour.push(arrObj)
}
})
}
@ -705,11 +859,14 @@
},error=>{})
},
tapConllection(){//
let isLikeCon = 'collect'
let isLikeCon = 'collect';
let nid = '';
if(this.detailObj.is_activity==1) nid=this.detailObj.spu_id;
else nid=this.detailObj.id;
//
if(!this.isDetailConllection) collectionShopEV({action:isLikeCon,id:this.detailObj.id})
if(!this.isDetailConllection) collectionShopEV({action:isLikeCon,id:nid})
//
else cancleCollectionShopEV({action:isLikeCon,id:this.detailObj.id})
else cancleCollectionShopEV({action:isLikeCon,id:nid})
this.isDetailConllection = !this.isDetailConllection
},
backTop(){//

View File

@ -0,0 +1,467 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'商品搜索'" :statusTitle="true"></status-nav>
<!-- 输入框 -->
<view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20">
<!-- 输入框 -->
<input @confirm="searchEv" style="border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;" class="width100 fon34 radius10" type="text" v-model="searchVal" placeholder="请输入商品名称"/>
<!-- 搜索 -->
<view @tap="searchEv" class="flexs mar-z30 radius10 pad-zy40 fon34 colf" style="height: 80rpx;line-height: 80rpx;" :style="{background:publicColor}">搜索</view>
</view>
<view>
<!-- 分类标题 -->
<view style="background: #FFFFFF;font-size: 24rpx;" class="disjbac pad-zy20 pad-s20">
<view v-for="(item,index) in shopCate" @tap="chooseShopCate(index)" :class="activeIndex==index?'activecate':'shopMo'" :style="{background:activeIndex==index?publicColor:'#F2F2F2'}" :key="index"><span>{{item}}</span></view>
</view>
<!-- 筛选结果 -->
<view v-if="isClick" class="pad-zy50 disac fw pad-x20">
<view class="col3 fon28 mar-s30">筛选</view>
<view v-for="(item,indexx) in shaiList" :key="indexx">{{item}} <view class="mar-z10" @tap="deleteSX(indexx)">×</view></view>
</view>
<view v-if="isXiao">
<view class="pad-zy30">
<view class="mar-s50 mar-x20 fon28 bold">{{cateTitle}}</view>
<view class="disac fw">
<view @tap="chooseBing(indexb)" v-for="(itemb,indexb) in bingzList" class="mar-y30 fon26 mar-s30" :key="indexb" :class="itemb.isActive?'activebcate':'shopBMo'" :style="{background:itemb.isActive?publicColor:'#F2F2F2'}">{{itemb.title}}</view>
</view>
<view v-if="activeIndex==1">
<view class="fon28 bold mar-sx40">医生选择</view>
<input type="text" class="mar-x40" value="" placeholder="请输入医生姓名并选择" />
</view>
</view>
<!-- 重置筛选 -->
<view class="disjbac pad-zy20 mar-s50 mar-x30 pad-s20">
<view @tap="chongz"></view>
<view @tap="shaix"></view>
</view>
</view>
</view>
</view>
<view v-if="isXiao" @tap="isXiao=false" class="moban"></view>
<!-- 数据列表 -->
<view v-if="loading" :style="{marginTop:statusHNH+titleHeight+'px'}">
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}商品`"></nothing-page>
</view>
<!-- 购物车 -->
<navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none">
<view class="cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
<view class="posia" v-if="cartNum!=0"><view>{{cartNum}}</view></view>
</view>
</view>
</navigator>
<!-- 历史搜索和热门搜索 -->
<view class="pad-z30 mar-s30" v-if="isList">
<cate-tu :list="reSearchList" @delev='delev'></cate-tu>
</view>
<view v-else class="pad-zy20 mar-s20">
<!-- 列表 -->
<view v-if="dataList.length!=0">
</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>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
</template>
<script>
import cateTu from '@/components/cate-items/cate-tu.vue';
import shopList from '@/components/shop-list.vue';
import {cartNum} from '@/jsFile/publicAPI.js';
export default {
components:{
cateTu,
shopList
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
searchVal:'',//
publicColor:uni.getStorageSync('publicColor'),//
reSearchList:[//
{
title:'历史搜索',
src:'/static/public/del-icon.png',
list:[]
},
{
title:'热门搜索',
src:'',
list:[
// {content:''},
// {content:''},
// {content:''},
// {content:''},
// {content:''},
]
},
],
isShowT:false,//
isList:true,//
dataList:[//
],
showTop:false,//
newCurrent:0,
page:1,
size:10,
total:'',//
isZanw:true,
activeIndex:'-1',
shopCate:['全部病种','全部医生','全部活动'],
cateTitle:'',
bingzList:[],//
zanBingArr:[],//
isXiao:false,//
titleHeight:'',//
shaiList:[],//
isClick:false,//
dataList:[],
searchVal:'',//
doctor_role:'',// doctor= design=
doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:'',//ID
loading:false,
cartNum:0
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.searchEv()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
},
onLoad(options) {
if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld
this.searchEv()
}
this.checkSearchHistory()
this.checkKey()
// +
const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => {
// console.log('+',rect.height);
this.titleHeight = rect.height
}).exec()
this.checkSX();
},
onShow() {
this.$toolAll.tools.isLogin()
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv();
this.cartNumEv();//
},
methods: {
cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
async checkSX(){//
this.$requst.get('spu/condition').then(res=>{
if(res.code==0){
this.zanBingArr = res.data;
}
})
await this.checkShopList();
},
chooseShopCate(index){//
if(this.activeIndex==index && this.isXiao) {
this.isXiao = false;
} else this.isXiao = true;
this.bingzList = [];
this.isClick = false;
this.activeIndex = index;
let arr = [];
let obj = {};
if(this.activeIndex==0) {
this.cateTitle = '病种选择';
this.zanBingArr.disease.forEach(item=>{
obj = {
pid: item.pid,
title: item.name,
id: item.id,
sort: item.sort,
isActive:false
}
arr.push(obj);
})
this.bingzList = arr;
this.bingzList.unshift({pid: '', title: "全部", id: '', sort: '',isActive:true});
this.bingzList.push({pid: '', title: "其他", id: '', sort: ''});
}
if(this.activeIndex==1) {
this.cateTitle = '职位选择';
this.zanBingArr.doctor_roles.forEach(item=>{
obj = {
id: item.id,
name: item.name,
title: item.title,
pid: item.pid,
is_group: item.is_group,
isActive:false
}
arr.push(obj);
})
this.bingzList = arr;
this.bingzList.unshift({id: '', name: '', title: "全部", pid: '', is_group: '',isActive:true});
}
if(this.activeIndex==2) {
this.cateTitle = '活动选择';
this.zanBingArr.activity.forEach(item=>{
obj = {
name: item.name,
title: item.title,
isActive:false
}
arr.push(obj);
})
this.bingzList = arr;
this.bingzList.unshift({name: '', title: "全部",isActive:true});
}
},
checkShopList(){
let params = {
keyword:this.searchVal,//
page:1,
size:10,
doctor_role:this.doctor_role,// doctor= design=
doctor_name:this.doctor_name,//
activity:this.activity,// + normal=group_make=group_buy=;limit_time=
disease_id:this.disease_id//ID
}
uni.request({
url:'https://hengmei.scdxtc.cn/api/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){
this.dataList = [];
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,//
disease_id:item.disease_id,//ID
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
this.dataList.push(obj)
})
this.loading = true;
}
}
}
})
// this.$requst.post('spu/list',params).then(res=>{
// if(res.code==0){
// this.dataList = [];
// if(res.data.list.length!=0){
// res.data.list.forEach(item=>{
// let tuan = false,ping = false,xian = false,integral = false;
// if(item.activity_type=='group_make') ping = true;
// if(item.activity_type=='group_buy') tuan = true;
// if(item.activity_type=='limit_time') xian = true;
// let group_cover = [];
// if(item.activity_group_cover.length!=0) {
// item.activity_group_cover.forEach(item=>{
// group_cover.push(this.$http + item)
// })
// }
// let obj = {
// id:item.id,
// imgSrc: this.$http + item.cover,
// title: item.name,
// zhePrice:item.price/100,
// yuanPrice:item.original_price/100,
// integral:'',
// isTuan:tuan,//
// isPing:ping,//
// isXian:xian,//
// isIntegral:integral,//
// grade:'',
// disease_name:item.disease_name,//
// disease_id:item.disease_id,//ID
// activity_end_at:item.activity_end_at,//
// activity_group_cover:group_cover,//
// activity_group_num:item.activity_group_num,//
// }
// this.dataList.push(obj)
// })
// this.loading = true;
// }
// }
// })
},
chooseBing(index){//
this.bingzList.forEach(item=>{
item.isActive = false;
})
this.bingzList[index].isActive = true;
this.shaiList[this.activeIndex] = this.bingzList[index].title;
console.log(this.shaiList);
},
chongz(){//
this.isClick = false;
this.shaiList = []
},
shaix(){//
this.isXiao = false
this.isClick = true;
this.checkShopList();
},
deleteSX(index){//
this.shaiList.splice(index,1);
if(this.shaiList.length==0){
this.isClick = false;
}
},
checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let reObj = {
id:item.id,
content:item.keyword
}
this.reSearchList[1].list.push(reObj)
})
}
}
},error=>{})
},
checkSearchHistory(){//
this.$requst.post('user/search-history',{page:this.page,size:this.size}).then(res=>{
// console.log(res);
if(res.code==0){
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
if(item.keyword!=null){
let searchObj = {
id:item.id,
content:item.keyword
}
this.reSearchList[0].list.push(searchObj)
}
})
}
}
},error=>{})
},
searchEv(){//
this.$toolAll.tools.showToast('搜索中...')
this.$requst.post('archives/category',{page:this.page,size:this.size,keyword:this.searchVal}).then(res=>{
// console.log('',res);
if(res.code==0){
//
if(this.page==1) this.dataList = []
this.total = res.data.list.total
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let tObj = {
id:item.id,
is_collected:item.is_collected,//
collects:item.collects,//
views:item.views,//
main_img:this.$http + item.cover,//
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(tObj)
})
}
let obj = {
content:this.searchVal
}
this.reSearchList[0].list.push(obj)
this.isList = false
}
},error=>{})
},
delev(){//
this.isShowT = true
},
comfirmev(){//
this.isShowT = false
this.$requst.post('user/clear-search').then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('已清空')
this.reSearchList[0].list = []//
}
},error=>{})
},
cancleev(){//
this.isShowT = false
},
chooseTwo(index){//
// console.log('',index);
this.isZanw = true
this.page = 1
this.newCurrent = index
this.searchEv()
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
</style>

View File

@ -8,7 +8,7 @@
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
<input class="fon28 width100" type="text" v-model="keyword" placeholder="请输入姓名/电话查找" placeholder-style="color: #B3B3B3;" />
<input class="fon28 width100" type="text" @confirm="searchEv" v-model="keyword" placeholder="请输入姓名/电话查找" placeholder-style="color: #B3B3B3;" />
</view>
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/public/gou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/public/sigined.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long