master
chen 2021-08-26 09:50:19 +08:00
parent a63409f75f
commit 0a8e7a747f
51 changed files with 16819 additions and 172 deletions

View File

@ -2,10 +2,19 @@
// launchtypelocalremote, localremote // launchtypelocalremote, localremote
"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"
} }
] ]
} }

View File

@ -13,7 +13,9 @@
toolAll.tools.networkStatus()// toolAll.tools.networkStatus()//
toolAll.tools.updaX()// toolAll.tools.updaX()//
} }
setTimeout(()=>{
toolAll.tools.overdue()// toolAll.tools.overdue()//
},3000)
// checkSwip()// // checkSwip()//
}, },
onHide: function() { onHide: function() {

View File

@ -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;}

File diff suppressed because one or more lines are too long

View File

@ -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 {

View File

@ -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
if(this.browseP){
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({ uni.navigateTo({
url:this.bannerList[index].url url:this.bannerList[index].url
}) })
}
}, },
changeBanner(e){ changeBanner(e){
this.bcurrent = e.detail.current// this.bcurrent = e.detail.current//

View File

@ -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 = {
//开发环境 //开发环境

View File

@ -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)

View File

@ -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、mac3.1.10+、windows3.1.10+、linux3.1.10+ if(uni.getSystemInfoSync().platform != "devtool"){//devtools开发版 值域为ios、android、mac3.1.10+、windows3.1.10+、linux3.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'));
} }
} }

View File

@ -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

View File

@ -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 => {})

View File

@ -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)

View File

@ -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,17 +260,17 @@
this.is_servicer = res.data.is_servicer//01 this.is_servicer = res.data.is_servicer//01
this.is_staff = res.data.is_staff//01 this.is_staff = res.data.is_staff//01
if(res.data.is_staff==1){ if(res.data.is_staff==1){
if(this.toolsList.length!=8){
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''}) 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',this.yuanList) uni.setStorageSync('rules',res.data.rules)
} else this.yuanList = [] } else this.yuanList = []
} }
}
},error=>{}) },error=>{})
}, },
chooseItem(index){// chooseItem(index){//

View File

@ -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
}) })

View File

@ -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//12,0 this.current = firstObj.gender//12,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,//

View File

@ -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
wx.requestSubscribeMessage({
tmplIds: ['T1HcjdOxSVgomu_bD9Qf4rIWfKOVZApvieHuG_U3fM4'],
success: (res)=> {
// console.log('res',res);
this.isShowT = true this.isShowT = true
}
})
} else { } else {
this.btnCon = "立即提交" this.btnCon = "立即提交"
this.$toolAll.tools.showToast(res.msg) this.$toolAll.tools.showToast(res.msg)

View File

@ -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>

View File

@ -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:'主任医师',

View File

@ -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)

View File

@ -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)

View File

@ -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('生成中...')

View File

@ -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;
var shareObj = { this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
    title: ya.detailObj.title, // (slogan)
    path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}`, // /
    imageUrl: '', //PNGJPG 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 = { let maiOjb = {
e:4,// e:4,//
c:this.detailObj.id*1, c:this.detailObj.id*1,
t:new Date().getTime()// t:new Date().getTime()//
} }
this.$toolAll.tools.maiDian(maiOjb) this.$toolAll.tools.maiDian(maiOjb)
      } var shareObj = {
    },      title: `${ya.detailObj.title}`, // (slogan)
    fail: function(res){      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: ''//PNGJPG imageUrl 使 5:4
      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.checkDetail(options.id) this.$requst.post('user/login',params).then(res => {},error => {})
let maiOjb = {
e:1,//访
c:this.category_id*1,
t:new Date().getTime()//
} }
this.$toolAll.tools.maiDian(maiOjb) },
if(uni.getStorageSync('is_active')==0) this.haveImg = false });
} else {
this.$toolAll.tools.overdue()
this.$toolAll.tools.isLogin()
}
}
this.checkDetail(this.conid)
if(options.share_id!=undefined) this.share_id = options.share_id
if(uni.getStorageSync('is_active')==0 || uni.getStorageSync('is_active')=='') 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=>{})
}, },

View File

@ -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)

View File

@ -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){

View File

@ -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