Commit f00014fa authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 38b1c38f
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
<view class="container"> <view class="container">
<image @click="onClose" style="width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx; <image @click="onClose" style="width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx;
margin-bottom: 30rpx;" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"></image> margin-bottom: 30rpx;" src="https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"></image>
<view class="content"> <view class="content">
<text style="font-size: 40rpx;margin-bottom: 15rpx;">客服时间: 工作日9:00-18:00</text>
<text class="button1" @click="handleBtn1">客服电话</text> <text class="button1" @click="handleBtn1">客服电话</text>
<button class="button2" open-type="im" data-im-id="58428734699">客服在线</button> <button class="button2" open-type="im" data-im-id="58428734699">在线客服</button>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -52,11 +54,11 @@ ...@@ -52,11 +54,11 @@
this.onClose() this.onClose()
}, },
imCallback(e) { imCallback(e) {
console.log("跳转IM客服成功", e.detail); console.log("跳转IM客服成功", e.detail);
this.onClose() this.onClose()
}, },
onimError(e) { onimError(e) {
console.log("拉起IM客服失败", e.detail); console.log("拉起IM客服失败", e.detail);
this.onClose() this.onClose()
} }
}, },
......
...@@ -18,6 +18,13 @@ ...@@ -18,6 +18,13 @@
</view> </view>
</z-paging> </z-paging>
<view class="box-wrap" @click="handleKefu">
<image src="../../static/ic_service.png"></image>
<text>客服时间:</text>
<text>每天9:00-18:00</text>
</view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> </view>
</template> </template>
<script> <script>
...@@ -32,7 +39,8 @@ ...@@ -32,7 +39,8 @@
mixins: [common], mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: [],
showKefuPop: false
}; };
}, },
methods: { methods: {
...@@ -58,6 +66,9 @@ ...@@ -58,6 +66,9 @@
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} }
}); });
},
handleKefu() {
this.showKefuPop = true
} }
} }
}; };
...@@ -67,4 +78,23 @@ ...@@ -67,4 +78,23 @@
.body { .body {
background-color: whitesmoke; background-color: whitesmoke;
} }
.box-wrap {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex;
flex-direction: column;
align-items: center;
image {
width: 100rpx;
height: 100rpx;
}
text {
color: #2c2c2c;
}
}
</style> </style>
\ No newline at end of file
...@@ -17,7 +17,13 @@ ...@@ -17,7 +17,13 @@
</view> </view>
</view> </view>
</z-paging> </z-paging>
<view class="box-wrap" @click="handleKefu">
<image src="../../static/ic_service.png"></image>
<text>客服时间:</text>
<text>每天9:00-18:00</text>
</view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> </view>
</template> </template>
<script> <script>
...@@ -28,7 +34,8 @@ ...@@ -28,7 +34,8 @@
mixins: [common], mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: [],
showKefuPop: false
}; };
}, },
methods: { methods: {
...@@ -51,6 +58,9 @@ ...@@ -51,6 +58,9 @@
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} }
}); });
},
handleKefu() {
this.showKefuPop = true
} }
} }
}; };
...@@ -59,5 +69,23 @@ ...@@ -59,5 +69,23 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: whitesmoke; background-color: whitesmoke;
}
.box-wrap {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex;
flex-direction: column;
align-items: center;
image {
width: 100rpx;
height: 100rpx;
}
text {
color: #2c2c2c;
}
} }
</style> </style>
\ No newline at end of file
...@@ -18,7 +18,13 @@ ...@@ -18,7 +18,13 @@
</view> </view>
</view> </view>
</view> </view>
</z-paging> </z-paging>
<view class="box-wrap" @click="handleKefu">
<image src="../../static/ic_service.png"></image>
<text>客服时间:</text>
<text>每天9:00-18:00</text>
</view>
<kefu-popup :show="showKefuPop" @close="showKefuPop = false" />
</view> </view>
</template> </template>
<script> <script>
...@@ -33,7 +39,8 @@ ...@@ -33,7 +39,8 @@
mixins: [common], mixins: [common],
data() { data() {
return { return {
dataList: [] dataList: [],
showKefuPop: false
}; };
}, },
methods: { methods: {
...@@ -59,6 +66,9 @@ ...@@ -59,6 +66,9 @@
this.$refs.paging.complete(data.list); this.$refs.paging.complete(data.list);
} }
}); });
},
handleKefu() {
this.showKefuPop = true
} }
} }
}; };
...@@ -67,5 +77,23 @@ ...@@ -67,5 +77,23 @@
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: whitesmoke; background-color: whitesmoke;
}
.box-wrap {
position: absolute;
bottom: 20%;
right: 6%;
z-index: 999;
display: flex;
flex-direction: column;
align-items: center;
image {
width: 100rpx;
height: 100rpx;
}
text {
color: #2c2c2c;
}
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment