提交 06fc996a 作者: 王定

feat: 调整登录方式,改为了账号密码登录,如果是test账号前端将隐藏掉某些金融找人相关方面的内容。

上级 73670db1
# API 接口地址 # API 接口地址
VITE_GLOB_API_URL=http://111.22.182.169:49600 # VITE_GLOB_API_URL=http://111.22.182.169:49600
# VITE_GLOB_API_URL=http://36.133.16.81:42111 VITE_GLOB_API_URL=http://36.133.16.81:42111
# VITE_GLOB_API_URL=http://123.207.47.17 # VITE_GLOB_API_URL=http://123.207.47.17
# API 接口地址前缀 # API 接口地址前缀
VITE_GLOB_API_URL_PREFIX=/jeecgboot # VITE_GLOB_API_URL_PREFIX=/jeecgboot
# VITE_GLOB_API_URL_PREFIX=/jeecg-boot
# VITE_GLOB_API_URL_PREFIX=/jeecg-boot # VITE_GLOB_API_URL_PREFIX=/jeecg-boot
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
import * as NongzhiAPI from '@/api/model/nongzhi' import * as NongzhiAPI from '@/api/model/nongzhi'
import * as HomeAPI from '@/api/model/home' import * as HomeAPI from '@/api/model/home'
import Navigate from '@/utils/page/navigate' import Navigate from '@/utils/page/navigate'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore();
const accountInfo = userStore.getUserInfo.username;
// 下拉刷新 // 下拉刷新
onPullDownRefresh(() => { onPullDownRefresh(() => {
getGoodsList() getGoodsList()
...@@ -225,14 +227,26 @@ ...@@ -225,14 +227,26 @@
// 查询服务列表 // 查询服务列表
function getServiceItems() { function getServiceItems() {
// '灵活用工','农机租赁','惠农金融','助农保险'
const testLimitContent = ['1983075690694692866','1983077495298183170','1983077763284848642','1983077932298522625','1985038053803876354','1985038211056721921','1985038680680357889'];
HomeAPI.zoneList({ HomeAPI.zoneList({
pageNo: 1, pageNo: 1,
pageSize: 5, pageSize: 5,
status: 1, status: 1,
type: 3, type: 3,
}).then((res) => { }).then((res) => {
const { records } = res const { records } = res;
pageData.menuItems = [...records] if(accountInfo == 'test'){
let arrData = [];
for(let i = 0; i < records.length; i++){
if(!testLimitContent.includes(records[i].id)){
arrData.push(records[i]);
}
}
pageData.menuItems = arrData;
}else{
pageData.menuItems = [...records]
}
}) })
} }
...@@ -385,14 +399,14 @@ ...@@ -385,14 +399,14 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="codefun-flex-row codefun-justify-between codefun-items-baseline codefun-mt-24"> <view v-if="accountInfo != 'test'" class="codefun-flex-row codefun-justify-between codefun-items-baseline codefun-mt-24">
<text class="font_5 text_8">灵活用工</text> <text class="font_5 text_8">灵活用工</text>
<text class="font_6 text_9" @click="onViewMoreFlexibleEmployment">更多</text> <text class="font_6 text_9" @click="onViewMoreFlexibleEmployment">更多</text>
</view> --> </view>
</view> </view>
</view> </view>
<view class="codefun-flex-col group_8"> <view class="codefun-flex-col group_8">
<!-- <view class="codefun-flex-col section_4 flex gap-4"> <view v-if="accountInfo != 'test'" class="codefun-flex-col section_4 flex gap-4">
<navigator <navigator
v-for="service in pageData.flexibleEmploymentServices" v-for="service in pageData.flexibleEmploymentServices"
:key="service.id" :key="service.id"
...@@ -419,8 +433,8 @@ ...@@ -419,8 +433,8 @@
</view> </view>
</view> </view>
</navigator> </navigator>
</view> --> </view>
<!-- <view class="codefun-flex-col codefun-mt-24"> <view v-if="accountInfo != 'test'" class="codefun-flex-col codefun-mt-24">
<view class="codefun-flex-row codefun-justify-between codefun-items-center group_11"> <view class="codefun-flex-row codefun-justify-between codefun-items-center group_11">
<text class="font_5 text_18">助农金融</text> <text class="font_5 text_18">助农金融</text>
<text class="font_6 text_19" @click="onViewAllFinancialProducts">全部</text> <text class="font_6 text_19" @click="onViewAllFinancialProducts">全部</text>
...@@ -465,7 +479,7 @@ ...@@ -465,7 +479,7 @@
/> />
</template> </template>
</view> </view>
</view> --> </view>
<view class="codefun-flex-col codefun-mt-24"> <view class="codefun-flex-col codefun-mt-24">
<text class="codefun-self-start font_5 text_26">农资交易</text> <text class="codefun-self-start font_5 text_26">农资交易</text>
<view class="codefun-flex-col codefun-self-stretch section_6 codefun-mt-16"> <view class="codefun-flex-col codefun-self-stretch section_6 codefun-mt-16">
...@@ -507,7 +521,7 @@ ...@@ -507,7 +521,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="codefun-flex-col codefun-mt-24"> <view v-if="accountInfo != 'test'" class="codefun-flex-col codefun-mt-24">
<text class="codefun-self-start font_5">一站式解决农机问题</text> <text class="codefun-self-start font_5">一站式解决农机问题</text>
<view class="codefun-flex-col codefun-self-stretch section_11"> <view class="codefun-flex-col codefun-self-stretch section_11">
<view class="codefun-flex-row equal-division_3"> <view class="codefun-flex-row equal-division_3">
......
...@@ -56,7 +56,17 @@ ...@@ -56,7 +56,17 @@
}, },
], ],
rules: [ rules: [
{ {
name: 'username',
rule: ['required'],
msg: ['请输入账号'],
},
{
name: 'password',
rule: ['required'],
msg: ['请输入密码'],
},
/* {
name: 'username', name: 'username',
rule: ['required'], rule: ['required'],
msg: ['请输入手机号'], msg: ['请输入手机号'],
...@@ -65,7 +75,7 @@ ...@@ -65,7 +75,7 @@
name: 'code', name: 'code',
rule: ['required'], rule: ['required'],
msg: ['请输入验证码'], msg: ['请输入验证码'],
}, }, */
{ {
name: 'read', name: 'read',
validator: [ validator: [
...@@ -81,7 +91,8 @@ ...@@ -81,7 +91,8 @@
], ],
data: { data: {
username: '', username: '',
code: '', password:'',
// code: '',
read: false, read: false,
deviceId: '', deviceId: '',
}, },
...@@ -91,7 +102,8 @@ ...@@ -91,7 +102,8 @@
// TODO: 开发环境快速填入账户密码,并默认勾选已读隐私政策和服务协议 // TODO: 开发环境快速填入账户密码,并默认勾选已读隐私政策和服务协议
if (isDevMode()) { if (isDevMode()) {
model.form.data.username = '' model.form.data.username = ''
model.form.data.code = '' // model.form.data.code = ''
model.form.data.password = ''
model.form.data.read = false model.form.data.read = false
} }
...@@ -102,14 +114,18 @@ ...@@ -102,14 +114,18 @@
form?.value.validator(model.form.data, model.form.rules).then(async (res: { isPassed: boolean }) => { form?.value.validator(model.form.data, model.form.rules).then(async (res: { isPassed: boolean }) => {
if (res.isPassed) { if (res.isPassed) {
// 登录参数 // 登录参数
const params = { /* const params = {
mobile: model.form.data.username, mobile: model.form.data.username,
captcha: model.form.data.code, captcha: model.form.data.code,
} } */
const params = {
username: model.form.data.username,
password: model.form.data.password,
}
// 短信登录 // 短信登录
model.loading = true model.loading = true
API.phoneLogin(params) // API.phoneLogin(params)
API.sysLogin(params)
.then(async (body) => { .then(async (body) => {
console.log('body', body) console.log('body', body)
if (body) { if (body) {
...@@ -220,7 +236,49 @@ ...@@ -220,7 +236,49 @@
<fui-form class="form" ref="form" top="0" :padding="['0rpx', '0rpx']" background="#e46962"> <fui-form class="form" ref="form" top="0" :padding="['0rpx', '0rpx']" background="#e46962">
<view class="login_content"> <view class="login_content">
<view class="login-input-area"> <view class="login-input-area">
<view class="user_phone">
<image class="user_phone_img" src="/static/images/register/user.png" />
<view class="user_text_view"><text class="view_text">账号</text></view>
</view>
<view class="input-bottom-border">
<fui-input
height="94rpx"
:padding="['0rpx', '0rpx', '0rpx', '12rpx']"
class="input"
autocomplete="off"
:required="false"
clearable
trim
placeholder="请输入账号"
v-model="model.form.data.username"
name="mobile"
backgroundColor="transparent"
borderColor="transparent"
maxlength="11"
/>
</view>
<view class="user_phone mt50">
<image class="user_phone_img" src="/static/images/register/pwd.png" />
<view class="user_text_view"><text class="view_text">密码</text></view>
</view>
<view class="input-bottom-border">
<fui-input
height="94rpx"
:padding="['0rpx', '0rpx', '0rpx', '12rpx']"
class="input"
password
clearable
trim
placeholder="请输入密码"
v-model="model.form.data.password"
backgroundColor="transparent"
borderColor="transparent"
>
</fui-input>
</view>
</view>
<!-- <view class="login-input-area">
<view class="user_phone"> <view class="user_phone">
<image class="user_phone_img" src="/static/images/register/user.png" /> <image class="user_phone_img" src="/static/images/register/user.png" />
<view class="user_text_view"><text class="view_text">手机号</text></view> <view class="user_text_view"><text class="view_text">手机号</text></view>
...@@ -269,7 +327,7 @@ ...@@ -269,7 +327,7 @@
/> />
</fui-input> </fui-input>
</view> </view>
</view> </view> -->
<view class="submit_btn_view"> <view class="submit_btn_view">
<fui-button <fui-button
......
...@@ -10,6 +10,7 @@ import { useUserStore } from '@/store/modules/user' ...@@ -10,6 +10,7 @@ import { useUserStore } from '@/store/modules/user'
import { getList as getVideoList } from '@/api/model/knowledgeVideo' import { getList as getVideoList } from '@/api/model/knowledgeVideo'
const userStore = useUserStore() const userStore = useUserStore()
const accountInfo = userStore.getUserInfo.username;
onShow(() => { onShow(() => {
// 获取金刚区菜单数据 // 获取金刚区菜单数据
getZoomList() getZoomList()
...@@ -741,12 +742,12 @@ onHide(() => { ...@@ -741,12 +742,12 @@ onHide(() => {
</view> </view>
</view> </view>
<!-- <fui-fab position="right" distance="10" bottom="240" width="96" @click="handlePublish"> <fui-fab v-if="accountInfo != 'test'" position="right" distance="10" bottom="240" width="96" @click="handlePublish">
<view class="text-white text-center"> <view class="text-white text-center">
<image style="width: 52rpx;height:52rpx;" src="/static/images/nongchang/work_icon.png" /> <image style="width: 52rpx;height:52rpx;" src="/static/images/nongchang/work_icon.png" />
<view style="font-size: 18rpx;margin-top: -16rpx;">找人干活</view> <view style="font-size: 18rpx;margin-top: -16rpx;">找人干活</view>
</view> </view>
</fui-fab> --> </fui-fab>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -19,6 +19,7 @@ const model = reactive({ ...@@ -19,6 +19,7 @@ const model = reactive({
// 湖南省人民政府 // 湖南省人民政府
location: '112.982931,28.116698', location: '112.982931,28.116698',
}) })
const accountInfo = userStore.getUserInfo.username;
// 位置获取频率控制 // 位置获取频率控制
const lastLocationTime = ref(0) const lastLocationTime = ref(0)
...@@ -146,8 +147,10 @@ onShow(() => { ...@@ -146,8 +147,10 @@ onShow(() => {
// 预警信息 // 预警信息
getWarning() getWarning()
// 农技课堂 setTimeout(()=>{
getAgricultureClassList(); // 农技课堂
getAgricultureClassList();
},500)
}) })
// 下拉刷新 // 下拉刷新
...@@ -301,6 +304,8 @@ const pageData = reactive({ ...@@ -301,6 +304,8 @@ const pageData = reactive({
}) })
function getServiceItems() { function getServiceItems() {
// '灵活用工','农机租赁','惠农金融','助农保险'
const testLimitContent = ['1983075690694692866','1983077495298183170','1983077763284848642','1983077932298522625'];
HomeAPI.zoneList({ HomeAPI.zoneList({
pageNo: 1, pageNo: 1,
pageSize: 8, pageSize: 8,
...@@ -308,8 +313,18 @@ function getServiceItems() { ...@@ -308,8 +313,18 @@ function getServiceItems() {
type: 1, type: 1,
}).then((res) => { }).then((res) => {
const { records } = res const { records } = res
pageData.serviceItems = [] pageData.serviceItems = []
pageData.serviceItems = records if(accountInfo == 'test'){
let arrData = [];
for(let i = 0; i < records.length; i++){
if(!testLimitContent.includes(records[i].id)){
arrData.push(records[i]);
}
}
pageData.serviceItems = arrData;
}else{
pageData.serviceItems = records
}
}) })
} }
function getWarningInfo() { function getWarningInfo() {
...@@ -593,11 +608,11 @@ export default { ...@@ -593,11 +608,11 @@ export default {
<!-- <text class="text" style="font-family: alimamashuheiti">湖南省</text> --> <!-- <text class="text" style="font-family: alimamashuheiti">湖南省</text> -->
</view> </view>
<!-- ai助手 --> <!-- ai助手 -->
<!-- <FuiMovableView direction="vertical" top="650" right="-12" zIndex="99999"> <FuiMovableView v-if="accountInfo != 'test'" direction="vertical" top="650" right="-12" zIndex="99999">
<view class="h-80rpx flex items-center" @click="openAITools"> <view class="h-80rpx flex items-center" @click="openAITools">
<image class="w-117rpx h-118rpx" src="/static/images/codefun/ai.png" alt="" /> <image class="w-117rpx h-118rpx" src="/static/images/codefun/ai.png" alt="" />
</view> </view>
</FuiMovableView> --> </FuiMovableView>
<view class="codefun-flex-col codefun-relative group_3"> <view class="codefun-flex-col codefun-relative group_3">
<view class="codefun-flex-col"> <view class="codefun-flex-col">
<view class="codefun-flex-col codefun-self-stretch group_4"> <view class="codefun-flex-col codefun-self-stretch group_4">
......
src/static/images/register/pwd.png

764 Bytes | W: | H:

src/static/images/register/pwd.png

563 Bytes | W: | H:

src/static/images/register/pwd.png
src/static/images/register/pwd.png
src/static/images/register/pwd.png
src/static/images/register/pwd.png
  • 2-up
  • Swipe
  • Onion skin
src/static/images/register/user.png

596 Bytes | W: | H:

src/static/images/register/user.png

483 Bytes | W: | H:

src/static/images/register/user.png
src/static/images/register/user.png
src/static/images/register/user.png
src/static/images/register/user.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论