diff --git a/components/oneBtn/oneBtn.vue b/components/oneBtn/oneBtn.vue index 8abee8b..3d757e6 100644 --- a/components/oneBtn/oneBtn.vue +++ b/components/oneBtn/oneBtn.vue @@ -1,15 +1,22 @@ - @@ -17,12 +24,13 @@ .oneBtn { height: 80rpx; background: #DE3A26; - box-shadow: 0px 3rpx 20rpx 0px rgba(222,58,38,0.53); + box-shadow: 0px 3rpx 20rpx 0px rgba(222, 58, 38, 0.53); border-radius: 40rpx; text-align: center; line-height: 80rpx; font-size: 28rpx; color: #fff; + &.hui { opacity: 0.4; } diff --git a/components/privacyRadion/privacyRadion.vue b/components/privacyRadion/privacyRadion.vue index 6ee0a74..6190570 100644 --- a/components/privacyRadion/privacyRadion.vue +++ b/components/privacyRadion/privacyRadion.vue @@ -1,27 +1,33 @@ - @@ -29,12 +35,14 @@ .radioWrap { display: flex; align-items: center; - .privacyText { - font-size: 24rpx; - color: #888E94; - text { - color: $themC; - } - } + + .privacyText { + font-size: 24rpx; + color: #888E94; + + text { + color: $themC; + } + } } \ No newline at end of file diff --git a/components/searchRow/searchRow.vue b/components/searchRow/searchRow.vue index 16271c2..14be7e5 100644 --- a/components/searchRow/searchRow.vue +++ b/components/searchRow/searchRow.vue @@ -4,30 +4,38 @@ - + - + - @@ -37,23 +45,23 @@ width: 100%; height: 100%; } - + .searchBg { background: #EFEFEF; width: 100%; height: 72rpx; border-radius: 10rpx; line-height: 72rpx; - + .flex { height: 100%; padding: 0 28rpx; - + .searchIcon { width: 32rpx; height: 32rpx; } - + .inputBox { flex: 1; color: #333; @@ -62,6 +70,4 @@ } } } - - - + \ No newline at end of file diff --git a/config/api.js b/config/api.js index 1249a52..4688a04 100644 --- a/config/api.js +++ b/config/api.js @@ -20,7 +20,7 @@ export const logOut = (data={}) => http.post('member/auth/logout', data, {custom // 文章列表 export const getNoticeList = (data) => http.post('article/simple_list', data, { custom: { noToken: true }}) // 首页文章详情 - export const getNoticeDetail = (data) => http.post('article/article_detail?articleId='+data.articleId, { custom: { noToken: true }}) + export const getNoticeDetail = (data) => http.post('article/article_detail?articleId='+data.articleId, {}, { custom: { noToken: true }}) // 我的房子信息 export const getHouses = (data) => http.post('mime/houses', data) // 小区下拉选信息 @@ -44,6 +44,9 @@ export const logOut = (data={}) => http.post('member/auth/logout', data, {custom export const articleVote = (data) => http.post('article/vote', data) // 投票结果 export const voteResult = (data) => http.post('article/vote_result', data) + // 小程序订阅消息 + export const appletSubscribe = (data) => http.post('mime/applet/subscribe', data) + diff --git a/config/request.js b/config/request.js index 9e658d5..aab2e37 100644 --- a/config/request.js +++ b/config/request.js @@ -2,8 +2,7 @@ import setObj from '@/config/site.config.js'; let { H5_API, WX_API,httpPrefix } = setObj import { useUserStoreHook } from '@/store/index.js'; -// console.log('不能用?') -// console.log(useUserStoreHook()) + const counterStore = useUserStoreHook(); @@ -57,8 +56,7 @@ let secretKey = '22d90e09d1374f0f9e4accd07d333e55' // 响应拦截 uni.$u.http.interceptors.response.use(async (response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/ const data = response.data - // console.log('请求结果') - // console.log(data) + if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') { // await refreshToken() let obj = response.config @@ -71,7 +69,12 @@ let secretKey = '22d90e09d1374f0f9e4accd07d333e55' } if(data.code==401) { console.log('报401的接口') - console.log(response.config.url) + let url = response.config.url + console.log(url) + if(url=='mime/houses'||url == 'face/user_info') { + console.log('还是到这里面来了?') + return Promise.reject(data) + } return counterStore.goLogin() } diff --git a/config/site.config.js b/config/site.config.js index 434c4d1..2b856f8 100644 --- a/config/site.config.js +++ b/config/site.config.js @@ -4,18 +4,14 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM || 'h5'; // localIp = false let obj = { H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理 - WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.106:8518/',//非代理地址 不要忘记加/ + WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'https://www.jakjgs.com/',//非代理地址 不要忘记加/ website: 'http://192.168.1.37', - httpPrefix: 'app-api/', - imgUrl: 'http://47.96.82.242/htmls/', - // 支付测试地址 - // preUrl: 'https://u8wbs.zyebank.cn/cem_ysb_u6/index.html', - // const preUrl = 'https://u8wbs.zyebank.cn/cem_ysb_u8/index.html' - // 生产地址 - preUrl: 'https://zmcht.zybank.com.cn/cem_ysb/index.html', + // httpPrefix: 'app-api/', + httpPrefix: 'xjapplet-api/', + imgUrl: 'https://www.jakjgs.com/htmls/', + tmplIds: ['OH_1gceM-m3EXRKOtjl_Hb1ymyC5zw8_Ag6LaFXV4Do', 'AjD_oLafmKGO8X3YvDGl1qmITq_Q6bSFMDeygJNAIes'],//消息模板 }; export default obj // http://192.168.1.106:8518/测试地址 -// http://192.168.1.43:8318/本地地址 -//http://www.lyjppt.com/正式地址 +// https://www.jakjgs.com/ 正式地址 \ No newline at end of file diff --git a/config/utils.js b/config/utils.js deleted file mode 100644 index 0290f8c..0000000 --- a/config/utils.js +++ /dev/null @@ -1,218 +0,0 @@ -import { WX_API, H5_API, httpPrefix } from './site.config.js'; -var _url = H5_API+ WX_API + httpPrefix - -import store from '@/store/index.js' - -export function checkToken(vm) { - let expiresTime = vm.$store.state.user.vuex_loginInfo.expiresTime - let nowTime = new Date() * 1 - console.log('超时了') - console.log(expiresTime) - if (nowTime > expiresTime * 1) { - vm.$store.commit('goLogin') - // 如果小于20分钟就刷新一下token && - } else if ((expiresTime * 1 - nowTime) / 60000 < 10) { - vm.$store.dispatch('refreshToken') - } -} - -function dateRangeFn(dateRange) { - let tmp = [] - let dateArr = [] - dateRange.forEach((date) => { - let dateStr = date.toISOString().split('T')[0] - let dd = dateStr.split('-')[2] - const daysOfWeek = ['日', '一', '二', '三', '四', '五', '六']; - const dayOfWeek = date.getDay(); - const weekName = daysOfWeek[dayOfWeek]; - // console.log(dateStr) - // console.log(weekName) - if (tmp.length == 0) { - dateArr.push(tmp) - } - let obj = { - week: weekName, - num: dd, - date: dateStr - } - tmp.push(obj) - if (tmp.length == 5) { - tmp = [] - } - }); - console.log(dateArr) - return dateArr -} - -// 获取两个时间段的所有日期 -export function getDates(startDate, endDate) { - const dates = []; - let currentDate = new Date(startDate); - - while (currentDate <= endDate) { - dates.push(new Date(currentDate)); - currentDate.setDate(currentDate.getDate() + 1); - } - return dateRangeFn(dates) -} - -// 获取两个时间段的所有月份 -export function getMonthsBetweenDates(startDate, endDate) { - let months = []; - let currentDate = new Date(startDate); - - while (currentDate <= endDate) { - const year = currentDate.getFullYear(); - const month = currentDate.getMonth() + 1; // 月份从0开始,所以要加1 - months.push(`${year}-${month.toString().padStart(2, '0')}`); - - // 将当前日期设置为下一个月的第一天 - currentDate.setMonth(currentDate.getMonth() + 1); - currentDate.setDate(1); - } - - return months; -} - - -//选择图片 -export function chooseImages(num=0) { - let imgNum = 3 - num - let tempArr = [] - return new Promise((reslove, reject)=>{ - uni.chooseImage({ - count: imgNum, //允许选择的数量 - sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - sourceType: ['album', 'camera'], //从相册选择 - success: res => { - uni.showLoading({ - title: '图片上传中...' - }); - console.log(res) - res.tempFiles.forEach( async (item,index)=>{ - let dataImg = await uploadImgApi(item.path, index) - if(dataImg) tempArr.push(dataImg) - if(index==res.tempFiles.length-1) { - reslove(tempArr) - } - }) - } - }) - }) - } - -export function uploadImgApi(filePath, imgName, imgLink='image') { - console.log(filePath) - let token = 'Bearer '+ store.state.user.vuex_loginInfo.accessToken - let timer = new Date() * 1 - return new Promise((reslove, reject)=>{ - // 上传图片到服务器 - uni.uploadFile({ - url: _url + 'infra/file/upload',//接口 - filePath: filePath,//要上传的图片的本地路径 - name: 'file', - // complain - formData: { - path: imgLink+'/'+ uni.$u.date(timer, 'yyyy-mm-dd')+'/'+timer + '-'+ imgName, - type: 1, - fileSuffix: "png" - }, - header: { - Authorization: token, - // 'tenant-id': '1704459882232553474' - }, - success(res) { - console.log('上传成功??') - console.log(res) - let res2 = JSON.parse(res.data) - reslove(res2.data) - - }, - fail() { - reject(0) - }, - complete: (err)=> { - uni.hideLoading(); - } - }) - }) - } - let apiOk =true - let refreshTokenFn = null - export function refreshToken() { - return new Promise(async(resolve, reject)=>{ - if(!apiOk) { - return refreshTokenFn - } - apiOk = false - refreshTokenFn = null - const http = uni.$u.http - let config = { header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}, custom: { noToken: true } } - let refreshToken = store.state.user.vuex_loginInfo.refreshToken - refreshTokenFn = await http.post('member/auth/refresh-token',{refreshToken}, config) - if( refreshTokenFn.data|| refreshTokenFn.data.accessToken) { - apiOk = true - store.commit('update_vuex_loginInfo', refreshTokenFn.data) - uni.$u.http.setConfig((config) => { - config.header.Authorization = 'Bearer ' + refreshTokenFn.data.accessToken - return config - }) - resolve(refreshTokenFn) - }else { - apiOk = true - store.commit('goLogin') - reject('刷新token失败了') - } - }) - } - - export function scanCodeFn(_this) { - uni.scanCode({ - scanType: ['qrCode'], - success: function(res) { - console.log('条码类型:' + res.scanType); - console.log('条码内容:' + res.result); - let obj = JSON.parse(res.result) - console.log(obj) - // 扫教练码去报名的 - if(obj.QrType) { - let item = { - schoolName: obj.schoolName, - schoolId: obj.schoolId, - name: obj.coachName, - id: obj.coachId, - teachCarType: obj.teachCarType, - key: obj.key, - QrType: obj.QrType - } - - _this.$store.commit('upDateSchoolClass', {}) - if(obj.QrType==1) { - // 判断是扫教练码来的还是驾校码来的 - if(item.id) { - _this.$store.commit('updateSchool', {}) - console.log('扫码结果***********') - console.log(item) - _this.$store.commit('upDateSchoolCoach', item) - }else { - obj.schoolName = decodeURIComponent(obj.schoolName) - _this.$store.commit('upDateSchoolCoach', {}) - _this.$store.commit('updateSchool', item) - } - _this.$u.utils.clickSignUp() - }else { - // 签到的 - _this.$store.commit('upDateSchoolCoach', item) - _this.$goPage('/pages/indexEntry/signIn/signAndOut/signAndOut') - } - }else { - _this.$store.commit('updateWebVeiwUrl', res.result) - uni.navigateTo({ - url: '/pages/indexEntry/webView/webView' - }) - } - } - }); - } - - \ No newline at end of file diff --git a/package.json b/package.json index e394467..95e46e1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "questionbankvue3", + "name": "首府公馆事务通", "version": "1.0.0", "description": "", "main": "main.js", diff --git a/pages/subPage/authentication/authentication.vue b/pages/subPage/authentication/authentication.vue index 07efcda..7ccdd8a 100644 --- a/pages/subPage/authentication/authentication.vue +++ b/pages/subPage/authentication/authentication.vue @@ -29,8 +29,17 @@ + + + + + + + 房屋所有权证照片 + + - + @@ -55,6 +64,7 @@ \ No newline at end of file diff --git a/pages/subPage/authentication/selectAddress.vue b/pages/subPage/authentication/selectAddress.vue deleted file mode 100644 index 5d82c0d..0000000 --- a/pages/subPage/authentication/selectAddress.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/subPage/ballots/ballotsList/ballotsList.vue b/pages/subPage/ballots/ballotsList/ballotsList.vue index 297c5ee..f44da84 100644 --- a/pages/subPage/ballots/ballotsList/ballotsList.vue +++ b/pages/subPage/ballots/ballotsList/ballotsList.vue @@ -13,13 +13,13 @@ - + {{ item.title }} - 查看结果 + 查看结果 未开始 - 我要投票 - 已结束 + 我要投票 + 已结束 发起人:{{ item.makerName }} @@ -38,7 +38,7 @@ import siteObj from '@/config/site.config.js' const {imgUrl} = siteObj import { - onLoad, + onShow, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app' @@ -55,7 +55,11 @@ { name: '进行中', id: 1 }, { name: '已结束', id: 2 }, ]); - +let style = { + // p: 'font-size:32rpx', + // span: 'font-size: 30rpx', + img: 'max-width: 100%' + } // tab切换 const currentTab = ref(0) function tabClick(item) { @@ -70,11 +74,22 @@ params.value.voteState = item.id initList() } - // 去投票 + function goVote(item) { - console.log(item) + let url = '' + if(currentTab.value==1||item.voted==1) { + url = '/pages/subPage/ballots/vote/voteReslut?voteId='+item.voteId + }else if(item.voteStatus==0) { + return false + }else if(item.voteStatus==1) { + url = '/pages/subPage/ballots/vote/vote?voteId='+item.voteId + }else if(item.voteStatus==2) { + url = '/pages/subPage/ballots/vote/voteReslut?voteId='+item.voteId + } + // console.log(url) + // console.log(item) uni.navigateTo({ - url: '/pages/subPage/ballots/vote/vote' + url }) } @@ -101,7 +116,7 @@ if(voteList.value.length>=total.value) status.value = 'nomore' console.log(voteList.value) } - votePageFn() + async function initList() { params.value.pageNo = 1 voteList.value = [] @@ -113,7 +128,9 @@ await initList() uni.stopPullDownRefresh() }) - + onShow(()=>{ + initList() + }) onReachBottom(()=>{ if(total.value > voteList.value.length) { votePageFn() diff --git a/pages/subPage/ballots/vote/comp/topInfo.vue b/pages/subPage/ballots/vote/comp/topInfo.vue index a9c2def..077028e 100644 --- a/pages/subPage/ballots/vote/comp/topInfo.vue +++ b/pages/subPage/ballots/vote/comp/topInfo.vue @@ -17,10 +17,10 @@ - {{detailInfo.detail}} + + - {{ detailInfo.voteType==1?'单选': '多选'}} @@ -41,6 +41,11 @@ default: {} } }) + let style = { + // p: 'font-size:32rpx', + // span: 'font-size: 30rpx', + img: 'max-width: 100%' + } \ No newline at end of file diff --git a/pages/subPage/privacyAgreement/comp/yhxy.vue b/pages/subPage/privacyAgreement/comp/yhxy.vue new file mode 100644 index 0000000..9d15c73 --- /dev/null +++ b/pages/subPage/privacyAgreement/comp/yhxy.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/pages/subPage/privacyAgreement/comp/yszc.vue b/pages/subPage/privacyAgreement/comp/yszc.vue new file mode 100644 index 0000000..9de6333 --- /dev/null +++ b/pages/subPage/privacyAgreement/comp/yszc.vue @@ -0,0 +1,82 @@ + + + + + \ No newline at end of file diff --git a/pages/subPage/privacyAgreement/privacyAgreement.vue b/pages/subPage/privacyAgreement/privacyAgreement.vue index b4915e5..a0c2982 100644 --- a/pages/subPage/privacyAgreement/privacyAgreement.vue +++ b/pages/subPage/privacyAgreement/privacyAgreement.vue @@ -1,40 +1,37 @@ - \ No newline at end of file diff --git a/pages/tabbar/index/index.vue b/pages/tabbar/index/index.vue index 39efebe..e7147c8 100644 --- a/pages/tabbar/index/index.vue +++ b/pages/tabbar/index/index.vue @@ -8,14 +8,14 @@ - + 我的房屋 关联房屋 - + 立即登录 @@ -23,31 +23,31 @@ 登录成功即可关联房屋~ - + - - + + 房屋地址:{{ item.roomAddress}} 房屋面积:{{ item.roomSize }} - + - + - 服务 + 服务 - + - + @@ -61,16 +61,16 @@ - + 你好: - 欢迎来到 “新疆首付公馆”,为了更好的为您提供服务,请您选择房屋信息,进行业主身份认证。 + 欢迎来到 “新疆首府公馆”,为了更好的为您提供服务,请您选择房屋信息,进行业主身份认证。 - + @@ -78,23 +78,32 @@ @@ -191,7 +233,7 @@ .banner1 { width: 100%; - height: 260rpx; + // height: 260rpx; } .myhome { @@ -201,7 +243,7 @@ box-shadow: 0px 0px 14rpx 0px rgba(0, 0, 0, 0.06); border-radius: 20rpx; padding: 0 30rpx 0rpx 30rpx; - + overflow: auto; .flex-b { width: 100%; height: 94rpx; @@ -230,8 +272,8 @@ border-radius: 20rpx; border: 2rpx solid #EFEFEF; padding: 40rpx 20rpx 0rpx 30rpx; - margin-top: 30rpx; - + margin-top: 15rpx; + margin-bottom: 30rpx; .text { font-size: 28rpx; margin-bottom: 24rpx; @@ -259,7 +301,7 @@ .severCon { .banner2 { width: 100%; - height: 180rpx; + // height: 180rpx; } } diff --git a/pages/tabbar/mine/mine.vue b/pages/tabbar/mine/mine.vue index 2da36b3..97bf6a6 100644 --- a/pages/tabbar/mine/mine.vue +++ b/pages/tabbar/mine/mine.vue @@ -47,8 +47,8 @@ import { onShow } from '@dcloudio/uni-app' import { ref, } from 'vue' const configList = ref([ - {text: '用户协议', url: '/pages/subPage/privacyAgreement/privacyAgreement?type=1'}, - {text: '隐私政策', url: '/pages/subPage/privacyAgreement/privacyAgreement?type=2'}, + {text: '用户协议', url: '/pages/subPage/privacyAgreement/privacyAgreement?type=2'}, + {text: '隐私政策', url: '/pages/subPage/privacyAgreement/privacyAgreement?type=1'}, ]) function logOutFn() { diff --git a/static/images/phoneH.png b/static/images/phoneH.png new file mode 100644 index 0000000..03a43d9 Binary files /dev/null and b/static/images/phoneH.png differ diff --git a/store/index.js b/store/index.js index b1b441d..a0a028e 100644 --- a/store/index.js +++ b/store/index.js @@ -10,7 +10,8 @@ export const userStore = defineStore({ loginInfo: uni.getStorageSync('loginInfo')?uni.getStorageSync('loginInfo'):{}, userInfo: { idCard: '', - name: '' + name: '', + myHouse: null }, chooseHouse: { "roomNum": "", @@ -44,13 +45,13 @@ export const userStore = defineStore({ console.log(this.userInfo) }, goLogin() { + this.openid = '' this.token = '' this.loginInfo = {} for (let key in this.loginInfo) { this.chooseHouse[key] = '' } - uni.setStorageSync('token', '') - uni.setStorageSync('loginInfo', '') + uni.clearStorage(); const pages = getCurrentPages(); const page = pages[pages.length - 1].$page.fullPath; //完整路由地址 let url = '/pages/subPage/login/login' diff --git a/unpackage/dist/dev/mp-weixin/common/assets.js b/unpackage/dist/dev/mp-weixin/common/assets.js index 5df8325..bb7f12d 100644 --- a/unpackage/dist/dev/mp-weixin/common/assets.js +++ b/unpackage/dist/dev/mp-weixin/common/assets.js @@ -1,7 +1,8 @@ "use strict"; const _imports_0$4 = "/static/images/arrRight.png"; const _imports_0$3 = "/static/images/logo.png"; -const _imports_0$2 = "/static/images/okIcon.png"; +const _imports_0$2 = "/static/images/phoneH.png"; +const _imports_1 = "/static/images/okIcon.png"; const _imports_0$1 = "/static/images/nodata.png"; const _imports_0 = "/static/images/searchIcon.png"; exports._imports_0 = _imports_0$4; @@ -9,3 +10,4 @@ exports._imports_0$1 = _imports_0$3; exports._imports_0$2 = _imports_0$2; exports._imports_0$3 = _imports_0$1; exports._imports_0$4 = _imports_0; +exports._imports_1 = _imports_1; diff --git a/unpackage/dist/dev/mp-weixin/common/vendor.js b/unpackage/dist/dev/mp-weixin/common/vendor.js index 5728170..32590f4 100644 --- a/unpackage/dist/dev/mp-weixin/common/vendor.js +++ b/unpackage/dist/dev/mp-weixin/common/vendor.js @@ -8091,6 +8091,7 @@ exports.defineStore = defineStore; exports.e = e; exports.f = f; exports.index = index; +exports.isRef = isRef; exports.md5 = md5; exports.n = n; exports.nextTick$1 = nextTick$1; diff --git a/unpackage/dist/dev/mp-weixin/components/oneBtn/oneBtn.js b/unpackage/dist/dev/mp-weixin/components/oneBtn/oneBtn.js index 46fbad1..db9b6a6 100644 --- a/unpackage/dist/dev/mp-weixin/components/oneBtn/oneBtn.js +++ b/unpackage/dist/dev/mp-weixin/components/oneBtn/oneBtn.js @@ -1,19 +1,29 @@ "use strict"; const common_vendor = require("../../common/vendor.js"); const _sfc_main = { - props: ["text", "disabled"], - methods: { - oneBtnClick() { - this.$emit("oneBtnClick"); + __name: "oneBtn", + props: { + text: { + type: String, + default: "" + }, + disabled: { + type: Boolean, + default: false } + }, + setup(__props, { emit }) { + function oneBtnClick() { + emit("oneBtnClick"); + } + return (_ctx, _cache) => { + return { + a: common_vendor.t(__props.text), + b: __props.disabled ? 1 : "", + c: common_vendor.o(oneBtnClick) + }; + }; } }; -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return { - a: common_vendor.t($props.text), - b: $props.disabled ? 1 : "", - c: common_vendor.o((...args) => $options.oneBtnClick && $options.oneBtnClick(...args)) - }; -} -const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4b7d20a4"], ["__file", "D:/work/xinjiangMiniProgram/components/oneBtn/oneBtn.vue"]]); +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4b7d20a4"], ["__file", "D:/work/xinjiangMiniProgram/components/oneBtn/oneBtn.vue"]]); wx.createComponent(Component); diff --git a/unpackage/dist/dev/mp-weixin/components/privacyRadion/privacyRadion.js b/unpackage/dist/dev/mp-weixin/components/privacyRadion/privacyRadion.js index 14caab6..69a9256 100644 --- a/unpackage/dist/dev/mp-weixin/components/privacyRadion/privacyRadion.js +++ b/unpackage/dist/dev/mp-weixin/components/privacyRadion/privacyRadion.js @@ -1,17 +1,5 @@ "use strict"; const common_vendor = require("../../common/vendor.js"); -const _sfc_main = { - props: ["isCheck"], - methods: { - changeRadio(val) { - console.log(val); - this.$emit("changeRadio", val); - }, - async goPage(type) { - this.$goPage("/pages/subPage/privacyAgreement/privacyAgreement?type=" + type); - } - } -}; if (!Array) { const _easycom_u_checkbox2 = common_vendor.resolveComponent("u-checkbox"); const _easycom_u_checkbox_group2 = common_vendor.resolveComponent("u-checkbox-group"); @@ -22,19 +10,39 @@ const _easycom_u_checkbox_group = () => "../../uni_modules/uview-plus/components if (!Math) { (_easycom_u_checkbox + _easycom_u_checkbox_group)(); } -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return { - a: common_vendor.o($options.changeRadio), - b: common_vendor.p({ - checked: $props.isCheck, - shape: "circle", - label: "已阅读并同意", - activeColor: "#DE3A26", - labelSize: 12 - }), - c: common_vendor.o(($event) => $options.goPage(2)), - d: common_vendor.o(($event) => $options.goPage(1)) - }; -} -const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-64dff09c"], ["__file", "D:/work/xinjiangMiniProgram/components/privacyRadion/privacyRadion.vue"]]); +const _sfc_main = { + __name: "privacyRadion", + props: { + isCheck: { + type: Boolean, + default: false + } + }, + setup(__props, { emit }) { + function changeRadio(val) { + console.log(val); + emit("changeRadio", val); + } + function goPage(type) { + common_vendor.index.navigateTo({ + url: "/pages/subPage/privacyAgreement/privacyAgreement?type=" + type + }); + } + return (_ctx, _cache) => { + return { + a: common_vendor.o(changeRadio), + b: common_vendor.p({ + checked: __props.isCheck, + shape: "circle", + label: "已阅读并同意", + activeColor: "#DE3A26", + labelSize: 12 + }), + c: common_vendor.o(($event) => goPage(2)), + d: common_vendor.o(($event) => goPage(1)) + }; + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-64dff09c"], ["__file", "D:/work/xinjiangMiniProgram/components/privacyRadion/privacyRadion.vue"]]); wx.createComponent(Component); diff --git a/unpackage/dist/dev/mp-weixin/components/searchRow/searchRow.js b/unpackage/dist/dev/mp-weixin/components/searchRow/searchRow.js index 6996f6e..ff7ebf8 100644 --- a/unpackage/dist/dev/mp-weixin/components/searchRow/searchRow.js +++ b/unpackage/dist/dev/mp-weixin/components/searchRow/searchRow.js @@ -1,22 +1,6 @@ "use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); -const _sfc_main = { - props: ["placeholder", "disable"], - data() { - return { - keyword: "" - }; - }, - methods: { - searchFn() { - this.$emit("searchFn", this.keyword); - }, - clearSearchFn() { - this.keyword = ""; - } - } -}; if (!Array) { const _easycom_u_search2 = common_vendor.resolveComponent("u-search"); _easycom_u_search2(); @@ -25,24 +9,46 @@ const _easycom_u_search = () => "../../uni_modules/uview-plus/components/u-searc if (!Math) { _easycom_u_search(); } -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return { - a: common_assets._imports_0$4, - b: common_vendor.o(($event) => _ctx.$u.debounce($options.searchFn, 1500)), - c: common_vendor.o(($event) => _ctx.$u.debounce($options.searchFn, 500)), - d: common_vendor.o($options.clearSearchFn), - e: common_vendor.o(($event) => $data.keyword = $event), - f: common_vendor.p({ - placeholder: $props.placeholder, - searchIcon: " ", - color: "#333", - disabled: $props.disable, - placeholderColor: "#9C9C9C", - bgColor: "transparent", - showAction: false, - modelValue: $data.keyword - }) - }; -} -const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-612eacee"], ["__file", "D:/work/xinjiangMiniProgram/components/searchRow/searchRow.vue"]]); +const _sfc_main = { + __name: "searchRow", + props: { + placeholder: { + type: String, + default: "" + }, + disable: { + type: Boolean, + default: false + } + }, + setup(__props, { emit }) { + let keyword = common_vendor.ref(""); + function searchFn() { + emit("searchFn", keyword.value); + } + function clearSearchFn() { + keyword.value = ""; + } + return (_ctx, _cache) => { + return { + a: common_assets._imports_0$4, + b: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 1500)), + c: common_vendor.o(($event) => _ctx.$u.debounce(searchFn, 500)), + d: common_vendor.o(clearSearchFn), + e: common_vendor.o(($event) => common_vendor.isRef(keyword) ? keyword.value = $event : keyword = $event), + f: common_vendor.p({ + placeholder: __props.placeholder, + searchIcon: " ", + color: "#333", + disabled: __props.disable, + placeholderColor: "#9C9C9C", + bgColor: "transparent", + showAction: false, + modelValue: common_vendor.unref(keyword) + }) + }; + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-612eacee"], ["__file", "D:/work/xinjiangMiniProgram/components/searchRow/searchRow.vue"]]); wx.createComponent(Component); diff --git a/unpackage/dist/dev/mp-weixin/config/api.js b/unpackage/dist/dev/mp-weixin/config/api.js index c0a1f04..8f1cc8a 100644 --- a/unpackage/dist/dev/mp-weixin/config/api.js +++ b/unpackage/dist/dev/mp-weixin/config/api.js @@ -4,7 +4,7 @@ const weixinLogin = (data) => uni_modules_uviewPlus_index.http.post("member/auth const getUserInfo = (data) => uni_modules_uviewPlus_index.http.post("face/user_info"); const logOut = (data = {}) => uni_modules_uviewPlus_index.http.post("member/auth/logout", data, { custom: { catch: true, toast: false } }); const getNoticeList = (data) => uni_modules_uviewPlus_index.http.post("article/simple_list", data, { custom: { noToken: true } }); -const getNoticeDetail = (data) => uni_modules_uviewPlus_index.http.post("article/article_detail?articleId=" + data.articleId, { custom: { noToken: true } }); +const getNoticeDetail = (data) => uni_modules_uviewPlus_index.http.post("article/article_detail?articleId=" + data.articleId, {}, { custom: { noToken: true } }); const getHouses = (data) => uni_modules_uviewPlus_index.http.post("mime/houses", data); const houseTree = (data) => uni_modules_uviewPlus_index.http.post("house/tree", data); const houseRoom = (data) => uni_modules_uviewPlus_index.http.post("house/room_search", data); @@ -16,6 +16,8 @@ const voteDetail = (data) => uni_modules_uviewPlus_index.http.post("article/vote const mineVotePage = (data) => uni_modules_uviewPlus_index.http.post("article/mine_vote_page", data); const articleVote = (data) => uni_modules_uviewPlus_index.http.post("article/vote", data); const voteResult = (data) => uni_modules_uviewPlus_index.http.post("article/vote_result", data); +const appletSubscribe = (data) => uni_modules_uviewPlus_index.http.post("mime/applet/subscribe", data); +exports.appletSubscribe = appletSubscribe; exports.articleVote = articleVote; exports.getFaceResult = getFaceResult; exports.getFacetoken = getFacetoken; diff --git a/unpackage/dist/dev/mp-weixin/config/request.js b/unpackage/dist/dev/mp-weixin/config/request.js index 90f9e72..6829967 100644 --- a/unpackage/dist/dev/mp-weixin/config/request.js +++ b/unpackage/dist/dev/mp-weixin/config/request.js @@ -48,7 +48,12 @@ const request = (vm) => { } if (data.code == 401) { console.log("报401的接口"); - console.log(response.config.url); + let url = response.config.url; + console.log(url); + if (url == "mime/houses" || url == "face/user_info") { + console.log("还是到这里面来了?"); + return Promise.reject(data); + } return counterStore.goLogin(); } const custom = (_a = response.config) == null ? void 0 : _a.custom; diff --git a/unpackage/dist/dev/mp-weixin/config/site.config.js b/unpackage/dist/dev/mp-weixin/config/site.config.js index 31ddc7b..909b042 100644 --- a/unpackage/dist/dev/mp-weixin/config/site.config.js +++ b/unpackage/dist/dev/mp-weixin/config/site.config.js @@ -2,15 +2,13 @@ let obj = { H5_API: "", //h5代理 - WX_API: "http://192.168.1.106:8518/", + WX_API: "https://www.jakjgs.com/", //非代理地址 不要忘记加/ website: "http://192.168.1.37", - httpPrefix: "app-api/", - imgUrl: "http://47.96.82.242/htmls/", - // 支付测试地址 - // preUrl: 'https://u8wbs.zyebank.cn/cem_ysb_u6/index.html', - // const preUrl = 'https://u8wbs.zyebank.cn/cem_ysb_u8/index.html' - // 生产地址 - preUrl: "https://zmcht.zybank.com.cn/cem_ysb/index.html" + // httpPrefix: 'app-api/', + httpPrefix: "xjapplet-api/", + imgUrl: "https://www.jakjgs.com/htmls/", + tmplIds: ["OH_1gceM-m3EXRKOtjl_Hb1ymyC5zw8_Ag6LaFXV4Do", "AjD_oLafmKGO8X3YvDGl1qmITq_Q6bSFMDeygJNAIes"] + //消息模板 }; exports.obj = obj; diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.js b/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.js index 81b085b..6eba44e 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.js @@ -1,9 +1,11 @@ "use strict"; const common_vendor = require("../../../common/vendor.js"); const common_assets = require("../../../common/assets.js"); +const utils_utils = require("../../../utils/utils.js"); const mp_ecard_sdk_main = require("../../../mp_ecard_sdk/main.js"); const config_api = require("../../../config/api.js"); const store_index = require("../../../store/index.js"); +require("../../../config/site.config.js"); require("../../../mp_ecard_sdk/utils/validate.js"); require("../../../mp_ecard_sdk/constants/log.js"); require("../../../mp_ecard_sdk/globalConfig.js"); @@ -218,6 +220,26 @@ const _sfc_main = { } }); } + function chooseImages() { + common_vendor.index.chooseImage({ + count: 1, + //允许选择的数量 + sizeType: ["original", "compressed"], + //可以指定是原图还是压缩图,默认二者都有 + sourceType: ["album", "camera"], + //从相册选择 + success: async (res) => { + common_vendor.index.showLoading({ + title: "图片上传中..." + }); + console.log(res); + console.log("图片信息"); + const imgLink = await utils_utils.uploadImgApi(res.tempFilePaths[0], "roomCertificateImg"); + console.log(imgLink); + counterStore.upDateHouse("roomCertificateImg", imgLink); + } + }); + } return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.unref(proressWith), @@ -234,24 +256,31 @@ const _sfc_main = { color: "#CCCCCC" }), h: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/authentication/comp/select1")), - i: common_vendor.o(($event) => nextStep(1)), - j: common_vendor.p({ + i: common_vendor.unref(counterStore).chooseHouse.roomCertificateImg + }, common_vendor.unref(counterStore).chooseHouse.roomCertificateImg ? { + j: common_vendor.unref(counterStore).chooseHouse.roomCertificateImg + } : { + k: common_assets._imports_0$2 + }, { + l: common_vendor.o(chooseImages), + m: common_vendor.o(($event) => nextStep(1)), + n: common_vendor.p({ text: "下一步", - disabled: !common_vendor.unref(counterStore).chooseHouse.houseId + disabled: !common_vendor.unref(counterStore).chooseHouse.houseId || !common_vendor.unref(counterStore).chooseHouse.roomCertificateImg }) }) : {}, { - k: currentStep.value == 1 + o: currentStep.value == 1 }, currentStep.value == 1 ? { - l: common_vendor.o(($event) => nextStep(2)), - m: common_vendor.p({ + p: common_vendor.o(($event) => nextStep(2)), + q: common_vendor.p({ text: "点击开始实名认证" }) } : {}, { - n: currentStep.value == 2 + r: currentStep.value == 2 }, currentStep.value == 2 ? { - o: common_assets._imports_0$2, - p: common_vendor.o(($event) => nextStep(3)), - q: common_vendor.p({ + s: common_assets._imports_1, + t: common_vendor.o(($event) => nextStep(3)), + v: common_vendor.p({ text: "返回首页" }) } : {}); diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxml index d098f40..96d3a3f 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxml @@ -1 +1 @@ -01房屋信息102个人资料03认证成功请选择您的房屋地址房屋信息详细地址{{f}}请选择认证成功 \ No newline at end of file +01房屋信息102个人资料03认证成功请选择您的房屋地址房屋信息详细地址{{f}}请选择房屋所有权证照片认证成功 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxss b/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxss index 557e04e..b6b48c4 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/authentication/authentication.wxss @@ -52,6 +52,20 @@ image.data-v-0ab17929 { color: #DE3A26; margin-right: 6rpx; } +.content .step1 .ownership.data-v-0ab17929 { + padding: 30rpx 0 10rpx 0; +} +.content .step1 .ownership .photo.data-v-0ab17929 { + width: 392rpx; + height: 252rpx; + margin: 0 auto; +} +.content .step1 .ownership .txt.data-v-0ab17929 { + font-size: 28rpx; + color: #999; + text-align: center; + margin-top: 20rpx; +} .content .step3.data-v-0ab17929 { padding: 40rpx 0; display: flex; diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.js b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.js index 3140f9e..3ab1854 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.js @@ -159,6 +159,21 @@ const _sfc_main = { params.value.voteState = item.id; initList(); } + function goVote(item) { + let url = ""; + if (currentTab.value == 1 || item.voted == 1) { + url = "/pages/subPage/ballots/vote/voteReslut?voteId=" + item.voteId; + } else if (item.voteStatus == 0) { + return false; + } else if (item.voteStatus == 1) { + url = "/pages/subPage/ballots/vote/vote?voteId=" + item.voteId; + } else if (item.voteStatus == 2) { + url = "/pages/subPage/ballots/vote/voteReslut?voteId=" + item.voteId; + } + common_vendor.index.navigateTo({ + url + }); + } let voteList = common_vendor.ref([]); let total = common_vendor.ref(0); let params = common_vendor.ref({ @@ -184,7 +199,6 @@ const _sfc_main = { status.value = "nomore"; console.log(voteList.value); } - votePageFn(); async function initList() { params.value.pageNo = 1; voteList.value = []; @@ -195,6 +209,9 @@ const _sfc_main = { await initList(); common_vendor.index.stopPullDownRefresh(); }); + common_vendor.onShow(() => { + initList(); + }); common_vendor.onReachBottom(() => { if (total.value > voteList.value.length) { votePageFn(); @@ -221,19 +238,14 @@ const _sfc_main = { return common_vendor.e({ a: common_vendor.t(item.title), b: currentTab.value == 1 || item.voted == 1 - }, currentTab.value == 1 || item.voted == 1 ? { - c: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/ballots/vote/voteReslut?voteId=" + item.voteId), index) - } : item.voteStatus == 0 ? {} : item.voteStatus == 1 ? { - f: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/ballots/vote/vote?voteId=" + item.voteId), index) - } : item.voteStatus == 2 ? { - h: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/ballots/vote/voteReslut?voteId=" + item.voteId), index) - } : {}, { - d: item.voteStatus == 0, - e: item.voteStatus == 1, - g: item.voteStatus == 2, - i: common_vendor.t(item.makerName), - j: common_vendor.t(item.endTime), - k: index + }, currentTab.value == 1 || item.voted == 1 ? {} : item.voteStatus == 0 ? {} : item.voteStatus == 1 ? {} : item.voteStatus == 2 ? {} : {}, { + c: item.voteStatus == 0, + d: item.voteStatus == 1, + e: item.voteStatus == 2, + f: common_vendor.t(item.makerName), + g: common_vendor.t(item.endTime), + h: index, + i: common_vendor.o(($event) => goVote(item), index) }); }), f: common_vendor.unref(voteList).length > 30 diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.wxml index 754a7cd..bf8a601 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/ballotsList/ballotsList.wxml @@ -1 +1 @@ -{{item.a}}{{item.a}}查看结果未开始我要投票已结束发起人:{{item.i}}截止时间:{{item.j}}暂无投票信息~ \ No newline at end of file +{{item.a}}{{item.a}}查看结果未开始我要投票已结束发起人:{{item.f}}截止时间:{{item.g}}暂无投票信息~ \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.js b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.js index a9f7079..044eddd 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.js @@ -2,11 +2,13 @@ const common_vendor = require("../../../../../common/vendor.js"); if (!Array) { const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar"); - _easycom_up_navbar2(); + const _easycom_u_parse2 = common_vendor.resolveComponent("u-parse"); + (_easycom_up_navbar2 + _easycom_u_parse2)(); } const _easycom_up_navbar = () => "../../../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js"; +const _easycom_u_parse = () => "../../../../../uni_modules/uview-plus/components/u-parse/u-parse.js"; if (!Math) { - _easycom_up_navbar(); + (_easycom_up_navbar + _easycom_u_parse)(); } const _sfc_main = { __name: "topInfo", @@ -17,6 +19,11 @@ const _sfc_main = { } }, setup(__props) { + let style = { + // p: 'font-size:32rpx', + // span: 'font-size: 30rpx', + img: "max-width: 100%" + }; return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.p({ @@ -35,7 +42,10 @@ const _sfc_main = { }, __props.detailInfo.voteStatus == 1 ? {} : {}, { h: __props.detailInfo.voteStatus == 2 }, __props.detailInfo.voteStatus == 2 ? {} : {}, { - i: common_vendor.t(__props.detailInfo.detail), + i: common_vendor.p({ + content: __props.detailInfo.detail, + tagStyle: common_vendor.unref(style) + }), j: common_vendor.t(__props.detailInfo.voteType == 1 ? "单选" : "多选"), k: common_vendor.t(__props.detailInfo.userHiddenType ? "实名" : "匿名") }); diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.json b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.json index e84d129..7766e17 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.json +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.json @@ -1,6 +1,7 @@ { "component": true, "usingComponents": { - "up-navbar": "../../../../../uni_modules/uview-plus/components/u-navbar/u-navbar" + "up-navbar": "../../../../../uni_modules/uview-plus/components/u-navbar/u-navbar", + "u-parse": "../../../../../uni_modules/uview-plus/components/u-parse/u-parse" } } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.wxml index 3fa251b..36b76fa 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/comp/topInfo.wxml @@ -1 +1 @@ -{{b}}发起人:{{c}}创建时间:{{d}}截止时间:{{e}}未开始我要投票已结束{{i}}{{j}}{{k}} \ No newline at end of file +{{b}}发起人:{{c}}创建时间:{{d}}截止时间:{{e}}未开始我要投票已结束{{j}}{{k}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/vote.js b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/vote.js index 083dc0f..3c7c9b9 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/vote.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/vote.js @@ -141,12 +141,12 @@ const _sfc_main = { const voteItemId = common_vendor.ref([]); function chooseItem(item) { if (detailInfo.value.voteType == 1) { - voteItemId.value = [{ voteItemId: item.itemId, voteId: voteId * 1 }]; + voteItemId.value = [{ voteItemId: item.itemId, voteId }]; return; } let index = voteItemId.value.findIndex((val) => val.voteItemId == item.itemId); if (index == -1) { - voteItemId.value.push({ voteItemId: item.itemId, voteId: voteId * 1 }); + voteItemId.value.push({ voteItemId: item.itemId, voteId }); } else { voteItemId.value.splice(index, 1); } @@ -160,7 +160,7 @@ const _sfc_main = { common_vendor.index.$u.toast("投票成功"); setTimeout(() => { common_vendor.index.navigateTo({ - url: "/pages/subPage/ballots/vote/voteReslut" + url: "/pages/subPage/ballots/vote/voteReslut?voteId=" + voteId }); }, 1500); } diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.js b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.js index 9db4b87..0c41a47 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.js @@ -147,7 +147,8 @@ const _sfc_main = { common_vendor.index.stopPullDownRefresh(); }); return (_ctx, _cache) => { - return { + var _a, _b; + return common_vendor.e({ a: common_vendor.p({ detailInfo: detailInfo.value }), @@ -169,8 +170,9 @@ const _sfc_main = { h: index, i: item.voted ? 1 : "" }); - }) - }; + }), + c: !((_a = detailInfo.value.voteResults) == null ? void 0 : _a.length) + }, !((_b = detailInfo.value.voteResults) == null ? void 0 : _b.length) ? {} : {}); }; } }; diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxml index 09775b5..add24a8 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxml @@ -1 +1 @@ -{{item.e}}{{item.f}} ( {{item.g}} ) \ No newline at end of file +{{item.e}}{{item.f}} ( {{item.g}} )暂无人员参与投票~ \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxss b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxss index 376ceaa..b0a532b 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/ballots/vote/voteReslut.wxss @@ -23,6 +23,13 @@ /* 垂直间距 */ /* 透明度 */ /* 文章场景相关 */ +.novote.data-v-9c438604 { + font-size: 28rpx; + color: #9C9C9C; + width: 100%; + text-align: center; + line-height: 60rpx; +} .content.data-v-9c438604 { width: 100%; } diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.js b/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.js index 04ca128..3ea6808 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.js @@ -160,6 +160,7 @@ const _sfc_main = { fail: (err) => { reject(null); console.error("微信登录失败", err); + common_vendor.index.hideLoading(); } }); }); @@ -168,6 +169,9 @@ const _sfc_main = { if (!isCheck.value) return uni_modules_uviewPlus_libs_function_index.toast("请勾选产品协议与隐私政策"); let phoneCode = e.detail.code; + common_vendor.index.showLoading({ + title: "正在加载..." + }); console.log(e.detail.errMsg); console.log(e.detail); const loginCode = await loginFn(); @@ -183,12 +187,13 @@ const _sfc_main = { const counterStore = store_index.userStore(); await counterStore.upDateToken(res.accessToken); await counterStore.upDateLoginInfo(res); + common_vendor.index.hideLoading(); common_vendor.index.$u.toast("登录成功"); setTimeout(() => { common_vendor.index.switchTab({ url: "/pages/tabbar/index/index" }); - }, 2e3); + }, 1500); } return (_ctx, _cache) => { return common_vendor.e({ @@ -197,12 +202,12 @@ const _sfc_main = { }, !common_vendor.unref(isCheck) ? { c: common_vendor.o(handleBtnClick), d: common_vendor.p({ - text: "微信一键登录" + text: "手机号快捷登录" }) } : { e: common_vendor.o(getPhoneNumber), f: common_vendor.p({ - text: "微信一键登录" + text: "手机号快捷登录" }) }, { g: common_vendor.o(changeRadio), diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.wxml index d8767d8..84fe32b 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/login/login.wxml @@ -1 +1 @@ -事务通 \ No newline at end of file +事务通 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.js b/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.js index 01725eb..c26c81f 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.js @@ -129,11 +129,6 @@ if (!Math) { const _sfc_main = { __name: "noticeDetail", setup(__props) { - let style = { - // p: 'font-size:32rpx', - // span: 'font-size: 30rpx', - img: "max-width: 100%" - }; let articleId = ""; const info = common_vendor.ref(""); async function getNoticeDetailFn() { @@ -149,13 +144,16 @@ const _sfc_main = { common_vendor.index.stopPullDownRefresh(); }); return (_ctx, _cache) => { - return { + return common_vendor.e({ a: common_vendor.t(info.value.title), b: common_vendor.p({ content: info.value.content, - tagStyle: common_vendor.unref(style) - }) - }; + tagStyle: _ctx.style + }), + c: info.value.timeDesc + }, info.value.timeDesc ? { + d: common_vendor.t(info.value.timeDesc) + } : {}); }; } }; diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxml index 31b28fd..c68a368 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxml @@ -1 +1 @@ -{{a}} \ No newline at end of file +{{a}}创建时间: {{d}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxss b/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxss index 429911a..2f12bcf 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/notice/noticeDetail.wxss @@ -27,4 +27,11 @@ font-size: 32rpx; font-weight: 700; padding: 20rpx 0; + text-align: center; +} +.timeDesc.data-v-ae16cb0d { + text-align: right; + font-size: 28rpx; + color: #999; + padding: 30px 0; } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.js b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.js new file mode 100644 index 0000000..06ef8aa --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.js @@ -0,0 +1,8 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = {}; +function _sfc_render(_ctx, _cache) { + return {}; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/work/xinjiangMiniProgram/pages/subPage/privacyAgreement/comp/yhxy.vue"]]); +wx.createComponent(Component); diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.json b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.wxml new file mode 100644 index 0000000..e56acd3 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.wxml @@ -0,0 +1 @@ +《用户协议》一、总则(一)欢迎您使用首府公馆事务通小程序(以下简称“本小程序”)。本小程序由杭州钧安科技有限公司(以下简称“我们”或“本公司”)开发和运营。(二)本用户协议(以下简称“协议”)构成您与我们之间关于使用本小程序的具有法律约束力的协议。在使用本小程序之前,请您仔细阅读本协议。如果您不同意本协议的任何条款,请勿使用本小程序。(三)我们有权根据法律法规、政策以及业务运营的需要,不时修订本协议。修订后的协议将在本小程序上公布,您继续使用本小程序即视为您同意接受修订后的协议。二、服务内容(一)本小程序为您提供与首府公馆相关的事务处理服务,包括但不限于信息查询、业务办理、通知推送等。(二)我们将尽力维护本小程序的正常运行,但不保证本小程序的服务不会中断、不会出现错误或缺陷,也不保证本小程序提供的信息的准确性、完整性和及时性。三、用户注册与账户(一)您在使用本小程序的某些功能时,可能需要注册一个账户。在注册过程中,您需要提供真实、准确、完整的个人信息。(二)您应妥善保管您的账户信息,并对通过您的账户进行的所有活动负责。如果您发现您的账户存在任何安全问题,请立即通知我们。四、用户行为规范(一)您在使用本小程序时,应遵守法律法规、社会公德和本协议的规定,不得从事以下行为: 1.发布、传播违法、违规、有害、淫秽、暴力、恐怖、侵犯他人合法权益或违背公序良俗的信息; 2.干扰、破坏本小程序的正常运行,或者对本小程序的系统、数据进行非法访问、修改、删除等操作; 3.利用本小程序从事欺诈、虚假宣传、传销等违法活动; 4.以任何方式侵犯我们或第三方的知识产权、商业秘密等合法权益。 如果您违反本协议的规定,我们有权采取包括但不限于暂停或终止您的账户、删除您发布的信息、限制您使用本小程序的部分或全部功能等措施,并保留追究您法律责任的权利。五、知识产权(一)本小程序的所有内容,包括但不限于文字、图片、音频、视频、软件等,均受知识产权法律法规的保护。未经我们的书面许可,您不得擅自复制、传播、修改、改编、翻译、出租、出售或以其他方式使用本小程序的内容。(二)您在本小程序上发布的内容,您应保证其拥有合法的知识产权,并且您授予我们在全球范围内免费、非独家、可再许可的权利,以使用、复制、传播、修改、改编、翻译、展示您发布的内容。六、隐私政策(一)我们重视您的隐私,并制定了专门的隐私政策,详细说明了我们如何收集、使用、存储和保护您的个人信息。请您仔细阅读我们的隐私政策。七、免责声明(一)对于因不可抗力、系统故障、网络中断、黑客攻击等不可预见、不可避免、不可克服的原因导致的服务中断、数据丢失等情况,我们不承担任何责任。(二)对于您因使用本小程序而产生的任何直接、间接、偶然、特殊或后果性的损失,包括但不限于利润损失、业务中断、数据丢失等,我们不承担任何责任,除非法律法规另有明确规定。八、协议的终止(一)您有权随时终止使用本小程序。 (二)我们有权在以下情况下终止本协议并暂停或终止您对本小程序的使用: 1.您违反本协议的任何规定;2.我们认为您的行为可能对我们、其他用户或第三方造成损害;3.法律法规要求我们终止本协议。九、法律适用与争议解决(一)本协议受中华人民共和国法律的管辖。(二)如双方就本协议的内容或履行发生争议,应首先通过友好协商解决;协商不成的,任何一方均有权向本公司所在地有管辖权的人民法院提起诉讼。 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.wxss b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.wxss new file mode 100644 index 0000000..f72cfad --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yhxy.wxss @@ -0,0 +1,26 @@ + +.box { + padding-bottom: 40rpx; +} +.h3 { + font-size: 40rpx; + padding-top: 30rpx; + width: 100%; + text-align: center; + font-weight: 700; +} +.h2 { + font-size: 30rpx; + margin: 40rpx 0 8rpx 0; + font-weight: 700; +} +.p { + font-size: 28rpx; + margin-left: 12px; +} +.txt { + margin-left: 32rpx; + font-size: 26rpx; + margin-bottom: 10rpx; +} + diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.js b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.js new file mode 100644 index 0000000..4735106 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.js @@ -0,0 +1,8 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = {}; +function _sfc_render(_ctx, _cache) { + return {}; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/work/xinjiangMiniProgram/pages/subPage/privacyAgreement/comp/yszc.vue"]]); +wx.createComponent(Component); diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.json b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.wxml new file mode 100644 index 0000000..65e3383 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.wxml @@ -0,0 +1 @@ +《隐私政策》一、 引言杭州钧安科技有限公司(以下简称“我们”)非常重视用户的隐私和个人信息保护。本隐私政策旨在向您说明我们在您使用首府公馆事务通小程序(以下简称“本小程序”)时如何收集、使用、存储和保护您的个人信息。二、 个人信息的定义个人信息是指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息。三、个人信息的收集(一) 我们可能会在以下情况下收集您的个人信息:1. 您注册或登录本小程序时,我们可能会收集您的手机号码、用户名、密码等信息;2. 您使用本小程序的服务时,我们可能会收集您的操作记录、浏览记录、交易记录等信息;3. 您与我们进行沟通或反馈时,我们可能会收集您的姓名、联系方式、反馈内容等信息。(一) 我们可能会通过以下方式收集您的个人信息:1. 您直接向我们提供的信息;2. 我们在您使用本小程序时自动收集的信息;3. 我们从第三方获取的信息四、个人信息的使用(一) 我们会将收集到的您的个人信息用于以下目的:1. 为您提供本小程序的服务;2. 改善本小程序的服务质量和用户体验;3. 进行数据分析和统计;4. 与您进行沟通和联系;5. 遵守法律法规和政策的要求。6. 我们不会将您的个人信息用于其他未经您同意的目的。五、个人信息的存储(一) 我们会将您的个人信息存储在安全的服务器上,并采取合理的安全措施来保护您的个人信息。(二) 我们会根据法律法规的要求和业务运营的需要,确定个人信息的存储期限。在存储期限届满后,我们会对您的个人信息进行删除或匿名化处理。六、个人信息的共享、转让和公开披露(一) 我们不会将您的个人信息共享、转让给任何第三方,除非经过您的明确同意或法律法规另有规定。(二) 我们不会公开披露您的个人信息,除非经过您的明确同意或法律法规另有规定。七、用户权利(一) 您有权访问、更正、删除您的个人信息。(二) 您有权撤回您对个人信息处理的同意。(三) 您有权要求我们限制对您个人信息的处理。(四) 您有权要求我们提供您的个人信息副本。八、未成年人的个人信息保护我们非常重视未成年人的个人信息保护。如果您是未满 18 周岁的未成年人,请在您的监护人的陪同下阅读本隐私政策,并在您的监护人同意的情况下使用本小程序。九、隐私政策的变更我们可能会不时修订本隐私政策。修订后的隐私政策将在本小程序上公布,您继续使用本小程序即视为您同意接受修订后的隐私政策。十、联系我们如果您对本隐私政策有任何疑问、意见或建议,请通过以下方式联系我们联系电话:0571--56606030 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.wxss b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.wxss new file mode 100644 index 0000000..f72cfad --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/comp/yszc.wxss @@ -0,0 +1,26 @@ + +.box { + padding-bottom: 40rpx; +} +.h3 { + font-size: 40rpx; + padding-top: 30rpx; + width: 100%; + text-align: center; + font-weight: 700; +} +.h2 { + font-size: 30rpx; + margin: 40rpx 0 8rpx 0; + font-weight: 700; +} +.p { + font-size: 28rpx; + margin-left: 12px; +} +.txt { + margin-left: 32rpx; + font-size: 26rpx; + margin-bottom: 10rpx; +} + diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.js b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.js index 3aed783..fb6aa19 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.js +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.js @@ -1,39 +1,35 @@ "use strict"; const common_vendor = require("../../../common/vendor.js"); +if (!Math) { + (yszc + yhxy)(); +} +const yhxy = () => "./comp/yhxy.js"; +const yszc = () => "./comp/yszc.js"; const _sfc_main = { - data() { - return { - type: 1, - url: "" - }; - }, - onLoad(options) { - this.type = options.type; - if (this.type == 1) { - common_vendor.index.setNavigationBarTitle({ - title: "隐私政策" - }); - } else { - common_vendor.index.setNavigationBarTitle({ - title: "用户使用协议" - }); - } - this.getAgreementFn(); - }, - methods: { - async getAgreementFn() { - if (this.type == 1) { - this.url = "http://www.jakjgs.com/htmls/yszc.html"; + __name: "privacyAgreement", + setup(__props) { + let type = common_vendor.ref(1); + let url = common_vendor.ref(""); + common_vendor.onLoad((options) => { + type.value = options.type; + if (type.value == 1) { + common_vendor.index.setNavigationBarTitle({ + title: "隐私政策" + }); + url.value = "https://www.jakjgs.com/htmls/yszc.html"; } else { - this.url = "http://www.jakjgs.com/htmls/yhxy.html"; + common_vendor.index.setNavigationBarTitle({ + title: "用户使用协议" + }); + url.value = "https://www.jakjgs.com/htmls/yhxy.html"; } - } + }); + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.unref(type) == 1 + }, common_vendor.unref(type) == 1 ? {} : {}); + }; } }; -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return { - a: $data.url - }; -} -const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/work/xinjiangMiniProgram/pages/subPage/privacyAgreement/privacyAgreement.vue"]]); +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/work/xinjiangMiniProgram/pages/subPage/privacyAgreement/privacyAgreement.vue"]]); wx.createPage(MiniProgramPage); diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.json b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.json index 8481469..5795b55 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.json +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.json @@ -2,5 +2,8 @@ "navigationBarTitleText": "用户协议", "enablePullDownRefresh": false, "backgroundTextStyle": "dark", - "usingComponents": {} + "usingComponents": { + "yhxy": "./comp/yhxy", + "yszc": "./comp/yszc" + } } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.wxml b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.wxml index a1e61ef..33f7189 100644 --- a/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/subPage/privacyAgreement/privacyAgreement.wxml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.js b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.js index 73551a9..ec80128 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.js +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.js @@ -1,19 +1,202 @@ "use strict"; const common_vendor = require("../../../../common/vendor.js"); +const store_index = require("../../../../store/index.js"); +const config_api = require("../../../../config/api.js"); +require("../../../../uni_modules/uview-plus/index.js"); +require("../../../../uni_modules/uview-plus/libs/mixin/mixin.js"); +require("../../../../uni_modules/uview-plus/libs/vue.js"); +require("../../../../uni_modules/uview-plus/libs/function/index.js"); +require("../../../../uni_modules/uview-plus/libs/function/test.js"); +require("../../../../uni_modules/uview-plus/libs/function/digit.js"); +require("../../../../uni_modules/uview-plus/libs/config/config.js"); +require("../../../../uni_modules/uview-plus/libs/util/route.js"); +require("../../../../uni_modules/uview-plus/libs/mixin/mpMixin.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/Request.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/dispatchRequest.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/adapters/index.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/helpers/buildURL.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/utils.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/buildFullPath.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/helpers/isAbsoluteURL.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/helpers/combineURLs.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/settle.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/InterceptorManager.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/mergeConfig.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/core/defaults.js"); +require("../../../../uni_modules/uview-plus/libs/luch-request/utils/clone.js"); +require("../../../../uni_modules/uview-plus/libs/function/colorGradient.js"); +require("../../../../uni_modules/uview-plus/libs/function/debounce.js"); +require("../../../../uni_modules/uview-plus/libs/function/throttle.js"); +require("../../../../uni_modules/uview-plus/libs/config/props.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/actionSheet.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/album.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/alert.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/avatar.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/avatarGroup.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/backtop.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/badge.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/button.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/calendar.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/carKeyboard.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/cell.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/cellGroup.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/checkbox.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/checkboxGroup.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/circleProgress.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/code.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/codeInput.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/col.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/collapse.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/collapseItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/columnNotice.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/countDown.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/countTo.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/datetimePicker.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/divider.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/empty.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/form.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/formItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/gap.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/grid.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/gridItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/icon.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/image.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/indexAnchor.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/indexList.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/input.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/keyboard.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/line.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/lineProgress.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/link.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/list.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/listItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/loadingIcon.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/loadingPage.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/loadmore.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/modal.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/navbar.js"); +require("../../../../uni_modules/uview-plus/libs/config/color.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/noNetwork.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/noticeBar.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/notify.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/numberBox.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/numberKeyboard.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/overlay.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/parse.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/picker.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/popup.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/radio.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/radioGroup.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/rate.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/readMore.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/row.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/rowNotice.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/scrollList.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/search.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/section.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/skeleton.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/slider.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/statusBar.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/steps.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/stepsItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/sticky.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/subsection.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/swipeAction.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/swipeActionItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/swiper.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/swipterIndicator.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/switch.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/tabbar.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/tabbarItem.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/tabs.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/tag.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/text.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/textarea.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/toast.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/toolbar.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/tooltip.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/transition.js"); +require("../../../../uni_modules/uview-plus/libs/config/props/upload.js"); +require("../../../../uni_modules/uview-plus/libs/config/zIndex.js"); +require("../../../../uni_modules/uview-plus/libs/function/platform.js"); +if (!Array) { + const _easycom_oneBtn2 = common_vendor.resolveComponent("oneBtn"); + const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup"); + (_easycom_oneBtn2 + _easycom_up_popup2)(); +} +const _easycom_oneBtn = () => "../../../../components/oneBtn/oneBtn.js"; +const _easycom_up_popup = () => "../../../../uni_modules/uview-plus/components/u-popup/u-popup.js"; +if (!Math) { + (_easycom_oneBtn + _easycom_up_popup)(); +} const _sfc_main = { - props: ["list"] -}; -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return { - a: common_vendor.f($props.list, (item, index, i0) => { + __name: "notice", + props: { + list: { + type: Array, + default: [] + } + }, + setup(__props) { + const counterStore = store_index.userStore(); + const showPop = common_vendor.ref(false); + function goDetail(item) { + if (!counterStore.userInfo.myHouse) { + getHousesFn(); + } + common_vendor.index.navigateTo({ + url: "/pages/subPage/notice/noticeDetail?id=" + item.id + }); + } + function oneBtnClickFn() { + showPop.value = false; + common_vendor.index.navigateTo({ + url: "/pages/subPage/authentication/authentication" + }); + } + async function getHousesFn() { + if (!counterStore.token) { + common_vendor.index.navigateTo({ + url: "/pages/subPage/login/login" + }); + return; + } + const { + data: res + } = await config_api.getHouses(); + if (!res.length) { + return showPop.value = true; + } + counterStore.upDateUseInfo("myHouse", res); + } + return (_ctx, _cache) => { return { - a: common_vendor.t(item.title), - b: item.picture, - c: index, - d: common_vendor.o(($event) => _ctx.$goPage("pages/subPage/notice/noticeDetail?id=" + item.id), index) + a: common_vendor.f(__props.list, (item, index, i0) => { + return { + a: common_vendor.t(item.title), + b: common_vendor.t(item.timeDesc), + c: item.picture, + d: index, + e: common_vendor.o(($event) => goDetail(item), index) + }; + }), + b: common_vendor.o(oneBtnClickFn), + c: common_vendor.p({ + text: "点击认证业主" + }), + d: common_vendor.o(($event) => showPop.value = false), + e: common_vendor.p({ + show: showPop.value, + mode: "center", + round: 10, + customStyle: { + width: "90%" + }, + closeable: true + }) }; - }) - }; -} -const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-95913b5f"], ["__file", "D:/work/xinjiangMiniProgram/pages/tabbar/index/comp/notice.vue"]]); + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-95913b5f"], ["__file", "D:/work/xinjiangMiniProgram/pages/tabbar/index/comp/notice.vue"]]); wx.createComponent(Component); diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.json b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.json index e8cfaaf..fa0e53e 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.json +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.json @@ -1,4 +1,7 @@ { "component": true, - "usingComponents": {} + "usingComponents": { + "one-btn": "../../../../components/oneBtn/oneBtn", + "up-popup": "../../../../uni_modules/uview-plus/components/u-popup/u-popup" + } } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxml b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxml index b535fd7..8056f1f 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxml @@ -1 +1 @@ -{{item.a}}2024.06.28 18:42 \ No newline at end of file +{{item.a}}{{item.b}}你好: 欢迎来到 “新疆首府公馆”,为了更好的为您提供服务,请您选择房屋信息,进行业主身份认证。 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxss b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxss index 2aa8359..378402e 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/comp/notice.wxss @@ -60,4 +60,19 @@ display: block; width: 100%; height: 100%; +} +.popCon.data-v-95913b5f { + padding: 60rpx 40rpx; + color: #333; +} +.popCon .hello.data-v-95913b5f { + font-size: 36rpx; + font-weight: 700; +} +.popCon .p.data-v-95913b5f { + font-size: 28rpx; + padding: 30rpx 0 60rpx 0; +} +.popCon .p text.data-v-95913b5f { + color: #DE3A26; } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.js b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.js index da7d838..1cb0107 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.js @@ -139,47 +139,71 @@ const notice = () => "./comp/notice.js"; const _sfc_main = { __name: "index", setup(__props) { - const { imgUrl } = config_site_config.obj; + const { + imgUrl, + tmplIds + } = config_site_config.obj; const counterStore = store_index.userStore(); console.log(counterStore.token); const show = common_vendor.ref(false); - function authentication() { - show.value = false; - common_vendor.index.$u.route({ - url: "/pages/subPage/authentication/authentication" - }); - } let params = common_vendor.ref({ pageNo: 1, pageSize: 20 }); let noticeList = common_vendor.ref([]); async function getNoticeListFn() { - const { data: res } = await config_api.getNoticeList(params); + const { + data: res + } = await config_api.getNoticeList(params); noticeList.value = res.list; } const myHouse = common_vendor.ref([]); async function getHousesFn() { if (!counterStore.token) return true; - const { data: res } = await config_api.getHouses(); + const { + data: res + } = await config_api.getHouses(); + if (!res.length) { + show.value = true; + return; + } myHouse.value = res; - counterStore.upDateUseInfo("name", res.userName); + counterStore.upDateUseInfo("myHouse", res); } - function goHome(url) { - common_vendor.index.requestSubscribeMessage({ - tmplIds: ["OH_1gceM-m3EXRKOtjl_Hb1ymyC5zw8_Ag6LaFXV4Do", "AjD_oLafmKGO8X3YvDGl1qmITq_Q6bSFMDeygJNAIes"], - success(res) { - console.log("订阅成功: ", res); - }, - fail(err) { - console.log("订阅失败:", err); - } - }); + function goSever() { + if (!myHouse.value) + return; + goHome(); + } + async function goHome(url) { + if (show.value) + show.value = false; let token = counterStore.token; if (token) { - common_vendor.index.$u.route({ - url + const openId = counterStore.loginInfo.openId; + common_vendor.index.requestSubscribeMessage({ + tmplIds, + async success(res) { + let acceptArr = []; + tmplIds.forEach((item) => { + if (res[item] == "accept") { + acceptArr.push(item); + } + }); + console.log("订阅成功: ", acceptArr); + if (!acceptArr.length) + return; + await config_api.appletSubscribe({ openId, templateIds: acceptArr }); + }, + fail(err) { + console.log("订阅失败:", err); + }, + complete() { + common_vendor.index.$u.route({ + url + }); + } }); } else { common_vendor.index.$u.route({ @@ -227,13 +251,13 @@ const _sfc_main = { j: common_vendor.unref(imgUrl) + "homebanner3.png" } : {}, { k: common_vendor.unref(imgUrl) + "homebanner2.png", - l: common_vendor.o(($event) => goHome("/pages/subPage/ballots/ballotsList/ballotsList")), + l: common_vendor.o(($event) => goSever()), m: common_assets._imports_0, n: common_vendor.o(($event) => _ctx.$goPage("/pages/subPage/notice/notice")), o: common_vendor.p({ list: common_vendor.unref(noticeList) }), - p: common_vendor.o(authentication), + p: common_vendor.o(($event) => goHome("/pages/subPage/authentication/authentication")), q: common_vendor.p({ text: "点击认证业主" }), diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxml b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxml index c34c46c..1a22a7b 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxml @@ -1 +1 @@ -我的房屋关联房屋立即登录登录成功即可关联房屋~房屋地址:{{item.a}}房屋面积:{{item.b}}服务公示公告更多你好: 欢迎来到 “新疆首付公馆”,为了更好的为您提供服务,请您选择房屋信息,进行业主身份认证。 \ No newline at end of file +我的房屋关联房屋立即登录登录成功即可关联房屋~房屋地址:{{item.a}}房屋面积:{{item.b}}服务公示公告更多你好: 欢迎来到 “新疆首府公馆”,为了更好的为您提供服务,请您选择房屋信息,进行业主身份认证。 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxss b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxss index a1fadd5..53978f6 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxss +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/index/index.wxss @@ -52,7 +52,6 @@ image.data-v-184b8d5d { } .content .banner1.data-v-184b8d5d { width: 100%; - height: 260rpx; } .content .myhome.data-v-184b8d5d { width: 100%; @@ -61,6 +60,7 @@ image.data-v-184b8d5d { box-shadow: 0px 0px 14rpx 0px rgba(0, 0, 0, 0.06); border-radius: 20rpx; padding: 0 30rpx 0rpx 30rpx; + overflow: auto; } .content .myhome .flex-b.data-v-184b8d5d { width: 100%; @@ -86,7 +86,8 @@ image.data-v-184b8d5d { border-radius: 20rpx; border: 2rpx solid #EFEFEF; padding: 40rpx 20rpx 0rpx 30rpx; - margin-top: 30rpx; + margin-top: 15rpx; + margin-bottom: 30rpx; } .content .myhome .borderCard .text.data-v-184b8d5d { font-size: 28rpx; @@ -107,7 +108,6 @@ image.data-v-184b8d5d { } .content .severCon .banner2.data-v-184b8d5d { width: 100%; - height: 180rpx; } .content .noticeCon .h1pad .more.data-v-184b8d5d { display: flex; diff --git a/unpackage/dist/dev/mp-weixin/pages/tabbar/mine/mine.js b/unpackage/dist/dev/mp-weixin/pages/tabbar/mine/mine.js index ef66629..8787ba1 100644 --- a/unpackage/dist/dev/mp-weixin/pages/tabbar/mine/mine.js +++ b/unpackage/dist/dev/mp-weixin/pages/tabbar/mine/mine.js @@ -136,8 +136,8 @@ const _sfc_main = { const topBgUrl = imgUrl + "minebg.png"; const counterStore = store_index.userStore(); const configList = common_vendor.ref([ - { text: "用户协议", url: "/pages/subPage/privacyAgreement/privacyAgreement?type=1" }, - { text: "隐私政策", url: "/pages/subPage/privacyAgreement/privacyAgreement?type=2" } + { text: "用户协议", url: "/pages/subPage/privacyAgreement/privacyAgreement?type=2" }, + { text: "隐私政策", url: "/pages/subPage/privacyAgreement/privacyAgreement?type=1" } ]); function logOutFn() { common_vendor.index.showModal({ diff --git a/unpackage/dist/dev/mp-weixin/project.private.config.json b/unpackage/dist/dev/mp-weixin/project.private.config.json index 509f3ca..c9e7e6e 100644 --- a/unpackage/dist/dev/mp-weixin/project.private.config.json +++ b/unpackage/dist/dev/mp-weixin/project.private.config.json @@ -2,7 +2,8 @@ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "questionbankvue3", "setting": { - "compileHotReLoad": true + "compileHotReLoad": true, + "urlCheck": true }, - "libVersion": "3.5.0" + "libVersion": "3.5.1" } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner.png b/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner.png deleted file mode 100644 index c3cb375..0000000 Binary files a/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner.png and /dev/null differ diff --git a/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner2.png b/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner2.png deleted file mode 100644 index 4be30e5..0000000 Binary files a/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner2.png and /dev/null differ diff --git a/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner3.png b/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner3.png deleted file mode 100644 index faf7577..0000000 Binary files a/unpackage/dist/dev/mp-weixin/static/images/bigImg/homebanner3.png and /dev/null differ diff --git a/unpackage/dist/dev/mp-weixin/static/images/bigImg/minebg.png b/unpackage/dist/dev/mp-weixin/static/images/bigImg/minebg.png deleted file mode 100644 index 416dc08..0000000 Binary files a/unpackage/dist/dev/mp-weixin/static/images/bigImg/minebg.png and /dev/null differ diff --git a/unpackage/dist/dev/mp-weixin/static/images/phoneH.png b/unpackage/dist/dev/mp-weixin/static/images/phoneH.png new file mode 100644 index 0000000..03a43d9 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/images/phoneH.png differ diff --git a/unpackage/dist/dev/mp-weixin/store/index.js b/unpackage/dist/dev/mp-weixin/store/index.js index 8d7b217..ce65f03 100644 --- a/unpackage/dist/dev/mp-weixin/store/index.js +++ b/unpackage/dist/dev/mp-weixin/store/index.js @@ -8,7 +8,8 @@ const userStore = common_vendor.defineStore({ loginInfo: common_vendor.index.getStorageSync("loginInfo") ? common_vendor.index.getStorageSync("loginInfo") : {}, userInfo: { idCard: "", - name: "" + name: "", + myHouse: null }, chooseHouse: { "roomNum": "", @@ -42,13 +43,13 @@ const userStore = common_vendor.defineStore({ console.log(this.userInfo); }, goLogin() { + this.openid = ""; this.token = ""; this.loginInfo = {}; for (let key in this.loginInfo) { this.chooseHouse[key] = ""; } - common_vendor.index.setStorageSync("token", ""); - common_vendor.index.setStorageSync("loginInfo", ""); + common_vendor.index.clearStorage(); const pages = getCurrentPages(); const page = pages[pages.length - 1].$page.fullPath; let url = "/pages/subPage/login/login"; diff --git a/unpackage/dist/dev/mp-weixin/utils/utils.js b/unpackage/dist/dev/mp-weixin/utils/utils.js index f95a25b..ae7ef3f 100644 --- a/unpackage/dist/dev/mp-weixin/utils/utils.js +++ b/unpackage/dist/dev/mp-weixin/utils/utils.js @@ -1,5 +1,6 @@ "use strict"; const common_vendor = require("../common/vendor.js"); +const config_site_config = require("../config/site.config.js"); let goPage = (url, params = {}, type = "navigateTo") => { common_vendor.index.$u.route({ url, @@ -7,4 +8,43 @@ let goPage = (url, params = {}, type = "navigateTo") => { type }); }; +let { H5_API, WX_API, httpPrefix } = config_site_config.obj; +var _url = H5_API + WX_API + httpPrefix; +function uploadImgApi(filePath, imgName, imgLink = "image") { + console.log(filePath); + let token = "Bearer " + common_vendor.index.getStorageSync("token"); + let timer = new Date() * 1; + return new Promise((reslove, reject) => { + common_vendor.index.uploadFile({ + url: _url + "infra/file/upload", + //接口 + filePath, + //要上传的图片的本地路径 + name: "file", + // complain + formData: { + path: imgLink + "/" + common_vendor.index.$u.date(timer, "yyyy-mm-dd") + "/" + timer + "-" + imgName, + type: 1, + fileSuffix: "png" + }, + header: { + Authorization: token + // 'tenant-id': '1704459882232553474' + }, + success(res) { + console.log("上传成功??"); + console.log(res); + let res2 = JSON.parse(res.data); + reslove(res2.data); + }, + fail(error) { + return Promise.reject(error); + }, + complete: (err) => { + common_vendor.index.hideLoading(); + } + }); + }); +} exports.goPage = goPage; +exports.uploadImgApi = uploadImgApi; diff --git a/utils/utils.js b/utils/utils.js index 9f30b6a..7a7971f 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -1,8 +1,53 @@ +export let goPage = (url, params = {}, type = 'navigateTo') => { + uni.$u.route({ + url, + params, + type + }) +} -export let goPage = (url, params={}, type='navigateTo')=> { - uni.$u.route({ - url, - params, - type +import setObj from '@/config/site.config.js'; +let { H5_API, WX_API,httpPrefix } = setObj +var _url = H5_API+ WX_API + httpPrefix + + + +export function uploadImgApi(filePath, imgName, imgLink='image') { + console.log(filePath) + let token = 'Bearer '+ uni.getStorageSync('token') + let timer = new Date() * 1 + return new Promise((reslove, reject)=>{ + // 上传图片到服务器 + uni.uploadFile({ + url: _url + 'infra/file/upload',//接口 + filePath: filePath,//要上传的图片的本地路径 + name: 'file', + // complain + formData: { + path: imgLink+'/'+ uni.$u.date(timer, 'yyyy-mm-dd')+'/'+timer + '-'+ imgName, + type: 1, + fileSuffix: "png" + }, + header: { + Authorization: token, + // 'tenant-id': '1704459882232553474' + }, + success(res) { + console.log('上传成功??') + console.log(res) + let res2 = JSON.parse(res.data) + reslove(res2.data) + + }, + fail(error) { + return Promise.reject(error) + }, + complete: (err)=> { + uni.hideLoading(); + } + }) }) - } \ No newline at end of file + } + + +