铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

285 lines
6.3 KiB

6 months ago
6 months ago
6 months ago
8 months ago
7 months ago
6 months ago
7 months ago
6 months ago
6 months ago
8 months ago
6 months ago
8 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <navbar :title="$t('pageTitle.personalCenter')" />
  4. <view class="frame">
  5. <!-- 头部 -->
  6. <view class="head">
  7. <view class="headImage">
  8. <image src="1" mode=""></image>
  9. </view>
  10. <view class="info"
  11. @click="toUpdateInfo">
  12. <view class="name"
  13. v-if="userShop">
  14. 供应商{{shopData.companyName}}
  15. <uv-icon
  16. name="edit-pen"
  17. color="#fff"
  18. size="30"></uv-icon>
  19. </view>
  20. <view class="name"
  21. v-else>
  22. 采购商{{buy.companyName}}
  23. <uv-icon
  24. name="edit-pen"
  25. color="#fff"
  26. size="30"></uv-icon>
  27. </view>
  28. <view class="tips">
  29. {{ $t('components.phoneNumber') }} {{userInfo.phone}}
  30. </view>
  31. </view>
  32. <!-- <view class="headBtn" @click="headBtn">
  33. {{ $t('components.roleSwitching') }}
  34. </view> -->
  35. <!-- <view class="setting">
  36. <uv-icon name="setting" size="40rpx"></uv-icon>
  37. </view> -->
  38. </view>
  39. <!-- 供应商 -->
  40. <view class="supplier" v-if="userShop">
  41. <centerList :list="supplierList" @open="openCustomerServicePopup" @about="$refs.popup.open('gywm')">
  42. </centerList>
  43. </view>
  44. <!-- 采购商 -->
  45. <view class="purchaser" v-else>
  46. <centerList :list="purchaserList" @open="openCustomerServicePopup" @about="$refs.popup.open('gywm')">
  47. </centerList>
  48. </view>
  49. </view>
  50. <!-- 联系客服弹框 -->
  51. <customerServicePopup ref="customerServicePopup" />
  52. <uv-action-sheet
  53. ref="actionSheet"
  54. :actions="actionSheetList"
  55. @select="actionSheetSelect">
  56. </uv-action-sheet>
  57. <configPopup ref="popup"></configPopup>
  58. <tabber select="3" />
  59. </view>
  60. </template>
  61. <script>
  62. import topbar from "@/components/base/topbar.vue";
  63. import tabber from "@/components/base/tabbar.vue";
  64. import centerList from "@/components/base/centerList.vue";
  65. import customerServicePopup from "@/components/config/customerServicePopup.vue";
  66. import {
  67. mapGetters,
  68. mapState
  69. } from 'vuex'
  70. export default {
  71. name: "center2",
  72. components: {
  73. customerServicePopup,
  74. tabber,
  75. topbar,
  76. centerList
  77. },
  78. computed: {
  79. ...mapGetters(['userShop']),
  80. ...mapState(["userInfo", 'shopData', 'buy']),
  81. },
  82. data() {
  83. return {
  84. // 供应商
  85. supplierList: [{
  86. text: `${this.$t('pageTitle.myOrders')}`,
  87. englishText: 'myOrders',
  88. value: ">",
  89. imgUrl: '/static/image/center/14.svg',
  90. toPathUrl: '/pages_order/order/pendingOrder'
  91. },
  92. {
  93. text: `${this.$t('components.contactCustomerService')}`,
  94. englishText: 'contactCustomerService',
  95. value: ">",
  96. imgUrl: '/static/image/center/13.svg'
  97. },
  98. {
  99. text: `${this.$t('components.systemSettings')}`,
  100. englishText: 'systemSettings',
  101. value: ">",
  102. imgUrl: '/static/image/center/12.svg',
  103. toPathUrl: '/pages_order/center/systemSet'
  104. },
  105. {
  106. text: `${this.$t('components.helpFeedback')}`,
  107. englishText: 'systemSettings',
  108. value: ">",
  109. imgUrl: '/static/image/center/12.svg',
  110. toPathUrl: '/pages_order/center/helpFeedback'
  111. },
  112. {
  113. text: `${this.$t('components.aboutUs')}`,
  114. englishText: 'aboutUs',
  115. value: ">",
  116. imgUrl: '/static/image/center/13.svg'
  117. },
  118. ],
  119. // 采购商
  120. purchaserList: [
  121. // this.$t('pages.index.index.companyProfile')
  122. {
  123. text: `${this.$t('other.Myorder')}`,
  124. englishText: 'Myorder',
  125. value: ">",
  126. imgUrl: '/static/image/center/14.svg',
  127. toPathUrl: '/pages_order/order/myOrders'
  128. },
  129. {
  130. text: `${this.$t('components.contactCustomerService')}`,
  131. englishText: 'contactCustomerService',
  132. value: ">",
  133. imgUrl: '/static/image/center/13.svg'
  134. },
  135. {
  136. text: `${this.$t('components.systemSettings')}`,
  137. englishText: 'systemSettings',
  138. value: ">",
  139. imgUrl: '/static/image/center/12.svg',
  140. toPathUrl: '/pages_order/center/systemSet'
  141. },
  142. {
  143. text: `${this.$t('components.helpFeedback')}`,
  144. englishText: 'systemSettings',
  145. value: ">",
  146. imgUrl: '/static/image/center/12.svg',
  147. toPathUrl: '/pages_order/center/helpFeedback'
  148. },
  149. {
  150. text: `${this.$t('components.aboutUs')}`,
  151. englishText: 'aboutUs',
  152. value: ">",
  153. imgUrl: '/static/image/center/13.svg'
  154. },
  155. ],
  156. actionSheetList: [
  157. {
  158. name : '修改供应商信息',
  159. key : 'shopData',
  160. },
  161. {
  162. name : '修改采购商信息',
  163. key : 'buy',
  164. },
  165. ],
  166. }
  167. },
  168. methods: {
  169. openCustomerServicePopup() {
  170. console.log("打开客服弹框")
  171. this.$refs.customerServicePopup.open();
  172. },
  173. toUpdateInfo(){
  174. if(this.buy && this.shopData){
  175. this.$refs.actionSheet.open()
  176. }else if(this.buy){
  177. uni.navigateTo({
  178. url: '/pages_order/auth/registerShop?key=buy'
  179. })
  180. }else if(this.shopData){
  181. uni.navigateTo({
  182. url: '/pages_order/auth/registerShop?key=shopData'
  183. })
  184. }
  185. },
  186. actionSheetSelect(e){
  187. uni.navigateTo({
  188. url: '/pages_order/auth/registerShop?key=' + e.key
  189. })
  190. },
  191. },
  192. }
  193. </script>
  194. <style scoped lang="scss">
  195. .page {
  196. background-color: #2e2e2e;
  197. height: calc(100vh - 120rpx);
  198. .frame {
  199. background-color: #2e2e2e;
  200. .head {
  201. display: flex;
  202. background-color: $uni-color;
  203. padding: 40rpx 20rpx;
  204. align-items: center;
  205. position: relative;
  206. color: #fff;
  207. box-shadow: 0 10rpx 20rpx rgba(89, 80, 80, 0.1);
  208. .headImage {
  209. width: 120rpx;
  210. height: 120rpx;
  211. background-image: url(/static/image/center/3.png);
  212. background-size: 100% 100%;
  213. overflow: hidden;
  214. border-radius: 50%;
  215. margin-right: 40rpx;
  216. }
  217. .info {
  218. font-size: 28rpx;
  219. .vip {
  220. background-color: #FCCC92;
  221. color: #FA6239;
  222. width: 100rpx;
  223. display: flex;
  224. justify-content: center;
  225. align-items: center;
  226. height: 40rpx;
  227. border-radius: 20rpx;
  228. margin-top: 20rpx;
  229. }
  230. .name {
  231. font-size: 26rpx;
  232. display: flex;
  233. align-items: center;
  234. }
  235. .tips {
  236. font-size: 26rpx;
  237. color: #ABABAB;
  238. }
  239. }
  240. .headBtn {
  241. margin-left: auto;
  242. padding: 15rpx 20rpx;
  243. background-color: $uni-color;
  244. color: #fff;
  245. border-radius: 20rpx;
  246. margin-top: 50rpx;
  247. }
  248. .setting {
  249. position: absolute;
  250. right: 50rpx;
  251. top: 50rpx;
  252. }
  253. }
  254. .supplier {}
  255. .purchaser {}
  256. }
  257. }
  258. </style>