update.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="container">
  3. <view v-if="is_submitaudit!=1">
  4. <view class="tui-form">
  5. <diyfields :ptype="ptype" update="1" gourl="/pagesA/my/admintechnical/index" gotype="navigateTo" @complete="result"></diyfields>
  6. </view>
  7. </view>
  8. <view v-if="is_submitaudit==1" class="tui-form">
  9. <view class="tui-btn-box">
  10. <!-- #ifdef MP-WEIXIN -->
  11. <tui-button v-if="configkefu.minionline==1 || configkefu.minionline==3" @click="toim" height="88rpx" shape="circle">联系客服
  12. </tui-button>
  13. <tui-button v-else-if="configkefu.minionline==2" @click="toimwebview(configkefu.kefuurl)" height="88rpx" shape="circle">联系客服
  14. </tui-button>
  15. <tui-button v-else open-type="contact" height="88rpx" shape="circle">联系客服
  16. </tui-button>
  17. <!-- #endif -->
  18. <!-- #ifndef MP-WEIXIN -->
  19. <tui-button @click="toim" height="88rpx" shape="circle">联系客服
  20. </tui-button>
  21. <!-- #endif -->
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import diyfields from "@/components/views/diyfields/diyfields"
  28. export default {
  29. components: {
  30. diyfields
  31. },
  32. computed: {},
  33. data() {
  34. return {
  35. configkefu: {},
  36. is_submitaudit: 1,
  37. ptype:"technical"
  38. };
  39. },
  40. onLoad: function(e) {
  41. let _this = this;
  42. if (e.ptype) {
  43. _this.ptype = e.ptype;
  44. }
  45. _this.$config.init(function() {
  46. _this.configkefu = _this.$config.getConf("kefu")||{};
  47. });
  48. _this.$request.post('Config.audit', {
  49. samkey: (new Date()).valueOf()
  50. }).then(res => {
  51. _this.is_submitaudit = res.data.is_submitaudit;
  52. });
  53. },
  54. onShow() {
  55. let _this = this;
  56. _this.$request.post('Config.audit', {
  57. samkey: (new Date()).valueOf()
  58. }).then(res => {
  59. _this.is_submitaudit = res.data.is_submitaudit;
  60. });
  61. },
  62. methods: {
  63. toimwebview(url) {
  64. this.tui.href("/pages/webview/h5?url=" + url)
  65. },
  66. toim() {
  67. if (this.configkefu.minionline == 2 && this.configkefu.kefuurl) {
  68. this.tui.href(this.configkefu.kefuurl);
  69. } else if (this.configkefu.minionline == 3) {
  70. var telstr = this.configkefu.kefutel;
  71. uni.makePhoneCall({
  72. phoneNumber: telstr
  73. });
  74. } else {
  75. this.tui.href("/pages/im/h5");
  76. }
  77. },
  78. },
  79. /**
  80. * 页面相关事件处理函数--监听用户下拉动作
  81. */
  82. onPullDownRefresh: function() {
  83. setTimeout(() => {
  84. uni.stopPullDownRefresh()
  85. }, 200);
  86. },
  87. };
  88. </script>
  89. <style lang="scss" scoped>
  90. .tui-list-cell {
  91. width: 100%;
  92. color: $uni-text-color;
  93. display: flex;
  94. align-items: center;
  95. justify-content: space-between;
  96. padding: 24rpx 60rpx 24rpx 30rpx;
  97. box-sizing: border-box;
  98. font-size: 30rpx;
  99. }
  100. .tui-avatar {
  101. width: 130rpx;
  102. height: 130rpx;
  103. display: block;
  104. }
  105. .uni-list {
  106. width: 100%;
  107. padding-top: 15rpx;
  108. padding-bottom: 20rpx;
  109. padding-left: 20rpx;
  110. padding-right: 20rpx;
  111. box-sizing: border-box;
  112. display: flex;
  113. align-items: center;
  114. flex-wrap: wrap;
  115. }
  116. .ptypebut {
  117. width: 40%;
  118. display: flex;
  119. align-items: center;
  120. justify-content: center;
  121. flex-direction: column;
  122. padding-top: 15rpx;
  123. padding-bottom: 15rpx;
  124. margin-bottom: 10rpx;
  125. }
  126. .checkboxbox {
  127. padding: 20rpx;
  128. }
  129. .btn86{
  130. height: 86rpx;
  131. line-height: 86rpx;
  132. border-radius: 98rpx;
  133. color: #fff;
  134. }
  135. .container {
  136. backgroundColor: #fff;
  137. padding-bottom: 80rpx;
  138. .tui-page-title {
  139. width: 100%;
  140. font-size: 48rpx;
  141. font-weight: bold;
  142. color: $uni-text-color;
  143. line-height: 42rpx;
  144. padding: 110rpx 40rpx 40rpx 40rpx;
  145. box-sizing: border-box;
  146. }
  147. .tui-form {
  148. .tui-view-input {
  149. width: 100%;
  150. box-sizing: border-box;
  151. padding: 0 0rpx;
  152. .tui-cell-input {
  153. width: 100%;
  154. display: flex;
  155. align-items: center;
  156. padding-top: 48rpx;
  157. padding-bottom: $uni-spacing-col-base;
  158. input {
  159. flex: 1;
  160. padding-left: $uni-spacing-row-base;
  161. }
  162. .tui-icon-close {
  163. margin-left: auto;
  164. }
  165. .tui-btn-send {
  166. width: 156rpx;
  167. text-align: right;
  168. flex-shrink: 0;
  169. font-size: $uni-font-size-base;
  170. color: $uni-color-primary;
  171. }
  172. .tui-gray {
  173. color: $uni-text-color-placeholder;
  174. }
  175. .tui-textarea {
  176. width: 100%;
  177. height: 300rpx;
  178. font-size: 28rpx;
  179. padding: 20rpx 30rpx;
  180. box-sizing: border-box;
  181. background-color: #fff;
  182. }
  183. }
  184. }
  185. .tui-cell-text {
  186. width: 100%;
  187. padding: 40rpx $uni-spacing-row-lg;
  188. box-sizing: border-box;
  189. font-size: $uni-font-size-sm;
  190. color: $uni-text-color-grey;
  191. display: flex;
  192. align-items: center;
  193. .tui-color-primary {
  194. color: $uni-color-primary;
  195. padding-left: $uni-spacing-row-sm;
  196. }
  197. }
  198. .tui-btn-box {
  199. width: 100%;
  200. padding: 0 $uni-spacing-row-lg;
  201. box-sizing: border-box;
  202. margin-top: 20rpx;
  203. }
  204. }
  205. }
  206. </style>