调整登录,我的页权限判断

master
chen 2021-08-22 16:53:12 +08:00
parent 9095998f99
commit 259b3d3606
69 changed files with 730 additions and 452 deletions

43
App.vue
View File

@ -1,57 +1,22 @@
<script>
import toolAll from '@/jsFile/tools.js';
// import {checkSwip} from '@/jsFile/publicAPI.js'
export default {
onLaunch: function() {
toolAll.tools.clearClog()//
},
onShow: function() {
uni.setStorageSync('publicColor', '#3875F6') //#3875F6
toolAll.tools.zhuColorT()
// uni.clearStorageSync()
if(uni.getStorageSync('token')!='') {
toolAll.tools.daoTime()
toolAll.tools.networkStatus()//
toolAll.tools.updaX()//
}
let ya = this
uni.login({
provider: 'weixin',
success: function(res) {
if (res.code) {
let obj = uni.getStorageSync('comeOn')//
var params = {
code:res.code,
nickname: '',
headimgurl: '',
country: '',
province: '',
city: '',
gender: '',
language:'',
invite_code:'',//
channel:''//
}
ya.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
uni.setStorageSync('token',res.data.token)//token
uni.setStorageSync('headImg',res.data.headimgurl)//
}
},error => {})
}
}
});
// wx.checkSession({ //session_key
// success: function() { //session_key
// return;
// },
// fail: function() { //session_key
// setTimeout(()=>{
// uni.reLaunch({url:'/pages/login/login'})
// },2000)
// }
// })
toolAll.tools.overdue()//
// checkSwip()//
},
onHide: function() {
// console.log('hide');
toolAll.tools.closeTimer()//
}
};

View File

@ -100,7 +100,7 @@
.width100{width: 100%;}
.width33{width: 33%;}
.posAll{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.45);z-index: 2;}
.posAll{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.45);z-index: 3;}
.posir{position: relative;}
.posia{position: absolute;}
.posiszy{position: fixed;left: 0;right: 0;z-index: 2;}

View File

@ -87,42 +87,11 @@
vision:false,
isShowT:false,
isKef:true,
// tabArr:[
// {
// pagePath: 'pages/tabbar/homePage/homePage',
// iconPath: '/static/tabbar/homeAc.png',//icon
// selectedIconPath: '/static/tabbar/homeAc.png',//icon
// text: ''
// },
// {
// pagePath: 'pages/tabbar/cate/cate',
// iconPath: '/static/tabbar/catem.png',//icon
// selectedIconPath: '/static/tabbar/catem.png',//icon
// text: ''
// },
// {
// pagePath: '',
// iconPath: '/static/tabbar/customerm.png',//icon
// selectedIconPath: '/static/tabbar/customerm.png',//icon
// text: ''
// },
// {
// pagePath: 'pages/tabbar/shop/shop',
// iconPath: '/static/tabbar/shopm.png',//icon
// selectedIconPath: '/static/tabbar/shopm.png',//icon
// text: ''
// },
// {
// pagePath: 'pages/tabbar/my/my',
// iconPath: '/static/tabbar/mym.png',//icon
// selectedIconPath: '/static/tabbar/mym.png',//icon
// text: ''
// },
//],
jieDuan:false
};
},
mounted() {
if(uni.getStorageSync('headImg')=='') this.isKef = false
if(uni.getStorageSync('is_active')==0) this.isKef = false
},
methods:{
cancleEv(e){
@ -132,16 +101,16 @@
// this.current = index
switch (index){
case 0:
console.log(this.imgList[index].selectedIcoPath);
// console.log(this.imgList[index].selectedIcoPath);
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
break;
case 1:
uni.navigateTo({url:'/pages/tabbar/cate/cate'})
break;
case 2:
if(uni.getStorageSync('headImg')==''){
this.vision = true
} else {
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
this.$toolAll.tools.closeTimer()//
// uni.navigateTo({url:'/pages/tabbar/pagehome/pagehome'})
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
@ -150,6 +119,7 @@
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
} else this.jieDuan = true
}
break;
case 3:
@ -157,7 +127,12 @@
// uni.navigateTo({url:'/pages/tabbar/shop/shop'})
break;
case 4:
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
uni.reLaunch({url:'/pages/tabbar/my/my'})
} else this.jieDuan = true
}
break;
}
},

View File

