正式版
This commit is contained in:
parent
0614875a83
commit
ebbb40f4f3
@ -1,6 +1,10 @@
|
||||
// 接口环境
|
||||
let BASE_URL = 'http://8.138.171.103:8081';
|
||||
let IP = 'http://8.138.171.103/';
|
||||
// 测试环境
|
||||
// let BASE_URL = 'http://8.138.171.103:8081';
|
||||
// let IP = 'http://8.138.171.103/';
|
||||
// 正式环境
|
||||
let BASE_URL = 'https://www.ymsc.org.cn/vueAdminApi';
|
||||
let IP = 'https://www.ymsc.org.cn/';
|
||||
|
||||
const configService = {
|
||||
apiUrl: BASE_URL,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import configService from '@/common/config.service.js';
|
||||
|
||||
const install = (Vue, vm) => {
|
||||
vm.$api.wxLogin = async (params = {}) => await vm.$u.get('/wxUser/wxPhoneLogin', params);// 手机号一键登录
|
||||
vm.$api.wxLogin = async (params = {}) => await vm.$u.get('/mbUser/wxPhoneLogin', params);// 手机号一键登录
|
||||
vm.$api.editUserMessage = async (params = {}) => await vm.$u.put('/wxUser', params);// 修改个人资料
|
||||
vm.$api.getBanner = async (params = {}) => await vm.$u.get('/cpBanner/all', params);// 获取轮播图
|
||||
vm.$api.addMessage = async (params = {}) => await vm.$u.post('/cpMessage', params);// 添加留言
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 需要登录的界面
|
||||
let needLogin = [
|
||||
"/pages/my/mySetting"
|
||||
"/pages/home/component/message",
|
||||
];
|
||||
// 拦截类型
|
||||
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
|
||||
|
@ -97,7 +97,7 @@
|
||||
// 人才生态30条链接
|
||||
url:'https://b.pyrc.com.cn/pyrsj/public/login.asp',
|
||||
// 人才生态30条图片
|
||||
webLinkImg:'http://8.138.171.103/static/webLink.png',
|
||||
webLinkImg:configService.ip+'/static/webLink.png',
|
||||
// 动态列表
|
||||
dynamicsList:[{
|
||||
top: 0,
|
||||
@ -176,9 +176,20 @@
|
||||
|
||||
// 跳转网络连接-人才生态30条
|
||||
toWeb(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/home/component/web?url=${this.url}`
|
||||
})
|
||||
this.$util.tools.methods.uniCopy({content: this.url,success: (res)=>{
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '复制成功,请在浏览器打开网址!'
|
||||
})
|
||||
},error: (res)=>{
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res
|
||||
})
|
||||
}})
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/home/component/web?url=${this.url}`
|
||||
// })
|
||||
},
|
||||
|
||||
// 点击轮播图
|
||||
|
@ -5,8 +5,8 @@
|
||||
<view class="head-Bg">
|
||||
<lwTopnav :bgColor="bgColor" lwColor="#fff" lwTitle="我的"></lwTopnav>
|
||||
<view class="my-avatar">
|
||||
<u-avatar size="130" :showSex="isLogin" :sexIcon="userMessage.sex===0?'man':'woman'"
|
||||
:src="isLogin?avatars[userMessage.sex]:''"
|
||||
<u-avatar size="130" :showSex="isLogin" :sexIcon="userMessage.gender?'woman':'man'"
|
||||
:src="isLogin?avatars[userMessage.gender||0]:''"
|
||||
@click="toShowDetail"></u-avatar>
|
||||
<!-- :src="userMessage.avatar" -->
|
||||
<text @click="toShowDetail">{{isLogin?userMessage.nickName:'请点击登录'}}</text>
|
||||
@ -33,7 +33,7 @@
|
||||
return{
|
||||
userMessage: this.$store.state.vuex_token === ''?{}:JSON.parse(this.$store.state.user_message),
|
||||
// avatar: '',//头像
|
||||
// sex: 'man',// 性别-man、woman
|
||||
// gender: 'man',// 性别-man、woman
|
||||
isLogin: this.$store.state.vuex_token !== '',// 是否登录
|
||||
avatars:[
|
||||
configService.ip+"upload/20241028/82f6d605d70645a0aa30c94ee51714a3.png",
|
||||
@ -67,7 +67,7 @@
|
||||
success: (res) => {
|
||||
if (!res.confirm) return;
|
||||
this.isLogin = false;
|
||||
this.userMessage = {sex:0,nickName:'',avatar:''}
|
||||
this.userMessage = {gender:0,nickName:'',avatar:''}
|
||||
this.$u.vuex('vuex_token', '');
|
||||
this.$u.vuex('user_message', {});
|
||||
}
|
||||
@ -138,6 +138,9 @@
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
font-size: 34rpx;
|
||||
&:active{
|
||||
filter: opacity(0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -4,7 +4,7 @@
|
||||
<view class="contentAll ">
|
||||
<view class="myhead">
|
||||
<text>头像</text>
|
||||
<u-avatar class="headimage" :src="isLogin?avatars[userMessage.sex]:''"></u-avatar>
|
||||
<u-avatar class="headimage" :src="isLogin?avatars[userMessage.gender||0]:''"></u-avatar>
|
||||
<!-- @click="changeImg"
|
||||
:src="userMessage.avatar?userMessage.avatar:''"></u-avatar> -->
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</view>
|
||||
<view class="myview">
|
||||
<text>手机</text>
|
||||
<input type="tel" v-model="userMessage.mobile" placeholder="请填写手机号"
|
||||
<input type="tel" v-model="userMessage.phone" placeholder="请填写手机号"
|
||||
class="mytext" disabled></input>
|
||||
</view>
|
||||
</view>
|
||||
@ -34,8 +34,8 @@ import configService from '@/common/config.service';
|
||||
id: '',
|
||||
avatar: '',
|
||||
nickName: '',
|
||||
mobile: '',
|
||||
sex: ''
|
||||
phone: '',
|
||||
gender: ''
|
||||
},
|
||||
isLogin: this.$store.state.vuex_token !== '',// 是否登录
|
||||
avatars:[
|
||||
@ -103,7 +103,7 @@ import configService from '@/common/config.service';
|
||||
if (this.userMessage.nickName === '') {
|
||||
this.$refs.uToast.show({type: 'warning',title: "请完善内容!"});
|
||||
return;
|
||||
}else if(!(/^1[345789]\d{9}$/.test(this.userMessage.mobile))){
|
||||
}else if(!(/^1[345789]\d{9}$/.test(this.userMessage.phone))){
|
||||
this.$refs.uToast.show({type: 'warning',title: "电话号码不符合规范!"});
|
||||
return;
|
||||
}
|
||||
@ -126,19 +126,19 @@ import configService from '@/common/config.service';
|
||||
let now = JSON.parse(this.$store.state.user_message);
|
||||
now.avatar = this.userMessage.avatar;
|
||||
now.nickName = this.userMessage.nickName;
|
||||
now.mobile = this.userMessage.mobile;
|
||||
now.phone = this.userMessage.phone;
|
||||
this.$u.vuex('user_message', JSON.stringify(now));
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
const { id, avatar, nickName, mobile, sex } = JSON.parse(this.$store.state.user_message);
|
||||
const { id, avatar, nickName, phone, gender } = JSON.parse(this.$store.state.user_message);
|
||||
this.userMessage = {
|
||||
id: id,
|
||||
avatar: avatar,
|
||||
nickName: nickName,
|
||||
mobile: mobile,
|
||||
sex: sex
|
||||
phone: phone,
|
||||
gender: gender
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,10 +11,10 @@
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 160rpx;">
|
||||
<u-checkbox style="margin-right: -10rpx;" active-color="#0f2b8d" v-model="isChecked"></u-checkbox>
|
||||
<text style="font-size: 24rpx;margin-right: 10rpx;">登录注册代表同意智汇谷</text>
|
||||
<text style="font-size: 24rpx;color:#0f2b8d;" @click="toShowAgreement('userAgreement')">《用户使用协议》</text>
|
||||
<text style="font-size: 24rpx;margin-right: 10rpx;">登录注册代表同意智汇谷协议</text>
|
||||
<!-- <text style="font-size: 24rpx;color:#0f2b8d;" @click="toShowAgreement('userAgreement')">《用户使用协议》</text>
|
||||
<text style="font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">和</text>
|
||||
<text style="font-size: 24rpx;color:#0f2b8d;" @click="toShowAgreement('privacyAgreement')">《隐私政策》</text>
|
||||
<text style="font-size: 24rpx;color:#0f2b8d;" @click="toShowAgreement('privacyAgreement')">《隐私政策》</text> -->
|
||||
</view>
|
||||
<view
|
||||
style="height: 80rpx;width: 100%; text-align: center;margin-top: 40rpx;display: flex;flex-direction: column;justify-content: center;">
|
||||
@ -69,9 +69,9 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
// that.$u.vuex('vuex_token', resp.data.token);
|
||||
that.$u.vuex('vuex_token','fbc545a91cc94fe89296828a25a7e08e@9085553879028596738');
|
||||
that.$u.vuex('user_message', JSON.stringify(resp.data.wxUser));
|
||||
that.$u.vuex('vuex_token', resp.data.token);
|
||||
// that.$u.vuex('vuex_token','fbc545a91cc94fe89296828a25a7e08e@9085553879028596738');
|
||||
that.$u.vuex('user_message', JSON.stringify(resp.data.mbUser));
|
||||
if(that.nextUrl===''){
|
||||
uni.navigateBack({
|
||||
complete() {
|
||||
|
@ -31,7 +31,8 @@ const store = new Vuex.Store({
|
||||
state: {
|
||||
// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
|
||||
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
||||
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : 'fbc545a91cc94fe89296828a25a7e08e@9085553879028596738',
|
||||
// fbc545a91cc94fe89296828a25a7e08e@9085553879028596738
|
||||
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
|
||||
user_message:lifeData.user_message ? lifeData.user_message : {},
|
||||
},
|
||||
mutations: {
|
||||
|
Loading…
Reference in New Issue
Block a user