diff --git a/pages/face/face.vue b/pages/face/face.vue
index 5314cc7..52e6ede 100644
--- a/pages/face/face.vue
+++ b/pages/face/face.vue
@@ -23,13 +23,8 @@
-
-
-
-
-
+
- 确定
@@ -41,16 +36,18 @@
data() {
return {
top: 0,
- url: "",
+ url: "https://bodybuilding.bsdong.cn/images/banner.png",
path: "",
yrenlianlist:[],
jqrllist:[],
- userxixin:{}
+ userxixin:{},
+ type: "",
}
},
- onLoad() {
+ onLoad(o) {
+ this.type = (o.type?o.type:'')
this.top = uni.getSystemInfoSync().statusBarHeight
- this.memberInfo()
+ // this.memberInfo()
},
methods: {
fanhui(){
@@ -61,62 +58,29 @@
this.userxixin = res.data
console.log('this.userxixin',this.userxixin);
if(this.userxixin.face_id!=0){
- uni.switchTab({
- url:'/pages/index/index'
- })
+ if(this.type =='order'){
+ uni.navigateBack({
+ delta: 1
+ })
+ }else{
+ uni.switchTab({
+ url:'/pages/index/index'
+ })
+ }
}
})
},
pais(){
- // this.$refs.popup.open('center')
- this.chooseImage()
- },
- qudbtn(){
- // this.$refs.popup.close('center')
- // var tjlist=[...this.yrenlianlist,...this.jqrllist]
-
- 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(){
- uni.switchTab({
- url:'/pages/user/index'
- })
- },2000)
- }
- })
- }else{
- uni.showToast({
- icon: "none",
- title: data.msg,
- duration: 2000,
- });
- }
-
- }
- });
-
-
+ const that = this;
+ uni.chooseImage({
+ count: 1,
+ success: function(res) {
+ that.url = res.tempFilePaths[0]
+ that.$refs.popup.open("center")
+ }
+ });
},
+
chooseImage() {
const that = this;
that.yrenlianlist=[]
@@ -146,9 +110,15 @@
});
setTimeout(function(){
- uni.switchTab({
- url:'/pages/user/index'
- })
+ if(that.type =='order'){
+ uni.navigateBack({
+ delta: 1
+ })
+ }else{
+ uni.switchTab({
+ url:'/pages/user/index'
+ })
+ }
},2000)
}
})
@@ -156,7 +126,7 @@
uni.showToast({
icon: "none",
title: data.msg,
- duration: 2000,
+ duration: 5000,
});
}
@@ -170,15 +140,14 @@
});
},
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({
@@ -205,7 +174,7 @@
}
.imgCropper{
width: 750rpx;
- height: 1200rpx;
+ height: 100vh;
position: relative;
}
.fot {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 92d9c10..b5a9c54 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -92,10 +92,10 @@
}
},
onShareAppMessage() {
- return {
- title: '运动湾24小时健身',
- path: '/pages/index/index'
- }
+ return {
+ title: '运动湾24小时健身',
+ path: '/pages/index/index'
+ }
},
onLoad() {
const that = this;
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 2e46182..fde13d7 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -89,9 +89,9 @@
that.vipxinxi = vipxinxi
that.mandianxinxi = tuijianlist
that.top = uni.getSystemInfoSync().statusBarHeight
- this.memberInfo();
},
onShow() {
+ this.memberInfo();
var xzmd = uni.getStorageSync('xzmd')
console.log('xzmd',xzmd);
if (xzmd != '') {
@@ -140,7 +140,7 @@
success(res) {
if(res.confirm){
uni.navigateTo({
- url: "/pages/face/face"
+ url: "/pages/face/face?type=order"
})
}
}
diff --git a/uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue b/uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue
index f6f0164..6f8ac29 100644
--- a/uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue
+++ b/uni_modules/ksp-cropper/components/ksp-cropper/ksp-cropper.vue
@@ -18,10 +18,7 @@
-
-
-
-
+