|
@@ -28,6 +28,8 @@
|
|
|
<script>
|
|
|
import {XInput, Group, Cell, Alert, TransferDomDirective as TransferDom} from 'vux'
|
|
|
import config from '../../config/config'
|
|
|
+// import axios from 'axios'
|
|
|
+// import qs from 'qs'
|
|
|
export default {
|
|
|
name: 'home',
|
|
|
data () {
|
|
@@ -83,7 +85,7 @@
|
|
|
return
|
|
|
}
|
|
|
// 手机号码格式必须正确
|
|
|
- if (!this.userMobile) {
|
|
|
+ if (!config.addressAdd.userMobile) {
|
|
|
this.alertContent = '请输入正确手记号码'
|
|
|
this.showAlert = true
|
|
|
return
|
|
@@ -94,10 +96,40 @@
|
|
|
this.showAlert = true
|
|
|
return
|
|
|
}
|
|
|
- this.$router.go(-1)
|
|
|
+ console.log(config.addressPio)
|
|
|
+ config.addressDetail = {
|
|
|
+ 'province': config.addressPio.city,
|
|
|
+ 'city': config.addressPio.city,
|
|
|
+ 'area': config.addressPio.city,
|
|
|
+ 'detail': '',
|
|
|
+ 'poi': {
|
|
|
+ 'uid': config.addressPio.uid,
|
|
|
+ 'name': config.addressPio.name
|
|
|
+ }
|
|
|
+ }
|
|
|
+// let param = {
|
|
|
+// request_from: 'weixin',
|
|
|
+// name: this.userName,
|
|
|
+// mobile: this.userMobile,
|
|
|
+// user_id: config.userId,
|
|
|
+// address_position: config.addressPio.location,
|
|
|
+// address: addressDetail
|
|
|
+// }
|
|
|
+// getAddressAdd(param)
|
|
|
+// axios.get('api/shop/addAddress&request_from=weixin&name=' + this.userName + '&mobile=' + config.addressAdd.userMobile + '&user_id=' + config.userId + '&address_position=' + JSON.stringify(config.addressPio.location) + '&address=' + JSON.stringify(addressDetail)).then(function (res) {
|
|
|
+// if (res.data.data.success) {
|
|
|
+// this.$router.go(-1)
|
|
|
+// }
|
|
|
+// })
|
|
|
+// this.$router.go(-1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+// function getAddressAdd (val) {
|
|
|
+// axios.get('api/shop/addAddress' + qs.stringify(val)).then(function (res) {
|
|
|
+// console.log(res)
|
|
|
+// })
|
|
|
+// }
|
|
|
</script>
|
|
|
|
|
|
<!-- 添加“scoped”属性来限制CSS到此组件 -->
|