Browse Source

no message

yanjie 4 years ago
parent
commit
b51678f6f4

+ 1 - 1
pages.json

xqd
@@ -573,7 +573,7 @@
 				{
 					"path": "add_archives",
 					"style": {
-						"navigationBarTitleText": "添加档案"
+						"navigationBarTitleText": "健康档案"
 					}
 				},
 				{

+ 26 - 8
pages/common_tools/my_consulting/my_appointment.vue

xqd xqd
@@ -143,7 +143,27 @@
 			uni.stopPullDownRefresh()
 		},
 		methods: {
-			cancelOrder: async function(item, index) {
+			cancelOrder(item, index) {
+				uni.showModal({
+					title: "提示",
+					content: "确定要取消订单吗?",
+					success: (res) => {
+						if (res.confirm) {
+							uni.requestSubscribeMessage({
+								tmplIds: ['bjZ-r79i8sl7zEtdttAtcCPZLkCgFSYHTNWnNVd1cG0'],
+								success: (res) => {
+									this.confirmorder(item, index)
+								},
+								fail: (err) => {
+									this.confirmorder(item, index)
+								}
+							})
+
+						}
+					}
+				})
+			},
+			confirmorder: async function(item, index) {
 				let res = await this.$request.post("/api/v1/order/orderCancel", {
 					order_id: item.id
 				})
@@ -153,14 +173,12 @@
 						icon: "none"
 					})
 					this.ordersList.splice(index, 1)
-				}else{
+				} else {
 					uni.showModal({
-						title:"提示",
-						content:res.message,
-						showCancel:false,
-						success: (res) => {
-							
-						}
+						title: "提示",
+						content: res.message,
+						showCancel: false,
+						success: (res) => {}
 					})
 				}
 			},

+ 26 - 9
pages/common_tools/my_consulting/my_consulting.vue

xqd xqd xqd
@@ -8,8 +8,8 @@
 		<load-refresh ref="loadRefresh" :isRefresh="true" refreshType="loader" refreshTime="2000" heightReduce="10"
 		 backgroundCover="#fff" :pageNo="pageindex" :totalPageNo="totalPage" @loadMore="loadMore" @refresh="refresh">
 			<view slot="content-list">
-				<view class="margin-top-sm margin-lr-sm padding-lr-xs" v-for="(item,index) in ordersList" @click="goinfoorder" :data-id="item.id"
-				 :key="index" style="border-radius: 16rpx;box-shadow:0px 0px 10px rgba(0,0,0,.2);">
+				<view class="margin-top-sm margin-lr-sm padding-lr-xs" v-for="(item,index) in ordersList" @click="goinfoorder"
+				 :data-id="item.id" :key="index" style="border-radius: 16rpx;box-shadow:0px 0px 10px rgba(0,0,0,.2);">
 					<view class="flex justify-between align-center bg-white" style="padding: 28rpx;border-radius: 16rpx;">
 						<view class="jinxing">
 							<text style="display: inline-block;width: 12rpx;height: 12rpx;border-radius: 50%;background-color:#EEAA3F;margin-right: 8rpx;"></text>
@@ -217,6 +217,25 @@
 		// },
 		methods: {
 			cancelOrder: async function(item, index) {
+				uni.showModal({
+					title: "提示",
+					content: "确定要取消订单吗?",
+					success: (res) => {
+						if (res.confirm) {
+							uni.requestSubscribeMessage({
+								tmplIds: ['bjZ-r79i8sl7zEtdttAtcCPZLkCgFSYHTNWnNVd1cG0'],
+								success: (res) => {
+									this.confirmorder(item, index)
+								},
+								fail: (err) => {
+									this.confirmorder(item, index)
+								}
+							})
+						}
+					}
+				})
+			},
+			confirmorder: async function(item, index) {
 				let res = await this.$request.post("/api/v1/order/orderCancel", {
 					order_id: item.id
 				})
@@ -226,14 +245,12 @@
 						icon: "none"
 					})
 					this.ordersList.splice(index, 1)
-				}else{
+				} else {
 					uni.showModal({
-						title:"提示",
-						content:res.message,
-						showCancel:false,
-						success: (res) => {
-							
-						}
+						title: "提示",
+						content: res.message,
+						showCancel: false,
+						success: (res) => {}
 					})
 				}
 			},

BIN
static/img/foorter.png