sc
This commit is contained in:
@@ -71,3 +71,10 @@ export const getAppInfo = (instanceId: number) => {
|
|||||||
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
url: '/admin-api/system/serviceInstance/getInstanceInfo?instanceId=' + instanceId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const bindWx = (data: any) => {
|
||||||
|
return request.post({
|
||||||
|
url: '/admin-api/system/user/bing/wx',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -194,7 +194,6 @@ const submitForm = async () => {
|
|||||||
const data = formData.value as unknown as UserApi.UserVO
|
const data = formData.value as unknown as UserApi.UserVO
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
const resp = await UserApi.createUser(data)
|
const resp = await UserApi.createUser(data)
|
||||||
debugger
|
|
||||||
if (resp.code == 18888) {
|
if (resp.code == 18888) {
|
||||||
await message.confirm(resp.msg)
|
await message.confirm(resp.msg)
|
||||||
formData.value.isNewUserConfirm = true
|
formData.value.isNewUserConfirm = true
|
||||||
@@ -229,7 +228,7 @@ const resetForm = () => {
|
|||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
hireDate: formatDate(new Date(), 'YYYY-MM-DD'),
|
||||||
isNewUserConfirm: undefined
|
isNewUserConfirm: false
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="searchForm.mobile" placeholder="联系方式" clearable />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
<el-select v-model="searchForm.state" placeholder="审核状态" clearable style="width: 120px">
|
||||||
<el-option label="待审核" :value="1" />
|
<el-option label="待审核" :value="1" />
|
||||||
@@ -331,6 +334,7 @@ const searchForm = ref({
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
phone: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
})
|
})
|
||||||
@@ -358,6 +362,7 @@ function handleReset() {
|
|||||||
applyTime: [],
|
applyTime: [],
|
||||||
applyUser: undefined,
|
applyUser: undefined,
|
||||||
checkTime: [],
|
checkTime: [],
|
||||||
|
mobile: undefined,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,17 @@
|
|||||||
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
|
<el-input v-model="form.password" placeholder="请输入密码" show-password type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button type="primary" class="w-full" @click="onSubmit">授权登陆</el-button>
|
<el-button type="primary" :disabled="formLoading" class="w-full" @click="onSubmit"
|
||||||
<div v-if="form.code">code: {{ form.code }}</div>
|
>授权登陆</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="MPLogin">
|
<script setup name="MPLogin">
|
||||||
|
import { bindWx } from '@/api/login'
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
code: undefined,
|
code: undefined,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
@@ -38,13 +43,28 @@ const params = ref({
|
|||||||
scope: 'snsapi_base' // snsapi_base 静默授权获取 open id ;snsapi_userinfo 需要用户授权,获取详细信息
|
scope: 'snsapi_base' // snsapi_base 静默授权获取 open id ;snsapi_userinfo 需要用户授权,获取详细信息
|
||||||
// state:'code', // a-zA-Z0-9的参数值,最多128字节
|
// state:'code', // a-zA-Z0-9的参数值,最多128字节
|
||||||
})
|
})
|
||||||
function onSubmit() {
|
|
||||||
|
async function onSubmit() {
|
||||||
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆
|
// 这些需要判断没有 code 情况拉起授权登陆,有就结束放在重复拉起授权登陆
|
||||||
if (!form.value.code) {
|
if (!form.value.code) {
|
||||||
const access_url = WX_AUTH_URL + `${new URLSearchParams(params.value)}` + REDIRECT
|
const access_url = WX_AUTH_URL + `${new URLSearchParams(params.value)}` + REDIRECT
|
||||||
location.href = access_url
|
location.href = access_url
|
||||||
} else {
|
} else {
|
||||||
alert(`授权成功!`)
|
// 校验表单
|
||||||
|
if (!formRef.value) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
await bindWx(form.value)
|
||||||
|
message.success('绑定成功')
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
message.success('绑定失败')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,10 @@ const handleQuery = () => {
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDetail(row: any) {
|
async function handleDetail(row: any) {
|
||||||
|
if (!row.readStatus) {
|
||||||
|
await handleReadOne(row.id)
|
||||||
|
}
|
||||||
const url = router.resolve({
|
const url = router.resolve({
|
||||||
path: '/nm-detail',
|
path: '/nm-detail',
|
||||||
query: { id: row.id }
|
query: { id: row.id }
|
||||||
@@ -133,6 +136,14 @@ function handleDetail(row: any) {
|
|||||||
const tableRef = ref() // 表格的 Ref
|
const tableRef = ref() // 表格的 Ref
|
||||||
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
|
const selectedIds = ref<number[]>([]) // 表格的选中 ID 数组
|
||||||
|
|
||||||
|
/** 标记一条站内信已读 */
|
||||||
|
const handleReadOne = async (id: number) => {
|
||||||
|
await NotifyMessageApi.updateNotifyMessageRead({
|
||||||
|
ids: [id]
|
||||||
|
})
|
||||||
|
await getList()
|
||||||
|
}
|
||||||
|
|
||||||
/** 标记全部站内信已读 **/
|
/** 标记全部站内信已读 **/
|
||||||
const handleUpdateAll = async () => {
|
const handleUpdateAll = async () => {
|
||||||
await NotifyMessageApi.updateAllNotifyMessageRead({
|
await NotifyMessageApi.updateAllNotifyMessageRead({
|
||||||
|
|||||||
Reference in New Issue
Block a user