123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705 |
- <template>
- <view>
- <view class="overlay" v-if="showfx" @click="showwx">
- <image style="height: 100%;width: 100%;" src="/static/img/zz.png"></image>
- </view>
-
- <!-- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '新建企业信息'">
- <block slot="backText">返回</block>
- <block slot="content">新建企业信息</block>
- </cu-custom>
- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '修改企业信息'">
- <block slot="backText">返回</block>
- <block slot="content">修改企业信息</block>
- </cu-custom>
- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '查看企业信息'">
- <block slot="backText">返回</block>
- <block slot="content">查看企业信息</block>
- </cu-custom> -->
-
- <view :class="['custom-header', { 'is-back': isBack }, bgColor]">
- <view class="back-container" @click="handleBack">
- <view class="back-text">返回</view>
- </view>
- <view class="content-container">
- <view class="content-text">{{title}}</view>
- </view>
- </view>
-
- <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000" :duration="800">
- <swiper-item>
- <image src="../../static/img/titlebg.jpg" class="swiper-item"></image>
- </swiper-item>
- <swiper-item>
- <image src="../../static/img/titlebg.jpg" class="swiper-item"></image>
- </swiper-item>
- </swiper>
-
- <form class="cu-list menu">
-
- <view class="show1">
-
- <view class="textbg">
- <view class="text1">
- 企业名称
- </view>
- <view class="text2" >
- {{inputForm.name}}
- </view>
- </view>
-
- <view class="textbg" @click="call1">
- <!-- <view class="text1">
- 属地
- </view>
- <input v-model="inputForm.des1" :disabled="ischeck"></input> -->
- <view class="text1">
- 企业负责人
- </view>
- <view class="text3">
- {{inputForm.lxr}} <view v-if="inputForm.phone!=''"> ( </view>
- <view class="phone">{{inputForm.phone}} </view> <view v-if="inputForm.phone!=''">) </view>
- <image class="phoneimg" src="/static/img/dianhua.png "></image>
- </view>
- </view>
-
- <view class="textbg" @click="call2" style="margin-bottom: 10rpx;padding-bottom: 20rpx;" >
- <!-- <view class="text1">
- 企业类型
- </view>
- <input v-model="inputForm.industry" :disabled="ischeck"></input> -->
-
- <view class="text1">
- 板块负责人
- </view>
- <view class="text3">
- {{inputForm.bz5}} <view v-if="inputForm.bz6!=''"> ( </view>
- <view class="phone">{{inputForm.bz6}} </view> <view v-if="inputForm.bz6!=''"> ) </view>
- <image class="phoneimg" src="/static/img/dianhua.png "></image>
- </view>
-
- </view>
-
- </view>
- <view class="titlebg2">
- <view class="titlet1" ></view>
- <view class="titlet2" >企业基本信息</view>
- </view>
-
-
- <view class="textbg">
- <view class="text12">
- 属地
- </view>
- <view class="text22">
- {{inputForm.des1}}
- </view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 所属行业
- </view>
- <view class="text22">
- {{inputForm.industry}}
- </view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 去年销售
- </view>
- <view class="text22">
- {{inputForm.des3}}
- </view>
- </view>
-
- <view style="height: 30rpx;background-color: white;"></view>
-
- <view class="titlebg2" style="margin-top:10rpx ;">
- <view class="titlet1" ></view>
- <view class="titlet2" >主导产品一</view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 产品名称
- </view>
- <view class="text22">
- {{inputForm.bz1}}
- </view>
- </view>
-
- <view class="textbg" >
- <view class="text12">
- 产业链上下游
- </view>
- <view class="text22">
- {{inputForm.bz2}}
- </view>
- </view>
-
- <view style="height: 30rpx;background-color: white;"></view>
-
- <view class="titlebg2" style="margin-top:10rpx ;" v-if="inputForm.bz3!=''&&inputForm.bz3!=undefined">
- <view class="titlet1" ></view>
- <view class="titlet2" >主导产品二</view>
- </view>
-
- <view class="textbg" v-if="inputForm.bz3!=''&&inputForm.bz3!=undefined">
- <view class="text12">
- 产品名称
- </view>
- <view class="text22">
- {{inputForm.bz3}}
- </view>
- </view>
-
- <view class="textbg" v-if="inputForm.bz3!=''&&inputForm.bz3!=undefined" >
- <view class="text12">
- 产业链上下游
- </view>
- <view class="text22">
- {{inputForm.bz4}}
- </view>
- </view>
-
- <view style="height: 30rpx;background-color: white;"></view>
-
- <view class="titlebg2" style="margin-top:10rpx ;" >
- <view class="titlet1" ></view>
- <view class="titlet2" >企业简介</view>
- </view>
-
- <view class="text221">
- {{inputForm.qyDes}}
- </view>
-
- <view v-if="inputForm.bz3!=''&&inputForm.bz3!=undefined" style="height: 50rpx;background-color: white;"></view>
-
-
- <view style="height: 40rpx;"></view>
- <view class="padding-xl" v-if="isadmin&&inputForm.des6=='1'">
- <button @click="sharezz" class="cu-btn block bg-blue margin-tb-sm lg">分享此企业账号</button>
- </view>
- </form>
- </view>
- </template>
- <script>
- import loginService from '@/api/auth/loginService.js'
- import { wxShare } from "@/common/wxutils.js";
- export default {
- onShow() {
- //this.$auth.checkLogin()
- },
- data() {
- return {
- title: '新建企业信息',
- isBack: true, // 是否显示返回按钮
- backText: '返回', // 返回按钮的文本
- bgColor: 'bg-blue', // 背景颜色
- autoUpload: false,
- inputForm: {
- id: '',
- name: '',
- industry: '',
- des1: '',
- des2: '',
- des3: '',
- entryTime: '',
- officeArea: '',
- annualRent: '',
- floor: '',
- lxr: '',
- phone: '',
- htStime: '',
- htEtime: '',
- qyDes: '',
- businessContent: '',
- totalNumber: '',
- securityNumber: '',
- belowUndergraduate: '',
- undergraduate: '',
- postgraduate: '',
- doctoralStudent: '',
- num2: '',
- num3: '',
- softWritingNumbers: '',
- bz1: '',
- bz2: '',
- bz3: '',
- bz4: '',
- bz5: '',
- bz6: '',
- des5: '',
- des6: '',
- des7: '',
- des8: '',
- des9: '',
- },
- text1:'',
- text2:'',
- parkList: [],
- ischeck: false,
- isLogin:"",
- username:"",
- isadmin:false,
- lyIndex: '',
- showLYList: [],
- showfx:false,
- }
- },
- created() {
- },
- mounted() {
-
- },
- onLoad(query) {
- this.isLogin=this.$auth.checkisLogin();
- this.username=this.$auth.getUserInfo();
- if(this.username!=undefined&&this.username!=''&&this.username!=null&&this.isLogin!=null){
- if(this.username.loginName=='admin'){
- this.isadmin=true;
- }
- }
-
- if (query && query.ischeck) {
- this.ischeck = true
- this.title = "查看企业信息";
- }
- if (query && query.id && !query.ischeck) {
- this.title = "修改企业信息";
- }
- this.getComById(query)
-
-
- },
- methods: {
- getParkList(query) {
- loginService.list({
- current: 1,
- size: 1000000,
- }).then(({
- data
- }) => {
- this.parkList = data.records.map((item) => {
- return {
- label: item.buildingName,
- value: item.id
- }
- })
- this.showLYList = this.parkList.map(item => item.label)
- if (query && query.id) {
- loginService.queryByIdCom(query.id).then(({
- data
- }) => {
- this.inputForm = this.recover(this.inputForm, data)
- this.lyIndex = this.parkList.findIndex(item => item.value == this.inputForm.des1)
- console.log(this.lyIndex, '=====================>lyIndex')
- }).catch((e) => {
-
- })
-
- }
- }).catch(e => {
- console.log(e)
- })
- },
-
- handleBack() {
- // 返回逻辑,比如跳转至上一页
- this.$router.go(-1);
- console.log('返回按钮被点击');
- },
- showwx() {
- this.showfx=false;
- },
-
- getComById(query) {
- loginService.queryByIdCom(query.id).then(({
- data
- }) => {
- //未登录
- if(this.isLogin==null){
- console.log('未登录')
- //不做处理后台已做处理
- this.setData(data);
-
- }else{
- this.setData(data);
- }
-
- }).catch((e) => {
-
- })
- },
-
-
- //账号分享
- sharezz(){
- var that=this;
- setTimeout(function() {
- that.showfx=true;
- console.log("1"+ this.showfx);
- }, 500); // 2000毫秒后执行
-
- loginService.getloginstr(this.inputForm.phone).then(({
- data
- }) => {
- //未登录
- if(data.Id=='0'){
- uni.showModal({
- title: '您无权限分享账号,请联系管!',
- showCancel: true,
- success: (res) => {
-
- }
- });
-
- }else{
-
- this.weixin(data);
-
- // const textArea = document.createElement("textarea");
- // textArea.value = 'https://miniapp.huidutech.com.cn/yd_qycpfbH5/#/pages/index/index?loginid='+data.Id;
- // document.body.appendChild(textArea);
- // textArea.focus();
- // textArea.select();
- // try {
- // document.execCommand('copy');
- // uni.showModal({
- // title: '已将登录链接复制到剪切板,直接打开微信好友粘贴分享!',
- // showCancel: true,
- // success: (res) => {
-
- // }
- // });
- // } catch (err) {
- // console.error('Could not copy text', err);
- // uni.showModal({
- // title: '当前不支持分享功能!',
- // showCancel: true,
- // success: (res) => {
-
- // }
- // });
- // } finally {
- // document.body.removeChild(textArea);
- // }
- }
-
- }).catch((e) => {
-
- })
-
-
-
-
-
-
-
-
-
- },
-
-
- // async initUser() {
- // const { data = {} } = await api.fetchUserInfo();
- // if (Object.keys(data).length > 0) {
- // // 设置用户基本信息
- // this.setUser(data);
- // const browser = window.navigator.userAgent.toLowerCase();
- // //匹配browser中是否含有MicroMessenger字符串
- // if (browser.match(/MicroMessenger/i) == "micromessenger") {
- // this.weixin(data);
- // } else {
- // const params = new URLSearchParams(window.location.search);
- // const id = params.get("id");
- // if (!id || (id && id !== data.uid)) {
- // // 如果不是微信浏览器,则跳转页面带id后缀
- // const url_a = window.location.origin;
- // window.location.href = url_a + "?id=" + data.uid;
- // }
- // }
- // }
- // },
- async weixin(data) {
-
- try {
- if ( data) {
- //微信加签
- var obj = {
- appId: data.appid,
- nonceStr: data.nonceStr,
- signature: data.signature,
- timestamp: data.timestamp,
- Id: data.Id,
- }
- //分享数据,这段主要是为了在hash模式下分享出去的链接不被浏览器截取,保证完全把链接分享出去(link的链接可以自己拼,无须与当前页面的后缀参数之类的内容完全一致)
- let shareData = {
- title: '盐都区工业企业产品发布平台',
- desc: '点击直接登录',
- imgUrl: 'https://miniapp.huidutech.com.cn/yd_qycpfbH5/static/img/titlebg.jpg',
- link: 'https://miniapp.huidutech.com.cn/yd_qycpfbH5/#/pages/index/index?loginid='+data.Id + "&t=" + data.timestamp + "&Content=1", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
-
- };
- //引用
- wxShare(obj, shareData);
-
- } else {
- uni.showModal({
- title: '获取sdk参数失败!',
- showCancel: true,
- success: (res) => {
-
- }
- });
- }
- } catch (err) {
- //
- } finally {
- //
- }
- },
-
-
- setData(data){
- this.inputForm = this.recover(this.inputForm, data)
-
- if(this.inputForm.bz2!=''){
- this.text1=this.inputForm.bz1+" ("+this.inputForm.bz2+")"
- }
- if(this.inputForm.bz4!=''){
- this.text2=this.inputForm.bz3+" ("+this.inputForm.bz4+")"
- }
- },
-
- goToCompany(companyName) {
- //https://www.qcc.com/web/search?key=
-
- window.open("https://www.qcc.com/web/search?key="+companyName);
- //window.location.href = `https://www.qcc.com/company/${encodeURIComponent(companyName)}`;
- },
-
- call1(){
-
- // uni.navigateTo({
- // url: '/pages/index/AudioToWord'
- // })
-
- // uni.navigateTo({
- // url: '/pages/comList/comList'
- // })
-
- //未登录
- if(this.isLogin==null){
- uni.showModal({
- title: '您还未登录,是否跳转登录页面?',
- showCancel: true,
- success: (res) => {
- if (res.confirm) {
-
- uni.reLaunch({
- url: '/pages/login/login'
- })
-
- }
- }
- });
- }else{
- window.location.href = 'tel:'+this.inputForm.phone;
- }
-
- },
-
- call2(){
- //未登录
- if(this.isLogin==null){
- uni.showModal({
- title: '您还未登录,是否跳转登录页面?',
- showCancel: true,
- success: (res) => {
- if (res.confirm) {
-
- uni.reLaunch({
- url: '/pages/login/login'
- })
-
- }
- }
- });
- }else{
- window.location.href = 'tel:'+this.inputForm.bz6;
- }
- },
-
-
- }
- }
- </script>
- <style>
- /* .file-title) {
- font-size: 17px !important;
- } */
- input,textarea{
- color: #8799a3;
- }
-
- .swiper {
- width: 750rpx;
- height: 310rpx;
- }
-
- .swiper-item {
- width: 750rpx;
- height: 310rpx;
- background-color: aliceblue;
- }
- .show1{
- background-color: #2752eb;
- padding-left: 8rpx;
- }
- .textbg{
- display: flex;
- background-color: white;
- padding-top: 29rpx;
- }
- .text1{
- width: 200rpx;
- margin-left: 30rpx;
- color: #333333;
- font-size: 30rpx;
- }
- .text12{
- width: 200rpx;
- margin-left: 30rpx;
- color: #000000;
- font-size: 29rpx;
- }
-
- .text2{
- flex: 1;
- color: #000000;
- font-size: 30rpx;
- padding-bottom: 2rpx;
- }
- .text22{
- flex: 1;
- color: #666666;
- font-size: 29rpx;
- padding-bottom: 2rpx;
- }
-
-
- .text3{
- display: flex;
- color: #000000;
- }
- .phone{
- display: flex;
- color: #1E8AD7;
- padding-left: 5rpx;
- padding-right: 5rpx;
- font-size: 30rpx;
- align-items: center
- }
- .phoneimg{
- margin-left: 10rpx;
- width: 35rpx;
- height: 35rpx;
- }
- .titlebg2{
- display: flex;
- background-color: white;
- padding-left: 22rpx;
- padding-top: 35rpx;
- padding-bottom: 25rpx;
- margin-bottom: 2rpx;
- }
- .titlet1{
- width: 7rpx;
- margin-top: 7rpx;
- margin-bottom: 7rpx;
- background-color: #2752eb;
- margin-right: 8rpx;
- }
- .titlet2{
- font-weight: 800;
- color: #2752eb;
- }
- .overlay{
- position: fixed; /* 固定定位,覆盖整个页面 */
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(255, 255, 255, 0.5); /* 半透明白色背景 */
- z-index: 1000; /* 确保遮罩在页面内容之上 */
- }
-
-
- .custom-header {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 10px;
- width: 100%;
- }
-
- .is-back {
- position: relative;
- }
-
- .back-container {
- position: absolute;
- left: 10px;
- cursor: pointer;
- }
-
- .back-text {
- color: white; /* 返回按钮文本颜色 */
- }
-
- .content-container {
- flex: 1;
- text-align: center;
- }
-
- .content-text {
- color: white; /* 标题文本颜色 */
- font-weight: bold;
- }
-
- /* 背景颜色 */
- .bg-blue {
- background-color: #4285f4; /* 假设这是一个蓝色背景 */
- }
-
- .text221{
- text-indent: 2em;
- flex: 1;
- min-height: 700rpx;
- color: #666666;
- padding: 28rpx;
- font-size: 29rpx;
- padding-right:15rpx ;
- background-color: white;
- padding-bottom: 2rpx;
- }
- </style>
|