新增订单列表,订单详情

master
chen 2022-02-18 21:20:26 +08:00
parent 41a29cbda7
commit b22db9a73c
44 changed files with 253 additions and 8000 deletions

View File

@ -401,6 +401,7 @@ button:after{content: none!important;}
/* 字体颜色 */
.colf{color: #FFFFFF;}
.colf6{color: #f6f6f6;}
.colb{color: #000000;}
.colc{color: #CCCCCC;}
.col3{color: #333333;}
@ -440,6 +441,7 @@ button:after{content: none!important;}
.bcdb{background-color: #DBDBDB;}
.bcf8{background: #F85050;}
.bacf5{background: #F5F5F5;}
.bacf6{background-color: #f6f6f6;}
/* 圆角 */
.radius10{border-radius: 10rpx;}

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3180711 */
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');
src: url('https://at.alicdn.com/t/font_3180711_o717yf8virj.woff2?t=1645176467979') format('woff2'),
url('https://at.alicdn.com/t/font_3180711_o717yf8virj.woff?t=1645176467979') format('woff'),
url('https://at.alicdn.com/t/font_3180711_o717yf8virj.ttf?t=1645176467979') format('truetype');
}
.icon {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-navigate-now:before {
content: "\e640";
}
.icon-send-goods:before {
content: "\e601";
}

View File

@ -41,16 +41,6 @@
// console.log('',e1);
// console.log('',e2);
// console.log(this.list[e1].list[e2].content);
if(this.isDetail){
uni.navigateTo({
url:`/pagesB/problemDetail/problemDetail?id=${this.list[e1].list[e2].id}&category_id=${this.list[e1].list[e2].category_id}`
})
} else {
uni.navigateTo({
url:`/pagesB/searchPage/searchPage?keyWorld=${this.list[e1].list[e2].content}`
})
}
},
delSearch(){
// this.list = []

View File

@ -2,12 +2,12 @@
<view>
<!-- 底部按钮 -->
<view class="bottom-nav-box display-between-center">
<button type="default">立即购</button>
<button type="default">加入购物</button>
<button type="default" @tap="showFrame=true"></button>
<button type="default" @tap="showFrame=true"></button>
</view>
<!-- 底部按钮弹框 -->
<view class="frame-box">
<view>
<view v-show="showFrame" class="frame-box" @tap="showFrame=false">
<view @tap.stop="showFrame=true">
<view class="frame-top">
<image src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" mode="aspectFill" lazy-load></image>
<view>
@ -30,13 +30,24 @@
<drop-down :dropObj="dropObj" @chooseItem="chooseItem"></drop-down>
</view>
<!-- 商品库存 -->
<view></view>
<!-- 商品可变数量 -->
<view></view>
<!-- 加入购物车立即购买按钮 -->
<view class="frame-stock">库存99</view>
<!-- 加减按钮 -->
<view class="frame-add-del">
<view class="display-between-center add-del-box">
<!-- -->
<button @tap="deladdEvent(0)" :disabled="buyNum==1" class="item-btn display-center-center">­­­­­­­­­­­­</button>
<!-- 输入框 -->
<view class="input-box display-center-center">
<input type="text" v-model="buyNum" />
</view>
<!-- -->
<button @tap="deladdEvent(1)" class="item-btn display-center-center"></button>
</view>
</view>
<!-- 立即购买加入购物车按钮 -->
<view class="frame-btn-box">
<button type="default" @tap="immediatelyBuy"></button>
<button type="default">加入购物车</button>
<button type="default">立即购买</button>
</view>
</view>
</view>
@ -52,6 +63,7 @@
},
data() {
return {
showFrame:false,
dropObj:{
title:'尺寸',
childrenList:[
@ -65,17 +77,32 @@
}
]
},
buyNum:1
};
},
methods:{
immediatelyBuy(){
uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan`
})
},
chooseItem(e){
this.log(e)
},
//
deladdEvent(index){
if(index==0){//
this.buyNum--
} else {//
this.buyNum++
}
}
}
}
</script>
<style>
.display-center-center {display: flex;justify-content: center;align-items: center;}
.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{
@ -103,4 +130,11 @@
.frame-color-box{margin-top: 20rpx;}
.frame-btn-box{display: flex;align-items: center;justify-content: space-around;margin-top: 100rpx;}
.frame-btn-box button{height: 80rpx;line-height: 80rpx;border-radius: 20rpx;}
.frame-stock{font-size: 24rpx;color: #000000;text-align: right;}
/* 加减按钮 */
.frame-add-del{display: flex;justify-content: flex-end;}
.add-del-box{width: 180rpx;margin-top: 20rpx;}
.input-box {width: 78rpx;height: 40rpx;font-size: 24rpx; 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!important;border: 1rpx solid #000000!important; color: #FFFFFF;padding: 0rpx;}
</style>

View File

@ -49,12 +49,7 @@
},
methods:{
chooseDoctor(index){//
console.log(this.list[index].id);
if(this.list[index].show_detail==1){
uni.navigateTo({
url:'/pagesB/doctorDetail/doctorDetail?doctor_id='+this.list[index].id
})
} else this.$toolAll.tools.showToast('禁止查看该医生信息')
},
}
}

View File

@ -127,14 +127,7 @@
if(e==0) this.vision = false
},
goDetail(index){//
if(this.jieDuan==false){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
uni.navigateTo({
url:'/pagesB/problemDetail/problemDetail?id='+this.list[index].id+'&category_id='+this.list[index].category_id
})
} else this.jieDuan = true
}
},
chooseLike(index){//
// console.log('',index);

View File

@ -0,0 +1,27 @@
<template>
<!-- 底部导航 -->
<view class="display-between-center payment-foot-box">
<!-- 合计 -->
<view class="payment-price">合计2,000</view>
<!-- 立即结算 -->
<view class="payment-settlement">立即支付</view>
</view>
</template>
<script>
export default {
name:"payment",
data() {
return {
};
}
}
</script>
<style>
.display-between-center {display: flex;justify-content: space-between;align-items: center;}
.payment-foot-box{position: fixed;bottom: 0;left: 0;right: 0;height: 130rpx;background-color: #efefef;font-size: 30rpx;}
.payment-price{font-size: 36rpx;color: #f81c1c;font-weight: bold;margin-left: 60rpx;}
.payment-settlement{width: 242rpx;height: 130rpx;background-color: #f81c1c;color: #FFFFFF;font-size: 36rpx;text-align: center;line-height: 130rpx;}
</style>

View File

@ -3,21 +3,24 @@
{
"path" : "pages/tabbar/pagehome/pagehome",
"style" :{}
},{
}
,{
"path" : "pages/tabbar/my/my",
"style" :{}
},{
}
,{
"path" : "pages/login/login",
"style" :{
"navigationBarTextStyle":"black" //
}
},{
"style" :{}
}
,{
"path" : "pages/tabbar/cate/cate",
"style" : {}
},{
}
,{
"path": "pages/login/agreement",
"style" :{}
},{
}
,{
"path" : "pages/tabbar/cart/cart",
"style" :{}
}
@ -31,142 +34,17 @@
"style" : {}
}
,{
"path" : "makeAnPppointment/makeAnPppointment",//
"style" : {}
}
,{
"path" : "ppointmentEv/ppointmentEv",//
"style" :{}
}
,{
"path" : "suggestions/suggestions",//
"style" : {}
}
,{
"path" : "shopCart/shopCart",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "getReadyDan/getReadyDan",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
"style" : {}
}
,{
"path" : "immediatePayment/immediatePayment",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "member/member",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "integralManage/integralManage",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "peacockCoin/peacockCoin",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "signIn/signIn",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
,{
"path" : "myOrder/myOrder",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"style" : {}
}
}
,{
,{
"path" : "myAddress/myAddress",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "activityTask/activityTask",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "coupon/coupon",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pointsMall/pointsMall",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "my-diary/my-diary",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "my-diary-edit/my-diary-edit",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
"style" : {}
}
]
},
@ -177,95 +55,22 @@
"path" : "searchPage/searchPage",//
"style" :{}
}
,{
"path" : "mysharer/mysharer",//
"style" :{}
}
,{
"path" : "messagecenter/messagecenter",//
"style" : {}
}
,{
"path" : "myCollection/myCollection",//
"style" : {}
}
,{
"path" : "customerList/customerList",//
"style" : {}
}
,{
"path" : "userFootprint/userFootprint",//
"style" : {}
}
,{
"path" : "personalPoster/personalPoster",//
"style" : {}
},{
"path" : "sharingCenter/sharingCenter",//
"style" : {}
}
,{
,{
"path" : "aboutUs/aboutUs",//
"style" : {}
}
,{
"path" : "articleDetail/articleDetail",//
"style" : {}
}
,{
"path" : "doctor/doctor",//
"style" : {}
}
,{
"path" : "doctorDetail/doctorDetail",//
"style" :{}
}
,{
"path" : "problemDetail/problemDetail",//
"style" : {}
},
{
,{
"path":"video/playVideo",
"style":{}
},
{
"path":"customer/customer",
"style":{}
}
,{
,{
"path" : "shopDetail/shopDetail",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
"style" : {}
}
,{
,{
"path" : "orderDetail/orderDetail",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "customerCheck/customerCheck",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "shopSearch/shopSearch",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
"style" : {}
}
]
@ -279,7 +84,7 @@
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "恒美",
"navigationBarTitleText": "佩利商城",
"navigationBarBackgroundColor": "#FFFFFF",//
"backgroundColor": "#FFFFFF",//
"navigationStyle":"custom"//

View File

@ -6,8 +6,8 @@
:ifReturn="false"
:ifCenter="true"
:navBarTitle="'分类'"></status-nav>
<view :style="{paddingTop: statusBarHeight+50+'px'}" class="pad-x140">
<view class="pad30 sort-box" :style="{top: statusBarHeight+50+'px'}">
<view :style="{paddingTop: statusBarHeight+'px'}" class="pad-x140">
<view class="pad30 sort-box" :style="{top: statusBarHeight+'px'}">
<view class="col0 fon38 disjbac fon50">
<view class="bold">分类筛选</view>
<i @tap="clikScreenIcon" class="icon icon-screen" style="font-size: 50rpx;"></i>
@ -23,7 +23,7 @@
<!-- 列表 -->
<list-two :scrollCate="4"></list-two>
<!-- 筛选框 -->
<view v-show="isScreen" @tap="isScreen=false" class="screen-box" :style="{top:statusBarHeight+50+'px'}">
<view v-show="isScreen" @tap="isScreen=false" class="screen-box" :style="{top:statusBarHeight+'px'}">
<view @tap.stop="isScreen=true" class="posir">
<view class="fon24">筛选</view>
<!-- 类型 -->
@ -77,7 +77,7 @@
},
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
publicColor:uni.getStorageSync('publicColor'),
chooseCateList:[],//
temporaryCate:[],//

View File

@ -1,250 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'活动任务'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32 pad-x20">
<!-- 签到领积分 -->
<view v-for="(item,index) in activityList" :key="index" class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image :src="item.imgSrc" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
<view class="fon28">{{item.title}}</view>
</view>
<view><span style="color: #3875F6;">{{item.danc}}</span>/{{item.allc}}</view>
</view>
<view class="fon24" style="color: #808080;">
<view class="mar-s30">活动要求{{item.description}}</view>
<view class="mar-s20">获得奖励{{item.amount}} <span v-if="item.isIcon!=1"></span><span v-else></span></view>
<view class="mar-s20">会员暂无</view>
<view class="mar-s20">开始时间{{item.startTime}}</view>
<view class="mar-s20">结束时间{{item.endTime}}</view>
</view>
<view class="disjcac">
<!-- 线上签到 -->
<view v-if="item.ntype=='sign_in'" class="disja">
<view v-if="item.danc!=item.allc" @tap="goTosigin" class="mar-s30 activity-dai"></view>
<view v-if="item.danc==item.allc && item.account_status!=1" @tap="btnEv(index)" class="mar-s30 activity-mo" style="background: #f8bf2c;"></view>
<view v-if="item.danc==item.allc && item.account_status==1" class="activity-mo mar-s30"></view>
</view>
<!-- 分享截图任务 -->
<view v-if="item.ntype=='share_screenshots'" class="disja">
<!-- <view @tap="btnEv(index)" class="activity-dai mar-s30">立即完成</view> -->
<view v-if="item.account_status==3 || item.account_status==4" @tap="btnEv(index)" class="activity-dai mar-s30"></view>
<view v-if="item.account_status==0" class="activity-mo mar-s30">...</view>
<view v-if="item.account_status==2" @tap="btnEv(index)" class="activity-dai mar-s30"></view>
<view v-if="item.account_status==1" class="activity-mo mar-s30"></view>
</view>
<!-- 线下签到 -->
<view v-if="item.ntype=='offline_sign_in'" class="disja">
<view v-if="item.account_status==4" @tap="btnEv(index)" class="mar-s30 activity-dai"></view>
<view v-else class="activity-mo mar-s30">已完成</view>
</view>
<!-- 分享注册任务 -->
<view v-if="item.ntype=='share'">
<view v-if="item.account_status==4" @tap="btnEv(index)" class="mar-s30 activity-dai"></view>
<view v-else class="activity-mo mar-s30">已完成</view>
</view>
</view>
</view>
<!-- 上传截图弹框 -->
<view v-if="isScreenshot" @tap.stop="isScreenshot=false,upImg=''" class="posAll disjcac" style="padding: 0 85rpx;z-index: 3;">
<view class="bacf width100" @tap.stop="isScreenshot=true" style="padding: 0 33rpx;border-radius: 20rpx;">
<view class=" disjcac fc">
<view class="fon32 col3 mar-s30 mar-x40">截图上传</view>
<view v-if="upImg==''" @tap="chooseImg" class="task-add-box disjcac fc">
<view class="posir disjcac mar-s50">
<view class="posia task-add" style="transform: rotate(90deg);"></view>
<view class="posia task-add"></view>
</view>
<view class="fon28 col9" style="margin-top: 120rpx;">点击上传截图</view>
</view>
<image v-else @tap="chooseImg" class="imgIng" :src="upImg" mode="aspectFill"></image>
</view>
<view class="disjbac mar-x20 tc">
<view @tap.stop="isScreenshot=false,upImg=''" class="task-cancle-btn">取消</view>
<view @tap.stop="shareEv" class="task-confrim-btn">确定</view>
</view>
</view>
</view>
</view>
<!-- 弹框授权 -->
<auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isScreenshot:false,
upImg:'',
chooseIndex:0,
activityList:[],//
isNum:0,
siginVal:'立即签到',
partakeVal:'立即完成',
optionObj:{},
}
},
onShow() {
this.$toolAll.tools.isLogin();
this.checkList();
},
onShareAppMessage() {
var shareObj = {
path: `/pages/tabbar/shop/shop?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
this.optionObj = options;
},
methods: {
btnEv(index){
this.chooseIndex = index;
if(this.activityList[index].ntype=='share_screenshots' && (this.activityList[index].account_status!=0 || this.activityList[index].account_status==2)){//
this.isScreenshot = true;
}
if(this.activityList[index].ntype=='offline_sign_in' && this.activityList[index].account_status==4){//线
this.$toolAll.tools.showToast('请先完成任务,再来领取')
}
if(this.activityList[index].ntype=='share' && this.activityList[index].account_status==4){//
uni.navigateTo({
url:'/pagesB/personalPoster/personalPoster'
})
}
if(this.activityList[index].danc == this.activityList[index].allc) {
if(this.isNum==0) {
this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{
if(res.code==0){
this.isNum = 0;
this.checkList();
} else {
setTimeout(()=>{
this.isNum = 0;
},2000)
this.$toolAll.tools.showToast(res.msg);
}
})
}
}
setTimeout(()=>{
this.isNum = 0;
},2000)
},
checkList(){//
this.$requst.post('task/task/task-list').then(res=>{
if(res.code==0){
this.activityList = [];
if(res.data.length!=0){
res.data.forEach(item=>{
let nIcon = 0;
let nimg = '/static/public/task-01-60.png';
if(item.icon==1) {
nimg = '/static/public/task-02-60.png';
nIcon = 1;
}
if(item.icon==2) {
nimg = '/static/public/task-03-60.png';
nIcon = 2;
}
if(item.icon==3) {
nimg = '/static/public/task-04-60.png';
nIcon = 3;
}
let obj = {
id:item.id,
imgSrc:nimg,//icon
title:item.title,//
danc:item.completed_quantity,//
allc:item.cycle,//
description:item.description,//
amount:item.reward_number,//
account_status:item.account_status,
member:'',//
isStatus:item.status,
startTime:item.start_at,//
endTime:item.end_at,//
isIcon:nIcon,// 0 1 2 3
ntype:item.type//
}
this.activityList.push(obj);
})
}
// account_status: 1 0 1 2 3
// completed_quantity: 0
// create_time: "2021-10-20 18:12:37"
// cycle: 1
// description: ""
// end_at: "2021-10-30"
// id: 4 id
// long_term: 0 0
// repeat: 0
// reward_number: 10
// reward_type: "coin"
// start_at: "2020-10-20"
// status: 1 1 0
// title: ""
// type: "share_screenshots" 'share','sign_in','offline_sign_in','share_screenshots' 线
}
})
},
chooseImg(){//
uni.chooseImage({
count:1,
sourceType:['album'],
success: (res) => {
this.upImg = res.tempFilePaths[0];
this.$requst.upload('file/upload/image',{file:this.upImg}).then(res=>{
this.upImg = this.$http + res.data.src;
this.$toolAll.tools.showToast('图片上传成功(*^▽^*)')
this.isNum = 1;
},error=>{})
}
})
},
shareEv(){//
if(this.isNum==1) {
this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[this.chooseIndex].id,image:this.upImg}).then(res=>{
if(res.code==0){
this.isNum = 0;
this.isScreenshot = false;
this.upImg = '';
this.$toolAll.tools.showToast('截图已上传');
this.checkList();
} else {
setTimeout(()=>{
this.isNum = 0;
},2000)
this.$toolAll.tools.showToast(res.msg);
}
})
}
},
goTosigin(){
uni.navigateTo({
url:'/pagesA/signIn/signIn'
})
}
}
}
</script>
<style>
.isWen{color: #3875F6;}
.isWen::after{
content: '';
display: block;
height: 8rpx;
width: 80%;
position: absolute;
bottom: -20rpx;
left: 50%;
transform: translateX(-50%);
background: #3875F6;
}
</style>

View File

@ -1,199 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'优惠券'" :statusTitle="true"></status-nav>
<view id="daoh" class="bacf pad-zy40 pad-sx20 isTopf fon28 col3 disjbac" :style="{top:statusHNH+'px'}">
<view @tap="chooseNav(indexn)" :class="isStatus==indexn?'isWen bold':''" class="posir" v-for="(itemn,indexn) in navList" :key="indexn">{{itemn}}</view>
</view>
<!-- 列表 -->
<view :style="{paddingTop: (statusHNH+chuTop+15)+'px'}" class="pad-zy32">
<view class="pad-x30">
<view v-if="dataList.length!=0" class="mar-x20 animated fadeInLeft" v-for="(item,index) in dataList" :key="index">
<view style="height: 200rpx;" class="disjbac posir">
<view class="disjcac fc recerve-left" style="width: 218rpx;height: 200rpx;flex-shrink: 0;text-align: center;color: #FFFFFF;">
<image v-if="item.statusNum!=0 && item.statusNum!=2" class="posia quan-img" src="/static/public/quan-left-two.png" mode=""></image>
<image v-else class="posia quan-img" src="/static/public/quan-left.png" mode=""></image>
<view class="posir disjcac fc" style="z-index: 1;">
<view class="fon28 mar-s20 mar-x36"><span v-if="!item.isTiyan && !item.isZhek">¥</span><span class="bold" style="font-size: 56rpx;">{{item.num}}</span></view>
<view v-if="item.statusNum==0 || item.statusNum==2" @tap="useEv(index)" class="fon24 quan-btn">{{item.statusNum==2?'':'使'}}</view>
</view>
</view>
<view class="quan-right-box">
<view class="fon28 col3 mar-s20">{{item.title}}</view>
<view class="fon24 col80">{{item.manPrice}}元可使用</view>
<view class="fon20 col80 mar-x20">有效期{{item.startTime}}{{item.endTime}}</view>
</view>
<image v-if="item.statusNum==1" class="posia quan-use" src="/static/public/quan-use.png" mode=""></image>
<image v-if="item.statusNum==3" class="posia quan-use" src="/static/public/quan-over.png" mode=""></image>
</view>
</view>
<block v-if="loading">
<nothing-page v-if="dataList.length==0" :content="['暂无可使用优惠券','暂无已使用优惠券','暂无可领取优惠券','暂无已过期优惠券'][isStatus]"></nothing-page>
</block>
</view>
</view>
<!-- 体验券使用弹框 -->
<view v-if="isTY" @tap="isTY=false" class="disjcac tc quan-tk-box" catchtouchmove="return">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isTY=true">
<view class="fon28 col3">体验券使用</view>
<view class="mar-sx30">
<!-- <image :src="tyImg" class="quan-tk-em" style="width: 325rpx;height: 325rpx;" mode="aspectFill"></image> -->
<yz-qr ref="qrPath" :text="text" :size="size" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
</view>
<view class="fon24 col3 mar-s40 mar-x20">工作人员扫码使用体验券</view>
<image @tap.stop="closeQuanEv" src="/static/public/closequan.png" class="posia quan-tk-btn" mode=""></image>
</view>
</view>
</view>
</template>
<script>
import yzQr from '@/components/yz-qr/yz-qr.vue';
export default {
components:{
yzQr
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
chuTop:'',
navList:['未使用','已使用','可领取','已过期'],
isStatus:0,
dataList:[],
zcList:[],
isTY:false,
page:1,
size:10,
quanStatus:'normal',//
loading:false,
tyImg:'',//使img
canvasQrPath: '',
text: 'hello',
size: 162,
colorDark: '#000000',
colorLight: '#ffffff',
timer:null,
secret:''
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect);
this.chuTop = rect.height;
}).exec()
this.checkAllList(0);
},
onUnload() {
this.closeQuanEv();
},
methods: {
checkAllList(index){//
let params = {
status: this.quanStatus,// normal=使 used=使 invalid= waiting=
page:this.page,
size:this.size
}
this.$requst.post('user/get-coupon-list',params).then(res=>{
if(res.code==0){
this.dataList = [];
this.zcList = [];
if(res.data.length!=0){
res.data.forEach(item=>{
let leix = false;
if(item.type=='taste') leix = true;
let obj = {
id:item.id,
num:item.amount/100,
title:item.name,
cover:this.$http + item.cover,
manPrice:item.condition/100,
startTime:item.begin_at.slice(0,10),
endTime:item.end_at.slice(0,10),
isTiyan:leix,
isZhek:false,
statusNum:index
}
this.dataList.push(obj);//
this.zcList.push(obj);//
})
this.checkList(index);
}
this.loading = true;
}
})
},
chooseNav(index){
this.isStatus = index;
if(index==0) this.quanStatus = 'normal';//使
if(index==1) this.quanStatus = 'used';//使
if(index==2) this.quanStatus = 'waiting';//
if(index==3) this.quanStatus = 'invalid';//
this.loading = false;
this.checkAllList(index);
},
checkList(index){
this.dataList = this.zcList.filter(item=>item.statusNum==index);
},
useEv(index){
if(this.dataList[index].statusNum==2) {
this.$requst.post('user/get-coupon',{coupon_id:this.dataList[index].id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('领取成功');
this.checkAllList(this.isStatus);
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
}
if(this.dataList[index].isTiyan==false && this.dataList[index].statusNum==0) {
uni.navigateTo({url:'/pages/tabbar/shop/shop'})
}
if(this.dataList[index].isTiyan==true && this.dataList[index].statusNum==0){
this.tyImg = this.dataList[index].cover;
this.$requst.post('user/exhibition-experience-coupon',{coupon_id:this.dataList[index].id}).then(res=>{
if(res.code==0){
this.isTY = true;
this.text = `${this.dataList[index].id}HtrueH${res.data.secret}H${uni.getStorageSync('userId')}`;
this.secret = res.data.secret;
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
this.timer = setInterval(()=>{
this.$requst.post('staff/coupon/write-off-experience-couponQuery',{coupon_id:this.dataList[index].id,secret:this.secret}).then(res=>{
if(res.code==0){
// if(res.data.result==0){
this.$toolAll.tools.showToast('使用成功');
this.isTY = false;
clearInterval(this.timer);
this.checkAllList(0);
// }
}
})
},3000)
}
},
closeQuanEv(){
this.isTY = false;
clearInterval(this.timer);
}
}
}
</script>
<style>
.isWen{color: #3875F6;}
.isWen::after{
content: '';
display: block;
height: 8rpx;
width: 100%;
position: absolute;
bottom: -20rpx;
background: #3875F6;
}
</style>

View File

@ -1,105 +1,82 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'购物车'" :statusTitle="true"></status-nav>
<view v-if="loading" :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
<view class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
<status-nav :navBarTitle="'确认订单'"></status-nav>
<!-- 容器 -->
<container-subgroup>
<view class="bacf6 fon30 col3 radius20 mar-s20 disjbac pad-sx27-zy20">
<view class="bold">配送方式</view>
<view class="fon26 col3 disac">
<view @tap="expressEv(1)" :class="!isExpress?'activeT':'expressT'" :style="{background:isExpress?'':publicColor}">自提</view>
<view class="disac">
<view v-if="!isVirtual" @tap="expressEv(0)" :class="isExpress?'activeT':'expressT'" :style="{background:isExpress?publicColor:''}"></view>
<view @tap="expressEv(1)" :class="!isExpress?'activeT':'expressT'" :style="{background:isExpress?'':publicColor}">自提</view>
</view>
</view>
<!-- 地址信息 -->
<view v-if="isExpress" class="bacf radius20 mar-s20 pad-sx27-zy20">
<view v-if="isExpress" class="bacf6 fon30 col3 radius20 mar-s20 pad-sx27-zy20">
<view class="bold">收件人信息</view>
<navigator url="/pagesA/myAddress/myAddress?isWhere=0" hover-class="none">
<view class="fon26 col3 disjbac pad-s50">
<view v-if="addressInfo!=''">
<view class="fon28 col3 bold mar-x20">{{addressInfo.name}} <span class="mar-z20">{{userPphone}}</span></view>
<view class="fon24 col9">{{addressInfo.province_str}}{{addressInfo.city_str}}{{addressInfo.county_str || ''}}{{addressInfo.address || ''}}</view>
<view class="disjbac pad-s30">
<view v-if="addressInfo==''">
<view class="fon28 bold mar-x10">吃肉的饺子 <span class="mar-z20">17366921088</span></view>
<view class="fon24 col9">四川省成都市成华区双店路B口</view>
</view>
<view v-else class="fon24 col9">请完善收件人信息</view>
<image src="/static/public/nextM.png" class="xiaDan-next" mode="aspectFill"></image>
<i class="icon icon-next col0"></i>
</view>
</navigator>
</view>
<!-- 自提地址 -->
<view v-else class="bacf radius20 mar-s20 pad-sx27-zy20">
<view v-else class="bacf6 fon30 col3 radius20 mar-s20 pad-sx27-zy20">
<view class="bold">自提地址</view>
<input type="number" maxlength="11" :focus="isFocus" @blur="blurEv" v-model="zPhone" class="mar-s50 mar-x20" style="border: 2rpx solid #E0E0E0;padding: 20rpx;border-radius: 10rpx;font-size: 24rpx;" placeholder="请输入收货人手机号" />
<view class="fon26 col3 disjbac">
<!-- <input type="number" maxlength="11" :focus="isFocus" @blur="blurEv" v-model="zPhone" class="mar-s50 mar-x20" style="border: 2rpx solid #E0E0E0;padding: 20rpx;border-radius: 10rpx;font-size: 24rpx;" placeholder="请输入收货人手机号" /> -->
<view class="disjbac mar-s50">
<view>
<view class="fon28 col3 bold mar-x20">恒美植发</view>
<view class="fon24 col9">{{goAddress}}</view>
<view class="fon28 bold mar-x20">佩丽饰品</view>
<view class="fon24 col9">四川省成都市成华区双店路B口</view>
</view>
<!-- 立即导航 -->
<image @tap="goThere(goAddress)" src="/static/public/daoh.png" class="there" mode="aspectFill"></image>
<view @tap="goThere(goAddress)" class="disjcac fc col0 fon24">
<i class="icon icon-navigate-now " style="font-size: 50rpx;"></i>
<view>立即导航</view>
</view>
<!-- <image src="/static/public/daoh.png" class="there" mode="aspectFill"></image> -->
</view>
</view>
<!-- 订单信息 -->
<view class="bacf radius20 mar-s20 pad-sx27-zy20">
<view class="bacf6 fon30 radius20 mar-s20 pad-sx27-zy20">
<view class="bold">订单信息</view>
<view v-for="(item,index) in orderList" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<image @tap="goShopDetail(item.id)" :src="item.imgSrc" class="flexs order-image" mode="aspectFill"></image>
<view class="width100 disjb fw" style="height: 166rpx;">
<view>
<view @tap="goShopDetail(item.id)" class="fon28 col3 bold clips2">{{item.title}}</view>
<view @tap="goShopDetail(item.id)" class="fon30 col3 bold clips2">{{item.title}}</view>
<view class="order-sy">{{item.sku_name}}</view>
</view>
<view class="disjbac mar-s10 width100">
<view class="order-item-price" v-if="isNei!=3">{{item.price}}</view>
<view class="order-item-price" v-else>{{item.price}}</view>
<view class="fon28 col6">x{{item.num}}</view>
<view class="fon30 col6">x{{item.num}}</view>
</view>
</view>
</view>
<view class="fon28 disjbac mar-s20 pad-s10">
<view class="fon30 disjbac mar-s20 pad-s10">
<view class="col6">{{allNum}}</view>
<view class="bold colf8" v-if="isNei!=3">{{zanAllPrice}}</view>
<view class="bold colf8" v-else>{{allPrice}}</view>
</view>
</view>
<!-- 选择支付方式 -->
<view class="bacf radius20 mar-s20 fon28 col3 pad-sx30 pad-zy20">
<view class="bold fon28">选择支付方式</view>
<view @tap="chooseFS(index)" v-for="(item,index) in payFS" :key="index" v-if="isCurrent!=index" class="disjbac mar-s30">
<view class="disac">
<image v-if="item.isActive" src="/static/public/chooseFS.png" class="chooseDX" mode=""></image>
<image v-else src="/static/public/cancle-FS.png" class="chooseDX" mode=""></image>
<view class="mar-z25">{{item.title}}</view>
</view>
<view v-if="item.num!=0">{{item.num}}</view>
</view>
</view>
<!-- 优惠 -->
<view v-if="isNei!=3" class="bacf radius20 mar-s20 pad-sx27-zy20">
<view class="bold">优惠</view>
<view @tap="quanEv(1)" class="fon28 col3 disjbac mar-sx40">
<view>优惠券</view>
<view class="disac">
<view class="colf8 bold">-{{youQuan.youPrice}}</view>
<image src="/static/public/nextM.png" class="xiaDan-next" mode="aspectFill"></image>
</view>
</view>
<!-- <view class="fon28 col3 disjbac">
<view>立减优惠</view>
<view class="colf8 bold">-{{delPrice}}.00</view>
</view> -->
<view v-if="isNei!=3" class="bacf6 fon30 col3 radius20 mar-s20 pad-sx27-zy20 disjbac">
<view class="bold">折扣优惠</view>
<view class="colf8 bold">0</view>
</view>
<!-- 快递费用 -->
<view v-if="isExpress" class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
<view v-if="isExpress" class="bacf6 fon30 radius20 mar-s20 disjbac pad-sx27-zy20">
<view class="bold">快递费用</view>
<view class="fon28 colf8 bold">{{expressInfo.default_price}}</view>
<view class="colf8 bold">0</view>
</view>
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
<!-- 去支付 -->
<view class="fon36 colf8 bold" v-if="isNei!=3">{{allPrice<0?0:allPrice}}<span v-if="isKq">+{{zf_kqPrice}}</span><span v-if="isExpress && expressInfo.default_price!=0" style="font-size: 24rpx;color: #000;">+ {{expressInfo.default_price}}</span></view>
<view class="fon40 colf8 bold dis" v-else><span class="col3 fon28">合计积分</span>{{allPrice}}<span v-if="isExpress && expressInfo.default_price!=0">+ {{expressInfo.default_price}}</span></view>
<view @tap="goPayment" v-if="isNei!=3" class="goPayment"></view>
<view @tap="isDui=true" v-else class="goPayment">去兑换</view>
</view>
</view>
</container-subgroup>
<payment></payment>
<view v-if="showQuan" @tap.stop="showQuan=false" class="posAll">
<view class="bacf posixzy" style="border-radius: 40rpx 40rpx 0rpx 0rpx;" @tap.stop="showQuan=true">
<view class="pad-sx20 pad-zy50">
@ -138,17 +115,6 @@
</view>
</view>
</view>
<!-- 确认兑换弹框 -->
<view v-if="isDui" @tap.stop="isDui=false" class="posAll zhun-dui-box">
<view class="bacf radius20 width100 tc fon28 col3 pad20" @tap.stop="isDui=true">
<view class="bold" style="margin: 0rpx 0 56rpx 0;">兑换商品</view>
<view style="margin: 0rpx 0 66rpx 0;">您确定使用{{allPrice}}积分兑换吗</view>
<view class="disjbac mar-x20 pad-zy20 zhun-dui-btn">
<view @tap.stop="isDui=false">暂不兑换</view>
<view @tap.stop="goPayment">立即兑换</view>
</view>
</view>
</view>
<!-- 支付成功 -->
<view v-if="isSuccess" class="posAll" :style="{top:statusHNH+'px'}" style="z-index: 3;background-color: #F5F5F5;">
<view class="bacf radius20 mar-s20 mar-zy20 success-box">
@ -161,32 +127,24 @@
</view>
</view>
</view>
<!-- 分享弹框 -->
<view v-if="isfen" class="posAll disjcac" style="background-color: rgba(0,0,0,.25);z-index: 8;">
<view class="bacf width100 radius20 posir" style="padding: 60rpx 50rpx;margin: 0 70rpx;text-align: center;">
<image @tap="isfen=false" src="../../static/public/closequan.png" class="posia heyan-close" mode=""></image>
<view style="color: #f55255;font-size: 36rpx;">立即完成拼单?</view>
<view style="margin: 50rpx 0;font-size: 26rpx;">点击下方分享给朋友完成拼单</view>
<view class="posir radius15 disjcac pad-sx20" style="background-color: #22cc3e;color: #FFFFFF;font-size: 36rpx;">
分享给朋友
<button open-type="share" class="posia-op">分享给朋友</button>
</view>
</view>
</view>
<!-- 弹框授权 -->
<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>
</template>
<script>
import payment from '@/components/payment-subgroup/payment.vue';
export default {
components:{
payment
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isExpress:false,
isExpress:true,
switchQuan:true,
showQuan:false,//
isDui:false,
@ -785,19 +743,10 @@
})
},
goShop(){//
let nurl = '';
if(this.isNei==3) nurl = '/pagesA/pointsMall/pointsMall';
else nurl = '/pages/tabbar/shop/shop';
uni.reLaunch({
url:nurl
})
}
}
}
</script>
<style>
page {
background-color: #F5F5F5;
}
</style>

View File

@ -1,221 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'立即支付'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
<view v-if="!isSuccess">
<!-- 订单信息 -->
<view class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;">
<view class="bold fon28">订单支付</view>
<view v-for="(item,index) in orderList" :key="index" class="fon26 col3 disjbac pad-sx50 disjbac bbot">
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<image :src="item.imgSrc" class="flexs order-image" mode="aspectFill"></image>
</navigator>
<view class="width100 disjb fw" style="height: 166rpx;">
<view>
<navigator url="/pagesB/shopDetail/shopDetail" hover-class="none">
<view class="fon28 col3 bold clips2">{{item.title}}</view>
</navigator>
<view class="order-sy">试用</view>
</view>
<view class="disjbac mar-s10 width100">
<view class="order-item-price">{{item.price}}</view>
<view class="fon28 col6">x{{item.num}}</view>
</view>
</view>
</view>
<view class="fon28 disjbac mar-s50 pad-s10 mar-x20">
<view class="col6">{{zf_allNum}}</view>
<view class="bold colf8">应付款{{zf_allPrice}}<span v-if="isKq">+{{zf_kqPrice}}</span></view>
</view>
</view>
<!-- 支付方式 -->
<view class="bacf radius20 mar-s20 fon28 col3 pad-sx30 pad-zy20">
<view class="bold fon28">选择支付方式</view>
<view @tap="chooseFS(index)" v-for="(item,index) in payFS" :key="index" class="disjbac mar-s30">
<view class="disac">
<image v-if="item.isActive" src="/static/public/chooseFS.png" class="chooseDX" mode=""></image>
<image v-else src="/static/public/cancle-FS.png" class="chooseDX" mode=""></image>
<view class="mar-z25">{{item.title}}</view>
</view>
<view v-if="item.num!=0">{{item.num}}</view>
</view>
</view>
<view v-if="isGuo" class="fon28 col3 dao-box"></view>
<view v-else class="fon28 col3 dao-box">请在<span class="colf8 bold">{{daoTime}}</span>完成支付</view>
<!-- 确认支付 -->
<view @tap="payment" class="submit-pay">确认支付</view>
</view>
<!-- 支付成功 -->
<view v-if="isSuccess" class="bacf radius20 mar-s20" style="padding: 27rpx 20rpx;text-align: center;">
<image src="/static/public/pay-success.png" style="width: 194rpx;height: 194rpx;" mode=""></image>
<view class="fon28 col3 pad-s20 pad-x40">支付成功</view>
<view class="" style="font-size: 46rpx;margin-bottom: 120rpx;color: #F85050;">{{jsPrice}}</view>
<view class="disja success-btn">
<view @tap="goDetail" style="">查看订单</view>
<view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isSuccess:false,
orderList:uni.getStorageSync('orderList'),
zf_allNum:0,//
zf_allPrice:0,//
zf_kqPrice:0,//
payFS:[
{title:'微信支付',isActive:true,num:0},
{title:'孔雀币',isActive:false,num:3000},
],
isKq:false,
jsPrice:0,//,
zc_allPrice:0,//
orderInfo:uni.getStorageSync('orderInfo'),
daoTime:'',//
isGuo:false//
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onUnload() {
uni.removeStorageSync('orderInfo');
},
onLoad(options) {
this.zc_allPrice = this.zf_allPrice = options.allPrice;
this.zf_allPrice = this.$toolAll.tools.addXiaoShu(this.zf_allPrice);
this.zf_allNum = options.allNum;
let endTime = this.orderInfo.expired_at;
let endChuo = new Date(this.orderInfo.expired_at).getTime();
this.daoTime = this.$toolAll.tools.dayTime(endTime,options.startTime);
let timer = setInterval(()=>{
if(options.startTime - endChuo>=0){
this.isGuo = true;
clearInterval(timer);
} else {
options.startTime = options.startTime*1 + 1000;
this.daoTime = this.$toolAll.tools.dayTime(endTime,options.startTime)
}
},1000)
},
methods: {
chooseFS(index){
this.payFS[index].isActive = !this.payFS[index].isActive;
if(index==0){
//+
if(this.payFS[0].isActive && this.payFS[1].isActive){
this.isKq = true;
return;
}
//+
if(!this.payFS[0].isActive && this.payFS[1].isActive){
this.$toolAll.tools.showToast('孔雀币不足');
return;
}
//+
if(!this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式');
return;
}
//+
if(this.payFS[0].isActive && this.payFS[1].isActive){
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
}
if(index==1) {
//+
if(this.payFS[0].isActive && this.payFS[1].isActive) {
this.isKq = true;
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
//+
if(this.payFS[0].isActive && !this.payFS[1].isActive) {
this.isKq = false;
this.zf_allPrice = this.zc_allPrice;
return;
}
//++
if(!this.payFS[0].isActive && this.payFS[1].isActive && this.zc_allPrice*1 > this.zf_kqPrice*1){
this.$toolAll.tools.showToast('孔雀币不足')
this.isKq = true;
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
//++
if(!this.payFS[0].isActive && this.payFS[1].isActive && this.zc_allPrice*1 < this.zf_kqPrice*1){
this.isKq = true;
this.zf_allPrice = this.zc_allPrice - this.payFS[index].num;
this.zf_kqPrice = this.payFS[index].num;
return;
}
//+
if(!this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式')
this.isKq = false;
this.zf_allPrice = this.zc_allPrice;
return;
}
}
},
payment(){
if(!this.payFS[0].isActive && !this.payFS[1].isActive) {
this.$toolAll.tools.showToast('请选择支付方式')
} else if(!this.payFS[0].isActive && this.zc_allPrice*1 > this.zf_kqPrice*1){
this.$toolAll.tools.showToast('孔雀币不足')
} else {
console.log(this.orderInfo.needPay);
if(this.orderInfo.needPay){
uni.requestPayment({
provider: 'wxpay',
appId:this.orderInfo.payment_params.appId,//appId
timeStamp: this.orderInfo.payment_params.timeStamp,//
nonceStr: this.orderInfo.payment_params.nonceStr,//
package: this.orderInfo.payment_params.package,//package
signType: this.orderInfo.payment_params.signType,//MD5
paySign: this.orderInfo.payment_params.sign,//
success:(res)=> {
this.$requst.post('order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
this.isSuccess = true;
},error=>{this.$toolAll.tools.showToast(res.msg);})
},
fail: (err)=> {}
});
} else {
this.$requst.post('order/paid',{order_coding:this.orderInfo.coding}).then(res=>{
this.isSuccess = true;
},error=>{this.$toolAll.tools.showToast(res.msg);})
}
}
},
goDetail(){
uni.navigateTo({
url:'/pagesB/orderDetail/orderDetail'
})
},
goShop(){
uni.reLaunch({
url:'/pages/tabbar/shop/shop'
})
}
}
}
</script>
<style>
page {
background-color: #F5F5F5;
}
</style>

View File

@ -1,189 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'积分管理'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3">
<view class="mar-s20 bacf pad20 radius20 bold">
<view class="mar-x30">当前积分</view>
<view style="font-size: 56rpx;">{{dangScore}}</view>
</view>
<view class="mar-s20 disjbac">
<view class="disjbac pad20 bacf radius20 width48" style="box-sizing: border-box;">
<image src="../../static/public/integral-01-108.png" class="score-img" mode=""></image>
<view class="width100 score-people-box">
<view class="font4">我的分享人</view>
<view class="fon36 bold">{{sharePeople}}<span class="fon26 font4"></span></view>
</view>
</view>
<view class="disjbac pad20 bacf radius20" style="box-sizing: border-box;">
<image src="../../static/public/integral-02-108.png" class="score-img" mode=""></image>
<view class="width100 score-people-box">
<view class="font4">签到记录</view>
<view @tap="goSigin" class="score-sigin-btn">立即签到</view>
</view>
</view>
</view>
<!-- 积分列表消费列表 -->
<view class="mar-s20 bacf pad20 radius20">
<view class="mar-x50 fon28 disja">
<view @tap="switchState(true)" :class="activeJF?'col3 bold':'col9'">积分列表</view>
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">消费列表</view>
</view>
<!-- 积分列表 -->
<block v-if="dataList.length!=0">
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
</view>
<view v-show="activeJF" class="fon36 bold pcol">+{{item.num}}</view>
<view v-show="!activeJF" class="fon36 bold">{{item.num}}</view>
</view>
</block>
<view v-if="isHave" class="disjcac fon24 col9 bold"></view>
</view>
<!-- 分享按钮 -->
<view class="disjcac score-share-box">
<image src="/static/public/bottom-shear.png" mode=""></image>
<view class="fon40 colf bold mar-z10">分享给好友</view>
<button class="posia-op" open-type="share"></button>
</view>
</view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
activeJF:true,
dataList:[
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
],
dangScore:0,//
sharePeople:0,//
page:1,
size:10,
total:0,
isZanw:true,
ntype:'in',
isHave:false,
vision:false,
isShowP:false,
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkList(this.ntype)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesA/integralManage/integralManage?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin();
this.checkInfo();
this.checkList();
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkList(){//
this.$requst.post('user/score-log',{page:this.page,size:this.size,type:this.ntype}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
title:item.name,
time:item.created_at,
num:item.num
}
this.dataList.push(obj);
})
}
if(this.dataList.length==0)this.isHave = true;
}
})
},
checkInfo(){//
this.$requst.post('user/score-load').then(res=>{
if(res.code==0){
this.dangScore = res.data.score;
this.sharePeople = res.data.share.total;
}
})
},
switchState(flag){//
this.dataList = [];
this.activeJF = flag;
this.page =1;
this.isZanw = true;
if(flag) {
this.ntype ='in';
this.checkList(this.ntype);
} else {
this.ntype ='out';
this.checkList(this.ntype);
}
},
goSigin(){
uni.navigateTo({url:'/pagesA/signIn/signIn'})
}
}
}
</script>
<style>
</style>

