作者 王楠

“增加办公采办”

1 App({ 1 App({
2 onLaunch: function () { 2 onLaunch: function () {
3 - if(wx.getStorageSync('token')){ 3 + if (wx.getStorageSync('token')) {
4 this.getmessagelist() 4 this.getmessagelist()
5 5
6 } 6 }
@@ -34,26 +34,40 @@ App({ @@ -34,26 +34,40 @@ App({
34 }) 34 })
35 }, 35 },
36 post: function (url, data, showLoad) { 36 post: function (url, data, showLoad) {
37 -  
38 wx.showNavigationBarLoading() 37 wx.showNavigationBarLoading()
39 var promise = new Promise((resolve, reject) => { 38 var promise = new Promise((resolve, reject) => {
40 //init 39 //init
41 let that = this; 40 let that = this;
42 - let postData = data , baseUrl; 41 + let postData = data, baseUrl;
43 // let baseUrl = 'https://binhai.w.broing.cn/api'; 42 // let baseUrl = 'https://binhai.w.broing.cn/api';
44 // let baseUrl ='http://binhaitest.w.brotop.cn/api' 43 // let baseUrl ='http://binhaitest.w.brotop.cn/api'
45 // 现在用的 44 // 现在用的
46 // let baseUrl = 'https://binhai.w.broing.cn/api' 45 // let baseUrl = 'https://binhai.w.broing.cn/api'
47 // let baseUrl = 'http://binhaitest.w.brotop.cn/api' 46 // let baseUrl = 'http://binhaitest.w.brotop.cn/api'
  47 + // 滨海
48 var entrance_type = wx.getStorageSync("entrance_type"); 48 var entrance_type = wx.getStorageSync("entrance_type");
49 console.log(entrance_type); 49 console.log(entrance_type);
50 - if(entrance_type == '1'||url=='/getopenid/get'||url.indexOf('address')>-1){ 50 + if (entrance_type == '1' || url == '/getopenid/get' || url.indexOf('address') > -1) {
51 //劳保商城入口 51 //劳保商城入口
52 baseUrl = 'https://binhai.w.broing.cn/api'; 52 baseUrl = 'https://binhai.w.broing.cn/api';
53 - }else{ 53 + } else if (entrance_type == '2') {
54 //工会商城入口 54 //工会商城入口
55 baseUrl = 'https://binhaigh.w.broing.cn/api'; 55 baseUrl = 'https://binhaigh.w.broing.cn/api';
  56 + } else if (entrance_type == '3') {
  57 + //工会商城入口
  58 + baseUrl = 'https://bgcb.w.broing.cn/api';
56 } 59 }
  60 + // 天远甄选
  61 + // if (entrance_type == '1' || url == '/getopenid/get' || url.indexOf('address') > -1) {
  62 + // //劳保商城入口
  63 + // baseUrl = 'https://binhai2.w.broing.cn/api';
  64 + // } else if (entrance_type == '2') {
  65 + // //工会商城入口
  66 + // baseUrl = 'https://binhaigh2.w.broing.cn/api';
  67 + // } else if (entrance_type == '3') {
  68 + // //工会商城入口
  69 + // baseUrl = 'https://bgcb2.w.broing.cn/api';
  70 + // }
57 console.log(baseUrl); 71 console.log(baseUrl);
58 //网络请求 72 //网络请求
59 wx.request({ 73 wx.request({
@@ -65,7 +79,7 @@ App({ @@ -65,7 +79,7 @@ App({
65 'token': wx.getStorageSync('token') || '' 79 'token': wx.getStorageSync('token') || ''
66 }, 80 },
67 success: function (res) { //返回取得的数据 81 success: function (res) { //返回取得的数据
68 - console.log('ssssssssssssssssssssssssssssssssssss',res) 82 + console.log('ssssssssssssssssssssssssssssssssssss', res)
69 if (res.data.code == '200') { 83 if (res.data.code == '200') {
70 resolve(res.data) 84 resolve(res.data)
71 } else if (res.data.code == '5000') { 85 } else if (res.data.code == '5000') {
@@ -78,11 +92,11 @@ App({ @@ -78,11 +92,11 @@ App({
78 showCancel: false 92 showCancel: false
79 }) 93 })
80 wx.removeStorageSync('token'); 94 wx.removeStorageSync('token');
81 - setTimeout(()=>{ 95 + setTimeout(() => {
82 wx.navigateTo({ 96 wx.navigateTo({
83 url: '/pages/register/register?type=1', 97 url: '/pages/register/register?type=1',
84 }) 98 })
85 - },1200) 99 + }, 1200)
86 100
87 } else { 101 } else {
88 wx.showModal({ 102 wx.showModal({
@@ -104,21 +118,26 @@ App({ @@ -104,21 +118,26 @@ App({
104 }); 118 });
105 return promise; 119 return promise;
106 }, 120 },
107 - getToken(){  
108 - let that= this; 121 + getToken() {
  122 + let that = this;
109 let u = that.interface.getToken; 123 let u = that.interface.getToken;
110 wx.login({ 124 wx.login({
111 success: (result) => { 125 success: (result) => {
112 that.postk(u, { 126 that.postk(u, {
113 code: result.code 127 code: result.code
114 }).then((r) => { 128 }).then((r) => {
  129 + console.log(r)
115 wx.setStorageSync('token', r.data.token) 130 wx.setStorageSync('token', r.data.token)
116 wx.setStorageSync('login', r.data.login_new1) 131 wx.setStorageSync('login', r.data.login_new1)
117 wx.setStorageSync('gh_login', r.data.login_new2) 132 wx.setStorageSync('gh_login', r.data.login_new2)
  133 + wx.setStorageSync('cb_login', r.data.login_new3)
  134 + wx.setStorageSync('sq', r.data.sq1)
  135 + wx.setStorageSync('gh_sq', r.data.sq2)
  136 + wx.setStorageSync('cb_sq', r.data.sq3)
118 }) 137 })
119 }, 138 },
120 - fail: (res) => {},  
121 - complete: (res) => {}, 139 + fail: (res) => { },
  140 + complete: (res) => { },
122 }) 141 })
123 }, 142 },
124 // 开放商城公共接口 143 // 开放商城公共接口
@@ -128,10 +147,10 @@ App({ @@ -128,10 +147,10 @@ App({
128 //init 147 //init
129 let that = this; 148 let that = this;
130 let postData = data 149 let postData = data
131 - // let baseUrl = 'https://binhai.w.broing.cn/api';  
132 - // let baseUrl ='http://binhaitest.w.brotop.cn/api' 150 + // 滨海
133 let baseUrl = 'https://binhaidispark.w.broing.cn/api' 151 let baseUrl = 'https://binhaidispark.w.broing.cn/api'
134 - 152 + // 天远甄选
  153 + // let baseUrl = 'https://binhaidispark2.w.broing.cn/api'
135 154
136 //网络请求 155 //网络请求
137 wx.request({ 156 wx.request({
@@ -154,10 +173,10 @@ App({ @@ -154,10 +173,10 @@ App({
154 // url: '/pages/register/register?type=1', 173 // url: '/pages/register/register?type=1',
155 // }) 174 // })
156 } else { 175 } else {
157 - wx.showModal({  
158 - title: '提示',  
159 - content: res.data.msg,  
160 - showCancel: false 176 + wx.showToast({
  177 + title: res.data.msg,
  178 + icon: 'none',
  179 +
161 }) 180 })
162 reject(res.data) 181 reject(res.data)
163 } 182 }
@@ -222,10 +241,10 @@ App({ @@ -222,10 +241,10 @@ App({
222 241
223 // 获取个人信息 242 // 获取个人信息
224 getInfoFun() { 243 getInfoFun() {
225 - let that= this; 244 + let that = this;
226 let u = that.interface.readteacher; 245 let u = that.interface.readteacher;
227 that.post(u, {}).then((r) => { 246 that.post(u, {}).then((r) => {
228 - console.log('3489523498',r) 247 + console.log('3489523498', r)
229 if (r.code == 200) { 248 if (r.code == 200) {
230 249
231 wx.setStorageSync('login', r.msg.login_new) 250 wx.setStorageSync('login', r.msg.login_new)
@@ -260,7 +279,7 @@ App({ @@ -260,7 +279,7 @@ App({
260 } 279 }
261 }) 280 })
262 281
263 - console.log('77889944556',newlist) 282 + console.log('77889944556', newlist)
264 if (newlist.length != 0) { 283 if (newlist.length != 0) {
265 wx.showTabBarRedDot({ 284 wx.showTabBarRedDot({
266 index: 1, 285 index: 1,
@@ -278,7 +297,7 @@ App({ @@ -278,7 +297,7 @@ App({
278 }).catch((err) => { }) 297 }).catch((err) => { })
279 }, 298 },
280 299
281 - onShow: function() { 300 + onShow: function () {
282 console.log('hahahahhahahahhhahh') 301 console.log('hahahahhahahahhhahh')
283 }, 302 },
284 303
@@ -338,7 +357,12 @@ App({ @@ -338,7 +357,12 @@ App({
338 order_read: '/shop/read', // 订单数 357 order_read: '/shop/read', // 订单数
339 }, 358 },
340 globalData: { 359 globalData: {
341 - login_new:"",  
342 - baseUrlimg :'https://binhaidispark.w.broing.cn/' 360 + login_new: "",
  361 + // 滨海
  362 + baseUrlimg: 'https://binhaidispark.w.broing.cn/',
  363 + // 天远
  364 + // baseUrlimg: 'https://binhaidispark2.w.broing.cn/api',
343 } 365 }
344 }) 366 })
  367 +// 滨海wx73497072e7340d61
  368 +// 天远wx2980402f625c4f80
1 let type = wx.getStorageSync('selecttype'); 1 let type = wx.getStorageSync('selecttype');
2 console.log(type, '类型') 2 console.log(type, '类型')
3 -  
4 Component({ 3 Component({
5 data: { 4 data: {
6 selected: 0, 5 selected: 0,
@@ -48,7 +47,7 @@ Component({ @@ -48,7 +47,7 @@ Component({
48 value: '' 47 value: ''
49 }, 48 },
50 }, 49 },
51 - attached() {}, 50 + attached() { },
52 onLoad() { 51 onLoad() {
53 52
54 }, 53 },
1 // pages/birthday/birthday.js 1 // pages/birthday/birthday.js
2 Page({ 2 Page({
3 3
4 - /**  
5 - * 页面的初始数据  
6 - */ 4 +
7 data: { 5 data: {
8 6
9 }, 7 },
10 8
11 - /**  
12 - * 生命周期函数--监听页面加载  
13 - */ 9 +
14 onLoad: function (options) { 10 onLoad: function (options) {
15 console.log(options) 11 console.log(options)
  12 + // if(options.type == 1){
  13 + // wx.setNavigationBarTitle({
  14 + // title: '生日福利',
  15 + // })
  16 + // }else{
  17 + // wx.setNavigationBarTitle({
  18 + // title: '电影福利',
  19 + // })
  20 + // }
16 wx.setNavigationBarTitle({ 21 wx.setNavigationBarTitle({
17 - title: options.type==1?'生日福利':'电影福利', 22 + title: '生日电影福利',
18 }) 23 })
  24 +
19 }, 25 },
20 26
21 - /**  
22 - * 生命周期函数--监听页面初次渲染完成  
23 - */  
24 onReady: function () { 27 onReady: function () {
25 28
26 }, 29 },
1 -const app =getApp() 1 +const app = getApp()
2 Page({ 2 Page({
3 3
4 /** 4 /**
@@ -6,16 +6,16 @@ Page({ @@ -6,16 +6,16 @@ Page({
6 */ 6 */
7 data: { 7 data: {
8 status: 0, 8 status: 0,
9 - taocan:false,  
10 - page:1,  
11 - taocanlist:[],  
12 - remain:true,  
13 - page:1,  
14 - good_arr:[],  
15 - taocanpage:1,  
16 - kindshow:true, 9 + taocan: false,
  10 + page: 1,
  11 + taocanlist: [],
  12 + remain: true,
  13 + page: 1,
  14 + good_arr: [],
  15 + taocanpage: 1,
  16 + kindshow: true,
17 // 品牌 17 // 品牌
18 - letter: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z","*"], 18 + letter: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "*"],
19 cityListId: '', 19 cityListId: '',
20 //下面是城市列表信息,这里只是模拟数据 20 //下面是城市列表信息,这里只是模拟数据
21 citylist: [{ "letter": "A", "data": [{ "id": "v7", "cityName": "安徽" }] }, { "letter": "B", "data": [{ "id": "v10", "cityName": "巴中" }, { "id": "v4", "cityName": "包头" }, { "id": "v1", "cityName": "北京" }] }, { "letter": "C", "data": [{ "id": "v15", "cityName": "成都" }] }, { "letter": "D", "data": [{ "id": "v21", "cityName": "稻城" }] }, { "letter": "G", "data": [{ "id": "v17", "cityName": "广州" }, { "id": "v29", "cityName": "桂林" }] }, { "letter": "H", "data": [{ "id": "v9", "cityName": "海南" }, { "id": "v3", "cityName": "呼和浩特" }] }, { "letter": "L", "data": [{ "id": "v24", "cityName": "洛阳" }, { "id": "v20", "cityName": "拉萨" }, { "id": "v14", "cityName": "丽江" }] }, { "letter": "M", "data": [{ "id": "v13", "cityName": "眉山" }] }, { "letter": "N", "data": [{ "id": "v27", "cityName": "南京" }] }, { "letter": "S", "data": [{ "id": "v18", "cityName": "三亚" }, { "id": "v2", "cityName": "上海" }] }, { "letter": "T", "data": [{ "id": "v5", "cityName": "天津" }] }, { "letter": "W", "data": [{ "id": "v12", "cityName": "乌鲁木齐" }, { "id": "v25", "cityName": "武汉" }] }, { "letter": "X", "data": [{ "id": "v23", "cityName": "西安" }, { "id": "v28", "cityName": "香港" }, { "id": "v19", "cityName": "厦门" }] }, { "letter": "Z", "data": [{ "id": "v8", "cityName": "张家口" }] }], 21 citylist: [{ "letter": "A", "data": [{ "id": "v7", "cityName": "安徽" }] }, { "letter": "B", "data": [{ "id": "v10", "cityName": "巴中" }, { "id": "v4", "cityName": "包头" }, { "id": "v1", "cityName": "北京" }] }, { "letter": "C", "data": [{ "id": "v15", "cityName": "成都" }] }, { "letter": "D", "data": [{ "id": "v21", "cityName": "稻城" }] }, { "letter": "G", "data": [{ "id": "v17", "cityName": "广州" }, { "id": "v29", "cityName": "桂林" }] }, { "letter": "H", "data": [{ "id": "v9", "cityName": "海南" }, { "id": "v3", "cityName": "呼和浩特" }] }, { "letter": "L", "data": [{ "id": "v24", "cityName": "洛阳" }, { "id": "v20", "cityName": "拉萨" }, { "id": "v14", "cityName": "丽江" }] }, { "letter": "M", "data": [{ "id": "v13", "cityName": "眉山" }] }, { "letter": "N", "data": [{ "id": "v27", "cityName": "南京" }] }, { "letter": "S", "data": [{ "id": "v18", "cityName": "三亚" }, { "id": "v2", "cityName": "上海" }] }, { "letter": "T", "data": [{ "id": "v5", "cityName": "天津" }] }, { "letter": "W", "data": [{ "id": "v12", "cityName": "乌鲁木齐" }, { "id": "v25", "cityName": "武汉" }] }, { "letter": "X", "data": [{ "id": "v23", "cityName": "西安" }, { "id": "v28", "cityName": "香港" }, { "id": "v19", "cityName": "厦门" }] }, { "letter": "Z", "data": [{ "id": "v8", "cityName": "张家口" }] }],
@@ -23,17 +23,17 @@ Page({ @@ -23,17 +23,17 @@ Page({
23 newcity: ['北京', '上海', '广州', '深圳', '成都', '杭州'], 23 newcity: ['北京', '上海', '广州', '深圳', '成都', '杭州'],
24 // citySel: '全国', 24 // citySel: '全国',
25 locateCity: '', 25 locateCity: '',
26 - len:'' 26 + len: ''
27 }, 27 },
28 // 种类和品牌切换 28 // 种类和品牌切换
29 - selkind(){ 29 + selkind() {
30 this.setData({ 30 this.setData({
31 - kindshow:true 31 + kindshow: true
32 }) 32 })
33 }, 33 },
34 - selpinpai(){ 34 + selpinpai() {
35 this.setData({ 35 this.setData({
36 - kindshow:false 36 + kindshow: false
37 }) 37 })
38 }, 38 },
39 39
@@ -41,9 +41,9 @@ Page({ @@ -41,9 +41,9 @@ Page({
41 //点击进入商品列表 41 //点击进入商品列表
42 cityTap(e) { 42 cityTap(e) {
43 console.log(e) 43 console.log(e)
44 - let id=e.currentTarget.dataset.id; 44 + let id = e.currentTarget.dataset.id;
45 wx.navigateTo({ 45 wx.navigateTo({
46 - url: '/pages/pinpaibox/pinpaibox?pinpaiid='+id, 46 + url: '/pages/pinpaibox/pinpaibox?pinpaiid=' + id,
47 }) 47 })
48 48
49 }, 49 },
@@ -51,7 +51,7 @@ Page({ @@ -51,7 +51,7 @@ Page({
51 letterTap(e) { 51 letterTap(e) {
52 const Item = e.currentTarget.dataset.item; 52 const Item = e.currentTarget.dataset.item;
53 console.log(Item) 53 console.log(Item)
54 - if(Item=='*'){ 54 + if (Item == '*') {
55 this.setData({ 55 this.setData({
56 scrollHeight: this.data.len 56 scrollHeight: this.data.len
57 }); 57 });
@@ -59,7 +59,7 @@ Page({ @@ -59,7 +59,7 @@ Page({
59 this.setData({ 59 this.setData({
60 cityListId: Item 60 cityListId: Item
61 }); 61 });
62 - console.log("..............."+this.data.cityListId); 62 + console.log("..............." + this.data.cityListId);
63 }, 63 },
64 //调用定位 64 //调用定位
65 getLocate() { 65 getLocate() {
@@ -79,28 +79,28 @@ Page({ @@ -79,28 +79,28 @@ Page({
79 }); 79 });
80 }, 80 },
81 // 获取品牌列表 81 // 获取品牌列表
82 - getpinpailist(){ 82 + getpinpailist() {
83 let that = this 83 let that = this
84 let url = '/sundry/get_brand' 84 let url = '/sundry/get_brand'
85 let params = { 85 let params = {
86 - type:2 86 + type: 2
87 } 87 }
88 - app.postk(url,params).then((res) => { 88 + app.postk(url, params).then((res) => {
89 console.log(res) 89 console.log(res)
90 that.setData({ 90 that.setData({
91 - citylist:res.data, 91 + citylist: res.data,
92 }) 92 })
93 let len = res.data.length; 93 let len = res.data.length;
94 - len=len*542; 94 + len = len * 542;
95 this.setData({ 95 this.setData({
96 - len:len 96 + len: len
97 }) 97 })
98 }) 98 })
99 }, 99 },
100 100
101 101
102 //查看更多 102 //查看更多
103 - look_more(e){ 103 + look_more(e) {
104 let pid = e.currentTarget.dataset.id 104 let pid = e.currentTarget.dataset.id
105 let title = e.currentTarget.dataset.title 105 let title = e.currentTarget.dataset.title
106 wx.navigateTo({ 106 wx.navigateTo({
@@ -108,7 +108,7 @@ Page({ @@ -108,7 +108,7 @@ Page({
108 }) 108 })
109 }, 109 },
110 //查看商品详情 110 //查看商品详情
111 - look_detail(e){ 111 + look_detail(e) {
112 let id = e.currentTarget.dataset.id 112 let id = e.currentTarget.dataset.id
113 wx.navigateTo({ 113 wx.navigateTo({
114 url: '/pages/shop_detail/shop_detail?id=' + id 114 url: '/pages/shop_detail/shop_detail?id=' + id
@@ -116,7 +116,7 @@ Page({ @@ -116,7 +116,7 @@ Page({
116 }, 116 },
117 117
118 // 查看套餐 详情 118 // 查看套餐 详情
119 - look_detailk(e){ 119 + look_detailk(e) {
120 let id = e.currentTarget.dataset.id 120 let id = e.currentTarget.dataset.id
121 wx.navigateTo({ 121 wx.navigateTo({
122 url: '/pages/taocandetail/taocandetail?id=' + id 122 url: '/pages/taocandetail/taocandetail?id=' + id
@@ -125,16 +125,16 @@ Page({ @@ -125,16 +125,16 @@ Page({
125 //点击分类 125 //点击分类
126 click_category(e) { 126 click_category(e) {
127 let index = e.currentTarget.dataset.index 127 let index = e.currentTarget.dataset.index
128 - if(index == this.data.status){ 128 + if (index == this.data.status) {
129 return 129 return
130 } 130 }
131 this.setData({ 131 this.setData({
132 status: index, 132 status: index,
133 - taocan:false,  
134 - remain:true 133 + taocan: false,
  134 + remain: true
135 }) 135 })
136 this.setData({ 136 this.setData({
137 - page:1, 137 + page: 1,
138 // good_arr:[] 138 // good_arr:[]
139 139
140 }) 140 })
@@ -161,8 +161,8 @@ Page({ @@ -161,8 +161,8 @@ Page({
161 // } 161 // }
162 // res.msg.push(obj) 162 // res.msg.push(obj)
163 let tempArry = []; 163 let tempArry = [];
164 - for(let obj of res.data){  
165 - if(obj.child.length>0){ 164 + for (let obj of res.data) {
  165 + if (obj.child.length > 0) {
166 tempArry.push(obj) 166 tempArry.push(obj)
167 } 167 }
168 } 168 }
@@ -181,43 +181,43 @@ Page({ @@ -181,43 +181,43 @@ Page({
181 let url = '/sundry/get_category_goods' 181 let url = '/sundry/get_category_goods'
182 let params = { 182 let params = {
183 category_id: pid, 183 category_id: pid,
184 - page:that.data.page,  
185 - pageNum:6 184 + page: that.data.page,
  185 + pageNum: 6
186 } 186 }
187 app.postk(url, params).then((res) => { 187 app.postk(url, params).then((res) => {
188 wx.hideLoading() 188 wx.hideLoading()
189 this.setData({ 189 this.setData({
190 - good_arr: that.data.page == 1?res.data:that.data.good_arr.concat(res.data) 190 + good_arr: that.data.page == 1 ? res.data : that.data.good_arr.concat(res.data)
191 }) 191 })
192 }) 192 })
193 }, 193 },
194 - seltaocan(){ 194 + seltaocan() {
195 this.setData({ 195 this.setData({
196 - taocan:true,  
197 - page:1,  
198 - taocanlist:[],  
199 - status:-1,  
200 - remain:false 196 + taocan: true,
  197 + page: 1,
  198 + taocanlist: [],
  199 + status: -1,
  200 + remain: false
201 }) 201 })
202 202
203 this.gettaocan() 203 this.gettaocan()
204 }, 204 },
205 // 获取套餐 205 // 获取套餐
206 - gettaocan(){ 206 + gettaocan() {
207 wx.showLoading({ 207 wx.showLoading({
208 title: '加载中', 208 title: '加载中',
209 }) 209 })
210 let that = this 210 let that = this
211 let url = '/combo/get_list' 211 let url = '/combo/get_list'
212 let params = { 212 let params = {
213 - page:that.data.taocanpage,  
214 - pageNum:10 213 + page: that.data.taocanpage,
  214 + pageNum: 10
215 } 215 }
216 app.postk(url, params).then((res) => { 216 app.postk(url, params).then((res) => {
217 console.log(res) 217 console.log(res)
218 wx.hideLoading() 218 wx.hideLoading()
219 this.setData({ 219 this.setData({
220 - taocanlist:that.data.taocanlist.concat(res.data) 220 + taocanlist: that.data.taocanlist.concat(res.data)
221 }) 221 })
222 console.log(that.data.taocanlist) 222 console.log(that.data.taocanlist)
223 }) 223 })
@@ -249,13 +249,13 @@ Page({ @@ -249,13 +249,13 @@ Page({
249 * 生命周期函数--监听页面加载 249 * 生命周期函数--监听页面加载
250 */ 250 */
251 onLoad: function (options) { 251 onLoad: function (options) {
252 - if(options.type==1){ 252 + if (options.type == 1) {
253 this.setData({ 253 this.setData({
254 - kindshow:true 254 + kindshow: true
255 }) 255 })
256 - }else{ 256 + } else {
257 this.setData({ 257 this.setData({
258 - kindshow:false 258 + kindshow: false
259 }) 259 })
260 } 260 }
261 this.get_info(); 261 this.get_info();
@@ -304,10 +304,10 @@ Page({ @@ -304,10 +304,10 @@ Page({
304 * 页面上拉触底事件的处理函数 304 * 页面上拉触底事件的处理函数
305 */ 305 */
306 onReachBottom: function () { 306 onReachBottom: function () {
307 - let newpage=this.data.gettaocan; 307 + let newpage = this.data.gettaocan;
308 newpage++; 308 newpage++;
309 this.setData({ 309 this.setData({
310 - gettaocan:newpage 310 + gettaocan: newpage
311 }) 311 })
312 312
313 this.gettaocan() 313 this.gettaocan()
1 -  
2 <view class="pinlist"> 1 <view class="pinlist">
3 <view class="pinitem {{kindshow==true?'pinitemactive':''}}" bindtap="selkind">分类</view> 2 <view class="pinitem {{kindshow==true?'pinitemactive':''}}" bindtap="selkind">分类</view>
4 <view class="pinitem {{kindshow==false?'pinitemactive':''}}" bindtap="selpinpai">品牌</view> 3 <view class="pinitem {{kindshow==false?'pinitemactive':''}}" bindtap="selpinpai">品牌</view>
5 - </view> 4 +</view>
6 <!-- 分类 --> 5 <!-- 分类 -->
7 <view class='page' wx:if="{{kindshow}}"> 6 <view class='page' wx:if="{{kindshow}}">
8 <view class='top'> 7 <view class='top'>
@@ -17,7 +16,9 @@ @@ -17,7 +16,9 @@
17 <!-- <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}"> --> 16 <!-- <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}"> -->
18 <view class='center_child flexone'> 17 <view class='center_child flexone'>
19 <view class='left'> 18 <view class='left'>
20 - <view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}' data-id='{{item.id}}' wx:if="{{item.child.length>0}}">{{item.name}}</view> 19 + <view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}'
  20 + wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}'
  21 + data-id='{{item.id}}' wx:if="{{item.child.length>0}}">{{item.name}}</view>
21 <!-- <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> --> 22 <!-- <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> -->
22 </view> 23 </view>
23 <!-- <view class='fake_left'></view> --> 24 <!-- <view class='fake_left'></view> -->
@@ -28,10 +29,12 @@ @@ -28,10 +29,12 @@
28 <!-- wx:if="{{good_arr[index].products.length>0}}" --> 29 <!-- wx:if="{{good_arr[index].products.length>0}}" -->
29 <view class='right_item_top'> 30 <view class='right_item_top'>
30 <view class='right_left'>{{item.name}}</view> 31 <view class='right_left'>{{item.name}}</view>
31 - <text decode='{{true}}' catchtap="look_more" data-id="{{item.id}}" data-title="{{item.name}}">查看全部&ensp;&gt;</text> 32 + <text decode='{{true}}' catchtap="look_more" data-id="{{item.id}}"
  33 + data-title="{{item.name}}">查看全部&ensp;&gt;</text>
32 </view> 34 </view>
33 <view class='right_goods'> 35 <view class='right_goods'>
34 - <view class='goods' wx:for="{{item.goods}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex" data-id="{{zitem.id}}" catchtap="look_detail"> 36 + <view class='goods' wx:for="{{item.goods}}" wx:for-item="zitem" wx:for-index="zindex"
  37 + wx:key="zindex" data-id="{{zitem.id}}" catchtap="look_detail">
35 <view class='goods_img'> 38 <view class='goods_img'>
36 <image src='{{zitem.image}}'></image> 39 <image src='{{zitem.image}}'></image>
37 </view> 40 </view>
@@ -45,7 +48,8 @@ @@ -45,7 +48,8 @@
45 <view clas="nodata" wx:if="{{taocanlist.length==0}}">暂无数据</view> 48 <view clas="nodata" wx:if="{{taocanlist.length==0}}">暂无数据</view>
46 <view class="right_item" wx:else> 49 <view class="right_item" wx:else>
47 <view class='right_goods'> 50 <view class='right_goods'>
48 - <view class='goods' wx:for="{{taocanlist}}" wx:key="zindex" data-id="{{item.id}}" catchtap="look_detailk"> 51 + <view class='goods' wx:for="{{taocanlist}}" wx:key="zindex" data-id="{{item.id}}"
  52 + catchtap="look_detailk">
49 <view class='goods_img'> 53 <view class='goods_img'>
50 <image src='{{item.image}}'></image> 54 <image src='{{item.image}}'></image>
51 </view> 55 </view>
@@ -61,13 +65,15 @@ @@ -61,13 +65,15 @@
61 <!-- 品牌 --> 65 <!-- 品牌 -->
62 <view class='city_box' wx:else> 66 <view class='city_box' wx:else>
63 <view class='city_left'> 67 <view class='city_left'>
64 - <scroll-view scroll-y style='width:100%;height:100%;' scroll-with-animation scroll-into-view='{{cityListId}}' scroll-top="{{scrollHeight}}"> 68 + <scroll-view scroll-y style='width:100%;height:100%;' scroll-with-animation scroll-into-view='{{cityListId}}'
  69 + scroll-top="{{scrollHeight}}">
65 70
66 <view class='city_list_box'> 71 <view class='city_list_box'>
67 <block wx:for='{{citylist}}' wx:key='this' wx:for-item='letterItem' wx:for-index='letterIndex'> 72 <block wx:for='{{citylist}}' wx:key='this' wx:for-item='letterItem' wx:for-index='letterIndex'>
68 <view class='city_first_letter' id='{{letterItem.letter}}'>{{letterItem.letter}}</view> 73 <view class='city_first_letter' id='{{letterItem.letter}}'>{{letterItem.letter}}</view>
69 <view class="citybox"> 74 <view class="citybox">
70 - <view class='city_name' wx:for='{{letterItem.data}}' wx:key='this' data-types='list' catchtap='cityTap' data-index='{{index}}' data-val='{{item}}' data-id="{{item.id}}"> 75 + <view class='city_name' wx:for='{{letterItem.data}}' wx:key='this' data-types='list'
  76 + catchtap='cityTap' data-index='{{index}}' data-val='{{item}}' data-id="{{item.id}}">
71 <view class='goods_img'> 77 <view class='goods_img'>
72 <image src='{{item.image}}'></image> 78 <image src='{{item.image}}'></image>
73 </view> 79 </view>
@@ -79,8 +85,9 @@ @@ -79,8 +85,9 @@
79 </scroll-view> 85 </scroll-view>
80 </view> 86 </view>
81 <view class='city_right'> 87 <view class='city_right'>
82 - <scroll-view scroll-y style='width:100%;height:100%;' scroll-with-animation >  
83 - <text class='letter_item' wx:for='{{letter}}' wx:key='this' catchtap='letterTap' data-item='{{item}}'>{{item}}</text> 88 + <scroll-view scroll-y style='width:100%;height:100%;' scroll-with-animation>
  89 + <text class='letter_item' wx:for='{{letter}}' wx:key='this' catchtap='letterTap'
  90 + data-item='{{item}}'>{{item}}</text>
84 </scroll-view> 91 </scroll-view>
85 </view> 92 </view>
86 </view> 93 </view>
@@ -98,7 +98,7 @@ Page({ @@ -98,7 +98,7 @@ Page({
98 wx.navigateTo({ 98 wx.navigateTo({
99 url: '/pages/register/register', 99 url: '/pages/register/register',
100 }) 100 })
101 - } else if (res.cancel) {} 101 + } else if (res.cancel) { }
102 } 102 }
103 }) 103 })
104 return false 104 return false
@@ -110,18 +110,18 @@ Page({ @@ -110,18 +110,18 @@ Page({
110 onPageScroll(e) { 110 onPageScroll(e) {
111 let t = this; 111 let t = this;
112 console.log(e) 112 console.log(e)
113 - wx.createSelectorQuery().select('#tuijianTop').boundingClientRect(function(rect){ 113 + wx.createSelectorQuery().select('#tuijianTop').boundingClientRect(function (rect) {
114 console.log(rect) 114 console.log(rect)
115 - if(rect.top < 60) { 115 + if (rect.top < 60) {
116 t.setData({ 116 t.setData({
117 stick: 1 117 stick: 1
118 }) 118 })
119 - }else { 119 + } else {
120 t.setData({ 120 t.setData({
121 stick: 0 121 stick: 0
122 }) 122 })
123 } 123 }
124 -}).exec() 124 + }).exec()
125 }, 125 },
126 // 公告详情 126 // 公告详情
127 noticedetail(e) { 127 noticedetail(e) {
@@ -136,8 +136,10 @@ Page({ @@ -136,8 +136,10 @@ Page({
136 wx.setStorageSync('entrance_type', '1') 136 wx.setStorageSync('entrance_type', '1')
137 let token = wx.getStorageSync('token'); 137 let token = wx.getStorageSync('token');
138 let login = wx.getStorageSync('login') 138 let login = wx.getStorageSync('login')
  139 + let sq = wx.getStorageSync('sq')
139 console.log(token) 140 console.log(token)
140 - if (token == '') { 141 +
  142 + if (token == ''||sq==2) {
141 // wx.showToast({ 143 // wx.showToast({
142 // title: '请登录后操作', 144 // title: '请登录后操作',
143 // icon: 'none', 145 // icon: 'none',
@@ -149,7 +151,7 @@ Page({ @@ -149,7 +151,7 @@ Page({
149 }) 151 })
150 // }, 1000) 152 // }, 1000)
151 } else { 153 } else {
152 - if(login==1){ 154 + if (login == 1) {
153 // wx.showLoading({ 155 // wx.showLoading({
154 // title: '模块加载中', 156 // title: '模块加载中',
155 // }) 157 // })
@@ -159,7 +161,7 @@ Page({ @@ -159,7 +161,7 @@ Page({
159 }) 161 })
160 // },1000) 162 // },1000)
161 163
162 - }else{ 164 + } else {
163 // wx.showLoading({ 165 // wx.showLoading({
164 // title: '加载中', 166 // title: '加载中',
165 // duration: 1200 167 // duration: 1200
@@ -179,8 +181,10 @@ Page({ @@ -179,8 +181,10 @@ Page({
179 wx.setStorageSync('entrance_type', '2') 181 wx.setStorageSync('entrance_type', '2')
180 let token = wx.getStorageSync('token'); 182 let token = wx.getStorageSync('token');
181 let gh_login = wx.getStorageSync('gh_login'); 183 let gh_login = wx.getStorageSync('gh_login');
  184 + let sq = wx.getStorageSync('gh_sq')
182 console.log(token) 185 console.log(token)
183 - if (token == '') { 186 + console.log(sq)
  187 + if (token == ''||sq == 2) {
184 // wx.showLoading({ 188 // wx.showLoading({
185 // title: '模块加载中', 189 // title: '模块加载中',
186 // }) 190 // })
@@ -190,7 +194,7 @@ Page({ @@ -190,7 +194,7 @@ Page({
190 }) 194 })
191 // }, 1000) 195 // }, 1000)
192 } else { 196 } else {
193 - if(gh_login==1){ 197 + if (gh_login == 1) {
194 // wx.showLoading({ 198 // wx.showLoading({
195 // title: '模块加载中', 199 // title: '模块加载中',
196 // }) 200 // })
@@ -203,7 +207,7 @@ Page({ @@ -203,7 +207,7 @@ Page({
203 url: '/packageA/pages/index/index', 207 url: '/packageA/pages/index/index',
204 }) 208 })
205 // },1000) 209 // },1000)
206 - }else{ 210 + } else {
207 // wx.showLoading({ 211 // wx.showLoading({
208 // title: '加载中', 212 // title: '加载中',
209 // mask: true 213 // mask: true
@@ -218,6 +222,50 @@ Page({ @@ -218,6 +222,50 @@ Page({
218 222
219 } 223 }
220 }, 224 },
  225 + // 进入办公采办
  226 + canban() {
  227 + wx.setStorageSync('entrance_type', '3')
  228 + let token = wx.getStorageSync('token');
  229 + let cb_login = wx.getStorageSync('cb_login');
  230 + let sq = wx.getStorageSync('cb_sq')
  231 + console.log(token)
  232 + if (token == ''||sq==2) {
  233 + // wx.showLoading({
  234 + // title: '模块加载中',
  235 + // })
  236 + // setTimeout(function () {
  237 + wx.navigateTo({
  238 + url: '/pages/register/register',
  239 + })
  240 + // }, 1000)
  241 + } else {
  242 + if (cb_login == 1) {
  243 + // wx.showLoading({
  244 + // title: '模块加载中',
  245 + // })
  246 + // setTimeout(()=>{
  247 + // wx.showLoading({
  248 + // title: '加载中',
  249 + // duration: 1200
  250 + // })
  251 + wx.navigateTo({
  252 + url: '/packageA/pages/index/index',
  253 + })
  254 + // },1000)
  255 + } else {
  256 + // wx.showLoading({
  257 + // title: '加载中',
  258 + // mask: true
  259 + // })
  260 + // setTimeout(()=>{
  261 + wx.navigateTo({
  262 + url: '/pages/login/login',
  263 + })
  264 + // },1000)
  265 + }
  266 +
  267 + }
  268 + },
221 269
222 // 进入差旅 270 // 进入差旅
223 chailv() { 271 chailv() {
@@ -261,7 +309,7 @@ Page({ @@ -261,7 +309,7 @@ Page({
261 } else { 309 } else {
262 console.log(e) 310 console.log(e)
263 wx.navigateTo({ 311 wx.navigateTo({
264 - url: '/pages/birthday/birthday?type='+e.currentTarget.id, 312 + url: '/pages/birthday/birthday?type=' + e.currentTarget.id,
265 }) 313 })
266 314
267 } 315 }
@@ -359,9 +407,9 @@ Page({ @@ -359,9 +407,9 @@ Page({
359 this.setData({ 407 this.setData({
360 shop_arr: res.data 408 shop_arr: res.data
361 }) 409 })
362 - if(res.data.length==0){ 410 + if (res.data.length == 0) {
363 this.setData({ 411 this.setData({
364 - stick:0 412 + stick: 0
365 }) 413 })
366 } 414 }
367 } 415 }
@@ -399,7 +447,7 @@ Page({ @@ -399,7 +447,7 @@ Page({
399 wx.navigateTo({ 447 wx.navigateTo({
400 url: '/pages/register/register', 448 url: '/pages/register/register',
401 }) 449 })
402 - } else if (res.cancel) {} 450 + } else if (res.cancel) { }
403 } 451 }
404 }) 452 })
405 } else { 453 } else {
@@ -428,7 +476,7 @@ Page({ @@ -428,7 +476,7 @@ Page({
428 476
429 477
430 478
431 - }).catch((err) => {}) 479 + }).catch((err) => { })
432 }, 480 },
433 481
434 // 限时抢购 482 // 限时抢购
@@ -460,7 +508,7 @@ Page({ @@ -460,7 +508,7 @@ Page({
460 508
461 // console.log(that.data.messagelist) 509 // console.log(that.data.messagelist)
462 510
463 - }).catch((err) => {}) 511 + }).catch((err) => { })
464 }, 512 },
465 513
466 date_format(micro_second) { 514 date_format(micro_second) {
@@ -526,7 +574,7 @@ Page({ @@ -526,7 +574,7 @@ Page({
526 574
527 // console.log(that.data.messagelist) 575 // console.log(that.data.messagelist)
528 576
529 - }).catch((err) => {}) 577 + }).catch((err) => { })
530 }, 578 },
531 579
532 // 活动专区查看更多 580 // 活动专区查看更多
@@ -542,7 +590,7 @@ Page({ @@ -542,7 +590,7 @@ Page({
542 wx.navigateTo({ 590 wx.navigateTo({
543 url: '/pages/register/register', 591 url: '/pages/register/register',
544 }) 592 })
545 - } else if (res.cancel) {} 593 + } else if (res.cancel) { }
546 } 594 }
547 }) 595 })
548 } else { 596 } else {
@@ -586,7 +634,7 @@ Page({ @@ -586,7 +634,7 @@ Page({
586 }) 634 })
587 635
588 636
589 - }).catch((err) => {}) 637 + }).catch((err) => { })
590 }, 638 },
591 more() { 639 more() {
592 let token = wx.getStorageSync("token") 640 let token = wx.getStorageSync("token")
@@ -599,7 +647,7 @@ Page({ @@ -599,7 +647,7 @@ Page({
599 wx.navigateTo({ 647 wx.navigateTo({
600 url: '/pages/register/register', 648 url: '/pages/register/register',
601 }) 649 })
602 - } else if (res.cancel) {} 650 + } else if (res.cancel) { }
603 } 651 }
604 }) 652 })
605 653
@@ -628,7 +676,7 @@ Page({ @@ -628,7 +676,7 @@ Page({
628 wx.navigateTo({ 676 wx.navigateTo({
629 url: '/pages/register/register', 677 url: '/pages/register/register',
630 }) 678 })
631 - } else if (res.cancel) {} 679 + } else if (res.cancel) { }
632 } 680 }
633 }) 681 })
634 } else { 682 } else {
@@ -790,30 +838,30 @@ Page({ @@ -790,30 +838,30 @@ Page({
790 seltui: index, 838 seltui: index,
791 839
792 }) 840 })
793 - if(index==0){ 841 + if (index == 0) {
794 842
795 - if(this.data.stick==1){ 843 + if (this.data.stick == 1) {
796 wx.pageScrollTo({ 844 wx.pageScrollTo({
797 duration: 3, 845 duration: 3,
798 scrollTop: 850, 846 scrollTop: 850,
799 - success: (res) => {},  
800 - fail: (res) => {},  
801 - complete: (res) => {}, 847 + success: (res) => { },
  848 + fail: (res) => { },
  849 + complete: (res) => { },
802 }) 850 })
803 } 851 }
804 this.getyouzhi() 852 this.getyouzhi()
805 - }else{ 853 + } else {
806 this.setData({ 854 this.setData({
807 isyouzhi: 1 855 isyouzhi: 1
808 }) 856 })
809 this.getgoodlist() 857 this.getgoodlist()
810 - if(this.data.stick==1){ 858 + if (this.data.stick == 1) {
811 wx.pageScrollTo({ 859 wx.pageScrollTo({
812 duration: 3, 860 duration: 3,
813 scrollTop: 700, 861 scrollTop: 700,
814 - success: (res) => {},  
815 - fail: (res) => {},  
816 - complete: (res) => {}, 862 + success: (res) => { },
  863 + fail: (res) => { },
  864 + complete: (res) => { },
817 }) 865 })
818 } 866 }
819 } 867 }
@@ -837,7 +885,7 @@ Page({ @@ -837,7 +885,7 @@ Page({
837 } 885 }
838 app.postk(url, param).then((res) => { 886 app.postk(url, param).then((res) => {
839 wx.hideLoading({ 887 wx.hideLoading({
840 - success: (res) => {}, 888 + success: (res) => { },
841 }) 889 })
842 if (that.data.page > 1) { 890 if (that.data.page > 1) {
843 if (res.data.length == 0) { 891 if (res.data.length == 0) {
@@ -854,10 +902,10 @@ Page({ @@ -854,10 +902,10 @@ Page({
854 this.setData({ 902 this.setData({
855 shop_arr: res.data, 903 shop_arr: res.data,
856 }) 904 })
857 - if(res.data.length==0){ 905 + if (res.data.length == 0) {
858 this.setData({ 906 this.setData({
859 shop_arr: res.data, 907 shop_arr: res.data,
860 - stick:0 908 + stick: 0
861 }) 909 })
862 } 910 }
863 } 911 }
@@ -1041,7 +1089,7 @@ Page({ @@ -1041,7 +1089,7 @@ Page({
1041 } 1089 }
1042 1090
1043 1091
1044 - }).catch((err) => {}) 1092 + }).catch((err) => { })
1045 }, 1093 },
1046 // 获取个人信息 1094 // 获取个人信息
1047 1095
@@ -38,9 +38,11 @@ @@ -38,9 +38,11 @@
38 <view class="tuoyuan"> 38 <view class="tuoyuan">
39 <image src="/images/tuoyuan.png"></image> 39 <image src="/images/tuoyuan.png"></image>
40 <view class="lunbo_box {{nav_index==0?'boxactive':''}}"> 40 <view class="lunbo_box {{nav_index==0?'boxactive':''}}">
41 - <swiper interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" current='{{current}}' bindchange='swiperChange' autoplay="{{autoplay}}" class='swiper_box'> 41 + <swiper interval="{{interval}}" duration="{{duration}}" circular="{{circular}}"
  42 + current='{{current}}' bindchange='swiperChange' autoplay="{{autoplay}}" class='swiper_box'>
42 <swiper-item class='swiper-item' wx:for="{{imgurl}}" wx:key="index"> 43 <swiper-item class='swiper-item' wx:for="{{imgurl}}" wx:key="index">
43 - <image src='{{item.image}}' mode="aspectFill" data-id="{{item.goods_id}}" data-style="{{item.type}}" data-src="{{item.url}}" catchtap="look_more" /> 44 + <image src='{{item.image}}' mode="aspectFill" data-id="{{item.goods_id}}"
  45 + data-style="{{item.type}}" data-src="{{item.url}}" catchtap="look_more" />
44 </swiper-item> 46 </swiper-item>
45 </swiper> 47 </swiper>
46 <view class="dots"> 48 <view class="dots">
@@ -77,12 +79,15 @@ @@ -77,12 +79,15 @@
77 <view class="fenleiitem" bindtap="gonghui"> 79 <view class="fenleiitem" bindtap="gonghui">
78 <image src="/images/img_laobao2.png" mode="widthFix"></image> 80 <image src="/images/img_laobao2.png" mode="widthFix"></image>
79 </view> 81 </view>
  82 + <view class="fenleiitem" bindtap="canban">
  83 + <image src="/images/img_laobao-1@2x.png" mode="widthFix"></image>
  84 + </view>
80 <view class="fenleiitem" bindtap="birthday" id="1"> 85 <view class="fenleiitem" bindtap="birthday" id="1">
81 - <image src="/images/img_laobao3.png" mode="widthFix"></image> 86 + <image src="/images/img_laobao3@2x.png" mode="widthFix"></image>
82 </view> 87 </view>
83 - <view class="fenleiitem" bindtap="birthday" id="2"> 88 + <!-- <view class="fenleiitem" bindtap="birthday" id="2">
84 <image src="/images/img_laobao4.png" mode="widthFix"></image> 89 <image src="/images/img_laobao4.png" mode="widthFix"></image>
85 - </view> 90 + </view> -->
86 </view> 91 </view>
87 <!-- 新品上线 --> 92 <!-- 新品上线 -->
88 <view class="huo"> 93 <view class="huo">
@@ -107,7 +112,8 @@ @@ -107,7 +112,8 @@
107 <view class="newgoodleft" bindtap="seeactive" data-id="{{activity[1].id}}"> 112 <view class="newgoodleft" bindtap="seeactive" data-id="{{activity[1].id}}">
108 <view class="newgoodlefttop"> 113 <view class="newgoodlefttop">
109 <view class="newtitle" style="color:{{activity[1].name_color}}">{{activity[1].name}}</view> 114 <view class="newtitle" style="color:{{activity[1].name_color}}">{{activity[1].name}}</view>
110 - <view class="youxuan" style="background:{{activity[1].label_color}}">{{activity[1].label}}</view> 115 + <view class="youxuan" style="background:{{activity[1].label_color}}">{{activity[1].label}}
  116 + </view>
111 </view> 117 </view>
112 <view class="jiesuo" style="color:{{activity[1].describe_color}}">{{activity[1].describe}}</view> 118 <view class="jiesuo" style="color:{{activity[1].describe_color}}">{{activity[1].describe}}</view>
113 <view class="newgoodlist"> 119 <view class="newgoodlist">
@@ -213,14 +219,16 @@ @@ -213,14 +219,16 @@
213 </view> 219 </view>
214 </view> --> 220 </view> -->
215 <!-- 品牌推荐列表 --> 221 <!-- 品牌推荐列表 -->
216 - <view class="tuijianlist flexone fixedactive" wx:if='{{stick==1}}' >  
217 - <view class="tuijianlistitem " wx:for="{{nav_arr}}" wx:key="index" bindtap="select_nav" data-index="{{index}}" data-id="{{item.id}}"> 222 + <view class="tuijianlist flexone fixedactive" wx:if='{{stick==1}}'>
  223 + <view class="tuijianlistitem " wx:for="{{nav_arr}}" wx:key="index" bindtap="select_nav"
  224 + data-index="{{index}}" data-id="{{item.id}}">
218 <view class="tuijianitemname {{seltui==index?'tuiactive':''}}">{{item.name}}</view> 225 <view class="tuijianitemname {{seltui==index?'tuiactive':''}}">{{item.name}}</view>
219 <view class="tuijiandes {{seltui==index?'tuiactive':''}}">{{item.description}}</view> 226 <view class="tuijiandes {{seltui==index?'tuiactive':''}}">{{item.description}}</view>
220 </view> 227 </view>
221 </view> 228 </view>
222 <view class="tuijianlist flexone" id="tuijianTop"> 229 <view class="tuijianlist flexone" id="tuijianTop">
223 - <view class="tuijianlistitem " wx:for="{{nav_arr}}" wx:key="index" bindtap="select_nav" data-index="{{index}}" data-id="{{item.id}}"> 230 + <view class="tuijianlistitem " wx:for="{{nav_arr}}" wx:key="index" bindtap="select_nav"
  231 + data-index="{{index}}" data-id="{{item.id}}">
224 <view class="tuijianitemname {{seltui==index?'tuiactive':''}}">{{item.name}}</view> 232 <view class="tuijianitemname {{seltui==index?'tuiactive':''}}">{{item.name}}</view>
225 <view class="tuijiandes {{seltui==index?'tuiactive':''}}">{{item.description}}</view> 233 <view class="tuijiandes {{seltui==index?'tuiactive':''}}">{{item.description}}</view>
226 </view> 234 </view>
@@ -18,7 +18,7 @@ Page({ @@ -18,7 +18,7 @@ Page({
18 /** 18 /**
19 * 生命周期函数--监听页面加载 19 * 生命周期函数--监听页面加载
20 */ 20 */
21 - onLoad: function(options) { 21 + onLoad: function (options) {
22 22
23 }, 23 },
24 24
@@ -37,7 +37,7 @@ Page({ @@ -37,7 +37,7 @@ Page({
37 }, 37 },
38 38
39 // 获取验证码 39 // 获取验证码
40 - getCodeFun: function() { 40 + getCodeFun: function () {
41 let t = this; 41 let t = this;
42 let AuglyTest_phone = /^1(3|4|5|6|7|8|9)\d{9}$/; 42 let AuglyTest_phone = /^1(3|4|5|6|7|8|9)\d{9}$/;
43 if (t.data.mobile == "") { 43 if (t.data.mobile == "") {
@@ -64,7 +64,7 @@ Page({ @@ -64,7 +64,7 @@ Page({
64 a.post(url, data, "POST").then((r) => { 64 a.post(url, data, "POST").then((r) => {
65 if (r.code == "200") { 65 if (r.code == "200") {
66 var num = 60; 66 var num = 60;
67 - var timer = setInterval(function() { 67 + var timer = setInterval(function () {
68 num--; 68 num--;
69 if (num <= 0) { 69 if (num <= 0) {
70 clearInterval(timer); 70 clearInterval(timer);
@@ -82,7 +82,7 @@ Page({ @@ -82,7 +82,7 @@ Page({
82 }, 1000); 82 }, 1000);
83 } 83 }
84 84
85 - }).catch((err) => {}) 85 + }).catch((err) => { })
86 } 86 }
87 87
88 }, 88 },
@@ -133,9 +133,15 @@ Page({ @@ -133,9 +133,15 @@ Page({
133 } 133 }
134 a.post(u, d).then((r) => { 134 a.post(u, d).then((r) => {
135 if (r.code == 200) { 135 if (r.code == 200) {
136 - a.globalData.index=0 136 + a.globalData.index = 0
137 let type = wx.getStorageSync('entrance_type'); 137 let type = wx.getStorageSync('entrance_type');
138 - type == '1'?wx.setStorageSync('login', 1):wx.setStorageSync('gh_login', 1) 138 + if (type == '1') {
  139 + wx.setStorageSync('login', 1)
  140 + } else if (type == '2') {
  141 + wx.setStorageSync('gh_login', 1)
  142 + } else if (type == '3') {
  143 + wx.setStorageSync('cb_login', 1)
  144 + }
139 wx.showToast({ 145 wx.showToast({
140 title: '登录成功', 146 title: '登录成功',
141 duration: 1000, 147 duration: 1000,
@@ -148,55 +154,55 @@ Page({ @@ -148,55 +154,55 @@ Page({
148 } 154 }
149 }) 155 })
150 } 156 }
151 - }).catch((er) => {}) 157 + }).catch((er) => { })
152 }, 158 },
153 159
154 /** 160 /**
155 * 生命周期函数--监听页面初次渲染完成 161 * 生命周期函数--监听页面初次渲染完成
156 */ 162 */
157 - onReady: function() { 163 + onReady: function () {
158 164
159 }, 165 },
160 166
161 /** 167 /**
162 * 生命周期函数--监听页面显示 168 * 生命周期函数--监听页面显示
163 */ 169 */
164 - onShow: function() { 170 + onShow: function () {
165 171
166 }, 172 },
167 173
168 /** 174 /**
169 * 生命周期函数--监听页面隐藏 175 * 生命周期函数--监听页面隐藏
170 */ 176 */
171 - onHide: function() { 177 + onHide: function () {
172 178
173 }, 179 },
174 180
175 /** 181 /**
176 * 生命周期函数--监听页面卸载 182 * 生命周期函数--监听页面卸载
177 */ 183 */
178 - onUnload: function() { 184 + onUnload: function () {
179 185
180 }, 186 },
181 187
182 /** 188 /**
183 * 页面相关事件处理函数--监听用户下拉动作 189 * 页面相关事件处理函数--监听用户下拉动作
184 */ 190 */
185 - onPullDownRefresh: function() { 191 + onPullDownRefresh: function () {
186 192
187 }, 193 },
188 194
189 /** 195 /**
190 * 页面上拉触底事件的处理函数 196 * 页面上拉触底事件的处理函数
191 */ 197 */
192 - onReachBottom: function() { 198 + onReachBottom: function () {
193 199
194 }, 200 },
195 201
196 /** 202 /**
197 * 用户点击右上角分享 203 * 用户点击右上角分享
198 */ 204 */
199 - onShareAppMessage: function() { 205 + onShareAppMessage: function () {
200 206
201 } 207 }
202 }) 208 })
@@ -2,13 +2,13 @@ @@ -2,13 +2,13 @@
2 <view class="contaniter"> 2 <view class="contaniter">
3 <view class="title">登录</view> 3 <view class="title">登录</view>
4 <view class="item"> 4 <view class="item">
5 - <input placeholder="会员编号" maxlength="11" value="{{vipNum}}" bindinput="get_vipNum" class="mobile"/> 5 + <input placeholder="会员编号" maxlength="11" value="{{vipNum}}" bindinput="get_vipNum" class="mobile" />
6 </view> 6 </view>
7 <view class="item"> 7 <view class="item">
8 - <input placeholder="手机号" maxlength="11" type="number" value="{{mobile}}" bindinput="get_tel" class="mobile"/> 8 + <input placeholder="手机号" maxlength="11" type="number" value="{{mobile}}" bindinput="get_tel" class="mobile" />
9 </view> 9 </view>
10 <view class="item" style="margin-top: 24rpx;"> 10 <view class="item" style="margin-top: 24rpx;">
11 - <input placeholder="请输入验证码" maxlength="11" type="number" value="{{code}}" bindinput="get_code" class="code"/> 11 + <input placeholder="请输入验证码" maxlength="11" type="number" value="{{code}}" bindinput="get_code" class="code" />
12 <view class="get_code" bindtap='getCodeFun' wx:if="{{yes}}">获取验证码</view> 12 <view class="get_code" bindtap='getCodeFun' wx:if="{{yes}}">获取验证码</view>
13 <view class="get_code" wx:else>{{getCode}}</view> 13 <view class="get_code" wx:else>{{getCode}}</view>
14 </view> 14 </view>
@@ -72,7 +72,7 @@ Page({ @@ -72,7 +72,7 @@ Page({
72 }).catch((err) => { 72 }).catch((err) => {
73 if(err.msg=='用户未登录'){ 73 if(err.msg=='用户未登录'){
74 setTimeout(function(){ 74 setTimeout(function(){
75 - wx.reLaunch({ 75 + wx.navigateTo({
76 url: '/pages/register/register', 76 url: '/pages/register/register',
77 }) 77 })
78 },1500) 78 },1500)
@@ -329,6 +329,7 @@ Page({ @@ -329,6 +329,7 @@ Page({
329 no_login: false 329 no_login: false
330 }) 330 })
331 t.getInfoFun() 331 t.getInfoFun()
  332 +
332 } else { 333 } else {
333 t.setData({ 334 t.setData({
334 no_login: true 335 no_login: true
@@ -13,49 +13,51 @@ Page({ @@ -13,49 +13,51 @@ Page({
13 area: '', 13 area: '',
14 address: '', 14 address: '',
15 cover_type: false, 15 cover_type: false,
16 - total:'',  
17 - info:{  
18 - address:{  
19 - address:'',  
20 - area:'',  
21 - id:'',  
22 - tel:'',  
23 - name:'',  
24 - goods:[]  
25 - } 16 + total: '',
  17 + info: {
  18 + address: {
  19 + address: '',
  20 + area: '',
  21 + id: '',
  22 + tel: '',
  23 + name: '',
  24 + goods: []
26 }, 25 },
27 - totalnum:'',  
28 - datak:1,  
29 - car_ids:[],  
30 - user_ticket_id2:'',  
31 - user_ticket_id1:'',  
32 - coupon:'',  
33 - couponone:'',  
34 - nouse:'',  
35 - obj:'',  
36 - type:0,  
37 - combo_id:'',  
38 - entrance_type:'' 26 + goods: {}
  27 + },
  28 + totalnum: '',
  29 + datak: 1,
  30 + car_ids: [],
  31 + user_ticket_id2: '',
  32 + user_ticket_id1: '',
  33 + coupon: '',
  34 + couponone: '',
  35 + nouse: '',
  36 + obj: '',
  37 + type: 0,
  38 + combo_id: '',
  39 + entrance_type: '',
  40 + copyaddress: '',
39 }, 41 },
40 42
41 // 选择优惠券 43 // 选择优惠券
42 - selectcoupon(e){  
43 - let goods=this.data.info.goods; 44 + selectcoupon(e) {
  45 + let goods = this.data.info.goods;
44 console.log(goods) 46 console.log(goods)
45 - let arr=[]  
46 - goods.forEach(function(value,index,array){ 47 + let arr = []
  48 + goods.forEach(function (value, index, array) {
47 arr.push(value.id) 49 arr.push(value.id)
48 }) 50 })
49 - let couponid=e.currentTarget.dataset.id; 51 + let couponid = e.currentTarget.dataset.id;
50 console.log(couponid) 52 console.log(couponid)
51 wx.navigateTo({ 53 wx.navigateTo({
52 - url: '/pages/lingqucoupon/lingqucoupon?type='+couponid+'&total='+this.data.info.real_total +'&goods_ids='+JSON.stringify(arr) 54 + url: '/pages/lingqucoupon/lingqucoupon?type=' + couponid + '&total=' + this.data.info.real_total + '&goods_ids=' + JSON.stringify(arr)
53 }) 55 })
54 }, 56 },
55 // 领取优惠券 57 // 领取优惠券
56 - lingqucoupon(){ 58 + lingqucoupon() {
57 wx.navigateTo({ 59 wx.navigateTo({
58 - url:'/pages/coupon/coupon?type='+2 60 + url: '/pages/coupon/coupon?type=' + 2
59 }) 61 })
60 }, 62 },
61 //加减商品数量 63 //加减商品数量
@@ -96,7 +98,7 @@ Page({ @@ -96,7 +98,7 @@ Page({
96 for (let obj of coudan_arr) { 98 for (let obj of coudan_arr) {
97 console.log(obj) 99 console.log(obj)
98 console.log(obj.price2) 100 console.log(obj.price2)
99 - if (obj.price2!= null) { 101 + if (obj.price2 != null) {
100 console.log(111) 102 console.log(111)
101 choudan_money = (obj.price2 * 100 * obj.num) / 100 + choudan_money 103 choudan_money = (obj.price2 * 100 * obj.num) / 100 + choudan_money
102 } else { 104 } else {
@@ -107,7 +109,7 @@ Page({ @@ -107,7 +109,7 @@ Page({
107 console.log(typeof (choudan_money)) 109 console.log(typeof (choudan_money))
108 console.log(choudan_money) 110 console.log(choudan_money)
109 this.setData({ 111 this.setData({
110 - choudan_money: choudan_money*100 112 + choudan_money: choudan_money * 100
111 // choudan_money: Math.floor(choudan_money* 100) / 100 113 // choudan_money: Math.floor(choudan_money* 100) / 100
112 }) 114 })
113 }, 115 },
@@ -171,7 +173,7 @@ Page({ @@ -171,7 +173,7 @@ Page({
171 id: id, 173 id: id,
172 num: num, 174 num: num,
173 price: Number(price), 175 price: Number(price),
174 - price2:Number(price2) 176 + price2: Number(price2)
175 }) 177 })
176 } 178 }
177 that.setData({ 179 that.setData({
@@ -182,10 +184,10 @@ Page({ @@ -182,10 +184,10 @@ Page({
182 that.get_choudan() 184 that.get_choudan()
183 }, 185 },
184 //获取页面信息 186 //获取页面信息
185 - get_info(combo_id,data,address_id,user_ticket_id1,user_ticket_id2) { 187 + get_info(combo_id, data, address_id, user_ticket_id1, user_ticket_id2) {
186 let that = this 188 let that = this
187 - let url = that.data.type == 4 ? app.interface.prev_pay : that.data.type == 3?app.interface.now_prev_pay:'/order/affirm';  
188 - if(that.data.type == 3 || that.data.type == 4){ 189 + let url = that.data.type == 4 ? app.interface.prev_pay : that.data.type == 3 ? app.interface.now_prev_pay : '/order/affirm';
  190 + if (that.data.type == 3 || that.data.type == 4) {
189 let params = { 191 let params = {
190 info: that.data.params, 192 info: that.data.params,
191 address_id: address_id 193 address_id: address_id
@@ -199,44 +201,57 @@ Page({ @@ -199,44 +201,57 @@ Page({
199 201
200 that.setData({ 202 that.setData({
201 info: res.msg, 203 info: res.msg,
202 - total:total 204 + total: total
203 205
204 }) 206 })
205 207
206 console.log('9988756', that.data.info) 208 console.log('9988756', that.data.info)
207 209
208 }) 210 })
209 - }else{ 211 + } else {
210 let params = { 212 let params = {
211 - combo_id:combo_id,  
212 - data:data,  
213 - address_id:address_id,  
214 - user_ticket_id1:user_ticket_id1,  
215 - user_ticket_id2:user_ticket_id2 213 + combo_id: combo_id,
  214 + data: data,
  215 + address_id: address_id,
  216 + user_ticket_id1: user_ticket_id1,
  217 + user_ticket_id2: user_ticket_id2
216 } 218 }
217 app.postk(url, params).then((res) => { 219 app.postk(url, params).then((res) => {
218 console.log('99999', res, Number(res.data.total)) 220 console.log('99999', res, Number(res.data.total))
219 - let coupon=wx.getStorageSync('coupon');  
220 - if(coupon!=''){ 221 + let coupon = wx.getStorageSync('coupon');
  222 + if (coupon != '') {
221 this.setData({ 223 this.setData({
222 - coupon:wx.getStorageSync('coupon') 224 + coupon: wx.getStorageSync('coupon')
223 }) 225 })
224 } 226 }
225 - let couponone=wx.getStorageSync('couponone');  
226 - if(couponone!=''){ 227 + let couponone = wx.getStorageSync('couponone');
  228 + if (couponone != '') {
227 this.setData({ 229 this.setData({
228 - couponone:wx.getStorageSync('couponone') 230 + couponone: wx.getStorageSync('couponone')
229 }) 231 })
230 } 232 }
231 console.log(this.data.couponone) 233 console.log(this.data.couponone)
232 - res.data.total = Number(res.data.total * 100)/100  
233 - res.data.freight = Number(res.data.freight * 100)/100  
234 - res.data.sum_goods_total= Number(res.data.sum_goods_total * 100)/100 234 + res.data.total = Number(res.data.total * 100) / 100
  235 + res.data.freight = Number(res.data.freight * 100) / 100
  236 + res.data.sum_goods_total = Number(res.data.sum_goods_total * 100) / 100
235 // let total = (res.msg.total + res.data.yunfei).toFixed("1"); 237 // let total = (res.msg.total + res.data.yunfei).toFixed("1");
  238 + console.log(res.data)
236 that.setData({ 239 that.setData({
237 info: res.data, 240 info: res.data,
238 - totalnum:res.data.goods.length 241 + totalnum: res.data.goods.length,
239 }) 242 })
  243 + let info = that.data.info
  244 + console.log(info)
  245 + info.address = {}
  246 + info.address.address = that.data.copyaddress.address
  247 + info.address.area = that.data.copyaddress.area
  248 + info.address.id = that.data.copyaddress.id
  249 + info.address.tel = that.data.copyaddress.tel
  250 + info.address.name = that.data.copyaddress.name
  251 + that.setData({
  252 + info
  253 + })
  254 + console.log(info)
240 console.log('9988756', that.data.info.goods) 255 console.log('9988756', that.data.info.goods)
241 }).catch(function (err) { 256 }).catch(function (err) {
242 console.log(err); 257 console.log(err);
@@ -270,34 +285,34 @@ Page({ @@ -270,34 +285,34 @@ Page({
270 285
271 // }) 286 // })
272 // }, 287 // },
273 - get_info1(combo_id,data,address_id,user_ticket_id1,user_ticket_id2) { 288 + get_info1(combo_id, data, address_id, user_ticket_id1, user_ticket_id2) {
274 let that = this 289 let that = this
275 // let url='/order/affirm' 290 // let url='/order/affirm'
276 // 判断进入入口 291 // 判断进入入口
277 292
278 let url = type == 3 ? app.interface.now_prev_pay : app.interface.prev_pay 293 let url = type == 3 ? app.interface.now_prev_pay : app.interface.prev_pay
279 let params = { 294 let params = {
280 - combo_id:combo_id,  
281 - data:data,  
282 - address_id:address_id,  
283 - user_ticket_id1:user_ticket_id1,  
284 - user_ticket_id2:user_ticket_id2, 295 + combo_id: combo_id,
  296 + data: data,
  297 + address_id: address_id,
  298 + user_ticket_id1: user_ticket_id1,
  299 + user_ticket_id2: user_ticket_id2,
285 } 300 }
286 app.postk(url, params).then((res) => { 301 app.postk(url, params).then((res) => {
287 - let couponone=wx.getStorageSync('couponone');  
288 - if(couponone!=''){ 302 + let couponone = wx.getStorageSync('couponone');
  303 + if (couponone != '') {
289 this.setData({ 304 this.setData({
290 - couponone:wx.getStorageSync('couponone') 305 + couponone: wx.getStorageSync('couponone')
291 }) 306 })
292 } 307 }
293 console.log(this.data.couponone) 308 console.log(this.data.couponone)
294 - res.data.total = Number(res.data.total * 100)/100  
295 - res.data.freight = Number(res.data.freight * 100)/100  
296 - res.data.sum_goods_total= Number(res.data.sum_goods_total * 100)/100 309 + res.data.total = Number(res.data.total * 100) / 100
  310 + res.data.freight = Number(res.data.freight * 100) / 100
  311 + res.data.sum_goods_total = Number(res.data.sum_goods_total * 100) / 100
297 // let total = (res.msg.total + res.data.yunfei).toFixed("1"); 312 // let total = (res.msg.total + res.data.yunfei).toFixed("1");
298 that.setData({ 313 that.setData({
299 info: res.data, 314 info: res.data,
300 - totalnum:res.data.goods.length 315 + totalnum: res.data.goods.length
301 }) 316 })
302 console.log('9988756', that.data.info.goods) 317 console.log('9988756', that.data.info.goods)
303 }).catch(function (err) { 318 }).catch(function (err) {
@@ -314,7 +329,7 @@ Page({ @@ -314,7 +329,7 @@ Page({
314 } 329 }
315 app.post(url, params).then((res) => { 330 app.post(url, params).then((res) => {
316 that.setData({ 331 that.setData({
317 - "info.yunfei": Number(res.msg.yunfei)*100 332 + "info.yunfei": Number(res.msg.yunfei) * 100
318 }) 333 })
319 }) 334 })
320 }, 335 },
@@ -344,19 +359,19 @@ Page({ @@ -344,19 +359,19 @@ Page({
344 if (coudan && coudan.length > 0) { 359 if (coudan && coudan.length > 0) {
345 info = info.concat(coudan) 360 info = info.concat(coudan)
346 } 361 }
347 - let arr=[]; 362 + let arr = [];
348 arr.push(that.data.obj) 363 arr.push(that.data.obj)
349 let url = '/order/create_order'; 364 let url = '/order/create_order';
350 - console.log('9998887755',that.data.datak)  
351 - let data=that.data.datak 365 + console.log('9998887755', that.data.datak)
  366 + let data = that.data.datak
352 let params = { 367 let params = {
353 combo_id: that.data.combo_id, 368 combo_id: that.data.combo_id,
354 - data:that.data.datak,  
355 - car_ids:that.data.car_ids.join(","), 369 + data: that.data.datak,
  370 + car_ids: that.data.car_ids.join(","),
356 // info: JSON.stringify(info), 371 // info: JSON.stringify(info),
357 - address_id:that.data.info.address.id,  
358 - user_ticket_id1:that.data.user_ticket_id1,  
359 - user_ticket_id2:that.data.user_ticket_id2, 372 + address_id: that.data.info.address.id,
  373 + user_ticket_id1: that.data.user_ticket_id1,
  374 + user_ticket_id2: that.data.user_ticket_id2,
360 // data:JSON.stringify(arr), 375 // data:JSON.stringify(arr),
361 } 376 }
362 console.log(params) 377 console.log(params)
@@ -371,8 +386,8 @@ Page({ @@ -371,8 +386,8 @@ Page({
371 // } 386 // }
372 387
373 }, 388 },
374 -//点击支付  
375 -submit_score() { 389 + //点击支付
  390 + submit_score() {
376 let that = this; 391 let that = this;
377 let list = that.data.info.products 392 let list = that.data.info.products
378 let coudan = that.data.coudan 393 let coudan = that.data.coudan
@@ -407,10 +422,10 @@ submit_score() { @@ -407,10 +422,10 @@ submit_score() {
407 }) 422 })
408 that.order_pay_score(res.msg) 423 that.order_pay_score(res.msg)
409 }) 424 })
410 -}, 425 + },
411 426
412 -//积分商城订单支付  
413 -order_pay_score(order_odd) { 427 + //积分商城订单支付
  428 + order_pay_score(order_odd) {
414 let url = app.interface.order_pay 429 let url = app.interface.order_pay
415 let params = { 430 let params = {
416 order_odd: order_odd 431 order_odd: order_odd
@@ -429,11 +444,11 @@ order_pay_score(order_odd) { @@ -429,11 +444,11 @@ order_pay_score(order_odd) {
429 }) 444 })
430 } 445 }
431 }) 446 })
432 -}, 447 + },
433 448
434 //开放订单支付 449 //开放订单支付
435 order_pay(order_odd) { 450 order_pay(order_odd) {
436 - let that=this; 451 + let that = this;
437 let url = '/order/pay' 452 let url = '/order/pay'
438 let params = { 453 let params = {
439 order_id: order_odd 454 order_id: order_odd
@@ -453,13 +468,13 @@ order_pay_score(order_odd) { @@ -453,13 +468,13 @@ order_pay_score(order_odd) {
453 package: res.package, 468 package: res.package,
454 signType: res.signType, 469 signType: res.signType,
455 paySign: res.paySign, 470 paySign: res.paySign,
456 - success: function(res) { 471 + success: function (res) {
457 console.log(res) 472 console.log(res)
458 wx.redirectTo({ 473 wx.redirectTo({
459 - url: '/pages/order/order_list/order_list?type=' +1+'&statusk='+2, 474 + url: '/pages/order/order_list/order_list?type=' + 1 + '&statusk=' + 2,
460 }) 475 })
461 }, 476 },
462 - fail: function(res) { 477 + fail: function (res) {
463 console.log(123); 478 console.log(123);
464 console.log(res); 479 console.log(res);
465 } 480 }
@@ -468,43 +483,44 @@ order_pay_score(order_odd) { @@ -468,43 +483,44 @@ order_pay_score(order_odd) {
468 /** 483 /**
469 * 生命周期函数--监听页面加载 484 * 生命周期函数--监听页面加载
470 */ 485 */
471 - onLoad: function(options) { 486 + onLoad: function (options) {
472 487
473 - if(options.obj){ 488 + if (options.obj) {
474 this.setData({ 489 this.setData({
475 - obj:JSON.parse(options.obj) 490 + obj: JSON.parse(options.obj)
476 }) 491 })
477 } 492 }
478 this.setData({ 493 this.setData({
479 type: options.type, 494 type: options.type,
480 - entrance_type:wx.getStorageSync('entrance_type'), 495 + entrance_type: wx.getStorageSync('entrance_type'),
481 params: options.info, 496 params: options.info,
482 - datak:options.info, 497 + datak: options.info,
483 }) 498 })
484 - if(options.car_id){ 499 + if (options.car_id) {
485 this.setData({ 500 this.setData({
486 - car_ids:JSON.parse(options.car_id) 501 + car_ids: JSON.parse(options.car_id)
487 }) 502 })
488 } 503 }
489 - console.log('343购物车id',this.data.car_ids)  
490 - this.get_info('', options.info, '','','') 504 + console.log('343购物车id', this.data.car_ids)
  505 + this.get_info('', options.info, '', '', '')
491 }, 506 },
492 507
493 508
494 /** 509 /**
495 * 生命周期函数--监听页面初次渲染完成 510 * 生命周期函数--监听页面初次渲染完成
496 */ 511 */
497 - onReady: function() { 512 + onReady: function () {
498 513
499 }, 514 },
500 515
501 /** 516 /**
502 * 生命周期函数--监听页面显示 517 * 生命周期函数--监听页面显示
503 */ 518 */
504 - onShow: function() { 519 + onShow: function () {
505 let pages = getCurrentPages(); 520 let pages = getCurrentPages();
506 let currPage = pages[pages.length - 1] 521 let currPage = pages[pages.length - 1]
507 - console.log('887766554',this.data.params) 522 + console.log('887766554', this.data.params)
  523 + console.log(currPage.data)
508 if (currPage.data.id) { 524 if (currPage.data.id) {
509 this.setData({ 525 this.setData({
510 "info.address.address": currPage.data.address, 526 "info.address.address": currPage.data.address,
@@ -512,16 +528,23 @@ order_pay_score(order_odd) { @@ -512,16 +528,23 @@ order_pay_score(order_odd) {
512 "info.address.id": currPage.data.id, 528 "info.address.id": currPage.data.id,
513 "info.address.tel": currPage.data.tel, 529 "info.address.tel": currPage.data.tel,
514 "info.address.name": currPage.data.name, 530 "info.address.name": currPage.data.name,
  531 + copyaddress: {
  532 + address: currPage.data.address,
  533 + area: currPage.data.area,
  534 + id: currPage.data.id,
  535 + tel: currPage.data.tel,
  536 + name: currPage.data.name,
  537 + }
515 }) 538 })
516 // this.get_youfei(currPage.data.user_ticket_id1) 539 // this.get_youfei(currPage.data.user_ticket_id1)
517 } 540 }
518 541
519 - 542 + console.log(this.data.info.address.address)
520 this.setData({ 543 this.setData({
521 - user_ticket_id1:currPage.data.user_ticket_id1 544 + user_ticket_id1: currPage.data.user_ticket_id1
522 }) 545 })
523 546
524 - this.get_info('', this.data.params, currPage.data.id,currPage.data.user_ticket_id1,currPage.data.user_ticket_id2) 547 + this.get_info('', this.data.params, currPage.data.id, currPage.data.user_ticket_id1, currPage.data.user_ticket_id2)
525 548
526 // if (currPage.data.user_ticket_id2) { 549 // if (currPage.data.user_ticket_id2) {
527 // console.log(66666,this.data.params) 550 // console.log(66666,this.data.params)
@@ -541,35 +564,35 @@ order_pay_score(order_odd) { @@ -541,35 +564,35 @@ order_pay_score(order_odd) {
541 /** 564 /**
542 * 生命周期函数--监听页面隐藏 565 * 生命周期函数--监听页面隐藏
543 */ 566 */
544 - onHide: function() { 567 + onHide: function () {
545 568
546 }, 569 },
547 570
548 /** 571 /**
549 * 生命周期函数--监听页面卸载 572 * 生命周期函数--监听页面卸载
550 */ 573 */
551 - onUnload: function() { 574 + onUnload: function () {
552 575
553 }, 576 },
554 577
555 /** 578 /**
556 * 页面相关事件处理函数--监听用户下拉动作 579 * 页面相关事件处理函数--监听用户下拉动作
557 */ 580 */
558 - onPullDownRefresh: function() { 581 + onPullDownRefresh: function () {
559 582
560 }, 583 },
561 584
562 /** 585 /**
563 * 页面上拉触底事件的处理函数 586 * 页面上拉触底事件的处理函数
564 */ 587 */
565 - onReachBottom: function() { 588 + onReachBottom: function () {
566 589
567 }, 590 },
568 591
569 /** 592 /**
570 * 用户点击右上角分享 593 * 用户点击右上角分享
571 */ 594 */
572 - onShareAppMessage: function() { 595 + onShareAppMessage: function () {
573 596
574 } 597 }
575 }) 598 })
1 <view class="content"> 1 <view class="content">
2 <!-- 地址信息 --> 2 <!-- 地址信息 -->
3 - <view class="address_box" wx:if="{{info.address}}" bindtap="add_address"> 3 + <view class="address_box" wx:if="{{info.address.address}}" bindtap="add_address">
4 <view class="name"> {{info.address.name}} 4 <view class="name"> {{info.address.name}}
5 <text>{{info.address.mobile}}</text> 5 <text>{{info.address.mobile}}</text>
6 </view> 6 </view>
@@ -55,8 +55,17 @@ Page({ @@ -55,8 +55,17 @@ Page({
55 encryptedData: e.detail.encryptedData 55 encryptedData: e.detail.encryptedData
56 }) 56 })
57 if(that.data.iv){ 57 if(that.data.iv){
  58 + wx.login({
  59 + success: function(r) {
  60 + that.setData({
  61 + code: r.code
  62 + })
58 that.get_token() 63 that.get_token()
59 } 64 }
  65 + })
  66 +
  67 +
  68 + }
60 69
61 } 70 }
62 }, 71 },
@@ -84,6 +93,7 @@ Page({ @@ -84,6 +93,7 @@ Page({
84 // wx.setStorageSync('token', 'C9c4f9e702e05dae61d854c0c2dd6e21a'); 93 // wx.setStorageSync('token', 'C9c4f9e702e05dae61d854c0c2dd6e21a');
85 wx.setStorageSync('login', r.new_login); 94 wx.setStorageSync('login', r.new_login);
86 wx.setStorageSync('gh_login', r.gh_login); 95 wx.setStorageSync('gh_login', r.gh_login);
  96 + wx.setStorageSync('cb_login', r.cb_login);
87 // wx.setStorageSync('tel', r.tel); 97 // wx.setStorageSync('tel', r.tel);
88 // wx.reLaunch({ 98 // wx.reLaunch({
89 // url: '/pages/index/index' 99 // url: '/pages/index/index'
@@ -2,7 +2,8 @@ page { @@ -2,7 +2,8 @@ page {
2 background: #F9F9F9; 2 background: #F9F9F9;
3 padding-bottom: 100rpx; 3 padding-bottom: 100rpx;
4 } 4 }
5 -.no_login{ 5 +
  6 +.no_login {
6 font-size: 36rpx; 7 font-size: 36rpx;
7 font-family: PingFang SC; 8 font-family: PingFang SC;
8 font-weight: 400; 9 font-weight: 400;
@@ -10,12 +11,13 @@ page { @@ -10,12 +11,13 @@ page {
10 margin-top: 200rpx; 11 margin-top: 200rpx;
11 text-align: center; 12 text-align: center;
12 } 13 }
  14 +
13 .content { 15 .content {
14 width: 100%; 16 width: 100%;
15 padding: 30rpx 32rpx; 17 padding: 30rpx 32rpx;
16 box-sizing: border-box; 18 box-sizing: border-box;
17 background: #f9f9f9; 19 background: #f9f9f9;
18 - margin-bottom:120rpx; 20 + margin-bottom: 120rpx;
19 } 21 }
20 22
21 .empty { 23 .empty {
@@ -44,21 +46,25 @@ page { @@ -44,21 +46,25 @@ page {
44 justify-content: space-between; 46 justify-content: space-between;
45 align-items: center; 47 align-items: center;
46 } 48 }
  49 +
47 .footer .check_box { 50 .footer .check_box {
48 display: flex; 51 display: flex;
49 align-items: center; 52 align-items: center;
50 } 53 }
  54 +
51 .footer .check_box .check { 55 .footer .check_box .check {
52 width: 36rpx; 56 width: 36rpx;
53 height: 36rpx; 57 height: 36rpx;
54 padding: 20rpx 20rpx 20rpx 0; 58 padding: 20rpx 20rpx 20rpx 0;
55 } 59 }
  60 +
56 .footer .check_box .text { 61 .footer .check_box .text {
57 font-size: 26rpx; 62 font-size: 26rpx;
58 font-family: PingFang SC; 63 font-family: PingFang SC;
59 font-weight: 400; 64 font-weight: 400;
60 color: rgba(19, 26, 46, 1); 65 color: rgba(19, 26, 46, 1);
61 } 66 }
  67 +
62 .tips_info text:first-child { 68 .tips_info text:first-child {
63 font-size: 26rpx; 69 font-size: 26rpx;
64 font-family: PingFang SC; 70 font-family: PingFang SC;
@@ -86,19 +92,22 @@ page { @@ -86,19 +92,22 @@ page {
86 justify-content: center; 92 justify-content: center;
87 align-items: center; 93 align-items: center;
88 } 94 }
89 -.delname{  
90 - color:rgba(242, 0, 0, 1); 95 +
  96 +.delname {
  97 + color: rgba(242, 0, 0, 1);
91 font-size: 28rpx; 98 font-size: 28rpx;
92 text-align: right; 99 text-align: right;
93 100
94 101
95 } 102 }
96 -.editname{  
97 - color:#333; 103 +
  104 +.editname {
  105 + color: #333;
98 font-size: 28rpx; 106 font-size: 28rpx;
99 } 107 }
100 -.edittop{  
101 - display:flex; 108 +
  109 +.edittop {
  110 + display: flex;
102 justify-content: space-between; 111 justify-content: space-between;
103 align-items: center; 112 align-items: center;
104 padding: 32rpx; 113 padding: 32rpx;
@@ -10,6 +10,7 @@ Page({ @@ -10,6 +10,7 @@ Page({
10 current: 0, 10 current: 0,
11 status: 0, 11 status: 0,
12 nav: ['商品介绍', '规格参数', '售后保障'], 12 nav: ['商品介绍', '规格参数', '售后保障'],
  13 + // nav: ['商品介绍', '规格参数'],
13 mask: false, 14 mask: false,
14 cartnum:'', 15 cartnum:'',
15 speclist:[], 16 speclist:[],
@@ -130,6 +130,7 @@ page { @@ -130,6 +130,7 @@ page {
130 height: 88rpx; 130 height: 88rpx;
131 display: flex; 131 display: flex;
132 display: -webkit-flex; 132 display: -webkit-flex;
  133 + justify-content: space-around;
133 } 134 }
134 135
135 .three_one_item { 136 .three_one_item {
@@ -4,19 +4,19 @@ @@ -4,19 +4,19 @@
4 "ignore": [] 4 "ignore": []
5 }, 5 },
6 "setting": { 6 "setting": {
7 - "urlCheck": true, 7 + "urlCheck": false,
8 "es6": true, 8 "es6": true,
9 - "enhance": true, 9 + "enhance": false,
10 "postcss": true, 10 "postcss": true,
11 "preloadBackgroundData": false, 11 "preloadBackgroundData": false,
12 "minified": true, 12 "minified": true,
13 - "newFeature": true, 13 + "newFeature": false,
14 "coverView": true, 14 "coverView": true,
15 "nodeModules": false, 15 "nodeModules": false,
16 "autoAudits": false, 16 "autoAudits": false,
17 "showShadowRootInWxmlPanel": true, 17 "showShadowRootInWxmlPanel": true,
18 "scopeDataCheck": false, 18 "scopeDataCheck": false,
19 - "uglifyFileName": true, 19 + "uglifyFileName": false,
20 "checkInvalidKey": true, 20 "checkInvalidKey": true,
21 "checkSiteMap": true, 21 "checkSiteMap": true,
22 "uploadWithSourceMap": true, 22 "uploadWithSourceMap": true,
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 "enableEngineNative": false, 32 "enableEngineNative": false,
33 "bundle": false, 33 "bundle": false,
34 "useIsolateContext": true, 34 "useIsolateContext": true,
35 - "useCompilerModule": false, 35 + "useCompilerModule": true,
36 "userConfirmedUseCompilerModuleSwitch": false, 36 "userConfirmedUseCompilerModuleSwitch": false,
37 "userConfirmedBundleSwitch": false, 37 "userConfirmedBundleSwitch": false,
38 "packNpmManually": false, 38 "packNpmManually": false,