| @@ -2,33 +2,33 @@ | |||||
| * @name 小程序环境 | * @name 小程序环境 | ||||
| * @description 多环境配置 | * @description 多环境配置 | ||||
| */ | */ | ||||
| const envName = 'development'; | |||||
| const envName = 'production'; | |||||
| const envs = [{ | const envs = [{ | ||||
| envName: 'production', | |||||
| appID: 'wx736395182f05a1b7', | |||||
| appName: '介休网格通', | |||||
| version: '1.0.0', | |||||
| baseUrl: 'https://jxwgtjm.xuqidata.com:8088', | |||||
| fileUrl: 'https://jiexiu.xuqidata.com:8083/jiexiujumin', | |||||
| loginPath: '/admin-api/system/auth/wechat/app/login', | |||||
| aMapKey: '29103dae675e5788eb011fb77ade8e3f', | |||||
| pubkey: 'Si9veMEER0LGTcLL6xwRWxUB7UCF7jjb00548e0ddc1501de0f' | |||||
| }, | |||||
| { | |||||
| envName: 'development', | |||||
| appID: 'wxcee598c3eb71e48d', | |||||
| appName: '智慧旭奇', | |||||
| version: '1.0.0', | |||||
| baseUrl: 'http://47.92.245.35:5002', | |||||
| // 接口前缀 | |||||
| fileUrl: 'http://47.92.245.35:5009/xq-ssg', | |||||
| // 图片服务器 | |||||
| loginPath: '/admin-api/system/auth/wechat/app/login', | |||||
| // 登陆接口 | |||||
| aMapKey: '6e488a3ed079adbb01de2ecb88ca5905', | |||||
| // 高德地图key | |||||
| pubkey: 'O9eM4Cv5bpi30mgUw9GEkf19KVE8KE8D00a46a6e50bb9465b2' // 吾来对话机器人平台key | |||||
| } | |||||
| envName: 'production', | |||||
| appID: 'wx736395182f05a1b7', | |||||
| appName: '介休网格通', | |||||
| version: '1.0.0', | |||||
| baseUrl: 'https://jxwgtjm.xuqidata.com:8088', | |||||
| fileUrl: 'https://jiexiu.xuqidata.com:8083/jiexiujumin', | |||||
| loginPath: '/admin-api/system/auth/wechat/app/login', | |||||
| aMapKey: '29103dae675e5788eb011fb77ade8e3f', | |||||
| pubkey: 'Si9veMEER0LGTcLL6xwRWxUB7UCF7jjb00548e0ddc1501de0f' | |||||
| }, | |||||
| { | |||||
| envName: 'development', | |||||
| appID: 'wxcee598c3eb71e48d', | |||||
| appName: '智慧旭奇', | |||||
| version: '1.0.0', | |||||
| baseUrl: 'http://47.92.245.35:5002', | |||||
| // 接口前缀 | |||||
| fileUrl: 'http://47.92.245.35:5009/xq-ssg', | |||||
| // 图片服务器 | |||||
| loginPath: '/admin-api/system/auth/wechat/app/login', | |||||
| // 登陆接口 | |||||
| aMapKey: '6e488a3ed079adbb01de2ecb88ca5905', | |||||
| // 高德地图key | |||||
| pubkey: 'O9eM4Cv5bpi30mgUw9GEkf19KVE8KE8D00a46a6e50bb9465b2' // 吾来对话机器人平台key | |||||
| } | |||||
| ]; | ]; | ||||
| const isFind = envs.find((item) => item.envName === envName); | const isFind = envs.find((item) => item.envName === envName); | ||||
| @@ -30,7 +30,8 @@ import { | |||||
| Field, | Field, | ||||
| TimePicker, | TimePicker, | ||||
| DatePicker, | DatePicker, | ||||
| Form | |||||
| Form, | |||||
| CheckboxGroup | |||||
| } from 'vant'; | } from 'vant'; | ||||
| import share from '@/utils/share.js' | import share from '@/utils/share.js' | ||||
| @@ -85,6 +86,7 @@ export function createApp() { | |||||
| app.use(TimePicker); | app.use(TimePicker); | ||||
| app.use(DatePicker); | app.use(DatePicker); | ||||
| app.use(Form); | app.use(Form); | ||||
| app.use(CheckboxGroup); | |||||
| // app.mixin(zpMixins); | // app.mixin(zpMixins); | ||||
| return { | return { | ||||
| app | app | ||||
| @@ -91,9 +91,9 @@ | |||||
| </view> | </view> | ||||
| <view class="form-treaty"> | <view class="form-treaty"> | ||||
| <van-checkbox label-disabled :value="checked" shape="square" use-icon-slot @change="onCheckbox"> | |||||
| <image class="ic-check" slot="icon" | |||||
| :src="checked ? '/static/images/ic-radio1.png' : '/static/images/ic-radio.png'" /> | |||||
| <van-checkbox label-disabled checked-color="red" v-model="checked" shape="square" use-icon-slot @change="onCheckbox"> | |||||
| <!-- <image class="ic-check" | |||||
| :src="checked ? '/static/images/ic-radio1.png' : '/static/images/ic-radio.png'" /> --> | |||||
| <view class="checbox-text flex"> | <view class="checbox-text flex"> | ||||
| <!-- <text>我已阅读《</text> | <!-- <text>我已阅读《</text> | ||||
| <navigator class="jump-to">申请党员帮办</navigator> | <navigator class="jump-to">申请党员帮办</navigator> | ||||
| @@ -109,11 +109,30 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <van-dialog :show="isDialog" closeOnClickOverlay | |||||
| <van-dialog :show="isDialog" closeOnClickOverlay @confirm="isDialog = false" | |||||
| message="群众点单是针对发展党员的程序流程基本要求、党的理论方针、支部周期性工作动态、党员志愿者帮扶及对上级支部的意见建议进行点单。不涉及以上点单类型的建议您拨打政务服务热线0354-7221890" /> | message="群众点单是针对发展党员的程序流程基本要求、党的理论方针、支部周期性工作动态、党员志愿者帮扶及对上级支部的意见建议进行点单。不涉及以上点单类型的建议您拨打政务服务热线0354-7221890" /> | ||||
| <wux-cascader :visible="isVisible" title="所在村/社区" :options="optionData" :safe-area-inset-bottom="true" | |||||
| :defaultFieldNames="defaultFieldNames" @close="onCloseVisible" @change="onChangeVisible" /> | |||||
| <van-field | |||||
| v-model="FiledVisible" | |||||
| is-link | |||||
| readonly | |||||
| label="所在村/社区" | |||||
| placeholder="请选择所在地区" | |||||
| @click="isVisible = true" | |||||
| /> | |||||
| <van-popup v-model:show="isVisible" round position="bottom"> | |||||
| <van-cascader | |||||
| v-model="currentValue" | |||||
| title="请选择所在地区" | |||||
| :options="optionData" | |||||
| :field-names="defaultFieldNames" | |||||
| @close="onCloseVisible" | |||||
| @change="onChangeVisible" | |||||
| /> | |||||
| </van-popup> | |||||
| <!-- <wux-cascader :visible="isVisible" title="所在村/社区" :options="optionData" :safe-area-inset-bottom="true" | |||||
| :defaultFieldNames="defaultFieldNames" @close="onCloseVisible" @change="onChangeVisible" /> --> | |||||
| </view> | </view> | ||||
| </template> | </template> | ||||
| @@ -126,7 +145,8 @@ | |||||
| import * as peopleApi from '@/api/peopleApi'; | import * as peopleApi from '@/api/peopleApi'; | ||||
| import * as publicApi from '@/api/publicApi'; | import * as publicApi from '@/api/publicApi'; | ||||
| export default { | export default { | ||||
| components: {}, | |||||
| components: { | |||||
| }, | |||||
| data() { | data() { | ||||
| return { | return { | ||||
| userInfoData: uni.getStorageSync('userInfoData'), | userInfoData: uni.getStorageSync('userInfoData'), | ||||
| @@ -173,6 +193,7 @@ | |||||
| // 级连选择器数据 start | // 级连选择器数据 start | ||||
| isVisible: false, | isVisible: false, | ||||
| FiledVisible:true, | |||||
| optionData: [], | optionData: [], | ||||
| currentTile: '请选择', | currentTile: '请选择', | ||||
| @@ -184,7 +205,7 @@ | |||||
| // 级联选择默认显示字段 | // 级联选择默认显示字段 | ||||
| // 级连选择器数据 end | // 级连选择器数据 end | ||||
| defaultFieldNames: { | defaultFieldNames: { | ||||
| label: 'name', | |||||
| text: 'name', | |||||
| value: 'id', | value: 'id', | ||||
| children: 'children' | children: 'children' | ||||
| }, | }, | ||||
| @@ -363,7 +384,7 @@ | |||||
| }, | }, | ||||
| onCheckbox(event) { | onCheckbox(event) { | ||||
| this.checked = event.detail | |||||
| this.checked = event | |||||
| }, | }, | ||||
| onOpenVisible() { | onOpenVisible() { | ||||
| @@ -104,8 +104,27 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <wux-cascader :visible="isVisible" title="所在村/社区" :options="optionData" :safe-area-inset-bottom="true" | |||||
| :defaultFieldNames="defaultFieldNames" @close="onCloseVisible" @change="onChangeVisible" /> | |||||
| <van-field | |||||
| v-model="FiledVisible" | |||||
| is-link | |||||
| readonly | |||||
| label="所在村/社区" | |||||
| placeholder="请选择所在地区" | |||||
| @click="isVisible = true" | |||||
| /> | |||||
| <van-popup v-model:show="isVisible" round position="bottom"> | |||||
| <van-cascader | |||||
| v-model="currentValue" | |||||
| title="请选择所在地区" | |||||
| :options="optionData" | |||||
| :field-names="defaultFieldNames" | |||||
| @close="onCloseVisible" | |||||
| @change="onChangeVisible" | |||||
| /> | |||||
| </van-popup> | |||||
| <!-- <wux-cascader :visible="isVisible" title="所在村/社区" :options="optionData" :safe-area-inset-bottom="true" | |||||
| :defaultFieldNames="defaultFieldNames" @close="onCloseVisible" @change="onChangeVisible" /> --> | |||||
| </view> | </view> | ||||
| </template> | </template> | ||||
| @@ -162,6 +181,7 @@ | |||||
| // 选择后的名称 | // 选择后的名称 | ||||
| currentValue: null, | currentValue: null, | ||||
| FiledVisible:true, | |||||
| // 选择后的id | // 选择后的id | ||||
| // 级联选择默认显示字段 | // 级联选择默认显示字段 | ||||
| @@ -56,6 +56,7 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view style="height:150rpx"></view> | |||||
| </view> | </view> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| @@ -90,8 +91,7 @@ | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| updateQuery(url, name) { | updateQuery(url, name) { | ||||
| console.log(this.$tootls) | |||||
| // return utils.updateQuery(url, name); | |||||
| return utils.updateQuery(url, name); | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 接口 | * 接口 | ||||
| @@ -159,7 +159,6 @@ | |||||
| const url = urlArray[0].replace(/(?:\[)(.*?)(?:\])/g, function(_, it) { | const url = urlArray[0].replace(/(?:\[)(.*?)(?:\])/g, function(_, it) { | ||||
| return item[it]; | return item[it]; | ||||
| }); | }); | ||||
| uni.navigateTo({ | uni.navigateTo({ | ||||
| url: url || '' | url: url || '' | ||||
| }); | }); | ||||
| @@ -10,7 +10,7 @@ function log(obj) { | |||||
| * JSON字符串转JSON对象 | * JSON字符串转JSON对象 | ||||
| * @param str JSON字符串 | * @param str JSON字符串 | ||||
| */ | */ | ||||
| var str2Json = function(str) { | |||||
| var str2Json = function (str) { | |||||
| if (!str) return; | if (!str) return; | ||||
| var json = JSON.parse(str); | var json = JSON.parse(str); | ||||
| @@ -21,7 +21,7 @@ var str2Json = function(str) { | |||||
| * 检查字符串是否是null或'' | * 检查字符串是否是null或'' | ||||
| * @param str 字符串 | * @param str 字符串 | ||||
| */ | */ | ||||
| var isNull = function(str) { | |||||
| var isNull = function (str) { | |||||
| return str ? str : '---'; | return str ? str : '---'; | ||||
| }; | }; | ||||
| @@ -43,7 +43,7 @@ function getFullUrl(fileHost, url) { | |||||
| * @param fileHost 静态资源基地址 | * @param fileHost 静态资源基地址 | ||||
| * @param filesStr 文件数组(JSON字符串) | * @param filesStr 文件数组(JSON字符串) | ||||
| */ | */ | ||||
| var getSingleFullUrl = function(fileHost, filesStr) { | |||||
| var getSingleFullUrl = function (fileHost, filesStr) { | |||||
| if (!filesStr) return false; | if (!filesStr) return false; | ||||
| var files = str2Json(filesStr); | var files = str2Json(filesStr); | ||||
| @@ -60,7 +60,7 @@ var getSingleFullUrl = function(fileHost, filesStr) { | |||||
| * @param arr 字符串数组 | * @param arr 字符串数组 | ||||
| * @param str 检测的字符串 | * @param str 检测的字符串 | ||||
| */ | */ | ||||
| var isIncluded = function(arr, str) { | |||||
| var isIncluded = function (arr, str) { | |||||
| return arr.indexOf(str) >= 0; | return arr.indexOf(str) >= 0; | ||||
| }; | }; | ||||
| @@ -70,7 +70,7 @@ var isIncluded = function(arr, str) { | |||||
| * @param str 展示的日期司机 默认0 | * @param str 展示的日期司机 默认0 | ||||
| * 0 (年-月-日 时:分:秒) 1 (x年-x月-x日 时:分:秒) 2 (x年-x月-x日) 3 (时:分:秒) | * 0 (年-月-日 时:分:秒) 1 (x年-x月-x日 时:分:秒) 2 (x年-x月-x日) 3 (时:分:秒) | ||||
| */ | */ | ||||
| var getDateTime = function(value, type) { | |||||
| var getDateTime = function (value, type) { | |||||
| //不能使用 new Date() | //不能使用 new Date() | ||||
| var time = new Date(value); | var time = new Date(value); | ||||
| var year = time.getFullYear(); | var year = time.getFullYear(); | ||||
| @@ -134,13 +134,9 @@ function updateQuery(url, item) { | |||||
| if (!item) { | if (!item) { | ||||
| return url; | return url; | ||||
| } | } | ||||
| if (url !== undefined) { | |||||
| let urlRegex = /(\?|&)name=[^&]*/g; | |||||
| return url.replace(urlRegex, function(_, it) { | |||||
| return item[it]; | |||||
| }); | |||||
| } | |||||
| let name = item.name; | |||||
| let newUrl = url.replace(/name=\[name\]/, 'name=' + name); | |||||
| return newUrl; | |||||
| } | } | ||||
| function formatStr(str) { | function formatStr(str) { | ||||
| @@ -4,4 +4,15 @@ import uni from "@dcloudio/vite-plugin-uni"; | |||||
| // https://vitejs.dev/config/ | // https://vitejs.dev/config/ | ||||
| export default defineConfig({ | export default defineConfig({ | ||||
| plugins: [uni()], | plugins: [uni()], | ||||
| // publicPath: './', | |||||
| // server: { | |||||
| // proxy: { | |||||
| // "/admin-api": { // “/api” 以及前置字符串会被替换为真正域名 | |||||
| // target: "http://47.92.245.35:5002", // 请求域名 | |||||
| // secure: false, // 请求是否为https | |||||
| // changeOrigin: true, // 是否跨域 | |||||
| // rewrite: (path) => path.replace(/^\/admin-api/, "") | |||||
| // } | |||||
| // } | |||||
| // } | |||||
| }); | }); | ||||