master
parent
a63409f75f
commit
0a8e7a747f
|
@ -2,10 +2,19 @@
|
|||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"type": "uniCloud",
|
||||
"default": {
|
||||
"launchtype": "local"
|
||||
}
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"h5" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
2
App.vue
2
App.vue
|
@ -13,7 +13,9 @@
|
|||
toolAll.tools.networkStatus()//检查当前网络状态
|
||||
toolAll.tools.updaX()//检测版本更新
|
||||
}
|
||||
setTimeout(()=>{
|
||||
toolAll.tools.overdue()//查询是否第一次授权
|
||||
},3000)
|
||||
// checkSwip()//查询轮播图位置
|
||||
},
|
||||
onHide: function() {
|
||||
|
|
|
@ -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;}
|
||||
|
|
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:{
|
||||
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 {
|
||||
|
|
|
@ -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
|
||||
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//当前的指示点下标
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const ENV = process.env.NODE_ENV;
|
||||
// console.log('当前环境', process.env.NODE_ENV)
|
||||
console.log('当前环境', process.env.NODE_ENV)
|
||||
|
||||
const apiHub = {
|
||||
//开发环境
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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、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 = () =>{}
|
||||
}
|
||||
// #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'));
|
||||
}
|
||||
}
|
||||
|
|
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://oss.hmzfyy.cn'
|
||||
|
||||
const {log} = console;
|
||||
Vue.prototype.$log = log
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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 => {})
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,17 +260,17 @@
|
|||
this.is_servicer = res.data.is_servicer//是否为客服,0否,1是
|
||||
this.is_staff = res.data.is_staff//是否为普通员工,0否,1是
|
||||
if(res.data.is_staff==1){
|
||||
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)
|
||||
uni.setStorageSync('rules',res.data.rules)
|
||||
} else this.yuanList = []
|
||||
}
|
||||
}
|
||||
},error=>{})
|
||||
},
|
||||
chooseItem(index){//列表事件
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
|
@ -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//性别1男,2女,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,//姓名
|
||||
|
|
|
@ -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
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['T1HcjdOxSVgomu_bD9Qf4rIWfKOVZApvieHuG_U3fM4'],
|
||||
success: (res)=> {
|
||||
// console.log('res',res);
|
||||
this.isShowT = true
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.btnCon = "立即提交"
|
||||
this.$toolAll.tools.showToast(res.msg)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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:'主任医师',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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('生成中...')
|
||||
|
|
|
@ -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;
|
||||
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: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持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=>{})
|
||||
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)
|
||||
}
|
||||
},
|
||||
fail: function(res){
|
||||
// 转发失败之后的回调
|
||||
if(res.errMsg == 'shareAppMessage:fail cancel'){
|
||||
// 用户取消转发
|
||||
}else if(res.errMsg == 'shareAppMessage:fail'){
|
||||
// 转发失败,其中 detail message 为详细失败信息
|
||||
}
|
||||
}
|
||||
};
|
||||
var shareObj = {
|
||||
title: `${ya.detailObj.title}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ''//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 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.checkDetail(options.id)
|
||||
let maiOjb = {
|
||||
e:1,//内容访问
|
||||
c:this.category_id*1,
|
||||
t:new Date().getTime()//当前时间戳
|
||||
this.$requst.post('user/login',params).then(res => {},error => {})
|
||||
}
|
||||
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: {
|
||||
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=>{})
|
||||
},
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue