master
chen 2022-01-03 15:54:22 +08:00
parent 45a75791e6
commit cc0e432712
24 changed files with 77 additions and 107 deletions

View File

@ -188,10 +188,19 @@
if(options.source_code!='' && options.source_code!=undefined){ if(options.source_code!='' && options.source_code!=undefined){
this.loginEv(options); this.loginEv(options);
} else if(options.q!=undefined){ } else if(options.q!=undefined){
// channel=&source_code=e0aac3a1f8dc81f14ce60b65db374a8c // unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1")
let newInvite = options.q.slice(options.q.indexOf('invite_code%')+14); // decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
let newChanel = options.q.slice(options.q.indexOf('activity%')+7); let str = unescape(options.q);
let newsource_code = options.q.slice(options.q.indexOf('source_code%')+32); // console.log(str);
let len1 = str.indexOf('invite_code=');
let len2 = str.indexOf('channel=');
let len3 = str.indexOf('source_code=');
let newInvite = '';
let newChanel = '';
let newsource_code = '';
if(len1!=-1) newInvite = str.slice((len1+12),(len1+12+32));
if(len2!=-1) newChanel = str.slice((len2+8),(len2+8+8));
if(len3!=-1) newsource_code = str.slice((len3+12),(len3+12+32));
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (res)=> { success: (res)=> {
@ -201,6 +210,7 @@
channel:newChanel, channel:newChanel,
source_code:newsource_code source_code:newsource_code
} }
// console.log(params);
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {}) this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
}, },
}); });

View File

@ -46,63 +46,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 分享孔雀币 -->
<!-- <view class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-02-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
<view class="fon28">分享孔雀币</view>
</view>
<view><span style="color: #3875F6;">0</span>/7</view>
</view>
<view class="fon24" style="color: #808080;">
<view class="mar-s30">活动要求成功分享并注册成为会员9人可获得30孔雀币</view>
<view class="mar-s20">获得奖励10孔雀币</view>
<view class="mar-s20">会员暂无</view>
<view class="mar-s20">结束时间2021-09-10 10:30</view>
</view>
<view class="disjcac">
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即参与</view>
</view>
</view> -->
<!-- 分享领积分 -->
<!-- <view class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-03-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
<view class="fon28">分享领积分</view>
</view>
<view><span style="color: #3875F6;">0</span>/7</view>
</view>
<view class="fon24" style="color: #808080;">
<view class="mar-s30">活动要求成功分享并注册成为会员2人可获得100积分</view>
<view class="mar-s20">获得奖励10孔雀币</view>
<view class="mar-s20">会员暂无</view>
<view class="mar-s20">结束时间2021-09-10 10:30</view>
</view>
<view class="disjcac">
<view class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;background: #3875F6;">立即参与</view>
</view>
</view> -->
<!-- 分享至朋友圈 -->
<!-- <view class="bacf radius20 pad20 mar-s20">
<view class="bold col3 disjbac">
<view class="disac">
<image src="/static/public/task-04-60.png" style="width: 60rpx;height: 60rpx;margin-right: 20rpx;" mode=""></image>
<view class="fon28">分享至朋友圈</view>
</view>
<view><span style="color: #3875F6;">1</span>/1</view>
</view>
<view class="fon24" style="color: #808080;">
<view class="mar-s30">活动要求成功分享并上传截图认证通过后获得</view>
<view class="mar-s20">获得奖励20积分</view>
<view class="mar-s20">会员暂无</view>
<view class="mar-s20">结束时间2021-09-10 10:30</view>
</view>
<view class="disjcac">
<view @tap="isScreenshot=true" :style="{background:!isScreenshot?publicColor:'#CCCCCC'}" class="mar-s30" style="width: 546rpx;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 35rpx;font-size: 30rpx;color: #FFFFFF;">{{!isScreenshot?'立即参与':'审核中...'}}</view>
</view>
</view> -->
<!-- 上传截图弹框 --> <!-- 上传截图弹框 -->
<view v-if="isScreenshot" @tap.stop="isScreenshot=false,upImg=''" class="posAll disjcac" style="padding: 0 85rpx;z-index: 3;"> <view v-if="isScreenshot" @tap.stop="isScreenshot=false,upImg=''" class="posAll disjcac" style="padding: 0 85rpx;z-index: 3;">
<view class="bacf width100" @tap.stop="isScreenshot=true" style="padding: 0 33rpx;border-radius: 20rpx;"> <view class="bacf width100" @tap.stop="isScreenshot=true" style="padding: 0 33rpx;border-radius: 20rpx;">

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> <!-- <auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> -->
<!-- 状态栏 --> <!-- 状态栏 -->
<status-nav :titleVal="'写日记'" :statusTitle="true"></status-nav> <status-nav :titleVal="'写日记'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20"> <view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20">
@ -17,6 +17,7 @@
<view class="mar-y20 flexs mar-s20 titlel2">详细内容</view> <view class="mar-y20 flexs mar-s20 titlel2">详细内容</view>
<view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;"> <view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;">
<textarea v-model="diary_content" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请输入详细内容" placeholder-style="color:#999999;"/> <textarea v-model="diary_content" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请输入详细内容" placeholder-style="color:#999999;"/>
<!-- <editor id="editor" class="ql-container" :placeholder="placeholder" @ready="onEditorReady"></editor> -->
</view> </view>
</view> </view>
<!-- 选择病种 --> <!-- 选择病种 -->
@ -51,7 +52,7 @@
<view class="dis mar-s20"> <view class="dis mar-s20">
<view class="mar-y20 flexs titlel2">添加封面</view> <view class="mar-y20 flexs titlel2">添加封面</view>
<view class="width100"> <view class="width100">
<view class="posir" v-if="fengImg!=''" class="posir" style="width: 32%;"> <view v-if="fengImg!=''" class="posir" style="width: 32%;">
<image :src="fengImg" class="diary-item-img" style="width: 100%;" mode="aspectFill"></image> <image :src="fengImg" class="diary-item-img" style="width: 100%;" mode="aspectFill"></image>
<image @tap="clearfengImg" src="../../static/public/closequan.png" class="posia" style="width: 20px;height: 20px;right: 10rpx;top: 10rpx;" mode=""></image> <image @tap="clearfengImg" src="../../static/public/closequan.png" class="posia" style="width: 20px;height: 20px;right: 10rpx;top: 10rpx;" mode=""></image>
</view> </view>
@ -71,7 +72,7 @@
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view style="margin-top: 87rpx;margin-bottom: 30rpx;"> <view style="margin-top: 87rpx;margin-bottom: 30rpx;">
<view @tap="goAddDiary" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">立即提交</view> <view @tap="submit" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">立即提交</view>
</view> </view>
</view> </view>
</view> </view>
@ -103,6 +104,7 @@
diary_doctorCurrent:0, diary_doctorCurrent:0,
fengImg:'', fengImg:'',
imgArr:[], imgArr:[],
placeholder: '开始输入...'
} }
}, },
onUnload: function() { onUnload: function() {
@ -120,10 +122,16 @@
} }
}, },
methods: { methods: {
goAddDiary(){ onEditorReady() {
uni.navigateTo({ // #ifdef MP-BAIDU
url:'/pagesA/my-diary-edit/my-diary-edit' this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editorId');
}) // #endif
// #ifdef APP-PLUS || H5 ||MP-WEIXIN
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx = res.context
}).exec()
// #endif
}, },
openXial(index){ openXial(index){
if(index==0) { if(index==0) {
@ -182,6 +190,7 @@
} else this.$toolAll.tools.showToast(res.msg); } else this.$toolAll.tools.showToast(res.msg);
}) })
}, },
//
updataImg(index){ updataImg(index){
if(index==0){ if(index==0){
uni.chooseImage({ uni.chooseImage({
@ -225,6 +234,7 @@
clearaddImg(index){ clearaddImg(index){
this.imgArr.splice(index,1); this.imgArr.splice(index,1);
}, },
//
submit(){ submit(){
if(this.diary_title==''){ if(this.diary_title==''){
this.$toolAll.tools.showToast('请输入日记标题'); this.$toolAll.tools.showToast('请输入日记标题');
@ -248,7 +258,8 @@
doctor_name:this.diary_doctor, doctor_name:this.diary_doctor,
id:'' id:''
} }
this.$requst.get('user/diary',params).then(res=>{ console.log(params);
this.$requst.post('user/diary-save',params).then(res=>{
if(res.code==0){ if(res.code==0){
this.$toolAll.tools.showToast('保存成功'); this.$toolAll.tools.showToast('保存成功');
uni.navigateBack({delta:1}) uni.navigateBack({delta:1})

View File

@ -8,7 +8,7 @@
<view class="clips1">{{item.title}}</view> <view class="clips1">{{item.title}}</view>
<view class="mar-s20 fon24 col9">{{item.content}}</view> <view class="mar-s20 fon24 col9">{{item.content}}</view>
<view class="disac fw mar-s20"> <view class="disac fw mar-s20">
<image class="diary-img mar-x10" :src="item1" v-for="(item1,index1) in item.imgArr" :key="index1" mode="aspectFit"></image> <image class="diary-img mar-x10" @tap="preImg(index,index1)" :src="item1" v-for="(item1,index1) in item.imgArr" :key="index1" mode="aspectFill"></image>
</view> </view>
<view class="disjbac mar-s20"> <view class="disjbac mar-s20">
<view class="fon28 pcol bold">{{item.doctorName}}</view> <view class="fon28 pcol bold">{{item.doctorName}}</view>
@ -39,22 +39,7 @@
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'), publicColor:uni.getStorageSync('publicColor'),
optionObj:'', optionObj:'',
dataList:[ dataList:[],
{
title:'今天是2021年的最后一天了今天也要开心哟~',
content:'今天是2021年的最后一天了今天也要开心哟~,新的一年新的气象新的你们,房哈哈韩哈哈哈是是是技术舒适版舒适感湖胡淑华户数保护户户城市时尚感随时会输就输公司号几号的坏叔叔闭式水实时。',
imgArr:['../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png'],
doctorName:'植发·杨明医生',
creatTime:'2021.12.31 12:25:36',
},
{
title:'今天是2021年的最后一天了今天也要开心哟~',
content:'今天是2021年的最后一天了今天也要开心哟~,新的一年新的气象新的你们,房哈哈韩哈哈哈是是是技术舒适版舒适感湖胡淑华户数保护户户城市时尚感随时会输就输公司号几号的坏叔叔闭式水实时。',
imgArr:['../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png'],
doctorName:'植发·杨明医生',
creatTime:'2021.12.31 12:25:36',
}
],
page:1, page:1,
size:20, size:20,
total:'',// total:'',//
@ -91,6 +76,19 @@
if(res.code==0){ if(res.code==0){
if(this.page==1) this.dataList = []; if(this.page==1) this.dataList = [];
this.total = res.data.total; this.total = res.data.total;
if(res.data.list.length){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
title:item.title,
content:item.content,
imgArr:item.images.split(','),
doctorName:item.doctor_name,
creatTime:item.created_at,
}
this.dataList.push(obj);
})
}
} else this.$toolAll.tools.showToast(res.msg); } else this.$toolAll.tools.showToast(res.msg);
},error=>{}) },error=>{})
}, },
@ -101,6 +99,13 @@
this.dataList.splice(index,1); this.dataList.splice(index,1);
} else this.$toolAll.tools.showToast(res.msg); } else this.$toolAll.tools.showToast(res.msg);
},error=>{}) },error=>{})
},
preImg(index,num){
console.log(this.dataList[index]);
uni.previewImage({
current:this.dataList[index].imgArr[num],
urls:this.dataList[index].imgArr
})
} }
} }
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<!-- 状态栏 --> <!-- 状态栏 -->
<status-nav :titleVal="'关于我们'" :statusTitle="true"></status-nav> <status-nav :titleVal="'关于我们'" :whereCome="whereCome*1" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32"> <view :style="{paddingTop: statusHNH+'px'}" class="pad-zy32">
<!-- 自定义轮播 --> <!-- 自定义轮播 -->
<view class="mar-s20"> <view class="mar-s20">
@ -74,6 +74,7 @@
isAutoPlay:false, isAutoPlay:false,
vision:false, vision:false,
isShowP:false, isShowP:false,
whereCome:0
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -99,7 +100,7 @@
this.isAutoPlay = false; this.isAutoPlay = false;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('is_active')!=1){this.vision = true;} if(uni.getStorageSync('is_active')!=1){this.vision = true;this.whereCome = 2;}
if(options.invite_code!='' && options.invite_code!=undefined){ if(options.invite_code!='' && options.invite_code!=undefined){
this.loginEv(options.invite_code); this.loginEv(options.invite_code);
} else if(options.source_code!='' && options.source_code!=undefined){ } else if(options.source_code!='' && options.source_code!=undefined){

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long