1. 公众号调整完成。

2. 登录返回调整成 True False  不再返回具体登录信息。
DLC
鹿和sa0ChunLuyu 2 years ago
parent b9f4d2aafc
commit 43962f17f6

@ -54,7 +54,7 @@ class WeChatController extends Controller
$login = $this->mp_login($we_chat, $code); $login = $this->mp_login($we_chat, $code);
break; break;
} }
return $login; return ['login' => !!$login];
} }
public function login_test(Request $request) public function login_test(Request $request)

@ -92,7 +92,7 @@
</view> </view>
<view v-else class="dev_box_wrapper" :style="{ <view v-else class="dev_box_wrapper" :style="{
width: Number(dev_status) === 1 ? '80rpx' : '730rpx', width: Number(dev_status) === 1 ? '80rpx' : '730rpx',
height: Number(dev_status) === 1 ? '80rpx' : 'calc(100vh - 20rpx)', height: Number(dev_status) === 1 ? '80rpx' : '400rpx',
}"> }">
<view @click="devStatusChangeClick()" class="dev_button_wrapper"> <view @click="devStatusChangeClick()" class="dev_button_wrapper">
<uni-icons v-if="Number(dev_status) === 1" type="tune" size="40rpx"></uni-icons> <uni-icons v-if="Number(dev_status) === 1" type="tune" size="40rpx"></uni-icons>
@ -139,7 +139,12 @@
.dev_box_wrapper { .dev_box_wrapper {
position: fixed; position: fixed;
/* #ifdef MP-WEIXIN */
bottom: 10rpx;
/* #endif */
/* #ifdef H5 */
top: 10rpx; top: 10rpx;
/* #endif */
left: 10rpx; left: 10rpx;
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
@ -152,7 +157,12 @@
.dev_magic_button_wrapper { .dev_magic_button_wrapper {
position: fixed; position: fixed;
/* #ifdef MP-WEIXIN */
bottom: 0;
/* #endif */
/* #ifdef H5 */
top: 0; top: 0;
/* #endif */
left: 0; left: 0;
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;

@ -3,7 +3,7 @@
"path": "pages/main/index/index", "path": "pages/main/index/index",
"style": { "style": {
"navigationBarTitleText": "鹿和开发模板", "navigationBarTitleText": "鹿和开发模板",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, { }, {
"path": "pages/main/my/my", "path": "pages/main/my/my",

@ -8,18 +8,67 @@
ref ref
} from 'vue' } from 'vue'
import { import {
WeChatLoginTestAction,
GzhConfig,
$response $response
} from '@/api' } from '@/api'
import { import {
onShow onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
const $props = defineProps({
code: {
type: String,
default: ''
}
});
const user_code = ref('')
const WeChatLoginTest = async () => {
const response = await WeChatLoginTestAction({
code: $props.code,
app_id: GzhConfig.id
})
$response(response, () => {
user_code.value = JSON.stringify(response.data.info, null, 4)
})
}
const copyContent = () => {
uni.setClipboardData({
data: user_code.value
})
}
const toHome = () => {
uni.switchTab({
url: '/pages/main/index/index'
})
}
onShow(() => {
WeChatLoginTest()
})
</script> </script>
<template> <template>
<view> <view>
Yo <textarea :maxlength="-1" class="textarea_wrapper" v-model="user_code" />
<view class="blank_wrapper"></view> <view class="button_line_wrapper">
<button size="mini" @click="copyContent()"></button>
<button size="mini" @click="toHome()"></button>
</view>
<view class="bottom_blank_wrapper"></view>
</view> </view>
</template> </template>
<style scoped> <style scoped>
.button_line_wrapper {
</style> display: flex;
justify-content: space-around;
}
.textarea_wrapper {
margin-top: 100rpx;
height: 400rpx;
margin: 0 auto;
}
</style>

@ -31,9 +31,9 @@
} }
.page_wrapper { .page_wrapper {
height: 100vh; position: absolute;
display: flex; top: 50%;
align-items: center; left: 50%;
justify-content: center; transform: translate(-50%, -50%);
} }
</style> </style>

@ -22,9 +22,9 @@
</template> </template>
<style scoped> <style scoped>
.page_wrapper { .page_wrapper {
height: 100vh; position: absolute;
display: flex; top: 50%;
align-items: center; left: 50%;
justify-content: center; transform: translate(-50%, -50%);
} }
</style> </style>
Loading…
Cancel
Save