View File

@ -1,148 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'自主预约'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view v-if="isLoading" :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 160rpx;">
<view v-if="dataList.length!=0" class="mar-s30 bacf pad20" v-for="(item,index) in dataList" :key="index" style="border-radius: 28rpx;">
<view class="disjbac">
<view class="disac">
<image class="radius20 mar-y20 flexs" src="/static/public/logo.png" style="width: 98rpx;height: 98rpx;" mode=""></image>
<view>
<view class="fon36 col3 bold clips1">{{item.name}}</view>
<view class="fon24 col3 mar-s10">{{item.content}}</view>
</view>
</view>
<view :style="{background:[ingColor,publicColor,failColor,failColor,failColor][item.status]}" class="fon24 colf radius10 flexs" style="padding: 14rpx 24rpx;">{{['审核中...','预约成功','预约失败','预约取消','预约完成'][item.status]}}</view>
</view>
<view class="mar-s36 fon24 col3">预约时间{{item.yuTime}}</view>
<view class="disjbac fon24 col3 mar-s30">
<!-- <view>联系人{{item.lname}}</view> -->
<view>联系电话{{item.lphone}}</view>
</view>
<view @tap="quyuy(index)" class="disjcac mar-s40 width100 colf fon30 radius10 posir" :style="{background:[quColor,quColor,publicColor,publicColor,publicColor][item.status]}" style="height: 90rpx;line-height: 90rpx;">
{{['取消预约','取消预约','重新预约','再次预约','再次预约'][item.status]}}
<!-- <button :disabled="(item.status==2 || item.status==3 || item.status==4)?true:false" class="posia"
style="top: 0;left: 0;right: 0;bottom: 0;background-color: #000000;opacity: 0;">{{['取消预约','取消预约','重新预约','再次预约','再次预约'][item.status]}}</button> -->
</view>
</view>
<nothing-page v-if="dataList.length==0" :content="'暂无更多预约内容'"></nothing-page>
</view>
<!-- 底部按钮 -->
<view class="posixzy bacf pad-sx25">
<view @tap="goYu" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">我要预约</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="'是否取消当前预约?'" :clearVal="'否'" :comfrimVal="'是'" @comfirmev="comfirmev" @cancleev="isShowT=false"></pu-po>
<!-- 底部客服 -->
<public-customer></public-customer>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
failColor:'#CCCCCC',//
ingColor:'#FFBE4D',//
quColor:'#FF4D4D',//
dataList:[
// {status:0,imgSrc:'',name:'',content:'',yuTime:'20210708 14:3015:30',lname:'',lphone:'18888888888'},
// {status:1,imgSrc:'',name:'',content:'',yuTime:'20210708 14:3015:30',lname:'',lphone:'18888888888'},
// {status:2,imgSrc:'',name:'',content:'',yuTime:'20210708 14:3015:30',lname:'',lphone:'18888888888'},
],
btnCon:'取消预约',///
page:1,
size:20,
total:'',//
isZanw:true,
isLoading:false,
isShowT:false,
zzId:''//ID
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkPoint()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多预约记录','none',1000)
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.checkPoint()//
this.$toolAll.tools.showToast('加载中...','loading')
},
methods: {
checkPoint(){//
this.$requst.post('user/appointment-list',{page:this.page,size:this.size}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
if(res.data.list.length!=0){
this.total = res.data.total
res.data.list.forEach(item=>{
let timeStr = item.appointment_at.slice(0,10).split('-')
let timeZui = item.period.name.split('-')
let newStatus = ''
if(item.status_text=='审核中') newStatus = 0
if(item.status_text=='预约成功') newStatus = 1
if(item.status_text=='预约失败') newStatus = 2
if(item.status_text=='预约取消') newStatus = 3
if(item.status_text=='预约完成') newStatus = 4
let obj = {
id:item.id,
status:newStatus,
imgSrc: uni.getStorageSync('userLogo'),//token,
name:item.name,
content:item.typeInfo.title,
yuTime:`${timeStr[0]}${timeStr[1]}${timeStr[2]}${timeZui[0]}${timeZui[1]}`,
lname:item.name,
lphone:item.phone
}
this.dataList.push(obj)
})
}
this.isLoading = true
}
},error=>{})
},
goYu(){//
uni.navigateTo({
url:'/pagesA/ppointmentEv/ppointmentEv'
})
},
quyuy(index){//
if(this.dataList[index].status==0 || this.dataList[index].status==1){
this.zzId = this.dataList[index].id
this.isShowT = true
} else {
uni.navigateTo({
url:'/pagesA/ppointmentEv/ppointmentEv'
})
}
},
comfirmev(){
this.isShowT = false
this.$requst.post('user/appointment-cancel',{appointment_id:this.zzId}).then(res=>{
// console.log('',res);
if(res.code==0){
this.$toolAll.tools.showToast('取消预约成功')
setTimeout(()=>{
this.checkPoint()
},1500)
}
},error=>{})
}
}
}
</script>
<style>
</style>

View File

