| @@ -0,0 +1,58 @@ | |||||
| import request from '@/utils/request' | |||||
| // 保险公司登录 | |||||
| export function serviceLogin(data) { | |||||
| return request({ | |||||
| url: '/depositm/financialService/login', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| //保险产品列表 | |||||
| export function productList(query) { | |||||
| return request({ | |||||
| url: '/depositm/financialProduct/list', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| //保险产品详情 | |||||
| export function productGet(id) { | |||||
| return request({ | |||||
| url: '/depositm/financialProduct/get/'+id, | |||||
| method: 'get', | |||||
| }) | |||||
| } | |||||
| //上传全局方法附件 | |||||
| export function commonUpload(data) { | |||||
| return request({ | |||||
| url: '/depositm/common/upload', | |||||
| method: 'post', | |||||
| header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 修改保险产品 | |||||
| export function financialProductEdit(data) { | |||||
| return request({ | |||||
| url: '/depositm/financialProduct/edit', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 新增保险产品 | |||||
| export function financialProductAdd(data) { | |||||
| return request({ | |||||
| url: '/depositm/financialProduct/add', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| @@ -148,6 +148,8 @@ const whiteList = [ | |||||
| '/agriculturalTrusteeship/societyProjectList',//社会化产品列表 | '/agriculturalTrusteeship/societyProjectList',//社会化产品列表 | ||||
| '/agriculturalTrusteeship/societyProjectDetail',//社会化产品详情 | '/agriculturalTrusteeship/societyProjectDetail',//社会化产品详情 | ||||
| '/agriculturalTrusteeship/shopList',//保险列表首页 | '/agriculturalTrusteeship/shopList',//保险列表首页 | ||||
| '/agriculturalTrusteeship/shopDetail',//保险列表详情 | |||||
| '/agriculturalTrusteeship/shopEdit',//保险列表详情 | |||||
| '/agriculturalTrusteeship/shopAdd',//保险列表首页 | '/agriculturalTrusteeship/shopAdd',//保险列表首页 | ||||
| '/agriculturalTrusteeship/socializationIndex',//社会化服务组织待处理 | '/agriculturalTrusteeship/socializationIndex',//社会化服务组织待处理 | ||||
| '/agriculturalTrusteeship/socializationProject',//社会化服务组织产品 | '/agriculturalTrusteeship/socializationProject',//社会化服务组织产品 | ||||
| @@ -4670,6 +4670,24 @@ export const constantRoutes = [ | |||||
| }, | }, | ||||
| component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/shopList'], resolve) | component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/shopList'], resolve) | ||||
| }, | }, | ||||
| { | |||||
| path: '/agriculturalTrusteeship/shopDetail', | |||||
| name: 'agriculturalTrusteeshipShopDetail', | |||||
| meta: { | |||||
| title: '保险详情', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/shopDetail'], resolve) | |||||
| }, | |||||
| { | |||||
| path: '/agriculturalTrusteeship/shopEdit', | |||||
| name: 'agriculturalTrusteeshipShopEdit', | |||||
| meta: { | |||||
| title: '保险修改', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/shopEdit'], resolve) | |||||
| }, | |||||
| { | { | ||||
| path: '/agriculturalTrusteeship/shopAdd', | path: '/agriculturalTrusteeship/shopAdd', | ||||
| name: 'agriculturalTrusteeshipShopAdd', | name: 'agriculturalTrusteeshipShopAdd', | ||||
| @@ -7,6 +7,7 @@ import errorCode from '@/utils/errorCode' | |||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
| axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' | ||||
| axios.defaults.headers['ACCESS-SESSION-ID'] = Cookies.get('ACCESS-SESSION-ID') // 让每个请求携带自定义token 请根据实际情况自行修改 | |||||
| // 创建axios实例 | // 创建axios实例 | ||||
| const service = axios.create({ | const service = axios.create({ | ||||
| // axios中请求配置有baseURL选项,表示请求URL公共部分 | // axios中请求配置有baseURL选项,表示请求URL公共部分 | ||||
| @@ -13,7 +13,7 @@ | |||||
| <!-- 头部结束 --> | <!-- 头部结束 --> | ||||
| <!-- 登陆选择开始 --> | <!-- 登陆选择开始 --> | ||||
| <div class="main"> | |||||
| <div class="main" style="display: none;"> | |||||
| <div class="nav"> | <div class="nav"> | ||||
| <div class="nav_content" @click="$router.push({name:'agriculturalTrusteeshipBuyerIndex'})"> | <div class="nav_content" @click="$router.push({name:'agriculturalTrusteeshipBuyerIndex'})"> | ||||
| <div> | <div> | ||||
| @@ -35,21 +35,21 @@ | |||||
| </div> | </div> | ||||
| <div class="nav"> | <div class="nav"> | ||||
| <div class="nav_content"> | |||||
| <div class="nav_content" @click="$router.push({name:'agriculturalTrusteeshipShopList'})"> | |||||
| <div> | <div> | ||||
| <p class="nav_name_03">保险机构登录</p> | <p class="nav_name_03">保险机构登录</p> | ||||
| <p class="nav_text">登录可发布保险产品</p> | <p class="nav_text">登录可发布保险产品</p> | ||||
| </div> | </div> | ||||
| <i class="go"></i> | <i class="go"></i> | ||||
| </div> | </div> | ||||
| <div class="nav_content" style="padding:12.5PX 0;margin:12.5PX 0;border-top: 1px solid #D5D8DE;border-bottom: 1px solid #D5D8DE;"> | |||||
| <div class="nav_content" style="padding:12.5PX 0;margin:12.5PX 0;border-top: 1px solid #D5D8DE;border-bottom: 1px solid #D5D8DE;" @click="$router.push({name:'agriculturalTrusteeshipShopList'})"> | |||||
| <div> | <div> | ||||
| <p class="nav_name_04">贷款机构登录</p> | <p class="nav_name_04">贷款机构登录</p> | ||||
| <p class="nav_text">登录可发布贷款产品</p> | <p class="nav_text">登录可发布贷款产品</p> | ||||
| </div> | </div> | ||||
| <i class="go"></i> | <i class="go"></i> | ||||
| </div> | </div> | ||||
| <div class="nav_content"> | |||||
| <div class="nav_content" @click="$router.push({name:'agriculturalTrusteeshipShopList'})"> | |||||
| <div> | <div> | ||||
| <p class="nav_name_05">农担机构登录</p> | <p class="nav_name_05">农担机构登录</p> | ||||
| <p class="nav_text">登录可发布农担产品</p> | <p class="nav_text">登录可发布农担产品</p> | ||||
| @@ -61,72 +61,73 @@ | |||||
| <!-- 登陆选择结束 --> | <!-- 登陆选择结束 --> | ||||
| <!-- 登录开始 --> | <!-- 登录开始 --> | ||||
| <div class="login_main" style="display: none;" :style="{'position': position,'top':top,'transform':transform,'left':left}"> | |||||
| <div class="login_main" :style="{'position': position,'top':top,'transform':transform,'left':left}"> | |||||
| <van-tabs v-model="active" animated color="#1E67FF" background="transparent" title-active-color="#1E67FF" @change="tabsChange"> | <van-tabs v-model="active" animated color="#1E67FF" background="transparent" title-active-color="#1E67FF" @change="tabsChange"> | ||||
| <van-tab name="login" title="登录"> | <van-tab name="login" title="登录"> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入用户名" > | |||||
| <van-field v-model="username" center :border="false" placeholder="请输入主体名称" > | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_01.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入密码"> | |||||
| <van-field v-model="password" center :border="false" placeholder="请输入主体类别"> | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_password.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_02.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <p class="submit_btn" @click="$router.push({name:'agriculturalTrusteeshipShopList'})">登录</p> | |||||
| <!-- $router.push({name:'agriculturalTrusteeshipShopList'})--> | |||||
| <p class="submit_btn" @click="goLogin">登录</p> | |||||
| </van-tab> | </van-tab> | ||||
| <van-tab name="register" title="注册"> | <van-tab name="register" title="注册"> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入用户名" > | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入生产种类" > | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_03.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入密码"> | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入示范类型"> | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_password.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_04.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入用户名" > | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入主体地址" > | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_02.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入密码"> | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入成立时间"> | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_password.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_05.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入用户名" > | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入负责人姓名" > | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_06.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入密码"> | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入联系方式"> | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_password.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_07.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入用户名" > | |||||
| <van-field v-model="value1" center :border="false" placeholder="请输入密码" > | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_08.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <van-field v-model="value1" center :border="false" placeholder="请输入密码"> | |||||
| <van-field v-model="value1" center :border="false" placeholder="请确认密码"> | |||||
| <template #left-icon> | <template #left-icon> | ||||
| <img src="../../../static/images/agriculturalTrusteeship/login/login_icon_password.png" alt=""> | |||||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_08.png" alt=""> | |||||
| </template> | </template> | ||||
| </van-field> | </van-field> | ||||
| <p class="submit_btn">登录</p> | |||||
| <p class="submit_btn">提交审核</p> | |||||
| </van-tab> | </van-tab> | ||||
| </van-tabs> | </van-tabs> | ||||
| </div> | </div> | ||||
| @@ -136,6 +137,9 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
| import {getCodeImg, getRegisterSmsCode, registerCheck, registerOn} from "@/api/login"; | |||||
| import {decrypt, encrypt} from "@/utils/jsencrypt"; | |||||
| import { serviceLogin } from "@/api/agriculturalTrusteeship"; | |||||
| export default { | export default { | ||||
| name: "agriculturalTrusteeshipLogin", | name: "agriculturalTrusteeshipLogin", | ||||
| data() { | data() { | ||||
| @@ -145,13 +149,45 @@ | |||||
| position:'absolute', | position:'absolute', | ||||
| top: '50%', | top: '50%', | ||||
| transform:'translateY(-50%)', | transform:'translateY(-50%)', | ||||
| left:'4%' | |||||
| left:'4%', | |||||
| registerShow:false, | |||||
| showMessage:false, | |||||
| smsCodeValue:"", | |||||
| showKeyboard:false, | |||||
| username: "", //账号 | |||||
| password: "", //密码 | |||||
| formData: { | |||||
| username: "", //账号 | |||||
| password: "", //密码 | |||||
| financialType:'2' | |||||
| }, | |||||
| loading: false, | |||||
| codeUrl: "", //验证码 | |||||
| isSmsLogin: false, //是否手机验证码 | |||||
| computeTime: 0, | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| this.getDicts("financial_type").then(response => { | |||||
| this.financialTypeOptions = response.data; | |||||
| }); | |||||
| // this.getCode(); | |||||
| // this.getCookie(); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| goLogin(){ | |||||
| console.log(this.formData) | |||||
| Cookies.set("username", encrypt(this.formData.username), { expires: 30 }); | |||||
| Cookies.set("password", encrypt(this.formData.password), { expires: 30 }); | |||||
| this.formData.username = encrypt(this.username); | |||||
| this.formData.password = encrypt(this.password); | |||||
| serviceLogin(this.formData).then(response => { | |||||
| Cookies.set("ACCESS-SESSION-ID", response.data.id); | |||||
| Cookies.set("ServiceInformation", response.data); | |||||
| this.$router.push({ path: "/agriculturalTrusteeship/shopList" }).catch(() => {}); | |||||
| }); | |||||
| }, | |||||
| tabsChange(name){ | tabsChange(name){ | ||||
| console.log(name) | console.log(name) | ||||
| if ( name == 'register' ){ | if ( name == 'register' ){ | ||||
| @@ -165,6 +201,211 @@ | |||||
| this.transform = 'translateY(-50%)'; | this.transform = 'translateY(-50%)'; | ||||
| this.left = '4%'; | this.left = '4%'; | ||||
| } | } | ||||
| }, | |||||
| showPopup(){ | |||||
| this.showKeyboard = !this.showKeyboard | |||||
| }, | |||||
| showMessagePop(){ | |||||
| this.showMessage = !this.showMessage | |||||
| }, | |||||
| getCode() { | |||||
| getCodeImg().then((res) => { | |||||
| this.formData.uuid = res.uuid; | |||||
| this.codeUrl = "data:image/gif;base64," + res.img; | |||||
| }); | |||||
| }, | |||||
| getCookie() { | |||||
| const username = Cookies.get("username"); | |||||
| const password = Cookies.get("password"); | |||||
| const rememberMe = Cookies.get("rememberMe"); | |||||
| this.formData = { | |||||
| username: username === undefined ? this.formData.username : username, | |||||
| password: | |||||
| password === undefined ? this.formData.password : decrypt(password), | |||||
| rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), | |||||
| }; | |||||
| }, | |||||
| getSmsCode() { | |||||
| if (this.formData.code == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '图片验证码不能为空', | |||||
| }); | |||||
| return false; | |||||
| } | |||||
| if (!this.computeTime) { | |||||
| let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; | |||||
| if (!myreg.test(this.formData.mobile)) { | |||||
| this.$dialog.alert({ | |||||
| message: '手机号格式不正确', | |||||
| }); | |||||
| return false; | |||||
| } | |||||
| /* getSmsCode(this.formData.mobile).then((res) => { | |||||
| if (res.code === 200) { | |||||
| this.$dialog.alert({ | |||||
| message: '验证码已发送', | |||||
| }); | |||||
| this.showKeyboard = !this.showKeyboard; | |||||
| this.loginForm.uuid = res.uuid; | |||||
| this.computeTime = 60; | |||||
| this.timer = setInterval(() => { | |||||
| this.computeTime--; | |||||
| if (this.computeTime <= 0) { | |||||
| clearInterval(this.timer); | |||||
| } | |||||
| }, 1000); | |||||
| } | |||||
| });*/ | |||||
| } | |||||
| }, | |||||
| handleLogin(values) { | |||||
| if (this.isSmsLogin) { | |||||
| //短信登录 | |||||
| let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; | |||||
| if (!myreg.test(this.formData.mobile)) { | |||||
| this.$dialog.alert({ | |||||
| message: '手机号格式不正确', | |||||
| }); | |||||
| return false; | |||||
| } else if (this.formData.smsCode == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '短信验证码不能为空', | |||||
| }); | |||||
| return false; | |||||
| } | |||||
| this.loading = true; | |||||
| this.$store | |||||
| .dispatch("SmsLogin", this.formData) | |||||
| .then(() => { | |||||
| this.$router.push({ path: "/onlineHomeIndex" }).catch(() => {}); | |||||
| }) | |||||
| .catch((error) => { | |||||
| this.loading = false; | |||||
| }); | |||||
| } else { | |||||
| if (this.formData.rememberMe) { | |||||
| Cookies.set("username", this.formData.username, { expires: 30 }); | |||||
| Cookies.set("password", encrypt(this.formData.password), { expires: 30 }); | |||||
| Cookies.set("rememberMe", this.formData.rememberMe, { expires: 30 }); | |||||
| } else { | |||||
| Cookies.remove("username"); | |||||
| Cookies.remove("password"); | |||||
| Cookies.remove("rememberMe"); | |||||
| } | |||||
| //账号密码登录 | |||||
| if (this.formData.username == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '账号不能为空', | |||||
| }); | |||||
| return false; | |||||
| } else if (this.formData.password == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '密码不能为空', | |||||
| }); | |||||
| return false; | |||||
| } else if (this.formData.code == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '图片验证码不能为空', | |||||
| }); | |||||
| return false; | |||||
| } | |||||
| this.$store | |||||
| .dispatch("Login", this.formData) | |||||
| .then(() => { | |||||
| this.$router.push({ path: "/lawEnforcement/index_new" }).catch(() => {}); | |||||
| }) | |||||
| .catch((error) => { | |||||
| console.log(error) | |||||
| this.loading = false; | |||||
| this.getCode(); | |||||
| }); | |||||
| } | |||||
| }, | |||||
| getRegisterSmsCode(){ | |||||
| if (!this.computeTime) { | |||||
| let myreg = /^[1][3,4,5,7,8,9][0-9]{9}$/; | |||||
| if (!myreg.test(this.formData.mobile)) { | |||||
| this.$dialog.alert({ | |||||
| message: '手机号格式不正确', | |||||
| }); | |||||
| return false; | |||||
| }else if (this.formData.code == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '图片验证码不能为空', | |||||
| }); | |||||
| return false; | |||||
| } | |||||
| if (this.active==2) { | |||||
| let formObj = { | |||||
| code :this.formData.code, | |||||
| mobile:this.formData.mobile, | |||||
| uuid:this.formData.uuid | |||||
| } | |||||
| getRegisterSmsCode(formObj).then((res) => { | |||||
| console.log(res) | |||||
| console.log(res.code == 200) | |||||
| if(res.code == 200) { | |||||
| this.$dialog.alert({ | |||||
| message: '验证码已发送', | |||||
| }); | |||||
| this.formData.uuid = res.uuid; | |||||
| this.computeTime = 60; | |||||
| this.timer = setInterval(() => { | |||||
| this.computeTime--; | |||||
| if (this.computeTime <= 0) { | |||||
| clearInterval(this.timer); | |||||
| } | |||||
| }, 1000); | |||||
| } | |||||
| }).catch((res)=>{ | |||||
| if(res=='Error: 验证码已失效'){ | |||||
| this.getCode() | |||||
| } | |||||
| }); | |||||
| } | |||||
| } | |||||
| }, | |||||
| registerSubmit(){ | |||||
| //注册 | |||||
| if (this.formData.memberName == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '姓名不能为空', | |||||
| }); | |||||
| return false; | |||||
| } else if (this.formData.idcard == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '身份证号不能为空', | |||||
| }); | |||||
| return false; | |||||
| } else if (this.formData.mobile == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '手机号码不能为空', | |||||
| }); | |||||
| return false; | |||||
| }else if (this.formData.smsCode == "") { | |||||
| this.$dialog.alert({ | |||||
| message: '短信验证码不能为空', | |||||
| }); | |||||
| return false; | |||||
| } | |||||
| //registerCheck,registerOn | |||||
| console.log(this.formData) | |||||
| registerCheck(this.formData).then((res)=>{ | |||||
| if(res.code == 200){ | |||||
| registerOn(this.formData).then((res)=>{ | |||||
| if(res.code == 200){ | |||||
| // | |||||
| this.$dialog.alert({ | |||||
| message: '您的初始密码:'+res.password, | |||||
| }).then(() => { | |||||
| this.$router.push({ path: "/onlineHome/workbench" }).catch(() => {}); | |||||
| }); | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | } | ||||
| }, | }, | ||||
| } | } | ||||
| @@ -13,25 +13,26 @@ | |||||
| <!-- 内容开始 --> | <!-- 内容开始 --> | ||||
| <div class="main"> | <div class="main"> | ||||
| <van-field label="产品名称" input-align="right" placeholder="请输入产品名称" /> | |||||
| <van-field label="产品类型" input-align="right" placeholder="请输入产品类型" /> | |||||
| <van-field label="简介" input-align="right" placeholder="请输入简介" /> | |||||
| <van-field label="产品名称" v-model="product.productName" input-align="right" placeholder="无" /> | |||||
| <van-field label="产品类型" v-model="product.productType" input-align="right" placeholder="无" /> | |||||
| <van-field label="简介" type="textarea" autosize v-model="product.productLink" input-align="right" placeholder="无" /> | |||||
| <van-field label="图片" :border="false" input-align="right" readonly /> | <van-field label="图片" :border="false" input-align="right" readonly /> | ||||
| <div style="padding: 0 4% 2vh;"> | <div style="padding: 0 4% 2vh;"> | ||||
| <van-uploader /> | |||||
| <van-uploader v-model="product.mainImgList" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" /> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="main_btn"> | <div class="main_btn"> | ||||
| <p>发布</p> | |||||
| <p @click="submitForm">发布</p> | |||||
| </div> | </div> | ||||
| <!-- 内容结束 --> | <!-- 内容结束 --> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
| import {commonUpload, financialProductAdd} from "@/api/agriculturalTrusteeship"; | |||||
| export default { | export default { | ||||
| name: "agriculturalTrusteeshipSocializationRelease", | |||||
| name: "agriculturalTrusteeshipShopAdd", | |||||
| data() { | data() { | ||||
| return { | return { | ||||
| activeKey: 0, | activeKey: 0, | ||||
| @@ -40,14 +41,40 @@ | |||||
| finished: false, | finished: false, | ||||
| center: { lng: 122.089726, lat: 37.540728 }, //经纬度 | center: { lng: 122.089726, lat: 37.540728 }, //经纬度 | ||||
| zoom: 15, //地图展示级别 | zoom: 15, //地图展示级别 | ||||
| showDialog:false | |||||
| showDialog:false, | |||||
| product:{}, | |||||
| mainImgArr:[] | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| submitForm(){ | |||||
| console.log(this.mainImgArr) | |||||
| this.product.mainImg = this.mainImgArr.join(',') | |||||
| financialProductEdit(this.product).then((res) => { | |||||
| if(res.code=="200"){ | |||||
| this.$notify({ type: 'success', message: '发布成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| afterReadEvidenceForm(file){ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| // this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName); | |||||
| console.log(r1) | |||||
| this.mainImgArr.push(r1.fileName) | |||||
| }) | |||||
| }, | |||||
| deleteFileEvidenceForm(file,detail) { | |||||
| this.mainImgArr.splice(detail.index,1); | |||||
| this.product.mainImgList.splice(detail.index,1); | |||||
| }, | |||||
| }, | }, | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -0,0 +1,101 @@ | |||||
| <template> | |||||
| <div class="home_wrapper"> | |||||
| <!-- 头部开始 --> | |||||
| <van-nav-bar | |||||
| title="发布商品" | |||||
| fixed | |||||
| placeholder | |||||
| left-arrow | |||||
| @click-left="onClickLeft" | |||||
| /> | |||||
| <!-- 头部结束 --> | |||||
| <!-- 内容开始 --> | |||||
| <div class="main"> | |||||
| <van-field readonly label="产品名称" v-model="product.productName" input-align="right" placeholder="无" /> | |||||
| <van-field readonly label="产品类型" v-model="product.productType" input-align="right" placeholder="无" /> | |||||
| <van-field readonly label="简介" type="textarea" autosize v-model="product.productLink" input-align="right" placeholder="无" /> | |||||
| <van-field label="图片" :border="false" input-align="right" readonly /> | |||||
| <div style="padding: 0 4% 2vh;"> | |||||
| <van-uploader v-model="product.mainImgList" :show-upload="false" :deletable="false" /> | |||||
| </div> | |||||
| </div> | |||||
| <!-- 内容结束 --> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import Cookies from "js-cookie"; | |||||
| import {productGet} from "@/api/agriculturalTrusteeship"; | |||||
| export default { | |||||
| name: "agriculturalTrusteeshipShopDetail", | |||||
| data() { | |||||
| return { | |||||
| activeKey: 0, | |||||
| active: 0, | |||||
| loading: false, | |||||
| finished: false, | |||||
| center: { lng: 122.089726, lat: 37.540728 }, //经纬度 | |||||
| zoom: 15, //地图展示级别 | |||||
| showDialog:false, | |||||
| product:{} | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| this.getDetail(); | |||||
| }, | |||||
| methods: { | |||||
| getDetail(){ | |||||
| productGet(this.$route.query.id).then(response => { | |||||
| if (response.data.mainImg){ | |||||
| response.data.mainImgList = []; | |||||
| var attachement = response.data.mainImg.split( "," ); | |||||
| attachement.forEach(responseAttach=>{ | |||||
| response.data.mainImgList.push({ | |||||
| url:'/api' + responseAttach, | |||||
| isImage: true | |||||
| }); | |||||
| }) | |||||
| } | |||||
| var that = this ; | |||||
| that.product = response.data; | |||||
| }); | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .home_wrapper{ | |||||
| background: #F6F6F6; | |||||
| min-height: 100vh; | |||||
| } | |||||
| .main{ | |||||
| width: 92%; | |||||
| margin: 0 auto; | |||||
| margin-top: 2vh; | |||||
| border-radius: 10PX; | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .main_btn{ | |||||
| display: flex; | |||||
| justify-content: space-around; | |||||
| padding: 4vh 0; | |||||
| p{ | |||||
| font-size: .4rem; | |||||
| width: 35%; | |||||
| text-align: center; | |||||
| padding: 10PX 0; | |||||
| border-radius: 5rem; | |||||
| box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16); | |||||
| &:nth-child(1){ | |||||
| background: #334281; | |||||
| color: #ffffff; | |||||
| } | |||||
| &:nth-child(2){ | |||||
| background: #D1D5E4; | |||||
| color: #334281; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,132 @@ | |||||
| <template> | |||||
| <div class="home_wrapper"> | |||||
| <!-- 头部开始 --> | |||||
| <van-nav-bar | |||||
| title="发布商品" | |||||
| fixed | |||||
| placeholder | |||||
| left-arrow | |||||
| @click-left="onClickLeft" | |||||
| /> | |||||
| <!-- 头部结束 --> | |||||
| <!-- 内容开始 --> | |||||
| <div class="main"> | |||||
| <van-field label="产品名称" v-model="product.productName" input-align="right" placeholder="无" /> | |||||
| <van-field label="产品类型" v-model="product.productType" input-align="right" placeholder="无" /> | |||||
| <van-field label="简介" type="textarea" autosize v-model="product.productLink" input-align="right" placeholder="无" /> | |||||
| <van-field label="图片" :border="false" input-align="right" readonly /> | |||||
| <div style="padding: 0 4% 2vh;"> | |||||
| <van-uploader v-model="product.mainImgList" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" /> | |||||
| </div> | |||||
| </div> | |||||
| <div class="main_btn"> | |||||
| <p @click="submitForm">发布</p> | |||||
| </div> | |||||
| <!-- 内容结束 --> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import Cookies from "js-cookie"; | |||||
| import {productGet,financialProductEdit,commonUpload} from "@/api/agriculturalTrusteeship"; | |||||
| export default { | |||||
| name: "agriculturalTrusteeshipShopDetail", | |||||
| data() { | |||||
| return { | |||||
| activeKey: 0, | |||||
| active: 0, | |||||
| loading: false, | |||||
| finished: false, | |||||
| center: { lng: 122.089726, lat: 37.540728 }, //经纬度 | |||||
| zoom: 15, //地图展示级别 | |||||
| showDialog:false, | |||||
| product:{}, | |||||
| mainImgArr:[] | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| this.getDetail(); | |||||
| }, | |||||
| methods: { | |||||
| getDetail(){ | |||||
| productGet(this.$route.query.id).then(response => { | |||||
| if (response.data.mainImg){ | |||||
| response.data.mainImgList = []; | |||||
| var attachement = response.data.mainImg.split( "," ); | |||||
| this.mainImgArr = response.data.mainImg.split( "," ); | |||||
| attachement.forEach(responseAttach=>{ | |||||
| response.data.mainImgList.push({ | |||||
| url:'/api' + responseAttach, | |||||
| isImage: true | |||||
| }); | |||||
| }) | |||||
| } | |||||
| var that = this ; | |||||
| that.product = response.data; | |||||
| }); | |||||
| }, | |||||
| afterReadEvidenceForm(file){ | |||||
| let params1 = new FormData(); | |||||
| params1.append("file", file.file); | |||||
| commonUpload(params1).then((r1) => { | |||||
| // this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName); | |||||
| console.log(r1) | |||||
| this.mainImgArr.push(r1.fileName) | |||||
| }) | |||||
| }, | |||||
| deleteFileEvidenceForm(file,detail) { | |||||
| this.mainImgArr.splice(detail.index,1); | |||||
| this.product.mainImgList.splice(detail.index,1); | |||||
| }, | |||||
| submitForm(){ | |||||
| console.log(this.mainImgArr) | |||||
| this.product.mainImg = this.mainImgArr.join(',') | |||||
| financialProductEdit(this.product).then((res) => { | |||||
| if(res.code=="200"){ | |||||
| this.$notify({ type: 'success', message: '发布成功' }); | |||||
| setTimeout(function(){ | |||||
| history.back(-1); | |||||
| },2000) | |||||
| } | |||||
| }) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .home_wrapper{ | |||||
| background: #F6F6F6; | |||||
| min-height: 100vh; | |||||
| } | |||||
| .main{ | |||||
| width: 92%; | |||||
| margin: 0 auto; | |||||
| margin-top: 2vh; | |||||
| border-radius: 10PX; | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .main_btn{ | |||||
| display: flex; | |||||
| justify-content: space-around; | |||||
| padding: 4vh 0; | |||||
| p{ | |||||
| font-size: .4rem; | |||||
| width: 35%; | |||||
| text-align: center; | |||||
| padding: 10PX 0; | |||||
| border-radius: 5rem; | |||||
| box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16); | |||||
| &:nth-child(1){ | |||||
| background: #334281; | |||||
| color: #ffffff; | |||||
| } | |||||
| &:nth-child(2){ | |||||
| background: #D1D5E4; | |||||
| color: #334281; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @@ -62,16 +62,17 @@ | |||||
| v-model="loading" | v-model="loading" | ||||
| :finished="finished" | :finished="finished" | ||||
| finished-text="没有更多了" | finished-text="没有更多了" | ||||
| @load="getList" | |||||
| > | > | ||||
| <!-- @load="onLoad"--> | <!-- @load="onLoad"--> | ||||
| <div class="main_content_right_list" v-for="item in 10" :key="item"> | |||||
| <img src="../../../../static/images/agriculturalTrusteeship/index/test.png"> | |||||
| <div class="main_content_right_list" v-for="(item,index) in productList" :key="index"> | |||||
| <img src="../../../../static/images/agriculturalTrusteeship/index/test.png" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})"> | |||||
| <div class="main_content_right_list_content"> | <div class="main_content_right_list_content"> | ||||
| <p class="tt">如果只有一行就空着啊啊啊啊啊啊啊啊啊啊啊啊</p> | |||||
| <p class="tt" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})">{{item.productName}}</p> | |||||
| <div class="tab"> | <div class="tab"> | ||||
| <p>健康保险</p> | |||||
| <p>{{item.productType}}</p> | |||||
| <div> | <div> | ||||
| <img src="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_01.png" /> | |||||
| <img src="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_01.png" @click="$router.push({name:'agriculturalTrusteeshipShopEdit',query:{id:item.id}})" /> | |||||
| <img src="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_02.png" /> | <img src="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_02.png" /> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| @@ -112,21 +113,41 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
| import {productList} from "@/api/agriculturalTrusteeship"; | |||||
| export default { | export default { | ||||
| name: "agriculturalTrusteeshipInsuranceList", | |||||
| name: "agriculturalTrusteeshipShopList", | |||||
| data() { | data() { | ||||
| return { | return { | ||||
| activeKey: 0, | activeKey: 0, | ||||
| active: 0, | active: 0, | ||||
| loading: false, | loading: false, | ||||
| finished: false, | finished: false, | ||||
| productList:[], | |||||
| query:{ | |||||
| financialServiceId:Cookies.get('ACCESS-SESSION-ID'), | |||||
| pageNum:'1', | |||||
| pageSize:'10' | |||||
| } | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| getList(){ | |||||
| productList(this.query).then(response => { | |||||
| response.rows.map(res=>{ | |||||
| this.productList.push(res); | |||||
| }) | |||||
| if(this.productList.length >= response.total){ | |||||
| this.finished = true; | |||||
| return; | |||||
| }else{ | |||||
| this.loading = false; | |||||
| this.query.pageNum += 1 ; | |||||
| } | |||||
| }); | |||||
| }, | |||||
| }, | }, | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -139,8 +139,8 @@ | |||||
| min-height: 100vh; | min-height: 100vh; | ||||
| width: 100vw; | width: 100vw; | ||||
| padding: 0 ; | padding: 0 ; | ||||
| background: url('../../../../static/images/lawEnforcement/new/map.png') no-repeat 27%; | |||||
| background-size: auto 100%; | |||||
| /*background: url('../../../../static/images/lawEnforcement/new/map.png') no-repeat 27%;*/ | |||||
| /*background-size: auto 100%;*/ | |||||
| .header_main{ | .header_main{ | ||||
| height: 116px; | height: 116px; | ||||
| background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat; | background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat; | ||||
| @@ -303,8 +303,7 @@ | |||||
| }); | }); | ||||
| return false; | return false; | ||||
| } | } | ||||
| this.$store | |||||
| .dispatch("Login", this.formData) | |||||
| this.$store.dispatch("Login", this.formData) | |||||
| .then(() => { | .then(() => { | ||||
| this.$router.push({ path: "/lawEnforcement/index_new" }).catch(() => {}); | this.$router.push({ path: "/lawEnforcement/index_new" }).catch(() => {}); | ||||
| }) | }) | ||||
| @@ -13,9 +13,9 @@ | |||||
| </template> | </template> | ||||
| </van-cell> | </van-cell> | ||||
| <van-grid :column-num="3" :border="false" square clickable> | <van-grid :column-num="3" :border="false" square clickable> | ||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_01.png" text="农药扫码" :to="{name:'lawEnforcementRetrospectDetail'}" /> | |||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_01.png" text="扫一扫" :to="{name:'lawEnforcementRetrospectDetail'}" /> | |||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_19.png" text="中国农药网" @click="linkGo('http://www.icama.org.cn/hysj/index.jhtml')" /> | <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_19.png" text="中国农药网" @click="linkGo('http://www.icama.org.cn/hysj/index.jhtml')" /> | ||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_20.png" text="中国种业网" @click="linkGo('http://202.127.42.145/bigdataNew/home/ManageOrg')" /> | |||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_20.png" text="中国种业网" @click="linkGo('http://202.127.42.47:6010/index.aspx')" /> | |||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_21.png" text="中肥网" @click="linkGo('http://www.fert.cn/')" /> | <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_21.png" text="中肥网" @click="linkGo('http://www.fert.cn/')" /> | ||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_22.png" text="中国兽药网" @click="linkGo('http://www.ivdc.org.cn/xxgk/syzwglpt/')" /> | <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_22.png" text="中国兽药网" @click="linkGo('http://www.ivdc.org.cn/xxgk/syzwglpt/')" /> | ||||
| <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_23.png" text="中国饲料网" @click="linkGo('http://chinafeeddata.org.cn/admin/Login/slstk')" /> | <van-grid-item icon="../../../static/images/lawEnforcement/new/retrospect_icon_23.png" text="中国饲料网" @click="linkGo('http://chinafeeddata.org.cn/admin/Login/slstk')" /> | ||||
| @@ -1,9 +1,9 @@ | |||||
| <template> | <template> | ||||
| <div class="app-container"> | <div class="app-container"> | ||||
| <div class="header_main"> | <div class="header_main"> | ||||
| 种子扫描 | |||||
| 扫一扫 | |||||
| <div class="return_btn" @click="onClickLeft"></div> | <div class="return_btn" @click="onClickLeft"></div> | ||||
| <div class="add_btn"></div> | |||||
| <!-- <div class="add_btn"></div>--> | |||||
| <div class="top_box"> | <div class="top_box"> | ||||
| <div class="top_01"> | <div class="top_01"> | ||||
| <img src="../../../../static/images/lawEnforcement/new/retrospect_icon_10.png"> | <img src="../../../../static/images/lawEnforcement/new/retrospect_icon_10.png"> | ||||