Browse Source

feat: 接口地址替换;

pull/6/head
Fox-33 3 weeks ago
parent
commit
fa6ed5702d
2 changed files with 26 additions and 17 deletions
  1. +20
    -15
      pages/login/index.vue
  2. +6
    -2
      utils/getUrl.js

+ 20
- 15
pages/login/index.vue View File

@ -5,14 +5,23 @@
<image class="d" :src="configList?.logo_icon?.paramValueImage" mode="aspectFill"></image>
</view>
<view class="login-submit">
<up-button class="mt24" type="primary" text="微信授权登陆" @tap="loginWx" shape="circle"
<up-button class="mt24" type="primary" text="微信授权登陆" @click="loginWx" shape="circle"
color="#FFBF60"></up-button>
<up-button @click="cancelLogin" class="mt24" type="primary" text="取消登录" shape="circle"
color="#FFBF60"></up-button>
</view>
<view class="flex-rowc">
<view class="select">
<image mode="widthFix"></image>
<view>
<up-checkbox
v-model:checked="isAgree"
size="29rpx"
icon-size="29rpx"
name="agree"
usedAlone
shape="circle"
activeColor="#FFBF60"
>
</up-checkbox>
</view>
<view class="size-26">
<text>我已阅读并同意猫爸狗妈</text>
@ -60,8 +69,16 @@
const show = ref(false)
const content = ref('')
const isAgree = ref(false)
//
const loginWx = () => {
if (!isAgree.value) {
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
store.dispatch("login")
}
@ -149,18 +166,6 @@
@import "index";
@import "@/style/index.scss";
.select {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
border: 1rpx solid #C7C7C7;
margin-right: 8rpx;
.active {
background-color: $mainColor;
}
}
.footer {
color: #C7C7C7;
position: fixed;


+ 6
- 2
utils/getUrl.js View File

@ -4,11 +4,15 @@ current = accountInfo.miniProgram.envVersion;
const api = {
develop: "http://youyi-test.natapp1.cc/prod-api", // 开发
trial: "http://h5.xzaiyp.top", //测试
release: "http://h5.xzaiyp.top", // 线上
trial: "http://youyi-test.natapp1.cc/prod-api", //测试
release: "http://youyi-test.natapp1.cc/prod-api", // 线上
}
console.log('--current', current)
const currentUrl = api[current];
console.log('--currentUrl', currentUrl)
export {
currentUrl
};

Loading…
Cancel
Save