@ -1,181 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :backgroudColor="publicColor" :tabcolor="publicColor" :statusTitle="true" :backColor="1"></status-nav>
<image src="/static/public/member-head.png" style="position: absolute;top: 0;left: 0;right: 0;height: 436rpx;width: 100%;"></image>
<view class="mar-zy32 posir" :style="{paddingTop:statusHNH+26+'px'}">
<view class="radius30 posir gao mar-zy40 fon24 pad-x20" style="box-shadow: 0px 16rpx 30rpx rgba(141, 141, 141, 0.26);">
<view class="posir pad-zy20" style="z-index: 2;">
<view class="disjb">
<view class="disac">
<!-- 头像 -->
<image class="mar-sx20" :src="levelInfo.headimgurl" style="width:90rpx;height: 90rpx;border-radius: 100%;" mode="aspectFill"></image>
<view class="mar-z20">
<!-- 昵称 -->
<view class="fon28 bold disac">{{levelInfo.nickname}}<view style="background: #FFFFFF;border-radius: 10rpx;text-align: center;font-size: 22rpx;color: #FFBD39;padding: 5rpx 16rpx;margin-left: 10rpx;">VIP</view></view>
<view class="mar-s10" style="color: #C27417;">{{levelInfo.level.name}}</view>
</view>
</view>
<view class="mar-s30 " style="color: #C27417;">当前等级</view>
</view>
<view style="margin-top: 62rpx;color: #C27417;">还差{{levelInfo.level.value}}积分升级</view>
<view class="fon28 mar-s10" style="color: #C49F74;">升级到钻石会员享有更多权益</view>
</view>
<image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/member.png" mode=""></image>
</view>
<!-- 功能列表 -->
<view class="bacf radius20 mar-s20">
<view v-if="levelInfo.level.name!='普通会员'" class="disac fon28 fw pad-x20" style="color: #C27417;">
<view v-if="levelInfo.level.rights[indexh]==itemh.ntype" v-for="(itemh,indexh) in huiList" :key="indexh" class="mar-s20" style="width: 25%;">
<view class="disac fc">
<image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image>
<view class="mar-s20 mar-x10">{{itemh.title}}</view>
</view>
</view>
</view>
</view>
<!-- 当前权益介绍 -->
<view class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon32 bold" style="color: #C27417;">当前权益介绍</view>
<rich-text :nodes="detailInfo"></rich-text>
<!-- <image src="../../static/public/dang-quan.png" style="width: 100%;" mode="widthFix"></image> -->
</view>
<view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view>
</view>
<scoreList :dataList="dataList"></scoreList>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
import scoreList from '@/components/score-list.vue';
export default {
components:{
scoreList
},
data() {
return {
vision:false,
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
huiList:[
{src:'/static/public/ru-hui50.png',title:'入会权益',ntype:'membership_interests'},
{src:'/static/public/birthday50.png',title:'生日礼物',ntype:'birthday'},
{src:'/static/public/member-scor50.png',title:'积分权益',ntype:'score'},
{src:'/static/public/te-quan50.png',title:'特权日',ntype:'privilege_day'},
{src:'/static/public/share-hai50.png',title:'分享海报',ntype:'poster'},
],
dataList:[],
levelInfo:{},
detailInfo:'',//
vision:false,
isShowP:false,
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesA/member/member?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin();
this.checkList();
this.checkInfo();
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkInfo(){
this.$requst.post('level/index').then(res=>{
if(res.code==0){
this.levelInfo = res.data;
//
this.detailInfo = this.$toolAll.tools.escape2Html(this.levelInfo.level.content)
}
})
},
checkList(){//
let params = {
keyword:'',//
page:1,
size:10,
type:'normal',//type=normal newest=
sort_field:'',// score= num=
sort_value:''// asc= desc=
}
this.$requst.post('spu/score',params).then(res=>{
if(res.code==0){
this.dataList = [];
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
saleable:item.saleable,//
stock:item.stock,//
title: item.name,
zhePrice:item.price,
yuanPrice:item.original_price,
integral:item.score,
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:item.level_id,
published_at:item.published_at,//
amount:item.amount,//
level_text:item.level_text//
}
this.dataList.push(obj)
})
} else {
this.$toolAll.tools.showToast('暂无更多积分商品')
}
}
})
},
}
}
</script>
<style>
</style>

View File

@ -1,285 +0,0 @@
<template>
<view>
<!-- <auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> -->
<!-- 状态栏 -->
<status-nav :titleVal="'写日记'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20">
<view class="mar-s30 bacf pad20" style="border-radius: 20rpx 20rpx 0 0;">
<!-- 日记标题 -->
<view class="disac mar-s20">
<view class="mar-y20 flexs titlel2">日记标题</view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="diary_title" class="fon28 height-68" type="text" value="" placeholder="今天是2021年的最后一天" placeholder-style="color:#999999;"/>
</view>
</view>
<!-- 详细内容 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs mar-s20 titlel2">详细内容</view>
<view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;">
<textarea v-model="diary_content" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请输入详细内容" placeholder-style="color:#999999;"/>
<!-- <editor id="editor" class="ql-container" :placeholder="placeholder" @ready="onEditorReady"></editor> -->
</view>
</view>
<!-- 选择病种 -->
<view class="disac pad-s32">
<view class="flexs mar-y20 titlel2">选择病种</view>
<!-- 下拉列表 -->
<view @tap="openXial(0)" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{disease}}</view>
<image :class="isdisease?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isdisease" class="posia bacf radius10 xial-box mar-s20">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl,0)" :class="diseaseCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in diseaseArr" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view>
</view>
<!-- 关联医生 -->
<view class="disac pad-s32">
<view class="flexs mar-y20 titlel2">关联医生</view>
<!-- 下拉列表 -->
<view @tap="openXial(1)" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{diary_doctor}}</view>
<image :class="isdiary_doctor?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isdiary_doctor" class="posia bacf radius10 xial-box mar-s20">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl,1)" :class="diary_doctorCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in diary_doctorArr" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view>
</view>
<!-- 添加封面 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs titlel2">添加封面</view>
<view class="width100">
<view v-if="fengImg!=''" class="posir" style="width: 32%;">
<image :src="fengImg" class="diary-item-img" style="width: 100%;" mode="aspectFill"></image>
<image @tap="clearfengImg" src="../../static/public/closequan.png" class="posia" style="width: 20px;height: 20px;right: 10rpx;top: 10rpx;" mode=""></image>
</view>
<image v-else @tap="updataImg(0)" class="diary-item-img" src="../../static/public/diary-add.png" mode="aspectFill"></image>
</view>
</view>
<!-- 添加图片 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs titlel2">添加图片</view>
<view class="width100 disac fw">
<view v-for="(item,index) in imgArr" :key="index" class="diary-item-img posir">
<image :src="item" mode="aspectFill" class="addImg"></image>
<image @tap="clearaddImg(index)" src="../../static/public/closequan.png" class="posia" style="width: 20px;height: 20px;right: 10rpx;top: 10rpx;" mode=""></image>
</view>
<image v-if="imgArr.length!=9" @tap="updataImg(1)" class="diary-item-img" src="../../static/public/diary-add.png" mode="aspectFill"></image>
</view>
</view>
<!-- 底部按钮 -->
<view style="margin-top: 87rpx;margin-bottom: 30rpx;">
<view @tap="submit" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">立即提交</view>
</view>
</view>
</view>
</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'),
optionObj:'',
diary_title:'',//
diary_content:'',//
disease:'请选择病种',//
disease_id:'',//id
isdisease:false,
diseaseArr:[],
diseaseCurrent:0,
diary_doctor:'请选择关联医生',//
diary_doctor_id:'',//id
isdiary_doctor:false,
diary_doctorArr:[],
diary_doctorCurrent:0,
fengImg:'',
imgArr:[],
placeholder: '开始输入...'
}
},
onUnload: function() {
},
onShow() {
},
onLoad(options) {
this.diseaseEv();
this.chooseEv();
//
if(options.id!=undefined){
this.checkDiaryInfo(options.id);
}
},
methods: {
onEditorReady() {
// #ifdef MP-BAIDU
this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editorId');
// #endif
// #ifdef APP-PLUS || H5 ||MP-WEIXIN
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx = res.context
}).exec()
// #endif
},
openXial(index){
if(index==0) {
this.isdisease = !this.isdisease
}
if(index==1) {
this.isdiary_doctor = !this.isdiary_doctor
}
},
chooseXia(index,num){//
if(num==0){
this.diseaseCurrent = index
this.disease = this.diseaseArr[index].title
this.disease_id = this.diseaseArr[index].id
} else {
this.diary_doctorCurrent = index
this.diary_doctor = this.diary_doctorArr[index].title
this.diary_doctor_id = this.diary_doctorArr[index].id
}
},
//
diseaseEv(){
this.$requst.post('archives/disease').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0){
this.diseaseArr=[]
res.data.forEach(item=>{
let obj = {
id:item.id,
title:item.name,
pid:item.pid,
sort:item.sort
}
this.diseaseArr.push(obj)
})
// this.disease = this.diseaseArr[0].title;
// this.disease_id = this.diseaseArr[0].id;
}
},error=>{})
},
chooseEv(){//
this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{
if(res.code==0){
this.diary_doctorArr = [];
if(res.data.list.length){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
title:item.name
}
this.diary_doctorArr.push(obj)
})
// this.diary_doctor = this.diary_doctorArr[0].title
// this.diary_doctor_id = this.diary_doctorArr[0].id
} else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg);
})
},
//
updataImg(index){
if(index==0){
uni.chooseImage({
count:1,
sourceType:['album'],
success: (res) => {
let tempImg = res.tempFilePaths[0];
this.$requst.upload('file/upload/image',{file:tempImg}).then(res=>{
this.fengImg = this.$http + res.data.src;
this.$toolAll.tools.showToast('图片上传成功(*^▽^*)')
},error=>{})
}
})
} else {
uni.chooseImage({
count:9,
sourceType:['album'],
success: (res) => {
let tempImg = res.tempFilePaths;
let num = 0;
for (var i = 0; i < tempImg.length; i++) {
num++;
this.$requst.upload('file/upload/image',{file:tempImg[i]}).then(res=>{
if(this.imgArr.length!=9){
this.imgArr.push(this.$http + res.data.src);
}
if(num==tempImg.length){
this.$toolAll.tools.showToast('上传成功(*^▽^*)')
} else {
this.$toolAll.tools.showToast('上传中...')
}
},error=>{})
}
}
})
}
},
clearfengImg(){
this.fengImg = '';
},
clearaddImg(index){
this.imgArr.splice(index,1);
},
//
submit(){
if(this.diary_title==''){
this.$toolAll.tools.showToast('请输入日记标题');
} else if(this.diary_content==''){
this.$toolAll.tools.showToast('请输入详细内容');
} else if(this.disease_id==''){
this.$toolAll.tools.showToast('请选择病种');
} else if(this.diary_doctor_id==''){
this.$toolAll.tools.showToast('请关联医生');
} else if(this.fengImg==''){
this.$toolAll.tools.showToast('请添加封面图');
} else {
let params = {
title :this.diary_title,
images:this.imgArr.join(','),
cover:this.fengImg,
disease_id:this.disease_id,
disease_name:this.disease,
content:this.diary_content,
doctor_id:this.diary_doctor_id,
doctor_name:this.diary_doctor,
id:''
}
console.log(params);
this.$requst.post('user/diary-save',params).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('保存成功');
uni.navigateBack({delta:1})
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
}
},
//
// checkDiaryInfo(id){
// this.$requst.get('user/diary-info',{id:id}).then(res=>{
// if(res.code==0){
// if(this.page==1) this.dataList = [];
// this.total = res.data.total;
// } else this.$toolAll.tools.showToast(res.msg);
// },error=>{})
// }
}
}
</script>
<style>
</style>

View File

@ -1,116 +0,0 @@
<template>
<view>
<!-- <auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> -->
<!-- 状态栏 -->
<status-nav :titleVal="'我的日记'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 160rpx;">
<view v-if="dataList.length!=0" class="mar-s30 bacf pad20" v-for="(item,index) in dataList" :key="index" style="border-radius: 28rpx;">
<view class="clips1">{{item.title}}</view>
<view class="mar-s20 fon24 col9">{{item.content}}</view>
<view class="disac fw mar-s20">
<image class="diary-img mar-x10" @tap="preImg(index,index1)" :src="item1" v-for="(item1,index1) in item.imgArr" :key="index1" mode="aspectFill"></image>
</view>
<view class="disjbac mar-s20">
<view class="fon28 pcol bold">{{item.doctorName}}</view>
<view class="fon24 col9">{{item.creatTime}}</view>
</view>
<view @tap="delDiaryEv(item.id,index)" class="disac mar-s20 pad-s20" style="border-top: 2rpx solid #E6E6E6;">
<image src="../../static/public/del-diary.png" style="width: 20px;height: 20px;vertical-align: bottom;" mode=""></image>
<view class="fon28 colf8 bold" style="margin-top: -4rpx;">删除</view>
</view>
</view>
<nothing-page v-if="dataList.length==0" :content="'暂无日记'"></nothing-page>
</view>
<!-- 底部按钮 -->
<view class="posixzy pad-sx25">
<view @tap="goAddDiary" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">添加日记</view>
</view>
</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'),
optionObj:'',
dataList:[],
page:1,
size:20,
total:'',//
isZanw:true,
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkDiaryEv()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多日记','none',1000)
this.isZanw = false
}
},
onUnload: function() {
},
onShow() {
console.log(123);
this.checkDiaryEv();
},
onLoad() {
},
methods: {
goAddDiary(){
uni.navigateTo({
url:'/pagesA/my-diary-edit/my-diary-edit'
})
},
checkDiaryEv(){
this.$requst.get('user/diary',{page:this.page,size:this.size}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
title:item.title,
content:item.content,
imgArr:item.images.split(','),
doctorName:item.doctor_name,
creatTime:item.created_at,
}
this.dataList.push(obj);
})
}
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
},
delDiaryEv(id,index){
this.$requst.get('user/diary-del',{id:id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('删除成功');
this.dataList.splice(index,1);
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
},
preImg(index,num){
console.log(this.dataList[index]);
uni.previewImage({
current:this.dataList[index].imgArr[num],
urls:this.dataList[index].imgArr
})
}
}
}
</script>
<style>
</style>

View File

@ -1,7 +1,7 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'地址管理'" :statusTitle="true"></status-nav>
<status-nav :navBarTitle="'地址管理'"></status-nav>
<view :style="{paddingTop:statusHNH+'px'}" class="mar-sx20 pad-zy32" style="padding-bottom: 150rpx;">
<view v-if="loading">
<view @tap="goBack(index)" v-for="(item,index) in dataList" :key="index" class="bacf radius20 pad20 mar-x20">
@ -22,7 +22,7 @@
</view>
</view>
</view>
<view @tap.stop="obtainLngLat" class="posixzy address_add" style="bottom: 20rpx;">添加地址</view>
<view @tap.stop="obtainLngLat" class="posixzy address_add" :style="{backgroundColor:publicColor}" style="bottom: 20rpx;">添加地址</view>
<nothing-page v-if="dataList.length==0" :content="'暂无可用地址'"></nothing-page>
</view>
</view>
@ -80,7 +80,7 @@
<input type="text" class="width100" v-model="userAddress" placeholder="请输入详细地址" />
</view>
<!-- 确认保存按钮 -->
<view @tap.stop="addAddress" class="address-btn-add">确认保存</view>
<view @tap.stop="addAddress" class="address-btn-add" :style="{backgroundColor:publicColor}">确认保存</view>
</view>
</view>
</view>

View File

@ -1,85 +1,41 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'订单管理'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<view class="isTopf bacf pad-zy30" :style="{top:statusHNH+'px'}">
<scroll-view scroll-x>
<view id="daoh" class="disjbac pad-s20">
<view @tap="chooseNav(indexn)" class="posir pad-s20 pad-zy20 pad-x30 flexs mar-y10" style="text-align: center;" :class="activeIndex==indexn?'activeD':''" :style="{color:activeIndex==indexn?'#3875F6':'#000000'}" v-for="(itemn,indexn) in statusList" :key="indexn">{{itemn}}</view>
</view>
</scroll-view>
</view>
<view :style="{paddingTop:(statusHNH+12+chuTop)+'px'}" class="pad-sx20 pad-zy32 pad-x180">
<view v-if="orderList.length!=0" v-for="(item,index) in orderList" :key="index" class="radius20 bacf pad20 mar-x20 order-item-box">
<view @tap="goDetail(item.id)" class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view>
<view v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="fon24 col9">{{item.group_make_end_at}}</view>
<view v-else class="fon24 col9">{{item.establish}}</view>
</view>
<view @tap="goDetail(item.id)" class="disjbac fon24">
<view class="col3">订单号{{item.orderNum}}</view>
<view v-if="item.virtual_check==0" class="bold" :class="(item.orderStatus==1 || item.orderStatus==2 || item.orderStatus==3) ? 'colf8':'col9'">{{['','','','','',''][item.orderStatus]}}</view>
<view v-if="item.virtual_check==1" class="bold col9"></view>
</view>
<view v-for="(itemc,indexc) in item.childrenList" :key="indexc" class="fon26 col3 disjbac pad-sx50 disjbac bbot posir" :style="{paddingBottom:itemc.is_virtual!=0?'70rpx':'50rpx'}">
<image @tap="goDetail(item.id)" :src="itemc.imgSrc" class="flexs" mode="aspectFill"></image>
<view @tap="goDetail(item.id)" class="width100 disjb fc" style="height: 166rpx;">
<view>
<view class="fon28 col3 bold clips2">{{itemc.title}}</view>
<view class="order-sy">{{itemc.sku_name}}</view>
</view>
<view class="disjbac mar-s10">
<view class="colf8 fon32 bold"><span v-if="item.isShop==0"></span><span v-else></span>{{itemc.price}}<span class="fon28 col6 mar-z20 font4">x{{itemc.num}}</span></view>
<view @tap.stop="make(index,indexc)" v-if="itemc.is_virtual!=0 && itemc.check_type=='frontend' && itemc.not_check_num!=0 && item.orderStatus!=1" class="order-btn">线</view>
<view v-if="itemc.is_virtual!=0 && itemc.check_type!='frontend'" class="order-btn" style="background-color: #CCCCCC;">线</view>
</view>
</view>
<view v-if="itemc.is_virtual!=0 && itemc.not_check_num!=0" class="mar-s10 posia col6" style="bottom: 20rpx; right: 0rpx;"> x{{itemc.not_check_num}}</view>
</view>
<!-- <view class="fon28 col3 pad-s20 disjbac">
<view class="flexs"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> +<span v-if="item.coin!=0">{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
<view class="width100 disac" style="justify-content: flex-end;">
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5" class="order-cancle"></view>
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view>
<view @tap="isHeyan=true" v-if="item.orderStatus == 3" class="order-btn">线</view>
<view class="order-btn">单人拼团</view>
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn"></view>
</view>
</view> -->
<view class="fon28 col3">
<view class="mar-sx20 disje"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> <span v-if="item.coin!=0">+{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
<view class="disjbac">
<view v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="posir disjcac flexs" style="color: #010101;font-size: 24rpx;">
<image src="../../static/public/weix.png" mode="" class="flexs" style="width: 50rpx;height: 50rpx;"></image>
分享给朋友
<button open-type="share" :data-id="index" class="posia-op">分享给朋友</button>
</view>
<view class="width100 disje">
<view @tap="comeing(item.orderNum)" v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="order-btn mar-y20"></view>
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0 && item.orderStatus!=5" class="order-cancle"></view>
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view>
<!-- <view class="order-btn" v-if="item.is_only==1"></view> -->
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn"></view>
</view>
</view>
</view>
</view>
<nothing-page v-if="orderList.length==0" :content="`暂无更多订单列表`"></nothing-page>
</view>
<!-- 待核验弹框 -->
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;" catchtouchmove="return">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
<view class="fon28 col3">订单二维码</view>
<view class="mar-sx30">
<yz-qr ref="qrPath" :text="text" :size="qsize" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
<!-- <image src="/static/public/member-head.png" class="order-hx-img" mode="aspectFill"></image> -->
</view>
<view class="fon24 col3">
<view class=" mar-s40 mar-x20">工作人员扫码核销订单</view>
<view>订单未完成前请勿出示二维码</view>
</view>
<image @tap.stop="closeEv" src="/static/public/closequan.png" class="posia heyan-close" mode=""></image>
<status-nav :navBarTitle="'我的订单'"></status-nav>
<view :style="{paddingTop: statusBarHeight +'px'}">
<!-- 导航栏 -->
<view style="position: sticky;z-index: 10;" :style="{ top: statusBarHeight +'px'}">
<swiper-tab id="tab" :list="navList" v-model="current" @input="clickTab" itemColor="#000000" lineColor="#000000"></swiper-tab>
</view>
<swiper :style="{ height: swiperHeight - statusBarHeight +'px'}" class="pad-zy30 fon30" :current="current" @change="swiperChange">
<swiper-item v-for="item in navList.length" :key="index">
<scroll-view scroll-y @scrolltolower="scrollBottomEv" style="height: 100%;">
<!-- 列表数据 -->
<view class="radius20 mar-s20" style="background-color: #f6f6f6;">
<view @tap="goDetail" class="disjbac col0 pad30" style="border-bottom: 1rpx solid #d3d3d3;">
<view>订单号123412351234123</view>
<view class="bold">{{['','待付款','待发货','待核验','待收货','交易完成'][1]}}</view>
</view>
<view class="fon26 col3 disjbac pad-sx50 mar-zy30 disjbac borbot posir">
<image @tap="goDetail" src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" class="flexs mar-y20 radius30" style="width: 224rpx;height: 224rpx;" mode="aspectFill"></image>
<view @tap="goDetail" class="width100 disjb fc" style="height: 224rpx;">
<view class="fon28 col3 bold clips2 line-h50">就阿斯蒂芬我就阿斯蒂芬我就阿斯蒂芬我就阿斯蒂芬我就阿斯蒂芬我</view>
<view class="order-sy"><span>颜色粉色</span><span>尺寸12.2</span></view>
<view class="colpeili disjbac"><span class="order-price">2,000</span><span class="fon24">x1</span></view>
</view>
</view>
<view class="colpeili pad30 disjbac" style="border-top: 1rpx solid #d3d3d3;">
<view class="order-price">合计2,000</view>
<view class="disjbac">
<view @tap="transferFrame(index)" class="order-btn">取消订单</view>
</view>
</view>
</view>
<!-- 暂无更多数据 -->
<pitera v-if="pitera"></pitera>
</scroll-view>
</swiper-item>
</swiper>
</view>
<!-- 取消订单弹框 -->
<view v-if="isCancle" @tap.stop="isCancle=false" class="posAll">
@ -105,31 +61,31 @@
</view>
</view>
</view>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='-1'></foot-tab>
</view>
</template>
<script>
import swiperTab from '@/components/swiper-tab/swiper-tab.vue';
import yzQr from '@/components/yz-qr/yz-qr.vue';
export default {
components:{
yzQr
yzQr,
swiperTab
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
statusBarHeight:uni.getSystemInfoSync().statusBarHeight + 50,
swiperHeight:uni.getSystemInfoSync().windowHeight,
publicColor:uni.getStorageSync('publicColor'),//
chuTop:'',//
activeIndex:'',
statusList:['全部','待付款','待发货','待核验','待收货','已完成'],
navList:[{title:'全部'},{title:'待付款'},{title:'待发货'},{title:'待收货'},{title:'已完成'},{title:'已取消'}],
//
reasonList:[
{title:'不想要了/买多了/买错了',isActive:true},
{title:'地址信息填写错误',isActive:false},
{title:'其他原因',isActive:false},
],
isHeyan:false,//线
isCancle:false,//
orderList:[],
zanList:[],//
@ -142,17 +98,11 @@
remarks:'',//
times:0,//
canvasQrPath: '',
text: '',
qsize: 162,
colorDark: '#000000',
colorLight: '#ffffff',
timer:null,
zanArr:[],
timeList:[],
orderInfo:{},
checkGrounpId:0,
titleList:[],//tab
imgList:[],//tab
}
},
onShareAppMessage(res) {
@ -173,123 +123,34 @@
  };
  return shareObj;
},
onReady() {
// IDtab
uni.createSelectorQuery().in(this).select('#tab').boundingClientRect().exec(rect => {
this.swiperHeight = this.swiperHeight - rect[0].height
});
},
onReachBottom() {
if(this.total!=this.orderList.length){
this.page++
this.checkList(this.activeIndex)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
},
onUnload() {
this.closeEv();
},
onShow() {
this.$toolAll.tools.isLogin();
this.checkZT(this.activeIndex);
this.checkList(this.activeIndex);
},
onLoad(options) {
const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect);
this.chuTop = rect.height
}).exec()
options.index==undefined ? this.activeIndex = 0 : this.activeIndex = options.index;
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: {
comeing(coding){
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('免拼成功');
this.checkList(this.activeIndex);
}
})
// tab
clickTab(index){
this.current = index
},
make(index,index2){
this.isHeyan = true;
this.text = `${this.orderList[index].orderNum}H${this.orderList[index].childrenList[index2].id}`;
let params = {
order_coding:this.orderList[index].orderNum,
id:this.orderList[index].childrenList[index2].id,
not_check_num:this.orderList[index].childrenList[index2].not_check_num
}
this.timer = setInterval(()=>{
this.$requst.post('order/check-result',params).then(res=>{
if(res.code==0){
if(res.data.result==1){
this.isHeyan = false;
this.$toolAll.tools.showToast('已完成');
this.checkList(this.activeIndex);
clearInterval(this.timer);
}
}
})
},3000)
// var that = this;
// setTimeout(function() {
// that.canvasQrPath = that.$refs.qrPath.canvasQrPath;
// console.log(':', that.canvasQrPath)
// }, 1000)
},
closeEv(){
this.isHeyan = false;
clearInterval(this.timer);
},
checkZT(index){
if(index==0){this.tag=""}
if(index==1){this.tag="waiting"}
if(index==2){this.tag="paid"}
if(index==3){this.tag="check"}
if(index==4){this.tag="shipped"}
if(index==5){this.tag="completed"}
},
chooseNav(index){
this.page =1;
this.activeIndex = index;
this.checkZT(index);
this.checkList(index);
//
swiperChange(e){
this.current = e.detail.current
},
checkList(index){//
this.$requst.post('user/order',{page:this.page,size:this.size,tag:this.tag}).then(res=>{
@ -438,13 +299,6 @@
}
})
},
hexiaoEv(){//
this.$requst.post('order/check').then(res=>{
if(res.code==0){
}
})
},
transferFrame(index){//
this.isCancle = true;
this.current = index;
@ -502,4 +356,15 @@
background: #3875F6;
width: 100%;
}
.order-price{color: #f83030;}
.order-btn{
width: 150rpx;height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 20rpx;
background-color: #f6f6f6;
color: #8c8c9b;
border: 1rpx solid #d3d3d3;
}
</style>

View File

@ -1,230 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'孔雀币管理'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 fon28 col3 pad-x180">
<view class="mar-s20 bacf pad20 radius20">
<view class="mar-x30">当前孔雀币</view>
<view class="disjbac">
<view class="disjcac fc width33" style="align-items: flex-start;">
<view class="fon36 bold mar-z20">{{dangKQ}}</view>
<view class="mar-s36 coin-tx-btn" @tap="isTiX=true"></view>
</view>
<view class="disjcac fc width33">
<view class="fon36 bold">{{shenHZ}}<span class="coin-yuan"></span></view>
<view class="mar-s36 fon26 col3 coin-miao">审核中</view>
</view>
<view class="disjcac fc width33">
<view class="fon36 bold">{{yiTKQ}}<span class="coin-yuan"></span></view>
<view class="mar-s36 fon26 col3 coin-miao">已提现</view>
</view>
</view>
</view>
<!-- 获取列表提现列表 -->
<view class="mar-s20 bacf pad20 radius20">
<view class="mar-x50 fon28 disja">
<view @tap="switchState(true)" :class="activeJF?'col3 bold':'col9'">获取列表</view>
<view @tap="switchState(false)" :class="!activeJF?'col3 bold':'col9'">支出列表</view>
</view>
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
</view>
<view v-show="activeJF" class="fon36 bold pcol">+{{item.num}}</view>
<view v-show="!activeJF" class="fon36 bold">{{item.num}}</view>
</view>
</view>
<!-- 分享按钮 -->
<view class="disjcac coin-share-box">
<image src="/static/public/bottom-shear.png" mode=""></image>
<view class="fon40 colf bold mar-z10">分享给好友</view>
<button class="posia-op" open-type="share"></button>
</view>
<!-- 提现弹框 -->
<view v-if="isTiX" @tap="isTiX=false" class="disjcac tc tx-tk-box">
<view class="bacf width100 radius20 pad30 mar-zy85" @tap.stop="isTiX=true">
<view class="fon28 bold col34">孔雀币提现</view>
<view class="fon28 mar-s30 col34 font5">兑换比例{{kqbl}}孔雀币兑换{{whatPrice}}元人民币</view>
<view class="fon24 mar-s10 mar-x30 colf8 font5">最低提现金额为{{limit_price}}</view>
<input type="number" v-model="kNum" placeholder="请输入孔雀币" class="width100 radius10"/>
<view class="disjbac">
<view @tap.stop="confrimT" class="tk-btn pbackc">立即提现</view>
<view @tap.stop="isTiX=false" class="tk-btn">暂不提现</view>
</view>
</view>
</view>
</view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
activeJF:true,
kNum:'',//
dataList:[
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
],
isTiX:false,
dangKQ:3000,//
shenHZ:300 ,//
yiTKQ:0 ,//
kqbl:0,//
whatPrice:0,//
ntype:'in',//coin: withdrawal
times:0,//
page:1,
size:10,
total:'',//
isZanw:true,
vision:false,
isShowP:false,
realPrice:0,//
limit_price:0//
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkList(this.ntype)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多记录','none',1000)
this.isZanw = false
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesA/peacockCoin/peacockCoin?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin();
this.checkInfo();
this.checkList(this.ntype);
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
confrimT(){//
this.realPrice = this.whatPrice / this.kqbl * this.kNum;
if(this.kNum=='' || this.kNum<=0){
this.$toolAll.tools.showToast('请输入孔雀币数量');
} else if(this.kNum > this.dangKQ){
this.$toolAll.tools.showToast('请输入正确的孔雀币数量');
} else if((this.limit_price - this.realPrice) > 0 ){
this.$toolAll.tools.showToast(`最低提现${this.limit_price}`);
} else {
if(this.times==0){
this.times++;
this.$requst.post('user/withdrawal-coin',{coin:this.kNum}).then(res=>{
if(res.code==0){
this.isTiX = false;
this.$toolAll.tools.showToast('提现已提交审核');
setTimeout(()=>{
this.dataList = [];
this.page =1;
this.isZanw = true;
this.ntype = 'out';
this.checkInfo();//
this.checkList(this.ntype);//
this.activeJF = false;
this.times = 0;//
this.kNum = '';//
},1500)
} else this.$toolAll.tools.showToast(res.msg);
})
}
}
},
checkList(ntype){//
this.$requst.post('user/coin-log',{type:ntype,page:this.page,size:this.size}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
title:item.name,
time:item.created_at,
num:item.num
}
this.dataList.push(obj);
})
}
}
})
},
checkInfo(){//
this.$requst.post('user/coin-load').then(res=>{
if(res.code==0){
this.dangKQ = res.data.coin;//
this.shenHZ = res.data.withdrawal_ing;//
this.yiTKQ = res.data.withdrawald;//
this.limit_price = res.data.limit_price*1;//
this.kqbl = res.data.withdrawal_proportion.coin;//
this.whatPrice = res.data.withdrawal_proportion.money;//
}
})
},
switchState(flag){//
this.dataList = [];
this.activeJF = flag;
this.page =1;
this.isZanw = true;
if(flag) {
this.ntype ='in';
this.checkList(this.ntype);
} else {
this.ntype ='out';
this.checkList(this.ntype);
}
},
}
}
</script>

