Browse Source

人民建议征集

feature
是小王呀\24601 8 months ago
parent
commit
b00d4e4fcc
  1. BIN
      src/assets/images/peoSuggestion/1.png
  2. BIN
      src/assets/images/peoSuggestion/14.png
  3. BIN
      src/assets/images/peoSuggestion/9.png
  4. 17
      src/utils/jweixin.js
  5. 2
      src/views/home/index.vue
  6. 9
      src/views/peoSuggestion/index.vue
  7. 17
      src/views/selectAgency/index.vue

BIN
src/assets/images/peoSuggestion/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 KiB

After

Width:  |  Height:  |  Size: 348 KiB

BIN
src/assets/images/peoSuggestion/14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/assets/images/peoSuggestion/9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

17
src/utils/jweixin.js

@ -12,4 +12,21 @@ export const setConfig = function (jsApiList = []) {
openTagList:['wx-open-launch-weapp']
})
})
wx.ready(function(){
wx.updateAppMessageShareData({
title: '人民建议征集', // 分享标题
desc: '倾听民声,汇集民智,期待您的好建议、金点子。', // 分享描述
link: `${location.href.split('#')[0]+"#/peoSuggestion?appId=wx1078fa1e99424de9&&type=add"}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet-saas/prod/20241223/0b3fb8a6d64a4f39a14e00a7f8641a00.png', // 分享图标
success: function () {
// alert("陈工")
// 设置成功
},
fail:function(){
console.log("出错了");
}
});
// config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
});
}

2
src/views/home/index.vue

@ -52,7 +52,7 @@
</div>
</div>
</div>
<div class="flex flex-center1 flex-center2 " style="width: 100%;margin-top: 10px;" v-if="agencyId=='3be8c116c6536aed33fa83cbcd97ce4f'">
<div class="flex flex-center1 flex-center2 " style="width: 100%;margin-top: 10px;" >
<img style="width: 100%;height: 75px;" src="../../assets/images/home/jianyi.png" @click="topeoSuggestion"></img>
</div >
<div class="card m-top10">

9
src/views/peoSuggestion/index.vue

@ -6,8 +6,11 @@
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img src="../../assets/images/peoSuggestion/1.png" style="width: 100%; height:300px ;" />
</div>
<div style="position: fixed; top: 5px; right: 5px; " @click="$router.push({ path: `/mySuggestions`, })">
<img src="../../assets/images/peoSuggestion/9.png" style="width: 25px; height:25px ;" />
<div style="position: fixed; top: 10px; left: 10px; " @click="$router.push({ path: `/`, })">
<img src="../../assets/images/peoSuggestion/14.png" style="width: 35px; height:35px ;" />
</div>
<div style="position: fixed; top: 10px; right: 10px; " @click="$router.push({ path: `/mySuggestions`, })">
<img src="../../assets/images/peoSuggestion/9.png" style="width: 35px; height:35px ;" />
</div>
<div class='container' style="position: relative;top: -20px;line-height: 36px; " >
<div class="card">
@ -236,7 +239,7 @@ export default {
},
async mounted() {
// setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
const currentUrl = window.location.href;
//
this.generateQRCode(currentUrl);

17
src/views/selectAgency/index.vue

@ -41,6 +41,7 @@ import { setConfig } from '@/utils/jweixin'
export default {
data() {
return {
type:"",
cityJson: [],
selfCity: [],
address: null,
@ -55,6 +56,11 @@ export default {
created() {
},
mounted() {
const url = location.href;
const queryString = url.split('?')[1];
const params = new URLSearchParams(queryString);
this.type = params.get('type');
console.log(type); // "add"
setConfig(['checkJsApi', 'openLocation', 'getLocation', 'updateAppMessageShareData', 'updateTimelineShareData'])
this.signWX()
if(this.latLng){
@ -63,6 +69,7 @@ export default {
},
methods: {
search(){
this.organizationName = this.searchKey;
this.getAgency();
},
@ -108,8 +115,8 @@ export default {
this.city = res.data.regeocode.addressComponent.city
this.district = res.data.regeocode.addressComponent.district;
this.street = res.data.regeocode.addressComponent.township;
this.organizationName = res.data.regeocode.addressComponent.township;
this.selfCity.push({label:this.city},{ label: this.district},{label:this.street})
this.organizationName = res.data.regeocode.addressComponent.district;
this.selfCity.push({label:this.city},{ label: this.district})
this.getAgency()
} else{
console.log(res);
@ -125,6 +132,7 @@ export default {
this.signWX()
},
async getAgency(type) {
console.log(type,"adsfjlsjlsflks")
let parm ={
organizationName:this.organizationName
}
@ -154,8 +162,13 @@ export default {
parm.agencyName = item.label;
let res = await editUser(parm)
if (res.code === 0) {
if(this.type=="add"){
this.$router.replace('/peoSuggestion')
}else{
this.$router.replace('/')
}
}
} else {
this.organizationName = item.label;
this.getAgency()

Loading…
Cancel
Save