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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
- 进行中
-
-
-
- {{ dayjs(+item.startTime).format('MM-DD HH:mm') }}
- 至
- {{ dayjs(+item.endTime).format('MM-DD HH:mm') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ subItem.name }}
-
-
- {{ subItem.status === 0 ? '未开始' : subItem.status === 1 ? '进行中' : subItem.status === 2 ? '暂停' : '已完成' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+ 进行中
+
+
+
+ {{ dayjs(+item.startTime).format('MM-DD HH:mm') }}
+ 至
+ {{ dayjs(+item.endTime).format('MM-DD HH:mm') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ subItem.name }}
+
+
+ {{ subItem.status === 0 ? '未开始' : subItem.status === 1 ? '进行中' : subItem.status === 2 ? '暂停' : '已完成' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
-
-
+
+
-
+
-
+
-
-
+
+
粘贴
{{ mixinInit.dataObj.interval }}
@@ -23,7 +23,7 @@
- 立即登录
+ 立即登录
@@ -43,56 +43,53 @@
+
+
+
+
+
+
+ 粘贴
+ {{ mixinInit.dataObj.interval }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 忘记密码
+
+
+
+
+ 立即注册
+
+
+
+
+
+
+ 已阅读并同意使用
+ 《时物链条用户协议》
+
+
+ 没有套路,真实需求
+
+
+
+
+ 已有账号,去登录
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+ {{ iptValue }}
+ 提交
+
+
+
+
+
+ {{ iptValue }}
+
+
+
+
+
+
+ 粘贴
+ 文件
+ 拍照
+
+
+
+
+
+
+
+
+
+ 交付物标题名称
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
- p-deliver
+ p-deliver
+// 判断提交按钮的状态
+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 @@
+
+
+ {{ task.name }}
+
+
{{ task.name }}
@@ -10,10 +15,10 @@ defineProps({ task: { type: Object, default: () => {} } });
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 0000000..64e86a9
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,69 @@
+{
+ "description": "项目配置文件",
+ "packOptions": {
+ "ignore": []
+ },
+ "setting": {
+ "bundle": false,
+ "userConfirmedBundleSwitch": false,
+ "urlCheck": true,
+ "scopeDataCheck": false,
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "compileHotReLoad": false,
+ "lazyloadPlaceholderEnable": false,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "autoAudits": false,
+ "newFeature": false,
+ "uglifyFileName": false,
+ "uploadWithSourceMap": true,
+ "useIsolateContext": true,
+ "nodeModules": false,
+ "enhance": true,
+ "useMultiFrameRuntime": true,
+ "useApiHook": true,
+ "useApiHostProcess": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmManually": false,
+ "enableEngineNative": false,
+ "packNpmRelationList": [],
+ "minifyWXSS": true,
+ "showES6CompileOption": false,
+ "minifyWXML": true
+ },
+ "compileType": "miniprogram",
+ "libVersion": "2.21.3",
+ "appid": "wx0d9aabee071e228e",
+ "projectname": "TALL",
+ "debugOptions": {
+ "hidedInDevtools": []
+ },
+ "scripts": {},
+ "staticServerOptions": {
+ "baseURL": "",
+ "servePath": ""
+ },
+ "isGameTourist": false,
+ "condition": {
+ "search": {
+ "list": []
+ },
+ "conversation": {
+ "list": []
+ },
+ "game": {
+ "list": []
+ },
+ "plugin": {
+ "list": []
+ },
+ "gamePlugin": {
+ "list": []
+ },
+ "miniprogram": {
+ "list": []
+ }
+ }
+}
\ No newline at end of file
diff --git a/store/socket/actions.js b/store/socket/actions.js
index c769bf3..708aed4 100644
--- a/store/socket/actions.js
+++ b/store/socket/actions.js
@@ -202,7 +202,7 @@ const actions = {
dispatch('sendHeart');
} else {
uni.$u.toast('消息系统认证失败, 请退出重新登录');
- uni.$t.removeStorageSync('anyringToken');
+ uni.$storage.removeStorageSync('anyringToken');
commit('setSocket', null);
}
},
diff --git a/store/user/actions.js b/store/user/actions.js
index 520ada6..52a1c24 100644
--- a/store/user/actions.js
+++ b/store/user/actions.js
@@ -10,7 +10,7 @@ const actions = {
commit('setToken', res.token);
commit('setUser', res);
uni.$storage.setStorageSync('anyringToken', res.token || '');
- uni.$storage.setStorageSync('user', JSON.stringify(res));
+ uni.$storage.setStorageSync('user', JSON.stringify(res) || '');
return res;
} catch (error) {
uni.$ui.showToast(error.msg || '获取个人信息失败');
diff --git a/utils/cacheAndRequest.js b/utils/cacheAndRequest.js
index cb0598a..b0938d4 100644
--- a/utils/cacheAndRequest.js
+++ b/utils/cacheAndRequest.js
@@ -22,6 +22,7 @@ export default {
*/
getProjects(startTime, endTime, fn) {
let remote = false;
+
if (store.getters.useStorage) {
// 有缓存 且 服务端数据未返回 就先返回缓存
uni.$cache
@@ -31,18 +32,29 @@ export default {
})
.catch(err => !remote && fn(err));
}
- waitTokenRequest(() => {
- // 拿到api数据后 再用api的数据
- uni.$u.api
- .getProjects(startTime, endTime)
- .then(data => {
- remote = true;
- fn(null, data);
- // 存api到cache里
- uni.$cache.putProjects(data);
- })
- .catch(err => fn(err));
- });
+
+ uni.$u.api
+ .getProjects(startTime, endTime)
+ .then(data => {
+ remote = true;
+ fn(null, data);
+ // 存api到cache里
+ uni.$cache.putProjects(data);
+ })
+ .catch(err => fn(err));
+
+ // waitTokenRequest(() => {
+ // // 拿到api数据后 再用api的数据
+ // uni.$u.api
+ // .getProjects(startTime, endTime)
+ // .then(data => {
+ // remote = true;
+ // fn(null, data);
+ // // 存api到cache里
+ // uni.$cache.putProjects(data);
+ // })
+ // .catch(err => fn(err));
+ // });
},
/**
diff --git a/utils/request.js b/utils/request.js
index 9c4888f..793f925 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -14,23 +14,34 @@ export function setupHttp(app) {
'content-type': 'application/json;charset=UTF-8'
},
});
-
+
// 请求拦截部分,如配置,每次请求前都会执行
app.config.globalProperties.$u.http.interceptor.request = config => {
const token = store.state.user.token || storage.getStorageSync('anyringToken');
if (token) {
config.header.Authorization = `Bearer ${token}`;
- }
-
+ }
+
+ uni.getSystemInfo({
+ success: function (res) {
+ config.header.deviceId = res.deviceId;
+ }
+ })
+
return config;
};
-
+
// 响应拦截,如配置,每次请求结束都会执行本方法
app.config.globalProperties.$u.http.interceptor.response = res => {
if (res.code === 200) {
// res为服务端返回值,可能有code,result等字段
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
- // 如果配置了originalData为true,请留意这里的返回值
+ // 如果配置了originalData为true,请留意这里的返回值
+ if (res.tokenObj.token) {
+ storage.setStorageSync('anyringToken', res.tokenObj.token || '');
+ store.commit('user/setToken', res.tokenObj.token);
+ }
+
return res.data;
} else if (res.code === 401) {
// 假设201为token失效,这里跳转登录
@@ -48,7 +59,7 @@ export function setupHttp(app) {
return false;
}
};
-
+
app.config.globalProperties.$u.post = (url, param = {}, header = {}) => {
return app.config.globalProperties.$u.http.request({
url,
@@ -59,4 +70,4 @@ export function setupHttp(app) {
},
});
};
-}
\ No newline at end of file
+}