View File

@ -1,228 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'积分商城'" :statusTitle="true"></status-nav>
<!-- 搜索输入框 -->
<view class="search-input-box bacf poszy jf-input-box" :style="{top: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20">
<!-- 输入框 -->
<input class="width100 fon34 radius10" @confirm="searchKey" type="text" v-model="searchVal" placeholder="请输入商品名称"/>
<!-- 搜索 -->
<view class="flexs mar-z30 radius10 pad-zy40 fon34 colf" @tap="searchKey" :style="{background:publicColor}">搜索</view>
</view>
<!-- 分类标题 -->
<view class="disjbac pad-zy20 pad-s20 bacf fon24">
<view v-for="(item,index) in shopCate" class="disjcac" @tap="chooseShopCate(index)" :class="activeIndex==index?'activecate':'shopMo'" :style="{background:activeIndex==index?publicColor:'#F2F2F2'}" :key="index">
<span>{{item}}</span>
<view class="disjcac fc mar-z10" v-if="index==2 || index==3">
<image src="/static/public/address-top.png" mode=""></image>
<image src="/static/public/address-down.png" mode=""></image>
</view>
</view>
</view>
</view>
<!-- 数据列表 -->
<view :style="{marginTop:statusHNH+titleHeight+'px'}">
<score-list id="myComponent" :dataList="dataList" v-if="dataList.length!=0"></score-list>
<nothing-page v-if="dataList.length==0" :content="`暂无更多${searchVal}积分商品`"></nothing-page>
</view>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
<!-- 购物车 -->
<navigator url="/pagesA/shopCart/shopCart?isScore=score" 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>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
import scoreList from '@/components/score-list.vue';
export default {
components:{
scoreList
},
data() {
return {
titleList:[],
imgList:[],
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
activeIndex:0,
shopCate:['综合','最新','兑换量','积分'],
titleHeight:'',//
dataList:[],
searchVal:'',//
type:'normal',//type=normal newest=
sort_field:'',// score= num=
sort_value:'asc',// asc= desc=
cishu:0,
cartNum:0,
vision:false,
isShowP:false,
}
},
onShow() {
this.$toolAll.tools.isLogin();
this.cartNumEv();
},
onShareAppMessage() {
var shareObj = {
path: `/pagesA/pointsMall/pointsMall?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
// +
const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => {
// console.log('+',rect.height);
this.titleHeight = rect.height
}).exec()
this.checkList();
let maiOjb = {
e:12,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'score'}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
checkList(){//
let params = {
keyword:this.searchVal,//
page:1,
size:10,
type:this.type,//type=normal newest=
sort_field:this.sort_field,// score= num=
sort_value:this.sort_value// asc= desc=
}
this.$requst.post('spu/score',params).then(res=>{
if(res.code==0){
this.dataList = [];
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
saleable:item.saleable,//
stock:item.stock,//
title: item.name,
zhePrice:item.price,
yuanPrice:item.original_price,
integral:item.score,
isTuan:false,
isPing:false,
isXian:false,
isIntegral:true,
grade:item.level_id,
published_at:item.published_at,//
amount:item.amount,//
level_text:item.level_text//
}
this.dataList.push(obj)
})
} else {
this.$toolAll.tools.showToast('暂无更多积分商品')
}
}
})
},
searchKey(){//
if(this.activeIndex==0) {
this.clearVal();
this.type = 'normal';
}
if(this.activeIndex==2 || this.activeIndex==3) this.sort_value = 'asc';
this.checkList();
},
chooseShopCate(index){//
this.activeIndex = index;
this.type = '';
this.sort_field = '';
if(index==0) this.type = 'normal';
if(index==1) this.type = 'newest';
this.cishu++
if(index==2) {
this.sort_field = 'amount';
if(this.cishu%2==0) {
this.sort_value = 'asc';
} else this.sort_value = 'desc';
}
if(index==3) {
this.sort_field = 'score';
if(this.cishu%2==0) {
this.sort_value = 'asc';
} else this.sort_value = 'desc';
}
this.checkList();
},
clearVal(){
this.type = '';
this.sort_field = '';
}
}
}
</script>
<style>
page{background: #F5F5F5;}
.activecate,.shopMo{border-radius: 20rpx;text-align: center;background-color: #f2f2f2;color: #333333;padding: 16rpx 25rpx;width: 100rpx;}
.activecate{color: #FFFFFF;}
.activecate image{
-webkit-filter: invert(1); /* Chrome, Safari, Opera */
filter: invert(1);
}
</style>

View File

@ -1,301 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'自主预约'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20">
<view class="bacf mar-s25 pad-zy20 radius20 fon28 col3 pad-x40">
<view class="disac pad-s32">
<view class="flexs mar-y20">预约类别</view>
<view @tap="openXial(0)" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{category}}</view>
<image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isZhuan" class="posia bacf radius10 xial-box">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl)" :class="xialCurrent==indexl?'pcol pbord':''" v-for="(iteml,indexl) in xialone" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view>
</view>
<!-- <view class=" disac pad-s32">
<view class="flexs mar-y20">选择医生</view>
<view @tap="openXial(1)" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{categoryT}}</view>
<image :class="isZhuanT?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isZhuanT" class="posia bacf radius10 xial-box">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXiaT(indext)" :class="xialCT==indext?'pcol':''" v-for="(itemt,indext) in xialTwo" :key="indext">{{itemt}}</view>
</view>
</view>
</view>
</view> -->
<!-- 预约日期 -->
<view class="mar-s20 mar-x30">预约日期</view>
<scroll-view scroll-x >
<view class="disac">
<view @tap="chooseTime(index)" class="disjcac fc flexs radius20 mar-y20 yutime borbot-df" :class="item.status==0?'bcdb col3':'colc'" :style="{background:timeCurrent==index?publicColor:'',border:timeCurrent==index?`2rpx solid ${publicColor}`:''}" v-for="(item,index) in dataList" :key="index">
<view :class="timeCurrent==index?'colf':'col3'" class="bold fon28">{{item.title}}</view>
<view :class="timeCurrent==index?'colf':''" class="fon26 mar-s10">{{item.time}}</view>
</view>
</view>
</scroll-view>
<!-- 时间段 -->
<view class="mar-s20 mar-x10"> </view>
<view class="disjb fw">
<view @tap="chooseTD(indextd)" :style="{background:itemtd.tdStatus?publicColor:'',border:itemtd.tdStatus?`2rpx solid ${publicColor}`:''}" :class="itemtd.num==0?'bcdb':''" class="tc radius10 mar-x30 col3 timed borbot-df" v-for="(itemtd,indextd) in dataTD" :key="indextd">
<view :class="itemtd.tdStatus?'colf':''">{{itemtd.ttime}}</view>
</view>
</view>
<!-- 联系人 -->
<view class="disac mar-s30">
<view class="mar-y20 flexs titlel"> </view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="lname" maxlength="10" class="fon28 height-68" type="text" placeholder="请填写联系人姓名"/>
</view>
</view>
<!-- 联系方式 -->
<view class="disac mar-s20">
<view class="mar-y20 flexs titlel">联系方式</view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="lphone" maxlength="11" class="fon28 height-68" type="text" placeholder="请输入联系电话"/>
</view>
</view>
<!-- 留言信息 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs mar-s20 titlel">留言信息</view>
<view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;">
<textarea v-model="lmsg" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请填写内容"/>
</view>
</view>
<!-- 立即提交底部按钮 -->
<view @tap="submit" class="fon30 radius20 tc colf bold0 btnl" :style="{background:publicColor}">{{btnCon}}</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :isCenter="true" :contentVal="'提交成功!等待审核'" :comfrimVal="'好的'" @comfirmev="comfirmev"></pu-po>
</view>
<!-- 底部客服 -->
<public-customer :nright="20"></public-customer>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
timeCurrent:0,
dataList:[],//
dataTD:[],//
isShowT:false,
lname:'',//
lphone:'',//
lmsg:'',//
isZhuan:false,
xialCurrent:0,
xialone:[],
category:'',
categoryT:'',
isZhuanT:false,
xialCT:0,
xialTwo:['杨幂','周星驰'],
type_id:'',//ID
gday:'',//
dtId:[],//ID
zanTimeD:[],//
zanDay:[],//
dangId:'',//ID
btnCon:'立即提交'
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.category = this.xialone[0]
this.categoryT = this.xialTwo[0]
this.checkZParmas();
this.lphone = uni.getStorageSync('phone');
// this.$toolAll.tools.weekDate()
},
methods: {
gtimeD(id,gday){
this.$requst.post('user/appointment-period-full',{type_id:id,day:gday}).then(res=>{
// console.log('',res);
if(res.code==0){
this.dtId = res.data
this.dataTD = []
if(this.dtId.length!=0){
this.zanTimeD.forEach((item,index)=>{
let newNum = 1
let newTdStatus = false
this.dtId.forEach(item1=>{
if(item.id==item1.id){
newNum = 0
newTdStatus = false
}
})
let tdObj = {
id:item.id,
ttime:item.ttime,
num:newNum,
status:item.status,
tdStatus:newTdStatus
}
this.dataTD.push(tdObj)
})
} else {
this.zanTimeD.forEach(item=>{
let tdObj = {
id:item.id,
ttime:item.ttime,
num:1,
status:item.status,
tdStatus:false
}
this.dataTD.push(tdObj)
})
}
}
},error=>{})
},
checkZParmas(){//
this.$requst.post('user/appointment-parameters',{page:1,size:20}).then(res=>{
// console.log('',res);
if(res.code==0){
this.gtimeD(res.data.types[0].id,res.data.days[0].day)
//
if(res.data.types.length!=0){
res.data.types.forEach(item=>{
let ycateObj = {
id:item.id,
title:item.title,
max:item.max
}
this.xialone.push(ycateObj)
})
this.type_id = this.xialone[0].id
this.category = this.xialone[0].title
}
//
if(res.data.days.length!=0){
this.gday = res.data.days[0].day
this.zanDay = res.data.days
res.data.days.forEach(item=>{
let arr = item.day.split('-')
let newDay = arr[1]+'月'+arr[2]+'日'
let dayObj = {
title:item.week,
time:newDay,
status:item.status
}
this.dataList.push(dayObj)
})
}
//
if(res.data.times.length!=0){
res.data.times.forEach((item,index)=>{
let tdObj = {
id:item.id,
ttime:item.name,
status:item.status,
}
// this.dataTD.push(tdObj)
this.zanTimeD.push(tdObj)
})
}
}
},error=>{})
},
submit(){
if(!this.lname){
this.$toolAll.tools.showToast('请输入联系人姓名')
} else if(!this.lphone){
this.$toolAll.tools.showToast('请输入联系电话')
} else if(this.$toolAll.tools.isPhone(this.lphone)){
this.$toolAll.tools.showToast('请输入正确的联系电话')
} else if(!this.dangId){
this.$toolAll.tools.showToast('请选择时间段')
} else {
let parmas = {
type_id:this.type_id,//ID
day:this.gday,//2021-08-11
period_id:this.dangId,//ID
user_name:this.lname,//
user_phone:this.lphone,//
remarks:this.lmsg//500
}
if(this.btnCon=='立即提交'){
this.btnCon = "正在提交..."
this.$requst.post('user/appointment-apply',parmas).then(res=>{
// console.log('',res);
if(res.code==0){
this.isShowT = true
wx.requestSubscribeMessage({
tmplIds: ['uvGd7RqaegheGU-uVxR-uM3y2MadZeMOHdQaNiiWm8U'],
success: (res)=> {
console.log('res',res);
this.isShowT = true
}
})
} else {
this.btnCon = "立即提交"
this.$toolAll.tools.showToast(res.msg)
}
},error=>{})
}
}
},
comfirmev(){
this.isShowT = false
uni.navigateBack({delta:1})
},
goYu(){//
uni.navigateTo({
url:''
})
},
chooseTime(index){
if(this.dataList[index].status!=0){
this.timeCurrent = index
this.gday = this.zanDay[index].day
this.gtimeD(this.type_id,this.gday)
}
},
chooseTD(index){//
if(this.dataTD[index].num!=0){
this.dangId = this.zanTimeD[index].id
this.dataTD.forEach(item=>{//truefalse
if(item.tdStatus==true) item.tdStatus = false
})
this.dataTD[index].tdStatus = !this.dataTD[index].tdStatus
}
},
openXial(index){
if(index==0) {
this.isZhuanT = false
this.isZhuan = !this.isZhuan
}
if(index==1) {
this.isZhuan = false
this.isZhuanT = !this.isZhuanT
}
},
chooseXia(index){//
this.xialCurrent = index
this.category = this.xialone[index].title
this.type_id = this.xialone[index].id
this.gtimeD(this.type_id,this.gday)
},
chooseXiaT(index){
this.xialCT = index
this.categoryT = this.xialTwo[index]
},
}
}
</script>
<style>
</style>

View File

@ -1,310 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'购物车'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 pad-x160">
<view class="bacf radius20 mar-s20 pad20" v-if="cartList.length!=0">
<view class="fon28 col3 disjbac" style="height: 43rpx;">
<view class="bold">订单信息</view>
<view v-if="!cancle_del && cartList.length!=0" @tap="guanEv(0)"></view>
<view v-if="cancle_del && cartList.length!=0" @tap="guanEv(1)" class="edit-btn"> ×</view>
</view>
<view v-for="(item,index) in cartList" :key="index" class="disjbac pad-sx40 borbot posir cart-list-box" @touchstart="moveStart(index,$event)" @touchend="moveEnd">
<view class="disjbac width100" :style="{marginLeft:(showDel && isDang==index)?'-70px':'',paddingRight:(showDel && isDang==index)?'70px':''}">
<!-- -->
<view @tap="chooseItem(index)">
<image v-if="item.isActive" src="/static/public/chooseFS.png" class="flexs chooseDX" mode=""></image>
<image v-else src="/static/public/cancle-FS.png" class="flexs chooseDX" mode=""></image>
</view>
<image @tap="chooseItem(index)" :src="item.imgSrc" class="order-image mar-z25 flexs" mode="aspectFill"></image>
<view class="width100 disjbac fc" style="height: 166rpx;">
<view class="width100">
<view @tap="goShoptDetail(item.spu_id,item.spu_activity_id)" class="fon28 col3 bold clips2">{{item.title}}</view>
<view class="order-sy">{{item.sku_name}}</view>
</view>
<view class="disjbac width100 mar-s10">
<view class="order-item-price"><span v-if="item.is_score!=1"></span><span v-else></span>{{item.price}}</view>
<view class="fon26 col3 disac bold cart-input-box">
<image @tap="deladdEvent(index , 0)" src="/static/public/del.png" mode=""></image>
<input type="text" @input="inputNum($event,index)" v-model="item.num"/>
<image @tap="deladdEvent(index , 1)" src="/static/public/add.png" mode=""></image>
</view>
</view>
</view>
</view>
<view v-if="showDel && isDang==index" @tap="deltItem(index)" class="item-del-btn"></view>
</view>
</view>
<nothing-page v-if="cartList.length==0" :content="'暂无更多商品'"></nothing-page>
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
<view class="disac" @tap="chooseAll">
<view class="chooseAll-box">
<view v-if="isChooseAll"></view>
</view>
<view class="fon28 col3 mar-z10">全选</view>
</view>
<!-- 去支付 -->
<view v-if="!cancle_del" class="disjbac">
<view>
<view class="fon28" v-if="isScore!='score'"><span class="fon40 bold colf8">{{allPrice}}</span></view>
<view class="fon28" v-else><span class="fon40 bold colf8">{{allPrice}}</span></view>
</view>
<view @tap="goGetReadyDan" class="colf fon30 bold mar-z10 goBuy-btn" style="background: #3875F6;">{{cartList.length==0?'去购物':'去支付'}}</view>
</view>
<!-- 删除 -->
<view @tap="delBtn" v-else class="colf fon28 bold goBuy-btn" style="background: #F85050;">删除</view>
</view>
</view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
showDel:false,
startX:'',//
endX:'',//
cancle_del:false,
cartList:[],//
isChooseAll:false,//
isDang:0,//item
newList:[],//
delIndex:[],//ID
page:1,
size:10,
isScore:'',
vision:false,
isShowP:false,
timeout:null
}
},
onShow() {
this.$toolAll.tools.isLogin();
uni.removeStorageSync('orderList');
},
onShareAppMessage() {
var shareObj = {
path: `/pagesA/shopCart/shopCart?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
options.isScore=='score' ? this.isScore = 'score' : ''
this.checkList();
},
computed:{
allPrice(){
let sum = 0
this.cartList.forEach(item=>{
if(item.isActive) sum += item.price*1 * item.num
})
return sum;
},
},
methods: {
//
inputNum(e,index){
clearTimeout(this.timeout);
let str = e.detail.value;
this.timeout = setTimeout(()=>{
if(str=='' || str==0){
this.cartList[index].num = 1;
}
},500)
},
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkList(){//
this.$requst.post('order/shopping-cart',{page:this.page,size:this.size,type:this.isScore}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let nprice = '';
item.is_score ==1 ? nprice = item.score : nprice = item.sku.sku_price/100;
let obj = {
id:item.id,
spu_id:item.spu.id,
spu_activity_id:item.spu_activity_id,//id
imgSrc:this.$http + item.spu.spu_cover,
coding:item.sku.coding,
title:item.spu_name,
sku_name:item.sku.sku_name,
price:nprice,//
num:item.num,
isActive:false,
is_score:item.is_score,//
group_id:0//0 1 2
}
this.cartList.push(obj)
})
}
}
})
},
deltItem(index){//
this.$requst.post('order/shopping-cart-del',{id:this.cartList[index].id}).then(res=>{
if(res.code==0){
this.cartList.splice(index,1);
this.$toolAll.tools.showToast('删除成功');
}
})
},
deladdEvent(cur,index){//
if(index==0){//
if(this.cartList[cur].num>1) this.cartList[cur].num--;
} else {//
this.cartList[cur].num++;
}
this.$requst.post('order/shopping-cart-change-num',{id:this.cartList[cur].id,num:this.cartList[cur].num}).then(res=>{})
this.zanList();
},
chooseItem(index){//
this.cartList[index].isActive = !this.cartList[index].isActive;
let one = this.cartList.filter(function(item){
return item.isActive == false;
})
one.length==0 ? this.isChooseAll = true : this.isChooseAll = false
this.zanList();
},
chooseAll(){//
this.isChooseAll = !this.isChooseAll;
this.cartList.forEach(item=>{
this.isChooseAll ? item.isActive = true : item.isActive = false;
})
this.zanList();
},
zanList(){//
this.delIndex = []
this.newList = this.cartList.filter(item=>item.isActive==true);
if(this.cancle_del){
this.cartList.filter((item,index)=>{
if(item.isActive) {
this.delIndex.push(item.id);
}
});
}
},
delBtn(){//
this.delIndex.forEach(item=>{
this.cartList.forEach((item1,index)=>{
if(item==item1.id){
this.cartList.splice(index,1);
this.$requst.post('order/shopping-cart-del',{id:item1.id}).then(res=>{
if(res.code==0){
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
}
})
})
this.isChooseAll = false;
if(this.cartList.length==0){
this.cancle_del = false;
}
},
guanEv(index){//
index==0 ? this.cancle_del = true : this.cancle_del = false;
this.cartList.forEach(item=>item.isActive=false);
this.isChooseAll = false;
},
moveStart(index,e){//
this.isDang = index;
this.startX = e.touches[0].pageX
},
moveEnd(e){//
this.endX = e.changedTouches[0].pageX
if(this.startX-this.endX>0){
this.showDel = true;
} else this.showDel = false;
},
goGetReadyDan(){
let newUrl = '';
let isNei = '';
if(this.isScore=='score') {
isNei = 3
}
if(this.cartList.length == 0) {
if(isNei==3){
newUrl = '/pagesA/pointsMall/pointsMall';
} else {
newUrl = '/pages/tabbar/shop/shop';
}
uni.navigateTo({
url:newUrl
})
}
if(this.cartList.length > 0) {
uni.setStorageSync('orderList',this.newList);
if(this.newList.length==0){
this.$toolAll.tools.showToast('请选择要支付的商品');
} else {
uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan?isNei=${isNei}`
})
}
}
},
goShoptDetail(id,is_activity){
// &isIntegral=${this.dataList[index].isIntegral}
if(this.isScore=='score'){
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=true`
})
} else {
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&is_activity=${is_activity}`
})
}
}
}
}
</script>
<style>
page {
background-color: #F5F5F5;
}
</style>

View File

@ -1,189 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'签到管理'" :statusTitle="true"></status-nav>
<view v-if="loading" :style="{paddingTop: statusHNH+'px'}" class=" fon28 col3">
<view style="position: sticky;z-index: 3;background: #FFFFFF;padding-bottom: 20rpx;" :style="{top:statusHNH+'px'}">
<view class="posir">
<image class="posia width100" src="/static/public/sign-01.png" mode="widthFix"></image>
<view class="posir tc pad-sx20" style="z-index: 5;">
<image v-if="isSigin==0" @tap="siginEv" src="/static/public/sign-02.png" mode="" class="sigin-img"></image>
<image v-else src="/static/public/sigined.png" mode="" class="sigin-img"></image>
<view class="fon20 colf mar-s20">在连续签到可获得积分</view>
<view class="disjcac mar-sx30">
<image src="/static/public/sign-03.png" class="sigin-success" mode=""></image>
<view class="bold colf mar-z10 fon56">{{user_score}}</view>
</view>
<view class="disjb pad-zy30">
<view v-for="(item,index) in timeList" :key="index" class="disjcac fc">
<view class="disjcac fon24 posir sigin-day" :style="{color:item.isSign?'#789CFB':'#FFFFFF',background:item.isSign?'#FFFFFF':''}">
+{{item.num}}
<image v-if="item.isSign==1" class="posia" src="/static/public/gou.png" mode=""></image>
</view>
<view class="fon28 colf mar-s20">{{item.day}}</view>
</view>
</view>
</view>
</view>
<view class="mar-s20 fon28 col3 bold mar-z50">积分签到</view>
</view>
<!-- 获取列表提现列表 -->
<view class="pad-zy30">
<view class="bacf pad-zy20 pad-x20 radius20">
<scroll-view scroll-y="true" v-if="dataList.length!=0">
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
<view>
<view class="fon26 col3">{{item.title}}</view>
<view class="mar-s10 fon20 col9">{{item.time}}</view>
</view>
<view class="fon36 bold pcol">+{{item.num}}</view>
</view>
</scroll-view>
<view v-else class="fon24 col6 tc pad-s50">暂无积分签到</view>
</view>
</view>
</view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
timeList:[],
dataList:[
// {title:'',time:'2021.09.06 10:30:10',num:'1'},
],
user_score:0,//
page:1,
size:10,
total:'',//
isZanw:true,
isSigin:0,
loading:false,
vision:false,
isShowP:false,
}
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkTime()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000,'bottom')
this.isZanw = false
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesA/signIn/signIn?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin();
this.checkTime();
this.checkList();
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
siginEv(){
this.$toolAll.tools.showToast('正在签到...');
this.$requst.post('sign/online-singIn').then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('签到成功');
this.checkTime();
this.checkList();
} else {
this.$toolAll.tools.showToast(res.msg);
}
})
},
checkTime(){
this.$requst.post('sign/online-sign-record',{page:this.page,size:this.size}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.length!=0){
res.data.forEach(item=>{
let obj = {
title:'签到积分',
time:item.created_at,
num:item.score
}
this.dataList.push(obj);
})
}
}
})
},
checkList(){
this.$requst.post('sign/mini-load').then(res=>{
if(res.code==0){
this.timeList = [];
for (let key in res.data.sign_record) {
let obj = {
num:res.data.sign_record[key].record,
day:res.data.sign_record[key].key,
isSign:res.data.sign_record[key].is_sign
}
this.timeList.push(obj)
// console.log(key);
}
this.isSigin = res.data.today_sign_in;//0 1
this.user_score = res.data.user_score;
setTimeout(()=>{
this.loading = true;
},1000)
}
// console.log(res);
})
}
}
}
</script>
<style>
page{background-color: #FFFFFF;}
</style>

View File

@ -1,213 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'投诉与建议'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20">
<view class="bacf mar-s25 pad-zy20 radius20 fon28 col3 pad-x40">
<!-- 问题类型 -->
<view class="disac pad-s32">
<view class="flexs mar-y20 titlel">问题类型</view>
<radio-group @change="changeCate" class="width100 disac">
<label class="radio disac">
<radio style="transform: scale(.7);" :value="2" checked color="#3875f6"/><text>改进意见/建议</text>
</label>
<label class="radio disac">
<radio style="transform: scale(.7);" :value="1" color="#3875f6"/><text>投诉</text>
</label>
</radio-group>
<!-- <radio-group @change="changeCate" class="width100 disac">
<label class="radio disac" v-for="(iteml,indexl) in xialone" :key="indexl">
<radio style="transform: scale(.7);" :value="iteml.id" :checked="indexl==0" color="#3875f6"/><text>{{iteml.title}}</text>
</label>
</radio-group> -->
<!-- 下拉列表 -->
<!-- <view @tap="openXial" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{category}}</view>
<image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isZhuan" class="posia bacf radius10 xial-box">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl)" :class="xialCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in xialone" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view> -->
</view>
<!-- 建议意见 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs mar-s20 titlel">意见建议</view>
<view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;">
<textarea v-model="tmsg" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请把您的意见及建议填写在这里" placeholder-style="color:#999999;"/>
</view>
</view>
<!-- 姓名 -->
<view class="disac mar-s30">
<view class="mar-y20 flexs titlel disjb">
<view></view>
<view class="mar-y10"></view>
</view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="tname" class="fon28 height-68" type="text" value="" placeholder="我们怎么称呼您" placeholder-style="color:#999999;"/>
</view>
</view>
<!-- 联系电话 -->
<view class="disac mar-s20">
<view class="mar-y20 flexs titlel">联系电话</view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="tphone" maxlength="11" class="fon28 height-68" type="text" value="" placeholder="请输入联系电话" placeholder-style="color:#999999;"/>
</view>
</view>
<!-- 底部按钮 -->
<view @tap="submit" class="fon30 radius20 tc colf bold0 btnl" :style="{background:publicColor}">{{btnCon}}</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :isCenter="true" :contentVal="'提交成功!等待审核'" :comfrimVal="'好的'" @comfirmev="comfirmev"></pu-po>
</view>
<!-- 底部客服 -->
<!-- <public-customer :nright="20" :nbottom="100"></public-customer> -->
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='-1'></foot-tab>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isShowT:false,
category:'',
tname:'',//
tphone:'',//
tmsg:'',//
touId:'',
isZhuan:false,
xialCurrent:0,
xialone:[],
btnCon:'立即提交',
titleList:[],//tab
imgList:[],//tab
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkCate();
this.tphone = uni.getStorageSync('phone');
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: {
changeCate(e){
console.log(e.detail.value);
this.touId = e.detail.value;
},
checkCate(){
this.$requst.post('user/feedback-types').then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let obj = {
id:item.id,
title:item.title
}
this.xialone.push(obj)
})
this.category = this.xialone[0].title
this.touId = this.xialone[0].id
}
}
},error=>{})
},
submit(){
if(!this.tmsg){
this.$toolAll.tools.showToast('请输入意见及建议')
} else if(this.$toolAll.tools.isPhone(this.tphone)){
this.$toolAll.tools.showToast('请输入正确的手机号')
} else {
this.eventEv();
}
},
eventEv(){
let parmas = {
type_id:this.touId,
content:this.tmsg,
user_name:this.tname,
user_phone:this.tphone
}
if(this.btnCon == '立即提交'){
// this.$toolAll.tools.showToast('...')
this.btnCon = '正在提交...'
this.$requst.post('user/add-feedback',parmas).then(res=>{
// uni.hideToast()
if(res.code==0){
this.isShowT = true
} else {
this.btnCon = '返回'
this.$toolAll.tools.showToast(res.msg)
}
},error=>{})
} else {
uni.navigateBack({delta:1})
}
},
comfirmev(){
uni.navigateBack({delta:1})
},
openXial(){
this.isZhuan = !this.isZhuan
// console.log('');
},
chooseXia(index){
this.xialCurrent = index
this.btnCon = '立即提交'
this.category = this.xialone[index].title
this.touId = this.xialone[index].id
},
}
}
</script>
<style>
</style>

View File

@ -222,9 +222,7 @@
this.checkAbout(this.cateListTwo[index].id)
},
goDetail(index){
uni.navigateTo({
url:'/pagesB/articleDetail/articleDetail?id='+this.dataList[index].id +"&category_id="+this.category_id
})
},
backTop(){//
uni.pageScrollTo({

View File

@ -1,288 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'详情'" :statusTitle="true"></status-nav>
<view v-if="isLoading" :style="{paddingTop: statusHNH+'px'}" class="pad-zy32 pad-x180">
<view class="fon36 col3 bold mar-sx20" style="line-height: 50rpx;">{{detailObj.title}}</view>
<view class="disac mar-x20">
<image :src="headImg" style="width: 60rpx;height: 60rpx;border-radius: 100%;" mode="aspectFill"></image>
<view class="mar-z10">
<view class="fon28 col3">{{name}}</view>
<view class="fon20 col9" style="margin-top: 6rpx;">{{detailObj.published_at}}发布</view>
</view>
</view>
<!-- 内容详情 -->
<view class="fon28" style="color: #1A1A1A; line-height: 40rpx;">
<!-- <image class="mar-x20" src="/static/public/banner.png" style="height: 400rpx;width: 100%;" mode=""></image> -->
<!-- <view style="margin-bottom:50rpx;">屋基寨位于阿坝茂县松坪沟是典型的羌族聚居区有着鲜明的价值观和民族文化屋基寨美景屋基寨美景</view>
<view style="margin-bottom:50rpx;">山寨海拔3000米以上有川西独特的自然景色但是海拔高地势陡各类资源匮乏居民收入单一屋基寨地貌屋基寨地貌</view>
<view style="margin-bottom:50rpx;">成都恒美毛发医疗美容总经理徐军挺了解到当地居民希望发展旅游增加收入时便立即驱车前往屋基寨村民着盛装迎接恒美一行村民着盛装迎接恒美一行</view>
<view style="margin-bottom:50rpx;">徐军挺总经理建议做强乡村旅游要完善基础设施同时要保持乡村建筑风貌和地域文化特色还要完善服务标准提升消防安全水平</view>
<view style="margin-bottom:50rpx;">打造乡村旅游品牌形成示范带动作用参观了解村民居住环境参观了解村民居住环境了解村民们的生活习俗风土人情了解村民们的生活习俗风土人情</view> -->
<rich-text :nodes="content"></rich-text>
</view>
<!-- 导航 -->
<view class="mar-s50 pad-s10">
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" :isCenter="cateListTwo.length<=4?false:true" :newbmo="'#F5F5F5'" @choosecateEv="chooseTwo" :newcateList="cateListTwo"></cate-pu>
</view>
<!-- 列表 -->
<view v-if="dataList.length!=0" class="mar-x20">
<view @tap="goDetail(index)" class="pad-sx30 width100 disjb bbot" v-for="(item,index) in dataList" :key="index">
<view class="disjb fc">
<view class="fon30 col3 clips2" style="height: 84rpx;">{{item.title}}</view>
<view class="fon24 col9 mar-s25">{{item.time}}</view>
</view>
<image v-if="item.imgSrc!=''" class="flexs mar-z30" style="width: 140rpx;height: 140rpx;" :src="item.imgSrc" mode="aspectFill"></image>
</view>
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 20%;">
<image class="zanw-img" src="/static/public/zanwn.png" mode="aspectFill"></image>
<view class="fon24 col3">暂无内容</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.png" mode="aspectFill"></image>
</view>
<view class="disac fon28 colf">
<view @tap="lianK" class="disac posir lianShare" style="background-color: #3875F6; border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;">
<image src="/static/public/bottom-customer.png" class="mar-zy20" style="width: 47rpx;height: 47rpx;" mode="aspectFill"></image>
<view>联系客服</view>
<button v-if="haveImg" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact"></button>
</view>
<view @tap="shareEv" class="disac posir lianShare" style="background-color: #38CE51;border-top-right-radius: 51rpx;border-bottom-right-radius: 51rpx;">
<image src="/static/public/bottom-shear.png" style="width: 47rpx;height: 47rpx;margin-left: 15rpx;margin-right: 8rpx;" mode="aspectFill"></image>
<view>分享给好友</view>
<button v-if="haveImg" class="posia" open-type="share" style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;"></button>
</view>
</view>
</view>
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
headImg:'/static/public/like.png',
name:'恒美植发',
time:'2021-07-14 08:22',
showTop:false,
detailObj:{},//
content:'',//
isLoading:false,
haveImg:true,
detailId:'',//ID
invite_code:'',
newCurrent:0,
cateListTwo:[],
dataList:[],
category_id:0,
size:10,
page:1,
total:'',//
isZanw:true,
vision:false,
isShowP:false,
}
},
onShareAppMessage(res) {
var ya = this;
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
c:this.detailObj.id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
var shareObj = {
     title: `${ya.detailObj.title}`, // (slogan)
     path: `/pagesB/articleDetail/articleDetail?id=${this.detailId}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
     imageUrl: ''//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
},
onLoad(options) {
this.checkDetail(options.id)
this.detailId = options.id
this.category_id = options.category_id
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
console.log(options,'参数');
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkAbout(this.category_id)
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkAbout(this.category_id)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkAbout(category_id){
let params = {
category_id:category_id,
page:this.page,
size:this.size
}
this.$requst.post('archives/about',params).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.cateListTwo.length==0){
if(res.data.category.length!=0){
res.data.category.forEach((item,index)=>{
let cateObj = {
id:item.id,
mode_id:item.mode_id,
title:item.title
}
this.cateListTwo.push(cateObj)
if(this.category_id==item.id) this.newCurrent = index
})
}
}
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 newImg = ''
if(item.cover=='') newImg = '/static/public/logo.png'
else newImg = this.$http + item.cover
let aobj = {
id:item.id,
title:item.title,
time:item.published_at,
imgSrc:newImg
}
if(this.detailId!=item.id) this.dataList.push(aobj)
})
}
}
},error=>{})
},
chooseTwo(index){//
this.newCurrent = index
// console.log('',index);
this.isZanw = true
this.page = 1
this.category_id = this.cateListTwo[index].id
this.checkAbout(this.cateListTwo[index].id)
},
goDetail(index){
uni.navigateTo({
url:'/pagesB/articleDetail/articleDetail?id='+this.dataList[index].id +"&category_id="+this.category_id
})
},
moveHandle(){//
return false
},
getphonenumber(e){//
if(e.detail.errMsg=="getPhoneNumber:ok"){
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
// console.log('',res);
if(res.code==0){
this.isShowP = false
this.$toolAll.tools.showToast('手机号绑定成功','success')
}
},error=>{})
} else {
this.isShowP = false
}
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cancleEv(e){//
if(e==0) this.vision = false
},
backHome(){
uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome'
})
},
lianK(){//
// if(!this.jieDuan){
// let isAuth = this.$toolAll.tools.returnAuth()
// if(!isAuth){
if(this.haveImg == false) {
this.vision = true
} else {
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
let maiOjb = {
e:5,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
}
// } else this.jieDuan = true
// }
},
shareEv(){
if(this.haveImg == false) {
this.vision = true
}
},
checkDetail(id){
this.$requst.post('archives/detail',{id:id}).then(res=>{
// console.log('',res);
if(res.code==0){
this.detailObj = res.data.detail
this.content = this.$toolAll.tools.escape2Html(res.data.detail.content)
uni.hideToast()
this.isLoading = true
}
},error=>{})
}
}
}
</script>
<style>
</style>

