diff --git a/App.vue b/App.vue index 0368041..d38a695 100644 --- a/App.vue +++ b/App.vue @@ -1,6 +1,4 @@ diff --git a/components/PrettyExchange/PrettyExchange.vue b/components/PrettyExchange/PrettyExchange.vue index 10e5feb..101cdec 100644 --- a/components/PrettyExchange/PrettyExchange.vue +++ b/components/PrettyExchange/PrettyExchange.vue @@ -1,480 +1,507 @@ diff --git a/components/Projects/ProjectItem.vue b/components/Projects/ProjectItem.vue index e6c5f03..5521e70 100644 --- a/components/Projects/ProjectItem.vue +++ b/components/Projects/ProjectItem.vue @@ -12,16 +12,16 @@ - {{ dayjs(item.startTime).format('MM-DD HH:mm') }} + {{ dayjs(+item.startTime).format('MM-DD HH:mm') }} 至 - {{ dayjs(item.endTime).format('MM-DD HH:mm') }} + {{ dayjs(+item.endTime).format('MM-DD HH:mm') }} - - + + @@ -63,7 +63,7 @@ diff --git a/components/Projects/Projects.vue b/components/Projects/Projects.vue index edd0c07..240b15b 100644 --- a/components/Projects/Projects.vue +++ b/components/Projects/Projects.vue @@ -4,7 +4,9 @@ - diff --git a/components/Reviewer/Reviewer.vue b/components/Reviewer/Reviewer.vue new file mode 100644 index 0000000..9335696 --- /dev/null +++ b/components/Reviewer/Reviewer.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/hooks/user/userMixin.js b/hooks/user/userMixin.js index 30e9b56..36e64da 100644 --- a/hooks/user/userMixin.js +++ b/hooks/user/userMixin.js @@ -1,6 +1,5 @@ import { ref, computed, reactive } from 'vue'; -import { useStore } from 'vuex'; -import { onReady } from '@dcloudio/uni-app'; +import { useStore } from 'vuex'; import clipboard from "@/common/js/dc-clipboard/clipboard.js"; import Config from '@/common/js/config.js' @@ -16,7 +15,7 @@ export default function userMixin() { { validator: (rule, value, callback) => { // 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html - return this.$u.test.mobile(value); + return uni.$u.test.mobile(value); }, message: '手机号码不正确', // 触发器可以同时用blur和change,二者之间用英文逗号隔开 @@ -88,12 +87,12 @@ export default function userMixin() { // const showPaste = ref(false); const dataObj = reactive({ showInterval: false, - interval: 120, + interval: 60, showPaste: false - }) + }); //有图片验证码的值 - function hasvalue(form) { + function hasvalue(form, renderData) { if(form.smsCode || form.showPaste) return if (!verifyPhone(form.phone)) { uni.$ui.showToast('请输入正确的手机号'); @@ -103,26 +102,29 @@ export default function userMixin() { uni.$ui.showToast('请输入图形验证码'); return; } - getCode(form); + + if (!dataObj.showInterval) { + getCode(form, renderData); + } } // 获取验证码 - async function getCode(form) { + async function getCode(form, renderData) { try { - if (!form.verificationCodeId || !form.verificationCodeValue) { + if (!renderData.verificationCodeId || !form.verificationCodeValue) { uni.$ui.showToast('缺少图形验证码参数'); return; } const params = { phone: form.phone, - verificationCodeId: form.verificationCodeId, + verificationCodeId: renderData.verificationCodeId, verificationCodeValue: form.verificationCodeValue, }; const date = await store.dispatch('user/sendCode', params); getCodeInterval(); dataObj.showPaste = true; } catch (err) { - getImageCode(); + dataObj.showPaste = false; throw err; } } @@ -135,7 +137,7 @@ export default function userMixin() { clearInterval(codeTimer.value); codeTimer.value = null; dataObj.showInterval = false; - dataObj.interval = 120; + dataObj.interval = 60; return; } dataObj.interval = dataObj.interval - 1; diff --git a/manifest.json b/manifest.json index 2c13e4f..46b8281 100644 --- a/manifest.json +++ b/manifest.json @@ -77,6 +77,9 @@ "spotlight@3x" : "unpackage/res/icons/120x120.png" } } + }, + "splashscreen" : { + "androidStyle" : "common" } } }, @@ -102,5 +105,8 @@ "uniStatistics" : { "enable" : false }, - "vueVersion" : "3" + "vueVersion" : "3", + "h5" : { + "title" : "时物链" + } } diff --git a/pages.json b/pages.json index feb8e1e..6671771 100644 --- a/pages.json +++ b/pages.json @@ -3,7 +3,8 @@ { "path": "pages/index/index", "style": { - "navigationBarText": "TALL" + "navigationBarText": "TALL", + "navigationStyle": "custom" } }, { @@ -28,8 +29,33 @@ "navigationStyle": "custom", "navigationBarTextStyle": "white" } + }, + // 注册 + { + "path": "pages/user/rigister", + "style": { + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + } + }, + // 用户协议 + { + "path": "pages/user/agreement", + "style": { + "navigationStyle": "custom", + "navigationBarTextStyle": "white" + } } - ], + ,{ + "path" : "pages/submitList/submitList", + "style" : + { + "navigationStyle": "historty", + "navigationBarTitleText": "历史交付物" + } + + } + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "TALL", diff --git a/pages/index/index.vue b/pages/index/index.vue index 9a39f2e..56d371a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,141 +1,148 @@ diff --git a/pages/submitlist/submitlist.vue b/pages/submitlist/submitlist.vue new file mode 100644 index 0000000..6ea8089 --- /dev/null +++ b/pages/submitlist/submitlist.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/pages/user/accountLogin.vue b/pages/user/accountLogin.vue index 4061af2..1453eaa 100644 --- a/pages/user/accountLogin.vue +++ b/pages/user/accountLogin.vue @@ -41,7 +41,7 @@ const store = useStore(); const mixinInit = userMixin(); const loginForm = ref(null); - + const form = reactive({ account: '', password: '' @@ -61,9 +61,15 @@ async function login() { uni.$ui.showLoading(); - try { + try { + // #ifdef H5 + const client = 0; + // #endif + // #ifdef APP-PLUS + const client = 1; + // #endif const params = reactive({ - client: 1, + client: client, data: { identifier: form.account, credential: form.password, @@ -75,10 +81,10 @@ store.commit('user/setToken', res.token); store.commit('user/setUser', res); uni.$storage.setStorageSync('anyringToken', res.token || ''); - uni.$storage.setStorageSync('user', JSON.stringify(res)); + uni.$storage.setStorageSync('user', JSON.stringify(res) || ''); uni.$ui.hideLoading(); - + uni.navigateTo({ url: '/pages/index/index' }); diff --git a/pages/user/agreement.vue b/pages/user/agreement.vue new file mode 100644 index 0000000..33ef0f9 --- /dev/null +++ b/pages/user/agreement.vue @@ -0,0 +1,18 @@ + + + + + diff --git a/pages/user/login.vue b/pages/user/login.vue index 2c904c5..c94d866 100644 --- a/pages/user/login.vue +++ b/pages/user/login.vue @@ -1,17 +1,17 @@ + + + diff --git a/plugins/p-deliver/p-deliver.vue b/plugins/p-deliver/p-deliver.vue index a005c2f..840661c 100644 --- a/plugins/p-deliver/p-deliver.vue +++ b/plugins/p-deliver/p-deliver.vue @@ -1,18 +1,198 @@ +// 判断提交按钮的状态 +const sbumitState = computed(() => !(iptValue.value && linkValue.value)); - diff --git a/plugins/p-task-title/p-task-title.vue b/plugins/p-task-title/p-task-title.vue index 53f259f..fce10df 100644 --- a/plugins/p-task-title/p-task-title.vue +++ b/plugins/p-task-title/p-task-title.vue @@ -1,5 +1,10 @@