图片上传

master
chen 2021-11-11 12:04:41 +08:00
parent 5b006c1eac
commit 98959dd0f6
4 changed files with 34 additions and 39 deletions

View File

@ -430,23 +430,27 @@
let narr = rt.result.split(','); let narr = rt.result.split(',');
if(narr[1]=='true'){// if(narr[1]=='true'){//
this.$requst.post('staff/coupon/write-off-experience-coupon',{coupon_id:narr[0],secret:narr[2],account_id:this.userInfo.id}).then(res=>{ this.$requst.post('staff/coupon/write-off-experience-coupon',{coupon_id:narr[0],secret:narr[2],account_id:this.userInfo.id}).then(res=>{
if(res.code==0){
this.isQian = true this.isQian = true
if(res.code==0){
this.contentVal = "核销成功"; this.contentVal = "核销成功";
} else {
this.contentVal = res.msg;
}
setTimeout(()=>{ setTimeout(()=>{
this.isQian = false this.isQian = false
},2000) },2000)
} else this.$toolAll.tools.showToast(res.msg);
},error=>{}) },error=>{})
} else {// } else {//
this.$requst.post('order/check',{order_coding:narr[0],id:narr[1],check_user:this.userInfo.id}).then(res=>{ this.$requst.post('order/check',{order_coding:narr[0],id:narr[1],check_user:this.userInfo.id}).then(res=>{
if(res.code==0){
this.isQian = true this.isQian = true
if(res.code==0){
this.contentVal = "核销成功"; this.contentVal = "核销成功";
} else {
this.contentVal = res.msg;
}
setTimeout(()=>{ setTimeout(()=>{
this.isQian = false this.isQian = false
},2000) },2000)
} else this.$toolAll.tools.showToast(res.msg);
},error=>{}) },error=>{})
} }
} }

View File

@ -132,7 +132,7 @@
return { return {
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),// publicColor:uni.getStorageSync('publicColor'),//
isScreenshot:false, isScreenshot:true,
upImg:'', upImg:'',
chooseIndex:0, chooseIndex:0,
activityList:[],// activityList:[],//
@ -151,29 +151,18 @@
methods: { methods: {
btnEv(index){ btnEv(index){
this.chooseIndex = index; this.chooseIndex = index;
if(this.activityList[index].ntype=='share_screenshots'){// if(this.activityList[index].ntype=='share_screenshots' && (this.activityList[index].account_status!=0 || this.activityList[index].account_status==2)){//
if(this.activityList[index].account_status!=0 || this.activityList[index].account_status==2){
this.isScreenshot = true; this.isScreenshot = true;
} }
} if(this.activityList[index].ntype=='offline_sign_in' && this.activityList[index].account_status==4){//线
if(this.activityList[index].ntype=='offline_sign_in'){//线
if(this.activityList[index].account_status==4) {
this.$toolAll.tools.showToast('请先完成任务,再来领取') this.$toolAll.tools.showToast('请先完成任务,再来领取')
} else {
this.$toolAll.tools.showToast('领取成功');
this.checkList();
} }
} if(this.activityList[index].ntype=='share' && this.activityList[index].account_status==4){//
if(this.activityList[index].ntype=='share'){//
if(this.activityList[index].account_status==4){
uni.navigateTo({ uni.navigateTo({
url:'/pagesB/personalPoster/personalPoster' url:'/pagesB/personalPoster/personalPoster'
}) })
} else {
this.$toolAll.tools.showToast('领取成功')
} }
} if(this.activityList[index].danc == this.activityList[index].allc) {
if(this.activityList[index].isIcon!=3 && this.activityList[index].account_status==1 || this.activityList[index].account_status==3) {
if(this.isNum==0) { if(this.isNum==0) {
this.isNum++; this.isNum++;
this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{ this.$requst.post('task/task/complete-task',{task_id:this.activityList[index].id}).then(res=>{
@ -256,11 +245,10 @@
success: (res) => { success: (res) => {
console.log(res); console.log(res);
this.upImg = res.tempFilePaths[0]; this.upImg = res.tempFilePaths[0];
this.$requst.post('file/upload/image',{image:this.upImg}).then(res=>{ this.$requst.upload('file/upload/image',{file:this.upImg}).then(res=>{
if(res.code==0){ this.upImg = this.$http + res.data.src
this.$toolAll.tools.showToast('图片上传成功(*^▽^*)')
} },error=>{})
})
} }
}) })
}, },

View File

@ -409,7 +409,7 @@
original_total: this.zanAllPrice*100,// original_total: this.zanAllPrice*100,//
freight: this.expressInfo.default_price,// freight: this.expressInfo.default_price,//
remarks: "",// remarks: "",//
is_only:is_only,//0 2 is_only:is_only,//0 12
is_score:is_score,//0 1 is_score:is_score,//0 1
coin:this.zf_kqPrice// coin:this.zf_kqPrice//
} }

View File

@ -46,6 +46,7 @@
<view class="fon28 col3"> <view class="fon28 col3">
<view class="mar-sx20 disje"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> <span v-if="item.coin!=0">+{{item.coin}}</span></span><span v-else>{{item.total}}</span></view> <view class="mar-sx20 disje"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> <span v-if="item.coin!=0">+{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
<view class="width100 disje"> <view class="width100 disje">
<view v-if="item.is_only==0 && item.open_one==1" class="order-btn mar-y20"></view>
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0" class="order-cancle"></view> <view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0" class="order-cancle"></view>
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view> <view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view>
<!-- <view class="order-btn" v-if="item.is_only==1"></view> --> <!-- <view class="order-btn" v-if="item.is_only==1"></view> -->
@ -247,7 +248,8 @@
num:items.num, num:items.num,
not_check_num:items.not_check_num, not_check_num:items.not_check_num,
check_type:items.check_type, check_type:items.check_type,
is_virtual:items.is_virtual is_virtual:items.is_virtual,
activity_type:items.activity_type
} }
nchildren.push(objs); nchildren.push(objs);
}) })
@ -261,7 +263,8 @@
total: nprice,// total: nprice,//
coin:item.coin,// coin:item.coin,//
is_only:item.is_only,// is_only:item.is_only,//
virtual_check:item.virtual_check virtual_check:item.virtual_check,
// open_one:item.open_one
} }
this.orderList.push(obj); this.orderList.push(obj);
}) })