master
chen 2021-12-02 17:31:26 +08:00
parent 6aa39120fd
commit 81626ff788
65 changed files with 1020 additions and 239 deletions

48
components/auth-phone.vue Normal file
View File

@ -0,0 +1,48 @@
<template>
<view v-if="showPhone" @touchmove.stop.prevent="moveHandle" 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 class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view class="pad-sx10 radius10 tank-btn posir pbackc">
立即绑定
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name:"wx_auth_phone",
data() {
return {
showPhone:true
};
},
methods:{
moveHandle(){//
return false
},
getphonenumber(e){//
if(e.detail.errMsg=="getPhoneNumber:ok"){
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
// console.log('',res);
if(res.code==0){
this.showPhone = false;
this.$toolAll.tools.showToast('手机号绑定成功','success');
}
},error=>{})
} else {
console.log('用户拒绝');
this.showPhone = true;
}
},
}
}
</script>
<style>
</style>

View File

@ -16,11 +16,11 @@ const tools = {
uni.removeStorageSync('daoTime')//清空倒计时 uni.removeStorageSync('daoTime')//清空倒计时
clearInterval(this.timer)//关闭倒计时 clearInterval(this.timer)//关闭倒计时
// console.log('上/报,埋点'); // console.log('上/报,埋点');
// reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件 reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
uni.removeStorageSync('maiList')//清空上报参数 uni.removeStorageSync('maiList')//清空上报参数
this.daoTime()//重新倒计时 this.daoTime()//重新倒计时
} }
},1000) },1000)
} else {//继续当前倒计时倒计 } else {//继续当前倒计时倒计
this.timer = setInterval(()=>{ this.timer = setInterval(()=>{
uni.setStorageSync('daoTime',daoTime--)//设置倒计时 uni.setStorageSync('daoTime',daoTime--)//设置倒计时
@ -30,7 +30,7 @@ const tools = {
uni.removeStorageSync('daoTime')//清空倒计时 uni.removeStorageSync('daoTime')//清空倒计时
clearInterval(this.timer)//关闭倒计时 clearInterval(this.timer)//关闭倒计时
// console.log('上报,埋点'); // console.log('上报,埋点');
// reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件 reportBuriedPoint(uni.getStorageSync('maiList'))//上报事件
uni.removeStorageSync('maiList')//清空上报参数 uni.removeStorageSync('maiList')//清空上报参数
this.daoTime()//重新倒计时 this.daoTime()//重新倒计时
} }

View File

@ -16,7 +16,10 @@ import nothingPage from './components/nothing-page.vue'//引入无内容组件
Vue.component('nothing-page',nothingPage)//全局注册无内容组件 Vue.component('nothing-page',nothingPage)//全局注册无内容组件
import publicCustomer from './components/public-customer.vue'//引入客服组件 import publicCustomer from './components/public-customer.vue'//引入客服组件
Vue.component('public-customer',publicCustomer)//全局注册客服组件 Vue.component('public-customer',publicCustomer)//全局注册客服组件
import authPhone from './components/auth-phone.vue'//引入手机授权组件
Vue.component('auth-phone',authPhone)//全局注册手机授权组件
import empower from './components/empower.vue'//引入用户授权组件
Vue.component('empower',empower)//全局注册用户授权组件
// 常用工具 // 常用工具

View File

@ -187,18 +187,12 @@
  return shareObj;   return shareObj;
}, },
onLoad(options) { onLoad(options) {
if (options.invite_code!=undefined) { if(options.source_code!='' && options.source_code!=undefined){
uni.login({ this.loginEv(options);
provider: 'weixin', }
success: (res)=> { if(options.invite_code!='' && options.invite_code!=undefined){
var params = { this.loginEv(options);
code:res.code, }
invite_code:options.invite_code,//
}
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
},
});
}
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => { query.select('.statusHNH').boundingClientRect((rect) => {
// log('+',rect.height); // log('+',rect.height);
@ -218,6 +212,20 @@
this.checkUserInfo(); this.checkUserInfo();
}, },
methods: { methods: {
loginEv(option){
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:option.invite_code || '',//
source_code:option.source_code || '',
channel:option.channel || ''
}
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
},
});
},
checkUserInfo(){ checkUserInfo(){
this.$requst.post('user/info').then(res=>{ this.$requst.post('user/info').then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -160,7 +160,7 @@
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
activeIndex:'-1', activeIndex:'-1',
shopCate:['全部病种','全部医生','全部活动'], shopCate:['全部分类','全部医生','全部活动'],
cateTitle:'', cateTitle:'',
bingzList:[],// bingzList:[],//
zanBingArr:[],// zanBingArr:[],//
@ -198,7 +198,7 @@
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.search-input-box').boundingClientRect((rect) => { query.select('.search-input-box').boundingClientRect((rect) => {
// console.log('+',rect.height); // console.log('+',rect.height);
this.titleHeight = rect.height this.titleHeight = rect.height;
}).exec() }).exec()
this.checkSX(); this.checkSX();
}, },
@ -246,7 +246,7 @@
let arr = []; let arr = [];
let obj = {}; let obj = {};
if(this.activeIndex==0) { if(this.activeIndex==0) {
this.cateTitle = '病种选择'; this.cateTitle = '项目选择';
this.zanBingArr.disease.forEach(item=>{ this.zanBingArr.disease.forEach(item=>{
obj = { obj = {
pid: item.pid, pid: item.pid,
@ -363,7 +363,7 @@
this.timeList.push(obj); this.timeList.push(obj);
} }
}) })
if(this.timeList!=0){ if(this.timeList.length!=0){
this.$toolAll.tools.showToast('加载中...') this.$toolAll.tools.showToast('加载中...')
this.timer = setInterval(()=>{// this.timer = setInterval(()=>{//
if(this.timeList.length!=0){ if(this.timeList.length!=0){
@ -388,6 +388,8 @@
},1000) },1000)
} else { } else {
this.dataList = this.zanArr; this.dataList = this.zanArr;
this.search_result = true;
this.loading = true;
} }
} else { } else {
this.search_result = true; this.search_result = true;

View File

@ -161,6 +161,10 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -209,6 +213,8 @@
ntype:'money',//money coin ntype:'money',//money coin
times:0,// times:0,//
isCurrent:2, isCurrent:2,
vision:true,
isShowP:false,
} }
}, },
onShow() { onShow() {
@ -220,6 +226,12 @@
},2000) },2000)
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkexpress();// this.checkexpress();//
this.checkeList();// this.checkeList();//
this.checkOrderDetail();// this.checkOrderDetail();//
@ -231,6 +243,36 @@
} }
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkChoose(){ checkChoose(){
if(uni.getStorageSync('chooseAddress')==''){ if(uni.getStorageSync('chooseAddress')==''){
this.checkAddress();// this.checkAddress();//

View File

@ -49,6 +49,10 @@
<button class="posia-op" open-type="share"></button> <button class="posia-op" open-type="share"></button>
</view> </view>
</view> </view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -72,7 +76,9 @@
total:0, total:0,
isZanw:true, isZanw:true,
ntype:'in', ntype:'in',
isHave:false isHave:false,
vision:true,
isShowP:false,
} }
}, },
onReachBottom() { onReachBottom() {
@ -84,12 +90,48 @@
this.isZanw = false this.isZanw = false
} }
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.checkInfo(); this.checkInfo();
this.checkList(); this.checkList();
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkList(){// checkList(){//
this.$requst.post('user/score-log',{page:this.page,size:this.size,type:this.ntype}).then(res=>{ this.$requst.post('user/score-log',{page:this.page,size:this.size,type:this.ntype}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -43,6 +43,10 @@
<view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view> <view class="fon30 bold tc mar-s50 mar-x30" :style="{color:publicColor}">积分兑换</view>
</view> </view>
<scoreList :dataList="dataList"></scoreList> <scoreList :dataList="dataList"></scoreList>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -66,15 +70,53 @@
], ],
dataList:[], dataList:[],
levelInfo:{}, levelInfo:{},
detailInfo:''// detailInfo:'',//
vision:false,
isShowP:false,
} }
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.checkList(); this.checkList();
this.checkInfo(); this.checkInfo();
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkInfo(){ checkInfo(){
this.$requst.post('level/index').then(res=>{ this.$requst.post('level/index').then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -54,6 +54,10 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -83,6 +87,8 @@
size:10, size:10,
total:'',// total:'',//
isZanw:true, isZanw:true,
vision:true,
isShowP:false,
} }
}, },
onReachBottom() { onReachBottom() {
@ -94,12 +100,48 @@
this.isZanw = false this.isZanw = false
} }
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.checkInfo(); this.checkInfo();
this.checkList(this.ntype); this.checkList(this.ntype);
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
confrimT(){// confrimT(){//
if(this.kNum=='' || this.kNum<=0){ if(this.kNum=='' || this.kNum<=0){
this.$toolAll.tools.showToast('请输入孔雀币数量'); this.$toolAll.tools.showToast('请输入孔雀币数量');

View File

@ -37,6 +37,10 @@
</view> </view>
</view> </view>
</navigator> </navigator>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -61,14 +65,22 @@
sort_field:'',// score= num= sort_field:'',// score= num=
sort_value:'asc',// asc= desc= sort_value:'asc',// asc= desc=
cishu:0, cishu:0,
cartNum:0 cartNum:0,
vision:true,
isShowP:false,
} }
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.cartNumEv(); this.cartNumEv();
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.titleList = uni.getStorageSync('footTitle') this.titleList = uni.getStorageSync('footTitle')
this.imgList = uni.getStorageSync('footimg') this.imgList = uni.getStorageSync('footimg')
// + // +
@ -80,6 +92,36 @@
this.checkList(); this.checkList();
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cartNumEv(){// cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'score'}).then(res=>{ this.$requst.post('order/shopping-cart-count',{type:'score'}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -55,6 +55,10 @@
<view @tap="delBtn" v-else class="colf fon28 bold goBuy-btn" style="background: #F85050;">删除</view> <view @tap="delBtn" v-else class="colf fon28 bold goBuy-btn" style="background: #F85050;">删除</view>
</view> </view>
</view> </view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -75,7 +79,9 @@
delIndex:[],//ID delIndex:[],//ID
page:1, page:1,
size:10, size:10,
isScore:'' isScore:'',
vision:true,
isShowP:false,
} }
}, },
onShow() { onShow() {
@ -83,6 +89,12 @@
uni.removeStorageSync('orderList'); uni.removeStorageSync('orderList');
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
options.isScore=='score' ? this.isScore = 'score' : '' options.isScore=='score' ? this.isScore = 'score' : ''
this.checkList(); this.checkList();
}, },
@ -96,6 +108,36 @@
}, },
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkList(){// checkList(){//
this.$requst.post('order/shopping-cart',{page:this.page,size:this.size,type:this.isScore}).then(res=>{ this.$requst.post('order/shopping-cart',{page:this.page,size:this.size,type:this.isScore}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -43,6 +43,10 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -62,7 +66,9 @@
total:'',// total:'',//
isZanw:true, isZanw:true,
isSigin:0, isSigin:0,
loading:false loading:false,
vision:true,
isShowP:false,
} }
}, },
onReachBottom() {// onReachBottom() {//
@ -74,12 +80,48 @@
this.isZanw = false this.isZanw = false
} }
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
this.checkTime(); this.checkTime();
this.checkList(); this.checkList();
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
siginEv(){ siginEv(){
this.$toolAll.tools.showToast('正在签到...'); this.$toolAll.tools.showToast('正在签到...');
this.$requst.post('sign/online-singIn').then(res=>{ this.$requst.post('sign/online-singIn').then(res=>{

View File

@ -22,19 +22,19 @@
</view> </view>
<!-- 建议意见 --> <!-- 建议意见 -->
<view class="dis mar-s20"> <view class="dis mar-s20">
<view class="mar-y20 flexs mar-s20 titlel">建议意见</view> <view class="mar-y20 flexs mar-s20 titlel">意见建议</view>
<view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;"> <view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;">
<textarea v-model="tmsg" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请把您的意见及意见填写在这里" placeholder-style="color:#999999;"/> <textarea v-model="tmsg" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请把您的意见及建议填写在这里" placeholder-style="color:#999999;"/>
</view> </view>
</view> </view>
<!-- --> <!-- -->
<view class="disac mar-s30"> <view class="disac mar-s30">
<view class="mar-y20 flexs titlel disjb"> <view class="mar-y20 flexs titlel disjb">
<view></view> <view></view>
<view class="mar-y10"></view> <view class="mar-y10"></view>
</view> </view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68"> <view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="tname" class="fon28 height-68" type="text" value="" placeholder="请输入姓名" placeholder-style="color:#999999;"/> <input v-model="tname" class="fon28 height-68" type="text" value="" placeholder="我们怎么称呼您" placeholder-style="color:#999999;"/>
</view> </view>
</view> </view>
<!-- 联系电话 --> <!-- 联系电话 -->

View File

@ -30,6 +30,10 @@
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -67,7 +71,9 @@
total:'',// total:'',//
isZanw:true, isZanw:true,
bannerList:[], bannerList:[],
isAutoPlay:false isAutoPlay:false,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -92,11 +98,47 @@
onHide() { onHide() {
this.isAutoPlay = false; this.isAutoPlay = false;
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkAbout(this.category_id) this.checkAbout(this.category_id)
this.checkSwi() this.checkSwi()
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkSwi(){ checkSwi(){
checkBanner({position:'about-banner'}).then(res=>{ checkBanner({position:'about-banner'}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -58,30 +58,15 @@
</view> </view>
</view> </view>
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower> <empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower>
<!-- 底部客服 --> <!-- 弹框授权 -->
<public-customer :nbottom="140"></public-customer> <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 --> <!-- 弹框 -->
<view v-if="isShowP" @touchmove.stop.prevent="moveHandle" class="disjcac posAll"> <auth-phone v-if="isShowP"></auth-phone>
<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="isShowP=false" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view class="pad-sx10 radius10 tank-btn posir pbackc">
立即绑定
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import empower from '@/components/empower.vue';
export default { export default {
components:{
empower
},
data() { data() {
return { return {
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
@ -96,8 +81,6 @@
haveImg:true, haveImg:true,
detailId:'',//ID detailId:'',//ID
invite_code:'', invite_code:'',
vision:false,
isShowP:false,
newCurrent:0, newCurrent:0,
cateListTwo:[], cateListTwo:[],
dataList:[], dataList:[],
@ -106,6 +89,8 @@
page:1, page:1,
total:'',// total:'',//
isZanw:true, isZanw:true,
vision:true,
isShowP:false,
} }
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@ -131,28 +116,13 @@
this.checkDetail(options.id) this.checkDetail(options.id)
this.detailId = options.id this.detailId = options.id
this.category_id = options.category_id this.category_id = options.category_id
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){ if(options.invite_code!='' && options.invite_code!=undefined){
uni.login({ this.loginEv(options.invite_code);
provider: 'weixin', } else if(options.source_code!='' && options.source_code!=undefined){
success: (res)=> { this.loginEv('',options.source_code,options.channel);
if (res.code) { }
var params = { ckAbout(this.category_id)
code:res.code,
invite_code:options.invite_code,//
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.vision = true
this.haveImg = false
}
}
},error => {})
}
},
});
}
this.checkAbout(this.category_id)
}, },
onReachBottom() {// onReachBottom() {//
if(this.total!=this.dataList.length){ if(this.total!=this.dataList.length){
@ -164,6 +134,36 @@
} }
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkAbout(category_id){ checkAbout(category_id){
let params = { let params = {
category_id:category_id, category_id:category_id,

View File

@ -31,6 +31,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -56,7 +60,9 @@
size:20, size:20,
total:'',// total:'',//
isZanw:true, isZanw:true,
keyword:'' keyword:'',
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -74,10 +80,46 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkDor() this.checkDor()
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkDor(){// checkDor(){//
this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{ this.$requst.post('user/doctor-list',{page:this.page,size:this.size,keyword:this.keyword}).then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -47,6 +47,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -77,7 +81,9 @@
isZanw:true, isZanw:true,
chuTop:'', chuTop:'',
isTop:false, isTop:false,
isLoading:false isLoading:false,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -102,13 +108,48 @@
}, },
onLoad(options) { onLoad(options) {
this.checkDoD(options.doctor_id) this.checkDoD(options.doctor_id)
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => { query.select('#daoh').boundingClientRect((rect) => {
this.chuTop = rect.top this.chuTop = rect.top
}).exec() }).exec()
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
chooseLike(e){// chooseLike(e){//
// console.log(this.dataList[e].is_collected); // console.log(this.dataList[e].is_collected);
if(this.dataList[e].is_collected==0){ if(this.dataList[e].is_collected==0){

View File

@ -122,6 +122,10 @@
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -156,6 +160,8 @@
page:1, page:1,
size:10, size:10,
timeList:[],// timeList:[],//
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -177,7 +183,13 @@
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
this.checkConList(this.category_id) this.checkConList(this.category_id)
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('#daoh').boundingClientRect((rect) => { query.select('#daoh').boundingClientRect((rect) => {
// console.log('+',rect); // console.log('+',rect);
@ -185,6 +197,36 @@
}).exec() }).exec()
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
shopCollection(){// shopCollection(){//
this.isWen = false; this.isWen = false;
uni.request({ uni.request({

View File

@ -39,6 +39,10 @@
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -63,6 +67,8 @@
size:20, size:20,
total:'',// total:'',//
isZanw:true, isZanw:true,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -80,7 +86,13 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
if(uni.getStorageSync('navHeight')==''){ if(uni.getStorageSync('navHeight')==''){
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.navHeight').boundingClientRect((rect) => { query.select('.navHeight').boundingClientRect((rect) => {
@ -92,6 +104,36 @@
this.checkPeople()// this.checkPeople()//
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkShare(){// checkShare(){//
this.$requst.post('user/share-count').then(res=>{ this.$requst.post('user/share-count').then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -109,6 +109,10 @@
</view> </view>
</block> </block>
</view> </view>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -141,7 +145,9 @@
colorLight: '#ffffff', colorLight: '#ffffff',
timer:null, timer:null,
daoTime:'', daoTime:'',
timerDao:null timerDao:null,
vision:true,
isShowP:false,
} }
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@ -164,9 +170,45 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkInfo(options.id); this.checkInfo(options.id);
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
comeing(coding){ comeing(coding){
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{ this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -30,6 +30,10 @@
<pu-po :isShowT="imgList.length==0 && isHaib" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po> <pu-po :isShowT="imgList.length==0 && isHaib" :contentVal="'立即生成创意海报'" :clearVal="'暂不生成'" :comfrimVal="'立即生成'" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -45,14 +49,22 @@
imgSrc:'', imgSrc:'',
showBtn:false, showBtn:false,
isHaib:false, isHaib:false,
haved:true haved:true,
vision:false,
isShowP:false,
} }
}, },
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
this.haved = true; this.haved = true;
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
// uni.removeStorageSync('imgSrcList') // uni.removeStorageSync('imgSrcList')
// //
if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')// if(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')//
@ -60,6 +72,36 @@
this.checkPoster(); this.checkPoster();
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkPoster(){// checkPoster(){//
this.$requst.get('user/poster').then(res=>{ this.$requst.get('user/poster').then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -250,7 +250,6 @@
return { return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight, statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
isLoading:false, isLoading:false,
vision:false,
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor') || '#3875F6',// publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
cateCurrent:0, cateCurrent:0,
@ -280,13 +279,14 @@
// jieDuan:false, // jieDuan:false,
share_id:0, share_id:0,
invite_code:'', invite_code:'',
isShowP:false,
zanArr:[], zanArr:[],
dataShopList:[], dataShopList:[],
timeList:[], timeList:[],
isHot:false, isHot:false,
isAutoPlay:false, isAutoPlay:false,
fabImg:'' fabImg:'',
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -339,31 +339,16 @@
this.isAutoPlay = false; this.isAutoPlay = false;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.category_id!=undefined) { if(options.category_id!=undefined) {
this.category_id = options.category_id this.category_id = options.category_id
this.conid = options.id this.conid = options.id
this.invite_code = options.invite_code this.invite_code = options.invite_code
uni.setStorageSync('ninvite_code',this.invite_code) uni.setStorageSync('ninvite_code',this.invite_code)
if(this.invite_code!='' && this.invite_code!=undefined){ if(this.invite_code!='' && this.invite_code!=undefined){
uni.login({ this.loginEv(this.invite_code);
provider: 'weixin', } else if(options.source_code!='' && options.source_code!=undefined){
success: (res)=> { this.loginEv('',options.source_code,options.channel);
if (res.code) {
var params = {
code:res.code,
invite_code:this.invite_code,//
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false
this.vision = true
}
}
},error => {})
}
},
});
} else { } else {
this.$toolAll.tools.overdue() this.$toolAll.tools.overdue()
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
@ -379,20 +364,34 @@
this.$toolAll.tools.maiDian(maiOjb) this.$toolAll.tools.maiDian(maiOjb)
}, },
methods: { methods: {
moveHandle(){// loginEv(invite_code='',source='',channel=''){
return false uni.login({
}, provider: 'weixin',
getphonenumber(e){// success: (res)=> {
if(e.detail.errMsg=="getPhoneNumber:ok"){ if (res.code) {
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{ var params = {
// console.log('',res); code:res.code,
if(res.code==0){ invite_code:invite_code,//
this.isShowP = false source_code:source,
this.$toolAll.tools.showToast('手机号绑定成功','success') channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
} }
},error=>{}) },
} else { });
this.isShowP = false },
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
} }
}, },
chooseLike(e){// chooseLike(e){//
@ -456,16 +455,6 @@
// //
cancleCollectionEV({action:'collect',archive_id:this.xgList[e].id}) cancleCollectionEV({action:'collect',archive_id:this.xgList[e].id})
}, },
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cancleEv(e){//
if(e==0) this.vision = false
},
backHome(){ backHome(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome' url:'/pages/tabbar/pagehome/pagehome'

View File

@ -33,6 +33,10 @@
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po> <pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -80,7 +84,9 @@
size:10, size:10,
total:'',// total:'',//
isZanw:true, isZanw:true,
category_id:''//ID category_id:'',//ID
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -99,6 +105,12 @@
uni.removeStorageSync('cateList') uni.removeStorageSync('cateList')
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
if(options.keyWorld!=undefined && options.keyWorld!='') { if(options.keyWorld!=undefined && options.keyWorld!='') {
this.searchVal = options.keyWorld this.searchVal = options.keyWorld
this.searchEv() this.searchEv()
@ -111,6 +123,36 @@
if(this.searchVal!=undefined && this.searchVal!='') this.searchEv() if(this.searchVal!=undefined && this.searchVal!='') this.searchEv()
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
checkKey(){// checkKey(){//
this.$requst.get('index/hot-keywords').then(res=>{ this.$requst.get('index/hot-keywords').then(res=>{
// console.log('',res); // console.log('',res);

View File

@ -28,6 +28,10 @@
<pu-po :isShowT="isShowT" :contentVal="'暂未开放此功能,请耐心等候'" :isCenter="true" :comfrimVal="'好的'" @comfirmev="isShowT=false"></pu-po> <pu-po :isShowT="isShowT" :contentVal="'暂未开放此功能,请耐心等候'" :isCenter="true" :comfrimVal="'好的'" @comfirmev="isShowT=false"></pu-po>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -44,7 +48,9 @@
{num:'0',title:'分享人'}, {num:'0',title:'分享人'},
{num:'0',title:'分享订单'}, {num:'0',title:'分享订单'},
], ],
imgSrcP:uni.getStorageSync('imgSrcP') imgSrcP:uni.getStorageSync('imgSrcP'),
vision:false,
isShowP:false,
} }
}, },
onShareAppMessage(options) { onShareAppMessage(options) {
@ -77,10 +83,46 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0 uni.getStorageSync('shareAll')!='' ? this.dataList[1].num = uni.getStorageSync('shareAll').share_users.total : this.dataList[1].num = 0
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
shareEv(){// shareEv(){//
if(this.imgSrcP==''){ if(this.imgSrcP==''){
this.$toolAll.tools.showToast('请先前往个人海报申请海报') this.$toolAll.tools.showToast('请先前往个人海报申请海报')

View File

@ -282,20 +282,9 @@
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 --> <!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2" @cancleEv="cancleEv"></empower> <empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 --> <!-- 弹框 -->
<view v-if="isShowP" @touchmove.stop.prevent="moveHandle" class="disjcac posAll"> <auth-phone v-if="isShowP"></auth-phone>
<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="isShowP=false" class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view class="pad-sx10 radius10 tank-btn posir pbackc">
立即绑定
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
@ -304,20 +293,17 @@
import listDoctor from '@/components/list-doctor.vue'; import listDoctor from '@/components/list-doctor.vue';
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 empower from '@/components/empower.vue';
import shopList from '@/components/shop-list.vue'; import shopList from '@/components/shop-list.vue';
export default { export default {
components:{ components:{
listDoctor, listDoctor,
swiperPu, swiperPu,
empower,
shopList shopList
}, },
data() { data() {
return { return {
statusBarHeight:uni.getSystemInfoSync().statusBarHeight, statusBarHeight:uni.getSystemInfoSync().statusBarHeight,
isLoading:false, isLoading:false,
vision:false,
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor') || '#3875F6',// publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
cateCurrent:0, cateCurrent:0,
@ -351,7 +337,6 @@
active:'',// active:'',//
share_id:0, share_id:0,
invite_code:'', invite_code:'',
isShowP:false,
showTK:false, showTK:false,
leiIndex:0, leiIndex:0,
showPD:false, showPD:false,
@ -376,7 +361,9 @@
timerp:null, timerp:null,
timera:null, timera:null,
pinUserId:0,//ID pinUserId:0,//ID
isAutoPlay:false isAutoPlay:false,
vision:false,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -413,31 +400,16 @@
this.isAutoPlay = false; this.isAutoPlay = false;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.category_id!=undefined) { if(options.category_id!=undefined) {
this.category_id = options.category_id this.category_id = options.category_id
this.conid = options.id this.conid = options.id
this.invite_code = options.invite_code this.invite_code = options.invite_code
uni.setStorageSync('ninvite_code',this.invite_code) uni.setStorageSync('ninvite_code',this.invite_code)
if(this.invite_code!='' && this.invite_code!=undefined){ if(this.invite_code!='' && this.invite_code!=undefined){
uni.login({ this.loginEv(this.invite_code);
provider: 'weixin', } else if(options.source_code!='' && options.source_code!=undefined){
success: (res)=> { this.loginEv('',options.source_code,options.channel);
if (res.code) {
var params = {
code:res.code,
invite_code:this.invite_code,//
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false
this.vision = true
}
}
},error => {})
}
},
});
} else { } else {
this.$toolAll.tools.overdue() this.$toolAll.tools.overdue()
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
@ -456,6 +428,36 @@
this.cartNumEv(); this.cartNumEv();
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cartNumEv(){// cartNumEv(){//
let ntype = 'spu' let ntype = 'spu'
if(this.isScore==3) ntype = 'score'; if(this.isScore==3) ntype = 'score';
@ -577,9 +579,6 @@
this.leiIndex = index this.leiIndex = index
this.skuDetail = this.allRes.sku[index]; this.skuDetail = this.allRes.sku[index];
}, },
moveHandle(){//
return false
},
lianK(){// lianK(){//
// if(!this.jieDuan){ // if(!this.jieDuan){
// let isAuth = this.$toolAll.tools.returnAuth() // let isAuth = this.$toolAll.tools.returnAuth()
@ -599,19 +598,6 @@
// } else this.jieDuan = true // } else this.jieDuan = true
// } // }
}, },
getphonenumber(e){//
if(e.detail.errMsg=="getPhoneNumber:ok"){
this.$requst.post('user/bind-phone',{iv:e.detail.iv,encryptedData:e.detail.encryptedData}).then(res=>{
// console.log('',res);
if(res.code==0){
this.isShowP = false
this.$toolAll.tools.showToast('手机号绑定成功','success')
}
},error=>{})
} else {
this.isShowP = false
}
},
chooseLike(e){// chooseLike(e){//
let cateId = '' let cateId = ''
let newArr = [] let newArr = []
@ -659,16 +645,6 @@
// //
cancleCollectionShopEV({action:'collect',id:cateId}) cancleCollectionShopEV({action:'collect',id:cateId})
}, },
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cancleEv(e){//
// if(e==0) this.vision = false
},
backHome(){ backHome(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/tabbar/pagehome/pagehome' url:'/pages/tabbar/pagehome/pagehome'

View File

@ -118,6 +118,10 @@
<pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po> <pu-po :isShowT="isShowT" @comfirmev="comfirmev" @cancleev="cancleev"></pu-po>
<!-- 返回顶部 --> <!-- 返回顶部 -->
<!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> --> <!-- <back-top :showTop="showTop" @backTop="backTop"></back-top> -->
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -175,7 +179,9 @@
search_result:false, search_result:false,
timeList:[], timeList:[],
zanArr:[], zanArr:[],
timer:'' timer:'',
vision:true,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -199,6 +205,12 @@
} else { } else {
this.search_result = false; this.search_result = false;
} }
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkSearchHistory(); this.checkSearchHistory();
this.checkKey(); this.checkKey();
// + // +
@ -217,6 +229,36 @@
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
cartNumEv(){// cartNumEv(){//
this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{ this.$requst.post('order/shopping-cart-count',{type:'spu'}).then(res=>{
if(res.code==0){ if(res.code==0){

View File

@ -32,6 +32,10 @@
</view> </view>
<!-- 底部客服 --> <!-- 底部客服 -->
<public-customer :nbottom="100"></public-customer> <public-customer :nbottom="100"></public-customer>
<!-- 弹框授权 -->
<empower @buttonH="buttonH" :vision="vision" :isWhere="2"></empower>
<!-- 弹框 -->
<auth-phone v-if="isShowP"></auth-phone>
</view> </view>
</template> </template>
@ -48,7 +52,9 @@
page:1, page:1,
size:10, size:10,
total:'',// total:'',//
isZanw:true isZanw:true,
vision:true,
isShowP:false,
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -66,10 +72,46 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin() this.$toolAll.tools.isLogin()
}, },
onLoad() { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){
this.loginEv('',options.source_code,options.channel);
}
this.checkList() this.checkList()
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){
uni.login({
provider: 'weixin',
success: (res)=> {
if (res.code) {
var params = {
code:res.code,
invite_code:invite_code,//
source_code:source,
channel:channel
}
this.$requst.post('user/login',params).then(res => {
if(res.data.token!=''){
if(res.data.is_active==0) {
this.haveImg = false;
this.vision = true;
}
}
},error => {})
}
},
});
},
buttonH(e){//
this.haveImg = e
if(e) {
this.vision = false
this.isShowP = true
}
},
chooseId(id){ chooseId(id){
this.backTop() this.backTop()
this.page = 1 this.page = 1

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long