Przeglądaj źródła

fix: handle image border radius & navigate

wangyuan 2 lat temu
rodzic
commit
a5b9ea8373

+ 9 - 5
pages/appointment/appointment.js

@@ -299,18 +299,22 @@ Page({
       duration: this.data.timeActive,
       addressId: this.data.addressId
     }
+    var timer = null
     submitAppointment(data).then(res => {
       wx.hideLoading()
       wx.showToast({
         title: '预约成功',
         icon: 'success'
       })
-      this.setData({
+      timer = setTimeout(() => {
+        wx.navigateTo({
+          url: '/pages/myAppointment/myAppointment?from=appointment',
+        })
+        clearTimeout(timer)
+      }, 1000);
+      /* this.setData({
         appointmentSuccess: true
-      })
-      wx.navigateTo({
-        url: '/pages/appointment/appointment?form=appoointment',
-      })
+      }) */
     }).catch(e => {
       wx.hideLoading()
       wx.showModal({

+ 1 - 0
pages/appointment/appointment.wxss

@@ -38,6 +38,7 @@
 .headimg {
   width: 100%;
   height: 100%;
+  border-radius: 50%;
 }
 .ac-name {
   font-size: 30rpx;

+ 1 - 0
pages/buy/buy.wxss

@@ -26,6 +26,7 @@
 .headimg {
   width: 100%;
   height: 100%;
+  border-radius: 50%;
 }
 .name {
   font-size: 30rpx;