reg.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="container">
  3. <view v-if="is_submitaudit!=1">
  4. <view v-if="ptype" class="tui-form">
  5. <diyfields :ptype="ptype" submittxt="注册"></diyfields>
  6. <view class="tui-cell-text">
  7. 注册代表同意
  8. <view class="tui-color-primary" hover-class="tui-opcity" :hover-stay-time="150" @tap="showagreementAlert">入驻协议及隐私政策</view>
  9. <tui-modal :show="showagreement" custom>
  10. <view class="tui-modal-custom">
  11. <scroll-view :style="'height:'+(height-160)+'px'" scroll-y="true">
  12. <view class="tui-modal-custom-text">
  13. <text v-if="agreement">{{agreement.content}}</text>
  14. </view>
  15. </scroll-view>
  16. <button @click="hideagreementAlert" class="btn72" :style="'background:'+ pagestyleconfig.appstylecolor">同意</button>
  17. </view>
  18. </tui-modal>
  19. </view>
  20. </view>
  21. </view>
  22. <view v-if="is_submitaudit==1" class="tui-form">
  23. <view class="tui-btn-box">
  24. <!-- #ifdef MP-WEIXIN -->
  25. <tui-button v-if="configkefu.minionline==1 || configkefu.minionline==3" @click="toim" height="88rpx" shape="circle">联系客服
  26. </tui-button>
  27. <tui-button v-else-if="configkefu.minionline==2" @click="toimwebview(configkefu.kefuurl)" height="88rpx" shape="circle">联系客服
  28. </tui-button>
  29. <tui-button v-else open-type="contact" height="88rpx" shape="circle">联系客服
  30. </tui-button>
  31. <!-- #endif -->
  32. <!-- #ifndef MP-WEIXIN -->
  33. <tui-button @click="toim" height="88rpx" shape="circle">联系客服
  34. </tui-button>
  35. <!-- #endif -->
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import diyfields from "@/components/views/diyfields/diyfields"
  42. export default {
  43. components: {
  44. diyfields
  45. },
  46. computed: {},
  47. data() {
  48. return {
  49. config: {},
  50. pagestyleconfig: [],
  51. configkefu:{},
  52. is_submitaudit: 1,
  53. ptype:"",
  54. agreement: {},
  55. showagreement: false,
  56. width: 0,
  57. height: 0
  58. };
  59. },
  60. onLoad: function(e) {
  61. let _this = this;
  62. if (e.ptype) {
  63. _this.ptype = e.ptype;
  64. }
  65. _this.$config.init(function() {
  66. if(_this.$config.getConf("kefu")){
  67. _this.configkefu = _this.$config.getConf("kefu");
  68. }
  69. });
  70. _this.$request.post('config', {
  71. mo: 'pagestyle'
  72. }).then(res => {
  73. if (res.errno == 0) {
  74. _this.pagestyleconfig = res.data
  75. }
  76. });
  77. _this.$request.post('Agreement.index', {
  78. code: _this.ptype +'join'
  79. }).then(res => {
  80. if (res.errno == 0) {
  81. _this.agreement = res.data;
  82. }
  83. });
  84. uni.getSystemInfo({
  85. success: res => {
  86. this.width = res.windowWidth;
  87. this.height = res.windowHeight;
  88. }
  89. });
  90. },
  91. onShow() {
  92. let _this = this;
  93. // #ifdef MP-WEIXIN
  94. _this.$request.post('Config.audit', {
  95. samkey: (new Date()).valueOf()
  96. }).then(res => {
  97. _this.is_submitaudit = res.data.is_submitaudit;
  98. });
  99. // #endif
  100. // #ifndef MP-WEIXIN
  101. _this.is_submitaudit = 0 ;
  102. // #endif
  103. },
  104. methods: {
  105. showagreementAlert() {
  106. this.showagreement = true;
  107. },
  108. hideagreementAlert() {
  109. this.showagreement = false;
  110. },
  111. toimwebview(url) {
  112. this.tui.href("/pages/webview/h5?url=" + url)
  113. },
  114. toim() {
  115. if (this.configkefu.minionline == 2 && this.configkefu.kefuurl) {
  116. this.tui.href(this.configkefu.kefuurl);
  117. } else if (this.configkefu.minionline == 3) {
  118. var telstr = this.configkefu.kefutel;
  119. uni.makePhoneCall({
  120. phoneNumber: telstr
  121. });
  122. } else {
  123. this.tui.href("/pages/im/h5");
  124. }
  125. },
  126. },
  127. /**
  128. * 页面相关事件处理函数--监听用户下拉动作
  129. */
  130. onPullDownRefresh: function() {
  131. setTimeout(() => {
  132. uni.stopPullDownRefresh()
  133. }, 200);
  134. },
  135. };
  136. </script>
  137. <style lang="scss" scoped>
  138. .tui-list-cell {
  139. width: 100%;
  140. color: $uni-text-color;
  141. display: flex;
  142. align-items: center;
  143. justify-content: space-between;
  144. padding: 24rpx 60rpx 24rpx 30rpx;
  145. box-sizing: border-box;
  146. font-size: 30rpx;
  147. }
  148. .tui-avatar {
  149. width: 130rpx;
  150. height: 130rpx;
  151. display: block;
  152. }
  153. .uni-list {
  154. width: 100%;
  155. padding-top: 15rpx;
  156. padding-bottom: 20rpx;
  157. padding-left: 20rpx;
  158. padding-right: 20rpx;
  159. box-sizing: border-box;
  160. display: flex;
  161. align-items: center;
  162. flex-wrap: wrap;
  163. }
  164. .ptypebut {
  165. width: 40%;
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. flex-direction: column;
  170. padding-top: 15rpx;
  171. padding-bottom: 15rpx;
  172. margin-bottom: 10rpx;
  173. }
  174. .checkboxbox {
  175. padding: 20rpx;
  176. }
  177. .btn72{
  178. height: 72rpx;
  179. line-height: 72rpx;
  180. border-radius: 98rpx;
  181. color: #fff;
  182. }
  183. .btn86{
  184. height: 86rpx;
  185. line-height: 86rpx;
  186. border-radius: 98rpx;
  187. color: #fff;
  188. }
  189. .container {
  190. backgroundColor: #fff;
  191. padding-bottom: 80rpx;
  192. .tui-page-title {
  193. width: 100%;
  194. font-size: 48rpx;
  195. font-weight: bold;
  196. color: $uni-text-color;
  197. line-height: 42rpx;
  198. padding: 110rpx 40rpx 40rpx 40rpx;
  199. box-sizing: border-box;
  200. }
  201. .tui-form {
  202. .tui-view-input {
  203. width: 100%;
  204. box-sizing: border-box;
  205. padding: 0 0rpx;
  206. .tui-cell-input {
  207. width: 100%;
  208. display: flex;
  209. align-items: center;
  210. padding-top: 48rpx;
  211. padding-bottom: $uni-spacing-col-base;
  212. input {
  213. flex: 1;
  214. padding-left: $uni-spacing-row-base;
  215. }
  216. .tui-icon-close {
  217. margin-left: auto;
  218. }
  219. .tui-btn-send {
  220. width: 156rpx;
  221. text-align: right;
  222. flex-shrink: 0;
  223. font-size: $uni-font-size-base;
  224. color: $uni-color-primary;
  225. }
  226. .tui-gray {
  227. color: $uni-text-color-placeholder;
  228. }
  229. .tui-textarea {
  230. width: 100%;
  231. height: 300rpx;
  232. font-size: 28rpx;
  233. padding: 20rpx 30rpx;
  234. box-sizing: border-box;
  235. background-color: #fff;
  236. }
  237. }
  238. }
  239. .tui-cell-text {
  240. width: 100%;
  241. padding: 40rpx $uni-spacing-row-lg;
  242. box-sizing: border-box;
  243. font-size: $uni-font-size-sm;
  244. color: $uni-text-color-grey;
  245. display: flex;
  246. align-items: center;
  247. .tui-color-primary {
  248. color: $uni-color-primary;
  249. padding-left: $uni-spacing-row-sm;
  250. }
  251. }
  252. .tui-btn-box {
  253. width: 100%;
  254. padding: 0 $uni-spacing-row-lg;
  255. box-sizing: border-box;
  256. margin-top: 20rpx;
  257. }
  258. }
  259. }
  260. </style>