@ -12,7 +12,7 @@
<!-- 喜欢 -->
<image v-else :class="item.is_collected==1?'bounceIn':'bounceOut'" class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<view :class="radiu?'list-cont-box15':'list-cont-box'" class="posia fon20">
<view v-if="item.main_img!=''" :class="radiu?'list-cont-box15':'list-cont-box'" class="posia fon20">
<!-- 视频标题 -->
<view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}">
<view class="clips1">{{item.title}}</view>
@ -40,7 +40,7 @@
<!-- 喜欢 -->
<image v-else :class="item.is_collected==1?'bounceIn':'bounceOut'" class="animated" src="/static/public/like.png" mode="aspectFill"></image>
</view>
<view :class="radiu?'list-cont-box15':'list-cont-box'" class="posia fon20 ">
<view v-if="item.main_img!=''" :class="radiu?'list-cont-box15':'list-cont-box'" class="posia fon20 ">
<!-- 视频标题 -->
<view class="fon30 bold mar-x10 disac" :style="{fontSize:nFon+'px'}">
<view class="clips1">{{item.title}}</view>
@ -110,7 +110,8 @@
vision:false,
isShowT:false,
pu_content:'是否需要取消收藏?',
current:'-1'
current:'-1',
jieDuan:false
};
},
methods:{
@ -125,9 +126,9 @@
},
chooseLike(index){//
// console.log('',index);
if(uni.getStorageSync('headImg')==0){
this.vision = true
} else {
if(this.jieDuan==false){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
this.$emit('chooseLike',index)
this.current = index
if(this.list[index].is_collected==1) {
@ -140,6 +141,7 @@
}
this.$toolAll.tools.maiDian(maiOjb)
}
} else this.jieDuan = true
}
},
comfirmev(){

View File

@ -3,7 +3,9 @@
<view :style="{height:statusBarHeight+'px',background:backgroudColor}"></view>
<view class="status-nav" :style="{background:backgroudColor}">
<!-- 返回键 -->
<image @tap="backEvent" v-if="statusBack" class="tab-back" src="/static/public/backBlackm.png"></image>
<view @tap="backEvent" v-if="statusBack" style="height: 33rpx;width: 80rpx;flex-shrink: 0;position: absolute;">
<image class="tab-back" src="/static/public/backBlackm.png"></image>
</view>
<!-- 标题 -->
<!-- <view v-if="statusTitle" :class="statusBack ? 'tcenter' : 'tleft'" class="tab-title" :style="{color:tabcolor}">{{titleVal}}</view> -->
<view v-if="statusTitle" class="tab-title tcenter" :style="{color:tabcolor}">{{titleVal}}</view>

View File

@ -62,6 +62,9 @@
chooseImg(index){
// console.log('banner',index);
this.bcurrent = index
uni.navigateTo({
url:this.bannerList[index].url
})
},
changeBanner(e){
this.bcurrent = e.detail.current//

View File

@ -38,6 +38,25 @@ export function buriedPoint(){//查询埋点类型事件
},error=>{})
}
export function reportBuriedPoint(data){//上报埋点事件
console.log('埋点的数据:',data);
// console.log('埋点的数据:',data);
return requst.post('statistics/report',data).then(res=>{},error=>{})
}
export function zhuColor(){//查询主题色
return requst.post('index/mini-program-setting').then(res=>{
if(res.code==0){
uni.setStorageSync('publicColor', res.data.mainColor) //#3875F6 #2E8B57
// uni.setStorageSync('publicColor', '#2E8B57') //#3875F6 #2E8B57
}
},error=>{})
}
export function checkSwip(){//查询主题色
return requst.post('common/slide-positions').then(res=>{
if(res.code==0){
console.log(res);
}
},error=>{})
}
export function checkBanner(data){//查询主题色
return requst.post('common/slides',data)
}

View File

@ -1,4 +1,4 @@
import {buriedPoint,reportBuriedPoint} from './publicAPI.js';
import {buriedPoint,reportBuriedPoint,zhuColor} from './publicAPI.js';
const tools = {
timer:'',
timerNot:'',
@ -37,15 +37,18 @@ const tools = {
},1000)
}
},
zhuColorT(){//调用主色调
console.log('tools');
zhuColor()
},
networkStatus(){//检查网络状态
uni.getNetworkType({
success: function (res) {
console.log('当前网络状态:',res.networkType);//none当前无网络连接
if(res.networkType=='none'){
uni.showToast({
title:'当前无网络连接',
icon:'loading'
})
uni.setStorageSync('isNet',false)
} else {
uni.setStorageSync('isNet',true)
}
}
});
@ -253,6 +256,74 @@ const tools = {
console.log = () =>{}
}
// #endif
},
overdue(){//查询过期时间和是否有token并调用登录事件
var date = new Date();
var timestamp = date.getTime();//精确到毫秒
if((uni.getStorageSync('expire')*1000) - 10000 < timestamp){
this.loginEv()
} else if(uni.getStorageSync('token')==''){
this.loginEv()
} else if(uni.getStorageSync('is_active')=='' || uni.getStorageSync('is_active')==0){
this.loginEv()
}
},
loginEv(){//执行登录事件
uni.login({
provider: 'weixin',
success: function(res) {
if (res.code) {
let code = res.code;
let obj = uni.getStorageSync('params')
var params = {
invite_code:'',
code:code,
nickname: obj.nickname,
avatar: obj.avatarUrl,
country: obj.country,
province: obj.province,
city: obj.city,
gender: obj.gender,
language:obj.language
}
uni.request({
url: `https://hm.hmzfyy.cn/api/user/login`,
method: 'post',
data: params,
header: {
'Content-Type': 'application/json; charset=UTF-8',
// "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: res => {
if(res.data.data.token!=''){
uni.setStorageSync('token',res.data.data.token)//缓存token
uni.setStorageSync('openid',res.data.data.openid)//缓存Openid
uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式)
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
// console.log('is_active',uni.getStorageSync('is_active'));
}
}
})
}
},
});
},
returnAuth(){//是否第一次授权
let auth = false
if(uni.getStorageSync('is_active')==0) {
this.showToast('您目前是游客,请授权登录')
setTimeout(()=>{
uni.navigateTo({url:'/pages/login/login'})
},1500)
auth = true
}
return auth
},
isLogin(){//是否已经登录
if(uni.getStorageSync('is_active')!='' && uni.getStorageSync('is_active') !=0 ){
this.overdue()
}
}
}

