update.vue 4.9 KB

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