update.vue 5.0 KB

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