View File

@ -1,53 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'我的二维码'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32">
<image :src="imgSrc" class="mar-s32" style="width: 100%;" mode="widthFix"></image>
<view v-if="isBtn" @tap="sendImg" class="fon40 bold colf mar-z10 radius20 tc" style="height: 90rpx;margin: 80rpx;background-color: #38CE51;line-height: 90rpx;"></view>
</view>
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
</view>
</template>
<script>
import {base64ToPath} from '@/jsFile/base64-src.js';
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
imgSrc:'',
isBtn:false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkImg()
},
methods: {
checkImg(){
this.$requst.post('user/service-qr').then(res=>{
// console.log('',res);
if(res.code==0){
base64ToPath(res.data.qr).then(path => {
this.imgSrc = path
this.isBtn = true
}).catch(error => {})
}
},error=>{})
},
sendImg(){
wx.showShareImageMenu({
path: this.imgSrc
})
}
}
}
</script>
<style>
</style>

View File

@ -1,171 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'客服查询'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
<input class="fon28 width100" type="text" @confirm="searchEv" v-model="keyword" placeholder="客户的手机号/微信昵称查找" placeholder-style="color: #B3B3B3;" />
</view>
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
<!-- 列表 -->
<view class="bacf radius10 pad20 mar-x20 fon28" v-for="(item,index) in dataList" :key="index">
<view class="col3 bold">客户信息</view>
<view class="mar-sx20 fon24 disjbac col6">
<text class="clips1">昵称{{item.customer_name}}</text>
<text class="flexs mar-z20"><text v-if="item.customer_phone!=''">{{item.customer_phone}}</text><text v-else></text></text>
</view>
<view class="col3 bold">绑定的客服</view>
<view v-if="item.service!=null" class="mar-s20 fon24 disjbac col6">
<text class="clips1">昵称{{item.service.name}}</text>
<text class="flexs mar-z20" v-if="item.service.phone!=''">{{item.service.phone}}</text>
</view>
<!-- <view v-else class="mar-s20 fon24 disjbac col6">
<text>昵称{{item.account.nickname}}</text>
<text><text v-if="item.account.mobile!=''">{{item.account.mobile}}</text><text v-else></text></text>
</view> -->
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view>
<!-- 返回顶部 -->
<back-top :showTop="showTop" @backTop="backTop"></back-top>
</view>
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
dataList:[],//
showTop:false,//
keyword:'',//
page:1,
size:10,
total:'',//
isZanw:true,
ntype:'',// mine=
vision:false,
isShowP:false,
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkList()
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多客服数据')
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/customerCheck/customerCheck?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkList()
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
if(e) {
this.vision = false
this.isShowP = true
}
},
searchEv(){//
if(this.keyword!='') this.ntype = ''
this.page = 1
this.isZanw = true
this.checkList()
},
checkList(){//
let params = {
page:this.page,
size:this.size,
type:this.ntype,//ID
keyword:this.keyword
}
this.$requst.post('user/get-bind-service-list',params).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
id:item.account_id,
customer_name:item.nickname,
customer_phone:item.mobile,
service:item.service,
// staff:item.staff,//
// account:item.account//staff
}
this.dataList.push(obj)
})
}
}
},error=>{})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
</style>

View File

