搜索事件更改为打开企业微信
parent
e8f3205187
commit
8e37f1abd5
|
@ -23,10 +23,10 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class='login-header'>
|
<view class='login-header'>
|
||||||
<image class="infoImg" :style="{boxShadow: '0px 0px 20px '+ publicColor}" mode="aspectFit" :src="userInfo.avatarUrl || imgSrc"></image>
|
<image class="infoImg" :style="{boxShadow: '0px 0px 20px '+ publicColor}" mode="aspectFit" :src="userInfo.avatarUrl || imgSrc"></image>
|
||||||
<view class="logo-name">恒美植发</view>
|
<view class="logo-name">{{appletName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-box">
|
<view class="login-box">
|
||||||
<view>
|
<view @tap="setMiniColor">
|
||||||
<button class='login-btn' open-type="getPhoneNumber" @getphonenumber="getphonenumber" :style="{background:publicColor}" type='primary'>手机号授权登录</button>
|
<button class='login-btn' open-type="getPhoneNumber" @getphonenumber="getphonenumber" :style="{background:publicColor}" type='primary'>手机号授权登录</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="xie-box">登录代表您已同意<text @tap="goXie" class="xieCon">《用户服务协议》</text></view>
|
<view class="xie-box">登录代表您已同意<text @tap="goXie" class="xieCon">《用户服务协议》</text></view>
|
||||||
|
@ -53,18 +53,17 @@
|
||||||
publicColor:uni.getStorageSync('publicColor'),
|
publicColor:uni.getStorageSync('publicColor'),
|
||||||
canIGetUserProfile: false,
|
canIGetUserProfile: false,
|
||||||
imgSrc: '/static/public/logo.png',//默认logo头像
|
imgSrc: '/static/public/logo.png',//默认logo头像
|
||||||
|
appletName:'恒美植发',//小程序名称
|
||||||
isShowP:false,
|
isShowP:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 检测当前运行环境并缓存域名
|
// 检测当前运行环境并缓存域名
|
||||||
this.$toolAll.tools.currentContext();
|
this.$toolAll.tools.currentContext();
|
||||||
|
this.setLogo();
|
||||||
// 设置电量栏和导航栏的高度
|
// 设置电量栏和导航栏的高度
|
||||||
uni.setStorageSync('electric_nav_height',uni.getSystemInfoSync().statusBarHeight + 54);
|
uni.setStorageSync('electric_nav_height',uni.getSystemInfoSync().statusBarHeight + 54);
|
||||||
this.$toolAll.tools.isVedio();
|
this.$toolAll.tools.isVedio();
|
||||||
this.$requst.get(`index/mini-program-setting`).then(res=>{
|
|
||||||
uni.setStorageSync('publicColor', res.data.mainColor) //#3875F6 #2E8B57
|
|
||||||
})
|
|
||||||
// let ya = this;
|
// let ya = this;
|
||||||
// // 微信扫码后会自动编码,所以需要解码
|
// // 微信扫码后会自动编码,所以需要解码
|
||||||
// if (options && options.q) {
|
// if (options && options.q) {
|
||||||
|
@ -82,11 +81,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 设置logo图
|
||||||
|
setLogo(){
|
||||||
|
this.$requst.get('index/base-config').then(res=>{
|
||||||
|
this.imgSrc = this.$http + res.data.logo;
|
||||||
|
this.appletName = res.data.appletName;
|
||||||
|
})
|
||||||
|
},
|
||||||
refuse(){//暂不绑定事件
|
refuse(){//暂不绑定事件
|
||||||
this.isShowP=false;
|
this.isShowP=false;
|
||||||
this.$toolAll.tools.showToast('登录成功','success')
|
this.$toolAll.tools.showToast('登录成功','success')
|
||||||
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
||||||
},
|
},
|
||||||
|
// 设置主题色
|
||||||
|
setMiniColor(){
|
||||||
|
this.$requst.get(`index/mini-program-setting`).then(res=>{
|
||||||
|
this.publicColor = res.data.mainColor;
|
||||||
|
uni.setStorageSync('publicColor', res.data.mainColor) //#3875F6 #2E8B57
|
||||||
|
})
|
||||||
|
},
|
||||||
getphonenumber(e){//授权绑定手机号
|
getphonenumber(e){//授权绑定手机号
|
||||||
let ya = this;
|
let ya = this;
|
||||||
wx.login({
|
wx.login({
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
<!-- 竖线 -->
|
<!-- 竖线 -->
|
||||||
<view class="linev"></view>
|
<view class="linev"></view>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<view @tap="searchEv" class="searchT flexs fon34" :style="{color:publicColor}">搜索</view>
|
<!-- <view @tap="searchEv" class="searchT flexs fon34" :style="{color:publicColor}">搜索</view> -->
|
||||||
|
<view @tap="enterprise" class="searchT flexs fon34" :style="{color:publicColor}">搜索</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pad-x180">
|
<view class="pad-x180">
|
||||||
|
@ -171,6 +172,9 @@
|
||||||
getApp().globalData.outside = false;
|
getApp().globalData.outside = false;
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.$requst.get(`index/mini-program-setting`).then(res=>{
|
||||||
|
uni.setStorageSync('publicColor', res.data.mainColor) //#3875F6 #2E8B57
|
||||||
|
})
|
||||||
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")
|
||||||
|
@ -524,19 +528,27 @@
|
||||||
},
|
},
|
||||||
searchEv(){//搜索事件
|
searchEv(){//搜索事件
|
||||||
// log(this.searchVal);
|
// log(this.searchVal);
|
||||||
if(this.$toolAll.tools.judgeAuth()){
|
// if(this.$toolAll.tools.judgeAuth()){
|
||||||
this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
|
// this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
|
||||||
if(res.data.has) {
|
// if(res.data.has) {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:`/${res.data.target}`
|
// url:`/${res.data.target}`
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
|
// url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
},
|
||||||
|
// 打开企业客服
|
||||||
|
enterprise(){
|
||||||
|
wx.openCustomerServiceChat({
|
||||||
|
extInfo: {url: 'https://work.weixin.qq.com/kfid/kfcde3c314a587e1a94?enc_scene=ENCFUmhyT3hWCYZXnXNQUVycNKrv8wSPZ5nGDjvuLUmPeUZ'},
|
||||||
|
corpId: 'ww1f86f258d4ff5817',
|
||||||
|
success(res) {}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
chooseReEv(index){
|
chooseReEv(index){
|
||||||
if(this.$toolAll.tools.judgeAuth()){
|
if(this.$toolAll.tools.judgeAuth()){
|
||||||
|
|
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