新增购物车、商品详情、搜索、下拉框组件、详情底部组件

master
chen 2022-02-18 16:26:42 +08:00
parent 03711f6a13
commit 41a29cbda7
47 changed files with 1218 additions and 2428 deletions

77
App.vue
View File

@ -1,59 +1,62 @@
<script>
import toolAll from '@/jsFile/tools.js';
import requst from '@/jsFile/requst.js';
export default {
//
globalData:{
// domainName:'https://hengmei.scdxtc.cn/api/',
domainName:'https://hm.hmzfyy.cn/api/',
appletName:'佩丽商城'//
},
// show
onLaunch: function() {
//
toolAll.tools.clearClog();
//
let windowHeight = uni.getSystemInfoSync().windowHeight;
//
let statusHeight = uni.getSystemInfoSync().statusBarHeight;
uni.setStorageSync('hostapi','https://peili.scdxtc.cn/api/'); //
uni.setStorageSync('statusBar',statusHeight); //
toolAll.tools.networkStatus(); //
toolAll.tools.clearClog(); //
toolAll.tools.overdue(); //
uni.setStorageSync('publicColor','#000000'); //
// scroll-view
uni.setStorageSync('scrollHeight-one',windowHeight - (statusHeight + 50 + 59)); // +
// scroll-view
uni.setStorageSync('scrollHeight-two',windowHeight - (statusHeight + 50 + 36 + 59)); // + +
// scroll-view
uni.setStorageSync('scrollHeight-three',windowHeight - (statusHeight + 50 + 36)); // +
// scroll-view
uni.setStorageSync('scrollHeight-four',windowHeight - (statusHeight + 50 + 45 + 59));
// toolAll.tools.isVedio(); //
//
// this.statusBarH();
uni.setStorageSync('statusBar',uni.getSystemInfoSync().statusBarHeight);
this.log(uni.getStorageSync('statusBar'),'App.vue第18行')
//
// toolAll.tools.isVedio();
//
// uni.request({
// url: `${this.globalData.domainName}index/mini-program-setting`,
// method: 'GET',
// data: '',
// header: {
// 'Content-Type': 'application/json; charset=UTF-8',
// 'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
// },
// success: res => {
// // console.log('===>',res);
// if (res.statusCode == 200) {
// if (res.data.code == 0) {
// uni.setStorageSync('publicColor', res.data.data.mainColor) //#3875F6 #2E8B57
// // uni.setStorageSync('publicColor', '#2E8B57') //#3875F6 #2E8B57
// }
// }
// }
// })
//
uni.setStorageSync('footTitle',['首页','分类','我的','购物车'])
uni.setStorageSync('footimg',[
{
iconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b284c96dd7.png",
selectedIconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b284c9704a.png"
},
{
iconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b2865a344f.png",
selectedIconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b28659f34f.png"
},
{
iconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b286da1ddc.png",
selectedIconPath: "https://oss.hmzfyy.cn/storage/images/202202/620b286da2073.png"
},
{
iconPath: "https://s6.jpg.cm/2022/02/17/LBETnT.png",
selectedIconPath: "https://s6.jpg.cm/2022/02/17/LBETnT.png"
}
])
},
onShow: function() {
if(uni.getStorageSync('token')!='') {
//
toolAll.tools.daoTime();
}
//
toolAll.tools.networkStatus();
},
onHide: function() {
//
toolAll.tools.closeTimer();
uni.removeStorageSync('isQuan');
uni.removeStorageSync('quanImg');
uni.removeStorageSync('quanId');
uni.removeStorageSync('isQuan');
uni.removeStorageSync('firstTime');
toolAll.tools.closeTimer();//
}
};
</script>

View File

