提交 af43a4dd 编写于 作者: study夏羽's avatar study夏羽

fix:积分测试超时

上级 26c87596
...@@ -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)
......
...@@ -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) {
......
...@@ -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",
......
...@@ -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'
......
{ {
"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"
} }
...@@ -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"
......
...@@ -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({
......
...@@ -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.redirectTo('/pages/list/search/search') page = await program.navigateTo('/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()
} }
}) })
......
...@@ -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.png" path: "static/screenshot/about-mp.jpg"
}) })
} }
}) })
......
...@@ -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
......
...@@ -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");
}) })
......
// 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 () => {
......
...@@ -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();
}) })
......
...@@ -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 {
......
// 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.redirectTo('/pages/ucenter/userinfo/bind-mobile/bind-mobile') page = await program.navigateTo('/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)
} }
......
...@@ -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',
......
...@@ -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')
}) })
......
...@@ -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-h5.png

61.9 KB | W: | H:

static/screenshot/about-h5.png

57.0 KB | W: | H:

static/screenshot/about-h5.png
static/screenshot/about-h5.png
static/screenshot/about-h5.png
static/screenshot/about-h5.png
  • 2-up
  • Swipe
  • Onion skin
static/screenshot/about-mp.jpg

55.9 KB | W: | H:

static/screenshot/about-mp.jpg

23.9 KB | W: | H:

static/screenshot/about-mp.jpg
static/screenshot/about-mp.jpg
static/screenshot/about-mp.jpg
static/screenshot/about-mp.jpg
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册