This commit is contained in:
cmxdd
2020-08-10 16:55:34 +08:00
5 changed files with 179 additions and 9 deletions

View File

@@ -196,7 +196,40 @@ export default {
methods: {
// 跳转详情页面
tochat(ID){
function Friend(uuid, name, avatar,time = "", text = "",date = "") {
this.uuid = uuid;
this.name = name;
this.avatar = avatar;
this.online = false;
this.unReadMessage = 0;
this.text = text;
this.time = time;
this.date = date
}
console.log(ID)
const token = uni.getStorageSync('token');
let that = this
uni.request({
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{
userId: ID
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(res){
console.log(res)
res = res.data
let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
that.$u.route({
url:"/pages/messages/privateChat",
params:{
id:JSON.stringify(user)
}
})
}
})
},
// 退款单选
radioGroupChange(e) {

View File

@@ -237,7 +237,7 @@ export default {
count: 1,
sourceType: ['camera', 'album'],
success: function(res) {
self.src = res.tempFilePath;
that.src = res.tempFilePath;
const tempFilePaths = res.tempFilePath;
uni.uploadFile({
url: url, //仅为示例,非真实的接口地址
@@ -250,6 +250,7 @@ export default {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: uploadFileRes => {
console.log(uploadFileRes);
let obj = JSON.parse(uploadFileRes.data);
that.videopath = obj.data.url;
that.selectvideo = obj.data.key;