View File

@ -3,14 +3,14 @@
{
"path" : "pages/tabbar/pagehome/pagehome",
"style" :{}
},{
"path" : "pages/tabbar/my/my",
"style" :{}
},{
"path" : "pages/login/login",
"style" :{
"navigationBarTextStyle":"black" //
}
},{
"path" : "pages/tabbar/my/my",
"style" :{}
},
{
"path" : "pages/tabbar/shop/shop",
@ -105,6 +105,10 @@
{
"path":"video/playVideo",
"style":{}
},
{
"path":"customer/customer",
"style":{}
}
]
}

View File

@ -1,6 +1,6 @@
<template>
<view>
<status-nav :titleVal="'登录'" :tabcolor="'rgba(244, 244, 244,1)'" :whereCome="1" :statusTitle="true" :backgroudColor="'rgba(244, 244, 244,1)'"></status-nav>
<status-nav :titleVal="'登录'" :tabcolor="'rgba(244, 244, 244,1)'" :whereCome="1*1" :statusTitle="true" :backgroudColor="'rgba(244, 244, 244,1)'"></status-nav>
<view class='login-header'>
<image class="infoImg" :style="{boxShadow: '0px 0px 20px '+ publicColor}" mode="aspectFit" :src="userInfo.avatarUrl || imgSrc"></image>
<view class="logo-name">恒美植发</view>
@ -52,7 +52,7 @@
},
methods: {
goInfo(){
uni.setStorageSync('uinfo',this.infoObj)
uni.setStorageSync('firstInfo',this.infoObj)
uni.navigateTo({
url:'/pagesA/nodifyData/nodifyData?whereNum=2'
})
@ -81,7 +81,7 @@
lang: 'zh_CN',
success: (res) => {
ya.userInfo = res.userInfo;
console.log('可用用户信息:',ya.userInfo);
// console.log('',ya.userInfo);
try {
ya.login();
} catch (e) {}
@ -126,7 +126,8 @@
language:ya.userInfo.language,//
invite_code:ya.invite_code,//
invite_source:ya.invite_source,//[def|link|qr]
channel:ya.channel//
channel:ya.channel,//
is_active:1
}
this.$requst.post('user/login',params).then(res => {
// console.log(res);
@ -139,21 +140,17 @@
city: ya.userInfo.city,//
language:ya.userInfo.language,//
}
uni.setStorageSync('params',params)
uni.setStorageSync('comeOn',comeOn)
uni.setStorageSync('token',res.data.token)//token
uni.setStorageSync('expire',res.data.expire)//
uni.setStorageSync('is_active',res.data.is_active)//
this.isShowT = true
this.$requst.post('user/info').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0) {
this.infoObj = res.data;
this.infoObj = {
headimgurl:ya.userInfo.avatarUrl,
nickname:ya.userInfo.nickName,
gender:ya.userInfo.gender
}
},error=>{})
// ya.$toolAll.tools.showToast('','success')
// setTimeout(()=>{
// uni.reLaunch({
// url:'/pages/tabbar/pagehome/pagehome'
// })
// },1000)
}
},error => {})
}

View File

@ -17,7 +17,7 @@
<!-- 热门推荐 -->
<template v-if="ccurrent==0">
<!-- 自定义轮播 -->
<swiper-pu :newHeight="'154'" :newRadius="'10'" :newBottom="'10'"></swiper-pu>
<swiper-pu :bannerList="bannerList" :newHeight="'154'" :newRadius="'10'" :newBottom="'10'"></swiper-pu>
<!-- 自定义二级分类 -->
<view class="mar-x20 mar-s40">
<cate-pu :newCurrent="newCurrent*1" :activeb="publicColor" @choosecateEv="chooseTwo" :newcateList="cateListTwo"></cate-pu>
@ -53,7 +53,7 @@
<script>
import swiperPu from '@/components/swiper-pu.vue';
import cateTu from '@/components/cate-items/cate-tu.vue';
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{
swiperPu,
@ -73,33 +73,7 @@
],
showTop:false,//
tuList:[
// {
// title:'',
// src:'',
// list:[
// {content:''},
// {content:''},
// {content:''},
// {content:''},
// ]
// },
// {
// title:'',
// src:'',
// list:[
// {content:''},
// {content:''},
// {content:''},
// {content:''},
// ]
// },
// {
// title:'',
// src:'',
// list:[
// {content:''},
// ]
// },
],
newCurrent:0,
cateW:'',//
@ -109,7 +83,8 @@
total:'',//
isZanw:true,
category_id:'',//ID
disease_id:''//ID
disease_id:'',//ID
bannerList:[]
}
},
onPageScroll(e) {
@ -131,13 +106,34 @@
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
this.checkSwi()
},
onShow() {
this.$toolAll.tools.isLogin()
// console.log(this.category_id);
if(this.category_id!='') this.checkCate(this.category_id)//
},
methods: {
checkSwi(){
checkBanner({position:'category-hot-banner'}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let isVideo = false
if(item.type!='img') isVideo = true
let banObj = {
imgSrc:this.$http + item.src,
url:item.url,
isVideo:isVideo,
poster:this.$http + item.src,
}
this.bannerList.push(banObj)
})
}
//
}
})
},
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
@ -245,6 +241,7 @@
this.$requst.post('archives/disease-question',{disease_id:disease_id}).then(res=>{
// console.log('',res);
if(res.code==0){
this.tuList = []
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let arr = []
@ -279,7 +276,6 @@
},
chooseCate(index){//
this.ccurrent = index
this.tuList = []
this.checkData(this.cateList[index].id)
// console.log(':',index);
},

View File

@ -9,14 +9,14 @@
<view class="disjbac">
<view class="disac">
<!-- 头像 -->
<image class="mar-sx30" :src="userInfo.headimgurl || headImg" style="width:120rpx;height: 120rpx;border-radius: 100%;margin-left: 15rpx;z-index: 1;" mode="aspectFill"></image>
<image class="mar-sx30" :src="userInfo.headimgurl || ''" style="width:120rpx;height: 120rpx;border-radius: 100%;margin-left: 15rpx;z-index: 1;" mode="aspectFill"></image>
<view class="mar-z30">
<!-- 昵称 -->
<view class="fon36 bold">{{userInfo.nickname || '未知'}}</view>
<view class="disac mar-s10">
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
<view class="disac mar-s10" v-if="userInfo.mobile!==''">
<image src="/static/public/phone.png" style="width: 14rpx;height: 20rpx;" mode=""></image>
<!-- 手机号 -->
<view class="fon24 col3 mar-z10">{{userInfo.mobile || '未知'}}</view>
<view class="fon24 col3 mar-z10">{{userInfo.mobile}}</view>
</view>
</view>
</view>
@ -24,7 +24,9 @@
<!-- 二维码 -->
<image @tap="isQrcode=true" src="/static/public/eqr.png" style="width: 43rpx;height: 43rpx;z-index: 1;" mode=""></image>
<!-- 前进键 -->
<image @tap="goNodifyData" class="mar-z20" src="/static/public/nextM.png" style="width: 35rpx;height: 35rpx;z-index: 1;" mode="aspectFill"></image>
<view @tap="goNodifyData" style="width: 50rpx;position: relative;z-index: 1;justify-content: flex-end;" class="disac">
<image class="" src="/static/public/nextM.png" style="width: 35rpx;height: 35rpx;z-index: 1;" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="disja posir" style="z-index: 1;">
@ -36,11 +38,11 @@
<image class="posia" style="top: 0;left: 0;right: 0;bottom: 0;width: 100%;height: 100%;z-index: 0;" src="/static/public/mybt.png" mode=""></image>
</view>
<!-- 员工功能 -->
<view v-if="userInfo.is_staff!=1" class="bacf radius20 mar-s20 pad20">
<view v-if="userInfo.is_staff && yuanList.length!=0" class="bacf radius20 mar-s20 pad20">
<view class="mar-x30 fon28 bold col3">员工功能</view>
<view class="disac yuan-box">
<view @tap="chooseYitem(indexy)" style="width: 33%;display: flex;justify-content: center;align-items: center;position: relative;" v-for="(itemy,indexy) in yuanList" :key="indexy">
<view class="disac fc" >
<view class="disac fc">
<image :src="itemy.src" style="width: 54rpx;height: 54rpx;" mode="aspectFill"></image>
<view class="fon28 mar-s20 mar-x10">{{itemy.title}}</view>
</view>
@ -49,7 +51,7 @@
</view>
</view>
<!-- 广告 -->
<image class="width100 radius20 mar-sx20" src="/static/public/banner.png" style="height: 160rpx;" mode="aspectFill"></image>
<image class="width100 radius20 mar-sx20" :src="guangImg" style="height: 160rpx;" mode="aspectFill"></image>
<!-- 功能列表 -->
<view class="bacf radius20 pad-zy30">
<view @tap="chooseItem(indexl)" class="disjbac pad-sx30 borbot" v-for="(iteml,indexl) in toolsList" :key="indexl">
@ -65,12 +67,6 @@
</view>
</view>
<!-- 我的二维码弹框 -->
<view v-if="isQrcode" class="posAll disjcac">
<view>
@ -87,12 +83,16 @@
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='4'></foot-tab>
<!-- 弹框授权 -->
<empower :vision="vision" @cancleEv="cancleEv"></empower>
<view v-if="isQian" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);">
<view style="padding: 20rpx 40rpx;background-color: rgba(0,0,0,.6);color: #FFFFFF;border-radius: 6rpx;">签到成功</view>
</view>
</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() {
@ -106,10 +106,11 @@
{num:'0',title:'积分'},
{num:'0',title:'我的分享'}
],
yuanList:[
{src:'/static/public/keh.png',title:'客户列表'},
{src:'/static/public/zu.png',title:'用户足迹'},
{src:'/static/public/scan.png',title:'扫码签到'},
yuanList:uni.getStorageSync('rules'), //'customer-list','footmarks','scan'
zanCyuanList:[
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
{src:'/static/public/scan.png',title:'扫码签到',rule:'scan'},
],
toolsList:[
{src:'/static/public/zyuy.png',title:'自助预约',num:''},
@ -119,6 +120,7 @@
{src:'/static/public/message.png',title:'消息通知',num:''},
{src:'/static/public/ts.png',title:'投诉与建议',num:''},
{src:'/static/public/aboutus.png',title:'关于我们',num:''},
{src:'/static/public/aboutus.png',title:'客服二维码',num:''},
],
isQrcode:false,//
userInfo:{},//
@ -129,23 +131,27 @@
is_servicer:'',//01
is_staff:'',//01
titleList:[],
imgList:[]
imgList:[],
isQian:false,
bannerList:[],
guangImg:'',
isAuth:''
}
},
onUnload: function() {
//
let pages = getCurrentPages();
console.log('pages:',pages);
// console.log('pages:',pages);
},
onShow() {
uni.removeStorageSync('uinfo')//
this.$toolAll.tools.isLogin()
this.checkInfo()
uni.removeStorageSync('shareAll')//
},
onLoad() {
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
uni.setStorageSync('footimg',this.imgList)
uni.removeStorageSync('shareAll')//
if(uni.getStorageSync('gao')==''){
const query = wx.createSelectorQuery()
query.select('.gao').boundingClientRect((rect) => {
@ -153,20 +159,32 @@
this.gaoh = rect.height
}).exec()
}
this.checkSwi()
this.checkGM()
// if(uni.getStorageSync('headImg')=='') this.vision = true
if(uni.getStorageSync('headImg')=='') {
this.$toolAll.tools.showToast('您当前是游客,请授权登录')
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
}
// const eventChannel = this.getOpenerEventChannel()
// console.log(eventChannel);
},
methods: {
checkSwi(){
checkBanner({position:'personal-center-banner'}).then(res=>{
// console.log('res',res);
if(res.code==0){
if(res.data.length!=0){
this.guangImg = this.$http + res.data[0].src
// res.data.forEach(item=>{
// let isVideo = false
// if(item.type!='img') isVideo = true
// let banObj = {
// imgSrc:this.$http + item.src,
// url:item.url,
// isVideo:isVideo,
// poster:this.$http + item.src,
// }
// this.bannerList.push(banObj)
// })
}
}
})
},
cancleEv(e){
if(e==0) this.vision = false
},
@ -194,7 +212,17 @@
this.is_doctor = res.data.is_doctor//01
this.is_servicer = res.data.is_servicer//01
this.is_staff = res.data.is_staff//01
if(res.data.is_staff==0){
this.toolsList.splice((this.toolsList.length-1),1)
}
uni.setStorageSync('shareAll',res.data)
if(uni.getStorageSync('rules')==''){
if(res.data.rules.length!=0){
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
this.yuanList = result
uni.setStorageSync('rules',this.yuanList)
} else this.yuanList = []
}
}
},error=>{})
},
@ -208,6 +236,7 @@
if(index==4) newUrl = '/pagesB/messagecenter/messagecenter'
if(index==5) newUrl = '/pagesA/suggestions/suggestions'
if(index==6) newUrl = '/pagesB/aboutUs/aboutUs'
if(index==7) newUrl = '/pagesB/customer/customer'
uni.navigateTo({
url:newUrl
})
@ -236,7 +265,10 @@
this.$requst.post('user/sign-in',{user_coding:uc}).then(res=>{
// console.log('',res);
if(res.code==0){
this.$toolAll.tools.showToast(res.msg)
this.isQian = true
setTimeout(()=>{
this.isQian = false
},2000)
}
},error=>{})
}

