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'>
<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 class="qudbtn" @click="qudbtn">确定</view>
</uni-popup>
</view>
</view>
</template>
<script>
@ -36,18 +40,18 @@
data() {
return {
top: 0,
url: "https://bodybuilding.bsdong.cn/images/banner.png",
url: "",
path: "",
yrenlianlist:[],
jqrllist:[],
userxixin:{},
type: "",
type: ""
}
},
onLoad(o) {
this.type = (o.type?o.type:'')
this.top = uni.getSystemInfoSync().statusBarHeight
// this.memberInfo()
this.type = o.type
this.memberInfo()
},
methods: {
fanhui(){
@ -58,29 +62,66 @@
this.userxixin = res.data
console.log('this.userxixin',this.userxixin);
if(this.userxixin.face_id!=0){
if(this.type =='order'){
uni.navigateBack({
delta: 1
})
}else{
uni.switchTab({
url:'/pages/index/index'
})
}
uni.switchTab({
url:'/pages/index/index'
})
}
})
},
pais(){
const that = this;
uni.chooseImage({
count: 1,
success: function(res) {
that.url = res.tempFilePaths[0]
that.$refs.popup.open("center")
}
});
// this.$refs.popup.open('center')
this.chooseImage()
},
qudbtn(){
// this.$refs.popup.close('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() {
const that = this;
that.yrenlianlist=[]
@ -110,14 +151,12 @@
});
setTimeout(function(){
if(that.type =='order'){
uni.navigateBack({
delta: 1
})
if(that.type == 'order'){
uni.navigateBack({delta:1})
}else{
uni.switchTab({
url:'/pages/user/index'
})
})
}
},2000)
}
@ -126,7 +165,7 @@
uni.showToast({
icon: "none",
title: data.msg,
duration: 5000,
duration: 2000,
});
}
@ -140,14 +179,15 @@
});
},
onok(ev) {
this.jqrllist=[]
this.url = "";
this.$refs.popup.close()
this.path = ev.path;
this.jqrllist.push(this.path)
console.log('this.path',this.path);
},
oncancel() {
// url
this.url = "";
this.$refs.popup.close()
},
previous() {
uni.switchTab({
@ -174,7 +214,7 @@
}
.imgCropper{
width: 750rpx;
height: 100vh;
height: 1200rpx;
position: relative;
}
.fot {

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

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

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

@ -11,7 +11,7 @@
<view class="mendian" @click="gengx">
<image class="img" :src="userxixin.avatar?userxixin.avatar:avatar" mode=""></image>
<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>
<view class="xinxi" v-else>
@ -240,7 +240,11 @@
margin-left: 26rpx;
width: 365rpx;
}
.xinxi text{
font-size: 26rpx;
color: #F8A617;
margin-left: 20rpx;
}
.renlbtn {
width: 200rpx;
height: 80rpx;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Loading…
Cancel
Save