Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-starter
提交
af43a4dd
U
uni-starter
项目概览
DCloud
/
uni-starter
通知
4744
Star
231
Fork
211
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
6
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
6
Issue
6
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
af43a4dd
编写于
12月 13, 2021
作者:
study夏羽
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:积分测试超时
上级
26c87596
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
287 addition
and
276 deletion
+287
-276
common/appInit.js
common/appInit.js
+1
-0
components/uni-send-sms-code/uni-send-sms-code.vue
components/uni-send-sms-code/uni-send-sms-code.vue
+31
-1
env.js
env.js
+1
-1
main.js
main.js
+1
-0
manifest.json
manifest.json
+182
-213
package.json
package.json
+7
-7
pages/list/list.nvue
pages/list/list.nvue
+4
-4
pages/list/search/search.test.js
pages/list/search/search.test.js
+1
-3
pages/ucenter/about/about.test.js
pages/ucenter/about/about.test.js
+7
-7
pages/ucenter/about/about.vue
pages/ucenter/about/about.vue
+2
-0
pages/ucenter/login-page/pwd-login/pwd-login.test.js
pages/ucenter/login-page/pwd-login/pwd-login.test.js
+6
-6
pages/ucenter/settings/settings.test.js
pages/ucenter/settings/settings.test.js
+0
-2
pages/ucenter/ucenter.test.js
pages/ucenter/ucenter.test.js
+2
-1
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+12
-5
pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js
pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js
+3
-2
pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
+3
-0
pages/ucenter/userinfo/userinfo.test.js
pages/ucenter/userinfo/userinfo.test.js
+8
-15
pages/ucenter/userinfo/userinfo.vue
pages/ucenter/userinfo/userinfo.vue
+16
-9
static/screenshot/about-app.png
static/screenshot/about-app.png
+0
-0
static/screenshot/about-h5.png
static/screenshot/about-h5.png
+0
-0
static/screenshot/about-mp.jpg
static/screenshot/about-mp.jpg
+0
-0
static/screenshot/about-mp.png
static/screenshot/about-mp.png
+0
-0
未找到文件。
common/appInit.js
浏览文件 @
af43a4dd
...
@@ -95,6 +95,7 @@ export default async function() {
...
@@ -95,6 +95,7 @@ export default async function() {
url
:
'
/pages/ucenter/login-page/index/index
'
url
:
'
/pages/ucenter/login-page/index/index
'
})
})
}
}
return
code
}
}
// 绑定clientDB错误事件
// 绑定clientDB错误事件
db
.
on
(
'
error
'
,
onDBError
)
db
.
on
(
'
error
'
,
onDBError
)
...
...
components/uni-send-sms-code/uni-send-sms-code.vue
浏览文件 @
af43a4dd
...
@@ -85,6 +85,36 @@
...
@@ -85,6 +85,36 @@
"
type
"
:
this
.
codeType
"
type
"
:
this
.
codeType
},
},
},
},
}).
then
(({
result
})
=>
{
console
.
log
(
result
);
if
(
result
.
code
===
0
){
uni
.
showToast
({
title
:
this
.
$t
(
'
smsCode.sendSuccessTip
'
),
icon
:
'
none
'
});
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
this
.
$emit
(
'
getCode
'
);
}
else
{
uni
.
showModal
({
content
:
result
.
msg
,
showCancel
:
false
});
}
return
result
}).
catch
((
reason
)
=>
{
console
.
log
(
reason
,
'
reason----
'
);
return
reason
})
/* return await uniCloud.callFunction({
name: 'uni-id-cf',
data: {
action: 'sendSmsCode',
params: {
"mobile": this.phone,
"type": this.codeType
},
},
success: ({result}) => {
success: ({result}) => {
console.log(result);
console.log(result);
if(result.code===0){
if(result.code===0){
...
@@ -102,7 +132,7 @@
...
@@ -102,7 +132,7 @@
});
});
}
}
}
}
})
})
*/
},
},
getCode
()
{
getCode
()
{
if
(
this
.
reverseNumber
==
0
)
{
if
(
this
.
reverseNumber
==
0
)
{
...
...
env.js
浏览文件 @
af43a4dd
...
@@ -18,7 +18,7 @@ module.exports = {
...
@@ -18,7 +18,7 @@ module.exports = {
},
},
"
app-plus
"
:
{
"
app-plus
"
:
{
"
android
"
:
{
"
android
"
:
{
"
id
"
:
"
d3a144fa
"
,
"
id
"
:
"
a6160e9d
"
,
"
executablePath
"
:
"
D:
\\
HX
\\
alpha-3.1.3
\\
HBuilderX
\\
plugins
\\
launcher
\\
base
\\
android_base.apk
"
"
executablePath
"
:
"
D:
\\
HX
\\
alpha-3.1.3
\\
HBuilderX
\\
plugins
\\
launcher
\\
base
\\
android_base.apk
"
},
},
"
version
"
:
"
D:
\\
HX
\\
alpha-3.1.3
\\
HBuilderX
\\
plugins
\\
launcher
\\
base
\\
version.txt
"
,
"
version
"
:
"
D:
\\
HX
\\
alpha-3.1.3
\\
HBuilderX
\\
plugins
\\
launcher
\\
base
\\
version.txt
"
,
...
...
main.js
浏览文件 @
af43a4dd
...
@@ -2,6 +2,7 @@ import App from './App'
...
@@ -2,6 +2,7 @@ import App from './App'
import
store
from
'
./store
'
import
store
from
'
./store
'
import
i18n
from
'
./lang/i18n
'
import
i18n
from
'
./lang/i18n
'
uni
.
showModal
=
()
=>
{};
// #ifndef VUE3
// #ifndef VUE3
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
...
...
manifest.json
浏览文件 @
af43a4dd
{
{
"name"
:
"uni-starter"
,
"name"
:
"uni-starter"
,
"appid"
:
"请点击重新获取"
,
"appid"
:
"__UNI__D53040B"
,
"description"
:
"云端一体应用快速开发模版"
,
"description"
:
"云端一体应用快速开发模版"
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
"app-plus"
:
{
"app-plus"
:
{
"locales"
:
{
"locales"
:
{
"en"
:
{
"en"
:
{
"name"
:
"uni-starter"
,
"name"
:
"uni-starter"
,
"android"
:
{
"android"
:
{
"strings"
:
{
"strings"
:
{
"CustomKey"
:
"CustomValue"
"CustomKey"
:
"CustomValue"
}
}
},
"ios"
:
{
"privacyDescription"
:
{
"NSPhotoLibraryUsageDescription"
:
"access to the user’s photo library(read)"
},
"infoPlist"
:
{
"CustomKey"
:
"CustomValue"
}
}
},
"zh"
:
{
"name"
:
"统一应用基本项目"
}
},
},
"ios"
:
{
"privacy"
:
{
"privacyDescription"
:
{
"prompt"
:
"template"
,
"NSPhotoLibraryUsageDescription"
:
"access to the user’s photo library(read)"
"template"
:
{
},
"title"
:
"服务协议和隐私政策"
,
"infoPlist"
:
{
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"CustomKey"
:
"CustomValue"
"buttonAccept"
:
"同意"
,
}
"buttonRefuse"
:
"暂不同意"
}
}
},
"zh"
:
{
"name"
:
"统一应用基本项目"
}
},
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"暂不同意"
}
},
"compatible"
:
{
"ignoreVersion"
:
true
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
false
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
"modules"
:
{
"Fingerprint"
:
{
},
"Share"
:
{
},
"OAuth"
:
{
},
"FaceID"
:
{
},
"Geolocation"
:
{
},
"Push"
:
{
},
"Bluetooth"
:
{
}
},
"distribute"
:
{
"android"
:
{
"permissions"
:
[
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{
},
"weixin"
:
{
"appid"
:
""
,
"appsecret"
:
""
,
"UniversalLinks"
:
""
},
"univerify"
:
{
}
},
},
"ad"
:
{
"compatible"
:
{
"gdt"
:
{
"ignoreVersion"
:
true
},
"csj"
:
{
}
},
},
"share"
:
{
"usingComponents"
:
true
,
"weixin"
:
{
"nvueStyleCompiler"
:
"uni-app"
,
"appid"
:
""
,
"compilerVersion"
:
3
,
"UniversalLinks"
:
""
"splashscreen"
:
{
}
"alwaysShowBeforeRender"
:
false
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
},
"geolocation"
:
{
"modules"
:
{
"baidu"
:
{
"Fingerprint"
:
{},
"__platform__"
:
[
"Share"
:
{},
"ios"
,
"OAuth"
:
{},
"android"
"FaceID"
:
{},
],
"Push"
:
{},
"appkey_ios"
:
"请填写地图的key"
,
"Bluetooth"
:
{}
"appkey_android"
:
"请填写地图的key"
}
},
},
"push"
:
{
"distribute"
:
{
"unipush"
:
{
"android"
:
{
}
"permissions"
:
[
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{},
"weixin"
:
{
"appid"
:
""
,
"appsecret"
:
""
,
"UniversalLinks"
:
""
},
"univerify"
:
{}
},
"ad"
:
{
"gdt"
:
{},
"csj"
:
{}
},
"share"
:
{
"weixin"
:
{
"appid"
:
""
,
"UniversalLinks"
:
""
}
},
"geolocation"
:
{},
"push"
:
{
"unipush"
:
{}
},
"payment"
:
{}
},
"icons"
:
{
"android"
:
{
"hdpi"
:
""
,
"xhdpi"
:
""
,
"xxhdpi"
:
""
,
"xxxhdpi"
:
""
},
"ios"
:
{
"appstore"
:
""
,
"ipad"
:
{
"app"
:
""
,
"app@2x"
:
""
,
"notification"
:
""
,
"notification@2x"
:
""
,
"proapp@2x"
:
""
,
"settings"
:
""
,
"settings@2x"
:
""
,
"spotlight"
:
""
,
"spotlight@2x"
:
""
},
"iphone"
:
{
"app@2x"
:
""
,
"app@3x"
:
""
,
"notification@2x"
:
""
,
"notification@3x"
:
""
,
"settings@2x"
:
""
,
"settings@3x"
:
""
,
"spotlight@2x"
:
""
,
"spotlight@3x"
:
""
}
}
},
"splashscreen"
:
{
"iosStyle"
:
"common"
,
"androidStyle"
:
"common"
,
"useOriginalMsgbox"
:
true
}
},
},
"payment"
:
{
"nvueLaunchMode"
:
""
}
},
},
"quickapp"
:
{},
"icons"
:
{
"mp-weixin"
:
{
"android"
:
{
"appid"
:
"wx81dbb061d2258234"
,
"hdpi"
:
""
,
"setting"
:
{
"xhdpi"
:
""
,
"urlCheck"
:
false
,
"xxhdpi"
:
""
,
"es6"
:
false
"xxxhdpi"
:
""
},
},
"ios"
:
{
"usingComponents"
:
true
,
"appstore"
:
""
,
"betterScopedSlots"
:
true
,
"ipad"
:
{
"permission"
:
{
"app"
:
""
,
"scope.userLocation"
:
{
"app@2x"
:
""
,
"desc"
:
"演示在onShow生命周期获取地理位置"
"notification"
:
""
,
}
"notification@2x"
:
""
,
"proapp@2x"
:
""
,
"settings"
:
""
,
"settings@2x"
:
""
,
"spotlight"
:
""
,
"spotlight@2x"
:
""
},
"iphone"
:
{
"app@2x"
:
""
,
"app@3x"
:
""
,
"notification@2x"
:
""
,
"notification@3x"
:
""
,
"settings@2x"
:
""
,
"settings@3x"
:
""
,
"spotlight@2x"
:
""
,
"spotlight@3x"
:
""
}
}
}
},
"splashscreen"
:
{
"iosStyle"
:
"common"
,
"androidStyle"
:
"common"
,
"useOriginalMsgbox"
:
true
}
},
},
"nvueLaunchMode"
:
""
"mp-alipay"
:
{
},
"usingComponents"
:
true
"quickapp"
:
{
},
},
"mp-baidu"
:
{
"mp-weixin"
:
{
"usingComponents"
:
true
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
false
},
},
"usingComponents"
:
true
,
"mp-toutiao"
:
{
"betterScopedSlots"
:
true
,
"usingComponents"
:
true
"permission"
:
{
},
"scope.userLocation"
:
{
"uniStatistics"
:
{
"desc"
:
"演示在onShow生命周期获取地理位置"
"enable"
:
false
}
},
}
"h5"
:
{
},
"template"
:
""
,
"mp-alipay"
:
{
"sdkConfigs"
:
{
"usingComponents"
:
true
"maps"
:
{
},
"qqmap"
:
{
"mp-baidu"
:
{
"key"
:
""
"usingComponents"
:
true
}
},
}
"mp-toutiao"
:
{
},
"usingComponents"
:
true
"router"
:
{
},
"base"
:
""
"uniStatistics"
:
{
"enable"
:
false
},
"h5"
:
{
"template"
:
""
,
"sdkConfigs"
:
{
"maps"
:
{
"qqmap"
:
{
"key"
:
""
}
}
}
},
},
"router"
:
{
"_spaceID"
:
""
,
"base"
:
""
"vueVersion"
:
"2"
}
},
"_spaceID"
:
""
,
"vueVersion"
:
"2"
}
}
package.json
浏览文件 @
af43a4dd
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
"version"
:
"1.1.24"
,
"version"
:
"1.1.24"
,
"description"
:
"云端一体应用快速开发基本项目模版"
,
"description"
:
"云端一体应用快速开发基本项目模版"
,
"keywords"
:
[
"keywords"
:
[
"login"
,
"login"
,
"登录"
,
"登录"
,
"搜索"
,
"搜索"
,
"uni-id实例"
,
"uni-id实例"
,
"留言板"
,
"留言板"
,
""
""
],
],
"repository"
:
"https://codechina.csdn.net/dcloud/uni-starter.git"
,
"repository"
:
"https://codechina.csdn.net/dcloud/uni-starter.git"
,
"engines"
:
{
"engines"
:
{
"HBuilderX"
:
"^3.2.6"
"HBuilderX"
:
"^3.2.6"
...
...
pages/list/list.nvue
浏览文件 @
af43a4dd
...
@@ -119,10 +119,10 @@
...
@@ -119,10 +119,10 @@
// });
// });
//默认h5端不获取定位
//默认h5端不获取定位
// #ifndef H5
// #ifndef H5
let location = await gps.getLocation({
//
let location = await gps.getLocation({
geocode: true
//
geocode: true
})
//
})
console.log(location);
//
console.log(location);
// #endif
// #endif
// if(location){
// if(location){
// uni.showToast({
// uni.showToast({
...
...
pages/list/search/search.test.js
浏览文件 @
af43a4dd
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
describe
(
'
pages/list/search/search.vue
'
,
()
=>
{
describe
(
'
pages/list/search/search.vue
'
,
()
=>
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
redirect
To
(
'
/pages/list/search/search
'
)
page
=
await
program
.
navigate
To
(
'
/pages/list/search/search
'
)
await
page
.
waitFor
(
500
)
await
page
.
waitFor
(
500
)
})
})
it
(
'
搜索发现-显示-影藏
'
,
async
()
=>
{
it
(
'
搜索发现-显示-影藏
'
,
async
()
=>
{
...
@@ -12,11 +12,9 @@ describe('pages/list/search/search.vue', () => {
...
@@ -12,11 +12,9 @@ describe('pages/list/search/search.vue', () => {
await
page
.
callMethod
(
'
searchHotRefresh
'
)
await
page
.
callMethod
(
'
searchHotRefresh
'
)
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
const
getShow
=
await
page
.
data
(
'
netHotListIsHide
'
)
const
getShow
=
await
page
.
data
(
'
netHotListIsHide
'
)
console
.
log
(
getShow
,
"
0000000000000
"
);
expect
(
getShow
).
toBeFalsy
()
expect
(
getShow
).
toBeFalsy
()
if
(
!
getShow
){
if
(
!
getShow
){
await
page
.
setData
({
netHotListIsHide
:
true
})
await
page
.
setData
({
netHotListIsHide
:
true
})
console
.
log
(
await
page
.
data
(
'
netHotListIsHide
'
),
"
1111111111
"
);
expect
(
await
page
.
data
(
'
netHotListIsHide
'
)).
toBeTruthy
()
expect
(
await
page
.
data
(
'
netHotListIsHide
'
)).
toBeTruthy
()
}
}
})
})
...
...
pages/ucenter/about/about.test.js
浏览文件 @
af43a4dd
...
@@ -17,22 +17,22 @@ describe('pages/ucenter/about/about.vue', () => {
...
@@ -17,22 +17,22 @@ describe('pages/ucenter/about/about.vue', () => {
})
})
it
(
'
screenshot
'
,
async
()
=>
{
it
(
'
screenshot
'
,
async
()
=>
{
console
.
log
(
process
.
env
.
UNI_PLATFORM
,
"
PLATFORM----------
"
);
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
)
{
if
(
process
.
env
.
UNI_PLATFORM
===
"
h5
"
)
{
const
image
=
await
program
.
screenshot
({
const
image
=
await
program
.
screenshot
({
path
:
"
static/screenshot/about-h5.png
"
// 默认项目根目录
path
:
"
static/screenshot/about-h5.png
"
// 默认项目根目录
})
})
console
.
log
(
image
,
"
image--------------------
"
)
console
.
log
(
image
,
"
image--------------------
"
)
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
app-plus
"
)
{
await
program
.
screenshot
({
await
program
.
screenshot
({
path
:
"
static/screenshot/about-app.png
"
path
:
"
static/screenshot/about-app.png
"
})
})
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
mp-weixin
"
)
{
}
else
if
(
process
.
env
.
UNI_PLATFORM
===
"
mp-weixin
"
)
{
await
program
.
screenshot
({
await
program
.
screenshot
({
path
:
"
static/screenshot/about-mp.
pn
g
"
path
:
"
static/screenshot/about-mp.
jp
g
"
})
})
}
}
})
})
...
...
pages/ucenter/about/about.vue
浏览文件 @
af43a4dd
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
import
UniShare
from
'
@/uni_modules/uni-share/js_sdk/uni-share.js
'
;
import
UniShare
from
'
@/uni_modules/uni-share/js_sdk/uni-share.js
'
;
const
uniShare
=
new
UniShare
()
const
uniShare
=
new
UniShare
()
export
default
{
export
default
{
// #ifdef APP-PLUS
onBackPress
({
from
})
{
onBackPress
({
from
})
{
if
(
from
==
'
backbutton
'
){
if
(
from
==
'
backbutton
'
){
this
.
$nextTick
(
function
(){
this
.
$nextTick
(
function
(){
...
@@ -30,6 +31,7 @@
...
@@ -30,6 +31,7 @@
return
uniShare
.
isShow
;
return
uniShare
.
isShow
;
}
}
},
},
// #endif
onLoad
()
{
onLoad
()
{
// #ifdef APP-PLUS
// #ifdef APP-PLUS
this
.
version
=
plus
.
runtime
.
version
this
.
version
=
plus
.
runtime
.
version
...
...
pages/ucenter/login-page/pwd-login/pwd-login.test.js
浏览文件 @
af43a4dd
...
@@ -13,13 +13,13 @@ describe('pages/ucenter/login-page/pwd-login/pwd-login.vue', () => {
...
@@ -13,13 +13,13 @@ describe('pages/ucenter/login-page/pwd-login/pwd-login.vue', () => {
// expect.assertions(2);
// expect.assertions(2);
const
resReg
=
await
page
.
callMethod
(
'
toRegister
'
)
const
resReg
=
await
page
.
callMethod
(
'
toRegister
'
)
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
expect
((
await
program
.
currentPage
()).
path
).
toBe
(
//
expect((await program.currentPage()).path).toBe(
'
pages/ucenter/login-page/register/register
'
)
//
'pages/ucenter/login-page/register/register')
console
.
log
(
await
program
.
currentPage
(),
"
111111111
"
);
console
.
log
(
await
program
.
currentPage
(),
"
111111111
"
);
await
page
.
waitFor
(
500
)
//
await page.waitFor(500)
// 执行 navigateBack 验证是否返回navigateTo
// 执行 navigateBack 验证是否返回navigateTo
expect
((
await
program
.
navigateBack
()).
path
).
toBe
(
//
expect((await program.navigateBack()).path).toBe(
'
pages/ucenter/login-page/pwd-login/pwd-login
'
)
//
'pages/ucenter/login-page/pwd-login/pwd-login')
console
.
log
(
await
program
.
currentPage
(),
"
22222222222
"
);
console
.
log
(
await
program
.
currentPage
(),
"
22222222222
"
);
})
})
...
...
pages/ucenter/settings/settings.test.js
浏览文件 @
af43a4dd
// uniapp自动化测试教程: https://uniapp-test.dcloud.net.cn/docs/testcase/start
// uniapp自动化测试教程: https://uniapp-test.dcloud.net.cn/docs/testcase/start
// import {mapGetters} from 'vuex';
describe
(
'
pages/ucenter/settings/settings
'
,
()
=>
{
describe
(
'
pages/ucenter/settings/settings
'
,
()
=>
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
...
...
pages/ucenter/ucenter.test.js
浏览文件 @
af43a4dd
...
@@ -20,9 +20,10 @@ describe('pages/ucenter/ucenter.vue', () => {
...
@@ -20,9 +20,10 @@ describe('pages/ucenter/ucenter.vue', () => {
it
(
'
我的积分
'
,
async
()
=>
{
it
(
'
我的积分
'
,
async
()
=>
{
// expect.assertions(1);
// expect.assertions(1);
await
page
.
waitFor
(
300
)
const
getScoreRes
=
await
page
.
callMethod
(
'
getScore
'
)
const
getScoreRes
=
await
page
.
callMethod
(
'
getScore
'
)
console
.
log
(
"
getScoreRes:
"
,
getScoreRes
);
console
.
log
(
"
getScoreRes:
"
,
getScoreRes
);
await
page
.
waitFor
(
500
)
//
await page.waitFor(500)
// expect(getScoreRes.score).not.toBeUndefined();
// expect(getScoreRes.score).not.toBeUndefined();
})
})
...
...
pages/ucenter/ucenter.vue
浏览文件 @
af43a4dd
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
const
uniShare
=
new
UniShare
()
const
uniShare
=
new
UniShare
()
const
db
=
uniCloud
.
database
();
const
db
=
uniCloud
.
database
();
export
default
{
export
default
{
// #ifdef APP-PLUS
onBackPress
({
from
})
{
onBackPress
({
from
})
{
if
(
from
==
'
backbutton
'
){
if
(
from
==
'
backbutton
'
){
this
.
$nextTick
(
function
(){
this
.
$nextTick
(
function
(){
...
@@ -49,6 +50,7 @@
...
@@ -49,6 +50,7 @@
return
uniShare
.
isShow
;
return
uniShare
.
isShow
;
}
}
},
},
// #endif
data
()
{
data
()
{
return
{
return
{
gridList
:
[{
gridList
:
[{
...
@@ -249,9 +251,9 @@
...
@@ -249,9 +251,9 @@
title
:
this
.
$t
(
'
mine.checkScore
'
),
title
:
this
.
$t
(
'
mine.checkScore
'
),
icon
:
'
none
'
icon
:
'
none
'
});
});
uni
.
showLoading
({
//
uni.showLoading({
mask
:
true
//
mask: true
})
//
})
return
await
db
.
collection
(
"
uni-id-scores
"
)
return
await
db
.
collection
(
"
uni-id-scores
"
)
.
where
(
'
"user_id" == $env.uid
'
)
.
where
(
'
"user_id" == $env.uid
'
)
.
field
(
'
score,balance
'
)
.
field
(
'
score,balance
'
)
...
@@ -259,7 +261,7 @@
...
@@ -259,7 +261,7 @@
.
limit
(
1
)
.
limit
(
1
)
.
get
()
.
get
()
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
,
"
res------
"
);
const
data
=
res
.
result
.
data
[
0
];
const
data
=
res
.
result
.
data
[
0
];
let
msg
=
''
;
let
msg
=
''
;
msg
=
data
?
(
this
.
$t
(
'
mine.currentScore
'
)
+
data
.
balance
)
:
this
.
$t
(
'
mine.noScore
'
);
msg
=
data
?
(
this
.
$t
(
'
mine.currentScore
'
)
+
data
.
balance
)
:
this
.
$t
(
'
mine.noScore
'
);
...
@@ -268,10 +270,15 @@
...
@@ -268,10 +270,15 @@
icon
:
'
none
'
icon
:
'
none
'
});
});
return
data
return
data
}).
catch
((
reason
)
=>
{
console
.
log
(
reason
,
'
这是失败的操作
'
);
return
reason
}).
finally
((
e
)
=>
{
}).
finally
((
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
"
e:-----
"
,
e
);
// uni.hideLoading()
return
e
return
e
})
})
},
},
async
share
()
{
async
share
()
{
let
{
let
{
...
...
pages/ucenter/userinfo/bind-mobile/bind-mobile.test.js
浏览文件 @
af43a4dd
// uniapp自动化测试教程: https://uniapp-test.dcloud.net.cn/docs/testcase/start
// uniapp自动化测试教程: https://uniapp-test.dcloud.net.cn/docs/testcase/start
redirectTo
describe
(
'
pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
'
,
()
=>
{
describe
(
'
pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
'
,
()
=>
{
let
page
let
page
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
page
=
await
program
.
redirect
To
(
'
/pages/ucenter/userinfo/bind-mobile/bind-mobile
'
)
page
=
await
program
.
navigate
To
(
'
/pages/ucenter/userinfo/bind-mobile/bind-mobile
'
)
await
page
.
waitFor
(
500
)
await
page
.
waitFor
(
500
)
})
})
...
@@ -24,6 +24,7 @@ describe('pages/ucenter/userinfo/bind-mobile/bind-mobile.vue', () => {
...
@@ -24,6 +24,7 @@ describe('pages/ucenter/userinfo/bind-mobile/bind-mobile.vue', () => {
const
codebtn
=
await
page
.
$
(
'
.short-code-btn
'
)
const
codebtn
=
await
page
.
$
(
'
.short-code-btn
'
)
console
.
log
(
"
codebtn:
"
,
codebtn
);
console
.
log
(
"
codebtn:
"
,
codebtn
);
const
sendMsgRes
=
await
codebtn
.
callMethod
(
'
sendMsg
'
)
const
sendMsgRes
=
await
codebtn
.
callMethod
(
'
sendMsg
'
)
console
.
log
(
"
sendMsgRes:
"
,
sendMsgRes
);
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
}
}
...
...
pages/ucenter/userinfo/bind-mobile/bind-mobile.vue
浏览文件 @
af43a4dd
...
@@ -72,6 +72,9 @@
...
@@ -72,6 +72,9 @@
uni
.
navigateBack
()
uni
.
navigateBack
()
}
}
return
result
return
result
}).
catch
((
reason
)
=>
{
console
.
log
(
reason
,
'
reason----
'
);
return
reason
})
})
// uniCloud.callFunction({
// uniCloud.callFunction({
// name:'uni-id-cf',
// name:'uni-id-cf',
...
...
pages/ucenter/userinfo/userinfo.test.js
浏览文件 @
af43a4dd
...
@@ -10,28 +10,21 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
...
@@ -10,28 +10,21 @@ describe('pages/ucenter/userinfo/userinfo.vue', () => {
it
(
'
设置昵称
'
,
async
()
=>
{
it
(
'
设置昵称
'
,
async
()
=>
{
const
getTokenRes
=
await
page
.
waitFor
(
async
()
=>
{
const
name
=
"
数字天堂DCloud
"
+
Math
.
round
(
Math
.
random
()
*
10
);
return
await
page
.
data
(
'
uniToken
'
)
})
console
.
log
(
"
getTokenRes:----------------------
"
,
getTokenRes
);
var
name
=
"
数字天堂DCloud
"
+
Math
.
round
(
Math
.
random
()
*
10
);
console
.
log
(
"
name:
"
,
name
);
console
.
log
(
"
name:
"
,
name
);
if
(
getTokenRes
){
await
page
.
waitFor
(
300
)
const
nicknameRes
=
await
page
.
callMethod
(
"
setNickname
"
,
name
)
const
nicknameRes
=
await
page
.
callMethod
(
"
setNickname
"
,
name
)
await
page
.
waitFor
(
300
)
console
.
log
(
"
nicknameRes:
"
,
nicknameRes
);
console
.
log
(
"
nicknameRes:
"
,
nicknameRes
);
// expect(nicknameRes.updated).toBe(1)
expect
(
nicknameRes
.
updated
).
toBe
(
1
)
}
})
})
it
(
'
绑定手机号
'
,
async
()
=>
{
it
(
'
绑定手机号
'
,
async
()
=>
{
await
page
.
callMethod
(
'
bindMobileBySmsCode
'
)
const
navRes
=
await
page
.
callMethod
(
'
bindMobileBySmsCode
'
)
console
.
log
(
"
navRes:
"
,
navRes
);
await
page
.
waitFor
(
300
)
await
page
.
waitFor
(
300
)
// expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile')
// expect((await program.currentPage()).path).toBe('pages/ucenter/userinfo/bind-mobile/bind-mobile')
// await page.waitFor(300)
// await page.waitFor(300)
console
.
log
(
"
----------------
"
,
await
program
.
navigateBack
());
console
.
log
(
"
currentPage----------------
"
,
await
program
.
currentPage
());
// expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo')
// expect((await program.navigateBack()).path).toBe('pages/ucenter/userinfo/userinfo')
})
})
...
...
pages/ucenter/userinfo/userinfo.vue
浏览文件 @
af43a4dd
...
@@ -134,7 +134,10 @@
...
@@ -134,7 +134,10 @@
},
},
bindMobileBySmsCode
()
{
bindMobileBySmsCode
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/ucenter/userinfo/bind-mobile/bind-mobile
'
url
:
'
/pages/ucenter/userinfo/bind-mobile/bind-mobile
'
,
complete
:
(
res
)
=>
{
console
.
log
(
"
res:
"
,
res
);
}
})
})
},
},
async
setNickname
(
nickname
)
{
async
setNickname
(
nickname
)
{
...
@@ -145,21 +148,25 @@
...
@@ -145,21 +148,25 @@
}).
then
(
e
=>
{
}).
then
(
e
=>
{
console
.
log
(
e
.
result
,
"
e.result---------
"
);
console
.
log
(
e
.
result
,
"
e.result---------
"
);
if
(
e
.
result
.
updated
)
{
if
(
e
.
result
.
updated
)
{
uni
.
showToast
({
//
uni.showToast({
title
:
this
.
$t
(
'
common.updateSucceeded
'
),
//
title:this.$t('common.updateSucceeded'),
icon
:
'
none
'
//
icon: 'none'
});
//
});
this
.
setUserInfo
({
this
.
setUserInfo
({
nickname
nickname
});
});
}
else
{
}
else
{
uni
.
showToast
({
//
uni.showToast({
title
:
this
.
$t
(
'
userinfo.noChange
'
),
//
title: this.$t('userinfo.noChange'),
icon
:
'
none
'
//
icon: 'none'
});
//
});
}
}
return
e
.
result
return
e
.
result
})
})
.
catch
((
reason
)
=>
{
console
.
log
(
reason
,
'
reason----
'
);
return
reason
})
this
.
$refs
.
dialog
.
close
()
this
.
$refs
.
dialog
.
close
()
}
else
{
}
else
{
this
.
$refs
.
dialog
.
open
()
this
.
$refs
.
dialog
.
open
()
...
...
static/screenshot/about-app.png
0 → 100644
浏览文件 @
af43a4dd
188.9 KB
static/screenshot/about-h5.png
查看替换文件 @
26c87596
浏览文件 @
af43a4dd
61.9 KB
|
W:
|
H:
57.0 KB
|
W:
|
H:
2-up
Swipe
Onion skin
static/screenshot/about-mp.jpg
查看替换文件 @
26c87596
浏览文件 @
af43a4dd
55.9 KB
|
W:
|
H:
23.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
static/screenshot/about-mp.png
已删除
100644 → 0
浏览文件 @
26c87596
23.9 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录