Browse Source

提交配置

master
主管理员 1 year ago
parent
commit
547939398c
3 changed files with 47 additions and 42 deletions
  1. +13
    -13
      env.js
  2. +6
    -1
      pages/jianhua/index.vue
  3. +28
    -28
      pages/my/login-kehu.vue

+ 13
- 13
env.js View File

@ -1,24 +1,24 @@
// .env.js 文件
// 不同环境访问不同的路径
// import store from '@/common/store/index'
// const ENV_API_URL = {
// development: 'https://jobadmin.java996.icu', //开发环境
// production: 'https://jobadmin.java996.icu', //生产环境
// }
// const ENV_BASE_URL = {
// development: 'https://jobadmin.java996.icu', //开发环境
// production: 'https://jobadmin.java996.icu', //生产环境
// }
const ENV_API_URL = {
development: 'http://localhost:8091', //开发环境
production: 'http://localhost:8091', //生产环境
development: 'https://jobadmin.java996.icu', //开发环境
production: 'https://jobadmin.java996.icu', //生产环境
}
const ENV_BASE_URL = {
development: 'http://localhost:8091', //开发环境
production: 'http://localhost:8091', //生产环境
development: 'https://jobadmin.java996.icu', //开发环境
production: 'https://jobadmin.java996.icu', //生产环境
}
// const ENV_API_URL = {
// development: 'http://localhost:8091', //开发环境
// production: 'http://localhost:8091', //生产环境
// }
// const ENV_BASE_URL = {
// development: 'http://localhost:8091', //开发环境
// production: 'http://localhost:8091', //生产环境
// }
export const BASE_URL = ENV_BASE_URL[process.env.NODE_ENV || 'development']; //后台根域名


+ 6
- 1
pages/jianhua/index.vue View File

@ -79,6 +79,7 @@
shopList:[],
params:{
classId:'1623505640888492033',
labelClass:'1623505640888492033',
pageNo:1,
pageSize:10,
total: null,
@ -145,7 +146,11 @@
//
getShopList(){
uni.showLoading()
this.$api('getJobShopList',this.params)
this.$api('getJobShopList',{
labelClass:'1623505640888492033',
pageNo:this.params.pageNo,
pageSize:this.params.pageSize,
})
.then(res=>{
uni.hideLoading();
if(res.code == 200){


+ 28
- 28
pages/my/login-kehu.vue View File

@ -72,28 +72,28 @@
})
},
logionClick(){
let actoken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2OTA4NjAxNjgsInVzZXJuYW1lIjoib2ROdHc2dEJVNmMxenlnU1lmb2d4ZWdTX2xxbyJ9.OfGbI5WQJYA_wMUUz-BlGHunkLTO0aNoTyOgEdyt8UQ";
this.$store.commit('set_userToken',actoken);
uni.switchTab({
url:'/pages/my/index'
})
let did = uni.getStorageSync("did");
if (did) {
uni.navigateTo({
url:'/pages/home/course-detial?id=' + did
})
} else {
uni.switchTab({
url:'/pages/my/index'
})
}
// if(this.code){
// //
// this.toWxLogin()
// let actoken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2OTA4NjAxNjgsInVzZXJuYW1lIjoib2ROdHc2dEJVNmMxenlnU1lmb2d4ZWdTX2xxbyJ9.OfGbI5WQJYA_wMUUz-BlGHunkLTO0aNoTyOgEdyt8UQ";
// this.$store.commit('set_userToken',actoken);
// uni.switchTab({
// url:'/pages/my/index'
// })
// let did = uni.getStorageSync("did");
// if (did) {
// uni.navigateTo({
// url:'/pages/home/course-detial?id=' + did
// })
// } else {
// //code
// this.getwx_authorize();
// uni.switchTab({
// url:'/pages/my/index'
// })
// }
if(this.code){
//
this.toWxLogin()
} else {
//code
this.getwx_authorize();
}
},
toWxLogin(code){
this.vid= uni.getStorageSync("ivcode");
@ -124,14 +124,14 @@
},
getwx_authorize(){
console.log("进入了这")
this.logionClick()
// let vid = uni.getStorageSync("ivcode");
// //
// let redirect_uri = encodeURIComponent('https://job.java996.icu/pages/my/login-kehu');
// //appid
// let appid = 'wx6fb4a17b28186d58';
// //
// window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appid+'&redirect_uri='+redirect_uri+'&response_type=code&scope=snsapi_userinfo&state='+vid+'&connect_redirect=1#wechat_redirect';
// this.logionClick()
let vid = uni.getStorageSync("ivcode");
//
let redirect_uri = encodeURIComponent('https://job.java996.icu/pages/my/login-kehu');
//appid
let appid = 'wx6fb4a17b28186d58';
//
window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appid+'&redirect_uri='+redirect_uri+'&response_type=code&scope=snsapi_userinfo&state='+vid+'&connect_redirect=1#wechat_redirect';
},
//url
GetQueryString(name) {


Loading…
Cancel
Save