Browse Source

bug修改弹框样式修改,动态跳转小程序

feature
mk 1 year ago
parent
commit
3df4b00ce3
  1. 2
      README.md
  2. 2
      public/index.html
  3. 6
      src/assets/css/index.less
  4. BIN
      src/assets/images/houseQR/dialog_bg.png
  5. BIN
      src/assets/images/icons/bell.png
  6. BIN
      src/assets/images/icons/close.png
  7. 40
      src/components/launchWeapp/index.vue
  8. 2
      src/config/env.staging.js
  9. 2
      src/utils/jweixin.js
  10. 2
      src/utils/request.js
  11. 12
      src/views/Enjoyableservices/index.vue
  12. 4
      src/views/activity/index.vue
  13. 2
      src/views/communityPublicity/index.vue
  14. 2
      src/views/discussion/index.vue
  15. 22
      src/views/home/index.vue
  16. 47
      src/views/houseQR/index.vue
  17. 5
      src/views/mine/mySatisfaction/index.vue
  18. 4
      src/views/register/index.vue
  19. 2
      vue.config.js

2
README.md

@ -6,7 +6,7 @@
然后跑起来之后你本地的域名就会变成epmet-cloud.elinkservice.cn
↓↓↓↓
在你小程序的公众号开发中输入以下网址就能够访问了
http://epmet-cloud.elinkservice.cn:80/?appId=wx1078fa1e99424de9&redirect=epmet-cloud.elinkservice.cn&houseId=123
http://epmet-cloud.elinkservice.cn:80/?appId=wx1078fa1e99424de9&redirect=epmet-cloud.elinkservice.cn&houseId=1640692803448688642
### Node 版本要求

2
public/index.html

@ -14,7 +14,7 @@
<div id="app"></div>
<script src="//res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script>
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=5D6BZ-KHLW4-JUXU5-XIM47-5Q2DJ-IPBBT"></script> <!-- 腾讯地图 -->
<script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=Q37BZ-7GERW-LZUR3-3WWD5-ZY3R2-D6FBG"></script> <!-- 腾讯地图 -->
<!-- <script type="text/javascript" src="//mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>-->
</body>
</html>

6
src/assets/css/index.less