@ -1,380 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'客户列表'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 pad-x20">
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view @tap="openXial" class="disjbac width100 radius10 pad-zy20 xialak posir">
<view class="" style="color: #B3B3B3;">{{category}}</view>
<image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<!-- 下拉列表 -->
<view v-if="isZhuan" class="posia bacf radius10 xial-box">
<input @tap.stop="entryEv" @confirm="searchEv" type="text" class="pad20" v-model="searchVal" placeholder="请输入昵称/姓名/手机" />
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl)" :class="xialCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in xialone" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view>
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
<!-- 列表 -->
<view v-if="dataList.length!=0" class="dis bacf radius10 pad20 mar-x20 posir" v-for="(item,index) in dataList" :key="index">
<image class="mar-y20 flexs" :src="item.imgSrc" style="width: 98rpx;height: 98rpx;" mode="aspectFill"></image>
<view class="fon24 col3 width100 mar-x40" style="margin-bottom: 120rpx;">
<view class="bold disjbac">
<view class="fon28 clips1">{{item.name}}</view>
<view class="flexs">来源{{item.come}}</view>
</view>
<view style="margin: 15rpx 0;" @tap="copyPhone(item.phone)">{{item.phone || ''}}</view>
<view>客服{{item.service || '暂无'}}</view>
<view class="col80 disjbac" style="margin: 15rpx 0 0 0;">
<view>{{item.time}}</view>
<view class="col3">{{item.qudao}}</view>
</view>
</view>
<!-- 真实姓名 -->
<view class="posia col3 fon24 radius10 tc" style="left: 20rpx;bottom: 100rpx;">姓名{{item.real_name || '暂无'}}</view>
<!-- 分配客服 -->
<!-- <view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;top: 80rpx;z-index: 1;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}"></view> -->
<view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;top: 80rpx;z-index: 1;" :style="{background:publicColor}">分配客服</view>
<!-- 设置标签 -->
<view @tap="tuneUpTag(index)" v-if="item.isTag" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;bottom: 20rpx;z-index: 1;" :style="{background:publicColor}"></view>
<view class="fon24 col3 posia bold disac" style="bottom: 60rpx;left: 20rpx;right: 20rpx;"><text class="flexs">标签</text>
<block v-if="item.tags.length">
<scroll-view scroll-x style="max-width: 60%;">
<view class="disac"><view v-for="(item1,tagIndex) in item.tags" :key="tagIndex" class="pcol pad-zy10 flexs">{{item1}}</view></view>
</scroll-view>
</block>
<block v-else class="col9"></block>
</view>
<view class="fon24 col3 posia clips1 bold" style="bottom: 20rpx;left: 20rpx;right: 20rpx;max-width: 70%;">详细来源{{item.source_detail}}</view>
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view>
<!-- 分配客服弹框 -->
<pu-po :category="xialtList" @chooseXiaT="chooseXiaT" :isXiala="true" :isShowT="isShowT" :clearVal="'暂不分配'" :comfrimVal="'立即分配'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 设置标签弹框 -->
<!-- <pu-po :category="tagList" @chooseXiaT="chooseTag" :isXiala="true" :isTag="true" :isShowT="isShowTag" :clearVal="'暂不设置'" :comfrimVal="'立即设置'" @comfirmev="comfirmevTag" @cancleev="cancleevTag"></pu-po> -->
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
<view v-if="isShowTag" class="disjcac posAll" @tap="closeXial">
<view class="bacf radius20 width100 tank-box">
<view class="pad-x20">
<view class="mar-s30 mar-x40 tc">请选择标签</view>
<view @tap.stop="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir">
<view class="col3 disac width100"><input class="width100 mar-y20" disabled v-model="tagStr"></view>
<image :class="isZhuan1?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<!-- 下拉列表 -->
<view v-if="isZhuan1" class="posia bacf radius10 xial-box">
<!-- 标签下拉 -->
<view class="pad-zy20 xial-item-box">
<view @tap.stop="chooseXiaTag(index)" class="disac" :class="item.checked?'pcol':''" v-for="(item,index) in tagList" :key="index">
<view v-if="" class="disac">
<checkbox style="width: 60rpx;height: 60rpx;display: inherit;" color="#3875F6" :data-id="item.id" :checked="item.checked" />
</view>
{{item.title}}
</view>
</view>
</view>
</view>
</view>
<view class="disjb fon28 colf pad-x30 pad-zy30 tc">
<view @tap="cancleevTag" class="pad-sx20 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不设置</view>
<view @tap="comfirmevTag" :style="{background:publicColor}" class="pad-sx20 radius10 tank-btn">立即设置</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
category:'',
dataList:[],
showTop:false,
isShowT:false,
isXiala:true,
isZhuan:false,
isZhuan1:false,
xialCurrent:0,
xialone:['全部'],
xialtList:[],
staff_id:'',//ID
customer_id:'',//ID
page:1,
size:10,
total:'',
isZanw:true,
ntype:'all',
tagList:[],
tag_id:'',
isShowTag:false,
tagId:'',
searchVal:'',
tagIds:[],
tagVal:[],
tagStr:'',
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
// for (let i = 0; i < 4; i++) {
// let obj = {imgSrc:'/static/public/like.png',name:'USER',come:'',phone:'18888888888',customer:'-01',time:'2021-07-15 14:25',qudao:''}
// this.dataList.push(obj)
// }
if(this.total!=this.dataList.length){
this.page++
this.checkCL(this.ntype)
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表数据')
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkKF()//
this.checkCL()//
this.checkLY()//
this.obtainTag();//
},
methods: {
//
copyPhone(e){
uni.setClipboardData({
data: e,//
success:(res) => {
uni.showToast({title:'复制成功' })
}
});
},
//
closeXial(){
// this.isShowTag = false;
this.isZhuan1 = false;
},
openXia(){
this.isZhuan1 = !this.isZhuan1
},
//
chooseXiaTag(index){
let isexistence = this.tagIds.indexOf(this.tagList[index].id);
this.tagList[index].checked = !this.tagList[index].checked;
if(isexistence!=-1){
this.tagIds.splice(isexistence,1);
this.tagVal.splice(isexistence,1)
} else {
this.tagIds.push(this.tagList[index].id)
this.tagVal.push(this.tagList[index].title)
}
this.tagStr = this.tagVal.join(',');
this.tagId = this.tagIds.join(',');
//
if(this.tagIds.length==this.tagList.length){
this.isAll = true;
} else this.isAll = false;
if(!this.tagIds.length) {
this.tagStr = '请选择'
}
},
obtainTag(){//
this.$requst.post('user/tag-list').then(res=>{
// console.log('',res);
if(res.code==0){
this.tagList = [];
if(res.data.length!=0){
res.data.forEach(item=>{
let xuan = false;
let obj = {
title:item.name,
id:item.id,
checked:xuan
}
this.tagList.push(obj)
})
}
}
},error=>{})
},
//
tuneUpTag(index){
// console.log('');
this.isShowTag = true
this.tagStr = '';
this.tagId = '';
this.tagIds = [];
this.tagVal = [];
this.tagList.forEach((item,v)=>{
item.checked = false;
if(this.dataList[index].tags.length) {
this.dataList[index].tags.forEach(item1=>{
if(item.title == item1){
this.tagList[v].checked = true;
}
})
if(item.checked){
this.tagIds.push(item.id);
this.tagVal.push(item.title)
}
}
})
this.tagStr = this.tagVal.join(',');
this.tagId = this.tagIds.join(',');
//
this.customer_id = this.dataList[index].id//ID
if(this.tagList.length==0) this.tagList = ['暂无可设置的标签']
},
checkKF(){//
this.$requst.post('user/servicer-list').then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let obj = {
title:item.name,
id:item.id
}
this.xialtList.push(obj)
})
this.staff_id = this.xialtList[0].id
}
}
},error=>{})
},
searchEv(){//
this.page = 1;
this.isZanw = true;
this.checkCL(this.ntype)
},
checkLY(){//
this.$requst.post('user/channel').then(res=>{
// console.log('',res);
if(res.code==0){
for (let key in res.data) {
let lyObj = {
title:res.data[key],
name:key
}
this.xialone.push(lyObj)
}
this.xialone.unshift({title:"全部",name:'all'})
this.category = this.xialone[0].title
}
},error=>{})
},
checkCL(ntype){//
this.$requst.post('user/customer',{page:this.page,size:this.size,type:ntype,keyword:this.searchVal}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
this.total = res.data.total
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let cuObj = {
id:item.id,
imgSrc:item.headimgurl,
name:item.nickname,
come:item.channel_text,
phone:item.mobile,
customer:item.service[0],
time:item.created_at,
qudao:item.tag[0],
service:item.service,
source_detail:item.source_detail,
tags:item.tag,
isTag:!item.tag.includes('员工'),
real_name:item.real_name
}
this.dataList.push(cuObj);
})
}
this.isZhuan = false;
} else this.$toolAll.tools.showToast(res.msg)
},error=>{})
},
fenCustomer(index){//
// console.log('');
this.isShowT = true
//
this.customer_id = this.dataList[index].id//ID
if(this.xialtList.length==0) this.xialtList = ['暂无可分配客服']
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
comfirmev(){//
// console.log('');
this.isShowT = false
this.$requst.post('user/customer-allot',{staff_id:this.staff_id,customer_id:this.customer_id}).then(res=>{
// console.log(':',res);
if(res.code==0){
this.page = 1
this.$toolAll.tools.showToast('分配成功')
this.checkCL(this.ntype)//
} else this.$toolAll.tools.showToast(res.msg)
},error=>{})
},
//
comfirmevTag(){
this.$toolAll.tools.showToast('设置中...')
// console.log('');
this.$requst.post('user/set-tags',{tag_ids:this.tagId,ids:this.customer_id}).then(res=>{
// console.log(':',res);
if(res.code==0){
this.page = 1
this.$toolAll.tools.showToast('设置成功')
this.obtainTag();
this.isShowTag = false
this.checkCL(this.ntype)//
} else this.$toolAll.tools.showToast(res.msg)
},error=>{})
},
cancleev(){
this.isShowT = false
},
//
cancleevTag(){
this.isShowTag = false
},
openXial(){
this.isZhuan = !this.isZhuan
this.searchVal = '';
// console.log('');
},
chooseXia(index){
this.xialCurrent = index;
this.ntype = this.xialone[index].name;
this.category = this.xialone[index].title;
},
chooseXiaT(e){
this.staff_id = e.id
},
entryEv(){
this.isXiala = true;
}
}
}
</script>
<style>
</style>

View File

@ -1,177 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'医生'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
<view class="radius20 fon28 col3 mar-s20">
<view class="disac">
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
<input class="fon28 width100" @confirm="searchEv" type="text" v-model="keyword" placeholder="请输入问题/病种/医生姓名" placeholder-style="color: #B3B3B3;" />
</view>
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
</view>
<view class="pad-zy20 mar-sx30 pad-x180">
<!-- 列表 -->
<view class="fon28 col3 bold qdoctor disac">全部医生</view>
<view class="mar-s30" v-if="dataList.length!=0">
<!-- 医生列表 -->
<list-doctor :list="dataList"></list-doctor>
</view>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view v-if="keyword!=''" class="fon24 col3"></view>
<view v-if="keyword==''" class="fon24 col3"></view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
<!-- 底部客服 -->
<!-- <public-customer :nbottom="120"></public-customer> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<!-- 底部导航 -->
<view class="posixzy">
<bottom-tab></bottom-tab>
</view>
</view>
</template>
<script>
import listDoctor from '@/components/list-doctor.vue';
import bottomTab from '@/components/bottom-tab.vue';
export default {
components:{
listDoctor,
bottomTab
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
dataList:[
// {imgSrc:'/static/public/doctor.png',name:'',cyear:'16',bmen:'',zcheng:'',goodAt:''},
// {imgSrc:'/static/public/doctor.png',name:'',cyear:'16',bmen:'',zcheng:'',goodAt:''},
// {imgSrc:'/static/public/doctor.png',name:'',cyear:'16',bmen:'',zcheng:'',goodAt:''},
// {imgSrc:'/static/public/doctor.png',name:'',cyear:'16',bmen:'',zcheng:'',goodAt:''},
// {imgSrc:'/static/public/doctor.png',name:'',cyear:'16',bmen:'',zcheng:'',goodAt:''},
],
showTop:false,
page:1,
size:20,
total:'',//
isZanw:true,
keyword:'',
vision:false,
isShowP:false,
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/doctor/doctor?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkDor()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
},
onShow() {
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkDor()
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkDor(){//
this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
if(res.data.list.length!=0){
this.total = res.data.total
res.data.list.forEach(item=>{
let newG = item.diseases
let ndeptName = ''
if(item.doctor_extra.dept_name==undefined || item.doctor_extra.dept_name=='') ndeptName = item.dept_name
else ndeptName = item.doctor_extra.dept_name
let dObj = {
id:item.id,
imgSrc:item.doctor_extra.headimg,//
name:item.doctor_extra.name,//
cyear:parseFloat(item.doctor_extra.work_time),//
bmen:ndeptName,//
zcheng:'主任医师',
goodAt:item.diseases,
show_detail:item.doctor_extra.show_detail//10
}
this.dataList.push(dObj)
})
}
}
},error=>{})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
searchEv(){
this.checkDor()
}
}
}
</script>
<style>
</style>

View File

@ -1,279 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'医生'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class=" pad-x180">
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-y32 pad-x40">
<view class="disjb">
<image class="radius10 flexs mar-z30" :src="doctorObj.doctor_extra.headimg || moImg" style="width: 300rpx;height: 300rpx;" mode="aspectFill"></image>
<view class="pad-z20 width100">
<view class="fon28 bold col3">{{doctorObj.doctor_extra.name}}</view>
<!-- <view class="disac col80 fon24" style="margin: 6rpx 0;">
<view>{{['未知','男','女'][doctorObj.gender]}}</view>
<view class="doctorx"></view>
<view>从业{{parseFloat(doctorObj.doctor_extra.work_time)}}</view>
<view v-if="doctorObj.doctor_extra.dept_name!='' && doctorObj.doctor_extra.dept_name!=undefined" class="doctorx"></view>
<view>{{doctorObj.doctor_extra.dept_name}}</view>
</view> -->
<view class="col80 fon24">
<view class="flexs">擅长领域</view>
<view class="dis fw">
<view class="flexs" v-for="(item,index) in doctorObj.diseases" :key="index" style="background-color: #F5F5F5;border-radius: 10rpx;padding: 6rpx 10rpx;margin-top: 10rpx;margin-right: 10rpx;">
<text class="bold pcol">{{item.disease_name}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="mar-z32">
<view class="bbot mar-s30"></view>
<view class="fon28 bold col3 mar-sx20">医生简介</view>
<rich-text class="fon26 col3" :nodes="peopleJian"></rich-text>
</view>
<view class="mar-z32">
<view class="bbot mar-s30"></view>
<view class="fon28 bold col3 mar-sx20">医生详情</view>
<rich-text class="fon26 col3" :nodes="detailInfo"></rich-text>
</view>
</view>
<view id="daoh" :class="isTop?'isTop':''" class="isTops" :style="{top:(statusHNH-10)+'px'}">
<view class="bacf pad-zy32 mar-s20 pad-sx20">
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" @choosecateEv="chooseTwo" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
</view>
</view>
<view class="mar-zy32 mar-s20" v-if="dataList.length!=0"><list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="dataList"></list-pu></view>
<view style="margin-top: 8%;" v-if="dataList.length==0"><list-pu :list="dataList"></list-pu></view>
</view>
<view class="pad-zy20 mar-sx30">
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
<!-- 底部客服 -->
<!-- <public-customer :nbottom="100"></public-customer> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<!-- 底部导航 -->
<view class="posixzy">
<bottom-tab></bottom-tab>
</view>
</view>
</template>
<script>
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
import bottomTab from '@/components/bottom-tab.vue';
export default {
components:{
bottomTab
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
cateList:[
// {title:''},
// {title:''},
// {title:''},
// {title:''},
],
dataList:[
],
showTop:false,
newCurrent:0,
category_id:0,//ID
moImg:'/static/public/logo.png',
doctorObj:{},//
page:1,
size:10,
total:'',//
isZanw:true,
chuTop:'',
isTop:false,
isLoading:false,
detailInfo:'',
peopleJian:'',
vision:false,
isShowP:false,
doctorId:''//id
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/doctorDetail/doctorDetail?invite_code=${uni.getStorageSync('invite_code')}&doctor_id=${this.doctorId}`, // /
};
return shareObj;
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
if((this.chuTop - this.statusHNH) - e.scrollTop*1 <= 0) this.isTop = true
else this.isTop = false
},
onReachBottom() {//
// console.log(this.total,this.dataList.length);
if(this.total!=this.dataList.length){
this.page++
if(this.category_id==0) this.category_id = this.cateList[0].id
this.checkConList(this.category_id)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
},
onShow() {
this.checkConList(this.category_id)
},
onLoad(options) {
this.doctorId = options.doctor_id;
this.checkDoD(this.doctorId)
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => {
this.chuTop = rect.top
}).exec()
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
if(e) {
this.vision = false
this.isShowP = true
}
},
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})
},
checkDoD(doctor_id){
this.$requst.post('user/doctor-info',{doctor_id:doctor_id}).then(res=>{
// console.log('',res);
if(res.code==0){
this.doctorObj = res.data;
//
this.peopleJian = this.$toolAll.tools.escape2Html(this.doctorObj.doctor_extra.summary);
this.detailInfo = this.$toolAll.tools.escape2Html(this.doctorObj.doctor_extra.content);
this.isLoading = true;
}
},error=>{})
},
checkConList(category_id){//
let params = {
category_id:category_id,
page:this.page,
size:this.size
}
this.$requst.post('archives/hot',params).then(res=>{
if(res.code==0){
//
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 = [];
// uni.pageScrollTo({
// scrollTop:0,
// duration:0
// })
}
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);
})
}
}
},error=>{})
},
chooseTwo(index){
this.newCurrent = index
this.isZanw = true
this.page = 1
this.category_id = this.cateList[index].id
this.checkConList(this.category_id)
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
</style>

View File

@ -1,210 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'消息'" :whereCome="comeNum" :statusTitle="true"></status-nav>
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf fon28 col3 disja" :style="{top:statusHNH+'px'}">
<view @tap="switchEv(true)" :class="isWen?'isWen bold':'col9'" class="posir">日程提醒</view>
<view @tap="switchEv(false)" :class="!isWen?'isWen bold':'col9'" class="posir">消息中心</view>
</view>
<!-- 列表 -->
<view :style="{paddingTop: (statusHNH+chuTop+15)+'px'}" class="pad-zy32">
<view v-if="dataList.length!=0">
<view v-for="(item,index) in dataList" :key="index">
<view class="fon24 col6 tc mar-sx50">{{item.time}}</view>
<view @tap="readMsg(index,indexl)" class="radius10 bacf pad20 mar-x20" v-for="(iteml,indexl) in item.list" :key="indexl">
<view class="disac">
<image v-if="iteml.is_read==0" class="message-img" src="/static/public/unread.png" mode=""></image>
<image v-if="iteml.is_read==1" class="message-img" src="/static/public/read.png" mode=""></image>
<view class="fon28 col3 bold mar-zy10">{{iteml.title}}</view>
<view :style="{background:iteml.is_read==1?'rgba(204, 204, 204,1)':'#FF4D4D'}" class="message-status">{{iteml.is_read==1?'已读':'未读'}}</view>
</view>
<view v-if="iteml.content!=''" class="fon26 col3 mar-s20">{{iteml.content}}</view>
</view>
</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 50%;">
<image src="/static/public/nothingm.png" style="width: 474rpx;height: 273rpx;" mode="aspectFill"></image>
<view class="fon24 col3">暂无消息</view>
</view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
searchVal:'',//
publicColor:uni.getStorageSync('publicColor'),//
dataList:[
// {
// time:'2021-07-15 14:25',
// list:[
// {is_read:0,title:'',content:''},
// {is_read:0,title:'',content:'XX2021728 14:30'},
// {is_read:0,title:'',content:'XX2021728 14:30'},
// ]
// },
// {
// time:'2021-07-10 22:36',
// list:[
// {is_read:1,title:'',content:'XX2021728 14:30'},
// {is_read:1,title:'',content:'XX2021728 14:30'},
// {is_read:1,title:'',content:'XX2021728 14:30'},
// ]
// }
],
showTop:false,//
chuTop:'',
isWen:true,
page:1,
size:10,
total:0,
isZanw:true,
ntype:'reminders',//
comeNum:0
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkMsg()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多消息','none',1000)
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin();
},
onLoad(options) {
//
if(options.comeNum==undefined) this.comeNum = 2;
const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect);
this.chuTop = rect.height
}).exec()
if(options.index==undefined){this.isWen = false;this.ntype = 'message';}
this.checkMsg();
let that = this ;
wx.showModal({
title: '温馨提示',
content: '为及时通知到您,需要向您申请消息发送权限,不会骚扰您的生活!',
confirmText:"同意",
cancelText:"拒绝",
success: function (res) {
if (res.confirm) {
//
console.log('用户点击确定', '订阅消息授权成功');
//
wx.requestSubscribeMessage({
tmplIds: ['d0efR-Ga27c6eIvx9mAwJcnAqzhM_Sq68XiFvjvlBJM','eyxvInLLF3L_wmcSQc_O7XLKF7RoGK1dM3OwKj5fHio'],
success: (res) => {
console.log(res, 'success')
},
fail: (res) => {
console.log(res, 'fail')
},
complete: (res) => {
wx.getSetting({
withSubscriptions: true,
success: (res) => {
console.log(res, '获取设置信息')
}
})
console.log(res, 'complete')
}
})
} else if (res.cancel) {
console.log('用户点击取消', '订阅消息授权');
///
wx.showModal({
title: '温馨提示',
content: '拒绝后您将无法获得及时的消息通知哦',
confirmText:"知道了",
showCancel:false,
success: function (res) {
///
///
}
});
}
}
});
},
methods: {
readMsg(index1,index2){
this.dataList[index1].list[index2].is_read = 1;
},
checkMsg(){
this.$requst.post('user/messages',{page:this.page,size:this.size,type:this.ntype}).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let titleMsg = '';
if(item.type=='notice') titleMsg = "通知";
if(item.type=='system') titleMsg = "系统消息";
let msgObj = {
time:item.send_at,
list:[
{
is_read:item.is_read,
title:titleMsg,
content:item.content,
}
]
}
this.dataList.push(msgObj)
})
}
}
},error=>{})
},
switchEv(flag){
this.isWen = flag;
this.isZanw = true;
this.page = 1;
if(flag){
this.ntype = 'reminders';
this.checkMsg();
} else {
this.ntype = 'message';
this.checkMsg();
}
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
.isWen{color: #3875F6;}
.isWen::after{
content: '';
display: block;
height: 8rpx;
width: 80%;
position: absolute;
bottom: -20rpx;
left: 50%;
transform: translateX(-50%);
background: #3875F6;
}
</style>

View File

@ -1,449 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'收藏'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view>
<view id="daoh" class="bacf pad-zy30 pad-sx20 isTopf fon28 col3 disja" :style="{top:statusHNH+'px'}">
<view @tap="shopCollection(0)" :class="isWen?'isWen':''" class="posir">文章收藏</view>
<view @tap="shopCollection(1)" :class="!isWen?'isWen':''" class="posir">商品收藏</view>
</view>
<view :style="{paddingTop:(statusHNH+chuTop+15)+'px'}">
<view v-if="isWen">
<view class="pad-zy32 mar-x20">
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" :isCenter="false" :newbmo="'#F2F2F2'" @choosecateEv="chooseTwo" :newcateList="cateList"></cate-pu>
</view>
<view v-if="dataList.length!=0" class="pad-zy20 pad-s20">
<list-pu :radiu="true" @comfirmev="comfirmev" :list="dataList"></list-pu>
</view>
<view v-else class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/collection.png" style="" mode="aspectFill"></image>
<view class="fon24 col3">您还没有收藏快去收藏吧</view>
</view>
</view>
<view v-else>
<view v-if="shopList.length!=0" style="margin-top: -20rpx;">
<view class="pad20">
<view style="width: 48.6%;float: left;">
<view v-if="index1%2==0" v-for="(item1,index1) in shopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)">
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
<view class="posia list-like-box" @tap.stop="chooseLike(index1)">
<image class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<view class="pad-zy20 pad-s10 pad-x30">
<view class="fon28 bold col3 clips2">{{item1.title}}</view>
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
<view class="radius10 colf mar-y10" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;"></view>
</view>
<view class="disac">
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
<view v-if="item1.isIntegral" class="mar-s20">
<view>积分:{{item1.integral}}</view>
<view class="disac mar-s20" v-if="item1.grade!=0">
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>
<span v-if="item1.isXian"></span>
{{item1.zhePrice}}
</view>
</view>
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view>
<view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
<view class="disac">
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
<view style="width: 48.6%;float: right;">
<view v-if="index1%2!=0" v-for="(item1,index1) in shopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)">
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
<view class="posia list-like-box" @tap.stop="chooseLike(index1)">
<image class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<view class="pad-zy20 pad-s10 pad-x30">
<view class="fon28 bold col3 clips2">{{item1.title}}</view>
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
<view class="radius10 colf mar-y10" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;"></view>
</view>
<view class="disac">
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
<view v-if="item1.isIntegral" class="mar-s20">
<view>积分:{{item1.integral}}</view>
<view class="disac mar-s20" v-if="item1.grade!=0">
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>
<span v-if="item1.isXian"></span>
{{item1.zhePrice}}
</view>
</view>
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view>
<view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
<view class="disac">
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
</view>
</view>
<view v-if="item1.isXian" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="pu_content" @comfirmev="submitQu" @cancleev="isShowT=false"></pu-po>
</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/collection.png" style="" mode="aspectFill"></image>
<view class="fon24 col3">您还没有收藏快去收藏吧</view>
</view>
</view>
</view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
import {cancleCollectionEV,cancleCollectionShopEV} from '@/jsFile/publicAPI.js';
import shopList from '@/components/shop-list.vue';
export default {
components:{
shopList
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
dataList:[],
showTop:false,//
newCurrent:0,
cateList:[//
],
page:1,
size:10,
total:'',//
isZanw:true,
category_id:0,//ID
chuTop:'',
isWen:true,
shopList:[],
activeIndex:0,
isShowT:false,
pu_content:'是否需要取消收藏?',
page:1,
size:10,
timeList:[],//
vision:false,
isShowP:false,
collectionTime:null
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkConList(this.category_id)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
},
onUnload() {
uni.removeStorageSync('cateList');
clearInterval(this.collectionTime);
},
onHide() {
clearInterval(this.collectionTime);
},
onShow() {
this.checkConList(this.category_id);
this.shopCollection();
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/myCollection/myCollection?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect);
this.chuTop = rect.height
}).exec()
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
shopCollection(index){//
clearInterval(this.collectionTime);
if(index==1){
this.isWen = false;
uni.request({
url:`${uni.getStorageSync('hostapi')}spu/collection`,
data:{page:this.page,size:this.size},
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
this.shopList = [];
let nArr = [];
if(res.data.data.list.length!=0){
res.data.data.list.forEach(item=>{
let tuan = false,ping = false,xian = false,integral = false;
if(item.activity_type=='group_make') ping = true;
if(item.activity_type=='group_buy') tuan = true;
if(item.activity_type=='limit_time') xian = true;
let group_cover = [];
if(item.activity_group_cover.length!=0) {
item.activity_group_cover.forEach(item=>{
group_cover.push(this.$http + item)
})
}
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
title: item.name,
zhePrice:item.price/100,
yuanPrice:item.original_price/100,
integral:'',
isTuan:tuan,//
isPing:ping,//
isXian:xian,//
isIntegral:integral,//
grade:'',
disease_name:item.disease_name,//
disease_id:item.disease_id,//ID
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
}
nArr.push(obj)
})
this.loading = true;
}
nArr.forEach((item,index)=>{
if(item.activity_end_at!='') {
let obj = {
id:item.id,
reponseTime:item.reponseTime,
time:item.activity_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
this.$toolAll.tools.showToast('加载中...')
this.collectionTime = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
console.log(item.id,nArr[item.nIndex].id);
if(item.id==nArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
this.timeList[index].reponseTime = new Date(this.timeList[index].reponseTime).getTime() + 1000;//
if(this.timeList[index].reponseTime - endTime >=0) {// - >= 0
nArr[item.nIndex].activity_end_at = "活动已结束";
} else {
//
nArr[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.shopList = nArr;
},1000)
} else {
this.shopList = nArr;
}
}
}
})
} else {
this.isWen = true;
}
},
checkConList(category_id){//
// this.$toolAll.tools.showToast('...')
let params = {
category_id:category_id,
page:this.page,
size:this.size
}
this.$requst.post('archives/collects',params).then(res=>{
if(res.code==0){
//
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)
this.category_id = this.cateList[0].id
}
} 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){
uni.hideToast()
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:1,//
collects:item.collects,//
views:item.views,//
main_img:this.$http + item.cover,//
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(tObj);
})
}
}
},error=>{})
},
comfirmev(e){//
this.$toolAll.tools.showToast('正在取消...','loading')
//
cancleCollectionEV({action:'collect',archive_id:this.dataList[e].id})
setTimeout(()=>{
this.checkConList(this.category_id)
},300)
this.dataList[e].is_collected = 0
},
chooseLike(index){
this.activeIndex = index;
this.isShowT = true;
},
submitQu(){
this.$toolAll.tools.showToast('正在取消...','loading');
//
cancleCollectionShopEV({action:'collect',id:this.shopList[this.activeIndex].id});
this.isShowT = false;
this.shopList.splice(this.activeIndex,1);
// this.shopCollection();
},
chooseTwo(index){//
this.newCurrent = index
this.isZanw = true
this.page = 1
this.category_id = this.cateList[index].id
this.checkConList(this.cateList[index].id)
// console.log('',index);
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
goPage(id,index){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.shopList[index].isIntegral}`
})
}
}
}
</script>
<style>
.isWen{color: #3875F6;}
.isWen::after{
content: '';
display: block;
height: 4rpx;
width: 100%;
position: absolute;
bottom: -20rpx;
background: #3875F6;
}
</style>

View File

@ -1,188 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'我的分享人'" :statusTitle="true"></status-nav>
<!-- 输入框 -->
<view class="bacf posiszy navHeight" :style="{paddingTop: statusHNH+'px'}">
<view class="disja pad-sx30">
<!-- <view @tap="chooseye(indexye)" :style="{color:flag==indexye?publicColor:''}" v-for="(itemye,indexye) in cateList" :key="indexye">{{itemye.title}}({{dataList[indexye].length}})</view> -->
<view @tap="chooseye(indexye)" :style="{color:flag==indexye?publicColor:''}" v-for="(itemye,indexye) in cateList" :key="indexye">{{itemye.title}}({{itemye.num}})</view>
</view>
</view>
<view :style="{paddingTop: navH+'px'}">
<view v-if="dataList[flag].length!=0">
<view class="disjbac bbot pad-sx40 mar-zy50" v-for="(iteml,indexl) in dataList[flag]" :key="indexl">
<view class="disac">
<!-- 头像 -->
<image class="radius20" :src="iteml.src" style="width: 100rpx;height: 100rpx;" mode="aspectFill"></image>
<view class="mar-z25">
<!-- 昵称 -->
<view class="fon32 bold">{{iteml.name}}</view>
<!-- 时间 -->
<view class="fon24 col80 mar-s10">{{iteml.time}}</view>
</view>
</view>
<view class="tright">
<!-- 方式 -->
<view class="fon24 col80">{{iteml.action}}</view>
<!-- 收益 -->
<view class="fon28 bold mar-s10" style="color: #EB5929;">+{{iteml.num}}</view>
</view>
</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 40%;">
<image src="/static/public/nothing.png" style="width: 474rpx;height: 273rpx;" mode="aspectFill"></image>
<view class="fon24 col3">您还没有分享人快去分享吧</view>
</view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
flag:0,
publicColor:uni.getStorageSync('publicColor'),//
cateList:[
{title:'一级',num:0,grade:'first'},
{title:'二级',num:0,grade:'second'},
],
showTop:false,//
dataList:[
[],
[],
],
navH:uni.getStorageSync('navHeight'),
page:1,
size:20,
total:'',//
isZanw:true,
vision:false,
isShowP:false,
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkPeople()
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多分享人','none',1000)
this.isZanw = false
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/mysharer/mysharer?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
if(uni.getStorageSync('navHeight')==''){
const query = wx.createSelectorQuery()
query.select('.navHeight').boundingClientRect((rect) => {
uni.setStorageSync('navHeight',rect.height)
this.navH = rect.height
}).exec()
}
this.checkShare()//
this.checkPeople()//
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkShare(){//
this.$requst.post('user/share-count').then(res=>{
// console.log('',res);
if(res.code==0){
this.cateList[0].num = res.data.user_count.first
this.cateList[1].num = res.data.user_count.second
}
},error=>{})
},
checkPeople(){//
this.$requst.post('user/share-users',{grade:this.cateList[this.flag].grade,page:this.page,size:this.size}).then(res=>{
console.log('查询分享一二级列表人数列表:',res);
if(this.flag){
this.dataList[1] = [];
} else {
this.dataList[0] = [];
}
if(res.code==0){
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let obj = {
src:item.account.headimgurl,
name:item.account.nickname,
time:item.created_at,
action:item.invite_source,
num:item.score
}
this.dataList[this.flag].push(obj)
})
this.total = res.data.total
}
}
},error=>{})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
chooseye(index){
this.flag = index;
this.checkPeople();
}
}
}
</script>
<style>
</style>

