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
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "local"
}
}
"default" :
{
"launchtype" : "local"
},
"h5" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

View File

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

View File

@ -105,6 +105,7 @@
.posia{position: absolute;}
.posiszy{position: fixed;left: 0;right: 0;z-index: 2;}
.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;}

File diff suppressed because one or more lines are too long

View File

@ -59,11 +59,11 @@
methods:{
backEvent(){//
if(this.whereCome==1){
uni.navigateTo({
uni.reLaunch({
url:'/pages/tabbar/pagehome/pagehome'
})
} else if(this.whereCome==2){
uni.navigateTo({
uni.reLaunch({
url:'/pages/tabbar/my/my'
})
} else {

View File

@ -49,6 +49,10 @@
newRadius:{//
type:String,
default:'0'
},
browseP:{
type:Boolean,
default:false
}
},
data() {
@ -62,9 +66,27 @@
chooseImg(index){
// console.log('banner',index);
this.bcurrent = index
uni.navigateTo({
url:this.bannerList[index].url
})
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({
url:this.bannerList[index].url
})
}
},
changeBanner(e){
this.bcurrent = e.detail.current//

View File

@ -1,5 +1,5 @@
const ENV = process.env.NODE_ENV;
// console.log('当前环境', process.env.NODE_ENV)
console.log('当前环境', process.env.NODE_ENV)
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) => {
let options = params
@ -34,11 +34,7 @@ const checkError = (e, reject) => {
}
}
reject(e.data)
} else {
reject({
'msg': '接口错误'
})
}
} else reject({msg:'接口错误'})
}
// 封装请求
@ -49,7 +45,6 @@ const request = (method, url, options) => {
case 'get':
methods = 'GET'
headers = {
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
}
@ -58,7 +53,6 @@ const request = (method, url, options) => {
methods = 'POST'
headers = {
'Content-Type': 'application/json; charset=UTF-8',
// "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
}
break;
@ -84,9 +78,8 @@ const request = (method, url, options) => {
}
}
return new Promise((resolve, reject) => {
//!hideLoading && uni.showToast({title: loadingText,icon:'loading'})
uni.request({
url: `${base.BASE_URL}${url}`,
url: `${domainName}${url}`,
method: methods,
data: dataObj(url, options),
header: headers,
@ -116,13 +109,10 @@ const request = (method, url, options) => {
// 上传文件 封装请求
const uploadFile = (url, options) => {
let tempData = options || {}
uni.showLoading({
title: "上传中..."
})
uni.showLoading({title: "上传中..."})
return new Promise((resolve, reject) => {
// console.log('tempData',tempData);
uni.uploadFile({
url: `${base.BASE_URL}${url}`,
url: `${domainName}${url}`,
filePath: tempData.file,
name: 'image',
fileType:'image',
@ -169,17 +159,14 @@ export default {
get: (url, options) => {
return request('get', url, options)
},
// JOSN格式
post: (url, options) => {
return request('post', url, options)
},
// form-data格式
postForm: (url, options) => {
return request('postForm', url, options)
},
// 上传
upload: (url, options) => {
return uploadFile(url, options)

View File

@ -6,7 +6,7 @@ const tools = {
daoTime(){
let daoTime = uni.getStorageSync('daoTime')
if(daoTime==''){//初次判断倒计时是否为空
uni.setStorageSync('daoTime',6000)//设置倒计时
uni.setStorageSync('daoTime',600)//设置倒计时
daoTime = uni.getStorageSync('daoTime')
this.timer = setInterval(()=>{
uni.setStorageSync('daoTime',daoTime--)//设置倒计时
@ -38,7 +38,6 @@ const tools = {
}
},
zhuColorT(){//调用主色调
console.log('tools');
zhuColor()
},
networkStatus(){//检查网络状态
@ -102,11 +101,6 @@ const tools = {
// },
hideName(name,num){
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)}`
return hname
},
@ -244,7 +238,7 @@ const tools = {
clearClog(){//去除某环境下的所有console.log()//输出信息
// uniapp性能优化
// #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 = () =>{}
}
// #endif
@ -297,11 +291,13 @@ const tools = {
},
success: res => {
if(res.data.data.token!=''){
uni.removeStorageSync('ninvite_code')
uni.setStorageSync('token',res.data.data.token)//缓存token
uni.setStorageSync('openid',res.data.data.openid)//缓存Openid
uni.setStorageSync('expire',res.data.data.expire)//缓存失效时间(时间戳格式)
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
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'));
}
}

View File

@ -27,6 +27,8 @@ Vue.prototype.$requst = requst;
// Vue.prototype.$http = 'https://hm.hmzfyy.cn'
Vue.prototype.$http = 'https://oss.hmzfyy.cn'
const {log} = console;
Vue.prototype.$log = log

View File

@ -29,7 +29,9 @@
channel:'',//()
invite_source:'',//[def|link|qr]
isShowT:false,
infoObj:{}
infoObj:{},
titleList:[],//
imgList:[],//
};
},
onLoad(options) {
@ -80,6 +82,7 @@
desc: '登录',
lang: 'zh_CN',
success: (res) => {
// console.log('res',res);
ya.userInfo = res.userInfo;
// console.log('',ya.userInfo);
try {
@ -146,11 +149,13 @@
uni.setStorageSync('token',res.data.token)//token
uni.setStorageSync('expire',res.data.expire)//
uni.setStorageSync('is_active',res.data.is_active)//
uni.setStorageSync('invite_code',res.data.invite_code)
this.isShowT = true
this.infoObj = {
headimgurl:ya.userInfo.avatarUrl,
nickname:ya.userInfo.nickName,
gender:ya.userInfo.gender
gender:ya.userInfo.gender,
coding:res.data.coding
}
}
},error => {})

View File

@ -72,9 +72,7 @@
],
showTop:false,//
tuList:[
],
tuList:[],
newCurrent:0,
cateW:'',//
isLoading:false,
@ -209,11 +207,7 @@
if(this.page==1) this.dataList = []
if(res.data.list.list.length!=0){
this.total = res.data.list.total
// uni.hideToast()
res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -226,7 +220,7 @@
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:isVideo//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) 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:'我的分享'}
],
yuanList:uni.getStorageSync('rules'), //'customer-list','footmarks','scan'
yuanList:[], //'customer-list','footmarks','scan'
zanCyuanList:[
{src:'/static/public/keh.png',title:'客户列表',rule:'customer-list'},
{src:'/static/public/zu.png',title:'用户足迹',rule:'footmarks'},
@ -148,8 +148,49 @@
this.$toolAll.tools.isLogin()
this.checkInfo()
uni.removeStorageSync('shareAll')//
this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res);
if(res.code==0){
if(res.data.length!=0){
if(res.data.footBar.length!=0){//
res.data.footBar.forEach(item=>{
let newName = item.name
let newObj = {
iconPath:this.$http + item.icon[0],
selectedIconPath:this.$http + item.icon[1],
}
if(item.key=="home"){
this.imgList[0] = newObj
this.titleList[0] = newName
}
if(item.key=="category"){
this.imgList[1] = newObj
this.titleList[1] = newName
}
if(item.key=="service"){
this.imgList[2] = newObj
this.titleList[2] = newName
}
if(item.key=="shop"){
this.imgList[3] = newObj
this.titleList[3] = newName
}
if(item.key=="my"){
this.imgList[4] = newObj
this.titleList[4] = newName
}
})
uni.setStorageSync('footTitle',this.titleList)
uni.setStorageSync('footimg',this.imgList)
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
}
}
}
},error=>{})
},
onLoad() {
console.log('123');
this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg')
if(uni.getStorageSync('gao')==''){
@ -219,16 +260,16 @@
this.is_servicer = res.data.is_servicer//01
this.is_staff = res.data.is_staff//01
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)
if(uni.getStorageSync('rules')==''){
if(res.data.rules.length!=0){
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
this.yuanList = result
uni.setStorageSync('rules',this.yuanList)
} else this.yuanList = []
}
if(res.data.rules.length!=0){
let result = this.zanCyuanList.filter(item => res.data.rules.some(itemt => itemt===item.rule))
this.yuanList = result
uni.setStorageSync('rules',res.data.rules)
} else this.yuanList = []
}
},error=>{})
},

View File

@ -79,6 +79,7 @@
</template>
<script>
const {log} = console;
import swiperPu from '@/components/swiper-pu.vue';
import {collectionEV,cancleCollectionEV,checkBanner} from '@/jsFile/publicAPI.js';
export default {
@ -134,6 +135,7 @@
}
},
onShow() {
log('输出的解构')
this.checkNet()
this.$toolAll.tools.isLogin()
let maiOjb = {
@ -147,10 +149,44 @@
}
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()
query.select('.statusHNH').boundingClientRect((rect) => {
// console.log('+',rect.height);
// log('+',rect.height);
uni.setStorageSync('statusHNH',rect.height)
this.statusHNH = rect.height
}).exec()
@ -211,7 +247,7 @@
},1000)
},
bangd(){//
this.$requst.post('').then(res=>{console.log('绑定客服:',res);},error=>{})
this.$requst.post('').then(res=>{log('绑定客服:',res);},error=>{})
},
tapChoose(index){//
let newUrl = ''
@ -224,7 +260,7 @@
},
checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{
// console.log('',res);
// log('',res);
if(res.code==0){
if(res.data.length!=0){
res.data.forEach(item=>{
@ -237,7 +273,7 @@
},
checkBCate(){//
this.$requst.post('index/mini-program-setting').then(res=>{
// console.log('',res);
// log('',res);
if(res.code==0){
if(res.data.length!=0){
if(res.data.recommend.length!=0){//
@ -309,7 +345,7 @@
size:this.size
}
this.$requst.post('archives/course',parmas).then(res=>{
// console.log('',res);
// log('',res);
if(res.code==0){
//
if(res.data.course.length!=0){
@ -328,9 +364,6 @@
if(res.data.list.list.length!=0){
this.total = res.data.list.total
res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
let ktObj = {
category_id:item.category_id,//ID
id:item.id,
@ -343,7 +376,7 @@
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:isVideo//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(ktObj)
})
@ -353,7 +386,7 @@
},error=>{})
},
chooseLike(e){//
// console.log(this.dataList[e].is_collected);
// log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){
this.dataList[e].is_collected = 1
//
@ -376,7 +409,7 @@
}
},
choosecateEv(e){//
// console.log('',e);
// log('',e);
this.newCurrent = e
this.isZanw = true
this.page = 1
@ -390,7 +423,7 @@
});
},
searchEv(){//
// console.log(this.searchVal);
// log(this.searchVal);
uni.navigateTo({
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
})

View File

@ -1,5 +1,5 @@
<template>
<view>
<view class="pad-x20">
<!-- 状态栏 -->
<status-nav :titleVal="'修改资料'" :whereCome="whereCome" :statusTitle="true"></status-nav>
<!-- 自定义二级分类 -->
@ -59,6 +59,19 @@
<!-- 底部弹框 -->
<!-- <city @choseVal="choseValue" :lotusAddressData="lotusAddressData"></city> -->
<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>
</template>
@ -107,7 +120,8 @@
newProvice:'',//
newCity:'',//
newDistrict:'',//
whereCome:0
whereCome:0,
isShowT:true
}
},
onShow() {
@ -119,6 +133,8 @@
onLoad(options) {
if(options.whereNum==2){
this.whereCome = options.whereNum
} else {
this.isShowT = false
}
let chuo = new Date().getTime()//
let time = this.$toolAll.tools.timestampToTime(chuo)// XXXX-XX-XX
@ -130,7 +146,7 @@
},
})
let firstObj = uni.getStorageSync('firstInfo')
// console.log('firstObj',firstObj);
console.log('firstObj',firstObj);
if(firstObj==''){
let obj = uni.getStorageSync('uinfo')
if(obj!='') this.uinfo = obj
@ -145,10 +161,24 @@
} else {
this.dataList[0].imgSrc = firstObj.headimgurl//
this.dataList[1].content = firstObj.nickname//
this.dataList[2].content = firstObj.coding//ID
this.current = firstObj.gender//12,0
}
},
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(){//
let params = {
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="请填写内容"/>
</view>
</view>
<!-- 底部按钮 -->
<!-- 立即提交底部按钮 -->
<view @tap="submit" class="fon30 radius20 tc colf bold0 btnl" :style="{background:publicColor}">{{btnCon}}</view>
</view>
<!-- 弹框 -->
@ -229,7 +229,14 @@
this.$requst.post('user/appointment-apply',parmas).then(res=>{
// console.log('',res);
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 {
this.btnCon = "立即提交"
this.$toolAll.tools.showToast(res.msg)

View File

@ -4,7 +4,7 @@
<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="disac">
<view @tap="openXial" class="disjbac width100 radius10 pad-zy20 xialak posir">
@ -36,7 +36,7 @@
</view>
</view>
<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 v-if="dataList.length==0" class="disjcac fc" style="margin-top: 50%;">
<image class="zanw-img" src="/static/public/nothing.png" mode="aspectFill"></image>

View File

@ -91,7 +91,7 @@
let dObj = {
id:item.id,
imgSrc:item.doctor_extra.headimg,//
name:item.name,//
name:item.doctor_extra.name,//
cyear:parseFloat(item.doctor_extra.work_time),//
bmen:ndeptName,//
zcheng:'主任医师',

View File

@ -5,10 +5,10 @@
<!-- 自定义二级分类 -->
<!-- 列表 -->
<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="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>{{['未知','男','女'][doctorObj.gender]}}</view>
<view class="doctorx"></view>
@ -77,6 +77,7 @@
isZanw:true,
chuTop:'',
isTop:false,
isLoading:false
}
},
onPageScroll(e) {
@ -127,6 +128,7 @@
// console.log('',res);
if(res.code==0){
this.doctorObj = res.data
this.isLoading = true
}
},error=>{})
},
@ -164,9 +166,6 @@
this.total = res.data.list.total
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -179,7 +178,7 @@
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:isVideo//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) 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){
uni.hideToast()
res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -123,7 +120,7 @@
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:isVideo//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)

View File

@ -57,6 +57,12 @@
wx.showShareImageMenu({
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(){//
this.$toolAll.tools.showToast('生成中...')

View File

@ -1,11 +1,18 @@
<template>
<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 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 class="" :style="{paddingTop: (statusHNH+50)+'px'}" style="padding-bottom: 118rpx;">
@ -13,7 +20,7 @@
<view v-show="cateCurrent==isNum">
<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="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>
</view>
<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>
<view>联系客服</view>
<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() {
return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
isLoading:false,
vision:false,
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
cateCurrent:0,
haveImg:true,
cateList:[],
@ -179,7 +187,8 @@
category_id:'',//ID
active:'',//
jieDuan:false,
share_id:0
share_id:0,
invite_code:''
}
},
onPageScroll(e) {
@ -205,56 +214,52 @@
// }
// }
},
onShareAppMessage(options) {
onShareTimeline() {},
onShareAppMessage(res) {
var ya = this;
this.$requst.post('user/record',{type:'content',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
c:this.detailObj.id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
var shareObj = {
    title: ya.detailObj.title, // (slogan)
    path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}`, // /
    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 = {
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
      }
    }
  };
     title: `${ya.detailObj.title}`, // (slogan)
     path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
     imageUrl: ''//PNGJPG imageUrl 使 5:4
  };
  return shareObj;
},
onShow() {
this.$toolAll.tools.isLogin()
setTimeout(()=>{
this.choosecateEv(this.cateCurrent)
},500)
},
onLoad(options) {
if(options.category_id!=undefined) {
this.category_id = options.category_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)
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
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: {
chooseLike(e){//
@ -375,8 +380,22 @@
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
let maiOjb = {
e:1,//访
c:this.detailObj.id*1,
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
if(this.detailObj.is_liked==1) {
if(this.detailObj.likes >= 1000) this.likeCon = '999+'
else this.likeCon = this.detailObj.likes
@ -397,7 +416,7 @@
//
if(this.detailObj.video!=''){
this.bannerList[0] = {
imgSrc:arrImg[0],
imgSrc:this.$http + arrImg[0],
url:this.$http + this.detailObj.video,
isVideo:true,
poster:'',
@ -413,9 +432,6 @@
// xgList
if(res.data.diary.length!=0){
res.data.diary.forEach(item=>{
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -428,7 +444,7 @@
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:isVideo//
isVideo:item.video.includes(".mp4")//
}
if(item.cover!='' && item.video==''){
this.xgList.push(tObj)
@ -440,7 +456,7 @@
res.data.doctor.forEach(item=>{
let doObj = {
id:item.id,
imgSrc: item.headimg!=null ? this.$http + item.headimg : '',
imgSrc: item.headimg!=null ? item.headimg : '',
name:item.name,
cyear:item.work_time,
bmen:item.dept_name,
@ -451,6 +467,7 @@
this.dataList.push(doObj)
})
}
this.choosecateEv(this.cateCurrent)
}
},error=>{})
},

View File

@ -190,9 +190,6 @@
this.total = res.data.list.total
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -205,7 +202,7 @@
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
isVideo:isVideo//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)
if(this.newCurrent==1 && item.category_id==33) this.dataList.push(tObj)

View File

@ -86,6 +86,12 @@
wx.showShareImageMenu({
path: this.imgSrcP
})
this.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:4,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
}
},
goPage(index){

View File

@ -27,8 +27,7 @@
dans:false,//是否开启播放手势,即双击切换播放/暂停
isCenterImg:false,//是否显示视频中间的播放按钮
isBottomImg:true,//是否显示视频底部控制栏的播放按钮
isFull:false//是否显示全屏按钮
isFull:true//是否显示全屏按钮
}
},
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