提交 cb8d2c4c 编写于 作者: DCloud_JSON's avatar DCloud_JSON

兼容vue3...待续未完成

上级 b3950100
......@@ -322,7 +322,6 @@ export default async function() {
url == '/pages/ucenter/login-page/index/index' &&
!inLoginPage
) {
// console.log(9527777,login);
//一键登录(univerify)、账号(username)、验证码登录(短信smsCode)
if (login[0] == 'username') {
e.url = "/pages/ucenter/login-page/pwd-login/pwd-login"
......@@ -343,7 +342,7 @@ export default async function() {
}
return url != item
})
// console.log(pass)
console.log({pass})
}
if (visitor&&!inLoginPage) {
pass = visitor.some((item) => {
......@@ -352,7 +351,7 @@ export default async function() {
}
return url == item
})
console.log(pass)
console.log({pass})
}
if (!pass && (token == '' || tokenExpired)) {
......
......@@ -44,7 +44,8 @@
}
</script>
<style>
<style lang="scss" scoped>
@import '@/common/all-flex.css';
.root{
flex-direction: row;
align-items: center;
......
......@@ -281,7 +281,7 @@
}
break;
default:
console.log(9527, err);
console.log(err);
break;
}
}
......
......@@ -117,7 +117,8 @@
}
</script>
<style scoped>
<style lang="scss" scoped>
@import '@/common/all-flex.css';
.short-code-btn {
width: 200rpx;
height: 85rpx;
......
......@@ -82,13 +82,8 @@
cdbRef = this.$refs.udb
},
async onShow() {
console.log(999,getApp().globalData.searchText);
this.keyword = getApp().globalData.searchText
getApp().globalData.searchText = ''
//这里仅演示如何,在onShow生命周期获取设备位置,并在设备或者应用没有权限时自动引导。设置完毕自动重新获取。
//你可以基于他做自己的业务,比如:根据距离由近到远排序列表数据等
// uni.showLoading({
......
......@@ -131,7 +131,7 @@
})
},
setNickname(nickname) {
console.log(9527, nickname);
console.log(nickname);
if (nickname) {
usersTable.where('_id==$env.uid').update({
nickname
......
......@@ -98,6 +98,12 @@ export default {
return []
}
},
modelValue: {
type: [Array, Object],
default() {
return []
}
},
disabled: {
type: Boolean,
default: false
......@@ -174,32 +180,24 @@ export default {
returnType: {
type: String,
default: 'array'
},
sizeType:{
type: Array,
default(){
return ['original','compressed']
}
}
},
watch: {
value: {
handler(newVal) {
let newFils = []
let newData = [].concat(newVal || [])
newData.forEach(v => {
const files = this.files.find(i => i.url === v.url)
const reg = /cloud:\/\/([\w.]+\/?)\S*/
if (!v.path) {
v.path = v.url
}
if (reg.test(v.url)) {
this.getTempFileURL(v, v.url)
}
newFils.push(files ? files : v)
})
let data = null
if (this.returnType === 'object') {
data = this.backObject(newFils)[0]
} else {
data = this.backObject(newFils)
}
this.formItem && this.formItem.setValue(data)
this.files = newFils
this.setValue(newVal)
},
immediate: true
},
modelValue:{
handler(newVal) {
this.setValue(newVal)
},
immediate: true
}
......@@ -262,6 +260,29 @@ export default {
}
},
methods: {
setValue(newVal){
let newFils = []
let newData = [].concat(newVal || [])
newData.forEach(v => {
const files = this.files.find(i => i.url === v.url)
const reg = /cloud:\/\/([\w.]+\/?)\S*/
if (!v.path) {
v.path = v.url
}
if (reg.test(v.url)) {
this.getTempFileURL(v, v.url)
}
newFils.push(files ? files : v)
})
let data = null
if (this.returnType === 'object') {
data = this.backObject(newFils)[0]
} else {
data = this.backObject(newFils)
}
this.formItem && this.formItem.setValue(data)
this.files = newFils
},
/**
* 获取父元素实例
*/
......@@ -331,6 +352,7 @@ export default {
.chooseAndUploadFile({
type: this.fileMediatype,
compressed: false,
sizeType:this.sizeType,
// TODO 如果为空,video 有问题
extension: this.extname.length > 0 ? this.extname : undefined,
count: this.limitLength - this.files.length, //默认9
......
......@@ -16,10 +16,10 @@ export default async (param,callback) => {
if (typeof(menus[e]['share']) == 'string') {
eval(menus[e]['share']+'()')
} else {
console.log(9527,{
...param.content,
...menus[e].share,
});
// console.log(123456,{
// ...param.content,
// ...menus[e].share,
// });
uni.share({
...param.content,
...menus[e].share,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册