master
chen 2021-11-04 15:41:53 +08:00
parent 0da5ee3496
commit 80800b98c7
34 changed files with 573 additions and 493 deletions

View File

@ -234,7 +234,7 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.receive-left{width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;} .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-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;} .activity-mo{width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #CCCCCC;}
.task-cancle-btn,.task-confrim-btn{width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;} .task-cancle-btn,.task-confrim-btn{width: 196rpx;height: 60rpx;line-height: 60rpx;border-radius: 10rpx;}
.task-cancle-btn{background: #E6E6E6;color: #FFFFFF;} .task-cancle-btn{background: #E6E6E6;color: #FFFFFF;}
.task-confrim-btn{background: #3875F6;color: #FFFFFF;} .task-confrim-btn{background: #3875F6;color: #FFFFFF;}

View File

@ -112,6 +112,7 @@
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
newList:[], newList:[],
timeList:[],// timeList:[],//
timer:''
}; };
}, },
mounted() { mounted() {
@ -129,7 +130,7 @@
}) })
this.$toolAll.tools.showToast('加载中...','none',1000); this.$toolAll.tools.showToast('加载中...','none',1000);
if(this.timeList!=0){ if(this.timeList!=0){
let timer = setInterval(()=>{// this.timer = setInterval(()=>{//
if(this.timeList.length!=0){ if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{ this.timeList.forEach((item,index)=>{
if(item.id==this.dataList[item.nIndex].id){ if(item.id==this.dataList[item.nIndex].id){
@ -152,6 +153,11 @@
} }
}, },
methods:{ methods:{
destroyev(){
uni.clearInterval(this.timer);
console.log(12);
this.$emit('destroyEv')
},
goPage(id,index){// goPage(id,index){//
uni.navigateTo({ uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataList[index].isIntegral}` url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataList[index].isIntegral}`

View File

@ -347,8 +347,11 @@ const tools = {
let totalSecond = ''; let totalSecond = '';
// 本地倒计时 // 本地倒计时
// if(startTime=='') totalSecond = Math.floor((new Date(endTime).getTime() - new Date().getTime())/1000); // if(startTime=='') totalSecond = Math.floor((new Date(endTime).getTime() - new Date().getTime())/1000);
// 解决苹果手机问题
let date = endTime;
date = endTime.replace(/-/g,'/')
// 服务器倒计时 // 服务器倒计时
if(startTime!='') totalSecond = Math.floor((new Date(endTime).getTime() - startTime)/1000); if(startTime!='') totalSecond = Math.floor((new Date(date).getTime() - startTime)/1000);
// 总秒数 // 总秒数
let second = totalSecond; let second = totalSecond;
// 天数 // 天数

View File

@ -37,7 +37,8 @@
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
canIGetUserProfile: false, canIGetUserProfile: false,
imgSrc: '/static/public/logo.png',//logo imgSrc: '/static/public/logo.png',//logo
isShowP:false isShowP:false,
userCode:''
}; };
}, },
onLoad(options) { onLoad(options) {
@ -59,26 +60,27 @@
}, },
methods: { methods: {
refuse(){// refuse(){//
this.isShowP=false this.isShowP=false;
this.$toolAll.tools.showToast('登录成功','success') this.$toolAll.tools.showToast('登录成功','success')
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'}) uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
}, },
getphonenumber(e){// getphonenumber(e){//
console.log(e); let ya = this;
if(e.detail.errMsg=="getPhoneNumber:ok"){ if(e.detail.errMsg=="getPhoneNumber:ok"){
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{ this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
console.log('手机号信息:',res); console.log('手机号信息:',res);
if(res.code==0){ if(res.code==0){
this.isShowP = false // this.isShowP = false
this.$toolAll.tools.showToast('手机号绑定成功','success') this.$toolAll.tools.showToast('手机号绑定成功','success');
ya.updateUserInfo(this.userCode);
uni.setStorageSync('bindPhone',false) uni.setStorageSync('bindPhone',false)
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'}) uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
} } else this.$toolAll.tools.showToast(res.msg);
},error=>{}) },error=>{})
} else { } else {
this.isShowP = false // this.isShowP = false
this.$toolAll.tools.showToast('登录成功','success') // this.$toolAll.tools.showToast('','success')
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'}) // uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
} }
}, },
goXie(){ goXie(){
@ -112,7 +114,8 @@
success: function(res) { success: function(res) {
if (res.code) { if (res.code) {
let code = res.code; let code = res.code;
ya.updateUserInfo(code); ya.userCode = code;
ya.isShowP = true;
} else { } else {
uni.showToast({ uni.showToast({
title: '登录失败!', title: '登录失败!',
@ -151,7 +154,6 @@
uni.setStorageSync('is_active',res.data.is_active)// uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('invite_code',res.data.invite_code) uni.setStorageSync('invite_code',res.data.invite_code)
uni.hideToast() uni.hideToast()
this.isShowP = true
} }
},error => {}) },error => {})
} }

View File

@ -246,6 +246,14 @@
}) })
},1000) },1000)
} }
if(res.code==302){
this.$toolAll.tools.showToast(res.msg);
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
}
}) })
}, },
closeEv(){ closeEv(){

View File

@ -6,7 +6,7 @@
<view class="search-input-box bacf poszy shop-nav-box" :style="{top: statusHNH+'px'}"> <view class="search-input-box bacf poszy shop-nav-box" :style="{top: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20"> <view class="disac pad-zy30 mar-s20">
<!-- 输入框 --> <!-- 输入框 -->
<input @focus="focusEv" class="width100 fon34 radius10" type="text" @confirm="searchEv" v-model="searchVal" placeholder="请输入商品名称"/> <input class="width100 fon34 radius10" type="text" @confirm="searchEv" v-model="searchVal" placeholder="请输入商品名称"/>
<!-- 搜索 --> <!-- 搜索 -->
<view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" @tap="searchEv" :style="{background:publicColor}">搜索</view> <view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" @tap="searchEv" :style="{background:publicColor}">搜索</view>
</view> </view>
@ -27,7 +27,15 @@
</view> </view>
<view v-if="activeIndex==1"> <view v-if="activeIndex==1">
<view class="fon28 bold mar-sx40">医生选择</view> <view class="fon28 bold mar-sx40">医生选择</view>
<input type="text" class="mar-x40" value="" placeholder="请输入医生姓名并选择" /> <view class="posir">
<input disabled @tap="chooseEv" type="text" class="mar-x40" v-model="doctorName" 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>
<span>部门{{item.doctor_extra.skill}}</span>
</view>
</view>
</view>
</view> </view>
</view> </view>
<!-- 重置筛选 --> <!-- 重置筛选 -->
@ -39,7 +47,7 @@
</view> </view>
<view v-if="isXiao" @tap="isXiao=false" class="moban"></view> <view v-if="isXiao" @tap="isXiao=false" class="moban"></view>
<!-- 数据列表 --> <!-- 数据列表 -->
<view v-if="loading" :style="{marginTop:statusHNH+titleHeight+'px'}"> <view v-if="loading" :style="{marginTop:statusHNH+titleHeight+(isClick?52:0)+'px'}">
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList> <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="`暂无更多${searchVal}商品`"></nothing-page>
</view> </view>
@ -86,7 +94,10 @@
activity:'',// + normal=group_make=group_buy=;limit_time= activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:'',//ID disease_id:'',//ID
loading:false, loading:false,
cartNum:0 cartNum:0,
doctorName:'',
doctorList:[],
showDoctor:false
} }
}, },
onShow() { onShow() {
@ -94,8 +105,8 @@
this.cartNumEv();// this.cartNumEv();//
}, },
onLoad() { onLoad() {
this.titleList = uni.getStorageSync('footTitle') this.titleList = uni.getStorageSync('footTitle');
this.imgList = uni.getStorageSync('footimg') this.imgList = uni.getStorageSync('footimg');
// + // +
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => { query.select('.search-input-box').boundingClientRect((rect) => {
@ -105,6 +116,21 @@
this.checkSX(); this.checkSX();
}, },
methods: { methods: {
chooseDoctor(index){//
this.searchVal = this.doctorName = this.doctorList[index].doctor_extra.name;
this.showDoctor = false;
},
chooseEv(){//
this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{
if(res.code==0){
this.doctorName = '';
if(res.data.list.length!=0){
this.doctorList = res.data.list;
this.showDoctor = true;
} else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg);
})
},
cartNumEv(){// cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{ this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
if(res.code==0){ if(res.code==0){
@ -250,6 +276,7 @@
shaix(){// shaix(){//
this.isXiao = false this.isXiao = false
this.isClick = true; this.isClick = true;
this.checkShopList(); this.checkShopList();
}, },
deleteSX(index){// deleteSX(index){//
@ -258,16 +285,10 @@
this.isClick = false; this.isClick = false;
} }
}, },
focusEv(){
uni.navigateTo({
url:'/pagesB/shopSearch/shopSearch'
})
},
searchEv(){// searchEv(){//
// uni.navigateTo({ uni.navigateTo({
// url:'/pagesB/shopSearch/shopSearch' url:`/pagesB/shopSearch/shopSearch?keyWorld=${this.searchVal}`
// }) })
// this.checkShopList();
} }
} }
} }

