浏览代码

提交客服页面

梁沛聪 6 年前
父节点
当前提交
3eb04ba2e5

+ 2
- 1
miniapp/app/app.json 查看文件

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

+ 3
- 3
miniapp/app/pages/classify/index.js 查看文件

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

+ 3
- 3
miniapp/app/pages/classify/index.wxml 查看文件

7
                 <view class="bd">
7
                 <view class="bd">
8
                     <view class="item" wx:for="{{item.array}}" wx:for-item="l" data-name="{{l.name}}" data-id="{{l.id}}"
8
                     <view class="item" wx:for="{{item.array}}" wx:for-item="l" data-name="{{l.name}}" data-id="{{l.id}}"
9
                         bindtap="toIntroduce">
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
                             <view class="text">{{l.name}}</view>
11
                             <view class="text">{{l.name}}</view>
12
                             <view class="sub-text">{{l.info}}</view>
12
                             <view class="sub-text">{{l.info}}</view>
13
                             <image class="icon-arr" src="/img/arr1.png"></image>
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
                             <view class="text">{{l.name}}</view>
16
                             <view class="text">{{l.name}}</view>
17
                             <view class="sub-text">{{l.info}}</view>
17
                             <view class="sub-text">{{l.info}}</view>
18
                             <image class="icon-arr" src="/img/arr1.png"></image>
18
                             <image class="icon-arr" src="/img/arr1.png"></image>

+ 8
- 2
miniapp/app/pages/home/index.wxml 查看文件

43
                     <view class="name">催乳及产后康复</view>
43
                     <view class="name">催乳及产后康复</view>
44
                 </view>
44
                 </view>
45
             </view>
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
                 <view class="entrance">
47
                 <view class="entrance">
48
                     <image class="img" mode="widthFix" src="/img/entrance5.png"></image>
48
                     <image class="img" mode="widthFix" src="/img/entrance5.png"></image>
49
                     <view class="name">月子及育婴知识咨询</view>
49
                     <view class="name">月子及育婴知识咨询</view>
50
                 </view>
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
             <view class="item" bindtap="handleJump" data-route="classify" data-target="jiazheng" data-type="5">
58
             <view class="item" bindtap="handleJump" data-route="classify" data-target="jiazheng" data-type="5">
53
                 <view class="entrance">
59
                 <view class="entrance">
54
                     <image class="img" mode="widthFix" src="/img/entrance6.png"></image>
60
                     <image class="img" mode="widthFix" src="/img/entrance6.png"></image>

+ 34
- 0
miniapp/app/pages/service/index.js 查看文件

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 查看文件

1
+{
2
+    "navigationBarTitleText": ""
3
+}

+ 6
- 0
miniapp/app/pages/service/index.wxml 查看文件

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 查看文件

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

+ 7
- 1
miniapp/app/project.config.json 查看文件

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

Loading…
取消
保存