作者 xuqiang

提交

... ... @@ -20,7 +20,7 @@
<view class="inpItem">
<view class="inpKey">数量</view>
<view class="inpVal">
<input type="number" v-model="inpNum" placeholder="请输入数量" placeholder-class="inpValPh"/>
<input type="number" v-model="inpNum" @keyup="inpNum = inpNum.length === 1 ? inpNum.replace(/[^1-9]/g, '') : inpNum.replace(/\D/g, '')" placeholder="请输入数量" placeholder-class="inpValPh"/>
</view>
</view>
<view class="inpItem">
... ...
... ... @@ -12,7 +12,7 @@
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : true,
"waiting" : false,
"autoclose" : false,
"delay" : 0
},
... ... @@ -139,9 +139,9 @@
"splashscreen" : {
"androidStyle" : "default",
"android" : {
"hdpi" : "D:/MyWork/1.20210220找地主app-培杰/Frame3.png",
"xhdpi" : "D:/MyWork/1.20210220找地主app-培杰/Frame2.png",
"xxhdpi" : "D:/MyWork/1.20210220找地主app-培杰/Frame1.png"
"hdpi" : "D:/MyWork/1.20210220找地主app-梅姐、培杰/Frame3.png",
"xhdpi" : "D:/MyWork/1.20210220找地主app-梅姐、培杰/Frame2.png",
"xxhdpi" : "D:/MyWork/1.20210220找地主app-梅姐、培杰/Frame1.png"
}
}
},
... ...
... ... @@ -212,6 +212,7 @@
},
computed:{
...mapState({
userinfo: state => state.userinfo,
isLogin: state => state.isLogin,
currentMessageList:state=>state.currentMessageList,
})
... ... @@ -225,10 +226,7 @@
},
onLoad(option) {
if(!this.isLogin){
uni.setStorageSync("token",'')
uni.reLaunch({
url:"/pages/index/login"
})
this.loginTim()
}else{
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
console.log('this.userInfo11111111111111111111',this.userInfo)
... ... @@ -249,19 +247,13 @@
},
onShow(){
if(!this.isLogin){
uni.setStorageSync("token",'')
uni.reLaunch({
url:"/pages/index/login"
})
this.loginTim()
}
this.scrollTop = 9999999;
},
onUnload(){
if(!this.isLogin){
uni.setStorageSync("token",'')
uni.reLaunch({
url:"/pages/index/login"
})
this.loginTim()
}else{
//退出页面 将所有的会话内的消息设置为已读
let promise = this.tim.setMessageRead({conversationID: this.conversationActive.conversationID});
... ... @@ -275,6 +267,34 @@
}
},
methods:{
loginTim(){
let userID = this.userinfo.id.toString()
let userSig = this.userinfo.user_sign
let userInfo = {
user: this.userinfo.nickname,
userId:this.userinfo.id,
img:this.userinfo.avatar,
userSig:this.userinfo.user_sign
}
//登录腾讯IM及时通讯
let promise = this.tim.login({
userID: userID,
userSig: userSig
});
promise.then((res) => {
//登录成功后 更新登录状态
this.$store.commit("toggleIsLogin", true);
//自己平台的用户基础信息
uni.setStorageSync('userInfo', JSON.stringify(userInfo))
//tim 返回的用户信息
uni.setStorageSync('userTIMInfo', JSON.stringify(res.data))
uni.reLaunch({
url:"/pages/index/index"
})
}).catch((err) => {
// 登录失败的相关信息
});
},
//聊天的节点加上外层的div
nodesFliter(str){
let nodeStr = '<div style="align-items: center;word-wrap:break-word;">'+str+'</div>'
... ...
... ... @@ -165,7 +165,7 @@
<div class="inpItem">
<div class="inpKey">数量</div>
<div class="inpVal">
<input style="width: 200rpx;text-align: right;" type="number" v-model="inpNum" placeholder="请输入数量" placeholder-class="inpValPh"/>
<input style="width: 200rpx;text-align: right;" type="number" @keyup="inpNum = inpNum.length === 1 ? inpNum.replace(/[^1-9]/g, '') : inpNum.replace(/\D/g, '')" v-model="inpNum" placeholder="请输入数量" placeholder-class="inpValPh"/>
</div>
</div>
<div class="inpItem">
... ... @@ -301,12 +301,13 @@
console.log('故事id',e)
this.article_id = e.id
this.getData()
},
onShow() {
that = this;
this.kebofang=1;
// that.Jiazai()
this.getData()
uni.createVideoContext(`video_${this.index}`,this).play()
},
... ...
... ... @@ -440,6 +440,10 @@
follow(){
this.$request('/user_follow_log/follow',{to_user_id:this.userInfo.id}).then((res)=>{
if(res.code == 1){
this.current_page = 1
this.last_page = 0
this.param.page = 1
this.list = []
this.getData()
uni.showToast({
title:res.msg+'成功'
... ...
... ... @@ -130,6 +130,7 @@
</template>
<script>
import {mapState} from "vuex"
import wPicker from "@/components/w-picker/w-picker.vue"
// var apiUrl = 'http://landlord.t.brotop.cn/api'
var apiUrl = 'http://app.zhaodizhu.cn/api'
... ... @@ -164,6 +165,9 @@
}
}
},
computed:{
...mapState(["userinfo"])
},
components:{
wPicker
},
... ... @@ -289,6 +293,8 @@
console.log('修改会员个人信息参数',this.userInfo)
this.$request('/user/profile',this.userInfo).then((res)=>{
if(res.code == 1){
this.userinfo.avatar = this.imgUrl + this.userInfo.avatar
uni.setStorageSync('userinfo',JSON.stringify(this.userinfo))
this.$href('my',2)
setTimeout(()=>{
uni.showToast({
... ...
... ... @@ -240,7 +240,7 @@
display: flex;
height: 44rpx;
border-bottom: 2rpx solid #f2f3f5;
input{margin-left: 10rpx;font-size:27rpx;}
input{margin-left: 10rpx;font-size:27rpx;width: 100%;}
.recDol{
display: flex;
align-items: flex-end;
... ...