最新更新

master
xcw 2023-03-21 09:15:29 +08:00
parent f9a4083cea
commit 162da8b1d1
8 changed files with 81 additions and 22 deletions

View File

@ -5,8 +5,10 @@
projectname:'', //
lat:'', //
lng:'' ,//
hostapi:'https://chuanwujia.com' //
hostapi:'https://chuanwujia.com' ,//
hostapiQi:'http://qiniu.chuanwujia.com' //
},
// show
onLaunch: ()=> {
toolAll.tools.currentContext();

View File

@ -18,11 +18,12 @@
<image src="/static/public/icon-success.png" mode="" style="width: 56rpx;height: 50rpx;" lazy-load></image>
<view class="mar-z20">{{['','','已确认收货','支付成功','签到成功'][showType]}}</view>
</view>
<view class="fon22 col26 disjcac mar-sx40" v-if="showType==5 || showType==6">
<view class="fon22 col26 disjcac mar-sx40" v-if="showType==5 || showType==6 || showType=='nick_name'">
<input v-if="showType==5" class="tips-input fon22 radius4 width100 pad-zy20" type="text" maxlength="8" v-model="dynamicObj.content" placeholder="请输入真实姓名" placeholder-style="color:#aaaaaa;">
<input v-else class="tips-input fon22 radius4 width100 pad-zy20" type="number" maxlength="11" v-model="dynamicObj.content" placeholder="请输入联系电话" placeholder-style="color:#aaaaaa;">
<input v-else-if="showType==6" class="tips-input fon22 radius4 width100 pad-zy20" type="number" maxlength="11" v-model="dynamicObj.content" placeholder="请输入联系电话" placeholder-style="color:#aaaaaa;">
<input v-else class="tips-input fon22 radius4 width100 pad-zy20" type="text" maxlength="8" v-model="dynamicObj.content" placeholder="请输入昵称" placeholder-style="color:#aaaaaa;">
</view>
<view class="disjcac" v-if="showType!=5 && showType!=6">
<view class="disjcac" v-if="showType!=5 && showType!=6 && showType!='nick_name'">
<view class="radius26 disjcac fon24 tips-btn" @tap="closePop"></view>
</view>
<view class="disjcac" v-else>
@ -62,13 +63,13 @@
},
methods:{
closePop(){
if(this.showType==5 || this.showType ==6){
if(this.showType==5 || this.showType ==6 || this.showType == 'nick_name'){
if(this.dynamicObj.content){
this.executeEv();
this.$emit('returnEv',this.dynamicObj);
} else {
if(this.tempText){
this.$toolAll.tools.showToast(this.showType==5?'请输入真实姓名':'请输入电话号码')
this.$toolAll.tools.showToast(this.showType==5?'请输入':'请输入')
} else {
this.executeEv();
}

View File

@ -126,7 +126,6 @@
changeBanner(e){
this.currentDot = e.detail.current;//
let videoIndex = e.detail.current;
console.log(videoIndex)
//
uni.createVideoContext("video" + (videoIndex),this).pause();
},

View File

@ -3,18 +3,18 @@
<status-container titlet="基本资料" returnc="#FFFFFF">
<view slot="content" style="margin-top: -20rpx;">
<view class="bacf pad-x50 pad-zy20">
<view class="pad-sx30 pad-zy10 disjbac bbot">
<view class="pad-sx30 pad-zy10 disjbac bbot" @tap="chooseEv('avatar')">
<view class="fon24 col26">头像</view>
<view class="disac">
<image class="radius_100" :src="userInfo.headimgurl" mode="aspectFill" style="width: 92rpx;height: 92rpx;"></image>
<!-- <view class="icon icon-next fon24 mar-z10" style="color: #7f7f7f;"></view> -->
<view class="icon icon-next fon24 mar-z10" style="color: #7f7f7f;"></view>
</view>
</view>
<view class="pad-sx30 fon24 pad-zy10 disjbac bbot">
<view class="pad-sx30 fon24 pad-zy10 disjbac bbot" @tap="chooseEv('nick_name')">
<view class="col26">昵称</view>
<view class="disac">
<view class="">{{userInfo.nickname}}</view>
<view class="icon icon-next fon24 mar-z10" style="color: #FFFFFF;"></view>
<view class="">{{userInfo.nickname || '未填写'}}</view>
<view class="icon icon-next fon24 mar-z10" style="color: #7f7f7f;"></view>
</view>
</view>
<view class="pad-sx30 fon24 pad-zy10 disjbac bbot" @tap="chooseEv(5)">
@ -35,6 +35,7 @@
</view>
</view>
</status-container>
<dynamic-frame ref="refFrame" :showType="showType" :tipsTitle="tipsTitle" @returnEv="returnEv"></dynamic-frame>
</view>
</template>
@ -48,35 +49,91 @@
data() {
return {
showType:5,
baseHttps:`${getApp().globalData.hostapiQi}`, //
tipsTitle:'真实姓名',
userInfo:{
headimgurl:'',
nickname:'',
}, //
realName:'',//
phone:'',//
userInfo:''
}
},
onLoad() {
this.userInfo = uni.getStorageSync('userInfo');
this.realName = this.userInfo.real_name;
this.phone = this.userInfo.mobile;
console.log(this.userInfo)
},
methods: {
//
chooseEv(index){
this.showType = index;
this.tipsTitle = index==5?'真实姓名':'电话号码';
this.$refs.refFrame.ifLogistics = true;
this.$refs.refFrame.ifAnimated = true;
if(this.showType==5){
this.tipsTitle = index==5?'真实姓名':'电话号码';
this.$refs.refFrame.ifLogistics = true;
this.$refs.refFrame.ifAnimated = true;
this.$refs.refFrame.dynamicObj.content = this.realName || '';
this.$refs.refFrame.tempText = JSON.parse(JSON.stringify(this.realName || ''));
}
if(this.showType==6){
this.tipsTitle = index==5?'真实姓名':'电话号码';
this.$refs.refFrame.ifLogistics = true;
this.$refs.refFrame.ifAnimated = true;
this.$refs.refFrame.dynamicObj.content = this.phone || '';
this.$refs.refFrame.tempText = JSON.parse(JSON.stringify(this.phone || ''));
}
if(this.showType=='avatar'){
uni.chooseImage({
count: 1, //9
sourceType: ['album','camera'], //
success: (res)=> {
//
this.uploadImg(res.tempFilePaths[0]);
}
})
}
if(this.showType=='nick_name'){
this.tipsTitle = '修改昵称';
this.$refs.refFrame.ifLogistics = true;
this.$refs.refFrame.ifAnimated = true;
this.$refs.refFrame.dynamicObj.content = this.phone || '';
this.$refs.refFrame.tempText = JSON.parse(JSON.stringify(this.phone || ''));
}
},
//
uploadImg(url){
uni.showLoading({
title: '上传中'
});
this.$requst.upload('/api/file/upload/image',{path:url}).then(res=>{
if(res.code==0) {
//
this.returnEv(res.data.src)
}
uni.hideLoading();
})
},
//
returnEv(obj){
console.log(obj)
if(this.showType=='avatar'){
if(this.userInfo.avatarUrl!=obj){
//
this.setData('headimgurl',obj);
}
this.userInfo.headimgurl = this.baseHttps + obj;
}
if(this.showType=='nick_name'){
if(this.userInfo.nickname!=obj.content){
//
this.setData('nickname',obj.content);
}
this.userInfo.nickname = obj.content;
}
if(this.showType==5){
if(this.realName!=obj.content){
//

View File

@ -45,7 +45,7 @@
}
},
onLoad() {
this.hostapi = getApp().globalData.hostapi;
this.hostapi = getApp().globalData.hostapiQi;
//
this.getCouresList();
},

View File

@ -46,7 +46,7 @@
},
onLoad(e) {
this.course_id = e.id;
this.hostapi = getApp().globalData.hostapi;
this.hostapi = getApp().globalData.hostapiQi;
//
this.getCouresList();
},

View File

@ -75,7 +75,7 @@
} else {
this.$store.commit('setFristIn',false);
}
this.hostapi = getApp().globalData.hostapi;
this.hostapi = getApp().globalData.hostapiQi;
this.course_video_id = op.id;
//
this.getCouresDetail(this.course_video_id);

View File

@ -61,8 +61,8 @@
},
onUnload() {
console.log('页面销毁了')
let course_video_id = this.videoList[this.currentIndex].course_video_id;
console.log(course_video_id,'页面销毁了')
if(course_video_id) {
let params = {
course_video_id:course_video_id,