修改医生详情、调整商城列表活动时样式问题、调整登录失效问题
parent
d93d24b89f
commit
75c1ba8e33
2
App.vue
2
App.vue
|
@ -20,8 +20,8 @@
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
if(uni.getStorageSync('token')!='') {
|
if(uni.getStorageSync('token')!='') {
|
||||||
toolAll.tools.networkStatus();//检查当前网络状态
|
toolAll.tools.networkStatus();//检查当前网络状态
|
||||||
// toolAll.tools.updaX();//检测版本更新
|
|
||||||
toolAll.tools.isLogin();//刷新token
|
toolAll.tools.isLogin();//刷新token
|
||||||
|
toolAll.tools.refreshToken();
|
||||||
}
|
}
|
||||||
toolAll.tools.checkQuan(); // 查询首页活动券
|
toolAll.tools.checkQuan(); // 查询首页活动券
|
||||||
},
|
},
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {reportBuriedPoint} from '@/jsFile/publicAPI.js';
|
||||||
export default {
|
export default {
|
||||||
name:"auth-userInfo-mobileInfo",
|
name:"auth-userInfo-mobileInfo",
|
||||||
props:{
|
props:{
|
||||||
|
@ -104,7 +105,7 @@
|
||||||
channel: data.channel || ''
|
channel: data.channel || ''
|
||||||
}
|
}
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `https://hengmei.scdxtc.cn/api/user/login`,
|
url: `${uni.getStorageSync('hostapi')}user/login`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: params,
|
data: params,
|
||||||
success: res => {
|
success: res => {
|
||||||
|
@ -116,6 +117,7 @@
|
||||||
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
||||||
if(res.data.data.phone_active==0 || res.data.data.is_active==0) {
|
if(res.data.data.phone_active==0 || res.data.data.is_active==0) {
|
||||||
this.showAuth = true;
|
this.showAuth = true;
|
||||||
|
// this.$requst.post('user/first-enter',{openid:res.data.data.openid,path:uni.getStorageSync('urlparams')}).then(res=>{})
|
||||||
} else {
|
} else {
|
||||||
uni.reLaunch({ // 重新进入当前页面
|
uni.reLaunch({ // 重新进入当前页面
|
||||||
url:uni.getStorageSync('urlparams')
|
url:uni.getStorageSync('urlparams')
|
||||||
|
|
|
@ -29,10 +29,14 @@
|
||||||
default:'0'
|
default:'0'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 主题颜色
|
||||||
|
publicColor() {
|
||||||
|
return this.$store.state.publicColor
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
lianK(){
|
lianK(){
|
||||||
|
|
|
@ -79,7 +79,6 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
|
||||||
isZhuan:false,
|
isZhuan:false,
|
||||||
current:0,
|
current:0,
|
||||||
tagIds:[],
|
tagIds:[],
|
||||||
|
@ -88,6 +87,12 @@
|
||||||
isAll:false
|
isAll:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 主题颜色
|
||||||
|
publicColor() {
|
||||||
|
return this.$store.state.publicColor
|
||||||
|
}
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 关闭下拉
|
// 关闭下拉
|
||||||
closeXial(){
|
closeXial(){
|
||||||
|
|
|
@ -107,11 +107,16 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
|
||||||
newList:[],
|
newList:[],
|
||||||
timeList:[]//时间列表
|
timeList:[]//时间列表
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 主题颜色
|
||||||
|
publicColor() {
|
||||||
|
return this.$store.state.publicColor
|
||||||
|
}
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
goPage(id,index){//进入商品详情事件
|
goPage(id,index){//进入商品详情事件
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -96,12 +96,17 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
|
||||||
newList:[],
|
newList:[],
|
||||||
timeList:[],//时间列表
|
timeList:[],//时间列表
|
||||||
timer:''
|
timer:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 主题颜色
|
||||||
|
publicColor() {
|
||||||
|
return this.$store.state.publicColor
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(this.dataList.length!=0){
|
if(this.dataList.length!=0){
|
||||||
this.dataList.forEach((item,index)=>{
|
this.dataList.forEach((item,index)=>{
|
||||||
|
|
121
jsFile/requst.js
121
jsFile/requst.js
|
@ -62,8 +62,6 @@ const checkError = (e) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const flag = true;
|
const flag = true;
|
||||||
let urls = [];
|
|
||||||
let timer = null;
|
|
||||||
// 封装请求
|
// 封装请求
|
||||||
const request = (method, url, options, ifLogin) => {
|
const request = (method, url, options, ifLogin) => {
|
||||||
let methods = '';
|
let methods = '';
|
||||||
|
@ -92,15 +90,20 @@ const request = (method, url, options, ifLogin) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if(ifLogin) {
|
// 不需要登录
|
||||||
var date = new Date();
|
if(flag) {
|
||||||
var timestamp = date.getTime();//精确到毫秒
|
uni.request({
|
||||||
// 如果过期时间 减 10分钟 小于当前时间,刷新token
|
url: `${hostapi}${url}`,
|
||||||
if((uni.getStorageSync('expire')*1000 - 600000) < timestamp) {
|
method: methods,
|
||||||
// token已失效
|
data: options,
|
||||||
urls.push(url);
|
header: headers,
|
||||||
if(urls.length<=1) {
|
success: res => {
|
||||||
// 调用登录事件
|
console.log(`${url}接口返的结果===>`,res);
|
||||||
|
if (res.statusCode == 200) {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
resolve(res.data)
|
||||||
|
} else {
|
||||||
|
flag = false;
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (res)=> {
|
success: (res)=> {
|
||||||
|
@ -110,108 +113,24 @@ const request = (method, url, options, ifLogin) => {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params,
|
data: params,
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log(114);
|
|
||||||
if(res.data.data.token!=''){
|
if(res.data.data.token!=''){
|
||||||
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('phone_active',res.data.data.phone_active); // 是否绑定手机号
|
uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号
|
||||||
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
||||||
timer = setInterval(()=>{
|
uni.reLaunch({ // 重新进入当前页面
|
||||||
if((uni.getStorageSync('expire')*1000 - 600000) > timestamp) {
|
url:uni.getStorageSync('paramsUrl')
|
||||||
clearInterval(timer);
|
|
||||||
if(urls.length) {
|
|
||||||
urls.forEach(item=>{
|
|
||||||
uni.request({
|
|
||||||
url: `${hostapi}${item}`,
|
|
||||||
method: methods,
|
|
||||||
data: options,
|
|
||||||
header: headers,
|
|
||||||
success: res => {
|
|
||||||
console.log(`${item}返的结果===>`,res);
|
|
||||||
if (res.statusCode == 200) {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
resolve(res.data)
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title:res.data.msg,
|
|
||||||
icon:'none'
|
|
||||||
})
|
})
|
||||||
checkError(res)
|
|
||||||
}
|
|
||||||
} else if(res.statusCode==500) {
|
|
||||||
// goLogin();
|
|
||||||
} else {
|
|
||||||
checkError(res)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: e => {
|
|
||||||
checkError(e)
|
|
||||||
},
|
|
||||||
complete: rest => {
|
|
||||||
// console.log(rest);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},100)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
// uni.showToast({
|
||||||
} else {
|
// title:res.data.msg,
|
||||||
// 快到token失效时间了
|
// icon:'none'
|
||||||
uni.request({
|
// })
|
||||||
url: `${hostapi}${url}`,
|
|
||||||
method: methods,
|
|
||||||
data: options,
|
|
||||||
header: headers,
|
|
||||||
success: res => {
|
|
||||||
console.log(`${url}返的结果===>`,res);
|
|
||||||
if (res.statusCode == 200) {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
resolve(res.data)
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title:res.data.msg,
|
|
||||||
icon:'none'
|
|
||||||
})
|
|
||||||
checkError(res)
|
|
||||||
}
|
|
||||||
} else if(res.statusCode==500) {
|
|
||||||
// goLogin();
|
|
||||||
} else {
|
|
||||||
checkError(res)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: e => {
|
|
||||||
checkError(e)
|
|
||||||
},
|
|
||||||
complete: rest => {
|
|
||||||
// console.log(rest);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 不需要token的
|
|
||||||
uni.request({
|
|
||||||
url: `${hostapi}${url}`,
|
|
||||||
method: methods,
|
|
||||||
data: options,
|
|
||||||
header: headers,
|
|
||||||
success: res => {
|
|
||||||
console.log(`${url}返的结果===>`,res);
|
|
||||||
if (res.statusCode == 200) {
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
resolve(res.data)
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title:res.data.msg,
|
|
||||||
icon:'none'
|
|
||||||
})
|
|
||||||
checkError(res)
|
checkError(res)
|
||||||
}
|
}
|
||||||
} else if(res.statusCode==500) {
|
} else if(res.statusCode==500) {
|
||||||
|
|
|
@ -41,6 +41,29 @@ const tools = {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
console.log('倒计时清空了');
|
console.log('倒计时清空了');
|
||||||
},
|
},
|
||||||
|
// 设置埋点数据事件
|
||||||
|
maiDian(data){
|
||||||
|
let maiList = uni.getStorageSync('maiList')
|
||||||
|
// console.log(maiList);
|
||||||
|
if(maiList==''){
|
||||||
|
maiList = [data]
|
||||||
|
} else maiList.push(data)
|
||||||
|
uni.setStorageSync('maiList',maiList)
|
||||||
|
},
|
||||||
|
// 种植埋点
|
||||||
|
plantPoint(num, id=''){
|
||||||
|
console.log(num,id,67);
|
||||||
|
let maiOjb = {
|
||||||
|
e: num, //内容访问
|
||||||
|
c: id * 1,
|
||||||
|
t: new Date().getTime() //当前时间戳
|
||||||
|
}
|
||||||
|
this.maiDian(maiOjb);
|
||||||
|
},
|
||||||
|
// 立即执行埋点上报
|
||||||
|
reportImmediately() {
|
||||||
|
reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
|
||||||
|
},
|
||||||
// 查券
|
// 查券
|
||||||
checkQuan(){
|
checkQuan(){
|
||||||
checkQuan();
|
checkQuan();
|
||||||
|
@ -60,25 +83,6 @@ const tools = {
|
||||||
buriedPointAll(){//查询埋点类型事件
|
buriedPointAll(){//查询埋点类型事件
|
||||||
buriedPoint()
|
buriedPoint()
|
||||||
},
|
},
|
||||||
// 种植埋点
|
|
||||||
plantPoint(num, id=''){
|
|
||||||
console.log(num,id,67);
|
|
||||||
let maiOjb = {
|
|
||||||
e: num, //内容访问
|
|
||||||
c: id * 1,
|
|
||||||
t: new Date().getTime() //当前时间戳
|
|
||||||
}
|
|
||||||
this.maiDian(maiOjb);
|
|
||||||
},
|
|
||||||
// 设置埋点数据事件
|
|
||||||
maiDian(data){
|
|
||||||
let maiList = uni.getStorageSync('maiList')
|
|
||||||
// console.log(maiList);
|
|
||||||
if(maiList==''){
|
|
||||||
maiList = [data]
|
|
||||||
} else maiList.push(data)
|
|
||||||
uni.setStorageSync('maiList',maiList)
|
|
||||||
},
|
|
||||||
weekDate(){//获取未来七天星期几,几号
|
weekDate(){//获取未来七天星期几,几号
|
||||||
let date = new Date()
|
let date = new Date()
|
||||||
let year = date.getFullYear()
|
let year = date.getFullYear()
|
||||||
|
@ -351,12 +355,21 @@ const tools = {
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
var timestamp = date.getTime();//精确到毫秒
|
var timestamp = date.getTime();//精确到毫秒
|
||||||
// 如果过期时间 减 10分钟 小于当前时间,刷新token
|
// 如果过期时间 减 10分钟 小于当前时间,刷新token
|
||||||
if((uni.getStorageSync('expire')*1000 - 600000) < timestamp && uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0) {
|
if((uni.getStorageSync('expire')*1000 - 6565575) < timestamp && uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0) {
|
||||||
// 调用登录事件
|
// 调用登录事件
|
||||||
this.loginEv();
|
this.loginEv();
|
||||||
}
|
}
|
||||||
console.log('进入了检测是否登录过期事件');
|
console.log('进入了检测是否登录过期事件');
|
||||||
},
|
},
|
||||||
|
timeToken:null,
|
||||||
|
// 开启每十分钟刷新token
|
||||||
|
refreshToken(){
|
||||||
|
clearInterval(this.timeToken);
|
||||||
|
this.timeToken = setInterval(()=>{
|
||||||
|
console.log('进入了每十分钟刷新token');
|
||||||
|
this.isLogin();
|
||||||
|
},600000)
|
||||||
|
},
|
||||||
// 登录事件
|
// 登录事件
|
||||||
loginEv(){
|
loginEv(){
|
||||||
uni.login({
|
uni.login({
|
||||||
|
|
|
@ -50,13 +50,18 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo: {},//用户信息
|
userInfo: {},//用户信息
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
|
||||||
canIGetUserProfile: false,
|
canIGetUserProfile: false,
|
||||||
imgSrc: '/static/public/logo.png',//默认logo头像
|
imgSrc: '/static/public/logo.png',//默认logo头像
|
||||||
appletName:'恒美植发',//小程序名称
|
appletName:'恒美植发',//小程序名称
|
||||||
isShowP:false,
|
isShowP:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
// 主题颜色
|
||||||
|
publicColor() {
|
||||||
|
return this.$store.state.publicColor
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 检测当前运行环境并缓存域名
|
// 检测当前运行环境并缓存域名
|
||||||
this.$toolAll.tools.currentContext();
|
this.$toolAll.tools.currentContext();
|
||||||
|
|
|
@ -97,7 +97,6 @@
|
||||||
return {
|
return {
|
||||||
vision:false,
|
vision:false,
|
||||||
statusHNH:uni.getStorageSync('statusHNH'),
|
statusHNH:uni.getStorageSync('statusHNH'),
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
|
||||||
tongList:[
|
tongList:[
|
||||||
{num:'0',title:'文章收藏'},
|
{num:'0',title:'文章收藏'},
|
||||||
{num:'0',title:'积分'},
|
{num:'0',title:'积分'},
|
||||||
|
|
|
@ -127,6 +127,7 @@
|
||||||
isNewRenderDone:false ,//锁的作用
|
isNewRenderDone:false ,//锁的作用
|
||||||
isQuan:uni.getStorageSync('isQuan'),
|
isQuan:uni.getStorageSync('isQuan'),
|
||||||
quanImg:uni.getStorageSync('quanImg'),
|
quanImg:uni.getStorageSync('quanImg'),
|
||||||
|
pagePath:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -182,6 +183,10 @@
|
||||||
getApp().globalData.outside = false;
|
getApp().globalData.outside = false;
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// 转发进入:获取页面路径
|
||||||
|
let pages = getCurrentPages(); //获取加载的页面
|
||||||
|
let currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
||||||
|
this.pagePath = currentPage.$page.fullPath;
|
||||||
if(options.q!=undefined){
|
if(options.q!=undefined){
|
||||||
// 解码一:unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1");
|
// 解码一:unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1");
|
||||||
// 解码二:decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
|
// 解码二:decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
|
||||||
|
@ -211,10 +216,13 @@
|
||||||
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
||||||
uni.setStorageSync('token',res.data.token);
|
uni.setStorageSync('token',res.data.token);
|
||||||
uni.setStorageSync('openid',res.data.openid)//缓存openid
|
uni.setStorageSync('openid',res.data.openid)//缓存openid
|
||||||
|
if(res.data.is_active==0 || res.data.phone_active==0) {
|
||||||
|
// this.$requst.post('user/first-enter',{openid:res.data.openid,path:this.pagePath}).then(res=>{})
|
||||||
|
}
|
||||||
},error => {})
|
},error => {})
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')==0 && uni.getStorageSync('is_active')!=0){
|
} else if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')==0 && uni.getStorageSync('is_active')==0){
|
||||||
this.loginEv(options);
|
this.loginEv(options);
|
||||||
}
|
}
|
||||||
const query = wx.createSelectorQuery()
|
const query = wx.createSelectorQuery()
|
||||||
|
@ -245,14 +253,15 @@
|
||||||
source_code:option.source_code || '',
|
source_code:option.source_code || '',
|
||||||
channel:option.channel || ''
|
channel:option.channel || ''
|
||||||
}
|
}
|
||||||
console.log(params);
|
|
||||||
this.$requst.post('user/login',params,false).then(res => {
|
this.$requst.post('user/login',params,false).then(res => {
|
||||||
console.log(239);
|
|
||||||
uni.setStorageSync('phone_active',res.data.phone_active);
|
uni.setStorageSync('phone_active',res.data.phone_active);
|
||||||
uni.setStorageSync('invite_code',res.data.invite_code);
|
uni.setStorageSync('invite_code',res.data.invite_code);
|
||||||
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.is_active)//是否第一次授权
|
||||||
uni.setStorageSync('token',res.data.token);
|
uni.setStorageSync('token',res.data.token);
|
||||||
uni.setStorageSync('openid',res.data.openid)//缓存openid
|
uni.setStorageSync('openid',res.data.openid)//缓存openid
|
||||||
|
if(res.data.is_active==0 || res.data.phone_active==0) {
|
||||||
|
// this.$requst.post('user/first-enter',{openid:res.data.openid,path:this.pagePath}).then(res=>{})
|
||||||
|
}
|
||||||
},error => {})
|
},error => {})
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;">拼团活动</view>
|
<view class="radius10 colf" v-if="item1.isPing" style="padding: 6rpx 10rpx;background: #F85050;">拼团活动</view>
|
||||||
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;">限时促销</view>
|
<view class="radius10 colf" v-if="item1.isXian" style="padding: 6rpx 10rpx;background: #F85050;">限时促销</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjbac">
|
<view class="disjbac" :class="item1.isIntegral ? '' : 'fw'">
|
||||||
<view class="disac">
|
<view class="disac">
|
||||||
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
|
<view class="fon28 bold" style="color: #F85050;margin-right: 8rpx;">
|
||||||
<view v-if="item1.isIntegral" class="mar-s20">
|
<view v-if="item1.isIntegral" class="mar-s20">
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!-- <view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view> -->
|
<!-- <view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view> -->
|
||||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view>
|
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon24" style="color: #C7C7C7;">销量:{{item1.amount}}</view>
|
<view class="fon24 flexs" style="color: #C7C7C7;">销量:{{item1.amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item1.isPing" class="disjbac mar-s20">
|
<view v-if="item1.isPing" class="disjbac mar-s20">
|
||||||
<view class="fon24 col80">已拼团{{item1.activity_group_num}}组</view>
|
<view class="fon24 col80">已拼团{{item1.activity_group_num}}组</view>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<!-- <view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view> -->
|
<!-- <view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view> -->
|
||||||
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view>
|
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">¥{{item1.yuanPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon24" style="color: #C7C7C7;">销量:{{item1.amount}}</view>
|
<view class="fon24 flexs" style="color: #C7C7C7;">销量:{{item1.amount}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item1.isPing" class="disjbac mar-s20">
|
<view v-if="item1.isPing" class="disjbac mar-s20">
|
||||||
<view class="fon24 col80">已拼团{{item1.activity_group_num}}组</view>
|
<view class="fon24 col80">已拼团{{item1.activity_group_num}}组</view>
|
||||||
|
@ -419,7 +419,8 @@
|
||||||
let group_cover = [];
|
let group_cover = [];
|
||||||
if(item.activity_group_cover.length!=0) {
|
if(item.activity_group_cover.length!=0) {
|
||||||
item.activity_group_cover.forEach(item=>{
|
item.activity_group_cover.forEach(item=>{
|
||||||
group_cover.push(this.$http + item)
|
// group_cover.push(this.$http + item)
|
||||||
|
group_cover.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
|
|
|
@ -5,30 +5,8 @@
|
||||||
<!-- 自定义二级分类 -->
|
<!-- 自定义二级分类 -->
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view :style="{paddingTop: statusHNH+'px'}" class=" pad-x180">
|
<view :style="{paddingTop: statusHNH+'px'}" class=" pad-x180">
|
||||||
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-y32 pad-x40">
|
<view v-if="isLoading" class="bacf mar-s20 pad-s20 pad-x40">
|
||||||
<view class="disjb pad-z30">
|
<view class="pad-zy20">
|
||||||
<image class="radius10" :src="doctorObj.doctor_extra.headimg || moImg" mode="widthFix" lazy-load></image>
|
|
||||||
<!-- <image class="radius10 flexs mar-z30" :src="doctorObj.doctor_extra.headimg || moImg" style="width: 300rpx;height: 300rpx;" mode="aspectFill"></image>
|
|
||||||
<view class="pad-z20 width100">
|
|
||||||
<view class="fon28 bold col3">{{doctorObj.doctor_extra.name}}</view>
|
|
||||||
<view class="col80 fon24">
|
|
||||||
<view class="flexs">擅长领域:</view>
|
|
||||||
<view class="dis fw">
|
|
||||||
<view class="flexs" v-for="(item,index) in doctorObj.diseases" :key="index" style="background-color: #F5F5F5;border-radius: 10rpx;padding: 6rpx 10rpx;margin-top: 10rpx;margin-right: 10rpx;">
|
|
||||||
<text class="bold pcol">{{item.disease_name}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
|
||||||
<view class="mar-z32">
|
|
||||||
<view class="bbot mar-s30"></view>
|
|
||||||
<view class="fon28 bold col3 mar-sx20">医生简介</view>
|
|
||||||
<rich-text class="fon26 col3" :nodes="peopleJian"></rich-text>
|
|
||||||
</view>
|
|
||||||
<view class="mar-z32">
|
|
||||||
<view class="bbot mar-s30"></view>
|
|
||||||
<view class="fon28 bold col3 mar-sx20">医生详情</view>
|
|
||||||
<rich-text class="fon26 col3" :nodes="detailInfo"></rich-text>
|
<rich-text class="fon26 col3" :nodes="detailInfo"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="pad-x180">
|
||||||
<!-- 状态栏 -->
|
<!-- 状态栏 -->
|
||||||
<status-nav :titleVal="titleStr" :statusTitle="true"></status-nav>
|
<status-nav :titleVal="titleStr" :statusTitle="true"></status-nav>
|
||||||
<!-- 输入框 -->
|
<!-- 输入框 -->
|
||||||
<view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}">
|
<view class="search-input-box bacf" :style="{paddingTop: statusHNH+'px'}">
|
||||||
<view class="disac pad-zy30 mar-s20">
|
<view class="disac pad-zy30 mar-s20">
|
||||||
<!-- 输入框 -->
|
<!-- 输入框 -->
|
||||||
<input @confirm="searchEv" class="width100 fon34 radius10 problem-input" type="text" v-model="searchVal" placeholder="请输入内容..."/>
|
<input @confirm="searchEv" @input="inputEv" class="width100 fon34 radius10 problem-input" type="text" v-model="searchVal" placeholder="请输入内容..."/>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<view @tap="searchEv" class="flexs mar-z30 radius10 pad-zy40 fon34 colf" style="height: 80rpx;line-height: 80rpx;" :style="{background:publicColor}">搜索</view>
|
<view @tap="searchEv" class="flexs mar-z30 radius10 pad-zy40 fon34 colf" style="height: 80rpx;line-height: 80rpx;" :style="{background:publicColor}">搜索</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -27,6 +27,8 @@
|
||||||
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
|
||||||
<!-- 用户信息授权,手机号授权 -->
|
<!-- 用户信息授权,手机号授权 -->
|
||||||
<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>
|
<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>
|
||||||
|
<!-- 底部tab -->
|
||||||
|
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='-1'></foot-tab>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -59,6 +61,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
// 底部标题
|
||||||
|
titleList() {
|
||||||
|
return this.$store.state.titleList
|
||||||
|
},
|
||||||
|
// 底部图标
|
||||||
|
imgList() {
|
||||||
|
return this.$store.state.imgList
|
||||||
|
},
|
||||||
// 主题颜色
|
// 主题颜色
|
||||||
publicColor() {
|
publicColor() {
|
||||||
return this.$store.state.publicColor
|
return this.$store.state.publicColor
|
||||||
|
@ -90,6 +100,10 @@
|
||||||
this.$toolAll.tools.isLogin()
|
this.$toolAll.tools.isLogin()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 搜索框改变事件
|
||||||
|
inputEv(e) {
|
||||||
|
this.page = 1;
|
||||||
|
},
|
||||||
chooseLike(e){//收藏事件
|
chooseLike(e){//收藏事件
|
||||||
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
|
||||||
|
@ -172,14 +186,6 @@
|
||||||
cancleev(){//取消事件
|
cancleev(){//取消事件
|
||||||
this.isShowT = false
|
this.isShowT = false
|
||||||
},
|
},
|
||||||
chooseTwo(index){//二级分类选择
|
|
||||||
// console.log('二级分类:',index);
|
|
||||||
this.isZanw = true
|
|
||||||
this.page = 1
|
|
||||||
this.newCurrent = index
|
|
||||||
this.category_id = this.cateList[index].id
|
|
||||||
this.searchEv()
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
</view>
|
</view>
|
||||||
<span>{{detailObj.name}}</span>
|
<span>{{detailObj.name}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="fon24 col7D">无任何额外消费</view>
|
<view class="fon24 col7D">{{detailObj.subtitle || '无任何额外消费'}}</view>
|
||||||
<!-- 团购商品详情时显示 -->
|
<!-- 团购商品详情时显示 -->
|
||||||
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
|
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
|
||||||
<view>团购累计参与人员:{{detailObj.activity_order_num}}人</view>
|
<view>团购累计参与人员:{{detailObj.activity_order_num}}人</view>
|
||||||
|
@ -181,6 +181,10 @@
|
||||||
<view @tap="tuneUp" class="disjcac lianShare mai-btn"><span v-if="isNei!=1">立即购买</span><span v-else>发起拼团</span></view>
|
<view @tap="tuneUp" class="disjcac lianShare mai-btn"><span v-if="isNei!=1">立即购买</span><span v-else>发起拼团</span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 分享 -->
|
||||||
|
<view @tap="shareImgEv" class="detail-cart-box" style="display: flex;justify-content: center;align-items: center;width: 112rpx;height: 112rpx;border-radius: 100%;background-color: rgba(0,0,0,.5);bottom: 436rpx;color: #FFFFFF;">
|
||||||
|
分享
|
||||||
|
</view>
|
||||||
<!-- 购物车 -->
|
<!-- 购物车 -->
|
||||||
<view @tap="goShopCart" class="detail-cart-box">
|
<view @tap="goShopCart" class="detail-cart-box">
|
||||||
<view class="posir">
|
<view class="posir">
|
||||||
|
@ -264,6 +268,7 @@
|
||||||
import swiperPu from '@/components/swiper-pu.vue';
|
import swiperPu from '@/components/swiper-pu.vue';
|
||||||
import {cancleCollectionShopEV,collectionShopEV} from '@/jsFile/publicAPI.js';
|
import {cancleCollectionShopEV,collectionShopEV} from '@/jsFile/publicAPI.js';
|
||||||
import shopList from '@/components/shop-list.vue';
|
import shopList from '@/components/shop-list.vue';
|
||||||
|
import { base64ToPath } from '@/jsFile/base64-src.js';
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
listDoctor,
|
listDoctor,
|
||||||
|
@ -339,6 +344,8 @@
|
||||||
isactivity:0,//是不是活动商品0:不是,1:是
|
isactivity:0,//是不是活动商品0:不是,1:是
|
||||||
orderId:'',//商品id
|
orderId:'',//商品id
|
||||||
timeout:null,
|
timeout:null,
|
||||||
|
shareId:'',
|
||||||
|
shareFlag:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -362,6 +369,7 @@
|
||||||
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
e.scrollTop > 360 ? this.showTop = true : this.showTop = false
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
|
let shareImgSrc = '';
|
||||||
var ya = this;
|
var ya = this;
|
||||||
this.$requst.post('user/record',{type:this.detailObj.is_activity==0 ? 'spu':'activity',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
|
this.$requst.post('user/record',{type:this.detailObj.is_activity==0 ? 'spu':'activity',action:'share',id:this.detailObj.id}).then(res=>{console.log('分享成功:',res);},error=>{})
|
||||||
// 调用tools.js中的种植埋点事件
|
// 调用tools.js中的种植埋点事件
|
||||||
|
@ -390,6 +398,8 @@
|
||||||
this.isAutoPlay = false;
|
this.isAutoPlay = false;
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.isactivity = options.is_activity;
|
||||||
|
this.orderId = options.id;
|
||||||
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
|
||||||
this.checkDetail(options.id,options.is_activity);
|
this.checkDetail(options.id,options.is_activity);
|
||||||
this.cartNumEv();
|
this.cartNumEv();
|
||||||
|
@ -400,8 +410,6 @@
|
||||||
}
|
}
|
||||||
if(options.share_id!=undefined) this.share_id = options.share_id
|
if(options.share_id!=undefined) this.share_id = options.share_id
|
||||||
if(options.isIntegral=="true"){this.isScore = 3;}
|
if(options.isIntegral=="true"){this.isScore = 3;}
|
||||||
this.isactivity = options.is_activity;
|
|
||||||
this.orderId = options.id;
|
|
||||||
// 如果链接是拼团链接,则调起发起拼团人的商品
|
// 如果链接是拼团链接,则调起发起拼团人的商品
|
||||||
if(options.shareCate==1) {
|
if(options.shareCate==1) {
|
||||||
// options.checkGrounpI商品id
|
// options.checkGrounpI商品id
|
||||||
|
@ -410,6 +418,31 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 分享图分享
|
||||||
|
shareImgEv(){
|
||||||
|
this.$toolAll.tools.showToast('分享图生成中...','none',10000);
|
||||||
|
if(this.shareFlag){
|
||||||
|
this.shareFlag = false;
|
||||||
|
this.$requst.post('spu/share',{id:this.orderId,is_activity:this.isactivity}).then(res=>{
|
||||||
|
base64ToPath(res.data.share_img).then(path=>{
|
||||||
|
uni.hideToast();
|
||||||
|
this.$toolAll.tools.showToast('正在调起分享...');
|
||||||
|
wx.showShareImageMenu({
|
||||||
|
path: path,
|
||||||
|
success:(res=>{
|
||||||
|
this.shareFlag = true;
|
||||||
|
this.$requst.post('user/record',{type:'content',action:'share',id:this.orderId}).then(res=>{console.log('分享成功:',res);},error=>{})
|
||||||
|
// 调用tools.js中的种植埋点事件
|
||||||
|
this.$toolAll.tools.plantPoint(4);
|
||||||
|
}),
|
||||||
|
fail:(err=>{
|
||||||
|
this.shareFlag = true;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {this.$toolAll.tools.showToast('请勿重复点击');}
|
||||||
|
},
|
||||||
// 调起弹框
|
// 调起弹框
|
||||||
tuneUp(){
|
tuneUp(){
|
||||||
if(this.detailObj.is_close==0){
|
if(this.detailObj.is_close==0){
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue