master
chen 2021-11-08 15:50:30 +08:00
parent 80800b98c7
commit ea5d9dbdfe
38 changed files with 743 additions and 241 deletions

View File

@ -18,6 +18,7 @@
},3000)
// checkSwip()//
toolAll.tools.checkQuan();
uni.removeStorageSync('isQuan');
},
onHide: function() {
toolAll.tools.closeTimer();//

View File

@ -23,6 +23,9 @@
.list-cont-box{bottom: 10rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 30rpx;border-bottom-right-radius: 30rpx;}
.list-cont-box15{bottom: 10rpx;left: 0rpx;right: 0; padding-top: 100rpx; background:-webkit-linear-gradient(bottom,rgba(0,0,0,0.79),rgba(255,255,255,0));padding-left: 22rpx;padding-right: 22rpx;padding-bottom: 18rpx;border-bottom-left-radius: 15rpx;border-bottom-right-radius: 15rpx;}
.list-headimg{width: 28rpx;height: 28rpx;margin-right: 6rpx;border-radius: 100%;}
.home-quan-box{background: rgba(0,0,0,.54);position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11;display: flex;justify-content: center;flex-direction: column;align-items: center;}
.home-quan-box image:first-child{width: 542rpx;height: 600rpx;}
.home-quan-box image:last-child{width: 96rpx;height: 96rpx;margin-top: 56rpx;}
/* 分类 */
.catemo{color: #4D4D4D;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;}
.cateActive{background-color: #F5F5F5;border-radius: 10rpx 0rpx 0rpx 10rpx;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;}

View File

@ -38,10 +38,6 @@
type:String,
default:'200'
},
newWidth:{//swiper
type:String,
default:'100%'
},
newBottom:{//
type:String,
default:'18'

View File

@ -305,6 +305,7 @@ const tools = {
uni.setStorageSync('openid',res.data.data.openid)//缓存Openid
uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式)
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
uni.setStorageSync('phone_active',res.data.data.phone_active)//是否绑定手机号
uni.setStorageSync('userId',res.data.data.account_id)
uni.setStorageSync('invite_code',res.data.data.invite_code)
// console.log('is_active',uni.getStorageSync('is_active'));
@ -317,17 +318,18 @@ const tools = {
},
returnAuth(){//是否第一次授权
let auth = false
// if(uni.getStorageSync('is_active')==0 || uni.getStorageSync('phone_active')==0) {
if(uni.getStorageSync('is_active')==0) {
this.showToast('您目前是游客,请授权登录')
setTimeout(()=>{
// this.showToast('您目前是游客,请授权登录')
// setTimeout(()=>{
uni.navigateTo({url:'/pages/login/login'})
},1500)
// },1500)
auth = true
}
return auth
},
isLogin(){//是否已经登录
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0 ){
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0 && uni.getStorageSync('phone_active') !=0){
this.overdue()
}
},

View File

@ -38,7 +38,6 @@
canIGetUserProfile: false,
imgSrc: '/static/public/logo.png',//logo
isShowP:false,
userCode:''
};
},
onLoad(options) {
@ -67,18 +66,16 @@
getphonenumber(e){//
let ya = this;
if(e.detail.errMsg=="getPhoneNumber:ok"){
console.log(e);
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
console.log('手机号信息:',res);
if(res.code==0){
// this.isShowP = false
this.$toolAll.tools.showToast('手机号绑定成功','success');
ya.updateUserInfo(this.userCode);
uni.setStorageSync('bindPhone',false)
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
} else {
// this.isShowP = false
// this.$toolAll.tools.showToast('','success')
// uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
}
@ -114,8 +111,7 @@
success: function(res) {
if (res.code) {
let code = res.code;
ya.userCode = code;
ya.isShowP = true;
ya.updateUserInfo(code);
} else {
uni.showToast({
title: '登录失败!',
@ -152,8 +148,10 @@
uni.setStorageSync('token',res.data.token)//token
uni.setStorageSync('expire',res.data.expire)//
uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('phone_active',res.data.phone_active)//
uni.setStorageSync('invite_code',res.data.invite_code)
uni.hideToast()
this.isShowP = true;
}
},error => {})
}

View File

@ -23,12 +23,100 @@
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" @choosecateEv="chooseTwo" :newcateList="cateListTwo"></cate-pu>
</view>
<!-- 列表 -->
<block v-if="!isHot">
<view v-if="dataList.length!=0">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :nFon="'14'" :radiu="true" :nmarz="'6'" :nWidth="'90'" :nHeight="'90'" :list="dataList"></list-pu>
</view>
<view v-else style="padding-top: 150rpx;">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="dataList"></list-pu>
</view>
</block>
<block v-else>
<view v-if="dataShopList.length!=0" style="margin-top: -20rpx;">
<view class="pad-sx20 pad-z20">
<view style="width: 48.6%;float: left;">
<view v-if="index1%2==0" v-for="(item1,index1) in dataShopList" :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="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.isXian || item1.isPing || item1.isTuan" 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 || 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 dataShopList" :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="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 || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 34%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">暂无内容</view>
</view>
</block>
</template>
<!-- 秃顶种植 -->
<template v-if="ccurrent!=0">
@ -85,6 +173,10 @@
bannerList:[],
titleList:[],
imgList:[],
zanArr:[],
dataShopList:[],
timeList:[],
isHot:false
}
},
onPageScroll(e) {
@ -93,7 +185,9 @@
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
if(!this.isHot){
this.checkCate(this.category_id)//
}
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
@ -186,6 +280,7 @@
},error=>{})
},
checkCate(category_id){//
this.dataShopList = [];
// this.$toolAll.tools.showToast('...')
this.$requst.post('archives/hot',{category_id:category_id,page:this.page,size:this.size}).then(res=>{
// console.log('',res);
@ -203,6 +298,7 @@
}
this.cateListTwo.push(cateObj)
})
this.cateListTwo.push({title:'热门商品'})
this.cateListTwo.push({title:'筛选'})
this.category_id = this.cateListTwo[0].id
}
@ -279,7 +375,8 @@
},
chooseTwo(index){//
this.newCurrent = index
this.isZanw = true
this.isZanw = true;
this.isHot = false;
this.page = 1
this.category_id = this.cateListTwo[index].id
// console.log('',this.cateListTwo[index].title);
@ -287,10 +384,114 @@
uni.navigateTo({
url:'/pagesB/searchPage/searchPage'
})
} else if(this.cateListTwo[index].title=='热门商品'){
this.isHot = true;
this.checkSotList()
} else {
this.checkCate(this.cateListTwo[index].id)
}
},
checkSotList(){
this.dataList = [];
let params = {
page:1,
size:2000,
is_hot:1
}
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){
clearInterval(this.timer);
// if(this.page==1) {
this.zanArr = [];
this.dataShopList = [];
this.timeList = [];
// }
this.total = res.data.total;
if(res.data.data.list.length!=0){
res.data.data.list.forEach(item=>{
let tuan = false,ping = false,xian = false,integral = false;
if(item.activity_type=='group_make') ping = true;
if(item.activity_type=='group_buy') tuan = true;
if(item.activity_type=='limit_time') xian = true;
let group_cover = [];
if(item.activity_group_cover.length!=0) {
item.activity_group_cover.forEach(item=>{
group_cover.push(this.$http + item)
})
}
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
title: item.name,
zhePrice:item.price/100,
yuanPrice:item.original_price/100,
integral:'',
isTuan:tuan,//
isPing:ping,//
isXian:xian,//
isIntegral:integral,//
grade:'',
disease_name:item.disease_name,//
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
this.zanArr.push(obj)
})
this.zanArr.forEach((item,index)=>{
if(item.activity_end_at!='') {
let obj = {
id:item.id,
reponseTime:item.reponseTime,
time:item.activity_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
this.$toolAll.tools.showToast('加载中...')
this.timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.zanArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
this.timeList[index].reponseTime = new Date(this.timeList[index].reponseTime).getTime() + 1000;//
if(this.timeList[index].reponseTime - endTime >=0) {// - >= 0
this.zanArr[item.nIndex].activity_end_at = "活动已结束";
} else {
//
this.zanArr[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.dataShopList = this.zanArr;
},1000)
} else {
this.dataShopList = this.zanArr;
}
}
}
}
})
},
goPage(id,index){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataShopList[index].isIntegral}`
})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,

View File

@ -198,6 +198,7 @@
guangImg:'',
isAuth:'',
guanggao:'',
userToken:''
}
},
onUnload: function() {
@ -207,8 +208,8 @@
},
onShow() {
uni.removeStorageSync('uinfo')//
this.$toolAll.tools.isLogin()
this.checkInfo()
this.$toolAll.tools.isLogin();
this.checkInfo();
uni.removeStorageSync('shareAll')//
this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res);
@ -402,6 +403,7 @@
onlyFromCamera: false, //,
scanType: ['qrCode'], // scanType :
success: (rt) => { //
if(rt.result.slice(0,1)=='{'){
let uc = JSON.parse(rt.result).user_coding
this.$requst.post('user/sign-in',{user_coding:uc}).then(res=>{
// console.log('',res);
@ -412,6 +414,7 @@
},2000)
}
},error=>{})
} else this.$toolAll.tools.showToast('请出示正确的码');
}
})
}
@ -423,11 +426,19 @@
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(narr[1]=='true'){//
this.$requst.post('staff/coupon/write-off-experience-coupon',{coupon_id:narr[0],secret:narr[2],account_id:this.userInfo.id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('核销成功...');
this.$toolAll.tools.showToast('核销成功');
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
} else {//
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=>{})
}
}
})
}

View File

@ -25,7 +25,21 @@
<view class="pad-x180">
<!-- 自定义轮播 -->
<view :style="{marginTop: (statusHNH+60)+'px'}">
<swiper-pu :bannerList="bannerList"></swiper-pu>
<!-- <swiper-pu :bannerList="bannerList"></swiper-pu> -->
<view class="banner-box">
<swiper :current="bcurrent" @change="changeBanner" :style="{height: 200+'px'}" :autoplay="isAutoPlay" :circular="true" :interval="3000" :duration="500">
<swiper-item v-for="(item,index) in bannerList" :key="index">
<view @tap="chooseImg(index)" class="posir">
<image :style="{borderRadius:0+'px',height:200+'px'}" class="img" :src="item.imgSrc" mode="aspectFill"></image>
<image @tap.stop="playVideo(index)" v-if="item.isVideo" class="posia" style="top: 50%;left: 50%;transform: translate(-50%,-50%);width: 126rpx;height: 126rpx;z-index: 1;" src="/static/public/video.png" mode=""></image>
</view>
</swiper-item>
</swiper>
<!-- 指示点 -->
<view class="dot-box" :style="{bottom:18+'px'}">
<view :class="bcurrent==indexd ? 'dotActive' : 'dotMo'" v-for="(itemd,indexd) in bannerList.length" :key="indexd"></view>
</view>
</view>
</view>
<!-- 宫格 -->
<view v-if="gonggList.length>1" class="mar-zy30 bacf radius10 pad-s25 mar-s10 disac fw">
@ -69,7 +83,7 @@
</template>
<template v-else>
<view class="disjcac fc" style="height: 100vh;">
<view class="fon24 col3">{{wuNet}}<text @tap="refresh" style="color: #007AFF;margin-left: 20rpx;">刷新</text></view>
<view class="fon24 col3">{{wuNet}}<text @tap="refresh" class="mar-z20 pcol">刷新</text></view>
</view>
</template>
<!-- 底部tab -->
@ -79,9 +93,9 @@
<!-- 底部客服 -->
<!-- <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 @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 class="home-quan-box" v-if="isQuan">
<image @tap="recerveEv" :src="quanImg" mode="aspectFill"></image>
<image @tap="closeEv" src="/static/public/closequan.png" mode=""></image>
</view>
</view>
</template>
@ -134,6 +148,8 @@
isNewRenderDone:false ,//
isQuan:uni.getStorageSync('isQuan'),
quanImg:uni.getStorageSync('quanImg'),
bcurrent:0,
isAutoPlay:false
}
},
onPageScroll(e) {
@ -148,6 +164,9 @@
this.isZanw = false
}
},
onHide() {
this.isAutoPlay = false;
},
onShow() {
log('输出的解构')
this.checkNet()
@ -163,6 +182,7 @@
uni.setStorageSync('chu',1)
}
this.checkKT()//
this.isAutoPlay = true;
},
onShareAppMessage(res) {},
onLoad(options) {
@ -218,12 +238,20 @@
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: {
changeBanner(e){
this.bcurrent = e.detail.current//
},
playVideo(index){
// console.log('');
uni.navigateTo({
url:`/pagesB/video/playVideo?src=${this.bannerList[index].url}&posterSrc=${this.bannerList[index].poster}`
})
},
checkQ(){//
this.$requst.post('user/home-coupon').then(res=>{
if(res.code==0){
@ -546,5 +574,9 @@
</script>
<style>
.banner-box{position: relative;}
.img{width:100%;}
.dot-box{position: absolute;bottom: 36rpx;display: flex;justify-content: center;width: 100%;}
.dotActive{width: 22rpx;height: 12rpx;margin-right: 10rpx;border-radius: 20rpx; background-color: rgba(56, 117, 246, 1);}
.dotMo{width: 12rpx;height: 12rpx;margin-right: 10rpx;border-radius: 100%;background-color: rgba(191, 191, 191, 1);}
</style>

View File

@ -17,18 +17,18 @@
<!-- 筛选结果 -->
<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 v-if="item!=null" 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 @tap.stop="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>
<view class="posir">
<input disabled @tap="chooseEv" type="text" class="mar-x40" v-model="doctorName" placeholder="请输入医生姓名并选择" />
<input disabled @tap="chooseEv" type="text" class="mar-x40" v-model="doctor_name" placeholder="请输入医生姓名并选择" />
<view v-if="showDoctor" class="posia" style="top: 52px;left: 0;right: 0;border: 1rpx solid #E6E6E6;padding: 20rpx;background: #FFFFFF;">
<view @tap="chooseDoctor(index)" class="disjbac fon28 col9" v-for="(item,index) in doctorList" :key="index">
<span>姓名{{item.doctor_extra.name}}</span>
@ -41,7 +41,7 @@
<!-- 重置筛选 -->
<view class="disjbac pad-zy20 mar-s50 mar-x30 pad-s20">
<view @tap="chongz"></view>
<view @tap="shaix"></view>
<view @tap.stop="shaix"></view>
</view>
</view>
</view>
@ -49,7 +49,7 @@
<!-- 数据列表 -->
<view v-if="loading" :style="{marginTop:statusHNH+titleHeight+(isClick?52:0)+'px'}">
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}商品`"></nothing-page>
<nothing-page v-if="dataList.length==0" :content="`暂无更多商品列表`"></nothing-page>
</view>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='3'></foot-tab>
@ -95,7 +95,6 @@
disease_id:'',//ID
loading:false,
cartNum:0,
doctorName:'',
doctorList:[],
showDoctor:false
}
@ -117,13 +116,15 @@
},
methods: {
chooseDoctor(index){//
this.searchVal = this.doctorName = this.doctorList[index].doctor_extra.name;
this.shaiList = [];
this.doctor_name = this.doctorList[index].doctor_extra.name;
this.shaiList.push(this.doctor_name);
this.showDoctor = false;
},
chooseEv(){//
this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{
if(res.code==0){
this.doctorName = '';
this.doctor_name = '';
if(res.data.list.length!=0){
this.doctorList = res.data.list;
this.showDoctor = true;
@ -151,6 +152,8 @@
this.isXiao = false;
} else this.isXiao = true;
this.bingzList = [];
this.doctor_name = '';//
this.isClick = false;
this.activeIndex = index;
let arr = [];
@ -202,8 +205,10 @@
}
},
checkShopList(){
let keyWord = this.searchVal;
if(this.shaiList.length!=0) keyWord = this.shaiList.filter(item=>item!=null).join(',');
let params = {
keyword:this.searchVal,//
keyword:'',//
page:1,
size:2000,
doctor_role:this.doctor_role,// doctor= design=
@ -267,7 +272,12 @@
})
this.bingzList[index].isActive = true;
this.shaiList[this.activeIndex] = this.bingzList[index].title;
console.log(this.shaiList);
// id
if(this.activeIndex===0) {this.disease_id = this.bingzList[index].id;}
//
if(this.activeIndex===1) {this.doctor_role = this.bingzList[index].name;}
// type
if(this.activeIndex===2) {this.activity = this.bingzList[index].name;}
},
chongz(){//
this.isClick = false;
@ -276,7 +286,6 @@
shaix(){//
this.isXiao = false
this.isClick = true;
this.checkShopList();
},
deleteSX(index){//
@ -284,6 +293,7 @@
if(this.shaiList.length==0){
this.isClick = false;
}
this.checkShopList();
},
searchEv(){//
uni.navigateTo({

View File

@ -21,36 +21,27 @@
<view class="disjcac">
<!-- 线上签到 -->
<view v-if="item.ntype=='sign_in'" class="disja">
<view class="disja" v-if="item.account_status!=1">
<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.account_status==1">
<view class="activity-mo mar-s30"><span>已完成</span></view>
</view>
<view v-if="item.danc!=item.allc" @tap="goTosigin" class="mar-s30 activity-dai"></view>
<view v-if="item.danc==item.allc && item.account_status!=1" @tap="btnEv(index)" class="mar-s30 activity-mo" style="background: #f8bf2c;"></view>
<view v-if="item.danc==item.allc && item.account_status==1" class="activity-mo mar-s30"></view>
</view>
<!-- 分享截图任务 -->
<view v-if="item.ntype=='share_screenshots'" class="disja">
<view class="disja" v-if="item.account_status!=1">
<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 v-if="item.account_status==1">
<view class="activity-mo mar-s30"><span>已完成</span></view>
</view>
<view v-if="item.account_status==3 || item.account_status==4" @tap="btnEv(index)" class="activity-dai mar-s30"></view>
<view v-if="item.account_status==0" class="activity-mo mar-s30">...</view>
<view v-if="item.account_status==2" @tap="btnEv(index)" class="activity-dai mar-s30"></view>
<view v-if="item.account_status==1" class="activity-mo mar-s30"></view>
</view>
<!-- 线下签到 -->
<view v-if="item.ntype=='offline_sign_in'" class="disja">
<view v-if="item.account_status==4" @tap="btnEv(index)" class="mar-s30 activity-dai"><span>立即完成</span></view>
<view v-else class="activity-mo mar-s30"><span>已完成</span></view>
<view v-if="item.account_status==4" @tap="btnEv(index)" class="mar-s30 activity-dai"></view>
<view v-else class="activity-mo mar-s30">已完成</view>
</view>
<!-- 分享注册任务 -->
<view v-if="item.ntype=='share'">
<view v-if="item.account_status==4" @tap="btnEv(index)" class="mar-s30 activity-dai"><span>立即完成</span></view>
<view v-else class="activity-mo mar-s30"><span>已完成</span></view>
<view v-if="item.account_status==4" @tap="btnEv(index)" class="mar-s30 activity-dai"></view>
<view v-else class="activity-mo mar-s30">已完成</view>
</view>
</view>
</view>
<!-- 分享孔雀币 -->
@ -159,13 +150,35 @@
methods: {
btnEv(index){
this.chooseIndex = index;
if(this.activityList[index].ntype=='share_screenshots'){//
if(this.activityList[index].account_status!=0 || this.activityList[index].account_status==2){
this.isScreenshot = true;
}
}
if(this.activityList[index].ntype=='offline_sign_in'){//线
if(this.activityList[index].account_status==4) {
this.$toolAll.tools.showToast('请先完成任务,再来领取')
} else {
this.$toolAll.tools.showToast('领取成功');
this.checkList();
}
}
if(this.activityList[index].ntype=='share'){//
if(this.activityList[index].account_status==4){
uni.navigateTo({
url:'/pagesB/personalPoster/personalPoster'
})
} else {
this.$toolAll.tools.showToast('领取成功')
}
}
if(this.activityList[index].isIcon!=3 && this.activityList[index].account_status==1 || this.activityList[index].account_status==3) {
if(this.isNum==0) {
console.log(1);
this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{
if(res.code==0){
this.isNum = 0;
this.checkList();
} else {
setTimeout(()=>{
this.isNum = 0;
@ -174,15 +187,6 @@
}
})
}
} else {
if(this.activityList[index].account_status==1 || this.activityList[index].account_status==3){
this.isScreenshot = true;
}
if(this.activityList[index].account_status==0){
this.$toolAll.tools.showToast('正在审核...');
}else {
this.$toolAll.tools.showToast('请先完成任务,再来领取');
}
}
setTimeout(()=>{
this.isNum = 0;

View File

@ -37,7 +37,8 @@
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isTY=true">
<view class="fon28 col3">体验券使用</view>
<view class="mar-sx30">
<image :src="tyImg" class="quan-tk-em" style="width: 325rpx;height: 325rpx;" mode="aspectFill"></image>
<!-- <image :src="tyImg" class="quan-tk-em" style="width: 325rpx;height: 325rpx;" mode="aspectFill"></image> -->
<yz-qr ref="qrPath" :text="text" :size="size" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
</view>
<view class="fon24 col3 mar-s40 mar-x20">工作人员扫码使用体验券</view>
<image @tap.stop="isTY=false" src="/static/public/closequan.png" class="posia quan-tk-btn" mode=""></image>
@ -47,7 +48,11 @@
</template>
<script>
import yzQr from '@/components/yz-qr/yz-qr.vue';
export default {
components:{
yzQr
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
@ -62,7 +67,14 @@
size:10,
quanStatus:'normal',//
loading:false,
tyImg:''//使img
tyImg:'',//使img
canvasQrPath: '',
text: 'hello',
size: 162,
colorDark: '#000000',
colorLight: '#ffffff',
timer:null,
secret:''
}
},
onShow() {
@ -135,7 +147,26 @@
}
})
}
if(this.dataList[index].isTiyan==true && this.dataList[index].statusNum==0){this.isTY = true;this.tyImg = this.dataList[index].cover;}
if(this.dataList[index].isTiyan==true && this.dataList[index].statusNum==0){
this.tyImg = this.dataList[index].cover;
this.$requst.post('user/exhibition-experience-coupon',{coupon_id:this.dataList[index].id}).then(res=>{
if(res.code==0){
this.isTY = true;
this.text = `${this.dataList[index].id},true,${res.data.secret}`;
this.secret = res.data.secret;
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
this.timer = setInterval(()=>{
this.$requst.post('staff/coupon/write-off-experience-couponQuery',{coupon_id:this.dataList[index].id,secret:this.secret}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('使用成功');
this.isTY = false;
clearInterval(this.timer);
this.checkAllList(0);
} else this.$toolAll.tools.showToast(res.msg);
})
},3000)
}
}
}
}

View File

@ -384,7 +384,7 @@
let obj = {
sku_coding:item.coding,
num:item.num,
group_id:item.group_id
group_id:item.pin_user_id
}
nsku_list.push(obj);
is_only = item.is_only;
@ -413,56 +413,55 @@
is_score:is_score,//0 1
coin:this.zf_kqPrice//
}
console.log('拼单人ID',this.orderList.pin_user_id);
// 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 {
// if(this.times==0){
// this.times++;
// if(this.allPrice==0){
// this.$toolAll.tools.showToast('','loading',1500);
// } else {
// 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;
// }
// }
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 {
if(this.times==0){
this.times++;
if(this.allPrice==0){
this.$toolAll.tools.showToast('正在支付','loading',1500);
} else {
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){

View File

@ -46,7 +46,7 @@
<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 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 File

@ -3,6 +3,7 @@
<!-- 状态栏 -->
<status-nav :titleVal="'签到管理'" :statusTitle="true"></status-nav>
<view v-if="loading" :style="{paddingTop: statusHNH+'px'}" class=" fon28 col3">
<view style="position: sticky;z-index: 3;background: #FFFFFF;padding-bottom: 20rpx;" :style="{top:statusHNH+'px'}">
<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;">
@ -17,7 +18,6 @@
<view v-for="(item,index) in timeList" :key="index" class="disjcac fc">
<view class="disjcac fon24 posir sigin-day" :style="{color:item.isSign?'#789CFB':'#FFFFFF',background:item.isSign?'#FFFFFF':''}">
+{{item.num}}
<!-- <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>
@ -25,10 +25,12 @@
</view>
</view>
</view>
<view class="mar-s20 fon28 col3 bold mar-z50">签到记录</view>
</view>
<!-- 获取列表提现列表 -->
<view class="pad-zy30">
<view class="mar-s20 bacf pad20 radius20">
<view class="mar-x20 fon28 col3 bold">签到记录</view>
<view class="bacf pad-zy20 pad-x20 radius20">
<scroll-view scroll-y="true" >
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
@ -36,6 +38,7 @@
</view>
<view class="fon36 bold pcol">+{{item.num}}</view>
</view>
</scroll-view>
</view>
</view>
</view>
@ -55,10 +58,21 @@
user_score:0,//
page:1,
size:10,
total:'',//
isZanw:true,
isSigin:0,
loading:false
}
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkTime()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000,'bottom')
this.isZanw = false
}
},
onLoad() {
this.$toolAll.tools.isLogin();
this.checkTime();
@ -80,7 +94,8 @@
checkTime(){
this.$requst.post('sign/online-sign-record',{page:this.page,size:this.size}).then(res=>{
if(res.code==0){
this.dataList = [];
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.length!=0){
res.data.forEach(item=>{
let obj = {
@ -91,7 +106,7 @@
this.dataList.push(obj);
})
}
}
} else this.$toolAll.tools.showToast(res.msg);
})
},
checkList(){

View File

@ -234,7 +234,6 @@
})
this.loading = true;
}
console.log(nArr);
nArr.forEach((item,index)=>{
if(item.activity_end_at!='') {
let obj = {

View File

@ -113,6 +113,89 @@
<view class="fon24 col3">暂无内容</view>
</view>
</view>
<block v-if="isHot">
<view v-if="dataShopList.length!=0" style="margin-top: -20rpx;">
<view class="pad20">
<view style="width: 48.6%;float: left;">
<view v-if="index1%2==0" v-for="(item1,index1) in dataShopList" :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="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.isXian || item1.isPing || item1.isTuan" 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 || 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 dataShopList" :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="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 || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
</view>
</view>
<!-- <nothing-page v-if="dataShopList.length==0" :content="`暂无更多商品列表`"></nothing-page> -->
</block>
</view>
<view class="posixzy disjbac bacf pad-zy32 btnBKS">
<view class="posir">
@ -197,7 +280,11 @@
// jieDuan:false,
share_id:0,
invite_code:'',
isShowP:false
isShowP:false,
zanArr:[],
dataShopList:[],
timeList:[],
isHot:false
}
},
onPageScroll(e) {
@ -421,6 +508,7 @@
//
if(this.category_id==item.id) this.isNum = index
})
this.cateList.push({title:'热门商品'})
}
if(this.invite_code!='' && this.invite_code!=undefined){
const query = wx.createSelectorQuery()
@ -515,6 +603,10 @@
},
choosecateEv(e){
this.cateCurrent = e
this.isHot = false;
if(this.cateList[e].title=='热门商品'){
this.checkSotList();
} else {
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{
// console.log('',res);
if(res.code==0){
@ -551,6 +643,7 @@
}
}
},error=>{})
}
},
tapLike(){//
// if(!this.jieDuan){
@ -586,6 +679,107 @@
// } else this.jieDuan = true
// }
},
checkSotList(){//
this.isHot = true;
let params = {
page:1,
size:2000,
is_hot:1
}
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){
clearInterval(this.timer);
// if(this.page==1) {
this.zanArr = [];
this.dataShopList = [];
this.timeList = [];
// }
this.total = res.data.total;
if(res.data.data.list.length!=0){
res.data.data.list.forEach(item=>{
let tuan = false,ping = false,xian = false,integral = false;
if(item.activity_type=='group_make') ping = true;
if(item.activity_type=='group_buy') tuan = true;
if(item.activity_type=='limit_time') xian = true;
let group_cover = [];
if(item.activity_group_cover.length!=0) {
item.activity_group_cover.forEach(item=>{
group_cover.push(this.$http + item)
})
}
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
title: item.name,
zhePrice:item.price/100,
yuanPrice:item.original_price/100,
integral:'',
isTuan:tuan,//
isPing:ping,//
isXian:xian,//
isIntegral:integral,//
grade:'',
disease_name:item.disease_name,//
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
this.zanArr.push(obj)
})
this.zanArr.forEach((item,index)=>{
if(item.activity_end_at!='') {
let obj = {
id:item.id,
reponseTime:item.reponseTime,
time:item.activity_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
this.$toolAll.tools.showToast('加载中...')
this.timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.zanArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
this.timeList[index].reponseTime = new Date(this.timeList[index].reponseTime).getTime() + 1000;//
if(this.timeList[index].reponseTime - endTime >=0) {// - >= 0
this.zanArr[item.nIndex].activity_end_at = "活动已结束";
} else {
//
this.zanArr[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.dataShopList = this.zanArr;
},1000)
} else {
this.dataShopList = this.zanArr;
}
}
}
}
})
},
goPage(id,index){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataShopList[index].isIntegral}`
})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,

View File

@ -159,6 +159,7 @@
<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 class="fon24 col3 tc">暂无更多内容</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
@ -169,6 +170,7 @@
<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 class="fon24 col3 tc">暂无更多内容</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
@ -179,6 +181,7 @@
<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 class="fon24 col3 tc">暂无更多内容</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
@ -189,6 +192,7 @@
<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 class="fon24 col3 tc">暂无更多内容</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
@ -725,11 +729,11 @@
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;
}
if(res.data.data.detail.activity_end_at!=undefined){
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
@ -742,6 +746,7 @@
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,
@ -761,6 +766,7 @@
//
this.bannerList.push(newImgObj)
})
console.log(this.bannerList);
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
@ -867,9 +873,9 @@
url:`/pagesB/doctorDetail/doctorDetail?doctor_id=${id}`
})
},
choosecateEv(e){
choosecateEv(e){//
this.cateCurrent = e
this.$requst.post('archives/category',{category_id:this.cateList[e].id,keyword:''}).then(res=>{
this.$requst.post('archives/category',{category_id:this.cateList[e].id,page:1,size:2000}).then(res=>{
// console.log('',res);
if(res.code==0){
if(e==1 && this.active!=e) this.listArrone = []

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