View File

@ -5,9 +5,10 @@
<view :style="{height:statusBarHeight+'px',background:publicColor}"></view>
<view class="status-nav" :style="{background:publicColor}">
<!-- 标题 -->
<view class="tab-title tcenter" style="color: #FFFFFF;">首页</view>
<view class="tab-title tcenter" style="color: #FFFFFF;">首页<text v-if="!isNet" class="mar-z20">(...)</text></view>
</view>
</view>
<template v-if="isNet">
<!-- <status-nav :titleVal="'首页'" :backgroudColor="publicColor" :tabcolor="'#FFFFFF'" :statusBack="false" :statusTitle="true"></status-nav> -->
<!-- 输入框 -->
<view class="input-box posiszy" :style="{top: statusHNH+'px',background:publicColor}" style="height: 50px;display: flex;align-items: center;">
@ -24,7 +25,7 @@
<view class="mar-s10 pad-x180">
<!-- 自定义轮播 -->
<view :style="{marginTop: (statusHNH+60)+'px'}">
<swiper-pu></swiper-pu>
<swiper-pu :bannerList="bannerList"></swiper-pu>
</view>
<!-- 宫格 -->
<view v-if="gonggList.length>1" class="mar-zy30 bacf radius10 pad-s25 mar-s10 disac fw">
@ -64,6 +65,12 @@
<list-pu @chooseLike="chooseLike" @comfirmev="comfirmev" :list="dataList"></list-pu>
</view>
</view>
</template>
<template v-else>
<view class="disjcac fc" style="height: 100vh;">
<view class="fon24 col3">{{wuNet}}<text @tap="refresh" style="color: #007AFF;margin-left: 20rpx;">刷新</text></view>
</view>
</template>
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList"></foot-tab>
<!-- 返回顶部 -->
@ -73,7 +80,7 @@
<script>
import swiperPu from '@/components/swiper-pu.vue';
import {collectionEV,cancleCollectionEV} from '@/jsFile/publicAPI.js';
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{
swiperPu
@ -83,44 +90,15 @@
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
statusHNH:uni.getStorageSync('statusHNH'),
searchVal:'',//
publicColor:uni.getStorageSync('publicColor'),//
publicColor:'',//
gonggList:[//
// {src:'/static/public/tuof.png',title:''},
// {src:'/static/public/zhif.png',title:''},
// {src:'/static/public/toub.png',title:''},
// {src:'/static/public/tous.png',title:''},
// {src:'/static/public/zhir.png',title:''},
// {src:'/static/public/zhij.png',title:''},
// {src:'/static/public/zhis.png',title:''},
// {src:'/static/public/gengd.png',title:''},
],
fwList:[//
// {title:''},
// {title:''},
// {title:''},
// {title:''},
// {title:''},
// {title:''},
],
kcurrent:0,//
ktList:[//
// {title:'线'},
// {title:''},
// {title:''},
// {title:''},
// {title:''},
],
dataList:[//
// {
// status:false,
// main_img:'/static/public/main_img.png',
// title:'',
// content:'',
// head_img:'/static/public/like.png',
// name:'',
// isCate:0,
// isVideo:false
// },
],
showTop:false,
newCurrent:0,
@ -135,7 +113,12 @@
imgList:[],//
gaoone:{},
gaotwo:{},
gaothree:{}
gaothree:{},
isNet:true,
wuNet:'当前无网络连接',
refTime:'',
reNum:0,
bannerList:[]//
}
},
onPageScroll(e) {
@ -151,6 +134,8 @@
}
},
onShow() {
this.checkNet()
this.$toolAll.tools.isLogin()
let maiOjb = {
e:6,//
t:new Date().getTime()//
@ -171,9 +156,63 @@
this.checkKT()
this.checkBCate()
this.checkKey()
this.checkSwi()//
// this.checkBanner()//
this.$toolAll.tools.buriedPointAll()//id
},
methods: {
checkSwi(){
checkBanner({position:'home-banner'}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let isVideo = false
if(item.type!='img') isVideo = true
let banObj = {
imgSrc:this.$http + item.src,
url:item.url,
isVideo:isVideo,
poster:this.$http + item.src,
}
this.bannerList.push(banObj)
})
}
//
}
})
},
checkNet(){
uni.getNetworkType({
success: (res)=> {
if(res.networkType=='none'){
uni.setStorageSync('isNet',false)
this.isNet = false
if((this.reNum++)==5){
clearInterval(this.refTime)
this.wuNet = '刷新失败'
this.reNum = 0
}
this.publicColor = uni.getStorageSync('publicColor')
} else {
uni.setStorageSync('isNet',true)
this.isNet = true
clearInterval(this.refTime)
if(this.wuNet == '正在刷新...') {
getCurrentPages()[getCurrentPages().length - 1].onLoad()
}
}
}
});
},
refresh(){
this.wuNet = '正在刷新...'
this.refTime = setInterval(()=>{
this.checkNet()
},1000)
},
bangd(){//
this.$requst.post('').then(res=>{console.log('绑定客服:',res);},error=>{})
},
tapChoose(index){//
let newUrl = ''
if(index==0) newUrl = this.gaoone.url
@ -257,6 +296,8 @@
url:res.data.ad[2].link,
}
}
// this.publicColor = res.data.mainColor
this.publicColor = uni.getStorageSync('publicColor')
}
}
},error=>{})

