123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <!DOCTYPE html>
- <html class="">
- <!--STATUS OK-->
- <head>
- <meta name="referrer" content="always" />
- <meta charset='utf-8' />
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="x-dns-prefetch-control" content="on">
- <meta name="description" content="">
- <meta name="format-detection" content="telephone=no" />
- <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="css/main.css" />
- <script src="js/vue.js"></script>
- <script src="js/vant-ui.js"></script>
- <script src="js/main.js"></script>
- <title></title>
- </head>
- <style>
- .jingxiaoshangliebiao {
- background-color: #fff;
- }
- .jingxiaoshangliebiao .listbox ul li {
- background-color: #00a0ea;
- }
- .jingxiaoshangliebiao .listbox ul li h4 {
- color: #fff;
- }
- .jingxiaoshangliebiao .listbox ul li span {
- color: #fff;
- }
- .line {
- width: 1px;
- height: 0.8rem;
- background-color: #fff;
- }
- .mescroll{
- position: relative;
- height: 100%;
- }
- </style>
- <body>
- <div id="app">
- <div class="pageView jingxiaoshangliebiao flex col mescroll-touch-y mescroll" id="mescroll">
- <div class="listbox" v-show="list.length > 0" >
- <ul>
- <!-- <van-radio-group v-model="radio"> -->
- <li v-for="(item,index) in list" :key="index" style="display:flex">
- <!-- <van-radio :name="item"> -->
- <div class="infoRadios" style="width:85%">
- <h4 style="font-size:.28rem;">{{item.contactsName}}</h4>
- <p style="font-size:.26rem;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;width:5rem;color:#fff">{{item.province}} {{item.city}} {{item.county}} {{item.address}}</p>
- </div>
- <div class="infoRadios" style="display:flex">
- <div class="line"></div>
- <span style="margin: 0.2rem;font-size:.26rem" v-on:click="fixaddress(item)">编辑</span>
- </div>
- <!-- </van-radio> -->
- </li>
- <!-- </van-radio-group> -->
- </ul>
- </div>
- <div v-show="list.length == 0" style="text-align:center">
- <img src="./image/noData.png" style="margin:2rem auto" />
- </div>
- </div>
- </div>
- </body>
- <link rel="stylesheet" href="./mescroll/mescroll.min.css">
- <script type="text/javascript" src="./js/qrcode.min.js"></script>
- <script type="text/javascript" src="../script/aui-scroll.js"></script>
- <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../script/api.js"></script>
- <script type="text/javascript" src="../script/httpRequest.js"></script>
- <script type="text/javascript" src="../script/vue_plugins.js"></script>
- <script type="text/javascript">
- apiready = function() {
- new Vue({
- el: '#app',
- data: {
- radio: '1',
- list: '',
- loginid: '',
- current: 1,
- size: 11,
- frist: 1,
- totalPages: 1,
- mescroll: '',
- hasOther: false,
- },
- methods: {
- init: function() {
- this.storeId = $api.getStorage('userid');
- this.getAddressList();
- _this=this;
- this.addEvent("refreshaddress", function() {
- _this.getAddressList();
- });
- },
- /**
- * 配置上拉加载下拉刷新
- */
- configs: function() {
- var _this = this;
- this.frist = 2;
- this.configDownAndPull("mescroll", function(mescroll) {
- _this.current = 1;
- _this.mescroll = mescroll;
- _this.getAddressList(mescroll);
- }, function(mescroll) {
- if (_this.current < _this.totalPages) {
- _this.current = _this.current + 1;
- _this.getAddressList(mescroll, 1);
- } else {
- mescroll.endSuccess(_this.size, false);
- }
- })
- },
- addMore: function() {
- var _this = this;
- if (_this.current < _this.totalPages) {
- _this.current = _this.current + 1;
- _this.getAddressList(_this.mescroll, 1);
- } else {
- _this.hasOther = true;
- }
- },
- /**
- * 获取地址列表
- */
- getAddressList: function(mescroll) {
- var url = "getAddressListU",
- _this = this;
- var data = {
- storeId: this.storeId,
- current: this.current,
- size: this.size,
- url: 'json',
- type: 'body'
- }
- this.$post(url, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.totalPages = ret.page.pages;
- _this.list= _this.current == 1 ? ret.page.records : _this.list.concat(ret.page.records);
- if (mescroll) {
- mescroll.endSuccess(_this.size, true);
- }
- if (_this.frist == 1) {
- _this.$nextTick(function() {
- _this.configs();
- })
- }
- }
- })
- },
- fixaddress: function(item) {
- this.goWin('addressfix', 'addressfix_body.html', {
- mainId: item.mainId, //主键
- storeId: item.storeId, //登录loginid
- province: item.province,
- city: item.city,
- county:item.county,
- street: item.street,
- contactsName: item.contactsName,
- contactsTel: item.contactsTel,
- address: item.address,
- addressType: 1,
- beDefault: item.beDefault,
- });
- api.sendEvent({
- name: 'refreshaddressfix',
- extra: {}
- });
- }
- },
- mounted: function() {
- this.init();
- }
- })
- }
- </script>
- </html>
|