ming 3 роки тому
батько
коміт
19f346b8a6
3 змінених файлів з 36 додано та 10 видалено
  1. 18 6
      components/fs-icon/icon.css
  2. 15 3
      modules/common/address/list.vue
  3. 3 1
      modules/common/org.vue

+ 18 - 6
components/fs-icon/icon.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "fsfont"; /* Project id 2762084 */
-  src: url('https://at.alicdn.com/t/font_2762084_jro7vpctpbi.woff2?t=1637659970198') format('woff2'),
-       url('https://at.alicdn.com/t/font_2762084_jro7vpctpbi.woff?t=1637659970198') format('woff'),
-       url('https://at.alicdn.com/t/font_2762084_jro7vpctpbi.ttf?t=1637659970198') format('truetype');
+  src: url('//at.alicdn.com/t/font_2762084_ir6gm0rxcw.woff2?t=1641375683419') format('woff2'),
+       url('//at.alicdn.com/t/font_2762084_ir6gm0rxcw.woff?t=1641375683419') format('woff'),
+       url('//at.alicdn.com/t/font_2762084_ir6gm0rxcw.ttf?t=1641375683419') format('truetype');
 }
 
 .fsfont {
@@ -13,6 +13,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-minus:before {
+  content: "\e7fd";
+}
+
+.icon-minus-circle-fill:before {
+  content: "\e844";
+}
+
+.icon-minus-circle:before {
+  content: "\e677";
+}
+
 .icon-star-fill:before {
   content: "\e660";
 }
@@ -93,7 +105,7 @@
   content: "\e601";
 }
 
-.icon-plus2:before {
+.icon-plus:before {
   content: "\e6b3";
 }
 
@@ -117,7 +129,7 @@
   content: "\e620";
 }
 
-.icon-plus1:before {
+.icon-icon-plus-circle-fill:before {
   content: "\e7ba";
 }
 
@@ -137,7 +149,7 @@
   content: "\e641";
 }
 
-.icon-plus:before {
+.icon-plus-circle:before {
   content: "\e60f";
 }
 

+ 15 - 3
modules/common/address/list.vue

@@ -11,7 +11,7 @@
 						<fs-radio-group v-model="item.default" v-if="item.default == 1">
 							<fs-radio label="默认地址" value="1" checked></fs-radio>
 						</fs-radio-group>
-						<fs-radio-group v-else>
+						<fs-radio-group  v-else  @change="setDefaultAddress(item)">
 							<fs-radio label="设为默认地址" value="1"></fs-radio>
 						</fs-radio-group>
 						<view class="flex align-center">
@@ -56,19 +56,31 @@ setTimeout(() => {
 			name: '陈女士',
 			phone: '18734354541',
 			address: '山西省太原市小店区晋阳街和泰花园南区5-2-1006',
-			default: '1'
+			default: '1',
+			id: 1
 		},
 		{
 			name: '王先生',
 			phone: '18734354542',
 			address: '山西省太原市小店区晋阳街和泰花园南区5-2-1006',
-			default: '0'
+			default: '0',
+			id: 2
 		}
 	]
 	
 	loaded.value = true
 }, 0)
 
+const setDefaultAddress = (item) => {
+	list.value.forEach(address => {
+		if(address.id === item.id) {
+			address.default = '1'
+		} else {
+			address.default = '0'
+		}
+	})
+}
+
 const handleEdit = item => {
 	getApp().globalData.addressDetail = item
 	uni.navigateTo({

+ 3 - 1
modules/common/org.vue

@@ -314,10 +314,12 @@ const handleAddStaff = () => {
 }
 </script>
 
-<style lang="scss" scoped>
+<style>
 page{
 	height: 100%;
 }
+</style>
+<style lang="scss" scoped>
 .org-nav{
 	height: 60rpx;
 	line-height: 60rpx;