铝交易,微信公众号
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.

293 lines
6.5 KiB

4 months ago
4 months ago
4 months ago
6 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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. {
  87. text: `${this.$t('other.Myorder')}`,
  88. englishText: 'Myorder',
  89. value: ">",
  90. imgUrl: '/static/image/center/14.svg',
  91. toPathUrl: '/pages_order/order/myOrders'
  92. },
  93. {
  94. text: `${this.$t('pageTitle.myOrders')}`,
  95. englishText: 'myOrders',
  96. value: ">",
  97. imgUrl: '/static/image/center/14.svg',
  98. toPathUrl: '/pages_order/order/pendingOrder'
  99. },
  100. {
  101. text: `${this.$t('components.contactCustomerService')}`,
  102. englishText: 'contactCustomerService',
  103. value: ">",
  104. imgUrl: '/static/image/center/13.svg'
  105. },
  106. {
  107. text: `${this.$t('components.systemSettings')}`,
  108. englishText: 'systemSettings',
  109. value: ">",
  110. imgUrl: '/static/image/center/12.svg',
  111. toPathUrl: '/pages_order/center/systemSet'
  112. },
  113. {
  114. text: `${this.$t('components.helpFeedback')}`,
  115. englishText: 'systemSettings',
  116. value: ">",
  117. imgUrl: '/static/image/center/12.svg',
  118. toPathUrl: '/pages_order/center/helpFeedback'
  119. },
  120. {
  121. text: `${this.$t('components.aboutUs')}`,
  122. englishText: 'aboutUs',
  123. value: ">",
  124. imgUrl: '/static/image/center/13.svg'
  125. },
  126. ],
  127. // 采购商
  128. purchaserList: [
  129. // this.$t('pages.index.index.companyProfile')
  130. {
  131. text: `${this.$t('other.Myorder')}`,
  132. englishText: 'Myorder',
  133. value: ">",
  134. imgUrl: '/static/image/center/14.svg',
  135. toPathUrl: '/pages_order/order/myOrders'
  136. },
  137. {
  138. text: `${this.$t('components.contactCustomerService')}`,
  139. englishText: 'contactCustomerService',
  140. value: ">",
  141. imgUrl: '/static/image/center/13.svg'
  142. },
  143. {
  144. text: `${this.$t('components.systemSettings')}`,
  145. englishText: 'systemSettings',
  146. value: ">",
  147. imgUrl: '/static/image/center/12.svg',
  148. toPathUrl: '/pages_order/center/systemSet'
  149. },
  150. {
  151. text: `${this.$t('components.helpFeedback')}`,
  152. englishText: 'systemSettings',
  153. value: ">",
  154. imgUrl: '/static/image/center/12.svg',
  155. toPathUrl: '/pages_order/center/helpFeedback'
  156. },
  157. {
  158. text: `${this.$t('components.aboutUs')}`,
  159. englishText: 'aboutUs',
  160. value: ">",
  161. imgUrl: '/static/image/center/13.svg'
  162. },
  163. ],
  164. actionSheetList: [
  165. {
  166. name : '修改供应商信息',
  167. key : 'shopData',
  168. },
  169. {
  170. name : '修改采购商信息',
  171. key : 'buy',
  172. },
  173. ],
  174. }
  175. },
  176. methods: {
  177. openCustomerServicePopup() {
  178. console.log("打开客服弹框")
  179. this.$refs.customerServicePopup.open();
  180. },
  181. toUpdateInfo(){
  182. if(this.buy && this.shopData){
  183. this.$refs.actionSheet.open()
  184. }else if(this.buy){
  185. uni.navigateTo({
  186. url: '/pages_order/auth/registerShop?key=buy'
  187. })
  188. }else if(this.shopData){
  189. uni.navigateTo({
  190. url: '/pages_order/auth/registerShop?key=shopData'
  191. })
  192. }
  193. },
  194. actionSheetSelect(e){
  195. uni.navigateTo({
  196. url: '/pages_order/auth/registerShop?key=' + e.key
  197. })
  198. },
  199. },
  200. }
  201. </script>
  202. <style scoped lang="scss">
  203. .page {
  204. background-color: #2e2e2e;
  205. height: calc(100vh - 120rpx);
  206. .frame {
  207. background-color: #2e2e2e;
  208. .head {
  209. display: flex;
  210. background-color: $uni-color;
  211. padding: 40rpx 20rpx;
  212. align-items: center;
  213. position: relative;
  214. color: #fff;
  215. box-shadow: 0 10rpx 20rpx rgba(89, 80, 80, 0.1);
  216. .headImage {
  217. width: 120rpx;
  218. height: 120rpx;
  219. background-image: url(/static/image/center/3.png);
  220. background-size: 100% 100%;
  221. overflow: hidden;
  222. border-radius: 50%;
  223. margin-right: 40rpx;
  224. }
  225. .info {
  226. font-size: 28rpx;
  227. .vip {
  228. background-color: #FCCC92;
  229. color: #FA6239;
  230. width: 100rpx;
  231. display: flex;
  232. justify-content: center;
  233. align-items: center;
  234. height: 40rpx;
  235. border-radius: 20rpx;
  236. margin-top: 20rpx;
  237. }
  238. .name {
  239. font-size: 26rpx;
  240. display: flex;
  241. align-items: center;
  242. }
  243. .tips {
  244. font-size: 26rpx;
  245. color: #ABABAB;
  246. }
  247. }
  248. .headBtn {
  249. margin-left: auto;
  250. padding: 15rpx 20rpx;
  251. background-color: $uni-color;
  252. color: #fff;
  253. border-radius: 20rpx;
  254. margin-top: 50rpx;
  255. }
  256. .setting {
  257. position: absolute;
  258. right: 50rpx;
  259. top: 50rpx;
  260. }
  261. }
  262. .supplier {}
  263. .purchaser {}
  264. }
  265. }
  266. </style>