@ -144,11 +144,9 @@
.moban{background: rgba(0,0,0,.54);width: 100%;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 2;}
.detail-cart-box{position: fixed;right: 30rpx;bottom: 300rpx;z-index: 999;}
/* 商品详情 */
.activity-img{background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;}
.activelei,.molei{border-radius: 20rpx;padding: 10rpx 24rpx;color: #333333;margin-left: 20rpx;}
.activelei{color: #FFFFFF;}
.shop-title-box view{display: inline-block;float: left;}
.shop-title-box view span{padding: 6rpx 10rpx;}
.shop-title-box view span:nth-child(n+2){background: #F85050;}
.shop-price{color: #F85050;font-size: 40rpx;font-weight: bold;}
.shop-price span:last-child{color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;margin-left: 20rpx;}
.yuan-price{color: #B3B3B3;font-size: 24rpx;text-decoration: line-through;font-weight: 400;}
@ -429,6 +427,8 @@ button:after{content: none!important;}
/* 粗体 */
.bold{font-weight: bold;}
.bold400{font-weight: 400;}
.bold500{font-weight: 500;}
.font5{font-weight: 500;}
.font4{font-weight: 400;}
@ -487,6 +487,11 @@ button:after{content: none!important;}
.mar-s36{margin-top: 36rpx;}
.mar-s40{margin-top: 40rpx;}
.mar-s50{margin-top: 50rpx;}
.mar-s60{margin-top: 60rpx;}
.mar-s70{margin-top: 70rpx;}
.mar-s80{margin-top: 80rpx;}
.mar-s90{margin-top: 90rpx;}
.mar-s100{margin-top: 100rpx;}
/* 下---外边距 */
.mar-x10{margin-bottom: 10rpx;}
.mar-x20{margin-bottom: 20rpx;}

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3180711 */
src: url('https://at.alicdn.com/t/font_3180711_dt5ycve1667.woff2?t=1644838459299') format('woff2'),
url('https://at.alicdn.com/t/font_3180711_dt5ycve1667.woff?t=1644838459299') format('woff'),
url('https://at.alicdn.com/t/font_3180711_dt5ycve1667.ttf?t=1644838459299') format('truetype');
src: url('https://at.alicdn.com/t/font_3180711_uyflswe9ahn.woff2?t=1645085513026') format('woff2'),
url('https://at.alicdn.com/t/font_3180711_uyflswe9ahn.woff?t=1645085513026') format('woff'),
url('https://at.alicdn.com/t/font_3180711_uyflswe9ahn.ttf?t=1645085513026') format('truetype');
}
.icon {
@ -13,6 +13,26 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-send-goods:before {
content: "\e601";
}
.icon-payment:before {
content: "\e602";
}
.icon-finish:before {
content: "\e63f";
}
.icon-take:before {
content: "\e649";
}
.icon-refund:before {
content: "\e613";
}
.icon-customer-black:before {
content: "\ec2e";
}

View File

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

View File

@ -0,0 +1,219 @@
<template>
<view class="pad-x140" :class="dataList.length ? '' : 'display-center-center'">
<scroll-view scroll-y v-if="dataList.length">
<view>
<view v-for="(item,index) in dataList" :key="index"
class="item-box display-between-center">
<view @tap="chooseItem(index)" class="display-center-center flex-shrink">
<!-- 勾选按钮 -->
<view class="circle-box display-center-center flex-shrink" :class="item.isActive ? 'circle-box-active' : ''"></view>
<!-- 商品图片 -->
<image class="shop-img" :src="item.imgSrc" mode="aspectFill"></image>
</view>
<view class="item-right-box display-between-column">
<view>
<!-- 商品标题 -->
<view class="clips2 item-title">{{item.title}}</view>
<!-- 规格 -->
<view class="item-specs">
<view>{{item.specs1}}</view>
</view>
</view>
<view class="display-between-center">
<!-- 价格 -->
<view class="item-price">{{item.price}}</view>
<!-- 加减按钮 -->
<view class="display-between-center">
<!-- -->
<button @tap="deladdEvent( item.id , index , 0)" :disabled="item.num==1" class="item-btn display-center-center">­­­­­­­­­­­­</button>
<!-- 输入框 -->
<view class="input-box display-center-center">
<input type="text" v-model="item.num" />
</view>
<!-- -->
<button @tap="deladdEvent( item.id , index , 1)" class="item-btn display-center-center"></button>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<pitera v-else></pitera>
<!-- 底部导航 -->
<view class="display-between-center cart-foot-box">
<!-- 全选 -->
<view @tap="chooseAll" class="display--center check-all-box">
<view class="circle-check-all display-center-center"
:class="ifCheckAll ? 'circle-check-all-active' : ''"></view>
全选
</view>
<!-- 合计 -->
<view>合计{{totalPrice}}</view>
<!-- 立即结算 -->
<view class="cart-settlement">{{dataList.length ? '立即结算' : '去购物'}}</view>
</view>
</view>
</template>
<script>
import pitera from '@/components/nothing/pitera.vue';
export default {
components:{
pitera
},
name:"cart",
computed:{
totalPrice(){
let totalPrice = 0;
this.dataList.forEach(item=>{
if(item.isActive) totalPrice += item.price*1 * item.num*1;
})
return totalPrice;
}
},
data() {
return {
dataList:[],
// dataList:[
// {
// id:1,
// isActive:true,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// },
// {
// id:2,
// isActive:true,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:2
// },
// {
// id:3,
// isActive:false,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// },
// {
// id:4,
// isActive:false,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// },
// {
// id:5,
// isActive:false,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// },
// {
// id:6,
// isActive:false,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// },
// {
// id:7,
// isActive:false,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// },
// {
// id:8,
// isActive:false,
// imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
// title:'亿1LOVE100 ',
// specs1:'',
// price:2000,
// num:1
// }
// ],
ifCheckAll:false
};
},
methods:{
chooseItem(index){//
this.dataList[index].isActive = !this.dataList[index].isActive
let one = this.dataList.filter(function(item){
return item.isActive == false;
})
one.length==0 ? this.ifCheckAll = true : this.ifCheckAll = false
},
chooseAll(){//
if(this.dataList.length){
this.ifCheckAll = !this.ifCheckAll
this.dataList.forEach((item,index)=>{
this.ifCheckAll ? item.isActive = true : item.isActive = false
})
} else this.$toolAll.tools.showToast('亲,购物车空空的哟','',3000)
},
deladdEvent(id,cur,index){//
if(index==0){//
this.dataList[cur].num--
} else {//
this.dataList[cur].num++
}
// this.changeNum()//
},
}
}
</script>
<style scoped>
.clips1{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;}
.clips2{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;}
.flex-shrink{flex-shrink: 0;}
.display-between-center {display: flex;justify-content: space-between;align-items: center;}
.display--center {display: flex;align-items: center;}
.display-center-center {display: flex;justify-content: center;align-items: center;}
.display-between-column {display: flex;justify-content: space-between;flex-direction: column;}
.item-box {border-bottom: 1rpx solid #d3d3d3;padding: 40rpx 0;}
.item-box:last-child{border-bottom: none;}
.circle-box,.circle-check-all{width: 32rpx;height: 32rpx;border: 1rpx solid #8c8c9b;box-sizing: border-box;border-radius: 100%;}
.circle-box-active,.circle-check-all-active {
border: 1rpx solid #000000;
}
.circle-box-active::after,.circle-check-all-active::after{
content: '';
display: block;
width: 18rpx;height: 18rpx;background-color: #000000;border-radius: 100%;
}
.shop-img {width: 223rpx;height: 223rpx;border-radius: 30rpx;margin: 0 20rpx;}
.item-right-box{font-size: 24rpx;height: 223rpx;}
.item-title {color: #000000;}
.item-specs{color: #8c8c9b;}
.item-price{font-size: 30rpx;}
.input-box {width: 78rpx;height: 40rpx;border-radius: 16rpx;margin: 0 6rpx; border: 1rpx solid #000000;overflow: hidden;}
input {text-align: center;}
.item-btn {width: 40rpx;height: 40rpx;border-radius: 12rpx;background-color: #000000;color: #FFFFFF;padding: 0rpx;}
/* 底部导航 */
.cart-foot-box{position: fixed;bottom: 0;left: 0;right: 0;height: 130rpx;background-color: #efefef;font-size: 30rpx;}
.circle-check-all {width: 33rpx;height: 33rpx;margin: 0 10rpx 0 30rpx;}
.circle-check-all-active::after{
width: 19rpx;height: 19rpx;
}
.cart-settlement{width: 242rpx;height: 130rpx;background-color: #f81c1c;color: #FFFFFF;font-size: 36rpx;text-align: center;line-height: 130rpx;}
</style>

View File

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

View File

@ -0,0 +1,106 @@
<template>
<view>
<!-- 底部按钮 -->
<view class="bottom-nav-box display-between-center">
<button type="default">立即购买</button>
<button type="default">加入购物车</button>
</view>
<!-- 底部按钮弹框 -->
<view class="frame-box">
<view>
<view class="frame-top">
<image src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" mode="aspectFill" lazy-load></image>
<view>
<!-- 商品标题 -->
<view class="clips2 frame-title">阿什拉夫开机爱上了就干了阿什拉夫开机爱上了就干了阿什拉夫开机爱上了就干了</view>
<!-- 商品价格 -->
<view class="frame-price">
<!-- 折扣价 -->
<view>2,000</view>
<!-- 原价 -->
<view style="text-decoration: line-through;">3,000</view>
</view>
</view>
</view>
<!-- 商品尺寸规格 -->
<view class="frame-color-box">
<!-- 颜色 -->
<drop-down></drop-down>
<!-- 尺寸 -->
<drop-down :dropObj="dropObj" @chooseItem="chooseItem"></drop-down>
</view>
<!-- 商品库存 -->
<view></view>
<!-- 商品可变数量 -->
<view></view>
<!-- 加入购物车立即购买按钮 -->
<view class="frame-btn-box">
<button type="default">加入购物车</button>
<button type="default">立即购买</button>
</view>
</view>
</view>
</view>
</template>
<script>
import dropDown from '@/components/drop-downs/drop-down.vue';
export default {
name:"bottom-nav",
components:{
dropDown
},
data() {
return {
dropObj:{
title:'尺寸',
childrenList:[
{
id:1,
childrenTitle:'1.2'
},
{
id:1,
childrenTitle:'6'
}
]
},
};
},
methods:{
chooseItem(e){
this.log(e)
}
}
}
</script>
<style>
.display-between-center{display: flex;justify-content: space-between;align-items: center;}
.bottom-nav-box{position: fixed;bottom: 0;left: 0;right: 0;padding: 20rpx 40rpx;background-color: #FFFFFF;}
button{
width: 310rpx;
height: 100rpx;
line-height: 100rpx;
border-radius: 30rpx;
font-size: 36rpx;
border: 1rpx solid #FFFFFF;
color: #FFFFFF!important;
}
button:first-child{border: 1rpx solid #f81c1c;background-color: #f81c1c;}
button:last-child{border: 1rpx solid #000000;background-color: #000000;}
.frame-box{position: fixed;top: 0;left: 0;bottom: 0;right: 0;background-color: rgba(0,0,0,.5);z-index: 12;}
.frame-box > view{background-color: #FFFFFF;position: absolute;bottom: 0;left: 0;right: 0;padding: 30rpx;}
.frame-top {display: flex;justify-content: space-between;}
.frame-top image {width: 223rpx;height: 223rpx;border-radius: 20rpx;flex-shrink: 0;margin-right: 30rpx;margin-top: -80rpx;}
.frame-top > view{width: 100%;display: flex;justify-content: space-between;flex-direction: column;}
.frame-title{font-size: 36rpx;color: #000000;line-height: 50rpx;}
.frame-price{display: flex;align-items: center;}
.frame-price view:first-child{font-size: 40rpx;margin-right: 10rpx;}
.frame-price view:last-child{font-size: 28rpx;color: #868695;}
.frame-color-box{margin-top: 20rpx;}
.frame-btn-box{display: flex;align-items: center;justify-content: space-around;margin-top: 100rpx;}
.frame-btn-box button{height: 80rpx;line-height: 80rpx;border-radius: 20rpx;}
</style>

View File

@ -0,0 +1,90 @@
<template>
<view>
<view class="drop-title">{{dropObj.title}}</view>
<view class="drop-box display-between-center" @tap="tuneUpEv">
<view>{{activeText}}</view>
<i class="icon icon-next colpeili flexs" style="transition: all .3s;" :style="{transform: `rotate(${showFrame ? '0' : '90'}deg)`}"></i>
<view v-if="showFrame" class="drop animated " :class="showFrame?'fadeIn':'fadeOut'">
<view class="item-title" :class="activeItem==index?'itemActive':'itemMo'"
@tap.stop="chooseItem(index,item.id,item.childrenTitle)" v-for="(item,index) in dropObj.childrenList" :key="index">
<view class="clips1">{{item.childrenTitle}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"drop-down",
props:{
dropObj:{
type:Object,
default:()=>{
return {
title:'颜色',
childrenList:[
{
id:1,
childrenTitle:'粉色'
},
{
id:1,
childrenTitle:'蓝色'
}
]
}
}
}
},
data() {
return {
showFrame:false, //
activeText:'', //
activeItem:-1 //
};
},
mounted() {
if(this.dropObj.childrenList.length){
this.activeText = `请选择${this.dropObj.title}`;
} else {
this.activeText = `暂无可选项`;
}
},
methods:{
//
chooseItem(index,id,title){
//
this.activeItem = index;
//
this.activeText = title;
//
this.showFrame = false;
this.$emit('chooseItem',{id:id,title:title})
},
//
tuneUpEv(){
if(this.activeText!=`暂无可选项`){
this.showFrame = !this.showFrame;
}
}
}
}
</script>
<style scoped>
.drop-title{font-size: 30rpx;color: #000000;}
.display-between-center{display: flex;justify-content: space-between;align-items: center;}
.drop-box{position: relative; border: 1rpx solid #8c8c9b;padding: 20rpx;box-sizing: border-box;margin: 20rpx 0;font-size: 24rpx;color: #000000;}
.drop{
position: absolute;top:34px;left: -4rpx;right: -4rpx;z-index: 2;
max-height: 280rpx;
overflow: hidden;
overflow-y: scroll;
border: 1rpx solid #8c8c9b;
background-color: #FFFFFF;
}
.itemActive{background-color: #000000;color: #FFFFFF;}
.itemMo{background-color: #FFFFFF;color: #000000;}
.item-title{padding: 20rpx;}
</style>

View File

@ -55,7 +55,7 @@
//
isIcon:{
type:Number,
default:2
default:3
},
//
backgroundImage:{
@ -136,13 +136,10 @@
uni.reLaunch({url:'/pages/tabbar/cate/cate'})
break;
case 2:
uni.reLaunch({url:'/pages/tabbar/cate/cate'})
uni.reLaunch({url:'/pages/tabbar/my/my'})
break;
case 3:
uni.reLaunch({url:'/pages/tabbar/shop/shop'})
break;
case 4:
uni.reLaunch({url:'/pages/tabbar/my/staffDuan'})
uni.reLaunch({url:'/pages/tabbar/cart/cart'})
break;
}
}
@ -172,7 +169,7 @@
/* 突出的图标样式 start */
.centerBox{display: flex;justify-content: center;align-items: center;}
.centerBox-item{width: 124rpx;height: 124rpx;margin-top: -40rpx;border-radius: 100%;display: flex;justify-content: center;align-items: center;}
.centerImg{width: 112rpx;height: 112rpx;}
.centerBox-item{margin-top: -80rpx;}
.centerImg{width: 140rpx;height: 140rpx;}
/* 突出的图标样式 end */
</style>

View File

@ -0,0 +1,65 @@
<template>
<view>
<view v-for="(item,index) in functionList" :key="index"
class="item-box display-between-center">
<view class="display-between-center">
<image v-if="item.leftImg!=''" class="left-img" :src="item.leftImg" mode="widthFix"></image>
<view class="item-title">{{item.title}}</view>
</view>
<view class="display-between-center">
<view class="item-content">{{item.content}}</view>
<!-- <image :src="item.rightImg" mode="aspectFill"></image> -->
<i class='icon icon-next' style="font-size: 28rpx;color: #8c8c9b;"></i>
</view>
</view>
</view>
</template>
<script>
export default {
name:"function-list",
data() {
return {
functionList:[
{
leftImg:'/static/public/icon-address.png',
title:'收货地址',
num:0,
content:'',
rightImg:''
},
{
leftImg:'/static/public/icon-distribution.png',
title:'分销中心',
num:0,
content:'百万奖金等你来拿',
rightImg:''
},
{
leftImg:'/static/public/icon-duty.png',
title:'免责声明',
num:0,
content:'',
rightImg:''
},
{
leftImg:'/static/public/icon-aboutus.png',
title:'关于我们',
num:0,
content:'',
rightImg:''
}
]
};
}
}
</script>
<style scoped>
.display-between-center {display: flex;justify-content: space-between;align-items: center;}
.item-box{padding: 30rpx 0;}
.left-img{width: 40rpx;height: 40rpx;margin-right: 20rpx;}
.item-title {font-size: 30rpx;color: #000000;}
.item-content {font-size: 24rpx;color: #8c8c9b;margin-right: 10rpx;}
</style>

View File

@ -2,21 +2,21 @@
<view>
<view class="swiper-item mar-x40" v-for="(item,index) in list" :key="index">
<!-- 活动商品 start -->
<h1 style="" class="fon36 bold">{{item.title}}</h1>
<h1 class="fon36 bold">{{item.title}}</h1>
<view class="colpeili fon26 mar-s20 mar-x40 clips1">{{item.content}}</view>
<view class="posir">
<image class="radius30" :src="item.mainImg" mode="aspectFill" style="height: 425rpx;width: 100%;"></image>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20" style="background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;"></view>
<view class="posir" @tap="goDetail(item.id)">
<image class="radius30 animated fadeIn" :src="item.mainImg" mode="aspectFill" lazy-load style="height: 425rpx;width: 100%;"></image>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
<!-- 活动商品 end -->
<!-- 子商品 start -->
<view class="disjbac fw">
<view class="width47 mar-s50 posir" v-for="(childrenitem,childrenindex) in item.childrenList" :key="childrenindex">
<image :src="childrenitem.childrenImg" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view @tap="goDetail(childrenitem.id)" class="width47 mar-s50 posir" v-for="(childrenitem,childrenindex) in item.childrenList" :key="childrenindex">
<image :src="childrenitem.childrenImg" mode="aspectFill" lazy-load style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{childrenitem.childrenTitle}}</view>
<view class="fon30 colpeili">{{childrenitem.childrenPrice}}</view>
<view v-if="childrenitem.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20" style="background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;"></view>
<view v-if="childrenitem.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
<!-- 子商品 end -->
@ -33,24 +33,28 @@
default:()=>{
return [
{
id:1,
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenTitle:'于亿年宝藏中臻',
childrenPrice:'2,000',
isActivity:true,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
@ -59,24 +63,28 @@
]
},
{
id:1,
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
@ -85,24 +93,28 @@
]
},
{
id:1,
title:'虎年快乐',
content:'欢庆虎年,与所爱之人共燃盛典烟花',
mainImg:'/static/public/member-head.png',
isActivity:true,
childrenList:[
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:true,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
isActivity:false,
},
{
id:1,
childrenImg:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
childrenTitle:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
childrenPrice:'2,000',
@ -118,10 +130,17 @@
return {
};
},
methods:{
goDetail(id){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
}
}
}
</script>
<style>
.activity-img{background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;}
</style>

View File

@ -1,52 +1,164 @@
<template>
<view class="disjbac fw">
<view class="width47 mar-s50 posir" v-for="(item,index) in list" :key="index">
<image :src="item.imgSrc" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.title}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20" style="background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;"></view>
<scroll-view scroll-y @scrolltolower="scrollBottomEv" show-scrollbar="false" :style="{height: scrollHeight +'px'}">
<view class="disjbac fw pad-zy30">
<view @tap="goDetail(item.id)" class="width47 mar-s50 posir" v-for="(item,index) in dataList" :key="index">
<image :src="item.imgSrc" mode="aspectFill" style="width: 100%;height: 312rpx;border-radius: 30rpx;"></image>
<view class="clips2 fon30 col0 linh50" style="height: 100rpx;">{{item.title}}</view>
<view class="fon30 colpeili">{{item.price}}</view>
<view v-if="item.isActivity" class="posia fon24 colf pad-zy10 pad-s10 pad-x20 activity-img"></view>
</view>
</view>
</view>
<!-- 暂无更多数据 -->
<pitera v-if="showpitera"></pitera>
</scroll-view>
</template>
<script>
//
import pitera from '@/components/nothing/pitera.vue';
export default {
name:"list-two",
components:{
pitera
},
props:{
list:{
type:Array,
default:()=>{
return [
{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:true,
},
{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
}
]
}
//
scrollCate:{
type:Number,
default:1
},
//
pageSource: {
type:Number,
default:1
}
},
data() {
return {
scrollHeight:uni.getStorageSync('scrollHeight'),
//
dataList:[
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:true,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
},
{
id:1,
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
title:'于亿年宝藏中臻选1的宝石级钻石每年开采数',
price:'2,000',
isActivity:false,
}
],
page:1, //
size:10, //
total:0, //
showpitera:true, //
};
},
mounted() {
switch (this.scrollCate){
case 1:
this.scrollHeight = uni.getStorageSync('scrollHeight-one'); // App.vue
break;
case 2:
this.scrollHeight = uni.getStorageSync('scrollHeight-two'); // App.vue
break;
case 3:
this.scrollHeight = uni.getStorageSync('scrollHeight-three'); // App.vue
break;
case 4:
this.scrollHeight = uni.getStorageSync('scrollHeight-four'); // App.vue
break;
}
switch (this.pageSource){
case 1:
this.checkList();
break;
}
},
methods:{
checkList(){
this.log('列表事件')
},
//
scrollBottomEv(){
this.log('触底了',55)
//
if(this.total!=this.dataList.length){
// +1
this.page++
switch (this.pageSource){
case 1:
// this.checkList();//
break;
}
} else {
//
this.pitera = true;
}
},
goDetail(id){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}`
})
}
}
}
</script>
<style>
.activity-img{background: url(/static/public/icon-time-limit.png) no-repeat;background-size: 100% 100%;top: 10rpx;right: 10rpx;}
</style>

View File

@ -0,0 +1,56 @@
<template>
<view :style="{
color: textColor,
fontSize: textFontSize,
fontWeight: `${ ifBold ? 'bold' : 0 }`,
textAlign: `${ ifCenter ? 'center' : 'left' }`,
padding: paddingStr
}">{{textStr}}</view>
</template>
<script>
export default {
name:"pitera",
props:{
//
textStr: {
type:String,
default:'-- NO MORE --'
},
//
textColor: {
type:String,
default:'#999999'
},
//
textFontSize: {
type: String,
default: '24rpx'
},
//
ifBold: {
type:Boolean,
default:false
},
//
ifCenter: {
type:Boolean,
default: true
},
//
paddingStr: {
type:String,
default:'20rpx'
}
},
data() {
return {
};
}
}
</script>
<style>
</style>

View File

@ -10,7 +10,7 @@
width: widthHeight,
height: widthHeight}"
class="customer-box">
<i class="icon" :class="['icon-customer','icon-customer-black'][iconNum]" style="font-size: 70rpx;"></i>
<i class="icon" :style="{color:iconColor}" :class="['icon-customer','icon-customer-black'][iconNum]" style="font-size: 70rpx;"></i>
<!-- <image class="posia" src="/static/public/btnKF.png" style="width: 50rpx;height: 50rpx;top: 20rpx;" mode=""></image> -->
<view v-if="showText" class="fon20" style="margin-top: -20rpx;">线</view>
<button class="fon24 posia-op" open-type="contact"></button>
@ -51,10 +51,6 @@
type:Number,
default:260
},
isSmall:{//
type:Boolean,
default:false
},
// 线
showText:{
type:Boolean,
@ -65,6 +61,11 @@
type:Number,
default:0
},
//
iconColor:{
type:String,
default:'#FFFFFF'
},
nid:{//id
type:String,
default:'0'
@ -78,7 +79,6 @@
methods:{
lianK(){
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:this.nid}).then(res=>{},error=>{})
let maiOjb = {
e:5,//

View File

@ -74,6 +74,11 @@
ifCenter: {
type:Boolean,
default: true
},
//
fromWhere: {
type:Number,
default:0
}
},
data(){
@ -83,10 +88,10 @@
},
mounted() {
// +
const query = wx.createSelectorQuery().in(this)
query.select('.statusHNH').boundingClientRect((rect) => {
uni.setStorageSync('statusHNH',rect.height)
}).exec();
// const query = wx.createSelectorQuery().in(this)
// query.select('.statusHNH').boundingClientRect((rect) => {
// uni.setStorageSync('statusHNH',rect.height)
// }).exec();
//
let pages = getCurrentPages();
@ -96,7 +101,20 @@
methods:{
//
backEv(){
this.log('返回事件')
switch (this.fromWhere){
case 1:
uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome'
})
break;
case 0:
uni.navigateBack({
delta:1
})
break;
default:
break;
}
}
}
}

View File

@ -3,9 +3,9 @@
<view v-if="isDot" class="banner-box">
<swiper :current="bcurrent" @change="changeBanner" :style="{height: newHeight+'px'}" :autoplay="isplay" :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:newRadius+'px',height:newHeight+'px'}" class="img" :src="item.imgSrc" mode="aspectFill"></image>
<image @tap.stop="playVideo(index)" v-if="item.isVideo && isVedio" 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 @tap="chooseImg(index)" class="img-box">
<image :style="{borderRadius:newRadius+'px',height:newHeight+'px'}" class="img animated fadeIn" :src="item.imgSrc" mode="aspectFill"></image>
<image @tap.stop="playVideo(index)" v-if="item.isVideo && isVedio" class="posia animated bounceIn" style="width: 126rpx;height: 126rpx;z-index: 1;" src="/static/public/video.png" mode=""></image>
</view>
</swiper-item>
</swiper>
@ -60,7 +60,7 @@
bcurrent:0,
isShowVideo:false,
autoplay:false,
isVedio:uni.getStorageSync('isVedio')
isVedio:true
};
},
methods:{
@ -114,7 +114,8 @@
<style scoped>
.banner-box{position: relative;}
.img{width:100%;}
.img-box{position: relative;display: flex;justify-content: center;align-items: center;}
.img{width:100%;vertical-align: bottom;}
.dot-box{position: absolute;bottom: 36rpx;display: flex;justify-content: center;width: 100%;}
.dotActive{width: 22rpx;height: 12rpx;margin-right: 10rpx;border-radius: 20rpx; background-color: rgba(56, 117, 246, .5);}
.dotMo{width: 12rpx;height: 12rpx;margin-right: 10rpx;border-radius: 100%;background-color: rgba(191, 191, 191, 0.5);}

View File

@ -44,7 +44,7 @@ function biggerThan(v1, v2) {
}
return update
}
// 图片路径转base64
export function pathToBase64(path) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
@ -115,7 +115,7 @@ export function pathToBase64(path) {
reject(new Error('not support'))
})
}
// base64转图片路径
export function base64ToPath(base64) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {

View File

@ -1,31 +0,0 @@
const ENV = process.env.NODE_ENV;
console.log('当前环境', process.env.NODE_ENV)
const apiHub = {
//开发环境
development: {
BASE_URL: `${getApp().globalData.domainName}`,
IMG_URL: "https://xx",
BASE_UPLOAD_URL: "",
},
//测试环境
test: {
BASE_URL: "https://xxx",
IMG_URL: "https://xxx",
BASE_UPLOAD_URL: "",
},
//生产环境
production: {
BASE_URL: "https://xx",
IMG_URL: "https://xx",
BASE_UPLOAD_URL: "",
}
}
// 导出配置
export default {
ENV: ENV,
...apiHub[ENV]
}

View File

@ -2,28 +2,25 @@
const dataObj = (url, params) => {
let options = params
// #ifdef APP-PLUS
// DOTO:暂时没处理过,只是放在这里
let data = null; //业务数据
let terminal = 1 //终端类型web:0,app:1
options = {
...params,
data,
sign,
terminal
}
// #endif
return options
}
const goLogin = () => {
// uni.clearStorageSync();
console.log('token失效');
// uni.reLaunch({
// url: '/pages/login/Login'
// }) //未授权,请重新登录(401)
console.log('token失效request.js的 goLogin 方法输出');
uni.reLaunch({
url: '/pages/login/login'
})
}
// 请求错误处理
const checkError = (e, reject) => {
// console.error("----接口错误----", e)
console.log(e,`未请求成功的接口request.js的 checkError 方法输出`);
if (e.data) {
if (e.data.code) {
switch (Number(e.data.code)) {
@ -33,11 +30,12 @@ const checkError = (e, reject) => {
}
}
reject(e.data)
} else reject({msg:'接口错误'})
} else reject({msg:`接口错误request.js的 checkError 方法输出`})
}
// 封装请求
const request = (method, url, options) => {
// console.log(`请求方法:${method},请求接口:${url}38行输出`);
let methods = '';
let headers = {};
switch (method) {
@ -62,23 +60,9 @@ const request = (method, url, options) => {
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
}
break;
}
let obj = {},
hideLoading = false,
loadingText = 'loading...';
if (options) { //如果有options
if (options.hideLoading) {
hideLoading = options.hideLoading
delete options.hideLoading
}
if (options.loadingText) {
loadingText = options.loadingText
delete options.loadingText
}
}
return new Promise((resolve, reject) => {
uni.request({
// url: `${getApp().globalData.domainName}${url}`,
url: `${uni.getStorageSync('hostapi')}${url}`,
method: methods,
data: dataObj(url, options),
@ -99,8 +83,7 @@ const request = (method, url, options) => {
checkError(e, reject)
},
complete: rest => {
// console.log(rest);
!hideLoading && uni.hideToast()
uni.hideToast();
}
})
})
@ -109,12 +92,10 @@ const request = (method, url, options) => {
// 上传文件 封装请求
const uploadFile = (url, options) => {
this.log(1)
let tempData = options || {}
uni.showLoading({title: "上传中..."})
return new Promise((resolve, reject) => {
uni.uploadFile({
// url: `${getApp().globalData.domainName}${url}`,
url: `${uni.getStorageSync('hostapi')}${url}`,
filePath: tempData.file,
name: 'image',
@ -144,14 +125,10 @@ const uploadFile = (url, options) => {
}
},
fail(e) {
// uni.showToast({
// title: '接口请求超时',
// icon: 'none'
// })
// reject(e.data)
reject(e.data)
},
complete: () => {
uni.hideLoading()
uni.hideToast();
}
});
})

View File

@ -292,7 +292,7 @@ const tools = {
language:obj.language
}
uni.request({
url: `${getApp().globalData.domainName}user/login`,
url: `${uni.getStorageSync('hostapi')}user/login`,
method: 'post',
data: params,
header: {
@ -385,7 +385,7 @@ const tools = {
},
isVedio(){//是否显示视频内容
uni.request({
url: `${getApp().globalData.domainName}index/base-config`,
url: `${uni.getStorageSync('hostapi')}index/base-config`,
method: 'get',
header: {
'Content-Type': 'application/json; charset=UTF-8',
@ -394,11 +394,11 @@ const tools = {
},
success: res => {
if(res.data.code==0){
if(res.data.data.v==0) {
uni.setStorageSync('isVedio',false);
} else {
uni.setStorageSync('isVedio',true);
}
// if(res.data.data.v==0) {
// uni.setStorageSync('isVedio',false);
// } else {
// uni.setStorageSync('isVedio',true);
// }
}
}
})

View File

@ -22,6 +22,9 @@ import empower from './components/empower.vue'//引入用户授权组件
Vue.component('empower',empower)//全局注册用户授权组件
import authUserInfoMobile from './components/auth-userInfo-mobile.vue'//引入授权用户信息,授权手机号组件
Vue.component('auth-userInfo-mobile',authUserInfoMobile)//全局注册授权用户信息,授权手机号组件
import containerSubgroup from './components/container-subgroup.vue'//引入容器组件
Vue.component('container-subgroup',containerSubgroup)//全局注册容器组件
// 全局注册分享事件
import share from './jsFile/share.js'
Vue.mixin(share)

View File

@ -1,5 +1,5 @@
{
"name" : "恒美植发",
"name" : "佩利商城",
"appid" : "__UNI__02EF3E2",
"description" : "",
"versionName" : "1.0.0",
@ -44,7 +44,7 @@
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wxa02e44170bc722cd",
"appid" : "wx2654bc27c419ada6",
"UniversalLinks" : ""
}
},
@ -52,11 +52,15 @@
"geolocation" : {},
"share" : {
"weixin" : {
"appid" : "wxa02e44170bc722cd",
"appid" : "wx2654bc27c419ada6",
"UniversalLinks" : ""
}
}
}
},
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false
}
},
/* SDK */
@ -64,7 +68,7 @@
/* */
"mp-weixin" : {
/* */
"appid" : "wx987dc41899f719e8",
"appid" : "wx2654bc27c419ada6",
"setting" : {
"urlCheck" : true,
"es6" : false

View File

@ -4,27 +4,23 @@
"path" : "pages/tabbar/pagehome/pagehome",
"style" :{}
},{
"path" : "pages/tabbar/my/staffDuan",
"path" : "pages/tabbar/my/my",
"style" :{}
},{
"path" : "pages/login/login",
"style" :{
"navigationBarTextStyle":"black" //
}
},
{
"path" : "pages/tabbar/shop/shop",
"style" :{}
},
{
},{
"path" : "pages/tabbar/cate/cate",
"style" : {}
},
{
"path":"pages/login/xiey",
},{
"path": "pages/login/agreement",
"style" :{}
}
},{
"path" : "pages/tabbar/cart/cart",
"style" :{}
}
],
"subPackages": [
{//A

View File

@ -7,18 +7,13 @@
</view>
<view class="login-box">
<button class='login-btn' :style="{background:publicColor}" type='primary' @click="bindGetUserInfo"></button>
<!--新版登录方式-->
<!-- <button v-if="canIGetUserProfile" class='login-btn' type='primary' @click="bindGetUserInfo"></button> -->
<!--旧版登录方式-->
<!-- <button v-else class='login-btn' type='primary' open-type="getUserInfo" withCredentials="true" lang="zh_CN" @getuserinfo="bindGetUserInfo"></button> -->
<view class="xie-box">登录代表您已同意<text @tap="goXie" class="xieCon">用户服务协议</text></view>
<view class="xie-box">登录代表您已同意<text @tap="goAgreement" class="xieCon">用户服务协议</text></view>
</view>
<!-- 弹框 -->
<view v-if="isShowP" class="disjcac posAll">
<view class="bacf radius20 width100 tank-box">
<view class="tc tank-box-itemone">请授权绑定手机号</view>
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
<!-- <view @tap="refuse" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view> -->
<view class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view :style="{background:publicColor}" class="pad-sx10 radius10 tank-btn posir">
立即绑定
@ -80,9 +75,9 @@
// uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
}
},
goXie(){
goAgreement(){
uni.navigateTo({
url:'/pages/login/xiey'
url:'/pages/login/agreement'
})
},
//

View File

@ -0,0 +1,36 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'购物车'"
:fromWhere="1"></status-nav>
<!-- 容器 -->
<container-subgroup>
<cart></cart>
</container-subgroup>
</view>
</template>
<script>
import cart from '@/components/cart-subgroup/cart.vue';
export default {
components:{
cart
},
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -21,9 +21,7 @@
</view>
</view>
<!-- 列表 -->
<view class="pad-zy30">
<list-two></list-two>
</view>
<list-two :scrollCate="4"></list-two>
<!-- 筛选框 -->
<view v-show="isScreen" @tap="isScreen=false" class="screen-box" :style="{top:statusBarHeight+50+'px'}">
<view @tap.stop="isScreen=true" class="posir">
@ -151,8 +149,8 @@
category_id:'',//ID
disease_id:'',//ID
bannerList:[],
titleList:[],
imgList:[],
titleList:uni.getStorageSync('footTitle'), //
imgList:uni.getStorageSync('footimg'), //
zanArr:[],
dataShopList:[],
timeList:[],
@ -188,56 +186,7 @@
return shareObj;
},
onLoad(options) {
this.optionObj = options;
this.checkBZ()//
let maiOjb = {
e:7,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
this.checkSwi()
},
onShow() {
this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res);
if(res.code==0){
if(res.data.length!=0){
if(res.data.footBar.length!=0){//
res.data.footBar.forEach(item=>{
let newName = item.name
let newObj = {
iconPath:this.$http + item.icon[0],
selectedIconPath:this.$http + item.icon[1],
}
if(item.key=="home"){
this.imgList[0] = newObj
this.titleList[0] = newName
}
if(item.key=="category"){
this.imgList[1] = newObj
this.titleList[1] = newName
}
if(item.key=="service"){
this.imgList[2] = newObj
this.titleList[2] = newName
}
if(item.key=="shop"){
this.imgList[3] = newObj
this.titleList[3] = newName
}
if(item.key=="my"){
this.imgList[4] = newObj
this.titleList[4] = newName
}
})
uni.setStorageSync('footTitle',this.titleList)
uni.setStorageSync('footimg',this.imgList)
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
}
}
}
},error=>{})
},
methods: {
//
@ -503,7 +452,7 @@
is_hot:1
}
uni.request({
url:`${getApp().globalData.domainName}spu/list`,
url:`${uni.getStorageSync('hostapi')}spu/list`,
data:params,
method:'post',
header:{

103
pages/tabbar/my/my.vue Normal file
View File

@ -0,0 +1,103 @@
<template>
<view class="pad-x180">
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="false"
:ifCenter="true"
:navBarTitle="'个人中心'"></status-nav>
<!-- 容器 -->
<container-subgroup>
<view class="disjcac fc">
<image class="mar-sx20" src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" mode="aspectFill" style="width: 224rpx;height: 224rpx;border-radius: 60rpx;"></image>
<view class="fon36 bold">Anita Rose</view>
</view>
<!-- 我的订单状态 -->
<view style="margin-top: 100rpx;">
<view class="mar-x50 disjbac">
<view class="fon36 col0">我的订单</view>
<navigator url="/pagesA/myOrder/myOrder?index=0" hover-class="none">
<view class="disac colpeili">
<view class="fon24 mar-y10">全部订单</view>
<i class="icon icon-next bold400" style="font-size: 28rpx;"></i>
</view>
</navigator>
</view>
<view class="disjbac fon28 col3 mar-x50">
<view @tap="chooseOrderStatus(indexo)" v-for="(itemo,indexo) in orderStatus" :key="indexo">
<view class="disac fc posir">
<image :src="itemo.src" class="icon-img" mode="widthFix"></image>
<view class="mar-sx10 fon24 col0">{{itemo.title}}</view>
<view class="posia red-num" style="right: 0;top: 0;" v-if="itemo.num!=0">{{itemo.num}}</view>
</view>
</view>
</view>
</view>
<!-- 功能列表 -->
<function-list></function-list>
</container-subgroup>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='2'></foot-tab>
<!-- 弹框授权 -->
<!-- <auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> -->
</view>
</template>
<script>
import functionList from '@/components/function-list/function-list.vue';
export default {
components:{functionList},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
orderStatus:[//
{src:'/static/public/icon-payment.png',title:'待付款',num:0},
{src:'/static/public/icon-send-goods.png',title:'待发货',num:0},
{src:'/static/public/icon-take.png',title:'待收货',num:0},
{src:'/static/public/icon-finish.png',title:'已完成',num:0},
{src:'/static/public/icon-refund.png',title:'已取消',num:0},
],
userInfo:{},//
titleList:uni.getStorageSync('footTitle'), //
imgList:uni.getStorageSync('footimg'), //
}
},
onShow() {
// this.checkInfo();
},
onShareAppMessage() {
var shareObj = {
path: `/pages/tabbar/my/my?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
},
methods: {
chooseOrderStatus(index){
let statusIndex = ''
if(index==0) statusIndex = 1;
if(index==1) statusIndex = 2;
if(index==2) statusIndex = 4;
if(index==3) statusIndex = 5;
uni.navigateTo({
url:'/pagesA/myOrder/myOrder?index='+statusIndex
})
},
checkInfo(){
this.$requst.post('user/info').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0) {
this.userInfo = res.data;
}
},error=>{})
}
}
}
</script>
<style>
</style>

View File

@ -1,632 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :backgroudColor="publicColor" :tabcolor="publicColor" :statusTitle="true" :statusBack="false"></status-nav>
<image src="/static/public/staff-head.png" class="blue-img"></image>
<view class="mar-zy32 posir pad-x260" :style="{paddingTop:statusHNH+'px'}">
<view class="radius20 posir gao">
<view class="posia" :style="{top:`-${gaoh*0.4}px`,height:gaoh+'px'}"></view>
<view class="disjbac">
<view class="disac colf">
<!-- 头像 -->
<image @tap="openXiao" class="mar-sx30" :src="userInfo.headimgurl || ''" mode="aspectFill"></image>
<view class="mar-z30">
<!-- 昵称 -->
<view class="disac">
<view class="fon36 bold clips1" style="max-width: 260rpx;">{{userInfo.nickname || ''}}</view>
<view class="gao-name">{{userInfo.level.name}}</view>
</view>
<view class="disac mar-s10" v-if="userPhone!==''">
<image src="/static/public/phone-02.png" class="gao-phone" mode=""></image>
<!-- 手机号 -->
<view class="fon24 mar-z10">{{userPhone}}</view>
</view>
</view>
</view>
<view class="mar-y25 disac">
<!-- 二维码 -->
<image @tap="tuneUpqr" src="/static/public/staff-qro.png" class="gao-m" mode=""></image>
<!-- 前进键 -->
<view @tap="goNodifyData" class="disac gao-next-box">
<!-- <image class="" src="/static/public/next-white.png" mode="aspectFill"></image> -->
<image class="" src="/static/public/set-icon.png" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
<view>
<view class="disac"><span class="bold mar-y20">VIP</span>{{userInfo.level.name}}</view>
</view>
<navigator url="/pagesA/member/member" hover-class="none">
<view class="disac">
<view>更多权益</view>
<image src="/static/public/next-yellow.png" class="white-next" mode=""></image>
</view>
</navigator>
</view>
</view>
<view class="disja posir" style="z-index: 1;margin-top: 75rpx;">
<view @tap="chooseone(indext)" class="disac fc flexs width25" v-for="(itemt,indext) in tongList" :key="indext">
<view class="fon28 bold mar-sx20 clips1">{{itemt.num}}<text v-if="indext==2"></text><text v-if="indext==3"></text></view>
<view class="fon28 mar-x25">{{itemt.title}}</view>
</view>
</view>
<!-- 员工功能 v-if="userInfo.is_staff && yuanList.length!=0" -->
<view v-if="userInfo.is_staff==1" class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon28 bold col3">员工功能</view>
<view class="disja yuan-box">
<view @tap="chooseYitem(indexy)" v-for="(itemy,indexy) in yuanList" :key="indexy">
<view class="disac fc">
<image :src="itemy.src" mode="aspectFill"></image>
<view class="fon28 mar-s20 mar-x10">{{itemy.title}}</view>
</view>
<block v-if="indexy<yuanList.length-1">
<view class="xian-right"></view>
</block>
</view>
</view>
</view>
<!-- 我的订单 -->
<view class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon28 col3 disjbac">
<view>我的订单</view>
<navigator url="/pagesA/myOrder/myOrder?index=0" hover-class="none">
<view class="disac">
<view class="fon24 col9">全部</view>
<image src="/static/public/nextM.png" class="white-next" mode=""></image>
</view>
</navigator>
</view>
<view class="disja fon28 col3">
<view @tap="chooseOrderStatus(indexo)" v-for="(itemo,indexo) in myOrderList" :key="indexo">
<view class="disac fc posir">
<image :src="itemo.src" class="icon-img" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemo.title}}</view>
<view class="posia red-num" style="right: 0;top: 0;" v-if="itemo.num!=0">{{itemo.num}}</view>
</view>
</view>
</view>
</view>
<!-- 广告 -->
<image @tap="goPage" class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image>
<!-- 功能列表① -->
<view class="bacf radius20">
<view class="disjbac fon28 col3 fw">
<view @tap="goPageNew(indexm)" v-for="(itemm,indexm) in moneyList" :key="indexm" class="mar-s20 mar-x20 width25">
<view class="disac fc">
<image :src="itemm.src" class="icon-img" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemm.title}}</view>
</view>
</view>
</view>
</view>
<!-- 功能列表② -->
<view class="bacf radius20 mar-s20">
<view class="disac fon28 col3 fw">
<view @tap="goPageTwo(indexf)" v-for="(itemf,indexf) in toolsList" :key="indexf" class="mar-s20 mar-x20 width25">
<view class="disac fc posir">
<image :src="itemf.src" class="icon-img" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemf.title}}</view>
<view v-if="itemf.title=='消息通知' && itemf.num!=0" class="posia red-num">{{itemf.num}}</view>
</view>
</view>
</view>
</view>
</view>
<!-- 我的二维码弹框 -->
<view v-if="isQrcode" class="posAll disjcac">
<view>
<view class="bacf radius20" style="margin: 0 130rpx;">
<view class="fon28 col3 tc pad-s40">我的二维码</view>
<image :src="myqr" class="person-m" mode="aspectFill"></image>
</view>
<view class="disjcac">
<image @tap="closeqr" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
</view>
</view>
</view>
<!-- 专属客服 -->
<view v-if="zCustomer" class="posAll disjcac">
<view style="width: 80%;">
<view class="bacf radius20 pad-sx40" style="">
<view class="fon32 bold col3 tc pad-x40" v-if="customerInfo.service_name!=''"></view>
<view class="fon28 col3 disjb mar20" v-if="customerInfo.service_name!=''">{{customerInfo.service_name}}</view>
<view class="fon28 col3 disjb mar20" v-if="customerInfo.service_phone!=''">{{customerInfo.service_phone}}<span @tap="countCustomer(customerInfo.service_phone)" class="pcol">联系客服</span></view>
<view class="fon28 col3 disjb mar20" v-if="customerInfo.service_wechat!=''">{{customerInfo.service_wechat}}<span @tap="copyWechat" class="pcol">复制</span></view>
<view style="display: flex;align-items: center;flex-direction: column;width: 100%;">
<image v-if="customerImg!=''" :src="customerImg" class="person-m" style="margin-bottom: 40rpx;" mode="aspectFill"></image>
<view class="fon28 colf tc radius10" @tap="saveImg" style="width: 200rpx; padding: 16rpx;background-color: #38CE51;margin: 0 auto;">保存</view>
</view>
<view class="fon28 col9 tc pad-s40" v-if="customerInfo.service_phone==''"></view>
</view>
<view class="disjcac">
<image @tap="closeCustomer" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
</view>
</view>
</view>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
<!-- 签到弹框 -->
<view v-if="isQian" class="sigin-box">
<view>{{contentVal}}</view>
</view>
<!-- 弹框授权 -->
<auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile>
</view>
</template>
<script>
import {base64ToPath} from '@/jsFile/base64-src.js';
import empower from '@/components/empower.vue';
import {checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{empower},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
tongList:[
{num:'0',title:'我的积分'},
{num:'0',title:'孔雀币'},
{num:'0',title:'连续签到'},
{num:'0',title:'我的分享人'}
],
yuanList:[], //'customer-list','footmarks','scan'
zanCyuanList:[
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
{src:'/static/public/scan.png',title:'扫码签到',rule:'scan'},
{src:'/static/public/customer-check.png',title:'客服查询',rule:'customer-list'},
{src:'/static/public/scan.png',title:'核销扫码',rule:'check-scan'},
],
myOrderList:[//
{src:'/static/public/dai-fu60.png',title:'待付款',num:0},
{src:'/static/public/dai-fa60.png',title:'待发货',num:0},
{src:'/static/public/dai-shou60.png',title:'待收货',num:0},
{src:'/static/public/wan-60.png',title:'已完成',num:0},
],
moneyList:[
{src:'/static/public/integral60.png',title:'积分商城'},
{src:'/static/public/address60.png',title:'地址管理'},
{src:'/static/public/day60.png',title:'日程提醒'},
{src:'/static/public/ren60.png',title:'活动任务'},
{src:'/static/public/quan60.png',title:'优惠券'},
{src:'/static/public/kong60.png',title:'孔雀币'},
{src:'/static/public/scor60.png',title:'积分管理'},
{src:'/static/public/signIn.png',title:'积分签到'},
],
toolsList:[
{src:'/static/public/staff-yue60.png',title:'自助预约',num:''},
{src:'/static/public/staff-hai60.png',title:'个人海报',num:''},
{src:'/static/public/staff-collection60.png',title:'收藏',num:''},
{src:'/static/public/staff-share.png',title:'分享中心',num:''},
{src:'/static/public/staff-msg60.png',title:'消息通知',num:''},
{src:'/static/public/diary.png',title:'我的日记',num:''},
{src:'/static/public/staff-about60.png',title:'关于我们',num:''},
{src:'/static/public/staff-tou60.png',title:'投诉与建议',num:''},
],
isQrcode:false,//
userInfo:{},//
gaoh:uni.getStorageSync('gao'),
myqr:'/static/public/qrcode.png',
is_worker:'',//0 1
is_doctor:'',//01
is_servicer:'',//01
is_staff:'',//01
titleList:[],
imgList:[],
isQian:false,
bannerList:[],
guangImg:'',
guanggao:'',
userToken:'',
contentVal:'',//
userPhone:'',
timer:null,
nonce_str:'',
zCustomer:false,
customerImg:'',
customerInfo:'',
times:0,
openSettingBtnHidden: true,//
optionObj:{},
}
},
onUnload: function() {
//
let pages = getCurrentPages();
// console.log('pages:',pages);
},
onShow() {
uni.removeStorageSync('uinfo')//
this.$toolAll.tools.isLogin();
this.checkInfo();
uni.removeStorageSync('shareAll')//
this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res);
if(res.code==0){
if(res.data.length!=0){
if(res.data.footBar.length!=0){//
res.data.footBar.forEach(item=>{
let newName = item.name
let newObj = {
iconPath:this.$http + item.icon[0],
selectedIconPath:this.$http + item.icon[1],
}
if(item.key=="home"){
this.imgList[0] = newObj
this.titleList[0] = newName
}
if(item.key=="category"){
this.imgList[1] = newObj
this.titleList[1] = newName
}
if(item.key=="service"){
this.imgList[2] = newObj
this.titleList[2] = newName
}
if(item.key=="shop"){
this.imgList[3] = newObj
this.titleList[3] = newName
}
if(item.key=="my"){
this.imgList[4] = newObj
this.titleList[4] = newName
}
})
uni.setStorageSync('footTitle',this.titleList)
uni.setStorageSync('footimg',this.imgList)
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
}
}
}
},error=>{})
},
onUnload() {
//
this.closeqr();
},
onShareAppMessage() {
var shareObj = {
path: `/pages/tabbar/my/staffDuan?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
this.optionObj = options;
uni.setStorageSync('channel',options.channel);
if(uni.getStorageSync('gao')==''){
const query = wx.createSelectorQuery()
query.select('.gao').boundingClientRect((rect) => {
uni.setStorageSync('gao',rect.height)
this.gaoh = rect.height
}).exec()
}
this.checkSwi()
},
methods: {
countCustomer(phone){//
const res = uni.getSystemInfoSync();
if(res.platform=='ios'){
uni.makePhoneCall({
phoneNumber:phone,
success: () => {},
fail: () => {}
})
} else {
uni.showActionSheet({
itemList:[phone,'呼叫'],
itemColor:'#3875F6',
success: (res) => {
if(res.tapIndex==1){
uni.makePhoneCall({
phoneNumber:phone
})
}
}
})
}
},
copyWechat(){//
if(this.times==0){
this.times++;
this.$toolAll.tools.clickCopy(this.customerInfo.service_wechat);
this.$toolAll.tools.showToast('复制成功');
setTimeout(()=>{
this.times = 0;
},2000)
}
},
saveImg(e){//
//
uni.getSetting({
success:(res)=> {
if (!res.authSetting['scope.writePhotosAlbum']) {
uni.authorize({
scope: 'scope.writePhotosAlbum',
success:()=> {
//
this.saveImgToLocal();
},
fail:()=> {//
this.openSettingBtnHidden=false
}
})
} else {//
this.saveImgToLocal();
}
}
})
},
saveImgToLocal(){//
this.$toolAll.tools.showToast('正在保存','loading');
uni.downloadFile({
url: this.customerImg,//
success: (res) =>{
if (res.statusCode === 200){
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: ()=> {
this.$toolAll.tools.showToast('保存成功');
},
fail: ()=> {
this.$toolAll.tools.showToast('保存失败');
}
});
}
}
})
},
tuneUpqr(){//
this.isQrcode = true;
clearInterval(this.timer);
this.myqr = '';
this.nonce_str='';
this.checkGM();
this.timer = setInterval(()=>{
if(this.nonce_str!=''){
this.$requst.post('user/check-scan',{nonce_str:this.nonce_str}).then(res=>{
if(res.code==0){
if(res.data.result==1){
this.$toolAll.tools.showToast('已签到');
this.isQrcode = false;
clearInterval(this.timer);
}
}
})
}
},3000)
setTimeout(()=>{
this.isQrcode = false;
clearInterval(this.timer);
},60000)
},
//
closeqr(){
this.isQrcode = false;
clearInterval(this.timer);
},
chooseone(index){
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
if(index==3){uni.navigateTo({url:'/pagesB/mysharer/mysharer'})}
},
goPageNew(index){
if(index==0){uni.navigateTo({url:'/pagesA/pointsMall/pointsMall'})}
if(index==1){uni.navigateTo({url:'/pagesA/myAddress/myAddress'})}
if(index==2){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter?index=true&comeNum=0'})}
if(index==3){uni.navigateTo({url:'/pagesA/activityTask/activityTask'})}
if(index==4){uni.navigateTo({url:'/pagesA/coupon/coupon'})}
if(index==5){uni.navigateTo({url:'/pagesA/peacockCoin/peacockCoin'})}
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
},
goPageTwo(index){//
let newUrl = ''
if(this.toolsList[index].title=='自助预约') newUrl = '/pagesA/makeAnPppointment/makeAnPppointment'
if(this.toolsList[index].title=='个人海报') newUrl = '/pagesB/personalPoster/personalPoster'
if(this.toolsList[index].title=='收藏') newUrl = '/pagesB/myCollection/myCollection'
if(this.toolsList[index].title=='分享中心') newUrl = '/pagesB/sharingCenter/sharingCenter'
if(this.toolsList[index].title=='消息通知') newUrl = '/pagesB/messagecenter/messagecenter?comeNum=0'
if(this.toolsList[index].title=='我的日记') newUrl = '/pagesA/my-diary/my-diary'
if(this.toolsList[index].title=='关于我们') newUrl = '/pagesB/aboutUs/aboutUs'
if(this.toolsList[index].title=='投诉与建议') newUrl = '/pagesA/suggestions/suggestions'
if(this.toolsList[index].title=='专属客服'){
this.$requst.post('user/my-service').then(res=>{
if(res.code==0){
this.customerInfo = res.data;
if(this.customerInfo.service_qr!=''){
this.customerImg = this.$http + this.customerInfo.service_qr;
}
this.zCustomer = true;
}
})
} else {
uni.navigateTo({
url:newUrl
})
}
},
closeCustomer(){
this.zCustomer = false;
},
chooseOrderStatus(index){
let statusIndex = ''
if(index==0) statusIndex = 1;
if(index==1) statusIndex = 2;
if(index==2) statusIndex = 4;
if(index==3) statusIndex = 5;
uni.navigateTo({
url:'/pagesA/myOrder/myOrder?index='+statusIndex
})
},
goPage(){
uni.navigateTo({
url:this.guanggao
})
},
checkSwi(){
checkBanner({position:'personal-center-banner'}).then(res=>{
// console.log('res',res);
if(res.code==0){
if(res.data.length!=0){
this.guangImg = this.$http + res.data[0].src
this.guanggao = res.data[0].url
// res.data.forEach(item=>{
// let isVideo = false
// if(item.type!='img') isVideo = true
// let banObj = {
// imgSrc:this.$http + item.src,
// url:item.url,
// isVideo:isVideo,
// poster:this.$http + item.src,
// }
// this.bannerList.push(banObj)
// })
}
}
})
},
checkGM(){//
uni.showToast({
title:'正在生成二维码',
icon:'none',
duration:100000
})
this.$requst.post('user/personal-qr').then(res=>{
// console.log('',res);
if(res.code==0){
this.nonce_str = res.data.nonce_str;
base64ToPath(res.data.qr).then(path => {
this.myqr = path
uni.hideToast();
uni.setStorageSync('imgSrc',path)
}).catch(error => {})
}
},error=>{})
},
checkInfo(){
this.$requst.post('user/info').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0) {
this.userInfo = res.data;
uni.setStorageSync('userId',res.data.id);
uni.setStorageSync('phone',this.userInfo.mobile);
this.userPhone = this.$toolAll.tools.hideMPhone(this.userInfo.mobile)
this.tongList[0].num = res.data.score;//
this.tongList[1].num = res.data.coin;//
this.tongList[2].num = res.data.continuity_sign;//
this.tongList[3].num = res.data.share_users.total;//
this.toolsList[4].num = res.data.unread_messages;//
this.toolsList[5].num = res.data.unread_messages;//
this.myOrderList[0].num = res.data.order_count.waiting;//
this.myOrderList[1].num = res.data.order_count.paid;//
this.myOrderList[2].num = res.data.order_count.shipped;//
this.is_worker = res.data.is_worker;//0 1
this.is_doctor = res.data.is_doctor;//01
this.is_servicer = res.data.is_servicer;//01
this.is_staff = res.data.is_staff;//01
if(res.data.customer_service!=0 && this.toolsList.length==8){
this.toolsList.unshift({src:'/static/public/customer-check.png',title:'专属客服',num:''})
}
uni.setStorageSync('shareAll',res.data)
if(res.data.rules.length!=0){
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
this.yuanList = result
uni.setStorageSync('rules',res.data.rules)
} else this.yuanList = []
}
},error=>{})
},
chooseYitem(index){//
// console.log('',this.yuanList[index].title);
if(this.yuanList[index].title=='客户列表') {
uni.navigateTo({
url:'/pagesB/customerList/customerList'
})
}
if(this.yuanList[index].title=='用户足迹') {
uni.navigateTo({
url:'/pagesB/userFootprint/userFootprint'
})
}
if(this.yuanList[index].title=='扫码签到') {
wx.scanCode({ //
complete: (res) => {}, //
fail: (res) => {}, //
onlyFromCamera: false, //,
scanType: ['qrCode'], // scanType :
success: (rt) => { //
if(rt.result.slice(0,1)=='{'){
let uc = JSON.parse(rt.result).user_coding;
let ns = JSON.parse(rt.result).nonce_str;//
console.log(rt);
this.$requst.post('user/sign-in',{user_coding:uc,nonce_str:ns}).then(res=>{
// console.log('',res);
if(res.code==0){
this.isQian = true;
this.contentVal = "签到成功";
setTimeout(()=>{
this.isQian = false
},2000)
}
},error=>{})
} else this.$toolAll.tools.showToast('请出示正确的码');
}
})
}
if(this.yuanList[index].title=='核销扫码') {
wx.scanCode({ //
complete: (res) => {}, //
fail: (res) => {}, //
onlyFromCamera: false, //,
scanType: ['qrCode'], // scanType :
success: (rt) => { //
let narr = rt.result.split('H');
if(narr[1]=='true'){//
this.$requst.post('staff/coupon/write-off-experience-coupon',{coupon_id:narr[0],secret:narr[2],account_id:narr[3]}).then(res=>{
this.isQian = true
if(res.code==0){
this.contentVal = "核销成功";
} else {
this.contentVal = res.msg;
}
setTimeout(()=>{
this.isQian = false
},2000)
},error=>{})
} else {//
this.$requst.post('order/check',{order_coding:narr[0],id:narr[1],check_user:this.userInfo.id}).then(res=>{
this.isQian = true
if(res.code==0){
this.contentVal = "核销成功";
} else {
this.contentVal = res.msg;
}
setTimeout(()=>{
this.isQian = false
},2000)
},error=>{})
}
}
})
}
if( this.yuanList[index].title=='客服查询') {
uni.navigateTo({
url:'/pagesB/customerCheck/customerCheck'
})
}
},
goNodifyData(){//
uni.setStorageSync('uinfo',this.userInfo)
uni.navigateTo({
url:'/pagesA/nodifyData/nodifyData'
})
},
}
}
</script>
<style>
</style>

View File

@ -6,12 +6,12 @@
:ifReturn="false"
:ifCenter="true"
:navBarTitle="'首页'"></status-nav>
<view :style="{paddingTop: statusBarHeight+50+'px'}">
<view :style="{paddingTop: statusBarHeight +'px'}">
<view class="pad-sx20 pad-zy40">
<!-- 搜索输入框 start -->
<view class="radius30 disac pad-zy40 pad-sx20 mar-x40" style="background-color: #f2f1f7;">
<image src="/static/constant/icon-search.png" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
<input type="text" style="padding-left: 20rpx;" v-model="searchText" placeholder="搜索" placeholder-style="font-weight: bold;" />
<image src="/static/public/icon-search.png" mode="widthFix" style="width: 60rpx;height: 60rpx;"></image>
<input @confirm="searchEv" class="pad-z20 width100" type="text" v-model="searchText" placeholder="搜索" placeholder-style="font-weight: bold;" />
</view>
<!-- 搜索输入框 end -->
@ -19,17 +19,21 @@
<swiper-pu :bannerList="bannerList" :isplay="isAutoPlay" :newHeight="'230'" :newRadius="'15'" :newBottom="'10'"></swiper-pu>
<!-- 轮播图 end -->
</view>
<view style="position: sticky;z-index: 10;" :style="{top: statusBarHeight+50+'px'}">
<swiper-tab id="tab" :list="type" v-model="active" @input="clickTab" itemColor="#000000" lineColor="#000000">
<view style="position: sticky;z-index: 10;" :style="{ top: statusBarHeight +'px'}">
<swiper-tab id="tab" :list="type" v-model="current" @input="clickTab" itemColor="#000000" lineColor="#000000">
<!-- 自定义tabs样式 -->
<!-- <view slot="title">其其</view> -->
</swiper-tab>
</view>
<view class="pad-zy40">
<swiper class="swiper-page mar-s40 pad-x140" :style="{height:swiperHeight-(statusBarHeight+50)+'px'}" :current="current" @change="swiperChange">
<swiper-item v-for="item in type" :key="index" class="" style="overflow: hidden;overflow-y: scroll;">
<!-- 列表数据 -->
<list-one></list-one>
<view class="pad-zy40 pad-s40">
<swiper class="swiper-page pad-x140" :style="{ height: swiperHeight - statusBarHeight +'px'}" :current="current" @change="swiperChange">
<swiper-item v-for="item in type" :key="index">
<scroll-view scroll-y @scrolltolower="scrollBottomEv" style="height: 100%;">
<!-- 列表数据 -->
<list-one></list-one>
<!-- 暂无更多数据 -->
<pitera v-if="pitera"></pitera>
</scroll-view>
</swiper-item>
</swiper>
</view>
@ -40,20 +44,27 @@
</template>
<script>
import swiperTab from '@/components/swiper-tab/swiper-tab.vue'
// tab
import swiperTab from '@/components/swiper-tab/swiper-tab.vue';
//
import swiperPu from '@/components/swiper-pu.vue';
//
import pitera from '@/components/nothing/pitera.vue';
//
import listOne from '@/components/list/list-one.vue';
//
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{
swiperPu,
pitera,
swiperTab,
listOne
},
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
statusHNH:uni.getStorageSync('customBar'),
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
searchText:'',//
type: [{
title: '翡翠'
}, {
@ -65,62 +76,35 @@
}, {
title: '其他'
}],
active: 0,
current:0,
current:0, // tabswiper
swiperHeight:uni.getSystemInfoSync().windowHeight,
searchVal:'',//
publicColor:'',//
gonggList:[//
],
fwList:[//
],
kcurrent:0,//
ktList:[//
],
dataList:[//
],
showTop:false,
newCurrent:0,
page:1,
size:10,
total:'',//
isZanw:true,
course_id:0,
isLoading:false,
isShowT:true,
titleList:[],//
imgList:[],//
gaoone:{},
gaotwo:{},
gaothree:{},
isNet:true,
wuNet:'当前无网络连接',
refTime:'',
reNum:0,
bannerList:[],//
isAutoPlay:false,
jieDuan:false,
isNewRenderDone:false ,//
isQuan:uni.getStorageSync('isQuan'),
quanImg:uni.getStorageSync('quanImg'),
publicColor:'', //
showTop:false, //
dataList:[], //
page:1, //
size:10, //
total:0, //
pitera:false, //
titleList:uni.getStorageSync('footTitle'), //
imgList:uni.getStorageSync('footimg'), //
ifNet:true,
noNetwork:'当前无网络连接',
refTime:null, //
refNum:0, //
bannerList:[], //
isAutoPlay:false,//
blockIng:true, //
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkKT()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
e.scrollTop > 360 ? this.showTop = true : this.showTop = false;
},
onHide() {
//
this.isAutoPlay = false;
},
onUnload() {
//
this.isAutoPlay = false;
},
onReady() {
@ -130,38 +114,19 @@
});
},
onShow() {
uni.setStorageSync('firstTime',1);
this.checkNet()
this.$toolAll.tools.isLogin()
let maiOjb = {
e:6,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
if(uni.getStorageSync('token')!='' && uni.getStorageSync('chu')=='') {
this.$toolAll.tools.daoTime()
uni.setStorageSync('chu',1)
}
this.checkKT()//
this.isAutoPlay = true;
//
this.checkNet();
this.isAutoPlay = true; //
},
onShareAppMessage(res) {
var ya = this;
let maiOjb = {
e:6,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
var shareObj = {
     title: '成都恒美毛发', // (slogan)
     title: '', // (slogan)
     path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}` // 默认是当前页面,必须是以‘/开头的完整路径
  };
  return shareObj;
},
onLoad(options) {
if(options.source_code!='' && options.source_code!=undefined){
this.loginEv(options);
} else if(options.q!=undefined){
if(options.q!=undefined){
// unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1")
// decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
let str = unescape(options.q);
@ -175,21 +140,6 @@
if(len1!=-1) newInvite = str.slice((len1+12),(len1+12+32));
if(len2!=-1) newChanel = str.slice((len2+8),(len2+8+8));
if(len3!=-1) newsource_code = str.slice((len3+12),(len3+12+32));
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:newInvite,//
channel:newChanel,
source_code:newsource_code
}
// console.log(params);
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
},
});
} else if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options);
}
// const query = wx.createSelectorQuery()
// query.select('.statusHNH').boundingClientRect((rect) => {
@ -197,41 +147,32 @@
// uni.setStorageSync('statusHNH',rect.height)
// this.statusHNH = rect.height
// }).exec()
this.checkBCate();
this.checkKey();
this.checkSwi();//
// this.checkBanner()//
this.$toolAll.tools.buriedPointAll();//id
// this.checkQ();
setTimeout(()=>{
this.quanImg= uni.getStorageSync('quanImg');
this.quanId = uni.getStorageSync('quanId');
},3000)
this.checkUserInfo();
this.checkUserInfo();//
},
methods: {
//
scrollBottomEv(){
//
if(this.total!=this.dataList.length){
// +1
this.page++
// this.checkList(); //
} else {
//
this.pitera = true;
}
},
// tab
clickTab(index){
this.current = index
},
//
swiperChange(e){
this.active = e.detail.current
this.current = e.detail.current
},
loginEv(option){
console.log(option,'option');
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:option.invite_code || '',//
source_code:option.source_code || '',
channel:option.channel || ''
}
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
},
});
},
checkUserInfo(){
//
async checkUserInfo(){
this.$requst.post('user/info').then(res=>{
if(res.code==0){
if(res.data.phone_active!=0){
@ -242,42 +183,6 @@
}
})
},
checkQ(){//
this.$requst.post('user/home-coupon').then(res=>{
if(res.code==0){
if(res.data.has_coupon==1){
this.isQuan = true;
this.quanImg = this.$http + res.data.home_coupon.cover;
this.quanId = res.data.home_coupon.id;
}
}
})
},
recerveEv(){//
this.$requst.post('user/get-coupon',{coupon_id:uni.getStorageSync('quanId')}).then(res=>{
if(res.code==0){
this.isQuan = false;
this.$toolAll.tools.showToast('领取成功');
setTimeout(()=>{
uni.navigateTo({
url:'/pagesA/coupon/coupon'
})
},1000)
}
if(res.code==302){
this.$toolAll.tools.showToast(res.msg);
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
}
})
},
closeEv(){
this.isQuan = false;
uni.setStorageSync('isQuan',false);
},
//
checkSwi(){
checkBanner({position:'home-banner'}).then(res=>{
@ -298,270 +203,50 @@
}
})
},
searchEv(){//
if(this.blockIng){
uni.navigateTo({
url:`/pagesB/searchPage/searchPage?keyWorld=${ this.searchText }`
})
}
},
//
checkNet(){
uni.getNetworkType({
success: (res)=> {
if(res.networkType=='none'){
uni.setStorageSync('isNet',false)
this.isNet = false
if((this.reNum++)==5){
this.ifNet = false
if((this.refNum++)==5){
clearInterval(this.refTime)
this.wuNet = '刷新失败'
this.reNum = 0
this.noNetwork = '刷新失败'
this.refNum = 0
}
this.publicColor = uni.getStorageSync('publicColor')
} else {
uni.setStorageSync('isNet',true)
this.isNet = true
this.ifNet = true
clearInterval(this.refTime)
if(this.wuNet == '正在刷新...') {
if(this.noNetwork == '正在刷新...') {
getCurrentPages()[getCurrentPages().length - 1].onLoad()
}
}
}
});
},
//
refresh(){
this.wuNet = '正在刷新...'
this.noNetwork = '正在刷新...'
this.refTime = setInterval(()=>{
this.checkNet()
},1000)
},
bangd(){//
this.$requst.post('').then(res=>{log('绑定客服:',res);},error=>{})
},
tapChoose(index){//
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
let newUrl = ''
if(index==0) newUrl = this.gaoone.url
if(index==1) newUrl = this.gaotwo.url
if(index==2) newUrl = this.gaothree.url
uni.navigateTo({
url:newUrl
})
} else this.jieDuan = true
}
},
checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{
// log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let reObj = {title:item.keyword}
this.fwList.push(reObj)
})
}
}
},error=>{})
},
checkBCate(){//
this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res);
if(res.code==0){
if(res.data.length!=0){
if(res.data.recommend.length!=0){//
res.data.recommend.forEach(item=>{
let bcObj = {
src:this.$http + item.icon,
url:item.link,
title:item.name
}
this.gonggList.push(bcObj)
})
this.gonggList.push({src:this.$http + res.data.recommendMore,title:'更多'})
}
if(res.data.footBar.length!=0){//
res.data.footBar.forEach(item=>{
let newName = item.name
let newObj = {
iconPath:this.$http + item.icon[0],
selectedIconPath:this.$http + item.icon[1],
}
if(item.key=="home"){
this.imgList[0] = newObj
this.titleList[0] = newName
}
if(item.key=="category"){
this.imgList[1] = newObj
this.titleList[1] = newName
}
if(item.key=="service"){
this.imgList[2] = newObj
this.titleList[2] = newName
}
if(item.key=="shop"){
this.imgList[3] = newObj
this.titleList[3] = newName
}
if(item.key=="my"){
this.imgList[4] = newObj
this.titleList[4] = newName
}
})
uni.setStorageSync('footTitle',this.titleList)
uni.setStorageSync('footimg',this.imgList)
}
if(res.data.ad.length!=0){//
this.gaoone = {
imgSrc:this.$http + res.data.ad[0].img,
url:res.data.ad[0].link,
}
this.gaotwo = {
imgSrc:this.$http + res.data.ad[1].img,
url:res.data.ad[1].link,
}
this.gaothree = {
imgSrc:this.$http + res.data.ad[2].img,
url:res.data.ad[2].link,
}
}
// this.publicColor = res.data.mainColor
this.publicColor = uni.getStorageSync('publicColor')
}
}
},error=>{})
},
checkKT(){//
let parmas = {
course_id:this.course_id,//ID
page:this.page,
size:this.size
}
this.$requst.post('archives/course',parmas).then(res=>{
// log('',res);
if(res.code==0){
//
if(res.data.course.length!=0){
this.ktList = []
res.data.course.forEach(item=>{
let lObj = {
id:item.id,
title:item.title,
active:item.active
}
this.ktList.push(lObj)
})
}
//
if(this.page==1) this.dataList = []
if(res.data.list.list.length!=0){
this.total = res.data.list.total
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let ktObj = {
category_id:item.category_id,//ID
id:item.id,
is_collected:item.is_collected,//
collects:item.collects,//
views:item.views,//
main_img:this.$http + item.cover,//
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(ktObj)
})
}
this.isLoading = true
}
},error=>{})
},
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
this.dataList[e].is_collected = 1
//
collectionEV({action:'collect',archive_id:this.dataList[e].id})
}
},
comfirmev(e){//
this.dataList[e].is_collected = 0
this.$toolAll.tools.showToast('正在取消...','loading')
//
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id})
},
// chooseLike(e){//
// // log(this.dataList[e].is_collected);
// let active = ''
// this.dataList.forEach((item,index)=>{
// if(e==item.id){
// active = index
// }
// })
// if(this.dataList[active].is_collected==0){
// this.dataList[active].is_collected = 1
// //
// collectionEV({action:'collect',archive_id:e})
// }
// },
// comfirmev(e){//
// let active = ''
// this.dataList.forEach((item,index)=>{
// if(e==item.id){
// active = index
// }
// })
// this.dataList[active].is_collected = 0
// this.$toolAll.tools.showToast('...','loading')
// //
// cancleCollectionEV({action:'collect',archive_id:e})
// },
chooseGon(index){//
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
if(index==(this.gonggList.length-1)){
uni.navigateTo({
url:'/pages/tabbar/cate/cate'
})
} else {
uni.navigateTo({url:this.gonggList[index].url})
}
} else this.jieDuan = true
}
},
choosecateEv(e){//
// log('',e);
this.newCurrent = e
this.isZanw = true
this.page = 1
this.course_id = this.ktList[e].id
this.checkKT()
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
searchEv(){//
// log(this.searchVal);
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
uni.navigateTo({
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
})
} else this.jieDuan = true
}
},
chooseReEv(index){
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
uni.navigateTo({
url:'/pagesB/searchPage/searchPage?keyWorld='+this.fwList[index].title
})
} else this.jieDuan = true
}
}
}
}
</script>

