Browse Source

改完代码不提交的坏习惯一定要改

xiaowang-feature
是小王呀\24601 9 months ago
parent
commit
561dfd5b9b
  1. 2
      public/index.html
  2. 48
      src/utils/jweixin.js
  3. 12
      src/views/home/index.vue
  4. 2
      src/views/peoSuggestion/topicListDetail.vue
  5. 1
      src/views/serviceList/reservationService.vue

2
public/index.html

@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<meta property="og:description" content="自定义描述" />
<meta property="og:image" content="https://www.example.com/share-image.jpg" />
</head>
<body>
<noscript>

48
src/utils/jweixin.js

@ -15,56 +15,26 @@ export const setConfig = function (jsApiList = []) {
]
});
wx.ready(function(){
//alert(location.href.split('#')[0]+"#/peoSuggestion")
console.log();
wx.updateAppMessageShareData({
title: '城阳社会工作人民意见征集', // 分享标题
desc: '倾听民声,汇集民智,期待您的好建议、金点子。', // 分享描述
link: 'https://epmet-test.elinkservice.cn/epmet-wx-pa-140-proxy/', // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link: `${location.href.split('#')[0]+"#/peoSuggestion"}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/prod/internal/20241125/34366b70362646bdb13a88c3b94e7ad7.jpg', // 分享图标
success: function () {
// alert("陈工")
// 设置成功
},
// fail:function(){
// alert("陈1工")
// }
});
// config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
});
// wx.checkJsApi({
// jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareTimeline', 'onMenuShareAppMessage'],
// success: function (res) { }
// });
// const title = "sdklfjlksdf";
// const urlLink = "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/prod/internal/20241125/477d7f76b5c743d8a0de64d16be2cf8b.jpg";
// const imgUrl = "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/prod/internal/20241125/477d7f76b5c743d8a0de64d16be2cf8b.jpg"
// 必须放在 wx.ready 中调用微信接口
// wx.ready(() => {
// const shareData = {
// link: urlLink,
// title: title,
// imgUrl: imgUrl,
// // desc: weixinSummary
// };
// const shareDateLine = {
// link: urlLink,
// title: title,
// imgUrl: imgUrl
// }
// wx.onMenuShareTimeline(shareDateLine);
// wx.onMenuShareAppMessage(shareData);
// wx.updateAppMessageShareData(shareData);
// wx.updateTimelineShareData(shareDateLine);
// // 捕获 wx.config 配置失败
// wx.error((err) => {
// console.error('wx.config 失败!', err);
// });
// });
});
};
// // 使用配置
// setConfig([
// 'updateAppMessageShareData', // 分享到好友
// 'onMenuShareAppMessage', // 老版分享接口(兼容性)
// 'updateTimelineShareData', // 分享到朋友圈
// 'onMenuShareTimeline', // 老版朋友圈分享接口(兼容性)
// ]);

12
src/views/home/index.vue

@ -20,8 +20,8 @@
</div>
<div class="swipe">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="item in noticeListOrg">
<img :src="item.coverImg" alt="" @click="toDetail(item)"
<van-swipe-item v-for="item in PublicityListImg">
<img :src="item.coverPic" alt="" @click="toDetail(item)"
style="width: 100%;height: 150px; margin: 0 auto;border-radius: 15px;">
</van-swipe-item>
</van-swipe>
@ -29,7 +29,7 @@
<div class=" flex flex-end flex-center2 notice">
<img src="@/assets/images/home/laba.png" class="img_17" alt="">
<div class="van-ellipsis flex-1">
<van-notice-bar scrollable color="#555555" background="#ffffff" :text="noticeText" />
<van-notice-bar scrollable color="#555555" background="#ffffff" :text="messageText" />
</div>
<!-- <span class="gray notice_time">{{day}}</span> -->
<span class="gray" @click="$router.push('/messages')">...</span>
@ -402,9 +402,9 @@ export default {
}
},
toDetail(item){
console.log(item.id,"sldkf")
this.$router.push({name:'dynamic',query:{id:item.id}})
if(item.coverPic){
this.$router.push({name:'communityPublicityDetail',query:{id:item.id}})
}
},
topeoSuggestion(){
this.$router.push({name:'peoSuggestion'})

2
src/views/peoSuggestion/topicListDetail.vue

@ -36,7 +36,7 @@
反对
</van-button>
</div> -->
<div class="flex flex-center1 " style="position: fixed; bottom: 10px; left: 10px;">
<div class="flex flex-center1 " style="position: fixed; bottom:60px; left: 0px; right:0px;">
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" style="width: 300px;" round @click="onClickdaily">开始填写</van-button>
</div>
</div>

1
src/views/serviceList/reservationService.vue

@ -38,6 +38,7 @@
<script>
import dayjs from 'dayjs'
import { getNeighborHoodListByName} from '@/api/user';
import { userdemandAdd,residentBaseInfo,agencygridtree} from '@/api/reservationService';
import Picker from '@/components/Picker'
import Perfect from '@/components/Perfect'

Loading…
Cancel
Save