View File

@ -18,6 +18,9 @@
imgList:[]
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')

View File

@ -72,6 +72,7 @@
}
},
onShow() {
this.$toolAll.tools.isLogin()
this.checkPoint()//
this.$toolAll.tools.showToast('加载中...','loading')
},

View File

@ -107,9 +107,15 @@
newProvice:'',//
newCity:'',//
newDistrict:'',//
whereCome:1
whereCome:0
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onUnload() {
uni.removeStorageSync('firstInfo')
},
onLoad(options) {
if(options.whereNum==2){
this.whereCome = options.whereNum
@ -123,6 +129,9 @@
this.getDistrict(res.latitude, res.longitude)
},
})
let firstObj = uni.getStorageSync('firstInfo')
console.log('firstObj',firstObj);
if(firstObj==''){
let obj = uni.getStorageSync('uinfo')
if(obj!='') this.uinfo = obj
this.dataList[0].imgSrc = obj.headimgurl//
@ -133,7 +142,11 @@
obj.real_name!=null && obj.real_name !='' ? this.dataList[5].content = obj.real_name : this.dataList[5].fcon = '未知'//
obj.mobile!='' ? this.dataList[6].content = obj.mobile : this.dataList[6].fcon = '未知'//
if(obj.county!='') this.pickerText = obj.province + obj.city + obj.county//
} else {
this.dataList[0].imgSrc = firstObj.headimgurl//
this.dataList[1].content = firstObj.nickname//
this.current = firstObj.gender//12,0
}
},
methods: {
updataInfo(){//

View File

@ -107,6 +107,9 @@
btnCon:'立即提交'
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.category = this.xialone[0]
this.categoryT = this.xialTwo[0]

View File

@ -71,6 +71,9 @@
btnCon:'立即提交'
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkCate()
},

View File

@ -5,7 +5,7 @@
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32">
<!-- 自定义轮播 -->
<view class="mar-s20">
<swiper-pu :newHeight="'200'" :newRadius="'10'" :newBottom="'5'"></swiper-pu>
<swiper-pu :bannerList="bannerList" :newHeight="'200'" :newRadius="'10'" :newBottom="'5'"></swiper-pu>
</view>
<!-- 导航 -->
<view class="mar-s50 pad-s10">
@ -33,6 +33,7 @@
<script>
import swiperPu from '@/components/swiper-pu.vue';
import {checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{
swiperPu
@ -63,6 +64,7 @@
size:10,
total:'',//
isZanw:true,
bannerList:[]
}
},
onPageScroll(e) {
@ -77,10 +79,36 @@
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkAbout(this.category_id)
this.checkSwi()
},
methods: {
checkSwi(){
checkBanner({position:'home-banner'}).then(res=>{
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
let isVideo = false
if(item.type!='img') isVideo = true
let haveImg = ''
if(item.src!='') haveImg = this.$http + item.src
let banObj = {
imgSrc:haveImg,
url:item.url,
isVideo:isVideo,
poster:this.$http + item.src,
}
this.bannerList.push(banObj)
})
}
//
}
})
},
checkAbout(category_id){
let params = {
category_id:category_id,

View File

@ -40,6 +40,9 @@
isLoading:false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad(options) {
this.checkDetail(options.id)
},

View File

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

@ -79,6 +79,9 @@
this.dataList.push(obj)
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.category = this.xialone[0]
},

View File

@ -23,7 +23,8 @@
</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 v-if="keyword!=''" class="fon24 col3"></view>
<view v-if="keyword==''" class="fon24 col3"></view>
</view>
<!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
@ -68,6 +69,9 @@
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkDor()
},

