Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
csssp-xcx-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
劳广强
csssp-xcx-h5
Commits
269f457a
提交
269f457a
authored
8月 08, 2024
作者:
劳广强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(文章): 文章筛选层级增加一层
上级
9d671fa9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
40 个修改的文件
包含
973 行增加
和
921 行删除
+973
-921
.prettierrc
.prettierrc
+1
-1
App.vue
App.vue
+4
-5
index.vue
components/LoadMore/index.vue
+2
-2
index.html
index.html
+10
-10
main.js
main.js
+17
-16
manifest.json
manifest.json
+90
-89
pages.json
pages.json
+152
-151
Authentication.scss
pages/Authentication/Authentication.scss
+84
-86
Authentication.vue
pages/Authentication/Authentication.vue
+112
-121
index.vue
pages/article-detail/index.vue
+14
-14
mock.js
pages/article-detail/mock.js
+1
-1
index.vue
pages/article-list/index.vue
+55
-24
mock.js
pages/article-list/mock.js
+2
-2
index.scss
pages/index/index.scss
+1
-1
index.vue
pages/index/index.vue
+58
-27
mock.js
pages/index/mock.js
+4
-4
index.vue
pages/mine-about/index.vue
+5
-5
index.vue
pages/mine-integral-bonus/index.vue
+12
-12
mock.js
pages/mine-integral-bonus/mock.js
+2
-2
index.vue
pages/mine-integral-withdrawal/index.vue
+12
-12
mock.js
pages/mine-integral-withdrawal/mock.js
+1
-1
index.vue
pages/mine-integral/index.vue
+19
-19
index.vue
pages/mine-picture-detail/index.vue
+30
-27
mock.js
pages/mine-picture-detail/mock.js
+1
-1
index.vue
pages/mine-picture/index.vue
+14
-14
mock.js
pages/mine-picture/mock.js
+2
-2
index.vue
pages/mine/index.vue
+31
-36
mock.js
pages/mine/mock.js
+1
-1
CertificateTypeActionSheet.vue
pages/record-content/CertificateTypeActionSheet.vue
+5
-5
UploadActionSheet.vue
pages/record-content/UploadActionSheet.vue
+4
-4
index.vue
pages/record-content/index.vue
+0
-0
mock.js
pages/record-content/mock.js
+3
-3
index.vue
pages/record-finish/index.vue
+3
-3
index.vue
pages/record-type/index.vue
+35
-36
mock.js
pages/record-type/mock.js
+2
-2
index.vue
pages/record/index.vue
+47
-45
uni.scss
uni.scss
+20
-20
list.js
utils/list.js
+32
-32
request.js
utils/request.js
+17
-17
util.js
utils/util.js
+68
-68
没有找到文件。
.prettierrc
浏览文件 @
269f457a
...
...
@@ -10,7 +10,7 @@
"printWidth": 180,
"proseWrap": "preserve",
"quoteProps": "consistent",
"semi":
tru
e,
"semi":
fals
e,
"singleAttributePerLine": false,
"singleQuote": true,
"tabWidth": 2,
...
...
App.vue
浏览文件 @
269f457a
...
...
@@ -2,18 +2,17 @@
export
default
{
globalData
:
{},
onLaunch
()
{
console
.
log
(
'App Launch'
)
;
console
.
log
(
'App Launch'
)
},
onShow
()
{
console
.
log
(
'App Show'
)
;
console
.
log
(
'App Show'
)
},
onHide
()
{
console
.
log
(
'App Hide'
)
;
console
.
log
(
'App Hide'
)
},
}
;
}
</
script
>
<
style
>
/*每个页面公共css */
</
style
>
...
...
components/LoadMore/index.vue
浏览文件 @
269f457a
...
...
@@ -16,10 +16,10 @@ export default {
},
data
()
{
return
{}
;
return
{}
},
methods
:
{},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
index.html
浏览文件 @
269f457a
<!
DOCTYPE
html>
<!
doctype
html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<script>
var
coverSupport
=
'CSS'
in
window
&&
typeof
CSS
.
supports
===
'function'
&&
(
CSS
.
supports
(
'top: env(a)'
)
||
CSS
.
supports
(
'top: constant(a)'
))
var
coverSupport
=
'CSS'
in
window
&&
typeof
CSS
.
supports
===
'function'
&&
(
CSS
.
supports
(
'top: env(a)'
)
||
CSS
.
supports
(
'top: constant(a)'
))
document
.
write
(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0'
+
(
coverSupport
?
', viewport-fit=cover'
:
''
)
+
'" />'
)
(
coverSupport
?
', viewport-fit=cover'
:
''
)
+
'" />'
)
</script>
<script
src=
"https://unpkg.com/vconsole@latest/dist/vconsole.min.js"
></script>
<script>
// VConsole will be exported to `window.VConsole` by default.
var
vConsole
=
new
window
.
VConsole
()
</script>
<script
src=
"https://unpkg.com/vconsole@latest/dist/vconsole.min.js"
></script>
<script>
// VConsole will be exported to `window.VConsole` by default.
var
vConsole
=
new
window
.
VConsole
();
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
...
...
main.js
浏览文件 @
269f457a
import
App
from
'./App'
;
import
App
from
'./App'
// #ifndef VUE3
import
Vue
from
'vue'
;
import
uView
from
'@/uni_modules/uview-ui'
;
import
{
getPrice
}
from
'@/utils/util'
;
Vue
.
use
(
uView
);
Vue
.
config
.
productionTip
=
false
;
import
Vue
from
'vue'
import
uView
from
'@/uni_modules/uview-ui'
import
{
getPrice
}
from
'@/utils/util'
Vue
.
use
(
uView
)
Vue
.
config
.
productionTip
=
false
Array
.
prototype
.
at
=
function
(
index
)
{
return
[...
this
].
splice
(
index
,
1
).
pop
()
;
}
;
return
[...
this
].
splice
(
index
,
1
).
pop
()
}
Vue
.
prototype
.
getPrice
=
getPrice
;
Vue
.
prototype
.
getPrice
=
getPrice
App
.
mpType
=
'app'
;
App
.
mpType
=
'app'
const
app
=
new
Vue
({
...
App
,
})
;
})
// 引入请求封装,将app参数传递到配置中
require
(
'@/utils/request.js'
)(
app
)
;
require
(
'@/utils/request.js'
)(
app
)
app
.
$mount
()
;
app
.
$mount
()
// #endif
// #ifdef VUE3
import
{
createSSRApp
}
from
'vue'
;
import
{
createSSRApp
}
from
'vue'
export
function
createApp
()
{
const
app
=
createSSRApp
(
App
)
;
const
app
=
createSSRApp
(
App
)
return
{
app
,
}
;
}
}
// #endif
manifest.json
浏览文件 @
269f457a
{
"name"
:
"荣县随手拍"
,
"appid"
:
"__UNI__7F4BF0D"
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
/*
模块配置
*/
"modules"
:
{},
/*
应用发布信息
*/
"distribute"
:
{
/*
android打包配置
*/
"android"
:
{
"permissions"
:
[
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
]
},
/*
ios打包配置
*/
"ios"
:
{},
/*
SDK配置
*/
"sdkConfigs"
:
{}
}
},
/*
快应用特有相关
*/
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
},
"usingComponents"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
"name"
:
"荣县随手拍"
,
"appid"
:
"__UNI__7F4BF0D"
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
"mp-toutiao"
:
{
"usingComponents"
:
true
/*
模块配置
*/
"modules"
:
{},
/*
应用发布信息
*/
"distribute"
:
{
/*
android打包配置
*/
"android"
:
{
"permissions"
:
[
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
]
},
/*
ios打包配置
*/
"ios"
:
{},
/*
SDK配置
*/
"sdkConfigs"
:
{}
}
},
/*
快应用特有相关
*/
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
},
"uniStatistics"
:
{
"enable"
:
false
"usingComponents"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
},
"vueVersion"
:
"2"
,
"h5"
:
{
"devServer"
:
{
"proxy"
:
{
"/api"
:
{
//
"target"
:
"https://csssptest.yuhuofei.cn"
,
//
"target"
:
"https://devrxssph5.yuhuofei.cn/"
,
"target"
:
"https://devrxssph5.yuhuofei.cn/"
,
"pathRewrite"
:
{}
}
}
},
"vueVersion"
:
"2"
,
"h5"
:
{
"devServer"
:
{
"proxy"
:
{
"/api"
:
{
//
"target"
:
"https://csssptest.yuhuofei.cn"
,
"target"
:
"https://devrxssph5.yuhuofei.cn/"
,
"pathRewrite"
:
{}
}
}
},
//
"^/api"
:
""
"sdkConfigs"
:
{
"maps"
:
{
"amap"
:
{
"key"
:
"8b8fb3d3301c5b625441178cdf23318f"
,
"securityJsCode"
:
"45882b25dcfbe17d0563ffa223fd1d92"
,
"serviceHost"
:
""
}
}
},
"router"
:
{
"base"
:
""
//
"^/api"
:
""
"sdkConfigs"
:
{
"maps"
:
{
"amap"
:
{
"key"
:
"8b8fb3d3301c5b625441178cdf23318f"
,
"securityJsCode"
:
"45882b25dcfbe17d0563ffa223fd1d92"
,
"serviceHost"
:
""
}
}
},
"router"
:
{
"base"
:
""
}
}
}
pages.json
浏览文件 @
269f457a
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"首页"
}
},
{
"path"
:
"pages/record/index"
,
"style"
:
{
"navigationBarTitleText"
:
"随手拍"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/Authentication/Authentication"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/article-detail/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/record-type/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-picture/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的随手拍"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-picture-detail/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的随手拍-详情"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/record-content/index"
,
"style"
:
{
"navigationBarTitleText"
:
"上报内容"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/article-list/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/record-finish/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-about/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-integral/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-integral-bonus/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/mine-integral-withdrawal/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
true
}
}
],
"tabBar"
:
{
"list"
:
[
{
"pagePath"
:
"pages/index/index"
,
"iconPath"
:
"static/tabbar/ic_shouye1@2x.png"
,
"selectedIconPath"
:
"static/tabbar/ic_shouye2@2x.png"
,
"text"
:
"首页"
},
{
"pagePath"
:
"pages/record/index"
,
"iconPath"
:
"static/tabbar/ic_shuishoupai1@2x.png"
,
"selectedIconPath"
:
"static/tabbar/ic_shuishoupai2@2x.png"
,
"text"
:
"随手拍"
},
{
"pagePath"
:
"pages/mine/index"
,
"iconPath"
:
"static/tabbar/ic_wode1@2x.png"
,
"selectedIconPath"
:
"static/tabbar/ic_wode2@2x.png"
,
"text"
:
"我的"
}
],
"color"
:
"#333333"
,
"selectedColor"
:
"#8171FC"
,
"backgroundColor"
:
"#FFF"
},
"globalStyle"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F8F8F8"
},
"uniIdRouter"
:
{},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
}
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"首页"
}
},
{
"path"
:
"pages/record/index"
,
"style"
:
{
"navigationBarTitleText"
:
"随手拍"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/Authentication/Authentication"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/article-detail/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/record-type/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-picture/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的随手拍"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-picture-detail/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的随手拍-详情"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/record-content/index"
,
"style"
:
{
"navigationBarTitleText"
:
"上报内容"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/article-list/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/record-finish/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-about/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-integral/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/mine-integral-bonus/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/mine-integral-withdrawal/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
true
}
}
],
"tabBar"
:
{
"list"
:
[
{
"pagePath"
:
"pages/index/index"
,
"iconPath"
:
"static/tabbar/ic_shouye1@2x.png"
,
"selectedIconPath"
:
"static/tabbar/ic_shouye2@2x.png"
,
"text"
:
"首页"
},
{
"pagePath"
:
"pages/record/index"
,
"iconPath"
:
"static/tabbar/ic_shuishoupai1@2x.png"
,
"selectedIconPath"
:
"static/tabbar/ic_shuishoupai2@2x.png"
,
"text"
:
"随手拍"
},
{
"pagePath"
:
"pages/mine/index"
,
"iconPath"
:
"static/tabbar/ic_wode1@2x.png"
,
"selectedIconPath"
:
"static/tabbar/ic_wode2@2x.png"
,
"text"
:
"我的"
}
],
"color"
:
"#333333"
,
"selectedColor"
:
"#8171FC"
,
"backgroundColor"
:
"#FFF"
},
"globalStyle"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
"backgroundColor"
:
"#F8F8F8"
},
"uniIdRouter"
:
{},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
}
}
pages/Authentication/Authentication.scss
浏览文件 @
269f457a
.wrapper
{
height
:
300rpx
;
padding-top
:
50rpx
;
.wrapper
{
height
:
300rpx
;
padding-top
:
50rpx
;
}
.oneText
{
width
:
90%
;
padding
:
10rpx
;
margin
:
auto
;
margin-bottom
:
30rpx
;
display
:
flex
;
.oneText
{
width
:
90%
;
padding
:
10rpx
;
margin
:
auto
;
margin-bottom
:
30rpx
;
display
:
flex
;
}
.nameInp
{
width
:
100%
;
// border: 1px solid #cccc;
padding
:
22rpx
20rpx
;
background
:
#f5f5f5
;
border
:
2rpx
solid
#d3d3d3
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#000000
;
.nameInp
{
width
:
100%
;
// border: 1px solid #cccc;
padding
:
22rpx
20rpx
;
background
:
#f5f5f5
;
border
:
2rpx
solid
#d3d3d3
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#000000
;
}
.nameSpan
{
width
:
34%
;
text-align
:
center
;
line-height
:
80rpx
;
.nameSpan
{
width
:
34%
;
text-align
:
center
;
line-height
:
80rpx
;
}
.cardSpan
{
width
:
34%
;
text-align
:
center
;
line-height
:
80rpx
;
.cardSpan
{
width
:
34%
;
text-align
:
center
;
line-height
:
80rpx
;
}
.cardInp
{
width
:
100%
;
// border: 1px solid #cccc;
padding
:
22rpx
20rpx
;
background
:
#f5f5f5
;
border
:
2rpx
solid
#d3d3d3
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#000000
;
.cardInp
{
width
:
100%
;
// border: 1px solid #cccc;
padding
:
22rpx
20rpx
;
background
:
#f5f5f5
;
border
:
2rpx
solid
#d3d3d3
;
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#000000
;
}
.twoText
{
width
:
90%
;
margin
:
auto
;
padding
:
10rpx
;
display
:
flex
;
// border: 1px solid #cccc;
margin-bottom
:
30rpx
;
.twoText
{
width
:
90%
;
margin
:
auto
;
padding
:
10rpx
;
display
:
flex
;
// border: 1px solid #cccc;
margin-bottom
:
30rpx
;
}
.cccc
{
margin-top
:
40rpx
;
width
:
80%
;
margin
:
auto
;
margin-bottom
:
100rpx
;
text-align
:
center
;
font-size
:
30rpx
;
color
:
red
;
.cccc
{
margin-top
:
40rpx
;
width
:
80%
;
margin
:
auto
;
margin-bottom
:
100rpx
;
text-align
:
center
;
font-size
:
30rpx
;
color
:
red
;
}
.postFrom
{
margin-top
:
40rpx
;
width
:
93%
;
margin
:
auto
;
// margin-bottom: 30rpx;
.postFrom
{
margin-top
:
40rpx
;
width
:
93%
;
margin
:
auto
;
// margin-bottom: 30rpx;
}
.cccText
{
// font-size: 30rpx
// margin-bottom: 20rpx;
}
.cccText
{
// font-size: 30rpx
// margin-bottom: 20rpx;
.cccBut
{
height
:
92rpx
;
width
:
80%
;
margin
:
auto
;
margin-top
:
20rpx
;
// background: linear-gradient(270deg, #0e4efc, #5b5bfc);
background-color
:
#4e6ef2
;
border-radius
:
46rpx
;
color
:
#fff
!
important
;
font-size
:
32rpx
;
font-weight
:
500
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.cccBut
{
height
:
92rpx
;
width
:
80%
;
margin
:
auto
;
margin-top
:
20rpx
;
// background: linear-gradient(270deg, #0e4efc, #5b5bfc);
background-color
:
#4e6ef2
;
border-radius
:
46rpx
;
color
:
#fff
!
important
;
font-size
:
32rpx
;
font-weight
:
500
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.fromBut
{
height
:
92rpx
;
background
:
linear-gradient
(
270deg
,
#8171fc
,
#a471fc
);
border-radius
:
46rpx
;
color
:
#fff
!
important
;
font-size
:
32rpx
;
font-weight
:
500
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.fromBut
{
height
:
92rpx
;
background
:
linear-gradient
(
270deg
,
#8171fc
,
#a471fc
);
border-radius
:
46rpx
;
color
:
#fff
!
important
;
font-size
:
32rpx
;
font-weight
:
500
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
\ No newline at end of file
pages/Authentication/Authentication.vue
浏览文件 @
269f457a
<
template
>
<view
class=
"wrapper"
>
<view
class=
"oneText"
>
<span
class=
"nameSpan"
>
姓名:
</span><input
type=
"text"
class=
"nameInp"
placeholder=
"请输入姓名"
v-model=
"name"
>
</view>
<view
class=
"twoText"
>
<span
class=
"cardSpan"
>
身份证号:
</span><input
type=
"text"
class=
"cardInp"
placeholder=
"请输入身份证号"
v-model=
"card"
>
</view>
<view
class=
"cccc"
>
<text
class=
"cccText"
>
请使用前置摄头录制一段2~3秒人脸视频,录制完成后上传进行实人认证
</text>
<button
class=
"cccBut"
@
click=
"chooseVideo"
>
{{
videoYes
?
'重新录制'
:
'录制实人认证视频'
}}
</button>
</view>
<view
class=
"postFrom"
v-if=
"!logNice"
>
<button
type=
"primary"
class=
"fromBut"
@
click=
"getAuthen"
>
确认提交
</button>
</view>
<view
class=
"postFrom"
v-if=
"logNice"
>
<button
class=
"fromBut"
@
click=
"back"
>
返回
</button>
</view>
<u-modal
confirmText=
"我已知晓"
:show=
"modalShow"
@
confirm=
"onModalConfirm"
>
<view
class=
"modal"
:style=
"`max-height: $
{modalHeight}rpx; overflow-y: scroll; white-space: pre-wrap`">
<u-parse
content=
'1.确保摄像头无遮挡物,录制清晰、稳定的视频。
<view
class=
"wrapper"
>
<view
class=
"oneText"
>
<span
class=
"nameSpan"
>
姓名:
</span><input
type=
"text"
class=
"nameInp"
placeholder=
"请输入姓名"
v-model=
"name"
/>
</view>
<view
class=
"twoText"
>
<span
class=
"cardSpan"
>
身份证号:
</span><input
type=
"text"
class=
"cardInp"
placeholder=
"请输入身份证号"
v-model=
"card"
/>
</view>
<view
class=
"cccc"
>
<text
class=
"cccText"
>
请使用前置摄头录制一段2~3秒人脸视频,录制完成后上传进行实人认证
</text>
<button
class=
"cccBut"
@
click=
"chooseVideo"
>
{{
videoYes
?
'重新录制'
:
'录制实人认证视频'
}}
</button>
</view>
<view
class=
"postFrom"
v-if=
"!logNice"
>
<button
type=
"primary"
class=
"fromBut"
@
click=
"getAuthen"
>
确认提交
</button>
</view>
<view
class=
"postFrom"
v-if=
"logNice"
>
<button
class=
"fromBut"
@
click=
"back"
>
返回
</button>
</view>
<u-modal
confirmText=
"我已知晓"
:show=
"modalShow"
@
confirm=
"onModalConfirm"
>
<view
class=
"modal"
:style=
"`max-height: $
{modalHeight}rpx; overflow-y: scroll; white-space: pre-wrap`">
<u-parse
content=
"1.确保摄像头无遮挡物,录制清晰、稳定的视频。
2.调整光线:选择明亮、均匀的环境,避免强光或阴影。
3.角度和距离:将摄像设备置于与人脸平行的位置,并保持适当距离。
4.简洁背景:选择无干扰的背景,突出人脸。
5.面部配合:被拍摄者需保持自然面部表情,避免遮挡物。
6.确保人脸清晰可见,无噪点或模糊现象。'
/>
</view>
</u-modal>
</view>
6.确保人脸清晰可见,无噪点或模糊现象。"
/>
</view>
</u-modal>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
name
:
""
,
card
:
''
,
videoUrl
:
{},
videoYes
:
false
,
Jbool
:
false
,
logNice
:
false
,
modalShow
:
false
,
};
},
computed
:
{
modalHeight
()
{
// console.log(innerHeight);
return
Math
.
ceil
(
window
.
innerHeight
*
2
*
0.6
);
},
},
methods
:
{
chooseVideo
()
{
// console.log(this.name,this.card);
if
(
this
.
name
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入姓名'
);
}
else
if
(
this
.
card
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入身份证号'
);
}
this
.
modalShow
=
true
},
back
()
{
uni
.
navigateBack
()
},
onModalConfirm
()
{
this
.
modalShow
=
false
uni
.
chooseVideo
({
sourceType
:
[
'camera'
],
compressed
:
true
,
maxDuration
:
4
,
camera
:
'front'
,
success
:
res
=>
{
// console.log(res.tempFile);
this
.
videoYes
=
true
this
.
videoUrl
=
res
.
tempFile
},
fail
:
e
=>
{
console
.
log
(
e
);
}
})
},
getAuthen
()
{
uni
.
showLoading
({
title
:
'加载中'
});
if
(
this
.
name
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入姓名'
);
}
else
if
(
this
.
card
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入身份证号'
);
}
else
if
(
!
this
.
videoYes
)
{
return
uni
.
$u
.
toast
(
'请完成实名验证'
);
}
uni
.
uploadFile
({
url
:
"/api/user/real_person_auth"
,
file
:
this
.
videoUrl
,
name
:
"video"
,
formData
:
{
"name"
:
this
.
name
,
"id_card"
:
this
.
card
//其他表单字段,可根据需求添加
},
success
:
function
(
res
)
{
this
.
Jbool
=
false
uni
.
hideLoading
()
return
uni
.
$u
.
toast
(
'实名认证完成'
);
setTimeout
(
function
()
{
uni
.
navigateTo
({
url
:
'../index/index'
})
},
2000
)
// this.logNice = true
},
fail
:
function
(
err
)
{
this
.
Jbool
=
false
// uni.hideLoading()
return
uni
.
$u
.
toast
(
'实名认证失败'
);
}
})
}
}
}
export
default
{
data
()
{
return
{
name
:
''
,
card
:
''
,
videoUrl
:
{},
videoYes
:
false
,
Jbool
:
false
,
logNice
:
false
,
modalShow
:
false
,
}
},
computed
:
{
modalHeight
()
{
// console.log(innerHeight);
return
Math
.
ceil
(
window
.
innerHeight
*
2
*
0.6
)
},
},
methods
:
{
chooseVideo
()
{
// console.log(this.name,this.card);
if
(
this
.
name
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入姓名'
)
}
else
if
(
this
.
card
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入身份证号'
)
}
this
.
modalShow
=
true
},
back
()
{
uni
.
navigateBack
()
},
onModalConfirm
()
{
this
.
modalShow
=
false
uni
.
chooseVideo
({
sourceType
:
[
'camera'
],
compressed
:
true
,
maxDuration
:
4
,
camera
:
'front'
,
success
:
(
res
)
=>
{
// console.log(res.tempFile);
this
.
videoYes
=
true
this
.
videoUrl
=
res
.
tempFile
},
fail
:
(
e
)
=>
{
console
.
log
(
e
)
},
})
},
getAuthen
()
{
uni
.
showLoading
({
title
:
'加载中'
,
})
if
(
this
.
name
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入姓名'
)
}
else
if
(
this
.
card
==
''
)
{
return
uni
.
$u
.
toast
(
'请输入身份证号'
)
}
else
if
(
!
this
.
videoYes
)
{
return
uni
.
$u
.
toast
(
'请完成实名验证'
)
}
uni
.
uploadFile
({
url
:
'/api/user/real_person_auth'
,
file
:
this
.
videoUrl
,
name
:
'video'
,
formData
:
{
name
:
this
.
name
,
id_card
:
this
.
card
,
//其他表单字段,可根据需求添加
},
success
:
function
(
res
)
{
this
.
Jbool
=
false
uni
.
hideLoading
()
return
uni
.
$u
.
toast
(
'实名认证完成'
)
setTimeout
(
function
()
{
uni
.
navigateTo
({
url
:
'../index/index'
,
})
},
2000
)
// this.logNice = true
},
fail
:
function
(
err
)
{
this
.
Jbool
=
false
// uni.hideLoading()
return
uni
.
$u
.
toast
(
'实名认证失败'
)
},
})
},
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
@import
'./Authentication.scss'
;
// @import 'index.scss';
</
style
>
\ No newline at end of file
@import
'./Authentication.scss'
;
// @import 'index.scss';
</
style
>
pages/article-detail/index.vue
浏览文件 @
269f457a
...
...
@@ -56,7 +56,7 @@
</
template
>
<
script
>
import
{
articleDetail
}
from
'@/pages/article-detail/mock'
;
import
{
articleDetail
}
from
'@/pages/article-detail/mock'
export
default
{
data
()
{
...
...
@@ -73,29 +73,29 @@ export default {
ifshare
:
true
,
tipPyq
:
false
,
// 朋友圈提示
showTip
:
false
,
// 分享提示
}
;
}
},
onLoad
(
query
)
{
this
.
query
=
query
;
this
.
fetchArticleDetail
()
;
this
.
query
=
query
this
.
fetchArticleDetail
()
},
methods
:
{
async
fetchArticleDetail
()
{
const
token
=
uni
.
getStorageSync
(
'token'
)
;
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/article/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
})
;
const
token
=
uni
.
getStorageSync
(
'token'
)
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/article/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
})
this
.
articleDetail
=
detail
;
this
.
created
=
detail
.
created
.
substring
(
0
,
10
)
;
this
.
title
=
detail
.
title
;
this
.
follow
=
detail
.
follow_status
;
this
.
fabulous
=
detail
.
like_status
;
this
.
likes_num
=
detail
.
likes_num
;
this
.
content
=
detail
.
content
;
this
.
articleDetail
=
detail
this
.
created
=
detail
.
created
.
substring
(
0
,
10
)
this
.
title
=
detail
.
title
this
.
follow
=
detail
.
follow_status
this
.
fabulous
=
detail
.
like_status
this
.
likes_num
=
detail
.
likes_num
this
.
content
=
detail
.
content
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/article-detail/mock.js
浏览文件 @
269f457a
...
...
@@ -17,4 +17,4 @@ export const articleDetail = {
},
like_status
:
false
,
follow_status
:
false
,
}
;
}
pages/article-list/index.vue
浏览文件 @
269f457a
...
...
@@ -7,8 +7,14 @@
<view
:class=
"[articleIdx === index ? 'task_line' : 'task_line_none']"
></view>
</view>
</view>
<view
class=
"article_list"
>
<view
class=
"article_item"
v-for=
"(item, index) in articleDeepTypeList"
@
click=
"changeDeepArticle(item, index)"
:key=
"item.name"
>
<view
:class=
"[articleDeepIdx === index ? 'article_active' : 'article_item_name']"
>
{{
item
.
name
}}
</view>
<view
:class=
"[articleDeepIdx === index ? 'task_line' : 'task_line_none']"
></view>
</view>
</view>
</view>
<view
class=
"line"
></view
>
<view
class=
"line"
/
>
<view
v-if=
"!articleLoading && !articleList.data.length"
class=
"data_none"
>
<image
mode=
"aspectFill"
class=
"data_img"
src=
"/static/pic_wushuju@2x.png"
/>
<view
class=
"data_title"
>
暂无数据
</view>
...
...
@@ -47,8 +53,8 @@
</
template
>
<
script
>
import
{
getList
,
createList
}
from
'@/utils/list'
;
import
LoadMore
from
'@/components/LoadMore'
;
import
{
getList
,
createList
}
from
'@/utils/list'
import
LoadMore
from
'@/components/LoadMore'
export
default
{
components
:
{
LoadMore
},
...
...
@@ -56,35 +62,51 @@ export default {
return
{
articleTypeList
:
[],
articleTypeId
:
0
,
articleList
:
createList
(),
articleIdx
:
0
,
articleDeepTypeList
:
[],
articleDeepTypeId
:
0
,
articleDeepIdx
:
0
,
articleList
:
createList
(),
articleLoading
:
true
,
id
:
null
,
ifShare
:
true
,
is_fabulous
:
null
,
// 点赞
is_follow
:
null
,
// 关注
}
;
}
},
onLoad
(
query
)
{
this
.
fetchArticleTypeData
()
;
this
.
fetchArticleTypeData
()
},
onReachBottom
()
{
this
.
fetchArticleData
()
;
this
.
fetchArticleData
()
},
methods
:
{
async
fetchArticleTypeData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/articletype/list'
);
this
.
articleTypeList
=
list
;
this
.
articleTypeId
=
list
[
0
]?.
id
??
0
;
this
.
fetchArticleData
();
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/articletype/list'
)
this
.
articleTypeList
=
list
if
(
list
.
length
<=
0
)
return
const
firstId
=
list
[
0
]?.
id
??
0
this
.
fetchArticleDeepTypeData
(
firstId
)
},
async
fetchArticleDeepTypeData
(
id
)
{
const
url
=
`/api/backend/articletype/list?parent_id=
${
id
}
`
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
url
)
this
.
articleDeepTypeList
=
list
if
(
list
.
length
<=
0
)
return
this
.
articleDeepTypeId
=
list
[
0
]?.
id
this
.
fetchArticleData
()
},
async
fetchArticleData
()
{
this
.
articleLoading
=
true
;
const
articleTypeId
=
this
.
articleTypeId
;
this
.
articleLoading
=
true
const
articleTypeId
=
this
.
articleTypeId
const
articleDeepTypeId
=
this
.
articleDeepTypeId
await
getList
(
this
,
...
...
@@ -92,29 +114,38 @@ export default {
[
'/api/article/list'
,
{
article_type_id
:
this
.
articleTypeId
,
article_type_id
:
this
.
article
Deep
TypeId
,
},
],
{
abandon
:
()
=>
articleTypeId
!==
this
.
articleTypeId
,
abandon
:
()
=>
articleTypeId
!==
this
.
articleTypeId
||
articleDeepTypeId
!==
this
.
articleDeepTypeId
,
}
)
;
this
.
articleLoading
=
false
;
)
this
.
articleLoading
=
false
},
async
changeArticle
(
item
,
index
)
{
if
(
this
.
articleIdx
===
index
)
return
;
this
.
articleIdx
=
index
;
this
.
articleTypeId
=
item
.
id
;
this
.
articleList
=
createList
();
this
.
fetchArticleData
();
if
(
this
.
articleIdx
===
index
)
return
this
.
articleIdx
=
index
this
.
articleTypeId
=
item
.
id
this
.
articleDeepIdx
=
0
this
.
articleList
=
createList
()
this
.
fetchArticleDeepTypeData
(
this
.
articleTypeId
)
},
async
changeDeepArticle
(
item
,
index
)
{
if
(
this
.
articleDeepIdx
===
index
)
return
this
.
articleDeepIdx
=
index
this
.
articleDeepTypeId
=
item
.
id
this
.
articleList
=
createList
()
this
.
fetchArticleData
()
},
onArticleClick
(
item
,
index
)
{
uni
.
$u
.
route
({
url
:
'pages/article-detail/index'
,
params
:
{
id
:
item
.
id
}
})
;
uni
.
$u
.
route
({
url
:
'pages/article-detail/index'
,
params
:
{
id
:
item
.
id
}
})
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/article-list/mock.js
浏览文件 @
269f457a
...
...
@@ -2,7 +2,7 @@ export const articleSort = [
{
object_name
:
'articletype'
,
status
:
1
,
object_type
:
'default'
,
name
:
'
\
u5927
\
u57ce
\
u5c0f
\
u4e8b'
,
id
:
15
,
weight
:
1
},
{
object_name
:
'articletype'
,
status
:
1
,
object_type
:
'default'
,
name
:
'
\
u653f
\
u7b56
\
u5ba3
\
u4f20'
,
id
:
16
,
weight
:
0
},
{
object_name
:
'articletype'
,
status
:
1
,
object_type
:
'default'
,
name
:
'四个大字'
,
id
:
17
,
weight
:
0
},
]
;
]
export
const
articleList
=
[
{
...
...
@@ -365,4 +365,4 @@ export const articleList = [
get_like_num
:
0
,
follow_status
:
false
,
},
]
;
]
pages/index/index.scss
浏览文件 @
269f457a
...
...
@@ -131,7 +131,7 @@ page {
&
-list
{
width
:
100%
;
padding
:
4
0rpx
0
;
padding
:
2
0rpx
0
;
display
:
flex
;
align-items
:
center
;
overflow-x
:
scroll
;
...
...
pages/index/index.vue
浏览文件 @
269f457a
...
...
@@ -44,6 +44,12 @@
<view
:class=
"[articleTypeAction === index ? 'article-task-line--action' : 'article-task-line--none']"
/>
</view>
</view>
<view
class=
"article-list"
>
<view
class=
"article-item"
v-for=
"(item, index) in articleDeepTypeList"
:key=
"item.id"
@
click=
"onArticleDeepTypeClick(item, index)"
>
<view
:class=
"[articleDeepTypeAction === index ? 'article-item-name--action' : 'article-item-name--none']"
>
{{
item
.
name
}}
</view>
<view
:class=
"[articleDeepTypeAction === index ? 'article-task-line--action' : 'article-task-line--none']"
/>
</view>
</view>
<view
v-for=
"(item, index) in articleList"
:key=
"item.id"
@
click=
"onArticleClick(item, index)"
>
<view
v-if=
"index
<
3
"
class=
"article-content"
>
<view
class=
"article-left"
>
...
...
@@ -86,79 +92,104 @@ export default {
address
:
'获取位置'
,
bannerList
:
[],
noticeList
:
[],
articleTypeList
:
[],
articleTypeAction
:
0
,
articleTypeId
:
0
,
articleDeepTypeList
:
[],
articleDeepTypeAction
:
0
,
articleDeepTypeId
:
0
,
articleList
:
[],
}
;
}
},
onLoad
(
query
)
{
this
.
fetchBannerData
()
;
this
.
fetchNoticeData
()
;
this
.
fetchArticleTypeData
()
;
this
.
fetchBannerData
()
this
.
fetchNoticeData
()
this
.
fetchArticleTypeData
()
},
methods
:
{
async
fetchBannerData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/banner/list'
)
;
this
.
bannerList
=
list
;
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/banner/list'
)
this
.
bannerList
=
list
},
async
fetchNoticeData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/notice/list'
)
;
this
.
noticeList
=
list
;
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/notice/list'
)
this
.
noticeList
=
list
},
async
fetchArticleTypeData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/articletype/list'
);
this
.
articleTypeList
=
list
;
this
.
articleTypeId
=
list
[
0
]?.
id
??
0
;
this
.
fetchArticleData
();
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/articletype/list'
)
this
.
articleTypeList
=
list
if
(
list
.
length
<=
0
)
return
const
firstId
=
list
[
0
]?.
id
??
0
this
.
fetchArticleDeepTypeData
(
firstId
)
},
async
fetchArticleDeepTypeData
(
id
)
{
const
url
=
`/api/backend/articletype/list?parent_id=
${
id
}
`
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
url
)
this
.
articleDeepTypeList
=
list
if
(
list
.
length
<=
0
)
return
this
.
articleDeepTypeId
=
list
[
0
]?.
id
this
.
fetchArticleData
()
},
async
fetchArticleData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/article/list'
,
{
params
:
{
article_type_id
:
this
.
articleTypeId
,
article_type_id
:
this
.
article
Deep
TypeId
,
},
})
;
this
.
articleList
=
list
;
})
this
.
articleList
=
list
},
selectAddress
()
{
console
.
log
(
'获取位置'
)
;
console
.
log
(
'获取位置'
)
},
onArticleTypeClick
(
item
,
index
)
{
if
(
this
.
articleTypeAction
===
index
)
return
;
this
.
articleTypeAction
=
index
;
this
.
articleTypeId
=
item
.
id
;
this
.
fetchArticleData
();
if
(
this
.
articleTypeAction
===
index
)
return
this
.
articleTypeAction
=
index
this
.
articleTypeId
=
item
.
id
this
.
articleDeepTypeAction
=
0
// this.fetchArticleData()
this
.
fetchArticleDeepTypeData
(
item
.
id
)
},
onArticleDeepTypeClick
(
item
,
index
)
{
if
(
this
.
articleDeepTypeAction
===
index
)
return
this
.
articleDeepTypeAction
=
index
this
.
articleDeepTypeId
=
item
.
id
this
.
fetchArticleData
()
},
articleMore
()
{
uni
.
$u
.
route
({
url
:
'pages/article-list/index'
})
;
uni
.
$u
.
route
({
url
:
'pages/article-list/index'
})
},
onArticleClick
(
item
,
index
)
{
uni
.
$u
.
route
({
url
:
'pages/article-detail/index'
,
params
:
{
id
:
item
.
id
}
})
;
uni
.
$u
.
route
({
url
:
'pages/article-detail/index'
,
params
:
{
id
:
item
.
id
}
})
},
onGetAddress
()
{
uni
.
chooseLocation
({
success
:
(
result
)
=>
{
this
.
address
=
result
.
address
;
this
.
address
=
result
.
address
},
})
;
})
},
onBannerClick
(
item
,
index
)
{
if
(
!
item
.
jump_id
)
return
;
uni
.
$u
.
route
({
url
:
'pages/article-detail/index'
,
params
:
{
id
:
item
.
jump_id
}
})
;
if
(
!
item
.
jump_id
)
return
uni
.
$u
.
route
({
url
:
'pages/article-detail/index'
,
params
:
{
id
:
item
.
jump_id
}
})
},
},
}
;
}
</
script
>
<
style
lang=
"scss"
>
...
...
pages/index/mock.js
浏览文件 @
269f457a
...
...
@@ -38,7 +38,7 @@ export const bannerList = [
desc
:
''
,
img
:
'https://qiniu.yuhuofei.it/Fqvl7ItsPbNqxgln8y4ikCQpHvog'
,
},
]
;
]
export
const
noticeList
=
[
{
object_name
:
'notice'
,
get_points
:
100
,
object_type
:
'default'
,
id
:
293
,
weight
:
0
,
content
:
'
\
u201c
\
u4fee
\
u4fee
\
u201d
\
u968f
\
u624b
\
u62cd
\
u5ba1
\
u6838
\
u901a
\
u8fc7'
},
...
...
@@ -46,12 +46,12 @@ export const noticeList = [
{
object_name
:
'notice'
,
get_points
:
200
,
object_type
:
'default'
,
id
:
291
,
weight
:
0
,
content
:
'
\
u201c
\
u9999
\
u828b
\
u201d
\
u4efb
\
u52a1
\
u5ba1
\
u6838
\
u901a
\
u8fc7'
},
{
object_name
:
'notice'
,
get_points
:
200
,
object_type
:
'default'
,
id
:
290
,
weight
:
0
,
content
:
'
\
u201c
\
u7530
\
u91ce
\
u201d
\
u4efb
\
u52a1
\
u5ba1
\
u6838
\
u901a
\
u8fc7'
},
{
object_name
:
'notice'
,
get_points
:
200
,
object_type
:
'default'
,
id
:
289
,
weight
:
0
,
content
:
'
\
u201c
\
u675c
\
u9e43
\
u201d
\
u4efb
\
u52a1
\
u5ba1
\
u6838
\
u901a
\
u8fc7'
},
]
;
]
export
const
articleTypeList
=
[
{
object_name
:
'articletype'
,
status
:
1
,
object_type
:
'default'
,
name
:
'
\
u5927
\
u57ce
\
u5c0f
\
u4e8b'
,
id
:
15
,
weight
:
1
},
{
object_name
:
'articletype'
,
status
:
1
,
object_type
:
'default'
,
name
:
'
\
u653f
\
u7b56
\
u5ba3
\
u4f20'
,
id
:
16
,
weight
:
0
},
]
;
]
export
const
articleList
=
[
{
...
...
@@ -414,4 +414,4 @@ export const articleList = [
get_like_num
:
0
,
follow_status
:
false
,
},
]
;
]
pages/mine-about/index.vue
浏览文件 @
269f457a
...
...
@@ -11,20 +11,20 @@ export default {
data
()
{
return
{
content
:
''
,
}
;
}
},
onLoad
(
query
)
{
this
.
fetchContent
()
;
this
.
fetchContent
()
},
methods
:
{
async
fetchContent
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/textintroduction/list'
,
{
params
:
{
text_type
:
5
}
})
;
this
.
content
=
list
[
0
]?.
content
??
''
;
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/textintroduction/list'
,
{
params
:
{
text_type
:
5
}
})
this
.
content
=
list
[
0
]?.
content
??
''
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine-integral-bonus/index.vue
浏览文件 @
269f457a
...
...
@@ -26,9 +26,9 @@
</
template
>
<
script
>
import
{
createList
,
getList
}
from
'@/utils/list'
;
import
{
titleMap
,
record
}
from
'@/pages/mine-integral-bonus/mock'
;
import
LoadMore
from
'@/components/LoadMore'
;
import
{
createList
,
getList
}
from
'@/utils/list'
import
{
titleMap
,
record
}
from
'@/pages/mine-integral-bonus/mock'
import
LoadMore
from
'@/components/LoadMore'
export
default
{
components
:
{
LoadMore
},
...
...
@@ -39,31 +39,31 @@ export default {
show
:
false
,
list
:
createList
(),
}
;
}
},
onLoad
(
query
)
{
// this.record = record;
this
.
fetchList
()
;
this
.
fetchList
()
},
async
onPullDownRefresh
()
{
this
.
list
=
createList
()
;
await
this
.
fetchList
()
;
uni
.
stopPullDownRefresh
()
;
this
.
list
=
createList
()
await
this
.
fetchList
()
uni
.
stopPullDownRefresh
()
},
onReachBottom
()
{
this
.
fetchList
()
;
this
.
fetchList
()
},
methods
:
{
async
fetchList
()
{
await
getList
(
this
,
'list'
,
[
'/api/app/pointsrecord/list'
,
{}])
;
console
.
log
(
this
.
list
)
;
await
getList
(
this
,
'list'
,
[
'/api/app/pointsrecord/list'
,
{}])
console
.
log
(
this
.
list
)
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine-integral-bonus/mock.js
浏览文件 @
269f457a
...
...
@@ -6,7 +6,7 @@ export const titleMap = {
5
:
'随手拍'
,
6
:
'每日签到补签'
,
7
:
'提现'
,
}
;
}
export
const
record
=
[
{
...
...
@@ -295,4 +295,4 @@ export const record = [
created
:
'2021-05-07 10:24:46'
,
points_type
:
1
,
},
]
;
]
pages/mine-integral-withdrawal/index.vue
浏览文件 @
269f457a
...
...
@@ -34,9 +34,9 @@
</
template
>
<
script
>
import
{
createList
,
getList
}
from
'@/utils/list'
;
import
LoadMore
from
'@/components/LoadMore'
;
import
{
myCopy
}
from
'@/utils/util'
;
import
{
createList
,
getList
}
from
'@/utils/list'
import
LoadMore
from
'@/components/LoadMore'
import
{
myCopy
}
from
'@/utils/util'
export
default
{
components
:
{
LoadMore
},
...
...
@@ -45,33 +45,33 @@ export default {
record
:
[],
list
:
createList
(),
}
;
}
},
onLoad
(
query
)
{
this
.
fetchList
()
;
this
.
fetchList
()
},
async
onPullDownRefresh
()
{
this
.
list
=
createList
()
;
await
this
.
fetchList
()
;
uni
.
stopPullDownRefresh
()
;
this
.
list
=
createList
()
await
this
.
fetchList
()
uni
.
stopPullDownRefresh
()
},
onReachBottom
()
{
this
.
fetchList
()
;
this
.
fetchList
()
},
methods
:
{
async
fetchList
()
{
await
getList
(
this
,
'list'
,
[
'/api/withdrawal_record/list'
,
{}])
;
await
getList
(
this
,
'list'
,
[
'/api/withdrawal_record/list'
,
{}])
},
onCopy
(
item
,
index
)
{
myCopy
(
item
.
order_num
)
;
myCopy
(
item
.
order_num
)
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine-integral-withdrawal/mock.js
浏览文件 @
269f457a
...
...
@@ -125,4 +125,4 @@ export const record = [
order_num
:
'<function generate_num at 0x7fded13e31e0>'
,
created
:
'2021-08-19 14:41:56'
,
},
]
;
]
pages/mine-integral/index.vue
浏览文件 @
269f457a
...
...
@@ -55,51 +55,51 @@ export default {
warnShow
:
false
,
userInfo
:
{},
}
;
}
},
onLoad
(
query
)
{
this
.
fetchUserInfo
()
;
this
.
fetchUserInfo
()
},
methods
:
{
onSubmitClick
()
{
this
.
submitTitle
=
'提现'
;
this
.
submitContent
=
'目前奖金 '
+
this
.
userInfo
.
integral
/
100
;
this
.
submitShowCancel
=
true
;
this
.
submitTitle
=
'提现'
this
.
submitContent
=
'目前奖金 '
+
this
.
userInfo
.
integral
/
100
this
.
submitShowCancel
=
true
this
.
submitShow
=
true
;
this
.
submitShow
=
true
},
async
onSubmitConfirm
()
{
if
(
!
this
.
submitValue
)
return
uni
.
$u
.
toast
(
'请输入金额'
)
;
if
(
!
this
.
submitValue
)
return
uni
.
$u
.
toast
(
'请输入金额'
)
try
{
uni
.
showLoading
({})
;
await
this
.
fetchSubmit
()
;
this
.
onSubmitCancel
()
;
uni
.
hideLoading
()
;
this
.
successShow
=
true
;
uni
.
showLoading
({})
await
this
.
fetchSubmit
()
this
.
onSubmitCancel
()
uni
.
hideLoading
()
this
.
successShow
=
true
}
catch
(
e
)
{
this
.
onSubmitCancel
()
;
this
.
onSubmitCancel
()
}
finally
{
}
},
async
fetchSubmit
()
{
await
uni
.
$u
.
http
.
post
(
'/api/withdrawal'
,
{
amount
:
Number
(
this
.
submitValue
??
0
)
*
100
})
;
await
uni
.
$u
.
http
.
post
(
'/api/withdrawal'
,
{
amount
:
Number
(
this
.
submitValue
??
0
)
*
100
})
},
async
fetchUserInfo
()
{
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/user_center/detail'
)
;
this
.
userInfo
=
detail
;
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/user_center/detail'
)
this
.
userInfo
=
detail
},
onSubmitCancel
()
{
this
.
submitValue
=
''
;
this
.
submitShow
=
false
;
this
.
submitValue
=
''
this
.
submitShow
=
false
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine-picture-detail/index.vue
浏览文件 @
269f457a
...
...
@@ -12,7 +12,7 @@
<view
class=
"one"
>
{{
option
.
name
}}
</view>
</view>
<view
class=
"photo_list"
>
<view
class=
"photo_item"
v-for=
"(val, index) in mediaList.filter(
v
=> v.type === option.type)"
:key=
"val.id"
@
click=
"previewVideo(val, index)"
>
<view
class=
"photo_item"
v-for=
"(val, index) in mediaList.filter(
(v)
=> v.type === option.type)"
:key=
"val.id"
@
click=
"previewVideo(val, index)"
>
<image
v-if=
"val.type === 'image'"
mode=
"aspectFill"
:src=
"val.url"
style=
"display: block; width: 168rpx; height: 168rpx; border-radius: 16rpx"
/>
<view
v-else
class=
"play-wrapper"
>
<video
:controls=
"video.fullscreen"
:object-fit=
"videoFit"
:id=
"`myVideo$
{index}`" class="upload_img" :src="val.url" @fullscreenchange="onVideoFullscreenChange" />
...
...
@@ -83,67 +83,70 @@ export default {
photoDetail
:
[],
video
:
{
ctx
:
null
,
fullscreen
:
false
}
}
;
fullscreen
:
false
,
}
,
}
},
computed
:
{
videoFit
()
{
return
this
.
video
.
fullscreen
?
'contain'
:
'cover'
}
}
,
},
onLoad
(
query
)
{
this
.
query
=
query
;
this
.
fetchPhotoDetail
()
;
this
.
query
=
query
this
.
fetchPhotoDetail
()
},
methods
:
{
async
fetchPhotoDetail
()
{
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototask/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
})
;
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototask/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
})
const
dataList
=
[
detail
]
;
const
dataList
=
[
detail
]
dataList
.
forEach
((
item
)
=>
{
item
.
image_list
=
item
.
image_list
?
item
.
image_list
.
split
(
','
)
:
[]
;
item
.
video_list
=
item
.
video_list
?
item
.
video_list
.
split
(
','
)
:
[]
;
item
.
put_date
=
item
.
put_date
.
substring
(
0
,
16
)
;
item
.
image_list
=
item
.
image_list
?
item
.
image_list
.
split
(
','
)
:
[]
item
.
video_list
=
item
.
video_list
?
item
.
video_list
.
split
(
','
)
:
[]
item
.
put_date
=
item
.
put_date
.
substring
(
0
,
16
)
item
.
image_list
.
forEach
((
element
)
=>
{
this
.
mediaList
.
push
({
id
:
uni
.
$u
.
guid
(),
type
:
'image'
,
url
:
element
,
})
;
})
;
})
})
item
.
video_list
.
forEach
((
element
,
index
)
=>
{
this
.
mediaList
.
push
({
id
:
uni
.
$u
.
guid
(),
type
:
'video'
,
url
:
element
,
})
;
})
;
})
;
})
})
})
this
.
mediaList
=
this
.
mediaList
.
map
((
value
,
index
)
=>
({
...
value
,
videoContext
:
uni
.
createVideoContext
(
`myVideo
${
index
}
`
),
}))
;
}))
this
.
photoDetail
=
dataList
;
this
.
photoDetail
=
dataList
},
// 预览视频
previewVideo
(
item
,
index
)
{
if
(
item
.
type
===
'video'
)
{
// this.mediaList[index].videoContext.requestFullScreen();
const
ctx
=
this
.
video
.
ctx
=
uni
.
createVideoContext
(
`myVideo
${
index
}
`
)
const
ctx
=
(
this
.
video
.
ctx
=
uni
.
createVideoContext
(
`myVideo
${
index
}
`
)
)
ctx
.
play
()
// HACK: iOS 需要延迟一下才能全屏
setTimeout
(()
=>
{
ctx
.
requestFullScreen
()
},
uni
.
$u
.
os
()
===
'ios'
?
300
:
0
)
setTimeout
(
()
=>
{
ctx
.
requestFullScreen
()
},
uni
.
$u
.
os
()
===
'ios'
?
300
:
0
)
}
if
(
item
.
type
===
'image'
)
{
uni
.
previewImage
({
urls
:
[
item
.
url
],
})
;
})
}
},
...
...
@@ -165,7 +168,7 @@ export default {
{
name
:
'视频'
,
type
:
'video'
,
}
}
,
]
const
res
=
[]
...
...
@@ -176,9 +179,9 @@ export default {
res
.
push
(
actionsOptions
[
1
])
}
return
res
}
}
,
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine-picture-detail/mock.js
浏览文件 @
269f457a
...
...
@@ -44,4 +44,4 @@ export const photoDetail = {
follow_num
:
0
,
position
:
'
\
u5fb7
\
u653f
\
u8def
\
u5357
\
u4e00
\
u5df7'
,
remark
:
'
\
u901a
\
u8fc7'
,
}
;
}
pages/mine-picture/index.vue
浏览文件 @
269f457a
...
...
@@ -110,9 +110,9 @@
</template>
<
script
>
import
{
examineItem
,
examineList
}
from
'@/pages/mine-picture/mock'
;
import
{
getList
,
createList
}
from
'@/utils/list'
;
import
LoadMore
from
'@/components/LoadMore'
;
import
{
examineItem
,
examineList
}
from
'@/pages/mine-picture/mock'
import
{
getList
,
createList
}
from
'@/utils/list'
import
LoadMore
from
'@/components/LoadMore'
export
default
{
components
:
{
LoadMore
},
...
...
@@ -124,36 +124,36 @@ export default {
examineList
,
list
:
createList
(),
}
;
}
},
onLoad
(
query
)
{
this
.
fetchExamineList
()
;
this
.
fetchExamineList
()
},
methods
:
{
async
fetchExamineList
()
{
const
status
=
this
.
ExamineIdx
+
1
;
const
status
=
this
.
ExamineIdx
+
1
await
getList
(
this
,
'list'
,
[
'/api/app/phototask/list'
,
{
status
}],
{
transform
:
(
list
)
=>
list
.
map
((
value
)
=>
({
...
value
})),
abandon
:
()
=>
status
!==
this
.
ExamineIdx
+
1
,
})
;
console
.
log
(
this
.
list
)
;
})
console
.
log
(
this
.
list
)
},
changeExamine
(
item
,
index
)
{
if
(
this
.
ExamineIdx
===
index
)
return
;
this
.
ExamineIdx
=
index
;
this
.
list
=
createList
()
;
this
.
fetchExamineList
()
;
if
(
this
.
ExamineIdx
===
index
)
return
this
.
ExamineIdx
=
index
this
.
list
=
createList
()
this
.
fetchExamineList
()
},
onItemClick
(
item
,
index
)
{
uni
.
$u
.
route
({
url
:
'pages/mine-picture-detail/index'
,
params
:
{
id
:
item
.
id
}
})
;
uni
.
$u
.
route
({
url
:
'pages/mine-picture-detail/index'
,
params
:
{
id
:
item
.
id
}
})
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine-picture/mock.js
浏览文件 @
269f457a
export
const
examineItem
=
[{
name
:
'审核中'
},
{
name
:
'已通过'
},
{
name
:
'未通过'
}]
;
export
const
examineItem
=
[{
name
:
'审核中'
},
{
name
:
'已通过'
},
{
name
:
'未通过'
}]
export
const
examineList
=
[
{
...
...
@@ -92,4 +92,4 @@ export const examineList = [
position
:
'
\
u4e94
\
u8c61
\
u822a
\
u6d0b
\
u57ce'
,
remark
:
null
,
},
]
;
]
pages/mine/index.vue
浏览文件 @
269f457a
...
...
@@ -39,13 +39,13 @@
</view>
<image
mode=
"aspectFill"
class=
"arrow_right"
src=
"/static/icon/arrow_right1@2x.png"
/>
</view>
<view
class=
"my_items"
@
click=
"getAuthentication"
>
<view
class=
"my_item_left"
>
<image
mode=
"aspectFill"
class=
"task_icon"
src=
"/static/icon/ic_wd_gy@2x.png"
/>
<view
class=
"item_name"
>
{{
!
Look
?
'实名验证'
:
'已完成认证'
}}
</view>
</view>
<image
mode=
"aspectFill"
class=
"arrow_right"
src=
"/static/icon/arrow_right1@2x.png"
/>
</view>
<view
class=
"my_items"
@
click=
"getAuthentication"
>
<view
class=
"my_item_left"
>
<image
mode=
"aspectFill"
class=
"task_icon"
src=
"/static/icon/ic_wd_gy@2x.png"
/>
<view
class=
"item_name"
>
{{
!
Look
?
'实名验证'
:
'已完成认证'
}}
</view>
</view>
<image
mode=
"aspectFill"
class=
"arrow_right"
src=
"/static/icon/arrow_right1@2x.png"
/>
</view>
<!-- 注销登录 -->
<!--
<view
class=
"my_items"
@
click=
"tailor"
>
-->
<!--
<view
class=
"my_item_left"
>
-->
...
...
@@ -57,8 +57,6 @@
</view>
</view>
</view>
</view>
<view
class=
"unauthorized"
v-else
>
...
...
@@ -81,56 +79,53 @@ export default {
token
:
null
,
canIUseGetUserProfile
:
false
,
userDetail
:
{},
Look
:
true
,
}
;
Look
:
true
,
}
},
onLoad
(
query
)
{},
onShow
()
{
this
.
token
=
'1234qwer1234'
;
this
.
fetchUserInfo
()
;
this
.
token
=
'1234qwer1234'
this
.
fetchUserInfo
()
},
methods
:
{
async
fetchUserInfo
()
{
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/user_center/detail'
)
;
console
.
log
(
detail
);
this
.
userDetail
=
detail
;
this
.
Look
=
detail
.
is_real_auth
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/user_center/detail'
)
console
.
log
(
detail
)
this
.
userDetail
=
detail
this
.
Look
=
detail
.
is_real_auth
},
myPhoto
()
{
uni
.
$u
.
route
({
url
:
'pages/mine-picture/index'
})
;
uni
.
$u
.
route
({
url
:
'pages/mine-picture/index'
})
},
about
()
{
uni
.
$u
.
route
({
url
:
'pages/mine-about/index'
});
uni
.
$u
.
route
({
url
:
'pages/mine-about/index'
})
},
getAuthentication
()
{
if
(
!
this
.
Look
)
{
// this.modalShow=true
uni
.
$u
.
route
({
url
:
'pages/Authentication/Authentication'
})
}
else
{
uni
.
$u
.
toast
(
'已经完成实名认证'
)
}
// console.log(123);
},
getAuthentication
(){
if
(
!
this
.
Look
){
// this.modalShow=true
uni
.
$u
.
route
({
url
:
'pages/Authentication/Authentication'
});
}
else
{
uni
.
$u
.
toast
(
'已经完成实名认证'
);
}
// console.log(123);
},
async
tailor
()
{
try
{
await
uni
.
$u
.
http
.
get
(
'/api/user/logout'
,
{
params
:
{
token
:
''
}
})
;
uni
.
$u
.
toast
(
'注销登录成功'
)
;
await
uni
.
$u
.
http
.
get
(
'/api/user/logout'
,
{
params
:
{
token
:
''
}
})
uni
.
$u
.
toast
(
'注销登录成功'
)
}
finally
{
}
},
myIntegral
()
{
uni
.
$u
.
route
({
url
:
'pages/mine-integral/index'
})
;
uni
.
$u
.
route
({
url
:
'pages/mine-integral/index'
})
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/mine/mock.js
浏览文件 @
269f457a
...
...
@@ -9,4 +9,4 @@ export const userDetail = {
created
:
'2021-05-07 10:24:27'
,
is_receive
:
true
,
tag_name
:
''
,
}
;
}
pages/record-content/CertificateTypeActionSheet.vue
浏览文件 @
269f457a
...
...
@@ -5,7 +5,7 @@
</
template
>
<
script
>
import
{
actionsOptions
}
from
'@/pages/record-content/mock'
;
import
{
actionsOptions
}
from
'@/pages/record-content/mock'
export
default
{
name
:
'CertificateTypeActionSheet'
,
...
...
@@ -19,18 +19,18 @@ export default {
return
{
show
:
false
,
actionsOptions
,
}
;
}
},
methods
:
{
async
onActionSheetClose
()
{
this
.
show
=
false
;
this
.
show
=
false
},
async
onActionSheetSelect
(
item
)
{
this
.
success
(
item
)
;
this
.
success
(
item
)
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/record-content/UploadActionSheet.vue
浏览文件 @
269f457a
...
...
@@ -18,18 +18,18 @@ export default {
return
{
show
:
false
,
// actionsOptions,
}
;
}
},
methods
:
{
async
onActionSheetClose
()
{
this
.
show
=
false
;
this
.
show
=
false
},
async
onActionSheetSelect
(
item
)
{
this
.
success
(
item
)
;
this
.
success
(
item
)
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/record-content/index.vue
浏览文件 @
269f457a
差异被折叠。
点击展开。
pages/record-content/mock.js
浏览文件 @
269f457a
export
const
week
=
[
'星期日'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
'星期六'
]
;
export
const
week
=
[
'星期日'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
'星期六'
]
export
const
typeList
=
[
{
...
...
@@ -67,7 +67,7 @@ export const typeList = [
weight
:
6
,
img
:
'https://qiniu.yuhuofei.it/FgxfvMffyGyFb3vzHGp5ieSEwBYl'
,
},
]
;
]
export
const
actionsOptions
=
[
{
...
...
@@ -82,4 +82,4 @@ export const actionsOptions = [
id
:
3
,
name
:
'社保卡'
,
},
]
;
]
pages/record-finish/index.vue
浏览文件 @
269f457a
...
...
@@ -17,18 +17,18 @@ export default {
return
{
backType
:
0
,
path
:
'可在“我的随手拍-审核中”查看'
,
}
;
}
},
methods
:
{
async
backIndex
()
{
if
(
this
.
backType
===
0
)
{
uni
.
reLaunch
({
url
:
'/'
,
})
;
})
}
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/record-type/index.vue
浏览文件 @
269f457a
...
...
@@ -56,37 +56,37 @@ export default {
isFirstRecordType
:
0
,
isFirstRecordTypeId
:
0
,
totalList
:
[]
}
;
totalList
:
[]
,
}
},
computed
:
{
modalHeight
()
{
return
Math
.
ceil
(
window
.
innerHeight
*
2
*
0.6
)
;
return
Math
.
ceil
(
window
.
innerHeight
*
2
*
0.6
)
},
},
onLoad
(
query
)
{
this
.
query
=
query
;
console
.
log
(
query
);
this
.
fetchPhotoTaskTypeData
()
;
this
.
fetchPhotoTaskTypeDetail
()
;
this
.
query
=
query
console
.
log
(
query
)
this
.
fetchPhotoTaskTypeData
()
this
.
fetchPhotoTaskTypeDetail
()
this
.
isFirstRecordType
=
this
.
getIsFirstRecordType
()
;
this
.
isFirstRecordType
=
this
.
getIsFirstRecordType
()
},
onShow
(
options
)
{},
methods
:
{
async
fetchPhotoTaskTypeData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/list'
,
{
params
:
{
parent_id
:
this
.
query
.
id
}
})
;
this
.
list
=
list
;
console
.
log
(
list
);
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/list'
,
{
params
:
{
parent_id
:
this
.
query
.
id
}
})
this
.
list
=
list
console
.
log
(
list
)
// 可分类
if
(
list
.
some
(
v
=>
v
.
category
>
0
))
{
if
(
list
.
some
(
(
v
)
=>
v
.
category
>
0
))
{
this
.
totalList
=
Object
.
keys
(
categoryMap
).
map
((
c
,
index
)
=>
{
const
category
=
+
c
const
data
=
list
.
filter
(
v
=>
v
.
category
===
category
)
const
data
=
list
.
filter
(
(
v
)
=>
v
.
category
===
category
)
const
res
=
{
title
:
categoryMap
[
category
],
data
,
...
...
@@ -99,59 +99,58 @@ export default {
},
async
fetchPhotoTaskTypeDetail
()
{
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
})
;
this
.
title
=
detail
.
name
;
this
.
content
=
detail
.
desc
;
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/detail'
,
{
params
:
{
id
:
this
.
query
.
id
}
})
this
.
title
=
detail
.
name
this
.
content
=
detail
.
desc
},
async
onReportClick
()
{
console
.
log
(
'onReportClick'
)
;
this
.
showReport
=
true
;
console
.
log
(
'onReportClick'
)
this
.
showReport
=
true
},
async
onReportConfirm
()
{
if
(
!
this
.
isFirstRecordType
)
{
this
.
showReport
=
false
;
this
.
isFirstRecordType
=
this
.
getIsFirstRecordType
()
;
this
.
showReport
=
false
this
.
isFirstRecordType
=
this
.
getIsFirstRecordType
()
uni
.
$u
.
route
({
url
:
'pages/record-content/index'
,
params
:
{
parent_id
:
this
.
query
.
id
,
detail_id
:
this
.
isFirstRecordTypeId
,
},
})
;
})
}
this
.
showReport
=
false
;
this
.
showReport
=
false
},
onListClick
(
item
,
index
)
{
if
(
!
this
.
isFirstRecordType
)
{
console
.
log
(
123
,
'Tt'
);
this
.
isFirstRecordTypeId
=
item
.
id
;
this
.
showReport
=
true
;
return
;
console
.
log
(
123
,
'Tt'
)
this
.
isFirstRecordTypeId
=
item
.
id
this
.
showReport
=
true
return
}
console
.
log
(
'ccc'
);
console
.
log
(
'ccc'
)
uni
.
$u
.
route
({
url
:
'pages/record-content/index'
,
params
:
{
parent_id
:
this
.
query
.
id
,
detail_id
:
item
.
id
,
},
})
;
})
},
getIsFirstRecordType
()
{
let
isFirstRecordType
=
uni
.
getStorageSync
(
'isFirstRecordType'
)
;
if
(
!
isFirstRecordType
){
uni
.
setStorageSync
(
'isFirstRecordType'
,
1
);
isFirstRecordType
=
uni
.
getStorageSync
(
'isFirstRecordType'
);
}
return
isFirstRecordType
;
let
isFirstRecordType
=
uni
.
getStorageSync
(
'isFirstRecordType'
)
if
(
!
isFirstRecordType
)
{
uni
.
setStorageSync
(
'isFirstRecordType'
,
1
)
isFirstRecordType
=
uni
.
getStorageSync
(
'isFirstRecordType'
)
}
return
isFirstRecordType
},
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/record-type/mock.js
浏览文件 @
269f457a
...
...
@@ -2,7 +2,7 @@ export const iconType = new Map([
[
10
,
'交通违法'
],
[
20
,
'不文明'
],
[
30
,
'设施故障'
],
])
;
])
export
const
iconList
=
[
{
...
...
@@ -197,4 +197,4 @@ export const iconList = [
name
:
'渣土车'
,
icon
:
'/static/record-icon/ic_hjbh_7@2x.png'
,
},
]
;
]
pages/record/index.vue
浏览文件 @
269f457a
...
...
@@ -32,7 +32,6 @@
</u-modal>
-->
</view>
</view>
</
template
>
...
...
@@ -53,7 +52,7 @@ const _list = [
icon
:
'/static/icon/ic-gz@2x.png'
,
background
:
'linear-gradient(156deg,#ffdc8b 0%, #ffb00d 100%)'
,
},
]
;
]
const
faultName
=
'交通设施故障上报'
...
...
@@ -71,70 +70,75 @@ export default {
faultTask
:
{
id
:
0
,
parent
:
{
id
:
0
}
},
activeItem
:
{},
modalShow
:
false
,
}
;
}
},
computed
:
{
modalHeight
()
{
// console.log(innerHeight);
return
Math
.
ceil
(
window
.
innerHeight
*
2
*
0.6
)
;
// console.log(innerHeight);
return
Math
.
ceil
(
window
.
innerHeight
*
2
*
0.6
)
},
},
onLoad
(
query
)
{
this
.
fetchPhotoTaskTypeData
()
;
this
.
fetchPhotoTaskTypeData
()
// this.fetchPhotoTaskTypeDetail();
this
.
isFirstRecord
=
this
.
getIsFirstRecord
()
;
// console.log(this.isFirstRecord);
this
.
isFirstRecord
=
this
.
getIsFirstRecord
()
// console.log(this.isFirstRecord);
},
onShow
(
options
)
{},
methods
:
{
async
fetchPhotoTaskTypeData
()
{
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/list'
,
{
params
:
{
parent_id
:
0
}
})
;
this
.
list
=
list
.
map
((
value
,
index
)
=>
({
...
value
,
background
:
_list
[
index
].
background
}))
;
const
{
list
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/list'
,
{
params
:
{
parent_id
:
0
}
})
this
.
list
=
list
.
map
((
value
,
index
)
=>
({
...
value
,
background
:
_list
[
index
].
background
}))
const
fault
=
this
.
list
.
find
(
v
=>
v
.
name
===
faultName
)
const
fault
=
this
.
list
.
find
(
(
v
)
=>
v
.
name
===
faultName
)
this
.
fetchFalutTask
(
fault
.
id
)
},
async
fetchPhotoTaskTypeDetail
()
{
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/detail'
,
{
params
:
{
id
:
0
}
})
;
const
{
detail
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/detail'
,
{
params
:
{
id
:
0
}
})
// console.log(detail);
},
async
fetchFalutTask
(
id
)
{
const
{
list
:
[
task
]
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/list'
,
{
params
:
{
parent_id
:
id
}
})
const
{
list
:
[
task
],
}
=
await
uni
.
$u
.
http
.
get
(
'/api/app/phototasktype/list'
,
{
params
:
{
parent_id
:
id
}
})
this
.
faultTask
=
task
},
async
onReportClick
()
{
console
.
log
(
'onReportClick'
)
;
this
.
showReport
=
true
;
console
.
log
(
'onReportClick'
)
this
.
showReport
=
true
},
async
onReportConfirm
()
{
if
(
!
this
.
isFirstRecord
)
{
this
.
showReport
=
false
;
this
.
isFirstRecord
=
this
.
getIsFirstRecord
()
;
uni
.
$u
.
route
({
url
:
'pages/record-type/index'
,
params
:
{
id
:
this
.
isFirstRecordId
}
})
;
this
.
showReport
=
false
this
.
isFirstRecord
=
this
.
getIsFirstRecord
()
uni
.
$u
.
route
({
url
:
'pages/record-type/index'
,
params
:
{
id
:
this
.
isFirstRecordId
}
})
}
this
.
showReport
=
false
;
this
.
showReport
=
false
},
_onListClick
(
item
,
index
)
{
const
{
name
}
=
item
// 交通设施故障上报直接进入填写表单
if
(
name
===
faultName
)
{
const
{
id
,
parent
:
{
id
:
parentId
}
}
=
this
.
faultTask
const
{
id
,
parent
:
{
id
:
parentId
},
}
=
this
.
faultTask
uni
.
$u
.
route
({
url
:
'pages/record-content/index'
,
params
:
{
parent_id
:
parentId
,
detail_id
:
id
,
},
})
;
})
return
}
this
.
activeItem
=
item
...
...
@@ -142,40 +146,38 @@ export default {
},
onListClick
(
item
,
index
)
{
// console.log(this.isFirstRecord);
// console.log(this.isFirstRecord);
if
(
!
this
.
isFirstRecord
)
{
// console.log(123);
this
.
isFirstRecordId
=
item
.
id
;
this
.
showReport
=
true
;
return
;
// console.log(123);
this
.
isFirstRecordId
=
item
.
id
this
.
showReport
=
true
return
}
// console.log(123,'ttc');
uni
.
$u
.
route
({
url
:
'pages/record-type/index'
,
params
:
{
id
:
item
.
id
,
}
,
});
// console.log(123,'ttc');
uni
.
$u
.
route
({
url
:
'pages/record-type/index'
,
params
:
{
id
:
item
.
id
,
},
})
},
getIsFirstRecord
()
{
let
isFirstRecord
=
uni
.
getStorageSync
(
'isFirstRecord'
)
;
if
(
!
isFirstRecord
){
uni
.
setStorageSync
(
'isFirstRecord'
,
1
)
isFirstRecord
=
uni
.
getStorageSync
(
'isFirstRecord'
);
}
;
return
isFirstRecord
;
let
isFirstRecord
=
uni
.
getStorageSync
(
'isFirstRecord'
)
if
(
!
isFirstRecord
)
{
uni
.
setStorageSync
(
'isFirstRecord'
,
1
)
isFirstRecord
=
uni
.
getStorageSync
(
'isFirstRecord'
)
}
return
isFirstRecord
},
onModalConfirm
()
{
this
.
modalShow
=
false
this
.
onListClick
(
this
.
activeItem
)
}
}
,
},
}
;
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
uni.scss
浏览文件 @
269f457a
...
...
@@ -22,32 +22,32 @@ $uni-color-warning: #f0ad4e;
$uni-color-error
:
#dd524d
;
/* 文字基本颜色 */
$uni-text-color
:
#333
;
//基本色
$uni-text-color-inverse
:
#fff
;
//反色
$uni-text-color-grey
:
#999
;
//辅助灰色,如加载更多的提示信息
$uni-text-color
:
#333
;
//基本色
$uni-text-color-inverse
:
#fff
;
//反色
$uni-text-color-grey
:
#999
;
//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder
:
#808080
;
$uni-text-color-disable
:
#c0c0c0
;
$uni-text-color-disable
:
#c0c0c0
;
/* 背景颜色 */
$uni-bg-color
:
#ffffff
;
$uni-bg-color-grey
:
#f8f8f8
;
$uni-bg-color-hover
:
#f1f1f1
;
//点击状态颜色
$uni-bg-color-mask
:
rgba
(
0
,
0
,
0
,
0
.4
);
//遮罩颜色
$uni-bg-color
:
#ffffff
;
$uni-bg-color-grey
:
#f8f8f8
;
$uni-bg-color-hover
:
#f1f1f1
;
//点击状态颜色
$uni-bg-color-mask
:
rgba
(
0
,
0
,
0
,
0
.4
);
//遮罩颜色
/* 边框颜色 */
$uni-border-color
:
#c8c7cc
;
$uni-border-color
:
#c8c7cc
;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm
:
12px
;
$uni-font-size-base
:
14px
;
$uni-font-size-lg
:
16
;
$uni-font-size-sm
:
12px
;
$uni-font-size-base
:
14px
;
$uni-font-size-lg
:
16
;
/* 图片尺寸 */
$uni-img-size-sm
:
20px
;
$uni-img-size-base
:
26px
;
$uni-img-size-lg
:
40px
;
$uni-img-size-sm
:
20px
;
$uni-img-size-base
:
26px
;
$uni-img-size-lg
:
40px
;
/* Border Radius */
$uni-border-radius-sm
:
2px
;
...
...
@@ -69,9 +69,9 @@ $uni-spacing-col-lg: 12px;
$uni-opacity-disabled
:
0
.3
;
// 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title
:
#2
C405A
;
// 文章标题颜色
$uni-font-size-title
:
20px
;
$uni-color-title
:
#2
c405a
;
// 文章标题颜色
$uni-font-size-title
:
20px
;
$uni-color-subtitle
:
#555555
;
// 二级标题颜色
$uni-font-size-subtitle
:
26px
;
$uni-color-paragraph
:
#3
F536E
;
// 文章段落颜色
$uni-font-size-paragraph
:
15px
;
$uni-font-size-subtitle
:
26px
;
$uni-color-paragraph
:
#3
f536e
;
// 文章段落颜色
$uni-font-size-paragraph
:
15px
;
utils/list.js
浏览文件 @
269f457a
import
Vue
from
'vue'
;
import
Vue
from
'vue'
const
request
=
uni
.
$u
.
http
;
const
noMoreStatus
=
'nomore'
;
const
get
=
request
.
get
.
bind
(
request
)
;
const
request
=
uni
.
$u
.
http
const
noMoreStatus
=
'nomore'
const
get
=
request
.
get
.
bind
(
request
)
const
createList
=
(
config
=
{})
=>
({
requesting
:
false
,
...
...
@@ -10,54 +10,54 @@ const createList = (config = {}) => ({
page
:
0
,
data
:
[],
...
config
,
})
;
})
const
getStatus
=
(
res
)
=>
{
const
{
has_next
:
hasNext
,
total_count
:
total
}
=
res
;
return
total
===
0
?
'empty'
:
hasNext
?
'loading'
:
noMoreStatus
;
}
;
const
{
has_next
:
hasNext
,
total_count
:
total
}
=
res
return
total
===
0
?
'empty'
:
hasNext
?
'loading'
:
noMoreStatus
}
const
getList
=
async
(
context
,
listKey
=
''
,
req
=
[],
options
=
{})
=>
{
const
{
transform
=
(
data
)
=>
data
,
mergeData
,
abandon
=
()
=>
false
,
beforeSetData
=
()
=>
{},
callback
=
()
=>
{}
}
=
options
;
const
{
transform
=
(
data
)
=>
data
,
mergeData
,
abandon
=
()
=>
false
,
beforeSetData
=
()
=>
{},
callback
=
()
=>
{}
}
=
options
const
getTarget
=
()
=>
context
[
listKey
]
;
const
list
=
getTarget
()
;
const
getTarget
=
()
=>
context
[
listKey
]
const
list
=
getTarget
()
const
setList
=
(
value
)
=>
Vue
.
set
(
context
,
listKey
,
value
)
;
const
setKey
=
(
key
,
value
)
=>
Vue
.
set
(
getTarget
(),
key
,
value
)
;
const
setList
=
(
value
)
=>
Vue
.
set
(
context
,
listKey
,
value
)
const
setKey
=
(
key
,
value
)
=>
Vue
.
set
(
getTarget
(),
key
,
value
)
if
(
list
.
requesting
||
list
.
status
===
noMoreStatus
)
return
;
if
(
list
.
requesting
||
list
.
status
===
noMoreStatus
)
return
setKey
(
'requesting'
,
true
)
;
const
newPage
=
list
.
page
+
1
;
setKey
(
'requesting'
,
true
)
const
newPage
=
list
.
page
+
1
try
{
let
res
;
let
res
if
(
req
instanceof
Promise
)
{
res
=
await
req
;
res
=
await
req
}
else
{
const
[
url
,
data
,
...
restParams
]
=
Array
.
isArray
(
req
)
?
req
:
[
req
]
;
const
params
=
{
page
:
newPage
,
page_num
:
newPage
,
...
data
}
;
res
=
await
get
(
url
,
{
params
},
...
restParams
)
;
const
[
url
,
data
,
...
restParams
]
=
Array
.
isArray
(
req
)
?
req
:
[
req
]
const
params
=
{
page
:
newPage
,
page_num
:
newPage
,
...
data
}
res
=
await
get
(
url
,
{
params
},
...
restParams
)
}
if
(
abandon
())
return
;
const
newListData
=
transform
(
res
.
list
)
;
if
(
abandon
())
return
const
newListData
=
transform
(
res
.
list
)
const
newList
=
{
...
list
,
total
:
res
.
total_count
,
status
:
getStatus
(
res
),
page
:
newPage
,
data
:
mergeData
?
mergeData
(
list
.
data
,
newListData
)
:
newPage
===
1
?
newListData
:
[...
list
.
data
,
...
newListData
],
}
;
beforeSetData
()
;
setList
(
newList
)
;
return
Promise
.
resolve
(
res
)
;
}
beforeSetData
()
setList
(
newList
)
return
Promise
.
resolve
(
res
)
}
catch
(
e
)
{
console
.
error
(
'getList:'
,
e
)
;
setList
({
...
list
,
status
:
'error'
})
;
console
.
error
(
'getList:'
,
e
)
setList
({
...
list
,
status
:
'error'
})
}
finally
{
setKey
(
'requesting'
,
false
)
;
setKey
(
'requesting'
,
false
)
}
}
;
}
export
{
createList
,
getList
}
;
export
{
createList
,
getList
}
utils/request.js
浏览文件 @
269f457a
...
...
@@ -2,41 +2,41 @@
module
.
exports
=
(
vm
)
=>
{
// 初始化请求配置
uni
.
$u
.
http
.
setConfig
((
config
)
=>
{
return
config
;
})
;
return
config
})
// 请求拦截
uni
.
$u
.
http
.
interceptors
.
request
.
use
(
(
config
)
=>
{
config
.
data
=
config
.
data
||
{}
;
config
.
data
=
config
.
data
||
{}
config
.
params
.
token
=
'd957a00e9a9834b7fda7578f334cb67e'
;
return
config
;
config
.
params
.
token
=
'd957a00e9a9834b7fda7578f334cb67e'
return
config
},
(
config
)
=>
{
return
Promise
.
reject
(
config
)
;
return
Promise
.
reject
(
config
)
}
)
;
)
// 响应拦截
uni
.
$u
.
http
.
interceptors
.
response
.
use
(
(
response
)
=>
{
const
data
=
response
.
data
;
const
data
=
response
.
data
if
(
data
.
errcode
)
{
if
(
data
.
errcode
===
302
)
{
uni
.
$u
.
toast
(
data
.
msg
)
;
window
.
location
.
href
=
data
.
data
.
location
;
return
Promise
.
reject
(
response
)
;
uni
.
$u
.
toast
(
data
.
msg
)
window
.
location
.
href
=
data
.
data
.
location
return
Promise
.
reject
(
response
)
}
uni
.
$u
.
toast
(
data
.
msg
)
;
return
Promise
.
reject
(
response
)
;
uni
.
$u
.
toast
(
data
.
msg
)
return
Promise
.
reject
(
response
)
}
return
data
.
data
===
undefined
?
{}
:
data
.
data
;
return
data
.
data
===
undefined
?
{}
:
data
.
data
},
(
response
)
=>
{
// 对响应错误做点什么 (statusCode !== 200)
return
Promise
.
reject
(
response
)
;
return
Promise
.
reject
(
response
)
}
)
;
}
;
)
}
utils/util.js
浏览文件 @
269f457a
...
...
@@ -4,9 +4,9 @@
// const baseURL = 'http://192.168.50.242:8026';
// 向外暴露一个方法 myRequest
export
const
myRequest
=
(
options
)
=>
{
let
headers
=
{}
;
let
headers
=
{}
// headers["Content-Type"] = "multipart/form-data";
headers
[
'Content-Type'
]
=
'application/json'
;
headers
[
'Content-Type'
]
=
'application/json'
// headers["Content-Type"] = "application/x-www-form-urlencoded";
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -22,116 +22,116 @@ export const myRequest = (options) => {
success
:
(
res
)
=>
{
// 此判断可根据自己需要更改
if
(
res
.
statusCode
==
500
)
{
reject
(
res
)
;
reject
(
res
)
return
uni
.
showToast
({
title
:
'网络错误!'
,
icon
:
'none'
,
})
;
})
}
resolve
(
res
)
;
resolve
(
res
)
},
// 请求失败
fail
:
(
err
)
=>
{
uni
.
showToast
({
title
:
'请求接口失败!'
,
icon
:
'none'
,
})
;
reject
(
err
)
;
})
reject
(
err
)
},
//请求结束之后,执行的回调函数(成功或失败都会执行)
complete
()
{
//隐藏loading
// uni.hideLoading()
},
})
;
})
;
}
;
})
})
}
export
const
getPrice
=
(
value
=
0
)
=>
Number
(
value
??
0
)
/
100
;
export
const
getPrice
=
(
value
=
0
)
=>
Number
(
value
??
0
)
/
100
// 复制
export
const
myCopy
=
(
txt
=
''
)
=>
{
const
input
=
document
.
createElement
(
'input'
)
;
// 创建一个新input标签
input
.
setAttribute
(
'readonly'
,
'readonly'
)
;
// 设置input标签只读属性
input
.
setAttribute
(
'value'
,
txt
)
;
// 设置input value值为需要复制的内容
document
.
body
.
appendChild
(
input
)
;
// 添加input标签到页面
input
.
select
()
;
// 选中input内容
input
.
setSelectionRange
(
0
,
9999
)
;
// 设置选中input内容范围
document
.
execCommand
(
'copy'
)
;
// 复制
document
.
body
.
removeChild
(
input
)
;
// 删除新创建的input标签
const
input
=
document
.
createElement
(
'input'
)
// 创建一个新input标签
input
.
setAttribute
(
'readonly'
,
'readonly'
)
// 设置input标签只读属性
input
.
setAttribute
(
'value'
,
txt
)
// 设置input value值为需要复制的内容
document
.
body
.
appendChild
(
input
)
// 添加input标签到页面
input
.
select
()
// 选中input内容
input
.
setSelectionRange
(
0
,
9999
)
// 设置选中input内容范围
document
.
execCommand
(
'copy'
)
// 复制
document
.
body
.
removeChild
(
input
)
// 删除新创建的input标签
//此处可以设置一个弹窗提示
uni
.
$u
.
toast
(
'复制成功'
)
;
}
;
uni
.
$u
.
toast
(
'复制成功'
)
}
// 图片水印
const
base64_encode
=
(
str
)
=>
{
// 下面是64个基本的编码
const
base64EncodeChars
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
;
let
out
;
let
i
;
let
len
;
let
c1
;
let
c2
;
let
c3
;
len
=
str
.
length
;
i
=
0
;
out
=
''
;
const
base64EncodeChars
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
let
out
let
i
let
len
let
c1
let
c2
let
c3
len
=
str
.
length
i
=
0
out
=
''
while
(
i
<
len
)
{
c1
=
str
.
charCodeAt
(
i
++
)
&
0xff
;
c1
=
str
.
charCodeAt
(
i
++
)
&
0xff
if
(
i
===
len
)
{
out
+=
base64EncodeChars
.
charAt
(
c1
>>
2
)
;
out
+=
base64EncodeChars
.
charAt
((
c1
&
0x3
)
<<
4
)
;
out
+=
'=='
;
break
;
out
+=
base64EncodeChars
.
charAt
(
c1
>>
2
)
out
+=
base64EncodeChars
.
charAt
((
c1
&
0x3
)
<<
4
)
out
+=
'=='
break
}
c2
=
str
.
charCodeAt
(
i
++
)
;
c2
=
str
.
charCodeAt
(
i
++
)
if
(
i
===
len
)
{
out
+=
base64EncodeChars
.
charAt
(
c1
>>
2
)
;
out
+=
base64EncodeChars
.
charAt
(((
c1
&
0x3
)
<<
4
)
|
((
c2
&
0xf0
)
>>
4
))
;
out
+=
base64EncodeChars
.
charAt
((
c2
&
0xf
)
<<
2
)
;
out
+=
'='
;
break
;
out
+=
base64EncodeChars
.
charAt
(
c1
>>
2
)
out
+=
base64EncodeChars
.
charAt
(((
c1
&
0x3
)
<<
4
)
|
((
c2
&
0xf0
)
>>
4
))
out
+=
base64EncodeChars
.
charAt
((
c2
&
0xf
)
<<
2
)
out
+=
'='
break
}
c3
=
str
.
charCodeAt
(
i
++
)
;
out
+=
base64EncodeChars
.
charAt
(
c1
>>
2
)
;
out
+=
base64EncodeChars
.
charAt
(((
c1
&
0x3
)
<<
4
)
|
((
c2
&
0xf0
)
>>
4
))
;
out
+=
base64EncodeChars
.
charAt
(((
c2
&
0xf
)
<<
2
)
|
((
c3
&
0xc0
)
>>
6
))
;
out
+=
base64EncodeChars
.
charAt
(
c3
&
0x3f
)
;
c3
=
str
.
charCodeAt
(
i
++
)
out
+=
base64EncodeChars
.
charAt
(
c1
>>
2
)
out
+=
base64EncodeChars
.
charAt
(((
c1
&
0x3
)
<<
4
)
|
((
c2
&
0xf0
)
>>
4
))
out
+=
base64EncodeChars
.
charAt
(((
c2
&
0xf
)
<<
2
)
|
((
c3
&
0xc0
)
>>
6
))
out
+=
base64EncodeChars
.
charAt
(
c3
&
0x3f
)
}
return
out
;
}
;
return
out
}
const
utf16to8
=
(
str
)
=>
{
let
out
;
let
i
;
let
len
;
let
c
;
out
=
''
;
len
=
str
.
length
;
let
out
let
i
let
len
let
c
out
=
''
len
=
str
.
length
for
(
i
=
0
;
i
<
len
;
i
++
)
{
c
=
str
.
charCodeAt
(
i
)
;
c
=
str
.
charCodeAt
(
i
)
if
(
c
>=
0x0001
&&
c
<=
0x007f
)
{
out
+=
str
.
charAt
(
i
)
;
out
+=
str
.
charAt
(
i
)
}
else
if
(
c
>
0x07ff
)
{
out
+=
String
.
fromCharCode
(
0xe0
|
((
c
>>
12
)
&
0x0f
))
;
out
+=
String
.
fromCharCode
(
0x80
|
((
c
>>
6
)
&
0x3f
))
;
out
+=
String
.
fromCharCode
(
0x80
|
((
c
>>
0
)
&
0x3f
))
;
out
+=
String
.
fromCharCode
(
0xe0
|
((
c
>>
12
)
&
0x0f
))
out
+=
String
.
fromCharCode
(
0x80
|
((
c
>>
6
)
&
0x3f
))
out
+=
String
.
fromCharCode
(
0x80
|
((
c
>>
0
)
&
0x3f
))
}
else
{
out
+=
String
.
fromCharCode
(
0xc0
|
((
c
>>
6
)
&
0x1f
))
;
out
+=
String
.
fromCharCode
(
0x80
|
((
c
>>
0
)
&
0x3f
))
;
out
+=
String
.
fromCharCode
(
0xc0
|
((
c
>>
6
)
&
0x1f
))
out
+=
String
.
fromCharCode
(
0x80
|
((
c
>>
0
)
&
0x3f
))
}
}
return
out
;
}
;
return
out
}
export
const
baseEncode
=
(
str
)
=>
{
return
base64_encode
(
utf16to8
(
str
))
;
}
;
return
base64_encode
(
utf16to8
(
str
))
}
export
const
getImageInfo
=
src
=>
{
export
const
getImageInfo
=
(
src
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
getImageInfo
({
src
,
success
:
resolve
,
fail
:
reject
})
})
}
export
default
myRequest
;
export
default
myRequest
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论