梁沛聪 6 роки тому
джерело
коміт
3eb04ba2e5

+ 2
- 1
miniapp/app/app.json Переглянути файл

@@ -11,7 +11,8 @@
11 11
         "pages/bookService/index",
12 12
         "pages/yuesao/index",
13 13
         "pages/detail/index",
14
-        "pages/addComment/index"
14
+        "pages/addComment/index",
15
+        "pages/service/index"
15 16
     ],
16 17
     "window": {
17 18
         "backgroundTextStyle": "light",

+ 3
- 3
miniapp/app/pages/classify/index.js Переглянути файл

@@ -52,9 +52,9 @@ new $.Page({
52 52
                     path: `/pages/goodsList/index`
53 53
                 });
54 54
             } else if (name.includes('咨询')) {
55
-                // $.wx.showToast({
56
-                //     title: '持续开发中'
57
-                // });
55
+                $.router.goto({
56
+                    path: `/pages/service/index`
57
+                });
58 58
             } else {
59 59
                 $.router.goto({
60 60
                     path: `/pages/introduce/index`,

+ 3
- 3
miniapp/app/pages/classify/index.wxml Переглянути файл

@@ -7,12 +7,12 @@
7 7
                 <view class="bd">
8 8
                     <view class="item" wx:for="{{item.array}}" wx:for-item="l" data-name="{{l.name}}" data-id="{{l.id}}"
9 9
                         bindtap="toIntroduce">
10
-                        <button class="inner" hover-class="none" open-type="contact" session-from="" wx:if="{{l.isConsult}}">
10
+                        <!-- <button class="inner" hover-class="none" open-type="contact" session-from="" wx:if="{{l.isConsult}}">
11 11
                             <view class="text">{{l.name}}</view>
12 12
                             <view class="sub-text">{{l.info}}</view>
13 13
                             <image class="icon-arr" src="/img/arr1.png"></image>
14
-                        </button>
15
-                        <view class="inner" wx:else>
14
+                        </button> -->
15
+                        <view class="inner">
16 16
                             <view class="text">{{l.name}}</view>
17 17
                             <view class="sub-text">{{l.info}}</view>
18 18
                             <image class="icon-arr" src="/img/arr1.png"></image>

+ 8
- 2
miniapp/app/pages/home/index.wxml Переглянути файл

@@ -43,12 +43,18 @@
43 43
                     <view class="name">催乳及产后康复</view>
44 44
                 </view>
45 45
             </view>
46
-            <button class="item" hover-class="none" open-type="contact" session-from="">
46
+            <!-- <button class="item" hover-class="none" open-type="contact" session-from="homeApp">
47 47
                 <view class="entrance">
48 48
                     <image class="img" mode="widthFix" src="/img/entrance5.png"></image>
49 49
                     <view class="name">月子及育婴知识咨询</view>
50 50
                 </view>
51
-            </button>
51
+            </button> -->
52
+            <view class="item">
53
+                <view class="entrance" bindtap="handleJump" data-route="service">
54
+                    <image class="img" mode="widthFix" src="/img/entrance5.png"></image>
55
+                    <view class="name">月子及育婴知识咨询</view>
56
+                </view>
57
+            </view>
52 58
             <view class="item" bindtap="handleJump" data-route="classify" data-target="jiazheng" data-type="5">
53 59
                 <view class="entrance">
54 60
                     <image class="img" mode="widthFix" src="/img/entrance6.png"></image>

+ 34
- 0
miniapp/app/pages/service/index.js Переглянути файл

@@ -0,0 +1,34 @@
1
+const $ = global;
2
+
3
+new $.Page({
4
+    onLoad() {
5
+
6
+    },
7
+    toPay() {
8
+        $.request('reward', 'POST', {}).then((res) => {
9
+            const {
10
+                timestamp,
11
+                paySign,
12
+                nonceStr
13
+            } = res.msg;
14
+            const pck = res.msg.package;
15
+            wx.requestPayment({
16
+                timeStamp: timestamp + '',
17
+                nonceStr,
18
+                package: pck,
19
+                signType: 'MD5',
20
+                paySign,
21
+                success(res) {
22
+                    $.wx.showToast({
23
+                        title: '多谢打赏!'
24
+                    });
25
+                },
26
+                fail() {
27
+                    $.wx.showToast({
28
+                        title: '支付失败'
29
+                    });
30
+                }
31
+            });
32
+        });
33
+    }
34
+});

+ 3
- 0
miniapp/app/pages/service/index.json Переглянути файл

@@ -0,0 +1,3 @@
1
+{
2
+    "navigationBarTitleText": ""
3
+}

+ 6
- 0
miniapp/app/pages/service/index.wxml Переглянути файл

@@ -0,0 +1,6 @@
1
+<view class="page">
2
+    <view class="page-bd">
3
+        <button class="btn-join" type="primary" open-type="contact" session-from="homeApp">联系客服</button>
4
+        <button class="btn-join" type="default" bindtap="toPay">打赏</button>
5
+    </view>
6
+</view>

+ 3
- 0
miniapp/app/pages/service/index.wxss Переглянути файл

@@ -0,0 +1,3 @@
1
+page {
2
+    background-color: #ddd;
3
+}

+ 7
- 1
miniapp/app/project.config.json Переглянути файл

@@ -33,7 +33,7 @@
33 33
 			"list": []
34 34
 		},
35 35
 		"miniprogram": {
36
-			"current": -1,
36
+			"current": 9,
37 37
 			"list": [
38 38
 				{
39 39
 					"id": -1,
@@ -88,6 +88,12 @@
88 88
 					"name": "添加评论",
89 89
 					"pathName": "pages/addComment/index",
90 90
 					"query": ""
91
+				},
92
+				{
93
+					"id": -1,
94
+					"name": "客服",
95
+					"pathName": "pages/service/index",
96
+					"query": ""
91 97
 				}
92 98
 			]
93 99
 		}

Loading…
Відмінити
Зберегти