View File

@ -67,7 +67,7 @@
],
showTop:false,
newCurrent:0,
category_id:'',//ID
category_id:0,//ID
moImg:'/static/public/logo.png',
doctorObj:{},//
page:1,
@ -93,6 +93,9 @@
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad(options) {
this.checkDoD(options.doctor_id)
this.checkConList(this.category_id)
@ -119,7 +122,7 @@
page:this.page,
size:this.size
}
this.$requst.post('archives/collects',params).then(res=>{
this.$requst.post('archives/hot',params).then(res=>{
if(res.code==0){
//
if(uni.getStorageSync('cateList')==''){//
@ -137,10 +140,12 @@
this.cateList.push(cateObj)
})
uni.setStorageSync('cateList',this.cateList)
this.category_id = this.cateList[0].id
}
} else {
//
this.cateList = uni.getStorageSync('cateList')
this.category_id = this.cateList[0].id
}
//
if(this.page==1) this.dataList = []

View File

@ -72,6 +72,9 @@
// this.dataList.push(obj)
// }
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkMsg()
},

View File

@ -59,6 +59,9 @@
onUnload() {
uni.removeStorageSync('cateList')
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkConList(this.category_id)
const query = wx.createSelectorQuery()

View File

@ -75,6 +75,9 @@
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
if(uni.getStorageSync('navHeight')==''){
const query = wx.createSelectorQuery()

View File

@ -10,7 +10,7 @@
<image class="width100 radius20" :src="imgSrc" mode="widthFix" lazy-load></image>
</view>
<!-- 分享按钮 -->
<view @tap="shareEv" class="disjcac radius20 posir" style="height: 90rpx;margin: 20rpx 80rpx 0 80rpx;background-color: #38CE51;line-height: 90rpx;">
<view v-if="showBtn" @tap="shareEv" class="disjcac radius20 posir" style="height: 90rpx;margin: 20rpx 80rpx 0 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>
@ -36,12 +36,21 @@
publicColor:uni.getStorageSync('publicColor'),//
isShowT:true,
imgSrc:uni.getStorageSync('imgSrcP'),
isHaib:false
isHaib:false,
showBtn:false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
//
this.imgSrc = uni.getStorageSync('imgSrcP')//
if(this.imgSrc!='') {
setTimeout(()=>{
this.showBtn = true
},500)
}
},
methods: {
shareEv(){
@ -60,6 +69,7 @@
this.$toolAll.tools.showToast('生成海报成功')
base64ToPath(this.imgSrc).then(path => {
this.imgSrc = path
this.showBtn = true
uni.setStorageSync('imgSrcP',path)
}).catch(error => {})
}

View File

@ -5,7 +5,7 @@
<!-- 列表 -->
<view :style="{top: statusHNH+'px'}" class="posiszy" style="height: 50px;">
<view class="bacf pad-zy32 pad-sx20">
<cate-pu @choosecateEv="choosecateEv" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
<cate-pu @choosecateEv="choosecateEv" :activeb="publicColor" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
</view>
</view>
<view class="" :style="{paddingTop: (statusHNH+50)+'px'}" style="padding-bottom: 118rpx;">
@ -161,7 +161,6 @@
xgList:[//
],
dataList:[//
// {imgSrc:'/static/public/doctor.png',name:'',cyear:'16',bmen:'',zcheng:'',goodAt:''},
],
showTop:false,
isDetailLike:false,//
@ -170,18 +169,16 @@
isNum:0,
listArrone:[],//
listArrtwo:[//
// {status:false,main_img:'/static/public/main_four.png',title:'',content:'',head_img:'/static/public/like.png',name:'',isCate:1},
],
listArrthree:[//
// {status:false,main_img:'/static/public/main_two.png',title:'',content:'',head_img:'/static/public/like.png',name:'',isCate:2},
],
listArrfour:[//
// {status:false,main_img:'/static/public/main_three.png',title:'',content:'',head_img:'/static/public/like.png',name:'',isCate:3},
],
detailObj:{},//
detailInfo:'',//
category_id:'',//ID
active:'',//
jieDuan:false
}
},
onPageScroll(e) {
@ -237,6 +234,9 @@
  };
  return shareObj;
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad(options) {
if(options.category_id!=undefined) {
this.category_id = options.category_id
@ -249,7 +249,7 @@
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
if(uni.getStorageSync('headImg')=='') this.haveImg = false
if(uni.getStorageSync('is_active')==0) this.haveImg = false
},
methods: {
chooseLike(e){//
@ -321,15 +321,10 @@
url:'/pages/tabbar/pagehome/pagehome'
})
},
lianK(){
if(uni.getStorageSync('headImg')=='') {
this.$toolAll.tools.showToast('您当前是游客,请授权登录')
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
} else {
lianK(){//
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
let maiOjb = {
@ -337,6 +332,7 @@
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
} else this.jieDuan = true
}
},
buttonH(e){
@ -346,14 +342,10 @@
if(e==0) this.vision = false
},
shareEv(){
if(uni.getStorageSync('headImg')=='') {
this.$toolAll.tools.showToast('您当前是游客,请授权登录')
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
} else {this.haveImg=true}
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){this.haveImg=true} else this.jieDuan = true
}
},
checkDetail(newId){
this.$requst.post('archives/detail',{id:newId}).then(res=>{
@ -385,21 +377,9 @@
else this.likeCon = this.detailObj.likes
}
//
//
if(this.detailObj.video!=''){
this.bannerList = [
{
imgSrc:this.$http + this.detailObj.cover,
url:this.$http + this.detailObj.video,
isVideo:true,
poster:'',
}
]
}
//
let arrImg = this.detailObj.images.split(',')
arrImg.forEach(item=>{
console.log(item);
let newImgObj = {
imgSrc:this.$http + item,
url:'',
@ -409,7 +389,15 @@
//
this.bannerList.push(newImgObj)
})
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
imgSrc: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
@ -501,14 +489,9 @@
},error=>{})
},
tapLike(){//
if(uni.getStorageSync('headImg')=='') {
this.$toolAll.tools.showToast('您当前是游客,请授权登录')
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
} else {
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
this.isDetailLike = !this.isDetailLike
if(this.isDetailLike){
this.detailObj.likes++
@ -523,23 +506,20 @@
if(this.isDetailLike) collectionEV({action:isLikeCon,archive_id:this.detailObj.id})
//
else cancleCollectionEV({action:isLikeCon,archive_id:this.detailObj.id})
} else this.jieDuan = true
}
},
tapConllection(){//
let isLikeCon = 'collect'
if(uni.getStorageSync('headImg')=='') {
this.$toolAll.tools.showToast('您当前是游客,请授权登录')
setTimeout(()=>{
uni.navigateTo({
url:'/pages/login/login'
})
},1500)
} else {
if(!this.jieDuan){
let isAuth = this.$toolAll.tools.returnAuth()
if(!isAuth){
//
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.jieDuan = true
}
},
backTop(){//

View File

@ -106,6 +106,7 @@
this.checkSearchHistory()
},
onShow() {
this.$toolAll.tools.isLogin()
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
},
methods: {

View File

@ -72,6 +72,9 @@
  };
  return shareObj;
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0
},

View File

@ -8,23 +8,27 @@
<view class="radius20 fon28 col3 mar-sx20">
<view class="disac">
<view class="disjbac width100 radius10 pad-zy20 xialak bacf">
<input class="fon28" type="text" value="" placeholder="请输入姓名/电话查找" placeholder-style="color: #B3B3B3;" />
<input class="fon28 width100" type="text" v-model="keyword" placeholder="请输入姓名/电话查找" placeholder-style="color: #B3B3B3;" />
</view>
<view class="flexs tc mar-z30 colf radius10 customer-btn" :style="{background:publicColor}">搜索</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 @tap="chooseId(item.id)" class="bacf radius10 pad20 mar-x20 fon28" v-for="(item,index) in dataList" :key="index">
<view style="color: #B3B3B3;">{{item.time}}</view>
<view class="mar-s20">
<text class="bold col3">{{item.name}}</text>
<text style="color: #B3B3B3;">查看了</text>
<text class="bold col3">{{item.title}}</text>
<text style="color: #B3B3B3;">{{item.zwhat}}</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" 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> -->
<back-top :showTop="showTop" @backTop="backTop"></back-top>
</view>
</view>
</template>
@ -35,34 +39,80 @@
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
dataList:[
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'日记'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'日记'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'日记'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'日记'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'},
{name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'},
],
showTop:false,
dataList:[],//
showTop:false,//
customer_id:'',//ID
keyword:'',//
page:1,
size:10,
total:'',//
isZanw:true
}
},
onPageScroll(e) {
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
},
onReachBottom() {//
for (let i = 0; i < 4; i++) {
let obj = {name:'恒美小姐姐',title:'秃顶如何治疗',time:'2021-07-15 20:26:16',zwhat:'案例'}
this.dataList.push(obj)
if(this.total!=this.dataList.length){
this.page++
this.checkList()
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多足迹内容')
this.isZanw = false
}
},
onShow() {
this.$toolAll.tools.isLogin()
},
onLoad() {
this.checkList()
},
methods: {
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
}
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,
}
this.dataList.push(obj)
})
}
}
},error=>{})
},
backTop(){//
uni.pageScrollTo({
scrollTop: 0,

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.