View File

@ -1,7 +1,7 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'订单详情'" :statusTitle="true"></status-nav>
<status-nav :navBarTitle="'订单详情'"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 150rpx;">
<!-- 订单类型 -->
<block v-if="loading">
@ -110,9 +110,9 @@
</block>
</view>
<!-- 弹框授权 -->
<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>
</template>

View File

@ -1,223 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'二维码海报'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20 pad-x180">
<view class="tc mar-s20 col6 fon28">请选择海报背景后分享</view>
<view v-if="imgList.length!=0">
<view class="mar-s20 disjbac fw">
<image @tap="chooseImg(index)" v-for="(item,index) in imgList" :key="index" class="width100 radius20 mar-x20" :src="item" style="width: 48.5%;max-height: 474rpx" mode="aspectFill" lazy-load></image>
</view>
</view>
<view v-else class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img mar-x50" src="/static/public/zanwn.png" mode="aspectFill"></image>
<view class="fon24 col3 mar-s50" style="margin-top: 30%;">暂无内容</view>
</view>
<!-- 预览弹框 -->
<view v-if="showBtn" @tap.stop="showBtn=false" class="posAll disjcac fc pad-zy50" style="z-index: 3;">
<image :src="imgSrc" @tap.stop="showBtn=true" class="radius20" style="width: 80%;" mode="widthFix"></image>
<!-- 分享按钮 -->
<view v-if="haved" @tap.stop="shareEv" class="disjcac radius20 posixzy" style="height: 90rpx;margin: 20rpx 80rpx;background-color: #38CE51;line-height: 90rpx;bottom: 40rpx;">
<view class="disac">
<image src="/static/public/sharef.png" style="width: 54rpx;height: 54rpx;" mode=""></image>
<view class="fon40 bold colf mar-z10">分享给好友</view>
</view>
</view>
</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="imgList.length==0 && isHaib" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 底部客服 -->
<!-- <public-customer :nbottom="100"></public-customer> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="tabimgList" :newcurrent='-1'></foot-tab>
</view>
</template>
<script>
import {base64ToPath} from '@/jsFile/base64-src.js';
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isShowT:true,
imgList:uni.getStorageSync('imgSrcList'),
imgSrc:'',
showBtn:false,
isHaib:false,
haved:true,
vision:false,
isShowP:false,
titleList:[],//tab
tabimgList:[],//tab
}
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/personalPoster/personalPoster?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin() ;this.haved = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
// uni.removeStorageSync('imgSrcList')
//
if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')//
else this.imgList = []
this.checkPoster();
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.tabimgList[0] = newObj
this.titleList[0] = newName
}
if(item.key=="category"){
this.tabimgList[1] = newObj
this.titleList[1] = newName
}
if(item.key=="service"){
this.tabimgList[2] = newObj
this.titleList[2] = newName
}
if(item.key=="shop"){
this.tabimgList[3] = newObj
this.titleList[3] = newName
}
if(item.key=="my"){
this.tabimgList[4] = newObj
this.titleList[4] = newName
}
})
uni.setStorageSync('footTitle',this.titleList)
uni.setStorageSync('footimg',this.tabimgList)
this.titleList = uni.getStorageSync('footTitle')
this.tabimgList = uni.getStorageSync('footimg')
}
}
}
},error=>{})
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkPoster(){//
this.$requst.get('user/poster').then(res=>{
if(res.code==0){
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
this.imgList.push(this.$http + item);
})
}
}
},error=>{})
},
chooseImg(index){//
this.imgSrc = '';
this.haved = this.showBtn = true;
this.$toolAll.tools.showToast('正在生成海报...','loading',10000);
this.$requst.post('user/poster-info',{poster_src:this.imgList[index]}).then(res=>{
if(res.code==0){
base64ToPath(res.data.poster).then(path => {
this.imgSrc = path;
}).catch(error => {})
this.$toolAll.tools.showToast('海报生成成功','none',1500);
} else {
this.$toolAll.tools.showToast('海报生成失败','none',1500);
this.haved = this.showBtn = false;
}
})
},
shareEv(){
this.haved = false;
wx.showShareImageMenu({
path: this.imgSrc,
success:(res=>{
this.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb);
}),
fail:(res=>{//
this.haved = true
})
})
},
comfirmev(){//
this.$toolAll.tools.showToast('生成中...')
this.isShowT = false
//
this.$requst.get('user/personal-poster').then(res=>{
// console.log('',res);
if(res.code==0){
let newArr = [];
newArr.push(res.data.poster)
uni.hideToast()
newArr.forEach(item=>{
base64ToPath(item).then(path => {
this.imgList.push(path)
uni.setStorageSync('imgSrcList',this.imgList)
}).catch(error => {})
})
this.$toolAll.tools.showToast('生成海报成功');
this.isHaib = false
}
},error=>{})
},
cancleev(){//
uni.navigateBack({delta:1})
}
}
}
</script>
<style>
</style>

View File

@ -1,591 +0,0 @@
<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'}" 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 class="pad-x180" :style="{paddingTop: (statusHNH+50)+'px'}">
<view v-if="isLoading" class="pad-s30">
<view v-show="cateCurrent==isNum">
<view class="pad-zy32">
<!-- 自定义轮播 -->
<swiper-pu :browseP="true" :isplay="isAutoPlay" :bannerList="bannerList" :newHeight="newHeight"
:newRadius="'10'" :newBottom="'5'"></swiper-pu>
<!-- 标题 -->
<view class="fon36 col3 bold mar-sx20 clips2" style="line-height: 50rpx;">{{detailObj.title}}
</view>
<view class="disjbac">
<view class="disac">
<!-- 发布者头像 -->
<image class="flexs" :src="fabImg || '/static/public/logo.png'"
style="width: 60rpx;height: 60rpx;border-radius: 100%;" mode="aspectFill"></image>
<view class="mar-z10">
<!-- 发布者昵称 -->
<view class="fon28 col3 clips1">{{detailObj.published_by || '恒美植发'}}</view>
<!-- 发布时间 -->
<view class="fon20 col9" style="margin-top: 6rpx;">{{detailObj.published_at}}发布
</view>
</view>
</view>
<view class="disac flexs">
<view class="disac fc" @tap="tapLike" style="width: 60rpx;">
<image v-if="isDetailLike" src="/static/public/detail-like.png"
style="width: 42rpx;height: 42rpx;" mode=""></image>
<image v-else src="/static/public/detail-nlike.png"
style="width: 42rpx;height: 42rpx;" mode=""></image>
<view class="fon24 col9 tc">{{likeCon}}</view>
</view>
<view @tap="shareEv" class="disac fc mar-zy36 posir">
<image src="/static/public/weix.png" style="width: 42rpx;height: 42rpx;" mode=""></image>
<view class="fon24 col9">分享</view>
<button class="posia" open-type="share"
style="top: 0;right: 0;left: 0;bottom: 0;opacity: 0;">分享</button>
</view>
<view class="disac fc" @tap="tapConllection">
<image v-if="isDetailConllection" src="/static/public/yconllection.png"
style="width: 44rpx;height: 44rpx;" mode=""></image>
<image v-else src="/static/public/conllection.png"
style="width: 44rpx;height: 44rpx;" mode=""></image>
<view class="fon24 col9">收藏</view>
</view>
</view>
</view>
<!-- 内容详情 -->
<view class="fon28 mar-s20" style="color: #1A1A1A; line-height: 40rpx;">
<rich-text :nodes="detailInfo"></rich-text>
</view>
</view>
<view class="pad-zy20">
<view class="fon30 bold tc mar-sx40" :style="{color:publicColor}">相关推荐</view>
<!-- 相关推荐列表 -->
<list-pu @chooseLike="chooseLikex" @comfirmev="comfirmevx" :list="xgList"></list-pu>
</view>
<view class="tc fon28 bold" style="color: #fff;background-color: #3875f6;padding: 20rpx;" @tap="backEv">{{contentVal}}>></view>
<view class="pad-zy20">
<view class="fon30 bold tc mar-sx40" :style="{color:publicColor}">推荐医生</view>
<!-- 推荐医生列表 -->
<list-doctor v-if="dataList.length!=0" :list="dataList"></list-doctor>
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 10%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
</view>
</view>
</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>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<!-- 底部导航 -->
<view class="posixzy">
<bottom-tab></bottom-tab>
</view>
</view>
</view>
</template>
<script>
import listDoctor from '@/components/list-doctor.vue';
import swiperPu from '@/components/swiper-pu.vue';
import bottomTab from '@/components/bottom-tab.vue';
import {
collectionEV,
cancleCollectionEV
} from '@/jsFile/publicAPI.js';
export default {
components: {
listDoctor,
swiperPu,
bottomTab
},
data() {
return {
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
isLoading: false,
vision: false,
statusHNH: uni.getStorageSync('statusHNH'),
publicColor: uni.getStorageSync('publicColor') || '#3875F6', //
cateCurrent: 0,
haveImg: true,
cateList: [],
bannerList: [], //
xgList: [ //
],
dataList: [ //
],
showTop: false,
isDetailLike: false, //
likeCon: '点赞',
isDetailConllection: false, //
isNum: 0,
listArrone: [], //
listArrtwo: [ //
],
listArrthree: [ //
],
listArrfour: [ //
],
detailObj: {}, //
detailInfo: '', //
category_id: '', //ID
active: '', //
// jieDuan:false,
share_id: 0,
invite_code: '',
isShowP: false,
bcurrent: 0,
isAutoPlay: false,
fabImg: '' ,//
allArr:[],
page:1,
size:20,
total:0,
isZanw:true,
allList:[],
contentVal:'',
newHeight:'450'
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() { //
if(this.cateCurrent!=this.isNum){
if(this.total!=this.allList.length){
this.page++
this.checkList(this.cateCurrent)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
}
},
onShareTimeline() {},
onShareAppMessage(res) {
var ya = this;
this.$requst.post('user/record', {
type: 'content',
action: 'share',
id: this.detailObj.id
}).then(res => {
console.log('分享成功:', res);
}, error => {})
let maiOjb = {
e: 4, //
c: this.detailObj.id * 1,
t: new Date().getTime() //
}
this.$toolAll.tools.maiDian(maiOjb)
var shareObj = {
title: `${ya.detailObj.title}`, // (slogan)
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
imageUrl: ya.$http + ya.detailObj
.share_img //PNGJPG imageUrl 使 5:4
};
return shareObj;
},
onShow() {
this.isAutoPlay = true;
},
onHide() {
this.isAutoPlay = false;
},
onUnload() {
this.isAutoPlay = false;
},
onLoad(options) {
if (options.category_id != undefined) {
this.category_id = options.category_id
if(options.invite_code!=undefined){this.invite_code = options.invite_code;}
if (options.share_id != undefined){this.share_id = options.share_id;}
this.checkDetail(options.id);
let maiOjb = {
e: 1, //访
c: options.id * 1,
t: new Date().getTime() //
}
this.$toolAll.tools.maiDian(maiOjb);
if(uni.getStorageSync('phone_active')!=1){
this.vision = true;
this.loginEv(options);
} else {
//token
this.$toolAll.tools.overdue();
}
}
},
methods: {
loginEv(options) {
uni.login({
provider: 'weixin',
success: (res) => {
var params = {
code: res.code,
invite_code: options.invite_code || '', //
source_code: options.source_code || '',
channel: options.channel || ''
}
this.$requst.post('user/login', params).then(res => {
if (res.data.token != '') {
if (res.data.is_active == 0) {
this.haveImg = false;
}
}
}, error => {})
},
});
},
chooseLike(e) { //
// console.log(this.dataList[e].is_collected);
if (this.allList[e].is_collected == 0) {
this.allList[e].is_collected = 1
//
collectionEV({
action: 'collect',
archive_id: this.allList[e].id
})
}
},
comfirmev(e) { //
this.allList[e].is_collected = 0;
this.$toolAll.tools.showToast('正在取消...', 'loading')
//
cancleCollectionEV({
action: 'collect',
archive_id: this.allList[e].id
})
},
chooseLikex(e) { //
if (this.xgList[e].is_collected == 0) {
this.xgList[e].is_collected = 1
//
collectionEV({
action: 'collect',
archive_id: this.xgList[e].id
})
}
},
comfirmevx(e) { //
this.xgList[e].is_collected = 0
this.$toolAll.tools.showToast('正在取消...', 'loading')
//
cancleCollectionEV({
action: 'collect',
archive_id: this.xgList[e].id
})
},
buttonH(e) { //
this.haveImg = e
if (e) {
this.vision = false
this.isShowP = true
}
},
cancleEv(e) { //
if (e == 0) this.vision = false
},
checkDetail(newId) {
this.$requst.post('archives/detail', {
id: newId,
share_id: this.share_id
}).then(res => {
// console.log('',res);
if (res.code == 0) {
this.isLoading = true
//
if (res.data.category.length != 0) {
res.data.category.forEach((item, index) => {
let cateObj = {
id: item.id, //ID
title: item.title, //
active: item.active, //
model_id: item.model_id, //ID
model_name: item.model_name, //
sort: item.sort
}
this.cateList.push(cateObj)
this.allArr.push([]);
//
if (item.active == 1) this.active = this.cateCurrent = index
//
if (this.category_id == item.id) this.isNum = index
})
this.contentVal = this.cateList[this.cateCurrent].title.slice(2);
if(this.cateList[this.cateCurrent].title== '毛发百科' || this.cateList[this.cateCurrent].title== '科普视频') {
this.newHeight = '200';
}
}
if (this.invite_code != '' && this.invite_code != undefined) {
const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => {
// console.log('+',rect);
this.statusHNH = rect.height
// console.log(this.statusHNH );
}).exec()
}
//
this.detailObj = res.data.detail;
if (this.detailObj.published_headimgurl != '') {
this.fabImg = this.$http + this.detailObj.published_headimgurl;
}
let maiOjb = {
e: 1, //访
c: this.detailObj.id * 1,
t: new Date().getTime() //
}
this.$toolAll.tools.maiDian(maiOjb)
if (this.detailObj.is_liked == 1) {
if (this.detailObj.likes >= 1000) this.likeCon = '999+'
else this.likeCon = this.detailObj.likes
}
//
//
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
if (this.detailObj.is_liked == 0) this.isDetailLike = false
if (this.detailObj.is_liked == 1) this.isDetailLike = true
//
this.detailInfo = this.$toolAll.tools.escape2Html(this.detailObj.content)
// xgList
if(this.cateList[this.cateCurrent].title=='日记分享') {
if (res.data.diary.length != 0) {
res.data.diary.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") //
}
if (item.cover != '' && item.video == '') {
this.xgList.push(tObj)
}
})
}
} else {
this.relevant();
}
//
if (res.data.doctor.length != 0) {
res.data.doctor.forEach(item => {
let doObj = {
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.dataList.push(doObj)
})
}
this.choosecateEv(this.cateCurrent)
}
}, error => {})
},
relevant(){
this.$requst.post('archives/category', {
category_id: this.cateList[this.cateCurrent].id,
keyword: '',
page:this.page,
size:this.size
}).then(res => {
if(res.code==0){
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") //
}
if (item.cover != '' && item.video == '') {
this.xgList.push(tObj)
}
})
}
}
})
},
choosecateEv(e) {
this.page = 1;
this.isZanw = true;
this.checkList(e);
},
checkList(e){
this.$requst.post('archives/category', {
category_id: this.cateList[e].id,
keyword: '',
page:this.page,
size:this.size
}).then(res => {
// console.log('',res);
if (res.code == 0) {
if(this.page==1) {
if(this.active != e) this.allList = [];
uni.pageScrollTo({
scrollTop:0,
duration:0
})
}
this.total = res.data.list.total;
if (res.data.list.list.length != 0) {
res.data.list.list.forEach(item => {
let num = item.video.search(".mp4")
let isVideo = false
if (num != '-1') isVideo = true
let fabImg = '';
if (item.published_headimgurl != '' && item.published_headimgurl != null)
fabImg = this.$http + item.published_headimgurl
let arrObj = {
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: isVideo //
}
if (item.cover != '') {
this.allList.push(arrObj);
}
})
}
this.cateCurrent = e;
} else this.$toolAll.tools.showToast(res.msg);
}, error => {})
},
tapLike() { //
if(this.haveImg){
this.isDetailLike = !this.isDetailLike
if (this.isDetailLike) {
this.detailObj.likes++
this.likeCon = this.detailObj.likes
if (this.likeCon >= 1000) this.likeCon = '999+'
} else {
this.detailObj.likes--
this.likeCon = '喜欢'
}
let isLikeCon = 'like'
//
if (this.isDetailLike) collectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
//
else cancleCollectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
} else {
//
this.vision = true;
}
},
tapConllection() { //
let isLikeCon = 'collect'
if(this.haveImg){
//
if (!this.isDetailConllection) collectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
//
else cancleCollectionEV({
action: isLikeCon,
archive_id: this.detailObj.id
})
this.isDetailConllection = !this.isDetailConllection
} else {
//
this.vision = true;
}
},
backTop() { //
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
backEv(){
uni.navigateBack({delta:1})
}
}
}
</script>
<style>
</style>

View File

@ -1,12 +1,7 @@
<template>
<view>
<!-- 状态栏 -->
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'搜索'"></status-nav>
<status-nav :navBarTitle="'搜索'"></status-nav>
<!-- 输入框 -->
<view class="search-input-box bacf" :style="{paddingTop: statusBarHeight+'px'}">
<view class="disac pad-zy30 mar-s20">

View File

@ -1,195 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'分享中心'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32">
<view class="radius20 pad20 bacf mar-s20 col3">
<view class="fon28 bold mar-x40 pad-z10">我的分享</view>
<view class="disja">
<view @tap="goPage(index)" class="disac fc flexs width33" v-for="(item,index) in dataList" :key="index">
<view class="fon36 bold clips1">{{item.num}}</view>
<view class="fon26 mar-s25">{{item.title}}</view>
</view>
</view>
</view>
<!-- 分享按钮 -->
<view @tap="shareEv" class="disjcac radius20 posir" style="height: 90rpx;margin: 70rpx 80rpx;background-color: #38CE51;line-height: 90rpx;">
<view class="disac">
<image src="/static/public/sharef.png" style="width: 54rpx;height: 54rpx;" mode=""></image>
<view class="fon40 bold colf mar-z10">分享给好友</view>
</view>
<!-- <button open-type="share" class="posia width100" style="opacity: 0;">分享给好友</button> -->
<!-- <button @tap="shareEv" class="posia width100" style="opacity: 0;">分享给好友</button> -->
</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="'暂未开放此功能,请耐心等候'" :isCenter="true" :comfrimVal="'好的'" @comfirmev="isShowT=false"></pu-po>
<!-- 底部客服 -->
<!-- <public-customer :nbottom="100"></public-customer> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='-1'></foot-tab>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isShowT:false,
imgSrc:'/static/public/shareh.png',
dataList:[
{num:'0',title:'积分'},
{num:'0',title:'分享人'},
{num:'0',title:'分享订单'},
],
imgSrcP:uni.getStorageSync('imgSrcP'),
vision:false,
isShowP:false,
titleList:[],//tab
imgList:[],//tab
}
},
onShareAppMessage(options) {
var ya = this;
   var shareObj = {
    title: '恒美植发', // (slogan)
    path: '', // /
    imageUrl: ya.imgSrc, //PNGJPG imageUrl 使 5:4
    success: function(res){
      //
      if(res.errMsg == 'shareAppMessage:ok'){
let maiOjb = {
e:4,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
      }
    },
    fail: function(res){
      //
      if(res.errMsg == 'shareAppMessage:fail cancel'){
        //
      }else if(res.errMsg == 'shareAppMessage:fail'){
        // detail message
      }
    }
  };
  return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0
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: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
shareEv(){//
if(this.imgSrcP==''){
this.$toolAll.tools.showToast('请先前往个人海报申请海报')
} else {
wx.showShareImageMenu({
path: this.imgSrcP
})
this.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
}
},
goPage(index){
let newUrl = ''
if(index==1) newUrl = '/pagesB/mysharer/mysharer'
uni.navigateTo({
url:newUrl
})
},
// shareEv(){
// this.isShowT = true
// }
}
}
</script>
<style>
</style>

View File

