搜索事件更改为打开企业微信

master
chen 2022-03-21 14:31:04 +08:00
parent e8f3205187
commit 8e37f1abd5
19 changed files with 61 additions and 36 deletions

View File

@ -23,10 +23,10 @@
</view> -->
<view class='login-header'>
<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 class="login-box">
<view>
<view @tap="setMiniColor">
<button class='login-btn' open-type="getPhoneNumber" @getphonenumber="getphonenumber" :style="{background:publicColor}" type='primary'>手机号授权登录</button>
</view>
<view class="xie-box">登录代表您已同意<text @tap="goXie" class="xieCon">用户服务协议</text></view>
@ -53,18 +53,17 @@
publicColor:uni.getStorageSync('publicColor'),
canIGetUserProfile: false,
imgSrc: '/static/public/logo.png',//logo
appletName:'恒美植发',//
isShowP:false,
};
},
onLoad(options) {
//
this.$toolAll.tools.currentContext();
this.setLogo();
//
uni.setStorageSync('electric_nav_height',uni.getSystemInfoSync().statusBarHeight + 54);
this.$toolAll.tools.isVedio();
this.$requst.get(`index/mini-program-setting`).then(res=>{
uni.setStorageSync('publicColor', res.data.mainColor) //#3875F6 #2E8B57
})
// let ya = this;
// // ,
// if (options && options.q) {
@ -82,11 +81,25 @@
}
},
methods: {
// logo
setLogo(){
this.$requst.get('index/base-config').then(res=>{
this.imgSrc = this.$http + res.data.logo;
this.appletName = res.data.appletName;
})
},
refuse(){//
this.isShowP=false;
this.$toolAll.tools.showToast('登录成功','success')
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){//
let ya = this;
wx.login({

View File

@ -19,7 +19,8 @@
<!-- 竖线 -->
<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 class="pad-x180">
@ -171,6 +172,9 @@
getApp().globalData.outside = false;
},
onLoad(options) {
this.$requst.get(`index/mini-program-setting`).then(res=>{
uni.setStorageSync('publicColor', res.data.mainColor) //#3875F6 #2E8B57
})
if(options.q!=undefined){
// 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")
@ -524,19 +528,27 @@
},
searchEv(){//
// log(this.searchVal);
if(this.$toolAll.tools.judgeAuth()){
this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
if(res.data.has) {
uni.navigateTo({
url:`/${res.data.target}`
})
} else {
uni.navigateTo({
url:'/pagesB/searchPage/searchPage?keyWorld='+this.searchVal
})
}
})
}
// if(this.$toolAll.tools.judgeAuth()){
// this.$requst.post('archives/keyword-check',{keyword:this.searchVal}).then(res=>{
// if(res.data.has) {
// uni.navigateTo({
// url:`/${res.data.target}`
// })
// } else {
// uni.navigateTo({
// 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){
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