main
123456 2 weeks ago
commit 21c55b781a
  1. 106
      pages/face/face.vue
  2. 20
      pages/index/index.vue
  3. 19
      pages/mendainlist/mendainlist.vue
  4. 1
      pages/order/order.vue
  5. 8
      pages/user/index.vue
  6. BIN
      static/zaixian.png

@ -23,12 +23,16 @@
<uni-popup ref="popup" background-color="#fff" :mask-click='false'> <uni-popup ref="popup" background-color="#fff" :mask-click='false'>
<view class="imgCropper"> <view class="imgCropper">
<ksp-cropper mode="free" :maxWidth="500" :maxHeight="500" :url="url" @cancel="oncancel" @ok="onok"></ksp-cropper> <!-- <button @click="chooseImage">选择图片</button> -->
<view style="text-align:center;">
<image mode="widthFix" :src="path" @click="chooseImage"/>
</view>
<ksp-cropper :width="10" :height="10" :maxWidth="500" :maxHeight="500" :url="url" @cancel="oncancel" @ok="onok"></ksp-cropper>
</view> </view>
<view class="qudbtn" @click="qudbtn">确定</view>
</uni-popup> </uni-popup>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
@ -36,18 +40,18 @@
data() { data() {
return { return {
top: 0, top: 0,
url: "https://bodybuilding.bsdong.cn/images/banner.png", url: "",
path: "", path: "",
yrenlianlist:[], yrenlianlist:[],
jqrllist:[], jqrllist:[],
userxixin:{}, userxixin:{},
type: "", type: ""
} }
}, },
onLoad(o) { onLoad(o) {
this.type = (o.type?o.type:'')
this.top = uni.getSystemInfoSync().statusBarHeight this.top = uni.getSystemInfoSync().statusBarHeight
// this.memberInfo() this.type = o.type
this.memberInfo()
}, },
methods: { methods: {
fanhui(){ fanhui(){
@ -58,29 +62,66 @@
this.userxixin = res.data this.userxixin = res.data
console.log('this.userxixin',this.userxixin); console.log('this.userxixin',this.userxixin);
if(this.userxixin.face_id!=0){ if(this.userxixin.face_id!=0){
if(this.type =='order'){ uni.switchTab({
uni.navigateBack({ url:'/pages/index/index'
delta: 1 })
})
}else{
uni.switchTab({
url:'/pages/index/index'
})
}
} }
}) })
}, },
pais(){ pais(){
const that = this; // this.$refs.popup.open('center')
uni.chooseImage({ this.chooseImage()
count: 1, },
success: function(res) { qudbtn(){
that.url = res.tempFilePaths[0] // this.$refs.popup.close('center')
that.$refs.popup.open("center") // var tjlist=[...this.yrenlianlist,...this.jqrllist]
} const that = this;
}); uni.uploadFile({
url: that.ymurl+'/api/uploadFile',
filePath: that.path,
name: 'file',
formData: {
'user': 'test'
},
fail(err) {
console.log(11,err)
},
success: (res) => {
console.log('tjlist',JSON.parse(res.data));
var data=JSON.parse(res.data)
if(data.code==200){
that.$api.memberFace({face_id:data.data.file_id}).then(res=>{
if(res.code=='200'){
uni.showToast({
icon: "none",
title: '上传成功',
duration: 2000,
});
setTimeout(function(){
if(that.type == 'order'){
uni.navigateBack({delta:1})
}else{
uni.switchTab({
url:'/pages/user/index'
})
}
},2000)
}
})
}else{
uni.showToast({
icon: "none",
title: data.msg,
duration: 2000,
});
}
}
});
}, },
chooseImage() { chooseImage() {
const that = this; const that = this;
that.yrenlianlist=[] that.yrenlianlist=[]
@ -110,14 +151,12 @@
}); });
setTimeout(function(){ setTimeout(function(){
if(that.type =='order'){ if(that.type == 'order'){
uni.navigateBack({ uni.navigateBack({delta:1})
delta: 1
})
}else{ }else{
uni.switchTab({ uni.switchTab({
url:'/pages/user/index' url:'/pages/user/index'
}) })
} }
},2000) },2000)
} }
@ -126,7 +165,7 @@
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: data.msg, title: data.msg,
duration: 5000, duration: 2000,
}); });
} }
@ -140,14 +179,15 @@
}); });
}, },
onok(ev) { onok(ev) {
this.jqrllist=[]
this.url = ""; this.url = "";
this.$refs.popup.close()
this.path = ev.path; this.path = ev.path;
this.jqrllist.push(this.path)
console.log('this.path',this.path);
}, },
oncancel() { oncancel() {
// url // url
this.url = ""; this.url = "";
this.$refs.popup.close()
}, },
previous() { previous() {
uni.switchTab({ uni.switchTab({
@ -174,7 +214,7 @@
} }
.imgCropper{ .imgCropper{
width: 750rpx; width: 750rpx;
height: 100vh; height: 1200rpx;
position: relative; position: relative;
} }
.fot { .fot {

@ -22,7 +22,9 @@
<view class="mddz" v-for="(item,index) in tuijianlist" :key="index"> <view class="mddz" v-for="(item,index) in tuijianlist" :key="index">
<view class="mddz1"> <view class="mddz1">
<image class="mddz1img" style="border-radius: 10rpx;" :src="item.image.url" mode=""></image> <image class="mddz1img" style="border-radius: 10rpx;" :src="item.image.url" mode=""></image>
<view class="mddz1wz">{{item.name}}</view> <view class="mddz1wz">{{item.name}}
<image src="@/static/zaixian.png"></image><text class="num">{{item.one_line_num}}</text>
</view>
</view> </view>
<view class="mddz2"> <view class="mddz2">
<view style='width:570rpx' @click="handleNavigation(item)"> <view style='width:570rpx' @click="handleNavigation(item)">
@ -105,7 +107,7 @@
console.log(res) console.log(res)
}) })
}, },
onReady() { onShow() {
this.viplist=[] this.viplist=[]
this.cardList(1) this.cardList(1)
// this.storeList(1) // this.storeList(1)
@ -270,7 +272,7 @@
} }
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.yqbtn { .yqbtn {
width: 550rpx; width: 550rpx;
height: 90rpx; height: 90rpx;
@ -487,8 +489,18 @@
font-weight: bold; font-weight: bold;
font-size: 30rpx; font-size: 30rpx;
color: #222222; color: #222222;
margin-left: 21rpx; margin-left: 15rpx;
margin-top: 12rpx; margin-top: 12rpx;
image{
width: 28rpx;
height: 28rpx;
vertical-align: middle;
}
.num{
font-size: 22rpx;
color: rgb(11, 229, 0);
font-weight: normal;
}
} }
.mddz { .mddz {

@ -13,7 +13,9 @@
<view class="mddz" v-for="(item,index) in mendainlist" :key="index"> <view class="mddz" v-for="(item,index) in mendainlist" :key="index">
<view class="mddz1" @click="xzmd(item)"> <view class="mddz1" @click="xzmd(item)">
<image class="mddz1img" :src="item.image.url" mode=""></image> <image class="mddz1img" :src="item.image.url" mode=""></image>
<view class="mddz1wz">{{item.name}}</view> <view class="mddz1wz">{{item.name}}
<image src="@/static/zaixian.png"></image><text class="num">{{item.one_line_num}}</text>
</view>
</view> </view>
<view class="mddz2"> <view class="mddz2">
<view class="mdleft" @click.stop="handleNavigation(item)"> <view class="mdleft" @click.stop="handleNavigation(item)">
@ -108,7 +110,7 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.mdleft{ .mdleft{
width: 620rpx; width: 620rpx;
} }
@ -196,10 +198,19 @@
font-weight: bold; font-weight: bold;
font-size: 30rpx; font-size: 30rpx;
color: #222222; color: #222222;
margin-left: 21rpx; margin-left: 15rpx;
margin-top: 12rpx; margin-top: 12rpx;
image{
width: 28rpx;
height: 28rpx;
vertical-align: middle;
}
.num{
font-size: 22rpx;
color: rgb(11, 229, 0);
font-weight: normal;
}
} }
.mddz { .mddz {
width: 680rpx; width: 680rpx;
/* height: 152rpx; */ /* height: 152rpx; */

@ -98,6 +98,7 @@
this.mandianxinxi = JSON.parse(xzmd) this.mandianxinxi = JSON.parse(xzmd)
this.mandianxinxi.id=this.mandianxinxi.store_id this.mandianxinxi.id=this.mandianxinxi.store_id
} }
this.memberInfo();
console.log('this.mandianxinxi',this.mandianxinxi); console.log('this.mandianxinxi',this.mandianxinxi);
}, },
methods: { methods: {

@ -11,7 +11,7 @@
<view class="mendian" @click="gengx"> <view class="mendian" @click="gengx">
<image class="img" :src="userxixin.avatar?userxixin.avatar:avatar" mode=""></image> <image class="img" :src="userxixin.avatar?userxixin.avatar:avatar" mode=""></image>
<view class="xinxi" v-if="userxixin.mobile"> <view class="xinxi" v-if="userxixin.mobile">
<view class="">{{userxixin.nickname?userxixin.nickname:'微信用户'}}</view> <view class="">{{userxixin.nickname?userxixin.nickname:'微信用户'}}<text v-if="userxixin.attendance_num>=1">出勤次数{{userxixin.attendance_num}}</text></view>
<view class="">{{userxixin.mobile?userxixin.mobile:'暂无手机号'}}</view> <view class="">{{userxixin.mobile?userxixin.mobile:'暂无手机号'}}</view>
</view> </view>
<view class="xinxi" v-else> <view class="xinxi" v-else>
@ -240,7 +240,11 @@
margin-left: 26rpx; margin-left: 26rpx;
width: 365rpx; width: 365rpx;
} }
.xinxi text{
font-size: 26rpx;
color: #F8A617;
margin-left: 20rpx;
}
.renlbtn { .renlbtn {
width: 200rpx; width: 200rpx;
height: 80rpx; height: 80rpx;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Loading…
Cancel
Save