@ -1,39 +1,36 @@
<template>
<view>
<!-- 状态栏 -->
<!-- 状态栏 -->
<status-nav
:ifTitle="true"
:ifReturn="true"
:ifCenter="true"
:navBarTitle="'商品详情'"></status-nav>
<status-nav :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>
<!-- 标题 -->
<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 class="pad-x140">
<container-subgroup>
<view style="margin: 0 -30rpx;">
<swiper-pu v-if="cateCurrent==0" :isplay="isAutoPlay" :browseP="true" :bannerList="bannerList" :newHeight="swiperHeight" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
</view>
</view>
<!-- 颜色 -->
<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>
<!-- 标题 -->
<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>
</view>
<!-- 底部导航 -->
<bottom-nav></bottom-nav>
<!-- 全局客服 -->
@ -44,83 +41,16 @@
: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">
<view class="disjb pad-zy50">
<image :src="zhuImg" mode="aspectFill"></image>
<view class="disjbac width100">
<view v-if="isNei!=3">
<view class="fon40 mar-sx10 colf8">{{skuDetail.price/100}}</view>
<!-- <view v-if="isNei!=10"><span class="yuan-price">{{skuDetail.original_price/100}}</span></view> -->
<view><span class="yuan-price">{{skuDetail.original_price/100}}</span></view>
</view>
<view v-else><view class="fon40 mar-sx10 colf8">积分{{skuDetail.score}}</view></view>
<image @tap.stop="showTK=false" src="/static/public/cha-close.png" style="margin-right: 0rpx;" mode=""></image>
</view>
</view>
<!-- 标题 -->
<view class="fon36 col3 bold clips3 pad-zy30 mar-s20 shop-title-box line-h50">
<view style="margin-top: -8rpx;margin-right: 10rpx;">
<span class="radius15 colf fon20" :style="{background:publicColor}">{{detailObj.disease_name}}</span>
<span class="radius15 colf fon20 mar-z10" v-if="isNei==0"></span>
<span class="radius15 colf fon20 mar-z10" v-if="isNei==1"></span>
<span class="radius15 colf fon20 mar-z10" v-if="isNei==2"></span>
</view>
<span>{{detailObj.name}}</span>
</view>
<view class="dis mar-sx40 pad-zy30 col3">
<view class="fon28 flexs" style="margin-top: 6rpx;">类型</view>
<view class="fon26 disac fw width100" style="justify-content: flex-end;">
<view @tap="chooselei(indexl)" class="mar-x20" v-for="(item,indexl) in allRes.sku" :key="indexl" :class="leiIndex==indexl?'activelei':'molei'" :style="{background:leiIndex==indexl?publicColor:'#F2F2F2'}">{{item.title}}</view>
</view>
</view>
<view class="disjbac mar-sx40 pad-zy30 fon28">
<view class="col3">库存</view>
<view class="fon26 col3" style="color: #5B5B5B;">{{skuDetail.stock}}</view>
</view>
<view class="disjbac mar-sx40 pad-zy30 fon28">
<view class="col3">购买数量</view>
<view class="fon26 col3 disac bold">
<image @tap="buyNum!=1?buyNum--:''" src="/static/public/del.png" class="del-btn" mode=""></image>
<input type="text" @input="inputNum" v-model="buyNum" class="num-input"/>
<image @tap="buyNum++" src="/static/public/add.png" class="add-btn" mode=""></image>
</view>
</view>
<!-- 加入购物车立即购买 -->
<view v-if="isNei!=1" class="disjbac pad-zy30 colf fon32 mar-x50">
<view @tap="addCart" class="ev-btn pbackc">加入购物车</view>
<view v-if="isNei!=3" @tap.stop="goGetReadyDan(0)" class="ev-btn bcf8"></view>
<view v-else @tap.stop="goGetReadyDan(0)" class="ev-btn bcf8">立即兑换</view>
</view>
<!-- 单独购买立即拼团 -->
<view v-else class="disjbac pad-zy30 colf fon32 mar-x50">
<view @tap.stop="goGetReadyDan(2)" class="ev-btn" style="background: #C8C8C8;">单独购买</view>
<view @tap.stop="goGetReadyDan(0)" class="ev-btn bcf8">发起拼团</view>
</view>
</view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<!-- <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower> -->
<!-- 弹框 -->
<!-- <auth-phone v-if="isShowP"></auth-phone> -->
</view>
</view>
</template>
<script>
import listDoctor from '@/components/list-doctor.vue';
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,
dropDown,
@ -128,10 +58,7 @@
},
data() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
isLoading:false,
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
swiperHeight:uni.getSystemInfoSync().windowWidth,
cateCurrent:0,
dropObj:{
title:'尺寸',
@ -147,107 +74,24 @@
]
},
shopRich:'',//
swiperHeight:uni.getSystemInfoSync().windowWidth,
haveImg:true,
cateList:[{
id:1,
title:'商品详情',
pid:11,
sort:4
}],
bannerList:[{
imgSrc:'https://s6.jpg.cm/2022/02/14/L4oDhy.jpg',
url:'',
isVideo:false,
poster:'',
}],//
//
xgList:[],
//
dataList:[],
showTop:false,
isDetailConllection:false,//
isNum:0,
listArrone:[],//
//
listArrtwo:[],
//
listArrthree:[],
//
listArrfour:[],
//
doctorList:[],
detailObj:{},//
detailInfo:'',//
category_id:'',//ID
active:'',//
share_id:0,
invite_code:'',
showTK:false,
leiIndex:0,
showPD:false,
isNei:'',//
pingArr:[],//
len:0,//
pinInfo:{},//
allRes:{},//
zhuImg:'',//cover
skuDetail:{},//sku
buyNum:1,//
daoTime:'',//
csNum:0,//,
isBuy:0,//
ispt:0,//01 2
isScore:0,//
cartNum:0,
skuCate:[],//
pinDao:'',//
serverTime:'',//
timerServer:null,
timerp:null,
timera:null,
pinUserId:0,//ID
isAutoPlay:false,
vision:false,
isShowP:false,
page:1,
size:20,
total:0,
isZanw:true,
allList:[],
isactivity:0,//01
orderId:'',//id
timeout:null,
}
},
onReachBottom() { //
if(this.cateCurrent!=this.isNum){
if(this.total!=this.allList.length){
this.page++
this.checkList(this.cateCurrent)//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000)
this.isZanw = false
}
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onShareAppMessage(res) {
var ya = this;
this.$requst.post('user/record',{type:this.detailObj.is_activity==0 ? 'spu':'activity',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:this.detailObj.is_activity==0 ? 10 : 11,//1011
c: this.detailObj.is_activity==0 ? this.detailObj.id*1 : this.detailObj.activity_id,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
if(ya.detailObj.share_img==null) ya.detailObj.share_img = ya.detailObj.cover;
var shareObj = {
     title: `${ya.detailObj.name}`, // (slogan)
     path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.is_activity==1?this.detailObj.activity_id:this.detailObj.id}&category_id=${this.category_id}&is_activity=${this.detailObj.is_activity==0 ? 0 : 1}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
     imageUrl: ya.$http + ya.detailObj.share_img//PNGJPG imageUrl 使 5:4
     title: ``, // (slogan)
     path: `/pagesB/shopDetail/shopDetail?id=}`, // /
     imageUrl: ''//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
},
@ -259,174 +103,26 @@
this.isAutoPlay = false;
},
onUnload() {
clearInterval(this.timera);
clearInterval(this.timerp);
clearInterval(this.timerServer);
this.isAutoPlay = false;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){
this.vision = true;
this.loginEv(options);
} else {
this.cartNumEv();
//token
this.$toolAll.tools.overdue();
}
if(options.category_id!=undefined) {
this.category_id = options.category_id
this.invite_code = options.invite_code
}
if(options.share_id!=undefined) this.share_id = options.share_id
if(options.isIntegral=="true"){this.isScore = 3;}
this.isactivity = options.is_activity;
this.orderId = options.id;
//
if(options.shareCate==1) {
// options.checkGrounpIid
// options.share_id:id
this.sharePin(options.checkGrounpId,options.share_id);
}
},
methods: {
//
chooseItem(e){
this.log(e);
},
//
inputNum(e){
clearTimeout(this.timeout);
let str = e.detail.value;
this.timeout = setTimeout(()=>{
if(str=='' || str==0){
this.buyNum = 1;
}
},500)
},
sharePin(id,u_id){
// id:id
this.$requst.post('spu/group-list',{id:id}).then(res=>{
if(res.code==0){
if(res.data.length){
res.data.forEach(item=>{
console.log(item.id,u_id);
if(item.id==u_id){
this.pinInfo = {
id:item.id,
imgSrc:item.cover,
name:item.name,
num:item.num
}
this.showPD = true;
this.detailPTime(item.time);
}
})
}
} else this.$toolAll.tools.showToast(res.msg);
})
},
loginEv(options){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:options.invite_code || '',//
source_code:options.source_code || '',
channel:options.channel || ''
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false;
this.isShowP = true;
}
},
cartNumEv(){//
let ntype = 'spu'
if(this.isScore==3) ntype = 'score';
this.$requst.post('order/shopping-cart-count',{type:ntype}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
checkPTList(id){//
uni.request({
url:`${uni.getStorageSync('hostapi')}spu/group-list`,
data:{id:id},
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
let ntime = new Date(res.header.Date).getTime();//
this.timerServer = setInterval(()=>{
ntime = ntime + 1000
this.serverTime = new Date(ntime);
},1000);
if(res.data.data.length!=0){
res.data.data.forEach(item=>{
let pObj = {
id:item.id,
imgSrc:item.cover,
name:item.name,
num:item.num,//
time:item.time,//
time_text:item.time_text//
}
this.pingArr.push(pObj);
})
this.len = this.pingArr.length;
let n = 2; //2
let lineNum = this.len % 2 === 0 ? this.len / 2 : Math.floor( (this.len / 2) + 2 );
let newPArr = [];
for (let i = 0; i < lineNum; i++) {
let temp = this.pingArr.slice(i*n, i*n+n);
newPArr.push(JSON.parse(JSON.stringify(temp)));
}
this.pingArr = newPArr;
}
} else this.$toolAll.tools.showToast(res.msg);
}
})
},
goGetReadyDan(index){//
this.showTK = false;
// {id:1,imgSrc:'/static/tabbar/mya.png',title:'99线',price:3888,num:1,isActive:false},
let nprice = '';
if(this.isNei==3) {
nprice = this.skuDetail.score;
} else nprice = this.skuDetail.price/100;
this.ispt = index;
if(index==2){nprice = this.skuDetail.original_price/100;}
let params = {
id:this.detailObj.spu_id,
imgSrc:this.$http + this.detailObj.cover,
coding:this.skuDetail.coding,
price:nprice,
price:'',
num:this.buyNum || 1,
title:this.detailObj.name,
sku_name:this.skuDetail.title,
is_score:this.detailObj.is_score,
group_id:this.ispt,//0 1 2
is_only:this.ispt,
pin_user_id:this.pinUserId,//ID
category_id:this.category_id,//ID
cateNum:this.isNei,
checkGrounpId:this.detailObj.id,//ID
}
let newList = [params];
@ -441,7 +137,6 @@
this.$toolAll.tools.showToast('正在加入购物车...');
this.$requst.post('order/shopping-cart-add',{sku_id:this.skuDetail.id,num:this.buyNum}).then(res=>{
if(res.code==0) {
this.showTK = false;
this.$toolAll.tools.showToast('添加购物车成功(*^▽^*)');
this.cartNumEv();
this.csNum = 0;
@ -449,226 +144,6 @@
})
}
},
comeTuan(pinId,index,index2){//
this.showPD = true;
this.pinInfo = this.pingArr[index][index2];
this.pinDao = this.$toolAll.tools.dayTime(this.pinInfo.time,this.serverTime);
this.timerp = setInterval(()=>{
if((new Date(this.pinInfo.time).getTime()) - (new Date(this.serverTime).getTime())<=0){
this.pinDao = '已结束';
this.checkPTList(this.detailObj.id);
this.showPD = false;
clearInterval(this.timerp);
} else {
this.pinDao = this.$toolAll.tools.dayTime(this.pinInfo.time,this.serverTime);
}
},1000)
},
detailPTime(endtime){
this.pinDao = this.$toolAll.tools.dayTime(endtime,new Date());
this.timerp = setInterval(()=>{
if((new Date(endtime).getTime()) - (new Date().getTime())<=0){
this.pinDao = '已结束';
this.checkPTList(this.detailObj.id);
this.showPD = false;
clearInterval(this.timerp);
} else {
this.pinDao = this.$toolAll.tools.dayTime(endtime,new Date());
}
},1000)
},
atOnceSpellOrder(index){//
if(index==1){
this.showTK = true;
this.pinUserId = this.pinInfo.id;
}
this.showPD = false;
clearInterval(this.timerp);
this.daoTime = '';
},
chooselei(index){//
this.leiIndex = index;
this.skuDetail = this.allRes.sku[index];
},
lianK(){//
// if(!this.jieDuan){
// let isAuth = this.$toolAll.tools.returnAuth()
// if(!isAuth){
if(this.haveImg == false) {
this.vision = true
} else {
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
let maiOjb = {
e:this.detailObj.is_activity==0 ? 13:14,//1314
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
}
// } else this.jieDuan = true
// }
},
chooseLike(e) { //
// console.log(this.dataList[e].is_collected);
if (this.allList[e].is_collected == 0) {
this.allList[e].is_collected = 1
//
collectionEV({
action: 'collect',
archive_id: this.allList[e].id
})
}
},
comfirmev(e) { //
this.allList[e].is_collected = 0;
this.$toolAll.tools.showToast('正在取消...', 'loading')
//
cancleCollectionEV({
action: 'collect',
archive_id: this.allList[e].id
})
},
backHome(){
uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome'
})
},
shareEv(){
if(this.haveImg == false) {
this.vision = true
}
},
checkShopList(){//
let params = {
keyword:'',//
page:1,
size:10,
doctor_role:'',// doctor= design=
doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:''//ID
}
uni.request({
url:`${uni.getStorageSync('hostapi')}spu/list`,
data:params,
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
this.dataList = [];
if(res.data.data.list.length!=0){
res.data.data.list.forEach(item=>{
let tuan = false,ping = false,xian = false,integral = false;
if(item.activity_type=='group_make') ping = true;
if(item.activity_type=='group_buy') tuan = true;
if(item.activity_type=='limit_time') xian = true;
let group_cover = [];
if(item.activity_group_cover.length!=0) {
item.activity_group_cover.forEach(item=>{
group_cover.push(this.$http + item)
})
}
let obj = {
id:item.id,
imgSrc: this.$http + item.cover,
title: item.name,
zhePrice:item.price/100,
yuanPrice:item.original_price/100,
integral:'',
isTuan:tuan,//
isPing:ping,//
isXian:xian,//
isIntegral:integral,//
grade:'',
disease_name:item.disease_name,//
disease_id:item.disease_id,//ID
reponseTime:res.header.Date,//
activity_end_at:item.activity_end_at,//
activity_group_cover:group_cover,//
activity_group_num:item.activity_group_num,//
activity_id:item.activity_id
}
this.dataList.push(obj)
})
}
}
}
})
},
goShopCart(){//
let isScore = '';
if(this.isNei==3) isScore = 'score';
uni.navigateTo({
url:`/pagesA/shopCart/shopCart?isScore=${isScore}`
})
},
goDoctor(id){
uni.navigateTo({
url:`/pagesB/doctorDetail/doctorDetail?doctor_id=${id}`
})
},
choosecateEv(e){//
this.$requst.post('archives/category', {
category_id: this.cateList[e].id,
keyword: '',
page:this.page,
size:this.size
}).then(res => {
// console.log('',res);
if (res.code == 0) {
if(this.page==1) {
if(this.active != e) this.allList = [];
uni.pageScrollTo({
scrollTop:0,
duration:0
})
}
this.total = res.data.list.total;
if (res.data.list.list.length != 0) {
res.data.list.list.forEach(item => {
let num = item.video.search(".mp4")
let isVideo = false
if (num != '-1') isVideo = true
let fabImg = '';
if (item.published_headimgurl != '' && item.published_headimgurl != null)
fabImg = this.$http + item.published_headimgurl
let arrObj = {
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: isVideo //
}
if (item.cover != '') {
this.allList.push(arrObj);
}
})
}
this.cateCurrent = e;
} else this.$toolAll.tools.showToast(res.msg);
}, error => {})
},
tapConllection(){//
let isLikeCon = 'collect';
let nid = '';
if(this.detailObj.is_activity==1) nid=this.detailObj.spu_id;
else nid=this.detailObj.id;
//
if(!this.isDetailConllection) collectionShopEV({action:isLikeCon,id:nid})
//
else cancleCollectionShopEV({action:isLikeCon,id:nid})
this.isDetailConllection = !this.isDetailConllection
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,

View File

@ -1,438 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'商品搜索'" :statusTitle="true"></status-nav>
<!-- 输入框 -->
<view class="search-input-box bacf poszy shop-nav-box" :style="{top: statusHNH+'px'}">
<view class="disac pad-zy30 mar-s20">
<!-- 输入框 -->
<input @confirm="checkShopList" style="border: 2rpx solid #E0E0E0;padding: 0rpx 20rpx;height: 80rpx;line-height: 80rpx;" class="width100 fon34 radius10" type="text" v-model="searchVal" placeholder="请输入商品名称"/>
<!-- 搜索 -->
<view @tap="checkShopList" class="flexs mar-z30 radius10 pad-zy40 fon34 colf" style="height: 80rpx;line-height: 80rpx;" :style="{background:publicColor}">搜索</view>
</view>
<!-- 筛选结果 -->
<view v-if="search_result" class="pad-z20 pad-x20">
<view class="col3 fon28 mar-s30">搜索结果</view>
</view>
</view>
<!-- 数据列表 -->
<view v-if="search_result" :style="{marginTop:statusHNH+titleHeight+10+45+'px'}">
<view v-if="dataList.length!=0" style="margin-top: -20rpx;">
<view class="pad20">
<view style="width: 48.6%;float: left;">
<view v-if="index1%2==0" v-for="(item1,index1) in dataList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)">
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
<view class="pad-zy20 pad-s10 pad-x30">
<view class="fon28 bold col3 clips2">{{item1.title}}</view>
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
<view class="radius10 colf mar-y10" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;"></view>
</view>
<view class="disac">
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
<view v-if="item1.isIntegral" class="mar-s20">
<view>积分:{{item1.integral}}</view>
<view class="disac mar-s20" v-if="item1.grade!=0">
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>
<span v-if="item1.isXian"></span>
{{item1.zhePrice}}
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view>
<view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
<view class="disac">
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
<view style="width: 48.6%;float: right;">
<view v-if="index1%2!=0" v-for="(item1,index1) in dataList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)">
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
<view class="pad-zy20 pad-s10 pad-x30">
<view class="fon28 bold col3 clips2">{{item1.title}}</view>
<view class="disac fon20 mar-sx20" v-if="!item1.isIntegral">
<view class="radius10 colf mar-y10" style="padding: 6rpx 10rpx;" :style="{background:publicColor}">{{item1.disease_name}}</view>
<view class="radius10 colf" v-if="item1.isTuan" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;"></view>
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;"></view>
</view>
<view class="disac">
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
<view v-if="item1.isIntegral" class="mar-s20">
<view>积分:{{item1.integral}}</view>
<view class="disac mar-s20" v-if="item1.grade!=0">
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>
<span v-if="item1.isXian"></span>
{{item1.zhePrice}}
</view>
</view>
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view>
<view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
<view class="disac">
<image v-for="(itemm,indexm) in item1.activity_group_cover" :key="indexm" :src="itemm" mode="" style="width: 40rpx;height: 40rpx;border-radius: 100%;margin-left: -20rpx;"></image>
</view>
</view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24 col80 mar-s20">{{item1.activity_end_at}}</view>
</view>
</view>
</view>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" :contentVal="pu_content" @comfirmev="submitQu" @cancleev="isShowT=false"></pu-po>
</view>
</view>
<nothing-page v-if="dataList.length==0" :content="`暂无更多商品列表`"></nothing-page>
</view>
<!-- 历史搜索和热门搜索 -->
<view v-if="!search_result" class="pad-z30 mar-s30" :style="{marginTop:statusHNH+titleHeight+10+'px'}">
<cate-tu :list="reSearchList" @delev='delev'></cate-tu>
</view>
<!-- 购物车 -->
<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>
<!-- 弹框 -->
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
import {cartNum} from '@/jsFile/publicAPI.js';
import cateTu from '@/components/cate-items/cate-tu.vue';
export default {
components:{
cateTu
},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
searchVal:'',//
publicColor:uni.getStorageSync('publicColor'),//
reSearchList:[//
{
title:'历史搜索',
src:'/static/public/del-icon.png',
list:[]
},
{
title:'热门搜索',
src:'',
list:[
// {content:''},
// {content:''},
// {content:''},
// {content:''},
// {content:''},
]
},
],
isShowT:false,//
showTop:false,//
newCurrent:0,
page:1,
size:200,
total:'',//
isZanw:true,
activeIndex:'-1',
shopCate:['全部病种','全部医生','全部活动'],
cateTitle:'',
bingzList:[],//
zanBingArr:[],//
titleHeight:'',//
shaiList:[],//
dataList:[],
searchVal:'',//
doctor_role:'',// doctor= design=
doctor_name:'',//
activity:'',// + normal=group_make=group_buy=;limit_time=
disease_id:'',//ID
cartNum:0,
search_result:false,
timeList:[],
zanArr:[],
timer:'',
vision:false,
isShowP:false,
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
// if(this.total!=this.dataList.length){
// this.page++
// this.checkShopList();
// } else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多列表','none',1000);
setTimeout(()=>{
this.isZanw = true;
},10000)
// }
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/shopSearch/shopSearch?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld;
this.checkShopList();
} else {
this.search_result = false;
}
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkSearchHistory();
this.checkKey();
// +
const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => {
// console.log('+',rect.height);
this.titleHeight = rect.height
}).exec()
},
onShow() {
this.$toolAll.tools.isLogin()
if(this.searchVal!=undefined && this.searchVal!='') this.checkShopList();
this.cartNumEv();//
},
onUnload() {
clearInterval(this.timer);
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
if(res.code==0){
this.cartNum = res.data.count;
}
})
},
checkShopList(){
this.isZanw = true;
let params = {
keyword:this.searchVal,//
page:this.page,
size:this.size,
}
uni.request({
url:`${uni.getStorageSync('hostapi')}spu/list`,
data:params,
method:'post',
header:{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: (res) => {
if(res.data.code==0){
clearInterval(this.timer);
// if(this.page==1) {
this.zanArr = [];
this.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,//
}
this.zanArr.push(obj)
})
this.zanArr.forEach((item,index)=>{
if(item.activity_end_at!='') {
let obj = {
id:item.id,
reponseTime:item.reponseTime,
time:item.activity_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
this.$toolAll.tools.showToast('加载中...')
this.timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.zanArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
this.timeList[index].reponseTime = new Date(this.timeList[index].reponseTime).getTime() + 1000;//
if(this.timeList[index].reponseTime - endTime >=0) {// - >= 0
this.zanArr[item.nIndex].activity_end_at = "活动已结束";
} else {
//
this.zanArr[item.nIndex].activity_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,this.timeList[index].reponseTime);
}
}
})
}
},1000)
setTimeout(()=>{
this.dataList = this.zanArr;
this.search_result = true;
},1000)
} else {
this.dataList = this.zanArr;
}
} else {
this.search_result = true;
}
}
}
})
},
goPage(id,index){//
uni.navigateTo({
url:`/pagesB/shopDetail/shopDetail?id=${id}&isIntegral=${this.dataList[index].isIntegral}`
})
},
checkKey(){//
this.$requst.get('index/hot-keywords',{type:'spu'}).then(res=>{
// console.log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let reObj = {
id:item.id,
content:item.keyword
}
this.reSearchList[1].list.push(reObj)
})
}
}
},error=>{})
},
checkSearchHistory(){//
this.$requst.post('user/search-history',{page:1,size:100}).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=>{})
},
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
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
</style>

View File

@ -1,177 +0,0 @@
<template>
<view>
<!-- 状态栏 -->
<status-nav :titleVal="'用户足迹'" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
<!-- 列表 -->
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
<input class="fon28 width100" type="text" @confirm="searchEv" v-model="keyword" placeholder="请输入姓名/电话查找" placeholder-style="color: #B3B3B3;" />
</view>
<view @tap="searchEv" class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</view>
</view>
</view>
<!-- 列表 -->
<view @tap="chooseId(item.id)" v-if="item.name!=null" class="bacf radius10 pad20 mar-x20 fon28" v-for="(item,index) in dataList" :key="index">
<view style="color: #B3B3B3;" class="disjbac">{{item.time}} <view>{{item.mobile}}</view></view>
<view class="mar-s20">
<text class="bold col3">{{item.name}}</text>
<text style="color: #B3B3B3;">{{item.action}}</text>
<text class="bold col3" v-if="item.title!=null && item.title!=''">{{item.title}}</text>
<text style="color: #B3B3B3;" v-if="item.zwhat!=null && item.zwhat!=''">{{item.zwhat}}</text>
</view>
</view>
<view v-if="dataList.length==0 && keyword!=''" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
<view class="fon24 col3">您搜索的内容暂无结果换个关键词试试吧</view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
</view>
<!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view>
</template>
<script>
export default {
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
dataList:[],//
showTop:false,//
customer_id:'',//ID
keyword:'',//
page:1,
size:10,
total:'',//
isZanw:true,
vision:false,
isShowP:false,
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
if(this.total!=this.dataList.length){
this.page++
this.checkList()
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多足迹内容')
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onShareAppMessage() {
var shareObj = {
path: `/pagesB/userFootprint/userFootprint?invite_code=${uni.getStorageSync('invite_code')}`, // /
};
return shareObj;
},
onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkList()
},
methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
chooseId(id){
this.backTop()
this.page = 1
this.isZanw = true
this.customer_id = id
this.keyword = ''
this.checkList()
},
searchEv(){//
if(this.keyword!='') this.customer_id = ''
this.page = 1
this.isZanw = true
this.checkList()
},
checkList(){//
let params = {
page:this.page,
size:this.size,
customer_id:this.customer_id,//ID
keyword:this.keyword,
// user_id:uni.getStorageSync('userId')
}
this.$requst.post('user/footmarks',params).then(res=>{
// console.log('',res);
if(res.code==0){
if(this.page==1) this.dataList = []
this.total = res.data.total
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let newCate = ''
if(item.content_id > 0) newCate = item.category
else newCate = ''
let obj = {
id:item.account_id,
name:item.nickname,
action:item.action,
title:item.title,
time:item.created_at,
zwhat:newCate,
mobile:item.mobile
}
this.dataList.push(obj)
})
}
}
},error=>{})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
},
}
}
</script>
<style>
</style>