master
parent
a63409f75f
commit
0a8e7a747f
|
@ -2,10 +2,19 @@
|
||||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||||
"version": "0.0",
|
"version": "0.0",
|
||||||
"configurations": [{
|
"configurations": [{
|
||||||
"type": "uniCloud",
|
"default" :
|
||||||
"default": {
|
{
|
||||||
"launchtype": "local"
|
"launchtype" : "local"
|
||||||
}
|
},
|
||||||
}
|
"h5" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"mp-weixin" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"type" : "uniCloud"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
4
App.vue
4
App.vue
|
@ -13,7 +13,9 @@
|
||||||
toolAll.tools.networkStatus()//检查当前网络状态
|
toolAll.tools.networkStatus()//检查当前网络状态
|
||||||
toolAll.tools.updaX()//检测版本更新
|
toolAll.tools.updaX()//检测版本更新
|
||||||
}
|
}
|
||||||
toolAll.tools.overdue()//查询是否第一次授权
|
setTimeout(()=>{
|
||||||
|
toolAll.tools.overdue()//查询是否第一次授权
|
||||||
|
},3000)
|
||||||
// checkSwip()//查询轮播图位置
|
// checkSwip()//查询轮播图位置
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
.posia{position: absolute;}
|
.posia{position: absolute;}
|
||||||
.posiszy{position: fixed;left: 0;right: 0;z-index: 2;}
|
.posiszy{position: fixed;left: 0;right: 0;z-index: 2;}
|
||||||
.posixzy{position: fixed;left: 0;right: 0;z-index: 2;bottom: 0;}
|
.posixzy{position: fixed;left: 0;right: 0;z-index: 2;bottom: 0;}
|
||||||
|
.syxzo{top: 0;left: 0;right: 0;bottom: 0;opacity: 0;}
|
||||||
|
|
||||||
|
|
||||||
.dis{display: flex;}
|
.dis{display: flex;}
|
||||||
|
|
16499
components/city/city.js
16499
components/city/city.js
File diff suppressed because one or more lines are too long
|
@ -59,11 +59,11 @@
|
||||||
methods:{
|
methods:{
|
||||||
backEvent(){//返回事件
|
backEvent(){//返回事件
|
||||||
if(this.whereCome==1){
|
if(this.whereCome==1){
|
||||||
uni.navigateTo({
|
uni.reLaunch({
|
||||||
url:'/pages/tabbar/pagehome/pagehome'
|
url:'/pages/tabbar/pagehome/pagehome'
|
||||||
})
|
})
|
||||||
} else if(this.whereCome==2){
|
} else if(this.whereCome==2){
|
||||||
uni.navigateTo({
|
uni.reLaunch({
|
||||||
url:'/pages/tabbar/my/my'
|
url:'/pages/tabbar/my/my'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
newRadius:{//图片圆角
|
newRadius:{//图片圆角
|
||||||
type:String,
|
type:String,
|
||||||
default:'0'
|
default:'0'
|
||||||
|
},
|
||||||
|
browseP:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -62,9 +66,27 @@
|
||||||
chooseImg(index){
|
chooseImg(index){
|
||||||
// console.log('当前banner图',index);
|
// console.log('当前banner图',index);
|
||||||
this.bcurrent = index
|
this.bcurrent = index
|
||||||
uni.navigateTo({
|
if(this.browseP){
|
||||||
url:this.bannerList[index].url
|
let imgList = []
|
||||||
})
|
this.bannerList.forEach(item=>{
|
||||||
|
let nurl = ''
|
||||||
|
item.url=='' ? nurl = item.imgSrc : nurl = item.url
|
||||||
|
let obj = {
|
||||||
|
url:nurl,
|
||||||
|
type:item.isVideo?'video':'image',
|
||||||
|
poster:item.poster
|
||||||
|
}
|
||||||
|
imgList.push(obj)
|
||||||
|
})
|
||||||
|
uni.previewMedia({
|
||||||
|
current:this.bcurrent,
|
||||||
|
sources:imgList
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:this.bannerList[index].url
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
changeBanner(e){
|
changeBanner(e){
|
||||||
this.bcurrent = e.detail.current//当前的指示点下标
|
this.bcurrent = e.detail.current//当前的指示点下标
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const ENV = process.env.NODE_ENV;
|
const ENV = process.env.NODE_ENV;
|
||||||
// console.log('当前环境', process.env.NODE_ENV)
|
console.log('当前环境', process.env.NODE_ENV)
|
||||||
|
|
||||||
const apiHub = {
|
const apiHub = {
|
||||||
//开发环境
|
//开发环境
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import base from '@/jsFile/config.js'
|
const domainName = 'https://hm.hmzfyy.cn/api/'//域名配置
|
||||||
// 统一给参数
|
// 统一给参数
|
||||||
const dataObj = (url, params) => {
|
const dataObj = (url, params) => {
|
||||||
let options = params
|
let options = params
|
||||||
|
@ -34,11 +34,7 @@ const checkError = (e, reject) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reject(e.data)
|
reject(e.data)
|
||||||
} else {
|
} else reject({msg:'接口错误'})
|
||||||
reject({
|
|
||||||
'msg': '接口错误'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 封装请求
|
// 封装请求
|
||||||
|
@ -49,7 +45,6 @@ const request = (method, url, options) => {
|
||||||
case 'get':
|
case 'get':
|
||||||
methods = 'GET'
|
methods = 'GET'
|
||||||
headers = {
|
headers = {
|
||||||
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
||||||
}
|
}
|
||||||
|
@ -58,7 +53,6 @@ const request = (method, url, options) => {
|
||||||
methods = 'POST'
|
methods = 'POST'
|
||||||
headers = {
|
headers = {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
// "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
||||||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -84,9 +78,8 @@ const request = (method, url, options) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
//!hideLoading && uni.showToast({title: loadingText,icon:'loading'})
|
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${base.BASE_URL}${url}`,
|
url: `${domainName}${url}`,
|
||||||
method: methods,
|
method: methods,
|
||||||
data: dataObj(url, options),
|
data: dataObj(url, options),
|
||||||
header: headers,
|
header: headers,
|
||||||
|
@ -116,13 +109,10 @@ const request = (method, url, options) => {
|
||||||
// 上传文件 封装请求
|
// 上传文件 封装请求
|
||||||
const uploadFile = (url, options) => {
|
const uploadFile = (url, options) => {
|
||||||
let tempData = options || {}
|
let tempData = options || {}
|
||||||
uni.showLoading({
|
uni.showLoading({title: "上传中..."})
|
||||||
title: "上传中..."
|
|
||||||
})
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// console.log('tempData',tempData);
|
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: `${base.BASE_URL}${url}`,
|
url: `${domainName}${url}`,
|
||||||
filePath: tempData.file,
|
filePath: tempData.file,
|
||||||
name: 'image',
|
name: 'image',
|
||||||
fileType:'image',
|
fileType:'image',
|
||||||
|
@ -169,17 +159,14 @@ export default {
|
||||||
get: (url, options) => {
|
get: (url, options) => {
|
||||||
return request('get', url, options)
|
return request('get', url, options)
|
||||||
},
|
},
|
||||||
|
|
||||||
// JOSN格式
|
// JOSN格式
|
||||||
post: (url, options) => {
|
post: (url, options) => {
|
||||||
return request('post', url, options)
|
return request('post', url, options)
|
||||||
},
|
},
|
||||||
|
|
||||||
// form-data格式
|
// form-data格式
|
||||||
postForm: (url, options) => {
|
postForm: (url, options) => {
|
||||||
return request('postForm', url, options)
|
return request('postForm', url, options)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 上传
|
// 上传
|
||||||
upload: (url, options) => {
|
upload: (url, options) => {
|
||||||
return uploadFile(url, options)
|
return uploadFile(url, options)
|
||||||
|
|
|
@ -6,7 +6,7 @@ const tools = {
|
||||||
daoTime(){
|
daoTime(){
|
||||||
let daoTime = uni.getStorageSync('daoTime')
|
let daoTime = uni.getStorageSync('daoTime')
|
||||||
if(daoTime==''){//初次判断倒计时是否为空
|
if(daoTime==''){//初次判断倒计时是否为空
|
||||||
uni.setStorageSync('daoTime',6000)//设置倒计时
|
uni.setStorageSync('daoTime',600)//设置倒计时
|
||||||
daoTime = uni.getStorageSync('daoTime')
|
daoTime = uni.getStorageSync('daoTime')
|
||||||
this.timer = setInterval(()=>{
|
this.timer = setInterval(()=>{
|
||||||
uni.setStorageSync('daoTime',daoTime--)//设置倒计时
|
uni.setStorageSync('daoTime',daoTime--)//设置倒计时
|
||||||
|
@ -38,7 +38,6 @@ const tools = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
zhuColorT(){//调用主色调
|
zhuColorT(){//调用主色调
|
||||||
console.log('tools');
|
|
||||||
zhuColor()
|
zhuColor()
|
||||||
},
|
},
|
||||||
networkStatus(){//检查网络状态
|
networkStatus(){//检查网络状态
|
||||||
|
@ -102,11 +101,6 @@ const tools = {
|
||||||
// },
|
// },
|
||||||
hideName(name,num){
|
hideName(name,num){
|
||||||
let hname = ''
|
let hname = ''
|
||||||
// let reg = /(?<=.)./g;
|
|
||||||
// let reg = new RegExp("(?<=.).", 'g');
|
|
||||||
|
|
||||||
// if(num==1) hname = name.replace(reg, '*')
|
|
||||||
// if(num==2) hname = `${name.substr(0, 1)}****${name.substr(name.length-1)}`
|
|
||||||
hname = `${name.substr(0, 1)}****${name.substr(name.length-1)}`
|
hname = `${name.substr(0, 1)}****${name.substr(name.length-1)}`
|
||||||
return hname
|
return hname
|
||||||
},
|
},
|
||||||
|
@ -244,7 +238,7 @@ const tools = {
|
||||||
clearClog(){//去除某环境下的所有console.log()//输出信息
|
clearClog(){//去除某环境下的所有console.log()//输出信息
|
||||||
// uniapp性能优化
|
// uniapp性能优化
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if(uni.getSystemInfoSync().platform != "devtools"){//devtools:开发版 值域为:ios、android、mac(3.1.10+)、windows(3.1.10+)、linux(3.1.10+)
|
if(uni.getSystemInfoSync().platform != "devtool"){//devtools:开发版 值域为:ios、android、mac(3.1.10+)、windows(3.1.10+)、linux(3.1.10+)
|
||||||
console.log = () =>{}
|
console.log = () =>{}
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
@ -297,11 +291,13 @@ const tools = {
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if(res.data.data.token!=''){
|
if(res.data.data.token!=''){
|
||||||
|
uni.removeStorageSync('ninvite_code')
|
||||||
uni.setStorageSync('token',res.data.data.token)//缓存token
|
uni.setStorageSync('token',res.data.data.token)//缓存token
|
||||||
uni.setStorageSync('openid',res.data.data.openid)//缓存Openid
|
uni.setStorageSync('openid',res.data.data.openid)//缓存Openid
|
||||||
uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式)
|
uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式)
|
||||||
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
||||||
uni.setStorageSync('userId',res.data.data.account_id)
|
uni.setStorageSync('userId',res.data.data.account_id)
|
||||||
|
uni.setStorageSync('invite_code',res.data.data.invite_code)
|
||||||
// console.log('is_active',uni.getStorageSync('is_active'));
|
// console.log('is_active',uni.getStorageSync('is_active'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
main.js
2
main.js
|
@ -27,6 +27,8 @@ Vue.prototype.$requst = requst;
|
||||||
// Vue.prototype.$http = 'https://hm.hmzfyy.cn'
|
// Vue.prototype.$http = 'https://hm.hmzfyy.cn'
|
||||||
Vue.prototype.$http = 'https://oss.hmzfyy.cn'
|
Vue.prototype.$http = 'https://oss.hmzfyy.cn'
|
||||||
|
|
||||||
|
const {log} = console;
|
||||||
|
Vue.prototype.$log = log
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,9 @@
|
||||||
channel:'',//来源渠道,二维码或分享链接中携带的来源渠道参数(恒美)
|
channel:'',//来源渠道,二维码或分享链接中携带的来源渠道参数(恒美)
|
||||||
invite_source:'',//邀请码来源[def默认|link分享注册|qr扫码注册]
|
invite_source:'',//邀请码来源[def默认|link分享注册|qr扫码注册]
|
||||||
isShowT:false,
|
isShowT:false,
|
||||||
infoObj:{}
|
infoObj:{},
|
||||||
|
titleList:[],//底部导航文字
|
||||||
|
imgList:[],//底部导航图标
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
@ -80,6 +82,7 @@
|
||||||
desc: '登录',
|
desc: '登录',
|
||||||
lang: 'zh_CN',
|
lang: 'zh_CN',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
// console.log('res',res);
|
||||||
ya.userInfo = res.userInfo;
|
ya.userInfo = res.userInfo;
|
||||||
// console.log('可用用户信息:',ya.userInfo);
|
// console.log('可用用户信息:',ya.userInfo);
|
||||||
try {
|
try {
|
||||||
|
@ -146,11 +149,13 @@
|
||||||
uni.setStorageSync('token',res.data.token)//缓存token
|
uni.setStorageSync('token',res.data.token)//缓存token
|
||||||
uni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)
|
uni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)
|
||||||
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
||||||
|
uni.setStorageSync('invite_code',res.data.invite_code)
|
||||||
this.isShowT = true
|
this.isShowT = true
|
||||||
this.infoObj = {
|
this.infoObj = {
|
||||||
headimgurl:ya.userInfo.avatarUrl,
|
headimgurl:ya.userInfo.avatarUrl,
|
||||||
nickname:ya.userInfo.nickName,
|
nickname:ya.userInfo.nickName,
|
||||||
gender:ya.userInfo.gender
|
gender:ya.userInfo.gender,
|
||||||
|
coding:res.data.coding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},error => {})
|
},error => {})
|
||||||
|
|
|
@ -72,9 +72,7 @@
|
||||||
|
|
||||||
],
|
],
|
||||||
showTop:false,//是否显示返回顶部
|
showTop:false,//是否显示返回顶部
|
||||||
tuList:[
|
tuList:[],
|
||||||
|
|
||||||
],
|
|
||||||
newCurrent:0,
|
newCurrent:0,
|
||||||
cateW:'',//分类宽度
|
cateW:'',//分类宽度
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
|
@ -209,11 +207,7 @@
|
||||||
if(this.page==1) this.dataList = []
|
if(this.page==1) this.dataList = []
|
||||||
if(res.data.list.list.length!=0){
|
if(res.data.list.list.length!=0){
|
||||||
this.total = res.data.list.total
|
this.total = res.data.list.total
|
||||||
// uni.hideToast()
|
|
||||||
res.data.list.list.forEach(item=>{
|
res.data.list.list.forEach(item=>{
|
||||||
let num = item.video.search(".mp4")
|
|
||||||
let isVideo = false
|
|
||||||
if(num!='-1') isVideo = true
|
|
||||||
let tObj = {
|
let tObj = {
|
||||||
category_id:item.category_id,//栏目ID
|
category_id:item.category_id,//栏目ID
|
||||||
id:item.id,
|
id:item.id,
|
||||||
|
@ -226,7 +220,7 @@
|
||||||
content:item.subtitle,//副标题
|
content:item.subtitle,//副标题
|
||||||
head_img:'/static/public/logo.png',//发布者头像
|
head_img:'/static/public/logo.png',//发布者头像
|
||||||
name:'恒美植发',//发布者昵称
|
name:'恒美植发',//发布者昵称
|
||||||
isVideo:isVideo//是否是视频
|
isVideo:item.video.includes(".mp4")//是否是视频
|
||||||
}
|
}
|
||||||
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
||||||
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
{num:'0',title:'积分'},
|
{num:'0',title:'积分'},
|
||||||
{num:'0',title:'我的分享'}
|
{num:'0',title:'我的分享'}
|
||||||
],
|
],
|
||||||
yuanList:uni.getStorageSync('rules'), //'customer-list','footmarks','scan'
|
yuanList:[], //'customer-list','footmarks','scan'
|
||||||
zanCyuanList:[
|
zanCyuanList:[
|
||||||
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
|
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
|
||||||
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
|
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
|
||||||
|
@ -148,8 +148,49 @@
|
||||||
this.$toolAll.tools.isLogin()
|
this.$toolAll.tools.isLogin()
|
||||||
this.checkInfo()
|
this.checkInfo()
|
||||||
uni.removeStorageSync('shareAll')//清空分享中心里的统计信息
|
uni.removeStorageSync('shareAll')//清空分享中心里的统计信息
|
||||||
|
this.$requst.post('index/mini-program-setting').then(res=>{
|
||||||
|
// log('数据:',res);
|
||||||
|
if(res.code==0){
|
||||||
|
if(res.data.length!=0){
|
||||||
|
if(res.data.footBar.length!=0){//底部导航
|
||||||
|
res.data.footBar.forEach(item=>{
|
||||||
|
let newName = item.name
|
||||||
|
let newObj = {
|
||||||
|
iconPath:this.$http + item.icon[0],
|
||||||
|
selectedIconPath:this.$http + item.icon[1],
|
||||||
|
}
|
||||||
|
if(item.key=="home"){
|
||||||
|
this.imgList[0] = newObj
|
||||||
|
this.titleList[0] = newName
|
||||||
|
}
|
||||||
|
if(item.key=="category"){
|
||||||
|
this.imgList[1] = newObj
|
||||||
|
this.titleList[1] = newName
|
||||||
|
}
|
||||||
|
if(item.key=="service"){
|
||||||
|
this.imgList[2] = newObj
|
||||||
|
this.titleList[2] = newName
|
||||||
|
}
|
||||||
|
if(item.key=="shop"){
|
||||||
|
this.imgList[3] = newObj
|
||||||
|
this.titleList[3] = newName
|
||||||
|
}
|
||||||
|
if(item.key=="my"){
|
||||||
|
this.imgList[4] = newObj
|
||||||
|
this.titleList[4] = newName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.setStorageSync('footTitle',this.titleList)
|
||||||
|
uni.setStorageSync('footimg',this.imgList)
|
||||||
|
this.titleList = uni.getStorageSync('footTitle')
|
||||||
|
this.imgList = uni.getStorageSync('footimg')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},error=>{})
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
console.log('123');
|
||||||
this.titleList = uni.getStorageSync('footTitle')
|
this.titleList = uni.getStorageSync('footTitle')
|
||||||
this.imgList = uni.getStorageSync('footimg')
|
this.imgList = uni.getStorageSync('footimg')
|
||||||
if(uni.getStorageSync('gao')==''){
|
if(uni.getStorageSync('gao')==''){
|
||||||
|
@ -219,16 +260,16 @@
|
||||||
this.is_servicer = res.data.is_servicer//是否为客服,0否,1是
|
this.is_servicer = res.data.is_servicer//是否为客服,0否,1是
|
||||||
this.is_staff = res.data.is_staff//是否为普通员工,0否,1是
|
this.is_staff = res.data.is_staff//是否为普通员工,0否,1是
|
||||||
if(res.data.is_staff==1){
|
if(res.data.is_staff==1){
|
||||||
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
|
if(this.toolsList.length!=8){
|
||||||
|
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uni.setStorageSync('shareAll',res.data)
|
uni.setStorageSync('shareAll',res.data)
|
||||||
if(uni.getStorageSync('rules')==''){
|
if(res.data.rules.length!=0){
|
||||||
if(res.data.rules.length!=0){
|
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
|
||||||
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
|
this.yuanList = result
|
||||||
this.yuanList = result
|
uni.setStorageSync('rules',res.data.rules)
|
||||||
uni.setStorageSync('rules',this.yuanList)
|
} else this.yuanList = []
|
||||||
} else this.yuanList = []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},error=>{})
|
},error=>{})
|
||||||
},
|
},
|
||||||
|
|
|
@ -79,6 +79,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const {log} = console;
|
||||||
import swiperPu from '@/components/swiper-pu.vue';
|
import swiperPu from '@/components/swiper-pu.vue';
|
||||||
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
|
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
|
||||||
export default {
|
export default {
|
||||||
|
@ -134,6 +135,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
log('输出的解构')
|
||||||
this.checkNet()
|
this.checkNet()
|
||||||
this.$toolAll.tools.isLogin()
|
this.$toolAll.tools.isLogin()
|
||||||
let maiOjb = {
|
let maiOjb = {
|
||||||
|
@ -147,10 +149,44 @@
|
||||||
}
|
}
|
||||||
this.checkKT()
|
this.checkKT()
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
|
if (options && options.q) {
|
||||||
|
let arr = decodeURIComponent(options.q).split('?')[1].split('&')
|
||||||
|
let obj = {}
|
||||||
|
arr.forEach(item => {
|
||||||
|
let brr = item.split('=')
|
||||||
|
obj[brr[0]] = brr[1]
|
||||||
|
})
|
||||||
|
console.log(obj);
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: (res)=> {
|
||||||
|
var params = ''
|
||||||
|
if(obj.channel!='' && obj.channel!=undefined){
|
||||||
|
params = {
|
||||||
|
code:res.code,
|
||||||
|
channel:obj.channel,
|
||||||
|
source_code:obj.source_code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(obj.invite_code!='' && obj.invite_code!=undefined){
|
||||||
|
params = {
|
||||||
|
code:res.code,
|
||||||
|
invite_code:obj.invite_code,//用户邀请码
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(obj.coding!='' && obj.coding!=undefined){
|
||||||
|
params = {service_coding:obj.coding}
|
||||||
|
this.$requst.post('user/bind-service',params).then(res => {console.log('调用成功');},error => {})
|
||||||
|
} else {
|
||||||
|
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
const query = wx.createSelectorQuery()
|
const query = wx.createSelectorQuery()
|
||||||
query.select('.statusHNH').boundingClientRect((rect) => {
|
query.select('.statusHNH').boundingClientRect((rect) => {
|
||||||
// console.log('状态栏+标题栏:',rect.height);
|
// log('状态栏+标题栏:',rect.height);
|
||||||
uni.setStorageSync('statusHNH',rect.height)
|
uni.setStorageSync('statusHNH',rect.height)
|
||||||
this.statusHNH = rect.height
|
this.statusHNH = rect.height
|
||||||
}).exec()
|
}).exec()
|
||||||
|
@ -211,7 +247,7 @@
|
||||||
},1000)
|
},1000)
|
||||||
},
|
},
|
||||||
bangd(){//绑定客服事件
|
bangd(){//绑定客服事件
|
||||||
this.$requst.post('').then(res=>{console.log('绑定客服:',res);},error=>{})
|
this.$requst.post('').then(res=>{log('绑定客服:',res);},error=>{})
|
||||||
},
|
},
|
||||||
tapChoose(index){//宫格下的,三张图点击事件
|
tapChoose(index){//宫格下的,三张图点击事件
|
||||||
let newUrl = ''
|
let newUrl = ''
|
||||||
|
@ -224,7 +260,7 @@
|
||||||
},
|
},
|
||||||
checkKey(){//查询热搜关键词事件
|
checkKey(){//查询热搜关键词事件
|
||||||
this.$requst.get('index/hot-keywords').then(res=>{
|
this.$requst.get('index/hot-keywords').then(res=>{
|
||||||
// console.log('关键词列表:',res);
|
// log('关键词列表:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
if(res.data.length!=0){
|
if(res.data.length!=0){
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item=>{
|
||||||
|
@ -237,7 +273,7 @@
|
||||||
},
|
},
|
||||||
checkBCate(){//查询底部事件、八宫格、
|
checkBCate(){//查询底部事件、八宫格、
|
||||||
this.$requst.post('index/mini-program-setting').then(res=>{
|
this.$requst.post('index/mini-program-setting').then(res=>{
|
||||||
// console.log('数据:',res);
|
// log('数据:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
if(res.data.length!=0){
|
if(res.data.length!=0){
|
||||||
if(res.data.recommend.length!=0){//宫格
|
if(res.data.recommend.length!=0){//宫格
|
||||||
|
@ -309,7 +345,7 @@
|
||||||
size:this.size
|
size:this.size
|
||||||
}
|
}
|
||||||
this.$requst.post('archives/course',parmas).then(res=>{
|
this.$requst.post('archives/course',parmas).then(res=>{
|
||||||
// console.log('恒美小课堂列表:',res);
|
// log('恒美小课堂列表:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
// 课堂栏目
|
// 课堂栏目
|
||||||
if(res.data.course.length!=0){
|
if(res.data.course.length!=0){
|
||||||
|
@ -328,9 +364,6 @@
|
||||||
if(res.data.list.list.length!=0){
|
if(res.data.list.list.length!=0){
|
||||||
this.total = res.data.list.total
|
this.total = res.data.list.total
|
||||||
res.data.list.list.forEach(item=>{
|
res.data.list.list.forEach(item=>{
|
||||||
let num = item.video.search(".mp4")
|
|
||||||
let isVideo = false
|
|
||||||
if(num!='-1') isVideo = true
|
|
||||||
let ktObj = {
|
let ktObj = {
|
||||||
category_id:item.category_id,//栏目ID
|
category_id:item.category_id,//栏目ID
|
||||||
id:item.id,
|
id:item.id,
|
||||||
|
@ -343,7 +376,7 @@
|
||||||
content:item.subtitle,//副标题
|
content:item.subtitle,//副标题
|
||||||
head_img:'/static/public/logo.png',//用户头像
|
head_img:'/static/public/logo.png',//用户头像
|
||||||
name:'恒美植发',//用户昵称
|
name:'恒美植发',//用户昵称
|
||||||
isVideo:isVideo//是否是视频
|
isVideo:item.video.includes(".mp4")//是否是视频
|
||||||
}
|
}
|
||||||
this.dataList.push(ktObj)
|
this.dataList.push(ktObj)
|
||||||
})
|
})
|
||||||
|
@ -353,7 +386,7 @@
|
||||||
},error=>{})
|
},error=>{})
|
||||||
},
|
},
|
||||||
chooseLike(e){//收藏事件
|
chooseLike(e){//收藏事件
|
||||||
// console.log(this.dataList[e].is_collected);
|
// log(this.dataList[e].is_collected);
|
||||||
if(this.dataList[e].is_collected==0){
|
if(this.dataList[e].is_collected==0){
|
||||||
this.dataList[e].is_collected = 1
|
this.dataList[e].is_collected = 1
|
||||||
// 调用收藏事件
|
// 调用收藏事件
|
||||||
|
@ -376,7 +409,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
choosecateEv(e){//恒美小课堂选择事件
|
choosecateEv(e){//恒美小课堂选择事件
|
||||||
// console.log('恒美小课堂:',e);
|
// log('恒美小课堂:',e);
|
||||||
this.newCurrent = e
|
this.newCurrent = e
|
||||||
this.isZanw = true
|
this.isZanw = true
|
||||||
this.page = 1
|
this.page = 1
|
||||||
|
@ -390,7 +423,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchEv(){//搜索事件
|
searchEv(){//搜索事件
|
||||||
// console.log(this.searchVal);
|
// log(this.searchVal);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
|
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="pad-x20">
|
||||||
<!-- 状态栏 -->
|
<!-- 状态栏 -->
|
||||||
<status-nav :titleVal="'修改资料'" :whereCome="whereCome" :statusTitle="true"></status-nav>
|
<status-nav :titleVal="'修改资料'" :whereCome="whereCome" :statusTitle="true"></status-nav>
|
||||||
<!-- 自定义二级分类 -->
|
<!-- 自定义二级分类 -->
|
||||||
|
@ -59,6 +59,19 @@
|
||||||
<!-- 底部弹框 -->
|
<!-- 底部弹框 -->
|
||||||
<!-- <city @choseVal="choseValue" :lotusAddressData="lotusAddressData"></city> -->
|
<!-- <city @choseVal="choseValue" :lotusAddressData="lotusAddressData"></city> -->
|
||||||
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onConfirm" themeColor="#007AFF"></simple-address>
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onConfirm" themeColor="#007AFF"></simple-address>
|
||||||
|
<!-- 弹框 -->
|
||||||
|
<view v-if="isShowT" class="disjcac posAll">
|
||||||
|
<view class="bacf radius20 width100 tank-box">
|
||||||
|
<view class="tc tank-box-itemone">请授权绑定手机号</view>
|
||||||
|
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
|
||||||
|
<view @tap="isShowT=false" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
|
||||||
|
<view :style="{background:publicColor}" class="pad-sx10 radius10 tank-btn posir">
|
||||||
|
立即绑定
|
||||||
|
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">获取手机号</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -107,7 +120,8 @@
|
||||||
newProvice:'',//当前省份
|
newProvice:'',//当前省份
|
||||||
newCity:'',//当前城市
|
newCity:'',//当前城市
|
||||||
newDistrict:'',//当前区县
|
newDistrict:'',//当前区县
|
||||||
whereCome:0
|
whereCome:0,
|
||||||
|
isShowT:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -119,6 +133,8 @@
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if(options.whereNum==2){
|
if(options.whereNum==2){
|
||||||
this.whereCome = options.whereNum
|
this.whereCome = options.whereNum
|
||||||
|
} else {
|
||||||
|
this.isShowT = false
|
||||||
}
|
}
|
||||||
let chuo = new Date().getTime()// 获取当前时间戳
|
let chuo = new Date().getTime()// 获取当前时间戳
|
||||||
let time = this.$toolAll.tools.timestampToTime(chuo)// 转换日期格式为XXXX-XX-XX
|
let time = this.$toolAll.tools.timestampToTime(chuo)// 转换日期格式为XXXX-XX-XX
|
||||||
|
@ -130,7 +146,7 @@
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
let firstObj = uni.getStorageSync('firstInfo')
|
let firstObj = uni.getStorageSync('firstInfo')
|
||||||
// console.log('firstObj',firstObj);
|
console.log('firstObj',firstObj);
|
||||||
if(firstObj==''){
|
if(firstObj==''){
|
||||||
let obj = uni.getStorageSync('uinfo')
|
let obj = uni.getStorageSync('uinfo')
|
||||||
if(obj!='') this.uinfo = obj
|
if(obj!='') this.uinfo = obj
|
||||||
|
@ -145,10 +161,24 @@
|
||||||
} else {
|
} else {
|
||||||
this.dataList[0].imgSrc = firstObj.headimgurl//用户头像
|
this.dataList[0].imgSrc = firstObj.headimgurl//用户头像
|
||||||
this.dataList[1].content = firstObj.nickname//用户昵称
|
this.dataList[1].content = firstObj.nickname//用户昵称
|
||||||
|
this.dataList[2].content = firstObj.coding//恒美ID
|
||||||
this.current = firstObj.gender//性别1男,2女,0未知
|
this.current = firstObj.gender//性别1男,2女,0未知
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getphonenumber(e){
|
||||||
|
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
|
||||||
|
// console.log('手机号信息:',res);
|
||||||
|
if(res.code==0){
|
||||||
|
uni.setStorageSync('bindPhone',false)
|
||||||
|
this.dataList[6].content = res.data.phone//恒美ID
|
||||||
|
this.isShowT = false
|
||||||
|
}
|
||||||
|
},error=>{})
|
||||||
|
},
|
||||||
|
cancleEv(){
|
||||||
|
uni.setStorageSync('bindPhone',false)
|
||||||
|
},
|
||||||
updataInfo(){//修改资料事件
|
updataInfo(){//修改资料事件
|
||||||
let params = {
|
let params = {
|
||||||
real_name:this.dataList[5].content,//姓名
|
real_name:this.dataList[5].content,//姓名
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<textarea v-model="lmsg" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请填写内容"/>
|
<textarea v-model="lmsg" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请填写内容"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 底部按钮 -->
|
<!-- 立即提交底部按钮 -->
|
||||||
<view @tap="submit" class="fon30 radius20 tc colf bold0 btnl" :style="{background:publicColor}">{{btnCon}}</view>
|
<view @tap="submit" class="fon30 radius20 tc colf bold0 btnl" :style="{background:publicColor}">{{btnCon}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
|
@ -229,7 +229,14 @@
|
||||||
this.$requst.post('user/appointment-apply',parmas).then(res=>{
|
this.$requst.post('user/appointment-apply',parmas).then(res=>{
|
||||||
// console.log('提交预约申请:',res);
|
// console.log('提交预约申请:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.isShowT = true
|
// this.isShowT = true
|
||||||
|
wx.requestSubscribeMessage({
|
||||||
|
tmplIds: ['T1HcjdOxSVgomu_bD9Qf4rIWfKOVZApvieHuG_U3fM4'],
|
||||||
|
success: (res)=> {
|
||||||
|
// console.log('res',res);
|
||||||
|
this.isShowT = true
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.btnCon = "立即提交"
|
this.btnCon = "立即提交"
|
||||||
this.$toolAll.tools.showToast(res.msg)
|
this.$toolAll.tools.showToast(res.msg)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<status-nav :titleVal="'客户列表'" :statusTitle="true"></status-nav>
|
<status-nav :titleVal="'客户列表'" :statusTitle="true"></status-nav>
|
||||||
<!-- 自定义二级分类 -->
|
<!-- 自定义二级分类 -->
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30">
|
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30 pad-x20">
|
||||||
<view class="radius20 fon28 col3 mar-sx20">
|
<view class="radius20 fon28 col3 mar-sx20">
|
||||||
<view class="disac">
|
<view class="disac">
|
||||||
<view @tap="openXial" class="disjbac width100 radius10 pad-zy20 xialak posir">
|
<view @tap="openXial" class="disjbac width100 radius10 pad-zy20 xialak posir">
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn"
|
<view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn"
|
||||||
style="right: 20rpx;bottom: 50rpx;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}">分配客服</view>
|
style="right: 20rpx;bottom: 70rpx;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}">分配客服</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
|
<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>
|
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
let dObj = {
|
let dObj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
imgSrc:item.doctor_extra.headimg,//医生头像
|
imgSrc:item.doctor_extra.headimg,//医生头像
|
||||||
name:item.name,//医生姓名
|
name:item.doctor_extra.name,//医生姓名
|
||||||
cyear:parseFloat(item.doctor_extra.work_time),//工作年限
|
cyear:parseFloat(item.doctor_extra.work_time),//工作年限
|
||||||
bmen:ndeptName,//部门
|
bmen:ndeptName,//部门
|
||||||
zcheng:'主任医师',
|
zcheng:'主任医师',
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<!-- 自定义二级分类 -->
|
<!-- 自定义二级分类 -->
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view :style="{paddingTop: statusHNH+'px'}">
|
<view :style="{paddingTop: statusHNH+'px'}">
|
||||||
<view class="bacf mar-s20 pad-s20 pad-y32 pad-x40">
|
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-y32 pad-x40">
|
||||||
<view class="disjb">
|
<view class="disjb">
|
||||||
<view class="pad-z40">
|
<view class="pad-z40">
|
||||||
<view class="fon28 bold col3">{{doctorObj.name}}</view>
|
<view class="fon28 bold col3">{{doctorObj.doctor_extra.name}}</view>
|
||||||
<view class="disac col80 fon24" style="margin: 6rpx 0;">
|
<view class="disac col80 fon24" style="margin: 6rpx 0;">
|
||||||
<view>{{['未知','男','女'][doctorObj.gender]}}</view>
|
<view>{{['未知','男','女'][doctorObj.gender]}}</view>
|
||||||
<view class="doctorx"></view>
|
<view class="doctorx"></view>
|
||||||
|
@ -77,6 +77,7 @@
|
||||||
isZanw:true,
|
isZanw:true,
|
||||||
chuTop:'',
|
chuTop:'',
|
||||||
isTop:false,
|
isTop:false,
|
||||||
|
isLoading:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
|
@ -127,6 +128,7 @@
|
||||||
// console.log('医生详情:',res);
|
// console.log('医生详情:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.doctorObj = res.data
|
this.doctorObj = res.data
|
||||||
|
this.isLoading = true
|
||||||
}
|
}
|
||||||
},error=>{})
|
},error=>{})
|
||||||
},
|
},
|
||||||
|
@ -164,9 +166,6 @@
|
||||||
this.total = res.data.list.total
|
this.total = res.data.list.total
|
||||||
if(res.data.list.list.length!=0){
|
if(res.data.list.list.length!=0){
|
||||||
res.data.list.list.forEach(item=>{
|
res.data.list.list.forEach(item=>{
|
||||||
let num = item.video.search(".mp4")
|
|
||||||
let isVideo = false
|
|
||||||
if(num!='-1') isVideo = true
|
|
||||||
let tObj = {
|
let tObj = {
|
||||||
category_id:item.category_id,//栏目ID
|
category_id:item.category_id,//栏目ID
|
||||||
id:item.id,
|
id:item.id,
|
||||||
|
@ -179,7 +178,7 @@
|
||||||
content:item.subtitle,//副标题
|
content:item.subtitle,//副标题
|
||||||
head_img:'/static/public/logo.png',//发布者头像
|
head_img:'/static/public/logo.png',//发布者头像
|
||||||
name:'恒美植发',//发布者昵称
|
name:'恒美植发',//发布者昵称
|
||||||
isVideo:isVideo//是否是视频
|
isVideo:item.video.includes(".mp4")//是否是视频
|
||||||
}
|
}
|
||||||
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
||||||
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
||||||
|
|
|
@ -108,9 +108,6 @@
|
||||||
if(res.data.list.list.length!=0){
|
if(res.data.list.list.length!=0){
|
||||||
uni.hideToast()
|
uni.hideToast()
|
||||||
res.data.list.list.forEach(item=>{
|
res.data.list.list.forEach(item=>{
|
||||||
let num = item.video.search(".mp4")
|
|
||||||
let isVideo = false
|
|
||||||
if(num!='-1') isVideo = true
|
|
||||||
let tObj = {
|
let tObj = {
|
||||||
category_id:item.category_id,//栏目ID
|
category_id:item.category_id,//栏目ID
|
||||||
id:item.id,
|
id:item.id,
|
||||||
|
@ -123,7 +120,7 @@
|
||||||
content:item.subtitle,//副标题
|
content:item.subtitle,//副标题
|
||||||
head_img:'/static/public/logo.png',//发布者头像
|
head_img:'/static/public/logo.png',//发布者头像
|
||||||
name:'恒美植发',//发布者昵称
|
name:'恒美植发',//发布者昵称
|
||||||
isVideo:isVideo//是否是视频
|
isVideo:item.video.includes(".mp4")//是否是视频
|
||||||
}
|
}
|
||||||
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
||||||
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
||||||
|
|
|
@ -57,6 +57,12 @@
|
||||||
wx.showShareImageMenu({
|
wx.showShareImageMenu({
|
||||||
path: this.imgSrc
|
path: this.imgSrc
|
||||||
})
|
})
|
||||||
|
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)
|
||||||
},
|
},
|
||||||
comfirmev(){//立即生成事件
|
comfirmev(){//立即生成事件
|
||||||
this.$toolAll.tools.showToast('生成中...')
|
this.$toolAll.tools.showToast('生成中...')
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 状态栏 -->
|
<!-- 状态栏 -->
|
||||||
<status-nav :titleVal="'分类'" :statusTitle="true"></status-nav>
|
<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 :style="{top: statusHNH+'px'}" class="posiszy" style="height: 50px;">
|
||||||
<view class="bacf pad-zy32 pad-sx20">
|
<view class="bacf pad-zy32 pad-sx20">
|
||||||
<cate-pu @choosecateEv="choosecateEv" :activeb="publicColor" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
|
<cate-pu @choosecateEv="choosecateEv" :activeb="invite_code!=''?'#3875F6':publicColor" :newCurrent="cateCurrent*1" :newbmo="'#F2F2F2'" :isCenter="false" :newcateList="cateList"></cate-pu>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" :style="{paddingTop: (statusHNH+50)+'px'}" style="padding-bottom: 118rpx;">
|
<view class="" :style="{paddingTop: (statusHNH+50)+'px'}" style="padding-bottom: 118rpx;">
|
||||||
|
@ -13,7 +20,7 @@
|
||||||
<view v-show="cateCurrent==isNum">
|
<view v-show="cateCurrent==isNum">
|
||||||
<view class="pad-zy32">
|
<view class="pad-zy32">
|
||||||
<!-- 自定义轮播 -->
|
<!-- 自定义轮播 -->
|
||||||
<swiper-pu :bannerList="bannerList" :newHeight="'200'" :newRadius="'10'" :newBottom="'5'"></swiper-pu>
|
<swiper-pu :browseP="true" :bannerList="bannerList" :newHeight="'200'" :newRadius="'10'" :newBottom="'5'"></swiper-pu>
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<view class="fon36 col3 bold mar-sx20 clips2" style="line-height: 50rpx;">{{detailObj.title}}</view>
|
<view class="fon36 col3 bold mar-sx20 clips2" style="line-height: 50rpx;">{{detailObj.title}}</view>
|
||||||
<view class="disjbac">
|
<view class="disjbac">
|
||||||
|
@ -117,7 +124,7 @@
|
||||||
<image @tap="backHome" class="posia" src="/static/public/back-home.png" style="width: 155rpx;height: 155rpx;top: -98rpx;" mode="aspectFill"></image>
|
<image @tap="backHome" class="posia" src="/static/public/back-home.png" style="width: 155rpx;height: 155rpx;top: -98rpx;" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="disac fon26 colf">
|
<view class="disac fon26 colf">
|
||||||
<view @tap="lianK" class="disac posir" :style="{background:publicColor}" style="height: 70rpx;width: 220rpx;border-top-left-radius: 51rpx;border-bottom-left-radius: 51rpx;">
|
<view @tap="lianK" class="disac posir" style="height: 70rpx;width: 220rpx;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>
|
<image src="/static/public/bottom-customer.png" class="mar-zy20" style="width: 47rpx;height: 47rpx;" mode="aspectFill"></image>
|
||||||
<view>联系客服</view>
|
<view>联系客服</view>
|
||||||
<button v-if="haveImg" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact">客服</button>
|
<button v-if="haveImg" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact">客服</button>
|
||||||
|
@ -150,10 +157,11 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
|
||||||
isLoading:false,
|
isLoading:false,
|
||||||
vision:false,
|
vision:false,
|
||||||
statusHNH:uni.getStorageSync('statusHNH'),
|
statusHNH:uni.getStorageSync('statusHNH'),
|
||||||
publicColor:uni.getStorageSync('publicColor'),//主题颜色
|
publicColor:uni.getStorageSync('publicColor') || '#3875F6',//主题颜色
|
||||||
cateCurrent:0,
|
cateCurrent:0,
|
||||||
haveImg:true,
|
haveImg:true,
|
||||||
cateList:[],
|
cateList:[],
|
||||||
|
@ -179,7 +187,8 @@
|
||||||
category_id:'',//栏目ID
|
category_id:'',//栏目ID
|
||||||
active:'',//是否是详情页
|
active:'',//是否是详情页
|
||||||
jieDuan:false,
|
jieDuan:false,
|
||||||
share_id:0
|
share_id:0,
|
||||||
|
invite_code:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
|
@ -205,56 +214,52 @@
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onShareAppMessage(options) {
|
onShareTimeline() {},
|
||||||
|
onShareAppMessage(res) {
|
||||||
var ya = this;
|
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 = {
|
var shareObj = {
|
||||||
title: ya.detailObj.title, // 默认是小程序的名称(可以写slogan等)
|
title: `${ya.detailObj.title}`, // 默认是小程序的名称(可以写slogan等)
|
||||||
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
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: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
imageUrl: ''//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||||
success: function(res){
|
};
|
||||||
// 转发成功之后的回调
|
|
||||||
if(res.errMsg == 'shareAppMessage:ok'){
|
|
||||||
// user/record
|
|
||||||
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{},error=>{})
|
|
||||||
let maiOjb = {
|
|
||||||
e:4,//内容分享
|
|
||||||
c:this.detailObj.id*1,
|
|
||||||
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;
|
return shareObj;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.$toolAll.tools.isLogin()
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.choosecateEv(this.cateCurrent)
|
|
||||||
},500)
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if(options.category_id!=undefined) {
|
if(options.category_id!=undefined) {
|
||||||
this.category_id = options.category_id
|
this.category_id = options.category_id
|
||||||
this.conid = options.id
|
this.conid = options.id
|
||||||
this.share_id = options.share_id
|
this.invite_code = options.invite_code
|
||||||
|
uni.setStorageSync('ninvite_code',this.invite_code)
|
||||||
|
if(this.invite_code!='' && this.invite_code!=undefined){
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: (res)=> {
|
||||||
|
if (res.code) {
|
||||||
|
var params = {
|
||||||
|
code:res.code,
|
||||||
|
invite_code:this.invite_code,//用户邀请码
|
||||||
|
}
|
||||||
|
this.$requst.post('user/login',params).then(res => {},error => {})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$toolAll.tools.overdue()
|
||||||
|
this.$toolAll.tools.isLogin()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.checkDetail(options.id)
|
this.checkDetail(this.conid)
|
||||||
let maiOjb = {
|
if(options.share_id!=undefined) this.share_id = options.share_id
|
||||||
e:1,//内容访问
|
if(uni.getStorageSync('is_active')==0 || uni.getStorageSync('is_active')=='') this.haveImg = false
|
||||||
c:this.category_id*1,
|
|
||||||
t:new Date().getTime()//当前时间戳
|
|
||||||
}
|
|
||||||
this.$toolAll.tools.maiDian(maiOjb)
|
|
||||||
if(uni.getStorageSync('is_active')==0) this.haveImg = false
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
chooseLike(e){//收藏事件
|
chooseLike(e){//收藏事件
|
||||||
|
@ -375,8 +380,22 @@
|
||||||
if(this.category_id==item.id) this.isNum = index
|
if(this.category_id==item.id) this.isNum = index
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if(this.invite_code!='' && this.invite_code!=undefined){
|
||||||
|
const query = wx.createSelectorQuery()
|
||||||
|
query.select('.statusHNH').boundingClientRect((rect) => {
|
||||||
|
// console.log('状态栏+标题栏:',rect);
|
||||||
|
this.statusHNH = rect.height
|
||||||
|
// console.log(this.statusHNH );
|
||||||
|
}).exec()
|
||||||
|
}
|
||||||
// 详情
|
// 详情
|
||||||
this.detailObj = res.data.detail
|
this.detailObj = res.data.detail
|
||||||
|
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.is_liked==1) {
|
||||||
if(this.detailObj.likes >= 1000) this.likeCon = '999+'
|
if(this.detailObj.likes >= 1000) this.likeCon = '999+'
|
||||||
else this.likeCon = this.detailObj.likes
|
else this.likeCon = this.detailObj.likes
|
||||||
|
@ -397,7 +416,7 @@
|
||||||
// 存视频
|
// 存视频
|
||||||
if(this.detailObj.video!=''){
|
if(this.detailObj.video!=''){
|
||||||
this.bannerList[0] = {
|
this.bannerList[0] = {
|
||||||
imgSrc:arrImg[0],
|
imgSrc:this.$http + arrImg[0],
|
||||||
url:this.$http + this.detailObj.video,
|
url:this.$http + this.detailObj.video,
|
||||||
isVideo:true,
|
isVideo:true,
|
||||||
poster:'',
|
poster:'',
|
||||||
|
@ -413,9 +432,6 @@
|
||||||
// 相关推荐xgList
|
// 相关推荐xgList
|
||||||
if(res.data.diary.length!=0){
|
if(res.data.diary.length!=0){
|
||||||
res.data.diary.forEach(item=>{
|
res.data.diary.forEach(item=>{
|
||||||
let num = item.video.search(".mp4")
|
|
||||||
let isVideo = false
|
|
||||||
if(num!='-1') isVideo = true
|
|
||||||
let tObj = {
|
let tObj = {
|
||||||
category_id:item.category_id,//栏目ID
|
category_id:item.category_id,//栏目ID
|
||||||
id:item.id,
|
id:item.id,
|
||||||
|
@ -428,7 +444,7 @@
|
||||||
content:item.subtitle,//副标题
|
content:item.subtitle,//副标题
|
||||||
head_img:'/static/public/logo.png',//发布者头像
|
head_img:'/static/public/logo.png',//发布者头像
|
||||||
name:'恒美植发',//发布者昵称
|
name:'恒美植发',//发布者昵称
|
||||||
isVideo:isVideo//是否是视频
|
isVideo:item.video.includes(".mp4")//是否是视频
|
||||||
}
|
}
|
||||||
if(item.cover!='' && item.video==''){
|
if(item.cover!='' && item.video==''){
|
||||||
this.xgList.push(tObj)
|
this.xgList.push(tObj)
|
||||||
|
@ -440,7 +456,7 @@
|
||||||
res.data.doctor.forEach(item=>{
|
res.data.doctor.forEach(item=>{
|
||||||
let doObj = {
|
let doObj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
imgSrc: item.headimg!=null ? this.$http + item.headimg : '',
|
imgSrc: item.headimg!=null ? item.headimg : '',
|
||||||
name:item.name,
|
name:item.name,
|
||||||
cyear:item.work_time,
|
cyear:item.work_time,
|
||||||
bmen:item.dept_name,
|
bmen:item.dept_name,
|
||||||
|
@ -451,6 +467,7 @@
|
||||||
this.dataList.push(doObj)
|
this.dataList.push(doObj)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.choosecateEv(this.cateCurrent)
|
||||||
}
|
}
|
||||||
},error=>{})
|
},error=>{})
|
||||||
},
|
},
|
||||||
|
|
|
@ -190,9 +190,6 @@
|
||||||
this.total = res.data.list.total
|
this.total = res.data.list.total
|
||||||
if(res.data.list.list.length!=0){
|
if(res.data.list.list.length!=0){
|
||||||
res.data.list.list.forEach(item=>{
|
res.data.list.list.forEach(item=>{
|
||||||
let num = item.video.search(".mp4")
|
|
||||||
let isVideo = false
|
|
||||||
if(num!='-1') isVideo = true
|
|
||||||
let tObj = {
|
let tObj = {
|
||||||
category_id:item.category_id,//栏目ID
|
category_id:item.category_id,//栏目ID
|
||||||
id:item.id,
|
id:item.id,
|
||||||
|
@ -205,7 +202,7 @@
|
||||||
content:item.subtitle,//副标题
|
content:item.subtitle,//副标题
|
||||||
head_img:'/static/public/logo.png',//发布者头像
|
head_img:'/static/public/logo.png',//发布者头像
|
||||||
name:'恒美植发',//发布者昵称
|
name:'恒美植发',//发布者昵称
|
||||||
isVideo:isVideo//是否是视频
|
isVideo:item.video.includes(".mp4")//是否是视频
|
||||||
}
|
}
|
||||||
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
|
||||||
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)
|
||||||
|
|
|
@ -86,6 +86,12 @@
|
||||||
wx.showShareImageMenu({
|
wx.showShareImageMenu({
|
||||||
path: this.imgSrcP
|
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){
|
goPage(index){
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
dans:false,//是否开启播放手势,即双击切换播放/暂停
|
dans:false,//是否开启播放手势,即双击切换播放/暂停
|
||||||
isCenterImg:false,//是否显示视频中间的播放按钮
|
isCenterImg:false,//是否显示视频中间的播放按钮
|
||||||
isBottomImg:true,//是否显示视频底部控制栏的播放按钮
|
isBottomImg:true,//是否显示视频底部控制栏的播放按钮
|
||||||
isFull:false//是否显示全屏按钮
|
isFull:true//是否显示全屏按钮
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady: function (res) {
|
onReady: function (res) {
|
||||||
|
|
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
Loading…
Reference in New Issue