123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>手机app通用模板我的积分商城首页页面模板</title>
- <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
- <meta content="yes" name="apple-mobile-web-app-capable" />
- <meta content="black" name="apple-mobile-web-app-status-bar-style" />
- <meta content="telephone=no" name="format-detection" />
- <link href="../../css/style.css" rel="stylesheet" type="text/css"/>
- <link href="../../css/style2.css" rel="stylesheet" type="text/css" />
- <link href="../../css/html.css" rel="stylesheet" type="text/css" />
- <link rel="stylesheet" href="../../css/styleChoose.css">
- <style>
- .aui-loan-body {
- display: flex;
- display: -webkit-flex;
- }
- .aui-loan-body-item {
- width: 50%;
- padding-left: 10px;
- font-size: 0.9 rem;
- color: #fff;
- }
- .aui-loan-body-item:first-of-type {
- text-align: left;
- }
- .aui-loan-body-item:last-of-type {
- text-align: center;
- }
- .aui-list-theme, .aui-flexView {
- overflow: scroll;
- }
- .right-con li .btn button strong, .subCount dd .btn button strong {
- height: 22px;
- }
- .zmq-input-number {
- padding: 2px 0;
- width: 20% !important;
- }
- .aui-input {
- width: 13%;
- position: absolute;
- border: 1px solid #067974;
- text-align: center;
- padding: 2px 0px;
- margin-top: -20px;
- margin-left: 60px;
- border-radius: 5px;
- color: #067974;
- }
- .aui-list-theme-one .aui-list-theme-item {
- width: 100%;
- }
- .aui-list-img {
- width: 35%;
- height: 6rem;
- }
- .aui-list-img img {
- width: 100%;
- height: 100%;
- }
- .zmq-my-body {
- position: relative;
- padding: 0px !important
- }
- .zmq-my-body .zmq-my-info {
- width: 100%;
- margin-left: 0px;
- }
- .aui-btn-addCar {
- /*padding: 2px 7px;*/
- border-radius: 5px;
- /*margin-left: 10px;*/
- border: 1px solid #00787B;
- padding: 3px 5px;
- color: #00787B;
- display: inline-table;
- font-size: 0.6 rem;
- float: right;
- }
- .zmq-my-userinfo-name {
- color: #fff;
- }
- </style>
- </head>
- <body>
- <section id="app" style="margin-left: 1px;margin-right: 1px">
- <div class="zmq-my-body">
- <div class="zmq-my-info">
- <div class="zmq-my-userinfo" v-cloak>
- <div class="zmq-my-userinfo-name">
- 活动名称:{{activity.activityName}}
- </div>
- <div class="zmq-my-userinfo-name">
- 参与品牌:{{activity.brand}}
- </div>
- <div class="zmq-my-userinfo-name">
- 活动时间:{{activity.beginDate}} 至 {{activity.endDate}}
- </div>
- <div class="zmq-my-userinfo-name">
- 活动规则:{{activity.description}}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="aui-flex zmq-margin-top-10 zmq-bg-white">
- <div class="aui-flex-box zmq-hot-bg zmq-textAlign-center zmq-text-msg">
- 活动商品
- </div>
- </div>
- <!--v-cloak-->
- <div class="aui-list-theme aui-list-theme-one" v-cloak>
- <a href="javascript:;" class="aui-list-theme-item zmq-flex" v-for="(s,i) in list" style="padding: 5px">
- <div class="aui-list-img zmq-hot-img">
- <img v-lazy="s.materialDto.imgPath" alt="">
- </div>
- <div class="aui-list-title" style="width: 65%;padding-left: 0.5rem;">
- <h3 class="zmq-text-msg" style="padding-left : 2px;">{{s.materialDto.specs}} {{s.materialDto.pattern}}<em class="zmq-text-font-07 zmq-btn-img zmq-padding-status zmq-text-white" style="border-radius: 8px;float: right">{{s.materialDto.brand}}</em></h3>
- <p class="zmq-flex zmq-flex-between zmq-margin-top-5 zmq-width-90">
- {{s.materialDto.materialName}}
- </p>
- <div class="aui-line">
- <div class="aui-btn-addCar" v-on:click.stop = "downOrder(i,s.materialDto.agentId)">
- 立即下单
- </div>
- </div>
- </div> </a>
- </div>
- <img v-show="hasData == false" src="../../image/nodata.png" />
- <div v-show="upLock == false" class="zmq-text-explain zmq-margin-top-10 zmq-textAlign-center zmq-margin-bottom-10 zmq-block-text zmq-text-font-09">
- 已无更多数据
- </div>
- </section>
- </body>
- <script src="../../script/api.js" type="text/javascript"></script>
- <script type="text/javascript" src="../../script/aui-scroll.js"></script>
- <script type="text/javascript" src="../../script/vue.js"></script>
- <script type="text/javascript" src="../../script/vue-lazyload.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() {
- var id = api.pageParam.id;
- new Vue({
- el : '#app',
- data : {
- list : [],
- retariler_id : '',
- linkId : id,
- // 是否有数据
- hasData : true,
- // ss : [{},{},{},{},{},{},{},{}]
- // 分页
- upLock : true,
- current : 1,
- total : 1,
- agentId : '',
- // 获取积分商城
- getJFListUrl : 'getStoreBannerUrl',
- // 兑换商品
- exchangeUrl : 'exchangeUrl',
- storeInfo : {},
- activity : {},
- list : [],
- // 下单
- downOrderUrl : 'downOrderUrl',
- // 获取经销商列表
- getSupplierUrl : 'getSupplierListUrl',
- supplierList : [],
- chooseSupplierName : '请先选择一个经销商',
- UIActionSelector : [],
- },
- methods : {
- init : function() {
- var _this = this;
- this.retariler_id = $api.getStorage("retailerid");
- this.UIActionSelector = api.require('UIActionSelector');
- this.getJFList();
- this.getSupplierList();
- // this.configHeaderRefush(function() {
- // _this.downData = 'down';
- // _this.upLock = true;
- // _this.current = 1;
- // _this.getJFList();
- // _this.getSupplierList();
- // })
- // this.configBottomRefush(function(status) {
- // // 开启上拉加载
- // if (_this.hasData == true) {
- // // 开启上拉加载
- // if (_this.total > _this.current) {
- // _this.downData = 'up';
- // _this.current = _this.current + 1;
- // _this.getJFList();
- // } else {
- // // 上啦没有数据了
- // _this.upLock = false;
- // }
- // }
- // })
- },
- // 获取经销商列表
- getSupplierList : function() {
- var data = {
- retailer_id : this.retariler_id,
- url : 'json',
- type : 'body'
- }, _this = this;
- this.$post(this.getSupplierUrl, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- var list = new Array();
- ret.list.map(function(l, i) {
- var option = {
- name : l.agentDto.agentName,
- id : l.agentId
- }
- list.push(option);
- })
- _this.supplierList = list;
- }
- })
- },
- // 开始下单
- downOrder : function(index) {
- var _this = this;
- // 开始选择经销商
- this.chooseRegion(this.UIActionSelector, 1, this.supplierList, function(ret) {
- if (ret.eventType == 'ok') {
- var r = ret.selectedInfo[0];
- _this.addCar(index,r);
- }
- })
- // var data = {
- // retailerId : this.retariler_id,
- // amount : 1,
- // bizCartDtoList : [this.list[index]],
- // agentId : aid,
- // url : 'json',
- // type : 'body',
- // }, url = this.downOrderUrl, _this = this;
- // this.$post(url, data, function(ret) {
- // if (ret.code == 0) {
- // _this.showToast("下单成功");
- // }
- // });
- },
- addCar : function(index, agent) {
- var param = {
- shopInfo : this.list[index].materialDto,
- type : 'order',
- agent : JSON.stringify(agent),
- aid : this.activity.id,
- agentId : agent.id
- }
- this.sendEvent("showInfo", param);
- },
- getJFList : function() {
- var data = '?id=' + this.linkId, _this = this;
- this.$getadd(this.getJFListUrl, data, function(ret) {
- if (ret.code == 0) {
- _this.activity = ret.data.activity;
- _this.list = ret.data.list;
- }
- })
- },
- dh : function(id, p, g, m) {
- var _this = this;
- var amount = typeof m == 'undefined' ? 1 : m;
- this.showModal("兑换提示", "确认用" + (p * amount) + '积分兑换' + amount + '个' + g + '?', ["确认", "取消"], function(index) {
- if (index == 1) {
- var data = {
- retailerId : _this.retariler_id,
- totalAmount : amount,
- mallId : id,
- goodsName : g,
- payAmunt : p,
- type : 'body',
- url : 'json',
- }
- _this.$post(_this.exchangeUrl, data, function(ret) {
- if (ret.code == 0) {
- api.toast({
- msg : '兑换成功'
- });
- // 跳转到积分消费列表中
- setTimeout(function() {
- goWin('jifenGet1_win', 2, '消费记录');
- }, 500);
- }
- })
- }
- })
- }
- },
- mounted : function() {
- this.init();
- Vue.use(VueLazyload, {
- preLoad : 1.3,
- error : '../../image/noimg.png',
- loading : '../../image/load.gif',
- attempt : 1,
- });
- }
- })
- }
- function goWin(winName, type, title) {
- api.openWin({
- name : winName,
- url : './' + winName + '.html',
- pageParam : {
- type : type,
- title : title,
- page : 'dan'
- }
- });
- }
- </script>
- </html>
|