View File

@ -1,588 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'商城'" :statusBack="false" :statusTitle="true"></status-nav>
<!-- 自定义轮播 -->
<view :style="{marginTop:statusHNH+'px'}">
<swiper-pu :bannerList="bannerList" :isplay="isAutoPlay"></swiper-pu>
</view>
<!-- 搜索输入框 -->
<view class="search-input-box bacf shop-nav-box" :style="{top: statusHNH+'px',position:positionMode}" style="padding-top: 10rpx;left: 0;right: 0;z-index: 3;">
<view class="disac pad-zy30 mar-s20">
<!-- 输入框 -->
<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>
<!-- 分类标题 -->
<view style="background: #FFFFFF;font-size: 24rpx;" class="disjbac pad-zy20 pad-s20">
<view v-for="(item,index) in shopCate" @tap="chooseShopCate(index)" :class="activeIndex==index?'activecate':'shopMo'" :style="{background:activeIndex==index?publicColor:'#F2F2F2'}" :key="index"><span>{{item}}</span></view>
</view>
<!-- 筛选结果 -->
<view v-if="isClick" class="pad-zy50 disac fw pad-x20">
<view class="col3 fon28 mar-s30">筛选</view>
<view v-if="bingVal!=''">{{bingVal}}<view class="mar-z10" @tap="deleteSX(0)">×</view></view>
<view v-if="doctorVal!=''">{{doctorVal}}<view class="mar-z10" @tap="deleteSX(1)">×</view></view>
<view v-if="activityVal!=''">{{activityVal}}<view class="mar-z10" @tap="deleteSX(2)">×</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.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="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>
<!-- <span>部门{{item.doctor_extra.skill}}</span> -->
</view>
</view>
</view>
</view>
</view>
<!-- 重置筛选 -->
<view class="disjbac pad-zy20 mar-s50 mar-x30 pad-s20">
<view @tap="chongz"></view>
<view @tap.stop="shaix">筛选</view>
</view>
</view>
</view>
<view v-if="isXiao" @tap="isXiao=false" class="moban"></view>
<!-- 数据列表 -->
<!-- <view v-if="loading" :style="{marginTop:statusHNH+titleHeight+(isClick?52:0)+'px'}"> -->
<view v-if="loading" :style="{marginTop:(gaodu==200?titleHeight : 0)+'px'}">
<view v-if="dataList.length!=0 && search_result" class="pad20 ">
<view style="width: 48.6%;float: left;" class="pad-x180">
<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 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;" class="pad-x180">
<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 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>
<nothing-page v-if="dataList.length==0" :content="`暂无更多商品列表`"></nothing-page>
</view>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='3'></foot-tab>
<!-- 购物车 -->
<navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none">
<view class="cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
<view class="posia" v-if="cartNum!=0"><view>{{cartNum}}</view></view>
</view>
</view>
</navigator>
<!-- 弹框授权 -->
<auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile>
</view>
</template>
<script>
import shopList from '@/components/shop-list.vue';
import swiperPu from '@/components/swiper-pu.vue';
import {cartNum,checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{
shopList,
swiperPu
},
data() {
return {
titleList:[],
imgList:[],
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
activeIndex:'-1',
shopCate:['全部分类','全部医生','全部活动'],
cateTitle:'',
bingzList:[],//
zanBingArr:[],//
isXiao:false,//
titleHeight:'',//
shaiList:[],//
isClick:false,//
dataList:[],
searchVal:'',//
doctor_role:'',// doctor= design=
doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:'',//ID
loading:false,
cartNum:0,
doctorList:[],
showDoctor:false,
timeList:[],//
zanArr:[],
timer:null,
search_result:false,
bingVal:'',
doctorVal:'',
activityVal:'',
bannerList:[],//
isAutoPlay:false,
optionObj:{},
positionMode:'sticky',
gaodu:0
}
},
onHide() {
this.isAutoPlay = false;
},
onUnload() {
this.isAutoPlay = false;
},
onShow() {
this.$toolAll.tools.isLogin();
this.cartNumEv();//
this.isAutoPlay = true;
},
onPageScroll(e) {
if(e.scrollTop>=200){
this.positionMode = "fixed";
this.gaodu = 200;
} else {
this.positionMode = "sticky";
this.gaodu = 0;
}
},
onShareAppMessage() {
var shareObj = {
path: `/pages/tabbar/shop/shop?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
this.optionObj = options;
// +
const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => {
// console.log('+',rect.height);
this.titleHeight = rect.height;
}).exec()
this.checkSX();
let maiOjb = {
e:12,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb);
this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res);
if(res.code==0){
if(res.data.length!=0){
if(res.data.footBar.length!=0){//
res.data.footBar.forEach(item=>{
let newName = item.name
let newObj = {
iconPath:this.$http + item.icon[0],
selectedIconPath:this.$http + item.icon[1],
}
if(item.key=="home"){
this.imgList[0] = newObj
this.titleList[0] = newName
}
if(item.key=="category"){
this.imgList[1] = newObj
this.titleList[1] = newName
}
if(item.key=="service"){
this.imgList[2] = newObj
this.titleList[2] = newName
}
if(item.key=="shop"){
this.imgList[3] = newObj
this.titleList[3] = newName
}
if(item.key=="my"){
this.imgList[4] = newObj
this.titleList[4] = newName
}
})
uni.setStorageSync('footTitle',this.titleList)
uni.setStorageSync('footimg',this.imgList)
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
}
}
}
},error=>{})
//
this.checkSwi();
},
methods: {
//
checkSwi(){
checkBanner({position:'home-banner'}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let isVideo = false
if(item.type!='img') isVideo = true
let banObj = {
imgSrc:this.$http + item.src,
url:item.url,
isVideo:isVideo,
poster:this.$http + item.src,
}
this.bannerList.push(banObj)
})
console.log(this.bannerList);
}
}
})
},
chooseDoctor(index){//
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.doctor_name = '';
if(res.data.list.length!=0){
this.showDoctor = true;
this.doctorList = res.data.list;
} else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg);
})
},
cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
async checkSX(){//
this.$requst.get('spu/condition').then(res=>{
if(res.code==0){
this.zanBingArr = res.data;
}
})
await this.checkShopList();
},
chooseShopCate(index){//
if(this.activeIndex==index && this.isXiao) {
this.isXiao = false;
} else this.isXiao = true;
this.bingzList = [];
this.doctor_name = '';//
this.isClick = false;
this.activeIndex = index;
let arr = [];
let obj = {};
if(this.activeIndex==0) {
this.cateTitle = '项目选择';
this.zanBingArr.disease.forEach(item=>{
obj = {
pid: item.pid,
title: item.name,
id: item.id,
sort: item.sort,
isActive:false
}
arr.push(obj);
})
this.bingzList = arr;
this.bingzList.unshift({pid: '', title: "全部", id: '', sort: '',isActive:true});
this.bingzList.push({pid: '', title: "其他", id: '', sort: ''});
}
if(this.activeIndex==1) {
this.cateTitle = '职位选择';
this.zanBingArr.doctor_roles.forEach(item=>{
obj = {
id: item.id,
name: item.name,
title: item.title,
pid: item.pid,
is_group: item.is_group,
isActive:false
}
arr.push(obj);
})
this.bingzList = arr;
this.bingzList.unshift({id: '', name: '', title: "全部", pid: '', is_group: '',isActive:true});
}
if(this.activeIndex==2) {
this.cateTitle = '活动选择';
this.zanBingArr.activity.forEach(item=>{
obj = {
name: item.name,
title: item.title,
isActive:false
}
arr.push(obj);
})
this.bingzList = arr;
this.bingzList.unshift({name: '', title: "全部",isActive:true});
}
},
checkShopList(){//
let keyWord = this.searchVal;
if(this.shaiList.length!=0) keyWord = this.shaiList.filter(item=>item!=null).join(',');
let params = {
keyword:'',//
page:1,
size:2000,
doctor_role:this.doctor_role,// doctor= design=
doctor_name:this.doctor_name,//
activity:this.activity,// + normal=group_make=group_buy=;limit_time=
disease_id:this.disease_id//ID
}
uni.request({
url:`${getApp().globalData.domainName}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.dataList = [];
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,//
activity_id:item.activity_id,
spu_type:item.spu_type//
}
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.length!=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;
this.loading = true;
},1000)
} else {
this.dataList = this.zanArr;
this.search_result = true;
this.loading = true;
}
} else {
this.search_result = true;
}
}
}
})
},
goPage(id,index){//
let is_activity = 0;
let shopId = 0;
if(this.dataList[index].isTuan==true || this.dataList[index].isPing==true || this.dataList[index].isXian==true) {
is_activity = 1;
shopId = this.dataList[index].activity_id;
} else {
shopId = id;
}
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${shopId}&isIntegral=${this.dataList[index].isIntegral}&is_activity=${is_activity}`
})
},
chooseBing(index){//
this.bingzList.forEach(item=>{
item.isActive = false;
})
this.bingzList[index].isActive = true;
// id
if(this.activeIndex===0) {
this.disease_id = this.bingzList[index].id;
this.bingVal = this.bingzList[index].title;
}
//
if(this.activeIndex===1) {
this.doctor_role = this.bingzList[index].name;
this.doctorVal = this.bingzList[index].title;
}
// type
if(this.activeIndex===2) {
this.activity = this.bingzList[index].name;
this.activityVal = this.bingzList[index].title;
}
},
chongz(){//
this.isClick = false;
this.bingVal = '';
this.doctorVal = '';
this.activityVal = '';
},
shaix(){//
this.isXiao = false
this.isClick = true;
this.checkShopList();
},
deleteSX(index){//
if(index==0) {
this.disease_id = '';
this.bingVal = '';
}
if(index==1) {
this.doctor_role = '';
this.doctorVal = '';
}
if(index==2) {
this.activity = '';
this.activityVal = '';
}
if(this.activity=='' && this.doctorVal == '' && this.activityVal == ''){
this.isClick = false;
}
this.checkShopList();
},
searchEv(){//
uni.navigateTo({
url:`/pagesB/shopSearch/shopSearch?keyWorld=${this.searchVal}`
})
}
}
}
</script>
<style>
page{background: #F5F5F5;}
.activecate,.shopMo{width: 216rpx;height: 65rpx;border-radius: 20rpx;line-height: 65rpx;text-align: center;background-color: #f2f2f2;color: #333333;}
.activecate{color: #FFFFFF;}
.shopMo span::after,.activecate span::after{display: inline-block;content: '';width: 16rpx;height: 13rpx;margin-left: 6rpx;}
.shopMo span::after{background: url(/static/public/shopSJ.png) no-repeat;background-size: 100% 90%;}
.activecate span::after{background: url(/static/public/shopSJ-active.png) no-repeat;background-size: 100% 90%;transform: rotate(180deg);background-position: 0 2rpx;}
</style>

View File

@ -523,7 +523,7 @@
this.$toolAll.tools.showToast('正在调起支付','loading',1500);
}
uni.request({
url:`${getApp().globalData.domainName}order/create`,
url:`${uni.getStorageSync('hostapi')}order/create`,
data:parmas,
method:'post',
header:{

View File

@ -254,7 +254,6 @@
if(this.haveImg == false) {
this.vision = true
} else {
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
let maiOjb = {
e:5,//

View File

@ -243,7 +243,7 @@
if(index==1){
this.isWen = false;
uni.request({
url:`${getApp().globalData.domainName}spu/collection`,
url:`${uni.getStorageSync('hostapi')}spu/collection`,
data:{page:this.page,size:this.size},
method:'post',
header:{

View File

@ -1,92 +1,60 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'搜索'" :statusTitle="true"></status-nav>
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'搜索'"></status-nav>
<!-- 输入框 -->
<view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}">
<view class="search-input-box bacf" :style="{paddingTop: statusBarHeight+'px'}">
<view class="disac pad-zy30 mar-s20">
<!-- 输入框 -->
<input @confirm="searchEv" style="border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;" class="width100 fon34 radius10" type="text" v-model="searchVal" placeholder="请输入问题/病种/医生姓名"/>
<input @confirm="searchEv" v-model="searchStr" placeholder="请输入关键词" class="width100 fon34 radius10" type="text"/>
<!-- 搜索 -->
<view @tap="searchEv" class="flexs mar-z30 radius10 pad-zy40 fon34 colf" style="height: 80rpx;line-height: 80rpx;" :style="{background:publicColor}">搜索</view>
</view>
<!-- 自定义二级分类 -->
<view class=" pad-zy20 mar-s40" v-if="!isList">
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" :isCenter="false" :newbmo="'#E0E0E0'" @choosecateEv="chooseTwo" :newcateList="cateList"></cate-pu>
<view @tap="searchEv" class="search-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
<!-- 历史搜索和热门搜索 -->
<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">
<list-pu :radiu="true" @chooseLike="chooseLike" @comfirmev="comfirmevl" :list="dataList"></list-pu>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 列表 -->
<!-- <view v-if="dataList.length!=0"> -->
<list-two :scrollCate="1"></list-two>
<!-- </view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view> -->
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower> -->
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<auth-phone v-if="showAuthPhone"></auth-phone>
</view>
</template>
<script>
import cateTu from '@/components/cate-items/cate-tu.vue';
import listTwo from '@/components/list/list-two.vue';
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
export default {
components:{
cateTu
listTwo
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
searchVal:'',//
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
searchStr:'',//
publicColor:uni.getStorageSync('publicColor'),//
reSearchList:[//
{
title:'历史搜索',
src:'/static/public/del-icon.png',
list:[]
},
{
title:'热门搜索',
src:'',
list:[
// {content:''},
// {content:''},
// {content:''},
// {content:''},
// {content:''},
]
},
],
isShowT:false,//
isList:true,//
cateList:[//
],
dataList:[//
],
showTop:false,//
newCurrent:0,
page:1,
size:10,
total:'',//
isZanw:true,
category_id:'',//ID
page:1, //
size:10, //
total:0, //
pitera:false, //
vision:false,
isShowP:false,
showAuthPhone:false,
}
},
onPageScroll(e) {
@ -101,9 +69,6 @@
this.isZanw = false
}
},
onUnload() {
uni.removeStorageSync('cateList')
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/searchPage/searchPage?invite_code=${uni.getStorageSync('invite_code')}`, // /
@ -118,15 +83,13 @@
this.loginEv('',options.source_code,options.channel);
}
if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld
this.searchStr = options.keyWorld
this.searchEv()
}
this.checkSearchHistory()
this.checkKey()
},
onShow() {
this.$toolAll.tools.isLogin()
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
if(this.searchStr!=undefined && this.searchStr!='') this.searchEv()
},
methods: {
loginEv(invite_code='',source='',channel=''){
@ -154,141 +117,11 @@
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
this.showAuthPhone = true
}
},
checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let reObj = {
id:item.id,
content:item.keyword
}
this.reSearchList[1].list.push(reObj)
})
}
}
},error=>{})
},
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
this.dataList[e].is_collected = 1
//
collectionEV({action:'collect',archive_id:this.dataList[e].id})
}
},
comfirmevl(e){//
this.dataList[e].is_collected = 0
this.$toolAll.tools.showToast('正在取消...','loading')
//
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id})
},
checkSearchHistory(){//
this.$requst.post('user/search-history',{page:this.page,size:this.size}).then(res=>{
// console.log(res);
if(res.code==0){
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
if(item.keyword!=null){
let searchObj = {
id:item.id,
content:item.keyword
}
this.reSearchList[0].list.push(searchObj)
}
})
}
}
},error=>{})
},
searchEv(){//
// console.log('ID',this.category_id,'',this.searchVal);
this.$toolAll.tools.showToast('搜索中...')
this.$requst.post('archives/category',{page:this.page,size:this.size,category_id:this.category_id,keyword:this.searchVal}).then(res=>{
// console.log('',res);
if(res.code==0){
uni.hideToast()
if(uni.getStorageSync('cateList')==''){//
if(res.data.category.length!=0){
res.data.category.forEach((item,index)=>{
let cateObj = {
id:item.id,//ID
title:item.title,//
active:item.active,//
model_id:item.model_id,//ID
model_name:item.model_name,//
sort:item.sort
}
this.cateList.push(cateObj)
})
uni.setStorageSync('cateList',this.cateList)
}
} else {
//
this.cateList = uni.getStorageSync('cateList')
}
//
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 fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
is_collected:item.is_collected,//
collects:item.collects,//
views:item.views,//
main_img:this.$http + item.cover,//
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(tObj);
// if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
// if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
// if(this.newCurrent==2 && item.category_id==34) this.dataList.push(tObj)
// if(this.newCurrent==3 && item.category_id==38) this.dataList.push(tObj)
})
}
let obj = {
content:this.searchVal
}
this.reSearchList[0].list.push(obj)
this.isList = false
}
},error=>{})
},
delev(){//
this.isShowT = true
},
comfirmev(){//
this.isShowT = false
this.$requst.post('user/clear-search').then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('已清空')
this.reSearchList[0].list = []//
}
},error=>{})
},
cancleev(){//
this.isShowT = false
},
chooseTwo(index){//
// console.log('',index);
this.isZanw = true
this.page = 1
this.newCurrent = index
this.category_id = this.cateList[index].id
this.searchEv()
},
backTop(){//
uni.pageScrollTo({
@ -301,5 +134,6 @@
</script>
<style>
.search-input-box input{border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;}
.search-input-box .search-btn {height: 80rpx;line-height: 80rpx;margin-left: 30rpx;border-radius: 10rpx;padding: 0 40rpx;font-size: 34rpx;color: #FFFFFF;flex-shrink: 0;}
</style>

View File

@ -1,208 +1,50 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav v-if="invite_code==''" :titleVal="'商品详情'" :statusTitle="true"></status-nav>
<view v-if="invite_code!=''" class="status-box statusHNH" style="background-color: #FFFFFF;">
<view :style="{height:statusBarHeight+'px'}"></view>
<view class="status-nav">
<!-- 标题 -->
<view class="tab-title tcenter" style="color: #000000;">商品详情</view>
</view>
</view>
<!-- 列表 -->
<view :style="{top: statusHNH+'px'}" v-if="isNei!=3" class="posiszy" style="height: 50px;">
<view class="bacf pad-zy32 pad-sx20">
<cate-pu @choosecateEv="choosecateEv" :activeb="invite_code!=''?'#3875F6':publicColor" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
</view>
</view>
<view :style="{top: statusHNH+'px'}" v-else class="posiszy" style="height: 50px;"></view>
<view class="pad-x180" :style="{paddingTop: isNei!=3?(statusHNH+60)+'px':statusHNH+'px'}">
<!-- 自定义轮播 -->
<view v-if="isLoading">
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'商品详情'"></status-nav>
<!-- 容器 -->
<container-subgroup>
<view style="margin: 0 -30rpx;">
<swiper-pu v-if="cateCurrent==0" :isplay="isAutoPlay" :browseP="true" :bannerList="bannerList" :newHeight="swiperHeight" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
<!-- <view v-if="isNei==3" class="score-box">{{detailObj.score}}</view> -->
<view v-show="cateCurrent==isNum">
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
<!-- 标题 -->
<view class="mar-x20 fon36 col3 bold clips3 shop-title-box line-h50">
<view style="margin-top: -8rpx;margin-right: 10rpx;">
<span v-if="isNei!=3" class="radius15 colf fon20" :style="{background:publicColor}">{{detailObj.disease_name}}</span>
<span v-if="isNei==0" class="radius15 colf fon20 mar-z10"></span>
<span v-if="isNei==1" class="radius15 colf fon20 mar-z10"></span>
<span v-if="isNei==2" class="radius15 colf fon20 mar-z10"></span>
</view>
<span>{{detailObj.name}}</span>
</view>
<view class="fon24 col7D">无任何额外消费</view>
<!-- 团购商品详情时显示 -->
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
<view>团购累计参与人员{{detailObj.activity_order_num}}</view>
<view>还剩余{{detailObj.group_surplus_num}}</view>
</view>
<!-- <view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">:</span><span v-if="isNei==1">:</span>{{detailObj.price/100}} <span v-if="isNei!=10">{{detailObj.original_price/100}}</span></view> -->
<view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">:</span><span v-if="isNei==1">:</span>{{detailObj.price/100}} <span>{{detailObj.original_price/100}}</span></view>
<view class="mar-s20 shop-price" v-else>{{detailObj.score}}</view>
<view class="disjbac shar-box" style="align-items: flex-end;">
<view>
<view class="disac" v-if="detailObj.level_text!=''">
<image class="flexs" src="/static/public/huiy.png" mode="aspectFill"></image>
<view class="fon24 col9">{{detailObj.level_text}}</view>
</view>
<view v-else class="fon24 col9">全部人员可买</view>
</view>
<view class="disac flexs">
<view @tap="shareEv" class="disac fc mar-zy36 posir">
<image src="/static/public/weix.png" class="wh42" mode=""></image>
<view class="fon24 col9">分享</view>
<button class="posia-op" open-type="share">分享</button>
</view>
<view class="disac fc" @tap="tapConllection">
<image v-if="isDetailConllection" src="/static/public/yconllection.png" class="wh44" mode=""></image>
<image v-else src="/static/public/conllection.png" class="wh44" mode=""></image>
<view class="fon24 col9">收藏</view>
</view>
</view>
</view>
<view class="pad-x30 pad-s10 borbot" v-if="isNei==0 || isNei==1 ||isNei==2">
<view class="fon36 colf bold pbackc tc pad-sx20 radius45" v-if="daoTime!='活动已结束'">{{daoTime}}</view>
<view class="fon36 colf bold pbackc tc pad-sx20 radius45" v-else>{{daoTime}}</view>
</view>
<!-- 规格 -->
<view class="dis tc mar-s20 fon28">
<view class="col3 flexs" style="margin-top: 6rpx;">类型</view>
<view class="width100 disac fw" style="justify-content: flex-end;">
<view class="col6 mar-z30 mar-x20 molei" style="background: #F2F2F2;" v-for="(item,index) in skuCate" :key="index">{{item.title}}</view>
</view>
<!-- <view>
<view class="fon26 col3 mar-x20">上市时间</view>
<view class="fon24 colB3">{{detailObj.param_maket_time||'今年'}}</view>
</view>
<view>
<view class="fon26 col3 mar-x20">有效期</view>
<view class="fon24 colB3">{{detailObj.param_validity_time||'永久'}}</view>
</view>
<view>
<view class="fon26 col3 mar-x20">可用时间</view>
<view class="fon24 colB3">{{detailObj.param_use_time||'长期'}}</view>
</view>
<view>
<view class="fon26 col3 mar-x20">术前须知</view>
<view class="fon24 colB3">{{detailObj.param_notice||'无'}}</view>
</view> -->
</view>
</view>
<!-- 销量库存 -->
<view class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 disjbac">
<view class="col3">销量</view>
<view class="colB3">已售{{detailObj.amount}}</view>
</view>
<view class="fon28 disjbac mar-s40">
<view class="col3">库存</view>
<view class="colB3">剩余{{detailObj.stock}}</view>
</view>
</view>
<!-- 拼团 -->
<view v-if="isNei==1 && len!=0" class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 col3">{{len}}人正在拼团可以直接参与</view>
<swiper :autoplay="true" :interval="3000" :duration="1000" circular="true" class="shop-swiper" :style="{height: (len==1 && pingArr[0].length==1)?'110rpx':'280rpx'}" vertical="true">
<swiper-item v-if="pingArr[index].length!=0" v-for="(item,index) in pingArr" :key="index">
<view class="disjbac posir pad-x20" v-for="(itemt,indext) in item" :key="indext">
<image :src="itemt.imgSrc" mode="aspectFill" class="flexs big-img"></image>
<view class="disjbac width100 mar-z20 pad-sx20">
<view class="fon28 col3 width45">{{itemt.name}}</view>
<view class="fon28 disjbac width100 col7D">
<view class="flexs">
<view>还差{{itemt.num}}人拼成</view>
<view style="margin-top: 7rpx;">{{itemt.time_text}}</view>
</view>
<view @tap="comeTuan(itemt.id,index,indext)" class="colf bold flexs">去拼单</view>
</view>
</view>
<!-- 短线 -->
<view class="duan-xian"></view>
</view>
</swiper-item>
</swiper>
</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="fon28 col3 bold">产品详情</view>
<view class="fon28 mar-s20" style="color: #1A1A1A; line-height: 40rpx;">
<rich-text :nodes="detailInfo"></rich-text>
</view>
</view>
<!-- 医生 -->
<view v-if="doctorList.length!=0" class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 col3 bold">医生</view>
<!-- <view @tap="goDoctor(item.id)" v-for="(item,index) in doctorList" :key="index" class="disjbac posir pad-sx20">
<image :src="item.imgSrc" mode="aspectFill" class="flexs big-img"></image>
<view class="disjbac width100 mar-z20 pad-sx20">
<view class="fon28 col3 width50">{{item.name}}</view>
<view class="fon24 width50 col7D">擅长{{item.goodAt}}</view>
</view>
<view v-if="(doctorList.length-1)!=index" class="duan-xian"></view>
</view> -->
<!-- 推荐医生列表 -->
<list-doctor v-if="doctorList.length!=0" :list="doctorList"></list-doctor>
<view v-if="doctorList.length==0" class="disjcac fc" style="margin-top: 10%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<!-- <view class="fon24 col3">暂无推荐医生</view> -->
</view>
</view>
<!-- 产品推荐 -->
<view v-if="dataList.length!=0" class="fon30 bold mar-s40 mar-x10 pad-zy50 pcol"></view>
<shopList :dataList="dataList" v-if="dataList.length!=0"></shopList>
</view>
<view v-if="cateCurrent!=isNum">
<view v-if="allList.length!=0" class="pad-zy20">
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="allList"></list-pu>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">暂无内容</view>
</view>
</view>
</view>
<!-- 底部导航 -->
<view class="posixzy disjbac bacf pad-zy32 btnBKS">
<view class="posir">
<image @tap="backHome" class="posia backH" src="/static/public/back-home-02.png" mode="aspectFit"></image>
</view>
<view class="disac fon26 colf">
<view @tap="showTK = true" class="disjcac lianShare addCart-btn"><span v-if="isNei!=1"></span><span v-else></span></view>
<view @tap="showTK = true" class="disjcac lianShare mai-btn"><span v-if="isNei!=1"></span><span v-else></span></view>
</view>
</view>
<!-- 购物车 -->
<view @tap="goShopCart" class="detail-cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
<view class="posia" v-if="cartNum!=0"><view>{{cartNum}}</view></view>
</view>
</view>
<!-- 客服 -->
<view @tap="lianK" class="shopKf">
<view class="posir">
<image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image>
<button v-if="haveImg" open-type="contact" class="posia-op"></button>
</view>
<!-- 标题 -->
<view class="mar-s30 mar-x20 fon36 bold clips2 line-h50">New Farandole项链小号New Farandole项链小号New Farandole项链小号New Farandole项链小号</view>
<!-- 描述 -->
<view class="colpeili fon30 clips3 line-h50">于亿年宝藏中臻选1的宝石级钻石每年开采数亿克拉的钻石中 仅有1%的宝石级钻石才可作为...LOVE100 星座极光的原石挑选 </view>
<view class="disac mar-s20">
<!-- 是否限时优惠 -->
<view class="fon24 colf pad-zy10 pad-s10 pad-x20 activity-img">限时优惠</view>
<!-- 价格 -->
<view class="disac">
<view class="fon40 bold col0 mar-y10">20,000</view>
<view class="fon30 colpeili" style="text-decoration: line-through;">16,000</view>
</view>
</view>
<!-- 颜色 -->
<view class="mar-s50"><drop-down></drop-down></view>
<!-- 尺寸 -->
<drop-down :dropObj="dropObj" @chooseItem="chooseItem"></drop-down>
<!-- 作品介绍 -->
<view class="mar-s100 mar-x30 fon36 bold col0 tcenter">作品介绍</view>
<!-- 富文本 -->
<rich-text :nodes="shopRich"></rich-text>
</container-subgroup>
<!-- 底部导航 -->
<bottom-nav></bottom-nav>
<!-- 全局客服 -->
<public-customer
:nbottom="180"
:backgroundColor="'#FFFFFF'"
:radiusNum="'40rpx'"
:showText="false"
:iconNum="1"
:iconColor="'#000000'"></public-customer>
<view class="pad-x180" :style="{paddingTop: isNei!=3?(statusHNH+60)+'px':statusHNH+'px'}">
<!-- 立即购买加入购物车弹框 -->
<view v-if="showTK" class="posAll" style="z-index: 1000;" @tap="showTK=false">
<view class="bacf posixzy bottom-popu" @tap.stop="showTK=true">
@ -262,9 +104,9 @@
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower> -->
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<!-- <auth-phone v-if="isShowP"></auth-phone> -->
</view>
</view>
</template>
@ -274,11 +116,15 @@
import swiperPu from '@/components/swiper-pu.vue';
import {cancleCollectionShopEV,collectionShopEV} from '@/jsFile/publicAPI.js';
import shopList from '@/components/shop-list.vue';
import dropDown from '@/components/drop-downs/drop-down.vue';
import bottomNav from '@/components/detail-bottom-nav/bottom-nav.vue';
export default {
components:{
listDoctor,
swiperPu,
shopList
shopList,
dropDown,
bottomNav
},
data() {
return {
@ -287,6 +133,20 @@
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
cateCurrent:0,
dropObj:{
title:'尺寸',
childrenList:[
{
id:1,
childrenTitle:'1.2'
},
{
id:1,
childrenTitle:'6'
}
]
},
shopRich:'',//
swiperHeight:uni.getSystemInfoSync().windowWidth,
haveImg:true,
cateList:[{
@ -295,7 +155,12 @@
pid:11,
sort:4
}],
bannerList:[],//
bannerList:[{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
url:'',
isVideo:false,
poster:'',
}],//
//
xgList:[],
//
@ -404,7 +269,6 @@
this.vision = true;
this.loginEv(options);
} else {
this.checkDetail(options.id,options.is_activity);
this.cartNumEv();
//token
this.$toolAll.tools.overdue();
@ -425,6 +289,10 @@
}
},
methods: {
//
chooseItem(e){
this.log(e);
},
//
inputNum(e){
clearTimeout(this.timeout);
@ -482,7 +350,6 @@
if(e) {
this.vision = false;
this.isShowP = true;
this.checkDetail(this.orderId,this.isactivity);
}
},
cartNumEv(){//
@ -496,7 +363,7 @@
},
checkPTList(id){//
uni.request({
url:`${getApp().globalData.domainName}spu/group-list`,
url:`${uni.getStorageSync('hostapi')}spu/group-list`,
data:{id:id},
method:'post',
header:{
@ -631,7 +498,6 @@
this.vision = true
} else {
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
let maiOjb = {
e:this.detailObj.is_activity==0 ? 13:14,//1314
@ -672,142 +538,6 @@
this.vision = true
}
},
checkDetail(newId,is_activity){
console.log(newId,is_activity,'参数');
uni.request({
url:`${getApp().globalData.domainName}spu/detail`,
data:{id:newId,is_activity:is_activity},
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
console.log(res,'结果');
if(res.data.code==0){
this.allRes = res.data.data;
this.zhuImg = this.$http + res.data.data.detail.cover;
// sku
if(res.data.data.sku.length!=0){
res.data.data.sku.forEach(item=>{
if(item.is_default==1) {
this.skuDetail = item;
}
})
}
this.isLoading = true;
//
if(res.data.data.category.length!=0){
res.data.data.category.forEach((item,index)=>{
let cateObj = {
id:item.id,//ID
title:item.title,//
active:item.active,//
model_id:item.model_id,//ID
model_name:item.model_name,//
sort:item.sort
}
this.cateList.push(cateObj)
//
if(item.active==1) this.active = this.cateCurrent = index
//
if(this.category_id==item.id) this.isNum = index
})
}
if(this.invite_code!='' && this.invite_code!=undefined){
const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => {
// console.log('+',rect);
this.statusHNH = rect.height
// console.log(this.statusHNH );
}).exec()
}
//
this.detailObj = res.data.data.detail;
//
this.skuCate = res.data.data.sku;
if(this.detailObj.activity_type=='group_buy') this.isNei = 0;
if(this.detailObj.activity_type=='group_make') this.isNei = 1;
if(this.detailObj.activity_type=='limit_time') this.isNei = 2;
if(this.detailObj.activity_type=='normal') {
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
this.daoTime = "活动已结束";
clearInterval(this.timera);
} else {
this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);//
this.timera = setInterval(()=>{//
startTime = startTime + 1000;
this.daoTime = this.$toolAll.tools.dayTime(res.data.data.detail.activity_end_at,startTime);
},1000)
}
}
let maiOjb = {
e:this.detailObj.is_activity==0 ? 8 : 9,//访89
c: this.detailObj.is_activity==0 ? this.detailObj.id*1 : this.detailObj.activity_id,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
//
//
let arrImg = this.detailObj.images.split(',')
arrImg.forEach(item=>{
let newImgObj = {
imgSrc:this.$http + item,
url:'',
isVideo:false,
poster:'',
}
//
this.bannerList.push(newImgObj)
})
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
imgSrc:this.$http + arrImg[0],
url:this.$http + this.detailObj.video,
isVideo:true,
poster:'',
}
}
//
if(this.detailObj.is_collected==0) this.isDetailConllection = false
if(this.detailObj.is_collected==1) this.isDetailConllection = true
//
this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
//
if(res.data.data.doctor.length!=0){
res.data.data.doctor.forEach(item=>{
let docObj = {
id: item.id,
imgSrc: item.headimg != null ? item.headimg : '',
name: item.name,
cyear: parseFloat(item.work_time),
bmen: item.dept_name,
zcheng: '主任医师',
goodAt: item.diseases,
show_detail: item.show_detail
}
this.doctorList.push(docObj);
})
}
//
if(this.isNei==1 && this.detailObj.activity_going.length!=0) {
this.checkPTList(this.detailObj.id);//
}
this.checkShopList();
} else {
this.$toolAll.tools.showToast(res.data.msg);
}
}
})
},
checkShopList(){//
let params = {
keyword:'',//
@ -819,7 +549,7 @@
disease_id:''//ID
}
uni.request({
url:`${getApp().globalData.domainName}spu/list`,
url:`${uni.getStorageSync('hostapi')}spu/list`,
data:params,
method:'post',
header:{

View File

@ -278,7 +278,7 @@
size:this.size,
}
uni.request({
url:`${getApp().globalData.domainName}spu/list`,
url:`${uni.getStorageSync('hostapi')}spu/list`,
data:params,
method:'post',
header:{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/public/icon-duty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/public/icon-take.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB