最新更新
parent
f9a4083cea
commit
162da8b1d1
4
App.vue
4
App.vue
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
if(this.showType==5){
|
||||
this.tipsTitle = index==5?'真实姓名':'电话号码';
|
||||
this.$refs.refFrame.ifLogistics = true;
|
||||
this.$refs.refFrame.ifAnimated = true;
|
||||
if(this.showType==5){
|
||||
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){
|
||||
// 如果修改后的跟修改前的不一样
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.hostapi = getApp().globalData.hostapi;
|
||||
this.hostapi = getApp().globalData.hostapiQi;
|
||||
// 获取课程列表
|
||||
this.getCouresList();
|
||||
},
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
},
|
||||
onLoad(e) {
|
||||
this.course_id = e.id;
|
||||
this.hostapi = getApp().globalData.hostapi;
|
||||
this.hostapi = getApp().globalData.hostapiQi;
|
||||
// 获取课程列表
|
||||
this.getCouresList();
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue