|
@@ -1,6 +1,10 @@
|
|
|
<template>
|
|
|
- <!-- #ifdef H5 -->
|
|
|
- <zj-page-layout :isScroll="true" :refresherTriggered="refresherTriggered" @refresherrefresh="refresherrefresh">
|
|
|
+ <zj-page-layout
|
|
|
+ :isScroll="true"
|
|
|
+ :refresherTriggered="refresherTriggered"
|
|
|
+ @refresherrefresh="refresherrefresh"
|
|
|
+ :hasFooter="true"
|
|
|
+ >
|
|
|
<template slot="header">
|
|
|
<view class="search-container">
|
|
|
<u-search shape="round" :showAction="false" placeholder="输入网点名称搜索" v-model="keyword"> </u-search>
|
|
@@ -47,54 +51,83 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<Loading :loadStatus="loadStatus" :dataList="dataList" />
|
|
|
+ <zjDialogPicker
|
|
|
+ ref="websitDialog"
|
|
|
+ :isShow="isShowWebsitDialog"
|
|
|
+ :multiple="false"
|
|
|
+ :styleType="2"
|
|
|
+ :title="'选择对应网点购买保险'"
|
|
|
+ :list="baoxiandangqianxianxitishi"
|
|
|
+ :keyName="'websitName'"
|
|
|
+ @cancel="isShowWebsitDialog = false"
|
|
|
+ @confirm="confirmWebsitDialog"
|
|
|
+ >
|
|
|
+ </zjDialogPicker>
|
|
|
+ <template slot="footer" v-if="!!baoxiandangqianxianxitishi.length">
|
|
|
+ <view class="bottom-container" style="box-sizing: border-box; padding: 20rpx">
|
|
|
+ <u-button text="去购买" shape="circle" type="primary" @click="isShowWebsitDialog = true"> </u-button>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
</zj-page-layout>
|
|
|
- <!-- #endif -->
|
|
|
-
|
|
|
- <!-- #ifndef H5 -->
|
|
|
- <web-view
|
|
|
- :src="webViewHref(`/packageMine/pages/myWebsit`, pam, crossPagePam)"
|
|
|
- @message="crossPage.$listener"
|
|
|
- ></web-view>
|
|
|
- <!-- #endif -->
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// #ifdef H5
|
|
|
+import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ zjDialogPicker
|
|
|
+ },
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
refresherTriggered: false,
|
|
|
loadStatus: 2,
|
|
|
pageNum: 1,
|
|
|
dataList: [],
|
|
|
- keyword: "",
|
|
|
+ keyword: '',
|
|
|
+ baoxiandangqianxianxitishi: [],
|
|
|
+ isShowWebsitDialog: false
|
|
|
}
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
- this.refreshLish();
|
|
|
+ this.refreshLish()
|
|
|
+ this.$api.post('/worker/remind').then(res => {
|
|
|
+ this.baoxiandangqianxianxitishi = res.data
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
showDataList() {
|
|
|
- return this.dataList.filter(item=>!!~item.name.indexOf(this.keyword))
|
|
|
+ return this.dataList.filter(item => !!~item.name.indexOf(this.keyword))
|
|
|
}
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ confirmWebsitDialog(e) {
|
|
|
+ this.isShowWebsitDialog = false
|
|
|
+ this.$navToPage({
|
|
|
+ url:
|
|
|
+ '/packageEnter/pages/insurance/myInsuranceBuy/index?websitId=' +
|
|
|
+ this?.baoxiandangqianxianxitishi?.[e[0]]?.websitId
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
async getList() {
|
|
|
var { latitude, longitude } = await this.$getLocation()
|
|
|
- this.$api.get('/user/apply/websit', {
|
|
|
- isAll: true,
|
|
|
- lat:latitude,
|
|
|
- lng:longitude
|
|
|
- }).then(res => {
|
|
|
- this.refresherTriggered = false;
|
|
|
- this.dataList = res.data
|
|
|
- })
|
|
|
+ this.$api
|
|
|
+ .get('/user/apply/websit', {
|
|
|
+ isAll: true,
|
|
|
+ lat: latitude,
|
|
|
+ lng: longitude
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.refresherTriggered = false
|
|
|
+ this.dataList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- navToPage(url){
|
|
|
+ navToPage(url) {
|
|
|
this.$navToPage({
|
|
|
url
|
|
|
})
|
|
@@ -102,37 +135,23 @@ export default {
|
|
|
|
|
|
// 触发下拉刷新
|
|
|
refresherrefresh(e) {
|
|
|
- this.refresherTriggered = true;
|
|
|
- this.refreshLish();
|
|
|
+ this.refresherTriggered = true
|
|
|
+ this.refreshLish()
|
|
|
},
|
|
|
|
|
|
refreshLish() {
|
|
|
- this.dataList = [];
|
|
|
- this.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.dataList = []
|
|
|
+ this.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
|
|
|
- goEnter(item){
|
|
|
+ goEnter(item) {
|
|
|
this.$navToPage({
|
|
|
- url: '/packageMine/pages/workerEnter?websitName=' + item.name + '&websitId=' + item.websitId,
|
|
|
+ url: '/packageMine/pages/workerEnter?websitName=' + item.name + '&websitId=' + item.websitId
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
-}
|
|
|
-
|
|
|
-// #endif
|
|
|
-// #ifndef H5
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- pam: {},
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad(pam) {
|
|
|
- this.pam = pam;
|
|
|
}
|
|
|
}
|
|
|
-// #endif
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|