@ -275,6 +275,9 @@ body #app {
.font-size21{
font-size: 21px;
}
.font-size25{
font-size: 25px;
}
.font-bold{
font-weight: bold;
}
@ -282,6 +285,9 @@ body #app {
&-right{
text-align: right;
}
&-left{
text-align: left;
}
}
.bot_btn{
position: fixed;

BIN
src/assets/images/houseQR/dialog_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

BIN
src/assets/images/icons/bell.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/assets/images/icons/close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

40
src/components/launchWeapp/index.vue

@ -1,10 +1,15 @@
<template>
<div class="navi-container">
<div class="fake-btn">点击跳转小程序</div>
<wx-open-launch-weapp @launch="launch" appid="wx6163d215ef686f78" path="pages/home/index.html"
style="position: absolute;top: 0;left: 0;width: 100%;height: 50px;z-index: 10;">
<div class="navi-container flex flex-y flex-center1 flex-center2">
<div class="font-size25 text-left" style="position: absolute;top: 15px;left: 25px;color:#15316a ;">温馨提示</div>
<div class="card flex flex-center2">
<img src="@/assets/images/icons/bell.png" alt="" class="img_33 m-right10">
<span style="color: #000000;">即将跳转到第三方应用</span>
</div>
<div class="fake-btn">点击跳转</div>
<wx-open-launch-weapp @launch="launch" :appid="mpObj.appId" :path="mpObj.url"
style="position: absolute;top: 124px;left: 0;width: 100%;height: 50px;z-index: 10;">
<script type="text/wxtag-template">
<style>.btn {width: 100%;height: 50px;position: absolute;left: 0;top: 0;z-index: 99;background: transparent;border: none;}</style>
<style>.btn {width: 100%;height: 50px;position: absolute;left: 0;top:0;z-index: 99;background: transparent;border: none;}</style>
<button class="btn" id="NaviToMini"></button>
</script>
</wx-open-launch-weapp>
@ -18,11 +23,18 @@ export default {
return {}
},
mounted() {
setConfig()
setConfig();
},
methods: {
launch(e) {
console.log("获取小程序 允许 按钮 操作回调", e)
},
},
props: {
mpObj: {
type: Object,
default:()=>{}
}
}
}
@ -30,20 +42,20 @@ export default {
<style lang="less" scoped>
.navi-container {
position: relative;
width: 200px;
height: 30px;
height: 100%;
margin: 18px auto;
padding:0 22px;
box-sizing: border-box;
.fake-btn {
width: 180px;
height: 30px;
margin: 0 auto;
border-radius: 25px;
width: 247px;
height: 43px;
margin: 15px auto 0;
border-radius: 10px;
border: 1px solid rgba(62, 134, 255);
color: #fff;
font-size: 16px;
text-align: center;
line-height: 30px;
line-height: 43px;
z-index: 1;
background: linear-gradient(to right, #3e86ff, #5f9af9);
}

2
src/config/env.staging.js

@ -9,5 +9,5 @@ module.exports = {
baseApi: 'https://epmet-preview.elinkservice.cn/testapi',
wxId: 'wx1078fa1e99424de9',
secret: 'ebecf6b88ab455f1cdf4a5b6357407b8',
mapKey: '5D6BZ-KHLW4-JUXU5-XIM47-5Q2DJ-IPBBT'
mapKey: 'Q37BZ-7GERW-LZUR3-3WWD5-ZY3R2-D6FBG'
}

2
src/utils/jweixin.js

@ -3,7 +3,7 @@ export const setConfig = function (jsApiList = []) {
getAutograph({ url: location.href.split('#')[0] }).then(res => {
console.log(res)
wx.config({
debug: process.env.NODE_ENV === 'development',
debug: false,
appId: res.data.appId,
timestamp: res.data.timestamp,
nonceStr: res.data.nonceStr,

2
src/utils/request.js

@ -31,7 +31,7 @@ service.interceptors.request.use(
config.headers['customerId'] = store.state.app.userInfo.customerId
}
if (store.state.app.userInfo.id) {
config.headers['userId'] = '';
config.headers['userId'] = store.state.app.userInfo.id;
}
config.baseURL = config.baseURL + '/'
return config

12
src/views/Enjoyableservices/index.vue

@ -28,21 +28,21 @@ import { myCommonsService } from '@/api/user'
return{
EnjoyableList:[],
finished: false,
loading: true,
showRegister: false,
pageSize:10,
pageNo:1
loading: true,
showRegister: false,
pageSize:10,
pageNo:1,
agencyId:null
}
},
components:{},
created(){
this.myCommonsService()
this.myCommonsService();
},
methods:{
async myCommonsService() {
let res = await myCommonsService()
if (res.code === 0) {
debugger
this.loading = false;
if (!res.data || res.data.list.length < this.pageSize) {
this.finished = true;

4
src/views/activity/index.vue

@ -41,7 +41,7 @@ export default {
};
},
created() {
this.agencyId = this.$store.state.app.agencyId;
this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
this.communityActivity();
},
methods: {
@ -59,7 +59,6 @@ export default {
assistingParty: "",
}
let res = await communityActivity(parm)
console.log(res);
if (res.code === 0) {
this.loading = false;
if (!res.data || res.data.list.length < this.pageSize) {
@ -69,7 +68,6 @@ export default {
}
},
handelClickJump(path, item) {
console.log(path, item);
if (path === 'activityDetail') {
this.$router.push({ path: `/${path}`, query: { id: item.id } });
}

2
src/views/communityPublicity/index.vue

@ -64,7 +64,7 @@ export default {
};
},
created() {
this.agencyId = this.$store.state.app.agencyId;
this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
this.advertisingTag();//
this.communityPublicity()//
},

2
src/views/discussion/index.vue

@ -50,7 +50,7 @@ export default {
};
},
created() {
this.agencyId = this.$store.state.app.agencyId;
this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
this.userId = this.$store.state.app.appId;
this.icEventOldDiscuss();
},

22
src/views/home/index.vue

@ -5,7 +5,7 @@
<div class="content">
<div class="flex flex-end">
<div class="flex flex-center2 white" >
<img src="@/assets/images/icons/home.png" class="img_17 m-right10" alt="">
<img src="@/assets/images/icons/home.png" class="img_17 m-right10" alt="" @dblclick="$router.push('/selectAgency')">
<span>{{ this.$store.state.app.userInfo.agencyName || '--' }}</span>
</div>
<div class="flex flex-center2">
@ -39,9 +39,9 @@
<div>我有诉求</div>
<div class="font-size13 m-top5" style="color: #d8e6fe;"> 居民点单 社区接单</div>
</div>
<div class="verify">
<div>信息核实</div>
<div class="font-size13 m-top5" style="color: #d8e6fe;">登记信息 窗口办理</div>
<div class="verify" @click="handelClickJump('mySatisfaction')">
<div>民意调查</div>
<div class="font-size13 m-top5" style="color: #d8e6fe;">为社区工作提意见</div>
</div>
</div>
<div class="flex flex-centr2 flex-mean m-top18">
@ -161,11 +161,11 @@ export default {
title: '居民议事',
path: 'discussion'
},
{
imgSrc: require('@/assets/images/nav/4.png'),
title: '满意度测评',
path: 'mySatisfaction'
},
// {
// imgSrc: require('@/assets/images/nav/4.png'),
// title: '',
// path: 'mySatisfaction'
// },
{
imgSrc: require('@/assets/images/nav/5.png'),
title: '可享服务',
@ -349,8 +349,10 @@ export default {
this.showRegister = true;
}
}
} else {
} else if(item){
this.$router.push({ path: `/${path}`,query:{id:item.id} })
}else{
this.$router.push({ path: `/${path}` })
}
},

47
src/views/houseQR/index.vue

@ -67,8 +67,8 @@
url="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzkxNzQ5MzUzNg==&scene=110#wechat_redirect"
size="small">关注</van-button>
</div>
<van-popup v-model="showLaunch" round>
<launch-weapp v-if="showLaunch"></launch-weapp>
<van-popup v-model="showLaunch" round v-if="mpObj">
<launch-weapp :mpObj="mpObj"></launch-weapp>
</van-popup>
<Android></Android>
</div>
@ -86,7 +86,8 @@ export default {
myCommunity: [
{
imgSrc: require('@/assets/images/houseQR/1.png'),
title: '我的信息'
title: '我的信息',
path: '/mine'
},
{
imgSrc: require('@/assets/images/houseQR/2.png'),
@ -126,28 +127,33 @@ export default {
serverList: [
{
imgSrc: require('@/assets/images/houseQR/bot_1.png'),
title: '户政服务'
title: '户政服务',
},
{
imgSrc: require('@/assets/images/houseQR/bot_2.png'),
title: '身份证业务'
},
{
imgSrc: require('@/assets/images/houseQR/bot_3.png'),
title: '公积金'
title: '12333',
type:'security-1',
appId:'wxf419ad41949b1db6',
url:'pages/index/index.html'
},
// {
// imgSrc: require('@/assets/images/houseQR/bot_3.png'),
// title: ''
// },
{
imgSrc: require('@/assets/images/houseQR/bot_4.png'),
title: '电子社保',
type: 'security'
type: 'security',
appId:'wx6163d215ef686f78',
url:'pages/home/index.html'
}
],
formData: null,
showLaunch:false
showLaunch:false,
mpObj:null
}
},
created() {
console.log(this.$store.state.app.houseId, '路由中')
this.houesId = this.$store.state.app.houseId
this.getHouseInfo()
},
@ -182,16 +188,16 @@ export default {
}
},
getHouseInfo() {
console.log(this.houesId)
getHouseInfoQR(this.houesId).then(res => {
this.formData = res.data
this.formData = res.data;
})
},
handelCLickJump(item) {
if (item.path) {
this.$router.push({ path: item.path })
}else if(item.type === 'security'){
this.$router.push({ path: item.path})
}else if(item.type === 'security' || item.type === 'security-1'){
this.showLaunch = true;
this.mpObj = item;
}
else {
Notify({ type: 'primary', message: '功能持续开放中,敬请期待!' })
@ -203,4 +209,13 @@ export default {
<style scoped lang="less">
@import './index';
:deep .van-popup{
width: 290px;
height: 244px;
padding-top: 15px;
box-sizing: border-box;
background: url('@/assets/images/houseQR/dialog_bg.png') no-repeat;
background-size: 100% 100%;
overflow: hidden;
}
</style>

5
src/views/mine/mySatisfaction/index.vue

@ -56,14 +56,15 @@ export default {
async inspRecord() {
let parm = {
pageSize:this.pageSize,
pageNo:this.pageNo++
pageNo:this.pageNo++,
agencyId:this.agencyId
}
let res = await inspRecord(parm)
if (res.code === 0) {
this.loading = false;
const now = new Date();
this.month = now.getMonth() + 1;
if(res.data.list.findIndex(item=>item.monthName == month) == -1){
if(res.data.list.findIndex(item=>item.monthName == this.month) == -1){
this.currentMonth = true;
}
if (!res.data || res.data.list.length < this.pageSize) {

4
src/views/register/index.vue

@ -64,7 +64,6 @@ export default {
},
init() {
console.log(this.$route.query);
this.active = this.$route.query.flag === "real"?1 : 0
this.userInfo = this.$store.state.app.userInfo;
this.phone = this.$store.state.app.userInfo.mobile;
@ -108,7 +107,8 @@ export default {
return false
}
sendsmscode({
phone: this.phone
phone: this.phone,
client:'resiH5'
}).then(() => {
leftTime = setInterval(() => {
if (this.time > 0) {

2
vue.config.js

@ -31,7 +31,7 @@ module.exports = defineConfig({
proxy: {
//配置跨域
'/api': {
target: `http://192.168.1.144`,
target: `https://epmet-preview.elinkservice.cn`,
// target: `http://127.0.0.1:8080`,
changeOrigin: true,
ws: false,

Loading…
Cancel
Save