Showing
18 changed files
with
813 additions
and
2 deletions
| @@ -35,7 +35,11 @@ | @@ -35,7 +35,11 @@ | ||
| 35 | "pages/manager-invitation/index", | 35 | "pages/manager-invitation/index", |
| 36 | "pages/manager-invitation/review", | 36 | "pages/manager-invitation/review", |
| 37 | "pages/manager-invitation/editor", | 37 | "pages/manager-invitation/editor", |
| 38 | - "pages/manager-invitation/display" | 38 | + "pages/manager-invitation/display", |
| 39 | + "pages/manager-invitation/setting/index", | ||
| 40 | + "pages/manager-invitation/setting/sellers", | ||
| 41 | + "pages/manager-invitation/setting/seller-editor", | ||
| 42 | + "pages/manager-invitation/crm/index" | ||
| 39 | ], | 43 | ], |
| 40 | "subpackages": [ | 44 | "subpackages": [ |
| 41 | { | 45 | { |
pages/manager-invitation/crm/index.js
0 → 100644
| 1 | +// pages/book/setting/index.js | ||
| 2 | +import util from '../../../utils/util'; | ||
| 3 | +import App from '../../../utils/api'; | ||
| 4 | +const {regeneratorRuntime} = global | ||
| 5 | +Page({ | ||
| 6 | + offset: 0, | ||
| 7 | + limit: 10, | ||
| 8 | + hasMore: true, | ||
| 9 | + list:{}, | ||
| 10 | + /** | ||
| 11 | + * 页面的初始数据 | ||
| 12 | + */ | ||
| 13 | + data: { | ||
| 14 | + list:[], | ||
| 15 | + hasMore:true, | ||
| 16 | + hasSalesman:false, | ||
| 17 | + }, | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 生命周期函数--监听页面加载 | ||
| 21 | + */ | ||
| 22 | + enter_params: {}, | ||
| 23 | + onLoad: function (options) { | ||
| 24 | + this.enter_params = util.cache('enter_params'); | ||
| 25 | + App.Reserve.SellerInfo(this.enter_params).then(res=>{ | ||
| 26 | + this.setData({ | ||
| 27 | + hasSalesman:res.data.hasSalesman==1 | ||
| 28 | + }) | ||
| 29 | + }) | ||
| 30 | + this.seller_id=options.seller_id||this.enter_params.seller_id; | ||
| 31 | + this.getMembers(); | ||
| 32 | + }, | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 36 | + */ | ||
| 37 | + onReady: function () { | ||
| 38 | + | ||
| 39 | + }, | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 生命周期函数--监听页面显示 | ||
| 43 | + */ | ||
| 44 | + onShow: function () { | ||
| 45 | + | ||
| 46 | + }, | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 生命周期函数--监听页面隐藏 | ||
| 50 | + */ | ||
| 51 | + onHide: function () { | ||
| 52 | + | ||
| 53 | + }, | ||
| 54 | + /** | ||
| 55 | + * 页面上拉触底事件的处理函数 | ||
| 56 | + */ | ||
| 57 | + onReachBottom: function () { | ||
| 58 | + if(this.hasMore){ | ||
| 59 | + this.getMembers(true); | ||
| 60 | + } | ||
| 61 | + }, | ||
| 62 | + getMembers(hasReachBottom=false){ | ||
| 63 | + App.Reserve.Members({ | ||
| 64 | + sid: this.seller_id, | ||
| 65 | + //manager_id:this.enter_params.manager_id, | ||
| 66 | + manager_openid:this.enter_params.seller_openid, | ||
| 67 | + offset: this.offset, | ||
| 68 | + limit: this.limit, | ||
| 69 | + }).then(res => { | ||
| 70 | + let list = this.data.list; | ||
| 71 | + let dl=res.data.length; | ||
| 72 | + if (dl > 0) { | ||
| 73 | + res.data.forEach(r => { | ||
| 74 | + //r.addtimeStr = util.unixtoTime(r.addtime, 'MM/DD HH:II') | ||
| 75 | + list.push(r) | ||
| 76 | + this.list[r.id] = r; | ||
| 77 | + }) | ||
| 78 | + } | ||
| 79 | + let obj={list:list}; | ||
| 80 | + if(dl<this.limit && hasReachBottom){ | ||
| 81 | + this.hasMore=false; | ||
| 82 | + obj.hasMore=false; | ||
| 83 | + }else{ | ||
| 84 | + this.offset+=this.limit; | ||
| 85 | + } | ||
| 86 | + this.setData(obj) | ||
| 87 | + }) | ||
| 88 | + }, | ||
| 89 | + sendSalesmanMsg(e){ | ||
| 90 | + let openid=util.attr(e,'openid') | ||
| 91 | + App.Reserve.OperationalMessagePush({ | ||
| 92 | + openid:openid | ||
| 93 | + }).then(res=>{ | ||
| 94 | + if(res.ret!=200){ | ||
| 95 | + return util.toast(res.msg,'none') | ||
| 96 | + } | ||
| 97 | + util.toast('已发送') | ||
| 98 | + }) | ||
| 99 | + }, | ||
| 100 | +}) |
pages/manager-invitation/crm/index.json
0 → 100644
pages/manager-invitation/crm/index.wxml
0 → 100644
| 1 | +<!--pages/book/setting/index.wxml--> | ||
| 2 | +<nav id="nav" backgroundColor="#199095" color="#fefefe">我的客户</nav> | ||
| 3 | +<view class="pages"> | ||
| 4 | + <block wx:if="{{list.length>0}}"> | ||
| 5 | + <view class="row flex-lr" wx:for="{{list}}" wx:key="list.key" > | ||
| 6 | + <view class="flex-ll"> | ||
| 7 | + <view class="avatar"> | ||
| 8 | + <image src="{{item.headimgurl}}"></image> | ||
| 9 | + </view> | ||
| 10 | + <view class="nickname">{{item.nickname||''}}</view> | ||
| 11 | + </view> | ||
| 12 | + <view class="flex-rr optmsg" wx:if="{{hasSalesman}}" bindtap="sendSalesmanMsg" data-openid="{{item.openid}}"> | ||
| 13 | + <view>发送消息</view> | ||
| 14 | + <view class="more"></view> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + </block> | ||
| 18 | + <view wx:else="" class="history-is-empty flex-vc Medium"> | ||
| 19 | + <image src="http://qn.colorcun.com/custom/lite-yd/image/history-is-empty.png"></image> | ||
| 20 | + <view>暂时还没有客户</view> | ||
| 21 | + </view> | ||
| 22 | + <view wx:if="{{!hasMore}}" class="row flex-vc">已经到底了</view> | ||
| 23 | +</view> |
pages/manager-invitation/crm/index.wxss
0 → 100644
| 1 | +/* pages/book/setting/index.wxss */ | ||
| 2 | +/* | ||
| 3 | +http://qn.colorcun.com/custom/lite-yd/image/icon-zk.png | ||
| 4 | +http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png | ||
| 5 | +*/ | ||
| 6 | +.pages{ | ||
| 7 | + width: 90%; | ||
| 8 | + margin: 0 auto 50rpx; | ||
| 9 | + color: #353535; | ||
| 10 | + overflow-y: auto; | ||
| 11 | +} | ||
| 12 | +.row{ | ||
| 13 | + font-size: 34rpx; | ||
| 14 | + height: 106rpx; | ||
| 15 | + border-bottom: 2rpx solid #F1F0F4; | ||
| 16 | + padding-top: 34rpx; | ||
| 17 | +} | ||
| 18 | +.row .right{ | ||
| 19 | + font-size: 30rpx; | ||
| 20 | + color:#999999; | ||
| 21 | +} | ||
| 22 | +.row .more{ | ||
| 23 | + margin-left: 20rpx; | ||
| 24 | +} | ||
| 25 | +.row:last-child{ | ||
| 26 | + border-bottom-width: 0; | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +.history-is-empty{ | ||
| 30 | + margin: 200rpx auto; | ||
| 31 | + font-size: 34rpx; | ||
| 32 | + | ||
| 33 | +} | ||
| 34 | +.history-is-empty image{ | ||
| 35 | + width: 376rpx; | ||
| 36 | + height: 310rpx; | ||
| 37 | + margin-bottom: 122rpx; | ||
| 38 | +} | ||
| 39 | +.avatar{ | ||
| 40 | + width: 80rpx; | ||
| 41 | + height: 80rpx; | ||
| 42 | + border-radius: 50%; | ||
| 43 | + overflow: hidden; | ||
| 44 | +} | ||
| 45 | +.avatar image{ | ||
| 46 | + width: 100%; | ||
| 47 | + height: 100%; | ||
| 48 | +} | ||
| 49 | +.nickname{ | ||
| 50 | + margin-left: 40rpx; | ||
| 51 | + font-size: 34rpx; | ||
| 52 | +} | ||
| 53 | +.optmsg{ | ||
| 54 | + font-size: 30rpx; | ||
| 55 | + color:#199095; | ||
| 56 | +} |
pages/manager-invitation/setting/index.js
0 → 100644
| 1 | +// pages/book/setting/index.js | ||
| 2 | +import util from '../../../utils/util'; | ||
| 3 | +import App from '../../../utils/api'; | ||
| 4 | +const {regeneratorRuntime} = global | ||
| 5 | +Page({ | ||
| 6 | + | ||
| 7 | + /** | ||
| 8 | + * 页面的初始数据 | ||
| 9 | + */ | ||
| 10 | + data: {}, | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * 生命周期函数--监听页面加载 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | + onLoad: function (options) { | ||
| 17 | + | ||
| 18 | + }, | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 22 | + */ | ||
| 23 | + onReady: function () { | ||
| 24 | + | ||
| 25 | + }, | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 生命周期函数--监听页面显示 | ||
| 29 | + */ | ||
| 30 | + onShow: function () { | ||
| 31 | + | ||
| 32 | + }, | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 生命周期函数--监听页面隐藏 | ||
| 36 | + */ | ||
| 37 | + onHide: function () { | ||
| 38 | + | ||
| 39 | + }, | ||
| 40 | +}) |
pages/manager-invitation/setting/index.json
0 → 100644
pages/manager-invitation/setting/index.wxml
0 → 100644
| 1 | +<!--pages/book/setting/index.wxml--> | ||
| 2 | +<nav id="nav" backgroundColor="#199095" color="#fefefe">订座</nav> | ||
| 3 | +<view class="header"> | ||
| 4 | + <view class="info"> | ||
| 5 | + <view class="nick">{{user.nick_name || user.nickname}}</view> | ||
| 6 | + <view class="seller Medium">{{seller.sellername}} | {{user.role_name||''}}</view> | ||
| 7 | + </view> | ||
| 8 | +</view> | ||
| 9 | +<view class="page"> | ||
| 10 | + <formids url="/pages/manager-invitation/setting/sellers"> | ||
| 11 | + <view class="row flex-lr"> | ||
| 12 | + <view>我工作的店铺</view> | ||
| 13 | + <view class="flex-rr"> | ||
| 14 | + <view class="more"></view> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + </formids> | ||
| 18 | + <formids url="/pages/manager-invitation/setting/sellers"> | ||
| 19 | + <view class="row flex-lr" style="padding-top: 34rpx;"> | ||
| 20 | + <view>我的预订安排</view> | ||
| 21 | + <view class="flex-rr"> | ||
| 22 | + <view class="more"></view> | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 25 | + </formids> | ||
| 26 | + <formids url="/pages/manager-invitation/crm/index"> | ||
| 27 | + <view class="row flex-lr" style="padding-top: 34rpx;"> | ||
| 28 | + <view>我的客户</view> | ||
| 29 | + <view class="flex-rr"> | ||
| 30 | + <view class="more"></view> | ||
| 31 | + </view> | ||
| 32 | + </view> | ||
| 33 | + </formids> | ||
| 34 | + <formids url="/pages/customer/index?islove=customer"> | ||
| 35 | + <view class="row flex-lr" style="padding-top: 34rpx;"> | ||
| 36 | + <view>切换到顾客模式</view> | ||
| 37 | + <view class="flex-rr"> | ||
| 38 | + <view class="more"></view> | ||
| 39 | + </view> | ||
| 40 | + </view> | ||
| 41 | + </formids> | ||
| 42 | +</view> |
pages/manager-invitation/setting/index.wxss
0 → 100644
| 1 | +/* pages/book/setting/index.wxss */ | ||
| 2 | +/* | ||
| 3 | +http://qn.colorcun.com/custom/lite-yd/image/icon-zk.png | ||
| 4 | +http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png | ||
| 5 | +*/ | ||
| 6 | +.header{ | ||
| 7 | + height: 302rpx; | ||
| 8 | + background-color: #199095; | ||
| 9 | + margin-top: -2rpx; | ||
| 10 | +} | ||
| 11 | +.header .info{ | ||
| 12 | + color:#FEFEFE; | ||
| 13 | + width: 90%; | ||
| 14 | + padding-top: 86rpx; | ||
| 15 | + margin: 0 auto; | ||
| 16 | +} | ||
| 17 | +.header .info .nick{ | ||
| 18 | + font-size: 44rpx; | ||
| 19 | + font-weight: bold; | ||
| 20 | + margin-bottom: 28rpx; | ||
| 21 | +} | ||
| 22 | +.header .info .seller{ | ||
| 23 | + font-size: 34rpx; | ||
| 24 | +} | ||
| 25 | +.page{ | ||
| 26 | + width: 90%; | ||
| 27 | + margin: 0 auto; | ||
| 28 | + color: #353535; | ||
| 29 | + padding-top: 34rpx; | ||
| 30 | +} | ||
| 31 | +.row{ | ||
| 32 | + font-size: 34rpx; | ||
| 33 | + height: 106rpx; | ||
| 34 | + border-bottom: 2rpx solid #F1F0F4; | ||
| 35 | +} | ||
| 36 | +.row .right{ | ||
| 37 | + font-size: 30rpx; | ||
| 38 | + color:#999999; | ||
| 39 | +} | ||
| 40 | +.row .more{ | ||
| 41 | + margin-left: 20rpx; | ||
| 42 | +} |
| 1 | +// pages/manager-invitation/editor.js | ||
| 2 | +import util from '../../../utils/util'; | ||
| 3 | +import App from '../../../utils/api'; | ||
| 4 | +const {regeneratorRuntime} = global | ||
| 5 | +Page({ | ||
| 6 | + | ||
| 7 | + /** | ||
| 8 | + * 页面的初始数据 | ||
| 9 | + */ | ||
| 10 | + data: { | ||
| 11 | + hasSubmit:false, | ||
| 12 | + form:{ | ||
| 13 | + name:'', | ||
| 14 | + addr:'', | ||
| 15 | + id:'', | ||
| 16 | + latitude:'', | ||
| 17 | + longitude:'', | ||
| 18 | + }, | ||
| 19 | + }, | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 生命周期函数--监听页面加载 | ||
| 23 | + */ | ||
| 24 | + onLoad: function (options) { | ||
| 25 | + this.initData(options) | ||
| 26 | + this.setData({ | ||
| 27 | + options:options, | ||
| 28 | + }) | ||
| 29 | + }, | ||
| 30 | + initData(options){ | ||
| 31 | + if(options.rid){ | ||
| 32 | + App.Invitation.Detail({id:options.rid}).then(res=>{ | ||
| 33 | + this.setData({ | ||
| 34 | + form:{ | ||
| 35 | + sid:res.data.seller_name, | ||
| 36 | + name:res.data.seller_name, | ||
| 37 | + room:res.data.room_name, | ||
| 38 | + addr:res.data.seller_address, | ||
| 39 | + sid:res.data.sid, | ||
| 40 | + time:res.data.arrival_time, | ||
| 41 | + image:res.data.image_url, | ||
| 42 | + latitude:res.data.lat, | ||
| 43 | + longitude:res.data.long, | ||
| 44 | + }, | ||
| 45 | + timeStr:util.unixtoTime(res.data.arrival_time,this.data.tpl.timeStr) | ||
| 46 | + }) | ||
| 47 | + }) | ||
| 48 | + }else{ | ||
| 49 | + App.Invitation.GetSellerList({ | ||
| 50 | + openid:getApp().openid | ||
| 51 | + }).then(res=>{ | ||
| 52 | + if(res.data.length>0){ | ||
| 53 | + let defi=0; | ||
| 54 | + for(let i=0;i<res.data.length;i++){ | ||
| 55 | + if(res.data[i].is_default==1){ | ||
| 56 | + defi=i; | ||
| 57 | + break; | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | + let sel=res.data[defi]; | ||
| 61 | + this.setData({ | ||
| 62 | + form:{ | ||
| 63 | + sid:sel.id, | ||
| 64 | + name:sel.name, | ||
| 65 | + addr:sel.address, | ||
| 66 | + latitude:sel.lat, | ||
| 67 | + longitude:sel.long, | ||
| 68 | + } | ||
| 69 | + }) | ||
| 70 | + } | ||
| 71 | + }) | ||
| 72 | + } | ||
| 73 | + }, | ||
| 74 | + /** | ||
| 75 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 76 | + */ | ||
| 77 | + onReady: function () { | ||
| 78 | + | ||
| 79 | + }, | ||
| 80 | + | ||
| 81 | + /** | ||
| 82 | + * 生命周期函数--监听页面显示 | ||
| 83 | + */ | ||
| 84 | + onShow: function () { | ||
| 85 | + | ||
| 86 | + }, | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 生命周期函数--监听页面隐藏 | ||
| 90 | + */ | ||
| 91 | + onHide: function () { | ||
| 92 | + | ||
| 93 | + }, | ||
| 94 | + | ||
| 95 | + /** | ||
| 96 | + * 生命周期函数--监听页面卸载 | ||
| 97 | + */ | ||
| 98 | + onUnload: function () { | ||
| 99 | + | ||
| 100 | + }, | ||
| 101 | + | ||
| 102 | + /** | ||
| 103 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 104 | + */ | ||
| 105 | + onPullDownRefresh: function () { | ||
| 106 | + | ||
| 107 | + }, | ||
| 108 | + | ||
| 109 | + /** | ||
| 110 | + * 页面上拉触底事件的处理函数 | ||
| 111 | + */ | ||
| 112 | + onReachBottom: function () { | ||
| 113 | + | ||
| 114 | + }, | ||
| 115 | + checkHasSubmit(){ | ||
| 116 | + let form=this.data.form; | ||
| 117 | + let flag=false; | ||
| 118 | + if( | ||
| 119 | + form.name | ||
| 120 | + && form.addr | ||
| 121 | + && form.latitude>0 | ||
| 122 | + ){ | ||
| 123 | + flag=true; | ||
| 124 | + } | ||
| 125 | + this.setData({ | ||
| 126 | + hasSubmit:flag | ||
| 127 | + }) | ||
| 128 | + return flag; | ||
| 129 | + }, | ||
| 130 | + input(e){ | ||
| 131 | + let key=util.attr(e,'key'); | ||
| 132 | + if(key=='addr' && !(this.data.form.latitude>0)){ | ||
| 133 | + return this.onChangeAddress() | ||
| 134 | + } | ||
| 135 | + let val=util.val(e).trim(); | ||
| 136 | + let form=this.data.form; | ||
| 137 | + form[key]=val; | ||
| 138 | + this.setData({ | ||
| 139 | + form:form, | ||
| 140 | + }) | ||
| 141 | + this.checkHasSubmit() | ||
| 142 | + }, | ||
| 143 | + submit(){ | ||
| 144 | + if(!this.checkHasSubmit()){ | ||
| 145 | + let msg='请完善信息'; | ||
| 146 | + if(this.data.form.latitude<1){ | ||
| 147 | + msg='请标注店铺位置' | ||
| 148 | + } | ||
| 149 | + return util.toast(msg,'none') | ||
| 150 | + } | ||
| 151 | + let opt=this.data.options | ||
| 152 | + let param={ | ||
| 153 | + openid:getApp().openid, | ||
| 154 | + sid:this.data.form.sid, | ||
| 155 | + sname:this.data.form.name, | ||
| 156 | + seller_address:this.data.form.addr, | ||
| 157 | + lat:this.data.form.latitude, | ||
| 158 | + long:this.data.form.longitude, | ||
| 159 | + } | ||
| 160 | + }, | ||
| 161 | + onChangeAddress(){ | ||
| 162 | + wx.chooseLocation({ | ||
| 163 | + success: (res)=> { | ||
| 164 | + console.log(res); | ||
| 165 | + this.setData({ | ||
| 166 | + [`form.latitude`]:res.latitude, | ||
| 167 | + [`form.longitude`]:res.longitude, | ||
| 168 | + [`form.addr`]:res.name, | ||
| 169 | + }) | ||
| 170 | + this.checkHasSubmit() | ||
| 171 | + }, | ||
| 172 | + fail: function (err) { | ||
| 173 | + console.log(err) | ||
| 174 | + } | ||
| 175 | + }); | ||
| 176 | + }, | ||
| 177 | +}) |
| 1 | +<!--pages/manager-invitation/editor.wxml--> | ||
| 2 | +<nav>修改信息</nav> | ||
| 3 | +<view class="pages"> | ||
| 4 | + <view class="base block"> | ||
| 5 | + <view class="item Medium">预订信息</view> | ||
| 6 | + <view class="item flex-ll"> | ||
| 7 | + <input value="{{form.name}}" bindinput="input" | ||
| 8 | + data-key="name" | ||
| 9 | + placeholder="请输入店铺名称" placeholder-class="placeholder-class"/> | ||
| 10 | + <view class="quick">快速选择</view> | ||
| 11 | + </view> | ||
| 12 | + <view class="item flex-ll"> | ||
| 13 | + <picker | ||
| 14 | + mode="multiSelector" | ||
| 15 | + bindchange="bindMultiPickerChange" | ||
| 16 | + bindcolumnchange="bindMultiPickerColumnChange" | ||
| 17 | + value="{{pickerValue}}" | ||
| 18 | + range="{{pickerData}}" | ||
| 19 | + style="width: 100%" | ||
| 20 | + > | ||
| 21 | + <view class="picker" style="width: 100%;"> | ||
| 22 | + <!-- | ||
| 23 | + <block wx:if="{{pickerValue[0]>-1}}"> | ||
| 24 | + {{pickerData[0][pickerValue[0]]}} {{pickerData[1][pickerValue[1]]}} {{pickerData[2][pickerValue[2]]}} | ||
| 25 | + </block> | ||
| 26 | + --> | ||
| 27 | + <text wx:if="{{timeStr}}">{{timeStr}}</text> | ||
| 28 | + <text class="placeholder-class" wx:else="">请输入预订时间</text> | ||
| 29 | + </view> | ||
| 30 | + </picker> | ||
| 31 | + </view> | ||
| 32 | + <view class="item flex-ll"> | ||
| 33 | + <input value="{{form.room}}" bindinput="input" | ||
| 34 | + data-key="room" | ||
| 35 | + placeholder="请输入包间名称" placeholder-class="placeholder-class"/> | ||
| 36 | + </view> | ||
| 37 | + <view class="item flex-ll"> | ||
| 38 | + <input value="{{form.addr}}" | ||
| 39 | + bindinput="input" bindfocus="input" | ||
| 40 | + data-key="addr" | ||
| 41 | + placeholder="请输入店铺地址" placeholder-class="placeholder-class"/> | ||
| 42 | + <view class="caddr flex-rr" bindtap="onChangeAddress"> | ||
| 43 | + <image src="http://qn.colorcun.com/manager-invitation/wx/caddr.png" style="width: 28rpx; height: 36rpx;"></image> | ||
| 44 | + </view> | ||
| 45 | + </view> | ||
| 46 | + </view> | ||
| 47 | + <view class="upload block flex-vc" wx:if="{{tpl.hasImage}}"> | ||
| 48 | + <view class="image" bindtap="chooseImage"> | ||
| 49 | + <image src="{{form.image||defImage}}" mode="aspectFill"></image> | ||
| 50 | + </view> | ||
| 51 | + <view class="text">(此处照片为邀请函展示照片)</view> | ||
| 52 | + </view> | ||
| 53 | + <formids bindclick="submit" style="width: 100%;"> | ||
| 54 | + <view class="submit {{hasSubmit?'submit-active':''}}">确定</view> | ||
| 55 | + </formids> | ||
| 56 | +</view> |
| 1 | +/* pages/manager-invitation/editor.wxss */ | ||
| 2 | +page{ | ||
| 3 | + background-color: #F5F5F5; | ||
| 4 | +} | ||
| 5 | +.pages{ | ||
| 6 | + background-color: #F5F5F5; | ||
| 7 | + font-size: 34rpx; | ||
| 8 | + padding-top: 20rpx; | ||
| 9 | + padding-bottom: 160rpx; | ||
| 10 | +} | ||
| 11 | +.block{ | ||
| 12 | + width: 94%; | ||
| 13 | + margin: 0 auto; | ||
| 14 | + border-radius: 8rpx; | ||
| 15 | + background-color: #FEFEFE; | ||
| 16 | +} | ||
| 17 | +.base .item{ | ||
| 18 | + height: 140rpx; | ||
| 19 | + line-height: 140rpx; | ||
| 20 | + width: 94%; | ||
| 21 | + margin: 0 auto; | ||
| 22 | + border-bottom: 2rpx solid #F1F0F4; | ||
| 23 | +} | ||
| 24 | +.item input{ | ||
| 25 | + width: 100%; | ||
| 26 | +} | ||
| 27 | +.base .item:last-child{ | ||
| 28 | + border-width: 0; | ||
| 29 | +} | ||
| 30 | +.upload{ | ||
| 31 | + margin-top: 20rpx; | ||
| 32 | + height: 310rpx; | ||
| 33 | +} | ||
| 34 | +.image{ | ||
| 35 | + width: 220rpx; | ||
| 36 | + height: 220rpx; | ||
| 37 | + border: 2rpx #E0E0E0 dashed; | ||
| 38 | + margin-top: 20rpx; | ||
| 39 | +} | ||
| 40 | +.image image{ | ||
| 41 | + width: 100%; | ||
| 42 | + height: 100%; | ||
| 43 | +} | ||
| 44 | +.text{ | ||
| 45 | + margin-top: 20rpx; | ||
| 46 | + font-size: 28rpx; | ||
| 47 | + color: #999999; | ||
| 48 | +} | ||
| 49 | +.submit{ | ||
| 50 | + position: fixed; | ||
| 51 | + bottom: 30rpx; | ||
| 52 | + left: 0; | ||
| 53 | + right:0; | ||
| 54 | + margin: 0 auto; | ||
| 55 | + height: 84rpx; | ||
| 56 | + line-height: 84rpx; | ||
| 57 | + width: 90%; | ||
| 58 | + background-color: #74BBBE; | ||
| 59 | + border-radius: 10rpx; | ||
| 60 | + color: #FEFEFE; | ||
| 61 | +} | ||
| 62 | +.submit-active{ | ||
| 63 | + background-color: #199095; | ||
| 64 | +} | ||
| 65 | +.quick{ | ||
| 66 | + height: 50rpx; | ||
| 67 | + line-height: 50rpx; | ||
| 68 | + width: 140rpx; | ||
| 69 | + background-color: #46A5A9; | ||
| 70 | + font-size: 28rpx; | ||
| 71 | + color: #FEFEFE; | ||
| 72 | + text-align: center; | ||
| 73 | + min-width: 140rpx; | ||
| 74 | +} | ||
| 75 | +.placeholder-class{ | ||
| 76 | + color: #999999; | ||
| 77 | +} | ||
| 78 | +.caddr{ | ||
| 79 | + width: 140rpx; | ||
| 80 | + min-width: 140rpx; | ||
| 81 | + height: 140rpx; | ||
| 82 | + line-height: 140rpx; | ||
| 83 | +} |
pages/manager-invitation/setting/sellers.js
0 → 100644
| 1 | +// pages/manager-invitation/setting/sellers.js | ||
| 2 | +import util from '../../../utils/util'; | ||
| 3 | +import App from '../../../utils/api'; | ||
| 4 | +const {regeneratorRuntime} = global | ||
| 5 | +Page({ | ||
| 6 | + | ||
| 7 | + /** | ||
| 8 | + * 页面的初始数据 | ||
| 9 | + */ | ||
| 10 | + data: { | ||
| 11 | + sellers:[], | ||
| 12 | + }, | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 生命周期函数--监听页面加载 | ||
| 16 | + */ | ||
| 17 | + onLoad: function (options) { | ||
| 18 | + | ||
| 19 | + }, | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 23 | + */ | ||
| 24 | + onReady: function () { | ||
| 25 | + | ||
| 26 | + }, | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 生命周期函数--监听页面显示 | ||
| 30 | + */ | ||
| 31 | + onShow: function () { | ||
| 32 | + App.Invitation.GetSellerList({openid:getApp().openid}).then(res=>{ | ||
| 33 | + this.setData({ | ||
| 34 | + sellers:res.data, | ||
| 35 | + }) | ||
| 36 | + }) | ||
| 37 | + }, | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 生命周期函数--监听页面隐藏 | ||
| 41 | + */ | ||
| 42 | + onHide: function () { | ||
| 43 | + | ||
| 44 | + }, | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 生命周期函数--监听页面卸载 | ||
| 48 | + */ | ||
| 49 | + onUnload: function () { | ||
| 50 | + | ||
| 51 | + }, | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 55 | + */ | ||
| 56 | + onPullDownRefresh: function () { | ||
| 57 | + | ||
| 58 | + }, | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 页面上拉触底事件的处理函数 | ||
| 62 | + */ | ||
| 63 | + onReachBottom: function () { | ||
| 64 | + | ||
| 65 | + }, | ||
| 66 | + sellerEditor(e){ | ||
| 67 | + let i=util.attr(e,'index'); | ||
| 68 | + let sel=this.data.sellers[i]; | ||
| 69 | + wx.navigateTo({ | ||
| 70 | + url:'/pages/manager-invitation/setting/seller-editor?seller='+JSON.stringify(sel) | ||
| 71 | + }) | ||
| 72 | + }, | ||
| 73 | +}) |
| 1 | +<!--pages/manager-invitation/setting/sellers.wxml--> | ||
| 2 | +<nav>我工作的店铺</nav> | ||
| 3 | +<view style="background-color: #F5F5F5;height: 2rpx;width: 100%;"></view> | ||
| 4 | +<view class="pages"> | ||
| 5 | + <block wx:for="{{sellers}}" wx:key="sellers.key"> | ||
| 6 | + <formids url="/pages/manager-invitation/setting/seller-editor" bindclick="sellerEditor" data-index="{{index}}"> | ||
| 7 | + <view class="seller {{item.is_default==1?'active':''}}"> | ||
| 8 | + <view class="name">{{item.name}}</view> | ||
| 9 | + <view class="addr">{{item.address}}</view> | ||
| 10 | + <view class="default" wx:if="{{item.is_default==1}}">默认</view> | ||
| 11 | + </view> | ||
| 12 | + </formids> | ||
| 13 | + </block> | ||
| 14 | +</view> |
| 1 | +/* pages/manager-invitation/setting/sellers.wxss */ | ||
| 2 | +.pages{ | ||
| 3 | + width: 90%; | ||
| 4 | + margin: 0 auto; | ||
| 5 | + padding-top: 40rpx; | ||
| 6 | +} | ||
| 7 | +.seller{ | ||
| 8 | + margin-bottom: 40rpx; | ||
| 9 | + border: 2rpx solid #999999; | ||
| 10 | + border-radius: 10rpx; | ||
| 11 | + width: 100%; | ||
| 12 | + height: 200rpx; | ||
| 13 | + color:#353535; | ||
| 14 | + position: relative; | ||
| 15 | +} | ||
| 16 | +.name{ | ||
| 17 | + font-size: 34rpx; | ||
| 18 | + width: 90%; | ||
| 19 | + margin: 30rpx auto 0; | ||
| 20 | + height: 48rpx; | ||
| 21 | + line-height: 48rpx; | ||
| 22 | + text-align: left; | ||
| 23 | +} | ||
| 24 | +.addr{ | ||
| 25 | + font-size: 30rpx; | ||
| 26 | + width: 90%; | ||
| 27 | + margin: 8rpx auto 0; | ||
| 28 | + line-height: 40rpx; | ||
| 29 | + text-align: left; | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +.seller.active{ | ||
| 33 | + background-color: #199095; | ||
| 34 | + border: 2rpx solid #199095; | ||
| 35 | + color:#FEFEFE; | ||
| 36 | +} | ||
| 37 | +.default{ | ||
| 38 | + background-color: #F05522; | ||
| 39 | + color:#fefefe; | ||
| 40 | + font-size: 28rpx; | ||
| 41 | + height: 40rpx; | ||
| 42 | + width: 90rpx; | ||
| 43 | + position: absolute; | ||
| 44 | + top: -2rpx; | ||
| 45 | + right: -2rpx; | ||
| 46 | + border-radius: 26rpx 10rpx 0 26rpx; | ||
| 47 | + text-align: center; | ||
| 48 | + line-height: 40rpx; | ||
| 49 | +} |
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | "list": [] | 31 | "list": [] |
| 32 | }, | 32 | }, |
| 33 | "miniprogram": { | 33 | "miniprogram": { |
| 34 | - "current": 43, | 34 | + "current": 47, |
| 35 | "list": [ | 35 | "list": [ |
| 36 | { | 36 | { |
| 37 | "id": 0, | 37 | "id": 0, |
| @@ -377,6 +377,20 @@ | @@ -377,6 +377,20 @@ | ||
| 377 | "pathName": "pages/manager-invitation/display", | 377 | "pathName": "pages/manager-invitation/display", |
| 378 | "query": "rid=5&tplid=2&fromid=oB-xJ5KJCIasaEdgMRckqoL1cwg8&hasSellerShare=", | 378 | "query": "rid=5&tplid=2&fromid=oB-xJ5KJCIasaEdgMRckqoL1cwg8&hasSellerShare=", |
| 379 | "scene": null | 379 | "scene": null |
| 380 | + }, | ||
| 381 | + { | ||
| 382 | + "id": -1, | ||
| 383 | + "name": "pages/manager-invitation/setting/index", | ||
| 384 | + "pathName": "pages/manager-invitation/setting/index", | ||
| 385 | + "query": "", | ||
| 386 | + "scene": null | ||
| 387 | + }, | ||
| 388 | + { | ||
| 389 | + "id": -1, | ||
| 390 | + "name": "pages/manager-invitation/setting/sellers", | ||
| 391 | + "pathName": "pages/manager-invitation/setting/sellers", | ||
| 392 | + "query": "", | ||
| 393 | + "scene": null | ||
| 380 | } | 394 | } |
| 381 | ] | 395 | ] |
| 382 | } | 396 | } |
-
Please register or login to post a comment