View File

@ -19,19 +19,38 @@
<view class="mar-s20">结束时间{{item.endTime}}</view> <view class="mar-s20">结束时间{{item.endTime}}</view>
</view> </view>
<view class="disjcac"> <view class="disjcac">
<!-- 线下签到 --> <!-- 线上签到 -->
<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 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 @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 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>
<view v-if="item.ntype!='offline_sign_in' && item.ntype!='sign_in'"> <view v-if="item.account_status==1">
<view class="activity-mo mar-s30"><span>已完成</span></view>
</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':''}"> <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> <span>{{['审核中...','立即完成','审核不通过'][item.account_status]}}</span>
</view> </view>
</view> </view>
<view v-if="item.account_status==1">
<view class="activity-mo mar-s30"><span>已完成</span></view>
</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>
<!-- 分享注册任务 -->
<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>
</view> </view>
</view> </view>
<!-- 分享孔雀币 --> <!-- 分享孔雀币 -->
@ -132,15 +151,17 @@
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.checkList();
}, },
onLoad() { onLoad() {
this.checkList();
}, },
methods: { methods: {
btnEv(index){ btnEv(index){
this.chooseIndex = index; this.chooseIndex = index;
if(this.activityList[index].isIcon!=3 && this.activityList[index].account_status==1 || this.activityList[index].account_status==3) { if(this.activityList[index].isIcon!=3 && this.activityList[index].account_status==1 || this.activityList[index].account_status==3) {
if(this.isNum==0) { if(this.isNum==0) {
console.log(1);
this.isNum++; this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{ this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{
if(res.code==0){ if(res.code==0){
@ -157,7 +178,15 @@
if(this.activityList[index].account_status==1 || this.activityList[index].account_status==3){ if(this.activityList[index].account_status==1 || this.activityList[index].account_status==3){
this.isScreenshot = true; this.isScreenshot = true;
} }
if(this.activityList[index].account_status==0){
this.$toolAll.tools.showToast('正在审核...');
}else {
this.$toolAll.tools.showToast('请先完成任务,再来领取');
} }
}
setTimeout(()=>{
this.isNum = 0;
},2000)
}, },
checkList(){// checkList(){//
this.$requst.post('task/task/task-list').then(res=>{ this.$requst.post('task/task/task-list').then(res=>{

View File

@ -208,7 +208,7 @@
isSuccess:false,// isSuccess:false,//
ntype:'money',//money coin ntype:'money',//money coin
times:0,// times:0,//
isCurrent:2 isCurrent:2,
} }
}, },
onShow() { onShow() {
@ -412,57 +412,57 @@
is_only:is_only,//0 2 is_only:is_only,//0 2
is_score:is_score,//0 1 is_score:is_score,//0 1
coin:this.zf_kqPrice// coin:this.zf_kqPrice//
} }
if(this.addressInfo=='' && self!=1){ console.log('拼单人ID',this.orderList.pin_user_id);
this.$toolAll.tools.showToast('请完善收件人信息'); // if(this.addressInfo=='' && self!=1){
} else if(nphone=='') { // this.$toolAll.tools.showToast('');
this.$toolAll.tools.showToast('请填写收货人手机号'); // } else if(nphone=='') {
this.focusEv(); // this.$toolAll.tools.showToast('');
} else if(this.$toolAll.tools.isPhone(nphone)) { // this.focusEv();
this.$toolAll.tools.showToast('请正确填写收货人手机号'); // } else if(this.$toolAll.tools.isPhone(nphone)) {
this.focusEv(); // this.$toolAll.tools.showToast('');
} else if(this.isNei == 3 && !this.payFS[2].isActive){// // this.focusEv();
this.$toolAll.tools.showToast('请选择积分付款方式'); // } else if(this.isNei == 3 && !this.payFS[2].isActive){//
} else if(this.isNei == 3 && this.expressInfo.default_price!=0){// // this.$toolAll.tools.showToast('');
this.$toolAll.tools.showToast('请添加微信支付方式'); // } else if(this.isNei == 3 && this.expressInfo.default_price!=0){//
} else if(this.isNei != 3 && !this.payFS[0].isActive && !this.payFS[1].isActive){ // this.$toolAll.tools.showToast('');
this.$toolAll.tools.showToast('请选择支付方式') // } else if(this.isNei != 3 && !this.payFS[0].isActive && !this.payFS[1].isActive){
} else if(this.isNei != 3 && !this.payFS[0].isActive && this.allPrice*1 > this.coin_price*1){ // this.$toolAll.tools.showToast('')
this.$toolAll.tools.showToast('孔雀币不足'); // } else if(this.isNei != 3 && !this.payFS[0].isActive && this.allPrice*1 > this.coin_price*1){
} else { // this.$toolAll.tools.showToast('');
if(this.times==0){ // } else {
this.times++; // if(this.times==0){
if(this.allPrice==0){ // this.times++;
this.$toolAll.tools.showToast('正在支付','loading',1500); // if(this.allPrice==0){
} else { // this.$toolAll.tools.showToast('','loading',1500);
this.$toolAll.tools.showToast('正在调起支付','loading',1500); // } else {
} // this.$toolAll.tools.showToast('','loading',1500);
uni.request({ // }
url:'https://hengmei.scdxtc.cn/api/order/create', // uni.request({
data:parmas, // url:'https://hengmei.scdxtc.cn/api/order/create',
method:'post', // data:parmas,
header:{ // method:'post',
'Content-Type': 'application/json; charset=UTF-8', // header:{
'Authorization': 'Bearer '+uni.getStorageSync('token') || '' // 'Content-Type': 'application/json; charset=UTF-8',
}, // 'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
success: (res) => { // },
if(res.data.code==0){ // success: (res) => {
this.times = 0; // if(res.data.code==0){
this.payment(res.data.data); // this.times = 0;
// uni.setStorageSync('orderList',this.orderList); // this.payment(res.data.data);
// uni.setStorageSync('orderInfo',res.data.data); // // uni.setStorageSync('orderList',this.orderList);
// uni.navigateTo({ // // uni.setStorageSync('orderInfo',res.data.data);
// url:`/pagesA/immediatePayment/immediatePayment?allPrice=${this.allPrice}&allNum=${this.allNum}&startTime=${new Date(res.header.Date).getTime()}` // // 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;
// }
// }
// }) // })
} else { // }
this.$toolAll.tools.showToast(res.data.msg); // }
this.times = 0;
}
}
})
}
}
}, },
payment(info){ payment(info){
if(info.needPay){ if(info.needPay){

View File

@ -9,16 +9,16 @@
<view class="disjb"> <view class="disjb">
<view class="disac"> <view class="disac">
<!-- 头像 --> <!-- 头像 -->
<image class="mar-sx20" src="/static/public/like.png" style="width:90rpx;height: 90rpx;border-radius: 100%;" mode="aspectFill"></image> <image class="mar-sx20" :src="levelInfo.headimgurl" style="width:90rpx;height: 90rpx;border-radius: 100%;" mode="aspectFill"></image>
<view class="mar-z20"> <view class="mar-z20">
<!-- 昵称 --> <!-- 昵称 -->
<view class="fon28 bold disac">昵称<view style="background: #FFFFFF;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFBD39;padding: 5rpx 16rpx;margin-left: 10rpx;">VIP</view></view> <view class="fon28 bold disac">{{levelInfo.nickname}}<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 class="mar-s10" style="color: #C27417;">{{levelInfo.level.name}}</view>
</view> </view>
</view> </view>
<view class="mar-s30 " style="color: #C27417;">当前等级</view> <view class="mar-s30 " style="color: #C27417;">当前等级</view>
</view> </view>
<view style="margin-top: 62rpx;color: #C27417;">还差1200积分升级</view> <view style="margin-top: 62rpx;color: #C27417;">还差{{levelInfo.level.value}}积分升级</view>
<view class="fon28 mar-s10" style="color: #C49F74;">升级到钻石会员享有更多权益</view> <view class="fon28 mar-s10" style="color: #C49F74;">升级到钻石会员享有更多权益</view>
</view> </view>
<image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/member.png" mode=""></image> <image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/member.png" mode=""></image>
@ -26,7 +26,7 @@
<!-- 功能列表 --> <!-- 功能列表 -->
<view class="bacf radius20 mar-s20"> <view class="bacf radius20 mar-s20">
<view class="disac fon28 fw pad-x20" style="color: #C27417;"> <view class="disac fon28 fw pad-x20" style="color: #C27417;">
<view v-for="(itemh,indexh) in huiList" :key="indexh" class="mar-s20" style="width: 25%;"> <view v-if="levelInfo.level.rights[indexh]==itemh.ntype" v-for="(itemh,indexh) in huiList" :key="indexh" class="mar-s20" style="width: 25%;">
<view class="disac fc"> <view class="disac fc">
<image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image> <image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemh.title}}</view> <view class="mar-s20 mar-x10">{{itemh.title}}</view>
@ -37,7 +37,8 @@
<!-- 当前权益介绍 --> <!-- 当前权益介绍 -->
<view class="bacf radius20 mar-s20 pad20"> <view class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon32 bold" style="color: #C27417;">当前权益介绍</view> <view class="mar-x30 fon32 bold" style="color: #C27417;">当前权益介绍</view>
<image src="../../static/public/dang-quan.png" style="width: 100%;" mode="widthFix"></image> <rich-text :nodes="detailInfo"></rich-text>
<!-- <image src="../../static/public/dang-quan.png" style="width: 100%;" mode="widthFix"></image> -->
</view> </view>
<view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view> <view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view>
</view> </view>
@ -57,13 +58,15 @@
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
huiList:[ huiList:[
{src:'/static/public/ru-hui50.png',title:'入会权益'}, {src:'/static/public/ru-hui50.png',title:'入会权益',ntype:'membership_interests'},
{src:'/static/public/birthday50.png',title:'生日礼物'}, {src:'/static/public/birthday50.png',title:'生日礼物',ntype:'birthday'},
{src:'/static/public/member-scor50.png',title:'积分权益'}, {src:'/static/public/member-scor50.png',title:'积分权益',ntype:'score'},
{src:'/static/public/te-quan50.png',title:'特权日'}, {src:'/static/public/te-quan50.png',title:'特权日',ntype:'privilege_day'},
{src:'/static/public/share-hai50.png',title:'分享海报'}, {src:'/static/public/share-hai50.png',title:'分享海报',ntype:'poster'},
], ],
dataList:[] dataList:[],
levelInfo:{},
detailInfo:''//
} }
}, },
onLoad() { onLoad() {
@ -75,7 +78,9 @@
checkInfo(){ checkInfo(){
this.$requst.post('level/index').then(res=>{ this.$requst.post('level/index').then(res=>{
if(res.code==0){ if(res.code==0){
this.levelInfo = res.data;
//
this.detailInfo = this.$toolAll.tools.escape2Html(this.levelInfo.level.content)
} }
}) })
}, },

View File

@ -159,7 +159,6 @@
make(index,index2){ make(index,index2){
this.isHeyan = true; this.isHeyan = true;
this.text = `${this.orderList[index].orderNum},${this.orderList[index].childrenList[index2].id}`; this.text = `${this.orderList[index].orderNum},${this.orderList[index].childrenList[index2].id}`;
console.log(this.text);
// var that = this; // var that = this;
// setTimeout(function() { // setTimeout(function() {
// that.canvasQrPath = that.$refs.qrPath.canvasQrPath; // that.canvasQrPath = that.$refs.qrPath.canvasQrPath;

View File

@ -4,6 +4,7 @@
<status-nav :titleVal="'订单详情'" :statusTitle="true"></status-nav> <status-nav :titleVal="'订单详情'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;"> <view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
<!-- 订单类型 --> <!-- 订单类型 -->
<block v-if="loading">
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;"> <view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
<view class="disjbac"> <view class="disjbac">
<view class="bold">{{['商城订单','积分商城订单'][orderInfo.is_score]}}</view> <view class="bold">{{['商城订单','积分商城订单'][orderInfo.is_score]}}</view>
@ -53,8 +54,8 @@
<view class="fon28 col3 bold clips2">{{item.spu_name}}</view> <view class="fon28 col3 bold clips2">{{item.spu_name}}</view>
<view class="orderDetail-sku">{{item.sku_name}}</view> <view class="orderDetail-sku">{{item.sku_name}}</view>
<view class="disjbac mar-s10"> <view class="disjbac mar-s10">
<view class="colf8 fon32 bold"><span v-if="orderInfo.is_score==0">{{item.price/100}}</span><span v-else>{{item.score}}</span></view> <view class="colf8 fon32 bold"><span v-if="orderInfo.is_score==0">{{item.price/100}}</span><span v-else>{{item.score}}</span><span class="fon28 col6 mar-z20 font4">x{{item.num}}</span></view>
<view class="fon28 col6">x{{item.num}}</view> <view @tap.stop="make(index)" v-if="orderInfo.virtual_check==0 && orderInfo.has_virtual==1" class="order-btn">线</view>
</view> </view>
</view> </view>
</view> </view>
@ -82,22 +83,43 @@
<view @tap="paymentEv"></view> <view @tap="paymentEv"></view>
</view> </view>
<!-- 待发货 --> <!-- 待发货 -->
<view class="disac paid-btn-box" v-if="orderInfo.status=='paid'"> <view class="disac paid-btn-box" v-if="orderInfo.status=='paid' && orderInfo.virtual_check==0">
<view @tap="cancleEv"></view> <view @tap="cancleEv"></view>
</view> </view>
<!-- 确认收货 --> <!-- 确认收货 -->
<view class="orderInfo-btn" v-if="orderInfo.status=='shipped'"></view> <view class="orderInfo-btn" v-if="orderInfo.status=='shipped'"></view>
</view> </view>
<!-- 待核验弹框 -->
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
<view class="fon28 col3">订单二维码</view>
<view class="mar-sx30">
<yz-qr ref="qrPath" :text="text" :size="size" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
<!-- <image src="/static/public/member-head.png" class="order-hx-img" mode="aspectFill"></image> -->
</view>
<view class="fon24 col3">
<view class=" mar-s40 mar-x20">工作人员扫码核销订单</view>
<view>订单未完成前请勿出示二维码</view>
</view>
<image @tap.stop="isHeyan=false" src="/static/public/closequan.png" class="posia heyan-close" mode=""></image>
</view>
</view>
</block>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import yzQr from '@/components/yz-qr/yz-qr.vue';
export default { export default {
components:{
yzQr
},
data() { data() {
return { return {
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),// publicColor:uni.getStorageSync('publicColor'),//
loading:false,
isExpress:true, isExpress:true,
switchQuan:true, switchQuan:true,
showQuan:false, showQuan:false,
@ -108,6 +130,12 @@
allNum:0,// allNum:0,//
times:0,// times:0,//
goAddress:'四川省成都市青羊区青羊大道213号', goAddress:'四川省成都市青羊区青羊大道213号',
isHeyan:false,
canvasQrPath: '',
text: 'hello',
size: 162,
colorDark: '#000000',
colorLight: '#ffffff'
} }
}, },
onShow() { onShow() {
@ -117,6 +145,10 @@
this.checkInfo(options.id); this.checkInfo(options.id);
}, },
methods: { methods: {
make(index){
this.isHeyan = true;
this.text = `${this.orderInfo.coding},${this.orderInfo.skus[index].id}`;
},
cancleEv(){// cancleEv(){//
this.times++; this.times++;
if(this.times==2){ if(this.times==2){
@ -194,6 +226,7 @@
userAddress:naddress[2].trim() userAddress:naddress[2].trim()
} }
} }
this.loading = true;
} }
}) })
}, },

View File

@ -44,13 +44,13 @@
imgList:uni.getStorageSync('imgSrcList'), imgList:uni.getStorageSync('imgSrcList'),
imgSrc:'', imgSrc:'',
showBtn:false, showBtn:false,
isHaib:true, isHaib:false,
haved:true haved:true
} }
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
this.haved = true this.haved = true;
}, },
onLoad() { onLoad() {
// uni.removeStorageSync('imgSrcList') // uni.removeStorageSync('imgSrcList')
@ -72,6 +72,7 @@
},error=>{}) },error=>{})
}, },
chooseImg(index){// chooseImg(index){//
this.imgSrc = '';
this.haved = this.showBtn = true; this.haved = this.showBtn = true;
this.$toolAll.tools.showToast('正在生成海报...','loading',10000); this.$toolAll.tools.showToast('正在生成海报...','loading',10000);
this.$requst.post('user/poster-info',{poster_src:this.imgList[index]}).then(res=>{ this.$requst.post('user/poster-info',{poster_src:this.imgList[index]}).then(res=>{

View File

@ -117,6 +117,21 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<!-- 去拼单弹框 -->
<!-- <view v-if="showPD" class="pd-tk-box" @tap.stop="showPD=false"> -->
<view v-if="showPD" class="pd-tk-box">
<view class="bacf radius20 width100 posir">
<view class="fon28 col3">参与{{pinInfo.name}}的拼单</view>
<view class="fon24 col3">仅剩{{pinInfo.num}}个名额{{pinDao}}后结束</view>
<view class="disjcac">
<image :src="pinInfo.imgSrc" mode="aspectFill"></image>
<image src="/static/public/pin-jie.png" mode=""></image>
<image src="/static/public/weiz.png" mode=""></image>
</view>
<view @tap="atOnceSpellOrder(1)"></view>
<image @tap="atOnceSpellOrder(0)" src="/static/public/pin-close.png" class="posia" mode=""></image>
</view>
</view>
<!-- 详情 --> <!-- 详情 -->
<view class="pad20 bacf mar-zy20 radius20 mar-s20"> <view class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 col3 bold">产品详情</view> <view class="fon28 col3 bold">产品详情</view>
@ -260,20 +275,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 去拼单弹框 -->
<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">仅剩{{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>
<image src="/static/public/weiz.png" mode=""></image>
</view>
<view>参与拼单</view>
<image @tap.stop="showPD=false" src="/static/public/pin-close.png" class="posia" mode=""></image>
</view>
</view>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 --> <!-- 弹框授权 -->
@ -364,7 +365,13 @@
ispt:0,//01 2 ispt:0,//01 2
isScore:0,// isScore:0,//
cartNum:0, cartNum:0,
skuCate:[]// skuCate:[],//
pinDao:'',//
serverTime:'',//
timerServer:null,
timerp:null,
timera:null,
pinUserId:0//ID
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -390,6 +397,11 @@
onShow() { onShow() {
uni.removeStorageSync('chooseAddress'); uni.removeStorageSync('chooseAddress');
}, },
onUnload() {
clearInterval(this.timera);
clearInterval(this.timerp);
clearInterval(this.timerServer);
},
onLoad(options) { onLoad(options) {
if(options.category_id!=undefined) { if(options.category_id!=undefined) {
this.category_id = options.category_id this.category_id = options.category_id
@ -444,10 +456,23 @@
}) })
}, },
checkPTList(id){// checkPTList(id){//
this.$requst.post('spu/group-list',{id:id}).then(res=>{ uni.request({
if(res.code==0){ url:'https://hengmei.scdxtc.cn/api/spu/group-list',
if(res.data.length!=0){ data:{id:id},
res.data.forEach(item=>{ method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
let ntime = new Date(res.header.Date).getTime();//
this.timerServer = setInterval(()=>{
ntime = ntime + 1000
this.serverTime = new Date(ntime);
},1000);
if(res.data.data.length!=0){
res.data.data.forEach(item=>{
let pObj = { let pObj = {
id:item.id, id:item.id,
imgSrc:item.cover, imgSrc:item.cover,
@ -469,6 +494,7 @@
this.pingArr = newPArr; this.pingArr = newPArr;
} }
} else this.$toolAll.tools.showToast(res.msg); } else this.$toolAll.tools.showToast(res.msg);
}
}) })
}, },
goGetReadyDan(index){// goGetReadyDan(index){//
@ -490,7 +516,8 @@
sku_name:this.skuDetail.title, sku_name:this.skuDetail.title,
is_score:this.detailObj.is_score, is_score:this.detailObj.is_score,
group_id:this.ispt,//0 1 2 group_id:this.ispt,//0 1 2
is_only:this.ispt is_only:this.ispt,
pin_user_id:this.pinUserId//ID
} }
let newList = [params]; let newList = [params];
uni.setStorageSync('orderList',newList); uni.setStorageSync('orderList',newList);
@ -515,6 +542,26 @@
comeTuan(pinId,index,index2){// comeTuan(pinId,index,index2){//
this.showPD = true; this.showPD = true;
this.pinInfo = this.pingArr[index][index2]; this.pinInfo = this.pingArr[index][index2];
this.pinDao = this.$toolAll.tools.dayTime(this.pinInfo.time,this.serverTime);
this.timerp = setInterval(()=>{
if((new Date(this.pinInfo.time).getTime()) - (new Date(this.serverTime).getTime())<=0){
this.pinDao = '已结束';
this.checkPTList(this.detailObj.id);
this.showPD = false;
clearInterval(this.timerp);
} else {
this.pinDao = this.$toolAll.tools.dayTime(this.pinInfo.time,this.serverTime);
}
},1000)
},
atOnceSpellOrder(index){//
if(index==1){
this.showTK = true;
this.pinUserId = this.pinInfo.id;
}
this.showPD = false;
clearInterval(this.timerp);
this.daoTime = '';
}, },
chooselei(index){// chooselei(index){//
this.leiIndex = index this.leiIndex = index
@ -687,9 +734,10 @@
let endTime = new Date(res.data.data.detail.activity_end_at).getTime(); let endTime = new Date(res.data.data.detail.activity_end_at).getTime();
if(startTime - endTime >=0) {// - >= 0 if(startTime - endTime >=0) {// - >= 0
this.daoTime = "活动已结束"; this.daoTime = "活动已结束";
clearInterval(this.timera);
} else { } else {
this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);// this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);//
let timer = setInterval(()=>{// this.timera = setInterval(()=>{//
startTime = startTime + 1000; startTime = startTime + 1000;
this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime); this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);
},1000) },1000)

View File

@ -3,47 +3,107 @@
<!-- 状态栏 --> <!-- 状态栏 -->
<status-nav :titleVal="'商品搜索'" :statusTitle="true"></status-nav> <status-nav :titleVal="'商品搜索'" :statusTitle="true"></status-nav>
<!-- 输入框 --> <!-- 输入框 -->
<view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}"> <view class="search-input-box bacf poszy shop-nav-box" :style="{top: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20"> <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="请输入商品名称"/> <input @confirm="checkShopList" 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 @tap="checkShopList" 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>
<!-- 筛选结果 --> <!-- 筛选结果 -->
<view v-if="isClick" class="pad-zy50 disac fw pad-x20"> <view v-if="search_result" class="pad-z20 pad-x20">
<view class="col3 fon28 mar-s30">筛选</view> <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> </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'}"> <view v-if="search_result" :style="{marginTop:statusHNH+titleHeight+10+45+'px'}">
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList> <view v-if="dataList.length!=0" style="margin-top: -20rpx;">
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}商品`"></nothing-page> <view class="pad20">
<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 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 dataList" :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>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="pu_content" @comfirmev="submitQu" @cancleev="isShowT=false"></pu-po>
</view>
</view>
<nothing-page v-if="dataList.length==0" :content="`暂无更多商品列表`"></nothing-page>
</view>
<!-- 历史搜索和热门搜索 -->
<view v-if="!search_result" class="pad-z30 mar-s30" :style="{marginTop:statusHNH+titleHeight+10+'px'}">
<cate-tu :list="reSearchList" @delev='delev'></cate-tu>
</view> </view>
<!-- 购物车 --> <!-- 购物车 -->
<navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none"> <navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none">
@ -54,20 +114,6 @@
</view> </view>
</view> </view>
</navigator> </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> <pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 --> <!-- 返回顶部 -->
@ -76,13 +122,11 @@
</template> </template>
<script> <script>
import cateTu from '@/components/cate-items/cate-tu.vue';
import shopList from '@/components/shop-list.vue';
import {cartNum} from '@/jsFile/publicAPI.js'; import {cartNum} from '@/jsFile/publicAPI.js';
import cateTu from '@/components/cate-items/cate-tu.vue';
export default { export default {
components:{ components:{
cateTu, cateTu
shopList
}, },
data() { data() {
return { return {
@ -108,14 +152,10 @@
}, },
], ],
isShowT:false,// isShowT:false,//
isList:true,//
dataList:[//
],
showTop:false,// showTop:false,//
newCurrent:0, newCurrent:0,
page:1, page:1,
size:10, size:200,
total:'',// total:'',//
isZanw:true, isZanw:true,
activeIndex:'-1', activeIndex:'-1',
@ -123,52 +163,59 @@
cateTitle:'', cateTitle:'',
bingzList:[],// bingzList:[],//
zanBingArr:[],// zanBingArr:[],//
isXiao:false,//
titleHeight:'',// titleHeight:'',//
shaiList:[],// shaiList:[],//
isClick:false,//
dataList:[], dataList:[],
searchVal:'',// searchVal:'',//
doctor_role:'',// doctor= design= doctor_role:'',// doctor= design=
doctor_name:'',// doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time= activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:'',//ID disease_id:'',//ID
loading:false, cartNum:0,
cartNum:0 search_result:false,
timeList:[],
zanArr:[],
timer:''
} }
}, },
onPageScroll(e) { onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false e.scrollTop > 360 ? this.showTop = true : this.showTop = false
}, },
onReachBottom() {// onReachBottom() {//
if(this.total!=this.dataList.length){ // if(this.total!=this.dataList.length){
this.page++ // this.page++
this.searchEv()// // this.checkShopList();
} else { // } else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000) if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000);
this.isZanw = false setTimeout(()=>{
} this.isZanw = true;
},10000)
// }
}, },
onLoad(options) { onLoad(options) {
if(options.keyWorld!=undefined && options.keyWorld!='') { if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld this.searchVal = options.keyWorld;
this.searchEv() this.checkShopList();
} else {
this.search_result = false;
} }
this.checkSearchHistory() this.checkSearchHistory();
this.checkKey() this.checkKey();
// + // +
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => { query.select('.search-input-box').boundingClientRect((rect) => {
// console.log('+',rect.height); // console.log('+',rect.height);
this.titleHeight = rect.height this.titleHeight = rect.height
}).exec() }).exec()
this.checkSX();
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv(); if(this.searchVal!=undefined && this.searchVal!='') this.checkShopList();
this.cartNumEv();// this.cartNumEv();//
}, },
onUnload() {
clearInterval(this.timer);
},
methods: { methods: {
cartNumEv(){// cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{ this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
@ -177,78 +224,12 @@
} }
}) })
}, },
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(){ checkShopList(){
this.isZanw = true;
let params = { let params = {
keyword:this.searchVal,// keyword:this.searchVal,//
page:1, page:this.page,
size:10, size:this.size,
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({ uni.request({
url:'https://hengmei.scdxtc.cn/api/spu/list', url:'https://hengmei.scdxtc.cn/api/spu/list',
@ -260,7 +241,13 @@
}, },
success: (res) => { success: (res) => {
if(res.data.code==0){ if(res.data.code==0){
clearInterval(this.timer);
// if(this.page==1) {
this.zanArr = [];
this.dataList = []; this.dataList = [];
this.timeList = [];
// }
this.total = res.data.total;
if(res.data.data.list.length!=0){ if(res.data.data.list.length!=0){
res.data.data.list.forEach(item=>{ res.data.data.list.forEach(item=>{
let tuan = false,ping = false,xian = false,integral = false; let tuan = false,ping = false,xian = false,integral = false;
@ -286,84 +273,63 @@
isIntegral:integral,// isIntegral:integral,//
grade:'', grade:'',
disease_name:item.disease_name,// disease_name:item.disease_name,//
disease_id:item.disease_id,//ID
reponseTime:res.header.Date,// reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,// activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,// activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,// activity_group_num:item.activity_group_num,//
} }
this.dataList.push(obj) this.zanArr.push(obj)
}) })
this.loading = true; 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.dataList = this.zanArr;
this.search_result = true;
},1000)
} else {
this.dataList = this.zanArr;
}
} else {
this.search_result = 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){// goPage(id,index){//
this.bingzList.forEach(item=>{ uni.navigateTo({
item.isActive = false; url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataList[index].isIntegral}`
}) })
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(){// checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{ this.$requst.get('index/hot-keywords',{type:'spu'}).then(res=>{
// console.log('',res); // console.log('',res);
if(res.code==0){ if(res.code==0){
if(res.data.length!=0){ if(res.data.length!=0){
@ -379,7 +345,7 @@
},error=>{}) },error=>{})
}, },
checkSearchHistory(){// checkSearchHistory(){//
this.$requst.post('user/search-history',{page:this.page,size:this.size}).then(res=>{ this.$requst.post('user/search-history',{page:1,size:100}).then(res=>{
// console.log(res); // console.log(res);
if(res.code==0){ if(res.code==0){
if(res.data.list.length!=0){ if(res.data.list.length!=0){
@ -396,40 +362,6 @@
} }
},error=>{}) },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(){// delev(){//
this.isShowT = true this.isShowT = true
}, },
@ -445,13 +377,6 @@
cancleev(){// cancleev(){//
this.isShowT = false this.isShowT = false
}, },
chooseTwo(index){//
// console.log('',index);
this.isZanw = true
this.page = 1
this.newCurrent = index
this.searchEv()
},
backTop(){// backTop(){//
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: 0, scrollTop: 0,

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