作者 李芳银

修改登录

  1 +import {
  2 + request
  3 +} from "../../request/index.js"
  4 +const a = getApp()
  5 +Component({
  6 + /**
  7 + * 组件的属性列表
  8 + */
  9 + properties: {
  10 +
  11 + },
  12 +
  13 + /**
  14 + * 组件的初始数据
  15 + */
  16 + data: {
  17 + imagesUrl: a.globalData.baseUrl,
  18 + canIUseGetUserProfile: false,
  19 + showDialog: false
  20 + },
  21 + onload() {
  22 +
  23 + },
  24 + /**
  25 + * 组件的方法列表
  26 + */
  27 + methods: {
  28 + getLogin(dens) {
  29 + console.log(dens);
  30 + if (wx.getUserProfile) {
  31 + this.setData({
  32 + canIUseGetUserProfile: true
  33 + })
  34 + }
  35 + this.toggleDialog()
  36 + },
  37 + bindGetUserInfo(e) { // 立即授权
  38 + let that = this;
  39 + wx.login({
  40 + success(res) {
  41 + console.log(res);
  42 + that.setData({
  43 + code: res.code
  44 + })
  45 + request({
  46 + url: 'api/common/login',
  47 + method: "POST",
  48 + data: {
  49 + rawData: e.detail.rawData,
  50 + code: that.data.code,
  51 + }
  52 + })
  53 + .then(res => {
  54 + console.log(res);
  55 + if (res.data.code == 1) {
  56 + wx.setStorageSync('token', res.data.data.userInfo.token);
  57 + wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
  58 + wx.setStorageSync('name', res.data.data.userInfo.nickname);
  59 + wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
  60 + }
  61 + console.log(res.data.data.userInfo.token);
  62 + that.toggleDialog()
  63 + a.popSuccessTest(res.data.msg);
  64 + that.getDetailsContent()
  65 + }).catch(err => {
  66 + console.log(err);
  67 + })
  68 + }
  69 + })
  70 + },
  71 + getUserProfile() {
  72 + let that = this
  73 + wx.login({
  74 + success(res) {
  75 + console.log(res);
  76 + that.setData({
  77 + code: res.code
  78 + })
  79 + }
  80 + })
  81 + wx.getUserProfile({
  82 + desc: '用于完善会员资料',
  83 + success: async (res) => {
  84 + console.log(res);
  85 + try {
  86 + const {
  87 + data
  88 + } = await request({
  89 + url: 'api/common/newLogin',
  90 + method: "POST",
  91 + data: {
  92 + userInfo: res.userInfo,
  93 + code: that.data.code,
  94 + }
  95 + })
  96 + console.log(data);
  97 + wx.setStorageSync('token', data.data.userInfo.token);
  98 + wx.setStorageSync('avatar', data.data.userInfo.avatar);
  99 + wx.setStorageSync('name', data.data.userInfo.nickname);
  100 + wx.setStorageSync('user_id', data.data.userInfo.user_id);
  101 + that.setData({
  102 + showDialog: false
  103 + })
  104 + a.popSuccessTest(data.msg)
  105 + that.triggerEvent('istoken', '李四')
  106 + } catch (err) {
  107 + console.log(err);
  108 + }
  109 + }
  110 + })
  111 +
  112 + },
  113 + toggleDialog() {
  114 + this.setData({
  115 + showDialog: !this.data.showDialog
  116 + })
  117 + },
  118 + }
  119 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 + /* 弹窗 */
  2 + .zan_dialog {
  3 + width: 100%;
  4 + height: 100%;
  5 + position: fixed;
  6 + top: 0;
  7 + left: 0;
  8 + background: #000;
  9 + opacity: 0.5;
  10 + overflow: hidden;
  11 + z-index: 1000;
  12 + color: #fff;
  13 + }
  14 +
  15 + .phoneshou {
  16 + height: 500rpx;
  17 + width: 100%;
  18 + overflow: hidden;
  19 + position: fixed;
  20 + bottom: 0;
  21 + left: 0;
  22 + z-index: 2000;
  23 + background: #fff;
  24 + padding: 32rpx 32rpx 0;
  25 + box-sizing: border-box;
  26 + border-radius: 24rpx 24rpx 0 0;
  27 +
  28 + .padlock {
  29 + width: 100%;
  30 + height: 48rpx;
  31 + display: flex;
  32 + align-items: center;
  33 + justify-content: flex-end;
  34 +
  35 + image {
  36 + width: 48rpx;
  37 + height: 48rpx;
  38 + }
  39 + }
  40 +
  41 + .phone_title {
  42 + width: 100%;
  43 + height: 70rpx;
  44 + font-size: 44rpx;
  45 + line-height: 70rpx;
  46 + color: #06121F;
  47 + font-family: PingFangSC, PingFangSC-Regular;
  48 +
  49 +
  50 + }
  51 +
  52 + .tips_content {
  53 + width: 100%;
  54 + font-size: 32rpx;
  55 + line-height: 60rpx;
  56 + color: #8C9198;
  57 + padding: 30rpx 0;
  58 + box-sizing: border-box;
  59 + }
  60 +
  61 + .downbtn {
  62 + width: 750rpx;
  63 + position: fixed;
  64 + bottom: 0;
  65 + right: 0;
  66 + padding: 20rpx 0;
  67 + background-color: #fff;
  68 +
  69 + .btn {
  70 + height: 100rpx;
  71 + width: 90%;
  72 + color: #fff;
  73 + padding: 0;
  74 + box-sizing: border-box;
  75 + font-size: 32rpx;
  76 + background-color: #00C25F;
  77 + display: flex;
  78 + align-items: center;
  79 + justify-content: center;
  80 + border-radius: 50rpx;
  81 +
  82 + image {
  83 + width: 60rpx;
  84 + height: 48rpx;
  85 + margin-right: 20rpx;
  86 + flex-shrink: 0;
  87 + }
  88 +
  89 + }
  90 +
  91 + .btn1 {
  92 + margin-bottom: 20rpx;
  93 + background-color: #ccc;
  94 + }
  95 + }
  96 +
  97 + }
  1 +<!-- 弹窗 -->
  2 +<view class="zan_dialog" catchtap="toggleDialog" wx:if="{{showDialog}}"></view>
  3 +<view class="phoneshou" wx:if="{{showDialog}}">
  4 + <view class="padlock" catchtap="toggleDialog">
  5 + <image src="{{imagesUrl}}assets/static/img/updown.png" />
  6 + </view>
  7 + <view class="phone_title">请先授权登录</view>
  8 + <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
  9 + <view class="downbtn">
  10 + <view class="si_box">
  11 + <button class="btn" wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile">
  12 + <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
  13 + 微信授权登录
  14 + </button>
  15 + <button class="btn" wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
  16 + <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
  17 + 微信授权登录
  18 + </button>
  19 + </view>
  20 + </view>
  21 +</view>
  1 +/* 弹窗 */
  2 +.zan_dialog {
  3 + width: 100%;
  4 + height: 100%;
  5 + position: fixed;
  6 + top: 0;
  7 + left: 0;
  8 + background: #000;
  9 + opacity: 0.5;
  10 + overflow: hidden;
  11 + z-index: 1000;
  12 + color: #fff;
  13 +}
  14 +.phoneshou {
  15 + height: 500rpx;
  16 + width: 100%;
  17 + overflow: hidden;
  18 + position: fixed;
  19 + bottom: 0;
  20 + left: 0;
  21 + z-index: 2000;
  22 + background: #fff;
  23 + padding: 32rpx 32rpx 0;
  24 + box-sizing: border-box;
  25 + border-radius: 24rpx 24rpx 0 0;
  26 +}
  27 +.phoneshou .padlock {
  28 + width: 100%;
  29 + height: 48rpx;
  30 + display: flex;
  31 + align-items: center;
  32 + justify-content: flex-end;
  33 +}
  34 +.phoneshou .padlock image {
  35 + width: 48rpx;
  36 + height: 48rpx;
  37 +}
  38 +.phoneshou .phone_title {
  39 + width: 100%;
  40 + height: 70rpx;
  41 + font-size: 44rpx;
  42 + line-height: 70rpx;
  43 + color: #06121F;
  44 + font-family: PingFangSC, PingFangSC-Regular;
  45 +}
  46 +.phoneshou .tips_content {
  47 + width: 100%;
  48 + font-size: 32rpx;
  49 + line-height: 60rpx;
  50 + color: #8C9198;
  51 + padding: 30rpx 0;
  52 + box-sizing: border-box;
  53 +}
  54 +.phoneshou .downbtn {
  55 + width: 750rpx;
  56 + position: fixed;
  57 + bottom: 0;
  58 + right: 0;
  59 + padding: 20rpx 0;
  60 + background-color: #fff;
  61 +}
  62 +.phoneshou .downbtn .btn {
  63 + height: 100rpx;
  64 + width: 90%;
  65 + color: #fff;
  66 + padding: 0;
  67 + box-sizing: border-box;
  68 + font-size: 32rpx;
  69 + background-color: #00C25F;
  70 + display: flex;
  71 + align-items: center;
  72 + justify-content: center;
  73 + border-radius: 50rpx;
  74 +}
  75 +.phoneshou .downbtn .btn image {
  76 + width: 60rpx;
  77 + height: 48rpx;
  78 + margin-right: 20rpx;
  79 + flex-shrink: 0;
  80 +}
  81 +.phoneshou .downbtn .btn1 {
  82 + margin-bottom: 20rpx;
  83 + background-color: #ccc;
  84 +}
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <view class="title_oage">车唛优选</view> 5 <view class="title_oage">车唛优选</view>
6 </view> 6 </view>
7 </view> 7 </view>
8 - <view class="health" wx:if="{{S4Spage}}"> 8 + <view class="health" wx:if="{{S4Spage == true}}">
9 <view class="btd"> 9 <view class="btd">
10 <view class="searchbox"> 10 <view class="searchbox">
11 <view class="searchinput" bindtap="goSearch"> 11 <view class="searchinput" bindtap="goSearch">
@@ -170,6 +170,21 @@ Page({ @@ -170,6 +170,21 @@ Page({
170 that.getToken() 170 that.getToken()
171 } 171 }
172 }, 172 },
  173 + getToken() {
  174 + let that = this
  175 + wx.showModal({
  176 + title: '提示',
  177 + content: '您尚未登录,请登录后操作',
  178 + success: function (res) {
  179 + if (res.confirm) {
  180 + that.selectComponent('#lfyLogin').getLogin('hh')
  181 + } else {
  182 + console.log('点击取消回调')
  183 + wx.navigateBack()
  184 + }
  185 + }
  186 + })
  187 + },
173 onShareAppMessage(options) { 188 onShareAppMessage(options) {
174 var that = this; 189 var that = this;
175 var shareObj = { 190 var shareObj = {
@@ -229,6 +244,7 @@ Page({ @@ -229,6 +244,7 @@ Page({
229 content: '您尚未登录,请登录后操作', 244 content: '您尚未登录,请登录后操作',
230 success: function (res) { 245 success: function (res) {
231 if (res.confirm) { 246 if (res.confirm) {
  247 +
232 wx.navigateTo({ 248 wx.navigateTo({
233 url: '/pages/authorization/authorization' 249 url: '/pages/authorization/authorization'
234 }) 250 })
@@ -393,6 +409,9 @@ Page({ @@ -393,6 +409,9 @@ Page({
393 } 409 }
394 410
395 }, 411 },
  412 + bindistoken() {
  413 + console.log('我回来了');
  414 + },
396 415
397 416
398 417
1 { 1 {
2 "usingComponents": { 2 "usingComponents": {
3 - "van-count-down": "@vant/weapp/count-down/index" 3 + "van-count-down": "@vant/weapp/count-down/index",
  4 + "lfy-login":"../../Components/lfylogin"
4 }, 5 },
5 "navigationStyle": "custom", 6 "navigationStyle": "custom",
6 "navigationBarTextStyle": "white" 7 "navigationBarTextStyle": "white"
@@ -217,25 +217,6 @@ @@ -217,25 +217,6 @@
217 </button> --> 217 </button> -->
218 </view> 218 </view>
219 </view> 219 </view>
220 - <view class="zan_dialog" catchtap="toggleDialog" wx:if="{{showDialog}}"></view>  
221 - <view class="phoneshou" wx:if="{{showDialog}}">  
222 - <view class="padlock" catchtap="toggleDialog">  
223 - <image src="{{imagesUrl}}assets/static/img/updown.png" />  
224 - </view>  
225 - <view class="phone_title">请先授权登录</view>  
226 - <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>  
227 - <view class="downbtn">  
228 - <!-- <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
229 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
230 - 微信授权登录  
231 - </button> -->  
232 - <view class="si_box">  
233 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
234 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
235 - 微信授权登录  
236 - </button>  
237 - </view>  
238 - </view>  
239 - </view> 220 + <lfy-login id="lfyLogin" bind:istoken="bindistoken" />
240 </view> 221 </view>
241 </view> 222 </view>
@@ -9,7 +9,8 @@ Page({ @@ -9,7 +9,8 @@ Page({
9 encryptedData: '', 9 encryptedData: '',
10 iv: '', 10 iv: '',
11 msg: '', 11 msg: '',
12 - num: 0 12 + num: 0,
  13 + canIUseGetUserProfile: true,
13 }, 14 },
14 15
15 16
@@ -17,14 +18,60 @@ Page({ @@ -17,14 +18,60 @@ Page({
17 18
18 }, 19 },
19 onLoad: function (options) { 20 onLoad: function (options) {
20 - console.log(options);  
21 let that = this 21 let that = this
  22 + if (wx.getUserProfile) {
  23 + that.setData({
  24 + canIUseGetUserProfile: true
  25 + })
  26 + }
  27 + console.log(options);
22 that.setData({ 28 that.setData({
23 num: options.num || '' 29 num: options.num || ''
24 }) 30 })
25 31
26 }, 32 },
27 onShow: function () {}, 33 onShow: function () {},
  34 + getUserProfile() {
  35 + let that = this
  36 + wx.login({
  37 + success(res) {
  38 + console.log(res);
  39 + that.setData({
  40 + code: res.code
  41 + })
  42 + }
  43 + })
  44 + wx.getUserProfile({
  45 + desc: '用于完善会员资料',
  46 + success: async (res) => {
  47 + console.log(res);
  48 + try {
  49 + const {
  50 + data
  51 + } = await request({
  52 + url: 'api/common/newLogin',
  53 + method: "POST",
  54 + data: {
  55 + userInfo: res.userInfo,
  56 + code: that.data.code,
  57 + }
  58 + })
  59 + console.log(data);
  60 + wx.setStorageSync('token', data.data.userInfo.token);
  61 + wx.setStorageSync('avatar', data.data.userInfo.avatar);
  62 + wx.setStorageSync('name', data.data.userInfo.nickname);
  63 + wx.setStorageSync('user_id', data.data.userInfo.user_id);
  64 + that.showModal();
  65 + a.popSuccessTest(data.msg)
  66 + } catch (err) {
  67 + console.log(err);
  68 + a.popTest(err.msg)
  69 + }
  70 + }
  71 + })
  72 +
  73 +
  74 + },
28 // 立即授权 75 // 立即授权
29 bindGetUserInfo(e) { 76 bindGetUserInfo(e) {
30 let that = this; 77 let that = this;
@@ -62,7 +109,6 @@ Page({ @@ -62,7 +109,6 @@ Page({
62 } 109 }
63 }).catch(err => { 110 }).catch(err => {
64 console.log(err); 111 console.log(err);
65 -  
66 }) 112 })
67 } 113 }
68 }) 114 })
@@ -5,7 +5,10 @@ @@ -5,7 +5,10 @@
5 <view class="title">申请获得以下权限</view> 5 <view class="title">申请获得以下权限</view>
6 <view class="title_name">获得你的公开信息(昵称、头像等)</view> 6 <view class="title_name">获得你的公开信息(昵称、头像等)</view>
7 <view class="bu"> 7 <view class="bu">
8 - <button class="btn" open-type='getUserInfo' bindgetuserinfo="bindGetUserInfo">立即授权</button> 8 + <button class="btn" wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile">立即授权</button>
  9 + <button class="btn" wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
  10 + 立即授权
  11 + </button>
9 </view> 12 </view>
10 <!-- 屏幕背景变暗的背景 --> 13 <!-- 屏幕背景变暗的背景 -->
11 <view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view> 14 <view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view>
@@ -25,7 +25,6 @@ Page({ @@ -25,7 +25,6 @@ Page({
25 pingList: [], 25 pingList: [],
26 s4_id: '', 26 s4_id: '',
27 fx_user: '', 27 fx_user: '',
28 - showDialog: false,  
29 28
30 }, 29 },
31 onLoad: function (options) { 30 onLoad: function (options) {
@@ -321,49 +320,6 @@ Page({ @@ -321,49 +320,6 @@ Page({
321 //如果有透明蒙层,弹窗的期间不能点击文档内容 320 //如果有透明蒙层,弹窗的期间不能点击文档内容
322 }) 321 })
323 }, 322 },
324 - toggleDialog() {  
325 - this.setData({  
326 - showDialog: !this.data.showDialog  
327 - })  
328 - },  
329 - bindGetUserInfo(e) { // 立即授权  
330 - let that = this;  
331 - wx.login({  
332 - success(res) {  
333 - console.log(res);  
334 - that.setData({  
335 - code: res.code  
336 - })  
337 - request({  
338 - url: 'api/common/login',  
339 - method: "POST",  
340 - data: {  
341 - rawData: e.detail.rawData,  
342 - code: that.data.code,  
343 - }  
344 - })  
345 - .then(res => {  
346 - console.log(res);  
347 - if (res.data.code == 1) {  
348 - wx.setStorageSync('token', res.data.data.userInfo.token);  
349 - wx.setStorageSync('avatar', res.data.data.userInfo.avatar);  
350 - wx.setStorageSync('name', res.data.data.userInfo.nickname);  
351 - wx.setStorageSync('user_id', res.data.data.userInfo.user_id);  
352 -  
353 - }  
354 - console.log(res.data.data.userInfo.token);  
355 - that.toggleDialog()  
356 - that.setData({  
357 - msg: res.data.msg  
358 - })  
359 - that.popSuccessTest();  
360 - that.getDetailsContent()  
361 - }).catch(err => {  
362 - console.log(err);  
363 - })  
364 - }  
365 - })  
366 - },  
367 GOcanvas() { 323 GOcanvas() {
368 let id = this.data.id 324 let id = this.data.id
369 let token = wx.getStorageSync("token") 325 let token = wx.getStorageSync("token")
@@ -395,7 +351,7 @@ Page({ @@ -395,7 +351,7 @@ Page({
395 content: '您尚未登录,请登录后操作', 351 content: '您尚未登录,请登录后操作',
396 success: function (res) { 352 success: function (res) {
397 if (res.confirm) { 353 if (res.confirm) {
398 - that.toggleDialog() 354 + that.selectComponent('#lfyLogin').getLogin('哈哈哈是')
399 } else { 355 } else {
400 console.log('点击取消回调') 356 console.log('点击取消回调')
401 } 357 }
1 { 1 {
2 - "usingComponents": {}, 2 + "usingComponents": {
  3 + "lfy-login":"../../Components/lfylogin"
  4 + },
3 "navigationBarTitleText": "车型详情" 5 "navigationBarTitleText": "车型详情"
4 } 6 }
1 -.container {  
2 - height: 100%;  
3 - background-color: #F9F9F9;  
4 -  
5 - .top_img {  
6 - width: 100%;  
7 - height: 750rpx;  
8 -  
9 - .banner {  
10 - width: 100%;  
11 - height: 100%;  
12 -  
13 - image {  
14 - width: 100%;  
15 - height: 100%;  
16 - }  
17 - }  
18 - }  
19 -  
20 - .cards {  
21 - width: 100%;  
22 - padding: 14rpx 0rpx 0;  
23 - box-sizing: border-box;  
24 -  
25 - .card {  
26 - width: 100%;  
27 - padding: 30rpx;  
28 - box-sizing: border-box;  
29 - background-color: #fff;  
30 -  
31 - .ittt {  
32 - display: flex;  
33 - position: relative;  
34 -  
35 - .tent_name {  
36 - flex: 1;  
37 -  
38 - .card_text {  
39 - width: 100%;  
40 - font-size: 32rpx;  
41 - color: #06121F;  
42 - font-weight: bold;  
43 - }  
44 -  
45 - .zan_price {  
46 - width: 100%;  
47 - display: flex;  
48 - align-items: baseline;  
49 - margin-top: 10rpx;  
50 -  
51 - .money_icon {  
52 - font-size: 20rpx;  
53 - color: #FF444B;  
54 - font-weight: 600;  
55 - }  
56 -  
57 - .price_big {  
58 - color: #FF444B;  
59 - font-size: 32rpx;  
60 - font-weight: 600;  
61 - }  
62 - }  
63 - }  
64 -  
65 -  
66 -  
67 - .imgbtns {  
68 - width: 60rpx;  
69 - box-sizing: border-box;  
70 - display: flex;  
71 - flex-direction: column;  
72 - align-items: flex-end;  
73 - // justify-content: space-between;  
74 -  
75 - .s_btn {  
76 - width: 48rpx;  
77 - height: 48rpx;  
78 -  
79 - image {  
80 - width: 100%;  
81 - flex: 0 auto;  
82 - }  
83 - }  
84 -  
85 - .mm {  
86 - margin: 10rpx 0;  
87 - box-sizing: border-box;  
88 - }  
89 -  
90 -  
91 -  
92 - button {  
93 - background-color: transparent;  
94 - padding: 0;  
95 - }  
96 -  
97 - .buttonShare {  
98 - // border: 1rpx solid red;  
99 - position: absolute;  
100 - top: 55rpx;  
101 - right: 0;  
102 - width: 60rpx;  
103 - height: 60rpx;  
104 - z-index: 5;  
105 - }  
106 - }  
107 - }  
108 -  
109 - .store_guide_price {  
110 - width: 100%;  
111 - display: flex;  
112 - align-items: center;  
113 -  
114 - text {  
115 - font-size: 24rpx;  
116 - line-height: 34rpx;  
117 - margin-right: 20rpx;  
118 - }  
119 -  
120 - .imgs_downArrow {  
121 - height: 24rpx;  
122 - line-height: 34rpx;  
123 - display: flex;  
124 - align-items: center;  
125 -  
126 - .imgs_down {  
127 - width: 33rpx;  
128 - height: 100%;  
129 - }  
130 -  
131 - text {  
132 - font-size: 24rpx;  
133 - color: #00C116;  
134 - }  
135 - }  
136 - }  
137 -  
138 - .card_box {  
139 - width: 100%;  
140 - display: flex;  
141 -  
142 - .card_left {  
143 - flex: 1;  
144 - align-items: center;  
145 - line-height: 55rpx;  
146 -  
147 - .price_dP {  
148 - display: flex;  
149 - align-items: center;  
150 -  
151 - .del {  
152 - display: flex;  
153 - margin-left: 10rpx;  
154 -  
155 - .del_price {  
156 - color: #ccc;  
157 - font-size: 24rpx;  
158 - text-decoration: line-through;  
159 -  
160 - }  
161 -  
162 - .money_icon {  
163 -  
164 - font-size: 24rpx;  
165 - line-height: 52rpx;  
166 - color: #ccc;  
167 - }  
168 - }  
169 -  
170 - .zan_price {  
171 - display: flex;  
172 - align-items: flex-end;  
173 - align-items: baseline;  
174 -  
175 - .icon_name {  
176 - font-size: 28rpx;  
177 - color: #FF444B;  
178 - }  
179 -  
180 - .money_icon {  
181 - margin-left: 10rpx;  
182 - font-size: 20rpx;  
183 - color: #FF444B;  
184 - font-weight: 600;  
185 - }  
186 -  
187 - .price_big {  
188 - color: #FF444B;  
189 - font-size: 32rpx;  
190 - font-weight: 600;  
191 - }  
192 - }  
193 - }  
194 -  
195 - .num_buy {  
196 - font-size: 28rpx;  
197 - display: flex;  
198 - align-items: center;  
199 -  
200 - .sales {  
201 - font-size: 28rpx;  
202 - }  
203 -  
204 - .sales_per {  
205 - margin-left: 5rpx;  
206 - font-size: 28rpx;  
207 - line-height: 63rpx;  
208 - }  
209 - }  
210 - }  
211 -  
212 - .card_right {  
213 - flex: 1;  
214 - align-items: center;  
215 - line-height: 55rpx;  
216 - padding-left: 20rpx;  
217 - box-sizing: border-box;  
218 -  
219 - .collar {  
220 - font-size: 24rpx;  
221 - color: #000;  
222 - }  
223 -  
224 - .count_num {  
225 - font-size: 26rpx;  
226 - }  
227 -  
228 - }  
229 - }  
230 - }  
231 -  
232 - }  
233 -  
234 - .chefuWu {  
235 - width: 100%;  
236 - display: flex;  
237 - justify-content: space-between;  
238 - padding: 20rpx 50rpx;  
239 - box-sizing: border-box;  
240 - border-radius: 8rpx;  
241 - background-color: #fff;  
242 - margin: 20rpx 0;  
243 - align-items: center;  
244 -  
245 - .c {  
246 - flex: 1;  
247 -  
248 - .icon_conte {  
249 - margin-top: 10rpx;  
250 - width: 100%;  
251 - display: flex;  
252 - align-items: center;  
253 -  
254 - .fw {  
255 - display: flex;  
256 - align-items: center;  
257 - margin-right: 20rpx;  
258 -  
259 - .icon_fw {  
260 - width: 48rpx;  
261 - height: 48rpx;  
262 -  
263 - image {  
264 - width: 100%;  
265 - }  
266 - }  
267 -  
268 - .icon_title {  
269 - margin-left: 10rpx;  
270 - font-size: 24rpx;  
271 - font-weight: bold;  
272 - color: #E8370F;  
273 - }  
274 - }  
275 -  
276 - .pubone {  
277 - margin-left: 20rpx;  
278 - }  
279 -  
280 - .pub {  
281 - color: #666666;  
282 - font-size: 24rpx;  
283 - margin-right: 20rpx;  
284 - }  
285 - }  
286 - }  
287 -  
288 - .icon_img {  
289 - width: 35rpx;  
290 - font-size: 38rpx;  
291 -  
292 - }  
293 - }  
294 -  
295 - /* 详情 评价 */  
296 - .details {  
297 - width: 100%;  
298 - height: 130rpx;  
299 - background-color: #fff;  
300 - padding: 32rpx 32rpx;  
301 - box-sizing: border-box;  
302 - display: flex;  
303 -  
304 - .details_name {  
305 - font-size: 28rpx;  
306 - height: 90rpx;  
307 - line-height: 90rpx;  
308 - }  
309 -  
310 - .appraise_name {  
311 - font-size: 28rpx;  
312 - height: 90rpx;  
313 - line-height: 90rpx;  
314 - margin: 0 70rpx;  
315 - }  
316 -  
317 - .cur {  
318 - border-bottom: 4rpx solid #E8370F;  
319 - font-weight: 700;  
320 - font-size: 36rpx !important;  
321 - }  
322 - }  
323 -  
324 - .details_box {  
325 - padding-bottom: 120rpx;  
326 -  
327 - .details_img {  
328 - width: 100%;  
329 - padding: 24rpx 18rpx 32rpx;  
330 - box-sizing: border-box;  
331 - background-color: #f5f5f5;  
332 -  
333 - image {  
334 - visibility: middle;  
335 - }  
336 - }  
337 -  
338 - // 评价内容  
339 - .praise_content {  
340 - width: 100%;  
341 - padding: 32rpx 32rpx;  
342 -  
343 - box-sizing: border-box;  
344 -  
345 - .person_content {  
346 - display: flex;  
347 -  
348 - justify-content: space-between;  
349 -  
350 - .left_ziliao {  
351 - display: flex;  
352 -  
353 - align-items: center;  
354 -  
355 - .imgNum {  
356 - width: 80rpx;  
357 - height: 80rpx;  
358 -  
359 - image {  
360 - width: 100%;  
361 - }  
362 - }  
363 -  
364 - .per_item {  
365 - display: flex;  
366 -  
367 - justify-content: space-between;  
368 - flex-direction: column;  
369 - height: 80rpx;  
370 - margin-left: 20rpx;  
371 -  
372 - .nickname {  
373 - font-size: 28rpx;  
374 - line-height: 40rpx;  
375 - font-weight: 600;  
376 - }  
377 -  
378 - .dateTime {  
379 - color: #BDC4CE;  
380 - font-size: 24rpx;  
381 - line-height: 34rpx;  
382 - }  
383 - }  
384 -  
385 - }  
386 -  
387 - .praise_star {  
388 - width: 140rpx;  
389 - display: flex;  
390 - align-items: center;  
391 -  
392 -  
393 - image {  
394 - width: 48rpx;  
395 - height: 48rpx;  
396 -  
397 - }  
398 -  
399 - text {  
400 - margin-left: 20rpx;  
401 - font-size: 28rpx;  
402 - line-height: 40rpx;  
403 - }  
404 - }  
405 -  
406 - }  
407 -  
408 - .praise_text {  
409 - padding: 20rpx 0;  
410 - box-sizing: border-box;  
411 - font-size: 28rpx;  
412 - }  
413 -  
414 - .imgsnox {  
415 - display: flex;  
416 - flex-wrap: wrap;  
417 - width: 100%;  
418 -  
419 - .imgs {  
420 - width: 24%;  
421 - height: 172rpx;  
422 - margin: 5rpx 2rpx;  
423 -  
424 - image {  
425 - border-radius: 12rpx;  
426 - width: 100%;  
427 - height: 100%;  
428 - }  
429 - }  
430 - }  
431 -  
432 - }  
433 -  
434 - .d {  
435 - padding: 32rpx;  
436 - box-sizing: border-box;  
437 - }  
438 - }  
439 -  
440 -  
441 - /* 立刻购买 */  
442 - .box_buy {  
443 - width: 100%;  
444 - background-color: #fff;  
445 - border-top: solid 1rpx #F9F9F9;  
446 - position: fixed;  
447 - bottom: 0;  
448 - left: 0;  
449 -  
450 - .dowu {  
451 - width: 100%;  
452 - padding: 20rpx 32rpx;  
453 - box-sizing: border-box;  
454 - display: flex;  
455 - align-items: center;  
456 -  
457 - .kefu {  
458 - width: 44rpx;  
459 - height: 44rpx;  
460 - display: flex;  
461 - align-items: center;  
462 - justify-content: center;  
463 - position: relative;  
464 - margin-right: 20rpx;  
465 -  
466 - .transparent {  
467 - background: transparent;  
468 - top: 0rpx;  
469 - left: 0;  
470 - border: none;  
471 - // border: 1rpx solid royalblue;  
472 - position: absolute;  
473 - width: 48rpx;  
474 - height: 48rpx;  
475 - padding: 0;  
476 - }  
477 -  
478 - .img1 {  
479 - width: 44rpx;  
480 - height: 44rpx;  
481 - flex-shrink: 0;  
482 - }  
483 - }  
484 -  
485 - .buy {  
486 - flex: 1;  
487 - display: flex;  
488 - align-items: center;  
489 -  
490 -  
491 - .bind {  
492 - width: 300rpx !important;  
493 - height: 68rpx;  
494 - color: #fff;  
495 - line-height: 68rpx;  
496 - padding: 0;  
497 - font-weight: 400;  
498 - margin-right: 20rpx !important;  
499 - font-size: 28rpx;  
500 -  
501 - &:last-child {  
502 - margin-right: 0 !important;  
503 - }  
504 - }  
505 -  
506 - .btn1 {  
507 - background-color: #FFBA00;  
508 - }  
509 -  
510 - .btn2 {  
511 - background-color: #E8370F;  
512 - }  
513 -  
514 - button {  
515 - margin: 0 !important;  
516 - padding: 0 !important;  
517 - }  
518 - }  
519 - }  
520 -  
521 - }  
522 -  
523 - // 弹窗  
524 - /*使屏幕变暗 */  
525 - .commodity_screen {  
526 - width: 100%;  
527 - height: 100%;  
528 - position: fixed;  
529 - top: 0;  
530 - left: 0;  
531 - background: #000;  
532 - opacity: 0.2;  
533 - overflow: hidden;  
534 - z-index: 1000;  
535 - color: #fff;  
536 - }  
537 -  
538 - /*对话框 */  
539 - .commodity_attr_box {  
540 - height: 500rpx;  
541 - width: 100%;  
542 - overflow: hidden;  
543 - position: fixed;  
544 - bottom: 0;  
545 - left: 0;  
546 - z-index: 2000;  
547 - background: #fff;  
548 - padding: 20rpx;  
549 - box-sizing: border-box;  
550 -  
551 - .updown {  
552 - width: 100%;  
553 - text-align: right;  
554 -  
555 - image {  
556 - width: 40rpx;  
557 - height: 40rpx;  
558 - }  
559 - }  
560 -  
561 - .buyStore {  
562 - display: flex;  
563 - align-items: center;  
564 -  
565 - .storeImg {  
566 - width: 184rpx;  
567 - height: 184rpx;  
568 -  
569 - image {  
570 - width: 100%;  
571 - }  
572 - }  
573 -  
574 - .store_cont {  
575 - height: 184rpx;  
576 - flex: 1;  
577 - padding-left: 20rpx;  
578 - box-sizing: border-box;  
579 - display: flex;  
580 - flex-direction: column;  
581 - justify-content: space-around;  
582 -  
583 - .store_cont_name {  
584 -  
585 - // line-height: 30rpx;  
586 -  
587 -  
588 - text {  
589 - font-size: 28rpx;  
590 - line-height: 30rpx;  
591 - font-weight: bold;  
592 - }  
593 - }  
594 -  
595 - .storeMoney {  
596 -  
597 - // margin-top: 30rpx;  
598 - .icon_money {  
599 - font-size: 24rpx;  
600 - line-height: 30rpx;  
601 - font-weight: bold;  
602 - }  
603 -  
604 - text {  
605 - font-size: 28rpx;  
606 - color: #E8370F;  
607 - line-height: 30rpx;  
608 - font-weight: 600;  
609 - }  
610 -  
611 - }  
612 -  
613 - .yichange {  
614 -  
615 - // margin-top: 15rpx;  
616 - .change__ {  
617 - font-size: 28rpx;  
618 - line-height: 30rpx;  
619 - font-weight: 600;  
620 - margin-right: 20rpx;  
621 - }  
622 - }  
623 -  
624 - }  
625 -  
626 - }  
627 -  
628 - .rules {  
629 - margin-top: 20rpx;  
630 -  
631 - .left_num {  
632 - display: flex;  
633 - flex-direction: column;  
634 -  
635 - .guiName {  
636 - font-size: 28rpx;  
637 - line-height: 40rpx;  
638 - font-weight: bold;  
639 - margin: 20rpx 0;  
640 - }  
641 -  
642 - .rules_change {  
643 - display: flex;  
644 - align-items: center;  
645 - flex-wrap: wrap;  
646 -  
647 - .down {  
648 - padding: 5rpx 30rpx;  
649 - box-sizing: border-box;  
650 - margin: 10rpx 20rpx;  
651 - background-color: #f9f9f9;  
652 - border-radius: 10rpx;  
653 -  
654 - .aaatext {  
655 - color: #000;  
656 - text-align: center;  
657 - font-size: 26rpx;  
658 - line-height: 50rpx;  
659 - }  
660 - }  
661 - }  
662 -  
663 -  
664 - }  
665 -  
666 -  
667 -  
668 -  
669 -  
670 - }  
671 -  
672 - .number {  
673 - width: 100%;  
674 - display: flex;  
675 - align-items: center;  
676 - justify-content: space-between;  
677 - margin-top: 50rpx;  
678 - padding: 0 10rpx;  
679 - box-sizing: border-box;  
680 -  
681 - .left_num {  
682 - font-size: 28rpx;  
683 - line-height: 40rpx;  
684 - font-weight: 600;  
685 -  
686 - }  
687 -  
688 - .right_num {  
689 - display: flex;  
690 - align-items: center;  
691 -  
692 - .itemImg_ {  
693 - width: 40rpx;  
694 - height: 40rpx;  
695 -  
696 - image {  
697 - width: 100%;  
698 - }  
699 - }  
700 -  
701 - .center_num {  
702 - margin: 0 10rpx;  
703 - width: 60rpx;  
704 - text-align: center;  
705 - }  
706 - }  
707 - }  
708 -  
709 - .btnbuy {  
710 - width: 100%;  
711 - position: fixed;  
712 - bottom: 0;  
713 - padding: 0;  
714 -  
715 - .btnbuy__ {  
716 - height: 70rpx;  
717 - width: 92%;  
718 - color: #fff;  
719 - line-height: 70rpx;  
720 - padding: 0;  
721 - margin: 0 10rpx 10rpx;  
722 - box-sizing: border-box;  
723 - font-weight: 400;  
724 - background-color: #E8370F;  
725 - border-radius: 36rpx;  
726 - font-size: 28rpx;  
727 - }  
728 - }  
729 -  
730 -  
731 - }  
732 -  
733 - .active_tag {  
734 - border: 2rpx solid rgba(232, 55, 15, 1);  
735 -  
736 - .text {  
737 - color: rgba(232, 55, 15, 1);  
738 - }  
739 - }  
740 -  
741 - /* 弹窗 */  
742 - .zan_dialog {  
743 - width: 100%;  
744 - height: 100%;  
745 - position: fixed;  
746 - top: 0;  
747 - left: 0;  
748 - background: #000;  
749 - opacity: 0.5;  
750 - overflow: hidden;  
751 - z-index: 1000;  
752 - color: #fff;  
753 - }  
754 -  
755 - .phoneshou {  
756 - height: 500rpx;  
757 - width: 100%;  
758 - overflow: hidden;  
759 - position: fixed;  
760 - bottom: 0;  
761 - left: 0;  
762 - z-index: 2000;  
763 - background: #fff;  
764 - padding: 32rpx 32rpx 0;  
765 - box-sizing: border-box;  
766 - border-radius: 24rpx 24rpx 0 0;  
767 -  
768 - .padlock {  
769 - width: 100%;  
770 - height: 48rpx;  
771 - display: flex;  
772 - align-items: center;  
773 - justify-content: flex-end;  
774 -  
775 - image {  
776 - width: 48rpx;  
777 - height: 48rpx;  
778 - }  
779 - }  
780 -  
781 - .phone_title {  
782 - width: 100%;  
783 - height: 70rpx;  
784 - font-size: 44rpx;  
785 - line-height: 70rpx;  
786 - color: #06121F;  
787 - font-family: PingFangSC, PingFangSC-Regular;  
788 -  
789 -  
790 - }  
791 -  
792 - .tips_content {  
793 - width: 100%;  
794 - font-size: 32rpx;  
795 - line-height: 60rpx;  
796 - color: #8C9198;  
797 - padding: 30rpx 0;  
798 - box-sizing: border-box;  
799 - }  
800 -  
801 - .downbtn {  
802 - width: 750rpx;  
803 - position: fixed;  
804 - bottom: 0;  
805 - right: 0;  
806 - padding: 20rpx 0;  
807 - background-color: #fff;  
808 -  
809 - .btn {  
810 - height: 100rpx;  
811 - width: 90%;  
812 - color: #fff;  
813 - padding: 0;  
814 - box-sizing: border-box;  
815 - font-size: 32rpx;  
816 - background-color: #00C25F;  
817 - display: flex;  
818 - align-items: center;  
819 - justify-content: center;  
820 - border-radius: 50rpx;  
821 -  
822 - image {  
823 - width: 48rpx;  
824 - height: 48rpx;  
825 - margin-right: 20rpx;  
826 - }  
827 -  
828 - }  
829 -  
830 - .btn1 {  
831 - margin-bottom: 20rpx;  
832 - background-color: #ccc;  
833 - }  
834 - }  
835 -  
836 - }  
837 - 1 +.container {
  2 + height: 100%;
  3 + background-color: #F9F9F9;
  4 +
  5 + .top_img {
  6 + width: 100%;
  7 + height: 750rpx;
  8 +
  9 + .banner {
  10 + width: 100%;
  11 + height: 100%;
  12 +
  13 + image {
  14 + width: 100%;
  15 + height: 100%;
  16 + }
  17 + }
  18 + }
  19 +
  20 + .cards {
  21 + width: 100%;
  22 + padding: 14rpx 0rpx 0;
  23 + box-sizing: border-box;
  24 +
  25 + .card {
  26 + width: 100%;
  27 + padding: 30rpx;
  28 + box-sizing: border-box;
  29 + background-color: #fff;
  30 +
  31 + .ittt {
  32 + display: flex;
  33 + position: relative;
  34 +
  35 + .tent_name {
  36 + flex: 1;
  37 +
  38 + .card_text {
  39 + width: 100%;
  40 + font-size: 32rpx;
  41 + color: #06121F;
  42 + font-weight: bold;
  43 + }
  44 +
  45 + .zan_price {
  46 + width: 100%;
  47 + display: flex;
  48 + align-items: baseline;
  49 + margin-top: 10rpx;
  50 +
  51 + .money_icon {
  52 + font-size: 20rpx;
  53 + color: #FF444B;
  54 + font-weight: 600;
  55 + }
  56 +
  57 + .price_big {
  58 + color: #FF444B;
  59 + font-size: 32rpx;
  60 + font-weight: 600;
  61 + }
  62 + }
  63 + }
  64 +
  65 +
  66 +
  67 + .imgbtns {
  68 + width: 60rpx;
  69 + box-sizing: border-box;
  70 + display: flex;
  71 + flex-direction: column;
  72 + align-items: flex-end;
  73 + // justify-content: space-between;
  74 +
  75 + .s_btn {
  76 + width: 48rpx;
  77 + height: 48rpx;
  78 +
  79 + image {
  80 + width: 100%;
  81 + flex: 0 auto;
  82 + }
  83 + }
  84 +
  85 + .mm {
  86 + margin: 10rpx 0;
  87 + box-sizing: border-box;
  88 + }
  89 +
  90 +
  91 +
  92 + button {
  93 + background-color: transparent;
  94 + padding: 0;
  95 + }
  96 +
  97 + .buttonShare {
  98 + // border: 1rpx solid red;
  99 + position: absolute;
  100 + top: 55rpx;
  101 + right: 0;
  102 + width: 60rpx;
  103 + height: 60rpx;
  104 + z-index: 5;
  105 + }
  106 + }
  107 + }
  108 +
  109 + .store_guide_price {
  110 + width: 100%;
  111 + display: flex;
  112 + align-items: center;
  113 +
  114 + text {
  115 + font-size: 24rpx;
  116 + line-height: 34rpx;
  117 + margin-right: 20rpx;
  118 + }
  119 +
  120 + .imgs_downArrow {
  121 + height: 24rpx;
  122 + line-height: 34rpx;
  123 + display: flex;
  124 + align-items: center;
  125 +
  126 + .imgs_down {
  127 + width: 33rpx;
  128 + height: 100%;
  129 + }
  130 +
  131 + text {
  132 + font-size: 24rpx;
  133 + color: #00C116;
  134 + }
  135 + }
  136 + }
  137 +
  138 + .card_box {
  139 + width: 100%;
  140 + display: flex;
  141 +
  142 + .card_left {
  143 + flex: 1;
  144 + align-items: center;
  145 + line-height: 55rpx;
  146 +
  147 + .price_dP {
  148 + display: flex;
  149 + align-items: center;
  150 +
  151 + .del {
  152 + display: flex;
  153 + margin-left: 10rpx;
  154 +
  155 + .del_price {
  156 + color: #ccc;
  157 + font-size: 24rpx;
  158 + text-decoration: line-through;
  159 +
  160 + }
  161 +
  162 + .money_icon {
  163 +
  164 + font-size: 24rpx;
  165 + line-height: 52rpx;
  166 + color: #ccc;
  167 + }
  168 + }
  169 +
  170 + .zan_price {
  171 + display: flex;
  172 + align-items: flex-end;
  173 + align-items: baseline;
  174 +
  175 + .icon_name {
  176 + font-size: 28rpx;
  177 + color: #FF444B;
  178 + }
  179 +
  180 + .money_icon {
  181 + margin-left: 10rpx;
  182 + font-size: 20rpx;
  183 + color: #FF444B;
  184 + font-weight: 600;
  185 + }
  186 +
  187 + .price_big {
  188 + color: #FF444B;
  189 + font-size: 32rpx;
  190 + font-weight: 600;
  191 + }
  192 + }
  193 + }
  194 +
  195 + .num_buy {
  196 + font-size: 28rpx;
  197 + display: flex;
  198 + align-items: center;
  199 +
  200 + .sales {
  201 + font-size: 28rpx;
  202 + }
  203 +
  204 + .sales_per {
  205 + margin-left: 5rpx;
  206 + font-size: 28rpx;
  207 + line-height: 63rpx;
  208 + }
  209 + }
  210 + }
  211 +
  212 + .card_right {
  213 + flex: 1;
  214 + align-items: center;
  215 + line-height: 55rpx;
  216 + padding-left: 20rpx;
  217 + box-sizing: border-box;
  218 +
  219 + .collar {
  220 + font-size: 24rpx;
  221 + color: #000;
  222 + }
  223 +
  224 + .count_num {
  225 + font-size: 26rpx;
  226 + }
  227 +
  228 + }
  229 + }
  230 + }
  231 +
  232 + }
  233 +
  234 + .chefuWu {
  235 + width: 100%;
  236 + display: flex;
  237 + justify-content: space-between;
  238 + padding: 20rpx 50rpx;
  239 + box-sizing: border-box;
  240 + border-radius: 8rpx;
  241 + background-color: #fff;
  242 + margin: 20rpx 0;
  243 + align-items: center;
  244 +
  245 + .c {
  246 + flex: 1;
  247 +
  248 + .icon_conte {
  249 + margin-top: 10rpx;
  250 + width: 100%;
  251 + display: flex;
  252 + align-items: center;
  253 +
  254 + .fw {
  255 + display: flex;
  256 + align-items: center;
  257 + margin-right: 20rpx;
  258 +
  259 + .icon_fw {
  260 + width: 48rpx;
  261 + height: 48rpx;
  262 +
  263 + image {
  264 + width: 100%;
  265 + }
  266 + }
  267 +
  268 + .icon_title {
  269 + margin-left: 10rpx;
  270 + font-size: 24rpx;
  271 + font-weight: bold;
  272 + color: #E8370F;
  273 + }
  274 + }
  275 +
  276 + .pubone {
  277 + margin-left: 20rpx;
  278 + }
  279 +
  280 + .pub {
  281 + color: #666666;
  282 + font-size: 24rpx;
  283 + margin-right: 20rpx;
  284 + }
  285 + }
  286 + }
  287 +
  288 + .icon_img {
  289 + width: 35rpx;
  290 + font-size: 38rpx;
  291 +
  292 + }
  293 + }
  294 +
  295 + /* 详情 评价 */
  296 + .details {
  297 + width: 100%;
  298 + height: 130rpx;
  299 + background-color: #fff;
  300 + padding: 32rpx 32rpx;
  301 + box-sizing: border-box;
  302 + display: flex;
  303 +
  304 + .details_name {
  305 + font-size: 28rpx;
  306 + height: 90rpx;
  307 + line-height: 90rpx;
  308 + }
  309 +
  310 + .appraise_name {
  311 + font-size: 28rpx;
  312 + height: 90rpx;
  313 + line-height: 90rpx;
  314 + margin: 0 70rpx;
  315 + }
  316 +
  317 + .cur {
  318 + border-bottom: 4rpx solid #E8370F;
  319 + font-weight: 700;
  320 + font-size: 36rpx !important;
  321 + }
  322 + }
  323 +
  324 + .details_box {
  325 + padding-bottom: 120rpx;
  326 +
  327 + .details_img {
  328 + width: 100%;
  329 + padding: 24rpx 18rpx 32rpx;
  330 + box-sizing: border-box;
  331 + background-color: #f5f5f5;
  332 +
  333 + image {
  334 + visibility: middle;
  335 + }
  336 + }
  337 +
  338 + // 评价内容
  339 + .praise_content {
  340 + width: 100%;
  341 + padding: 32rpx 32rpx;
  342 +
  343 + box-sizing: border-box;
  344 +
  345 + .person_content {
  346 + display: flex;
  347 +
  348 + justify-content: space-between;
  349 +
  350 + .left_ziliao {
  351 + display: flex;
  352 +
  353 + align-items: center;
  354 +
  355 + .imgNum {
  356 + width: 80rpx;
  357 + height: 80rpx;
  358 +
  359 + image {
  360 + width: 100%;
  361 + }
  362 + }
  363 +
  364 + .per_item {
  365 + display: flex;
  366 +
  367 + justify-content: space-between;
  368 + flex-direction: column;
  369 + height: 80rpx;
  370 + margin-left: 20rpx;
  371 +
  372 + .nickname {
  373 + font-size: 28rpx;
  374 + line-height: 40rpx;
  375 + font-weight: 600;
  376 + }
  377 +
  378 + .dateTime {
  379 + color: #BDC4CE;
  380 + font-size: 24rpx;
  381 + line-height: 34rpx;
  382 + }
  383 + }
  384 +
  385 + }
  386 +
  387 + .praise_star {
  388 + width: 140rpx;
  389 + display: flex;
  390 + align-items: center;
  391 +
  392 +
  393 + image {
  394 + width: 48rpx;
  395 + height: 48rpx;
  396 +
  397 + }
  398 +
  399 + text {
  400 + margin-left: 20rpx;
  401 + font-size: 28rpx;
  402 + line-height: 40rpx;
  403 + }
  404 + }
  405 +
  406 + }
  407 +
  408 + .praise_text {
  409 + padding: 20rpx 0;
  410 + box-sizing: border-box;
  411 + font-size: 28rpx;
  412 + }
  413 +
  414 + .imgsnox {
  415 + display: flex;
  416 + flex-wrap: wrap;
  417 + width: 100%;
  418 +
  419 + .imgs {
  420 + width: 24%;
  421 + height: 172rpx;
  422 + margin: 5rpx 2rpx;
  423 +
  424 + image {
  425 + border-radius: 12rpx;
  426 + width: 100%;
  427 + height: 100%;
  428 + }
  429 + }
  430 + }
  431 +
  432 + }
  433 +
  434 + .d {
  435 + padding: 32rpx;
  436 + box-sizing: border-box;
  437 + }
  438 + }
  439 +
  440 +
  441 + /* 立刻购买 */
  442 + .box_buy {
  443 + width: 100%;
  444 + background-color: #fff;
  445 + border-top: solid 1rpx #F9F9F9;
  446 + position: fixed;
  447 + bottom: 0;
  448 + left: 0;
  449 +
  450 + .dowu {
  451 + width: 100%;
  452 + padding: 20rpx 32rpx;
  453 + box-sizing: border-box;
  454 + display: flex;
  455 + align-items: center;
  456 +
  457 + .kefu {
  458 + width: 44rpx;
  459 + height: 44rpx;
  460 + display: flex;
  461 + align-items: center;
  462 + justify-content: center;
  463 + position: relative;
  464 + margin-right: 20rpx;
  465 +
  466 + .transparent {
  467 + background: transparent;
  468 + top: 0rpx;
  469 + left: 0;
  470 + border: none;
  471 + // border: 1rpx solid royalblue;
  472 + position: absolute;
  473 + width: 48rpx;
  474 + height: 48rpx;
  475 + padding: 0;
  476 + }
  477 +
  478 + .img1 {
  479 + width: 44rpx;
  480 + height: 44rpx;
  481 + flex-shrink: 0;
  482 + }
  483 + }
  484 +
  485 + .buy {
  486 + flex: 1;
  487 + display: flex;
  488 + align-items: center;
  489 +
  490 +
  491 + .bind {
  492 + width: 300rpx !important;
  493 + height: 68rpx;
  494 + color: #fff;
  495 + line-height: 68rpx;
  496 + padding: 0;
  497 + font-weight: 400;
  498 + margin-right: 20rpx !important;
  499 + font-size: 28rpx;
  500 +
  501 + &:last-child {
  502 + margin-right: 0 !important;
  503 + }
  504 + }
  505 +
  506 + .btn1 {
  507 + background-color: #FFBA00;
  508 + }
  509 +
  510 + .btn2 {
  511 + background-color: #E8370F;
  512 + }
  513 +
  514 + button {
  515 + margin: 0 !important;
  516 + padding: 0 !important;
  517 + }
  518 + }
  519 + }
  520 +
  521 + }
  522 +
  523 + // 弹窗
  524 + /*使屏幕变暗 */
  525 + .commodity_screen {
  526 + width: 100%;
  527 + height: 100%;
  528 + position: fixed;
  529 + top: 0;
  530 + left: 0;
  531 + background: #000;
  532 + opacity: 0.2;
  533 + overflow: hidden;
  534 + z-index: 1000;
  535 + color: #fff;
  536 + }
  537 +
  538 + /*对话框 */
  539 + .commodity_attr_box {
  540 + height: 500rpx;
  541 + width: 100%;
  542 + overflow: hidden;
  543 + position: fixed;
  544 + bottom: 0;
  545 + left: 0;
  546 + z-index: 2000;
  547 + background: #fff;
  548 + padding: 20rpx;
  549 + box-sizing: border-box;
  550 +
  551 + .updown {
  552 + width: 100%;
  553 + text-align: right;
  554 +
  555 + image {
  556 + width: 40rpx;
  557 + height: 40rpx;
  558 + }
  559 + }
  560 +
  561 + .buyStore {
  562 + display: flex;
  563 + align-items: center;
  564 +
  565 + .storeImg {
  566 + width: 184rpx;
  567 + height: 184rpx;
  568 +
  569 + image {
  570 + width: 100%;
  571 + }
  572 + }
  573 +
  574 + .store_cont {
  575 + height: 184rpx;
  576 + flex: 1;
  577 + padding-left: 20rpx;
  578 + box-sizing: border-box;
  579 + display: flex;
  580 + flex-direction: column;
  581 + justify-content: space-around;
  582 +
  583 + .store_cont_name {
  584 +
  585 + // line-height: 30rpx;
  586 +
  587 +
  588 + text {
  589 + font-size: 28rpx;
  590 + line-height: 30rpx;
  591 + font-weight: bold;
  592 + }
  593 + }
  594 +
  595 + .storeMoney {
  596 +
  597 + // margin-top: 30rpx;
  598 + .icon_money {
  599 + font-size: 24rpx;
  600 + line-height: 30rpx;
  601 + font-weight: bold;
  602 + }
  603 +
  604 + text {
  605 + font-size: 28rpx;
  606 + color: #E8370F;
  607 + line-height: 30rpx;
  608 + font-weight: 600;
  609 + }
  610 +
  611 + }
  612 +
  613 + .yichange {
  614 +
  615 + // margin-top: 15rpx;
  616 + .change__ {
  617 + font-size: 28rpx;
  618 + line-height: 30rpx;
  619 + font-weight: 600;
  620 + margin-right: 20rpx;
  621 + }
  622 + }
  623 +
  624 + }
  625 +
  626 + }
  627 +
  628 + .rules {
  629 + margin-top: 20rpx;
  630 +
  631 + .left_num {
  632 + display: flex;
  633 + flex-direction: column;
  634 +
  635 + .guiName {
  636 + font-size: 28rpx;
  637 + line-height: 40rpx;
  638 + font-weight: bold;
  639 + margin: 20rpx 0;
  640 + }
  641 +
  642 + .rules_change {
  643 + display: flex;
  644 + align-items: center;
  645 + flex-wrap: wrap;
  646 +
  647 + .down {
  648 + padding: 5rpx 30rpx;
  649 + box-sizing: border-box;
  650 + margin: 10rpx 20rpx;
  651 + background-color: #f9f9f9;
  652 + border-radius: 10rpx;
  653 +
  654 + .aaatext {
  655 + color: #000;
  656 + text-align: center;
  657 + font-size: 26rpx;
  658 + line-height: 50rpx;
  659 + }
  660 + }
  661 + }
  662 +
  663 +
  664 + }
  665 +
  666 +
  667 +
  668 +
  669 +
  670 + }
  671 +
  672 + .number {
  673 + width: 100%;
  674 + display: flex;
  675 + align-items: center;
  676 + justify-content: space-between;
  677 + margin-top: 50rpx;
  678 + padding: 0 10rpx;
  679 + box-sizing: border-box;
  680 +
  681 + .left_num {
  682 + font-size: 28rpx;
  683 + line-height: 40rpx;
  684 + font-weight: 600;
  685 +
  686 + }
  687 +
  688 + .right_num {
  689 + display: flex;
  690 + align-items: center;
  691 +
  692 + .itemImg_ {
  693 + width: 40rpx;
  694 + height: 40rpx;
  695 +
  696 + image {
  697 + width: 100%;
  698 + }
  699 + }
  700 +
  701 + .center_num {
  702 + margin: 0 10rpx;
  703 + width: 60rpx;
  704 + text-align: center;
  705 + }
  706 + }
  707 + }
  708 +
  709 + .btnbuy {
  710 + width: 100%;
  711 + position: fixed;
  712 + bottom: 0;
  713 + padding: 0;
  714 +
  715 + .btnbuy__ {
  716 + height: 70rpx;
  717 + width: 92%;
  718 + color: #fff;
  719 + line-height: 70rpx;
  720 + padding: 0;
  721 + margin: 0 10rpx 10rpx;
  722 + box-sizing: border-box;
  723 + font-weight: 400;
  724 + background-color: #E8370F;
  725 + border-radius: 36rpx;
  726 + font-size: 28rpx;
  727 + }
  728 + }
  729 +
  730 +
  731 + }
  732 +
  733 + .active_tag {
  734 + border: 2rpx solid rgba(232, 55, 15, 1);
  735 +
  736 + .text {
  737 + color: rgba(232, 55, 15, 1);
  738 + }
  739 + }
  740 +
  741 + /* 弹窗 */
  742 + .zan_dialog {
  743 + width: 100%;
  744 + height: 100%;
  745 + position: fixed;
  746 + top: 0;
  747 + left: 0;
  748 + background: #000;
  749 + opacity: 0.5;
  750 + overflow: hidden;
  751 + z-index: 1000;
  752 + color: #fff;
  753 + }
  754 +
  755 + .phoneshou {
  756 + height: 500rpx;
  757 + width: 100%;
  758 + overflow: hidden;
  759 + position: fixed;
  760 + bottom: 0;
  761 + left: 0;
  762 + z-index: 2000;
  763 + background: #fff;
  764 + padding: 32rpx 32rpx 0;
  765 + box-sizing: border-box;
  766 + border-radius: 24rpx 24rpx 0 0;
  767 +
  768 + .padlock {
  769 + width: 100%;
  770 + height: 48rpx;
  771 + display: flex;
  772 + align-items: center;
  773 + justify-content: flex-end;
  774 +
  775 + image {
  776 + width: 48rpx;
  777 + height: 48rpx;
  778 + }
  779 + }
  780 +
  781 + .phone_title {
  782 + width: 100%;
  783 + height: 70rpx;
  784 + font-size: 44rpx;
  785 + line-height: 70rpx;
  786 + color: #06121F;
  787 + font-family: PingFangSC, PingFangSC-Regular;
  788 +
  789 +
  790 + }
  791 +
  792 + .tips_content {
  793 + width: 100%;
  794 + font-size: 32rpx;
  795 + line-height: 60rpx;
  796 + color: #8C9198;
  797 + padding: 30rpx 0;
  798 + box-sizing: border-box;
  799 + }
  800 +
  801 + .downbtn {
  802 + width: 750rpx;
  803 + position: fixed;
  804 + bottom: 0;
  805 + right: 0;
  806 + padding: 20rpx 0;
  807 + background-color: #fff;
  808 +
  809 + .btn {
  810 + height: 100rpx;
  811 + width: 90%;
  812 + color: #fff;
  813 + padding: 0;
  814 + box-sizing: border-box;
  815 + font-size: 32rpx;
  816 + background-color: #00C25F;
  817 + display: flex;
  818 + align-items: center;
  819 + justify-content: center;
  820 + border-radius: 50rpx;
  821 +
  822 + image {
  823 + width: 48rpx;
  824 + height: 48rpx;
  825 + margin-right: 20rpx;
  826 + }
  827 +
  828 + }
  829 +
  830 + .btn1 {
  831 + margin-bottom: 20rpx;
  832 + background-color: #ccc;
  833 + }
  834 + }
  835 +
  836 + }
  837 +
838 } 838 }
@@ -118,21 +118,5 @@ @@ -118,21 +118,5 @@
118 </view> 118 </view>
119 </view> 119 </view>
120 </view> 120 </view>
121 - <!-- 弹窗 -->  
122 - <view class="zan_dialog" catchtap="toggleDialog" wx:if="{{showDialog}}"></view>  
123 - <view class="phoneshou" wx:if="{{showDialog}}">  
124 - <view class="padlock" catchtap="toggleDialog">  
125 - <image src="{{imagesUrl}}assets/static/img/updown.png" />  
126 - </view>  
127 - <view class="phone_title">请先授权登录</view>  
128 - <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>  
129 - <view class="downbtn">  
130 - <view class="si_box">  
131 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
132 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
133 - 微信授权登录  
134 - </button>  
135 - </view>  
136 - </view>  
137 - </view> 121 + <lfy-login id="lfyLogin" />
138 </view> 122 </view>
@@ -36,7 +36,6 @@ Page({ @@ -36,7 +36,6 @@ Page({
36 onLoad: function (options) { 36 onLoad: function (options) {
37 console.log(options, "options"); 37 console.log(options, "options");
38 let that = this 38 let that = this
39 - let token = wx.getStorageSync('token')  
40 let user_id = wx.getStorageSync('user_id') 39 let user_id = wx.getStorageSync('user_id')
41 console.log(user_id, "wode user_id"); 40 console.log(user_id, "wode user_id");
42 if (!options.scene) { 41 if (!options.scene) {
@@ -70,11 +69,6 @@ Page({ @@ -70,11 +69,6 @@ Page({
70 } 69 }
71 that.getDetailsContent() 70 that.getDetailsContent()
72 that.getPingList() 71 that.getPingList()
73 - // if (token) {  
74 -  
75 - // } else {  
76 - // that.getToken()  
77 - // }  
78 }, 72 },
79 onShow: function () { 73 onShow: function () {
80 74
@@ -136,7 +130,7 @@ Page({ @@ -136,7 +130,7 @@ Page({
136 content: '您尚未登录,请登录后操作', 130 content: '您尚未登录,请登录后操作',
137 success: function (res) { 131 success: function (res) {
138 if (res.confirm) { 132 if (res.confirm) {
139 - that.showModal1() 133 + that.selectComponent('#lfyLogin').getLogin('hh')
140 } else { 134 } else {
141 console.log('点击取消回调') 135 console.log('点击取消回调')
142 wx.navigateBack() 136 wx.navigateBack()
@@ -365,26 +359,6 @@ Page({ @@ -365,26 +359,6 @@ Page({
365 }) 359 })
366 }.bind(this), 100) 360 }.bind(this), 100)
367 }, 361 },
368 - showModal1() { //显示对话框  
369 - // 显示遮罩层  
370 - var animation = wx.createAnimation({  
371 - duration: 200,  
372 - timingFunction: "linear",  
373 - delay: 0  
374 - })  
375 - this.animation = animation  
376 - animation.translateY(300).step()  
377 - this.setData({  
378 - animationData: animation.export(),  
379 - showModalStatu: true  
380 - })  
381 - setTimeout(function () {  
382 - animation.translateY(0).step()  
383 - this.setData({  
384 - animationData: animation.export()  
385 - })  
386 - }.bind(this), 100)  
387 - },  
388 hideModal() { //隐藏对话框 362 hideModal() { //隐藏对话框
389 // 隐藏遮罩层 363 // 隐藏遮罩层
390 var animation = wx.createAnimation({ 364 var animation = wx.createAnimation({
@@ -405,26 +379,6 @@ Page({ @@ -405,26 +379,6 @@ Page({
405 }) 379 })
406 }.bind(this), 100) 380 }.bind(this), 100)
407 }, 381 },
408 - hideModal1() { //隐藏对话框  
409 - // 隐藏遮罩层  
410 - var animation = wx.createAnimation({  
411 - duration: 200,  
412 - timingFunction: "linear",  
413 - delay: 0  
414 - })  
415 - this.animation = animation  
416 - animation.translateY(300).step()  
417 - this.setData({  
418 - animationData: animation.export(),  
419 - })  
420 - setTimeout(function () {  
421 - animation.translateY(0).step()  
422 - this.setData({  
423 - animationData: animation.export(),  
424 - showModalStatu: false  
425 - })  
426 - }.bind(this), 100)  
427 - },  
428 countMinus() { // 商品数量减 382 countMinus() { // 商品数量减
429 let that = this 383 let that = this
430 let a = that.data.num - 1 384 let a = that.data.num - 1
@@ -503,44 +457,6 @@ Page({ @@ -503,44 +457,6 @@ Page({
503 // console.log(texts) 457 // console.log(texts)
504 return texts; 458 return texts;
505 }, 459 },
506 - bindGetUserInfo(e) { // 立即授权  
507 - let that = this;  
508 - wx.login({  
509 - success(res) {  
510 - console.log(res);  
511 - that.setData({  
512 - code: res.code  
513 - })  
514 - request({  
515 - url: 'api/common/login',  
516 - method: "POST",  
517 - data: {  
518 - rawData: e.detail.rawData,  
519 - code: that.data.code,  
520 - }  
521 - })  
522 - .then(res => {  
523 - console.log(res);  
524 - if (res.data.code == 1) {  
525 - wx.setStorageSync('token', res.data.data.userInfo.token);  
526 - wx.setStorageSync('avatar', res.data.data.userInfo.avatar);  
527 - wx.setStorageSync('name', res.data.data.userInfo.nickname);  
528 - wx.setStorageSync('user_id', res.data.data.userInfo.user_id);  
529 -  
530 - }  
531 - console.log(res.data.data.userInfo.token);  
532 - that.hideModal1()  
533 - that.setData({  
534 - msg: res.data.msg  
535 - })  
536 - that.popSuccessTest();  
537 - that.getDetailsContent()  
538 - }).catch(err => {  
539 - console.log(err);  
540 - })  
541 - }  
542 - })  
543 - },  
544 popSuccessTest() { 460 popSuccessTest() {
545 wx.showToast({ 461 wx.showToast({
546 title: this.data.msg, 462 title: this.data.msg,
@@ -548,7 +464,10 @@ Page({ @@ -548,7 +464,10 @@ Page({
548 duration: 1300, //停留时间 464 duration: 1300, //停留时间
549 }) 465 })
550 }, 466 },
551 - 467 + bindistoken() {
  468 + this.getDetailsContent()
  469 + console.log('我回来了');
  470 + },
552 471
553 472
554 }) 473 })
1 { 1 {
2 "usingComponents": { 2 "usingComponents": {
  3 + "lfy-login":"../../Components/lfylogin"
3 }, 4 },
4 "navigationBarTitleText": "商品详情" 5 "navigationBarTitleText": "商品详情"
5 } 6 }
@@ -258,27 +258,5 @@ @@ -258,27 +258,5 @@
258 </button> 258 </button>
259 </view> 259 </view>
260 </view> 260 </view>
261 - <!-- 授权登录 -->  
262 - <view class="login">  
263 - <!-- 屏幕背景变暗的背景 -->  
264 - <view class="commodity_screen" bindtap="hideModal1" wx:if="{{showModalStatu}}"></view>  
265 - <!-- 弹出框 -->  
266 - <view animation="{{animationData}}" class="commodity_attr_box" wx:if="{{showModalStatu}}">  
267 - <view class="phoneshou">  
268 - <view class="padlock" catchtap="hideModal1">  
269 - <image src="{{imagesUrl}}assets/static/img/updown.png" />  
270 - </view>  
271 - <view class="phone_title">请先授权登录</view>  
272 - <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>  
273 - <view class="downbtn">  
274 - <view class="si_box">  
275 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
276 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
277 - 微信授权登录  
278 - </button>  
279 - </view>  
280 - </view>  
281 - </view>  
282 - </view>  
283 - </view> 261 + <lfy-login id="lfyLogin" bind:istoken="bindistoken" />
284 </view> 262 </view>
@@ -43,7 +43,8 @@ Page({ @@ -43,7 +43,8 @@ Page({
43 content: '您尚未登录,请登录后操作', 43 content: '您尚未登录,请登录后操作',
44 success: function (res) { 44 success: function (res) {
45 if (res.confirm) { 45 if (res.confirm) {
46 - that.showModal() 46 + // that.showModal()
  47 + that.selectComponent('#lfyLogin').getLogin('hh')
47 } else { 48 } else {
48 wx.switchTab({ 49 wx.switchTab({
49 url: '/pages/home/home' 50 url: '/pages/home/home'
@@ -203,85 +204,6 @@ Page({ @@ -203,85 +204,6 @@ Page({
203 return texts 204 return texts
204 205
205 }, 206 },
206 - showModal() { //显示对话框  
207 - var animation = wx.createAnimation({  
208 - duration: 200,  
209 - timingFunction: "linear",  
210 - delay: 0  
211 - })  
212 - this.animation = animation  
213 - animation.translateY(300).step()  
214 - this.setData({  
215 - animationData: animation.export(),  
216 - showModalStatus: true  
217 - })  
218 - setTimeout(function () {  
219 - animation.translateY(0).step()  
220 - this.setData({  
221 - animationData: animation.export()  
222 - })  
223 - }.bind(this), 100)  
224 - },  
225 - hideModal() { //隐藏对话框  
226 - var animation = wx.createAnimation({  
227 - duration: 200,  
228 - timingFunction: "linear",  
229 - delay: 0  
230 - })  
231 - this.animation = animation  
232 - animation.translateY(300).step()  
233 - this.setData({  
234 - animationData: animation.export(),  
235 - })  
236 - setTimeout(function () {  
237 - animation.translateY(0).step()  
238 - this.setData({  
239 - animationData: animation.export(),  
240 - showModalStatus: false  
241 - })  
242 - }.bind(this), 100)  
243 - },  
244 - bindGetUserInfo(e) { // 立即授权  
245 - let that = this;  
246 - wx.login({  
247 - success(res) {  
248 - console.log(res);  
249 - that.setData({  
250 - code: res.code  
251 - })  
252 - request({  
253 - url: 'api/common/login',  
254 - method: "POST",  
255 - data: {  
256 - rawData: e.detail.rawData,  
257 - code: that.data.code,  
258 - }  
259 - })  
260 - .then(res => {  
261 - console.log(res);  
262 - if (res.data.code == 1) {  
263 - wx.setStorageSync('token', res.data.data.userInfo.token);  
264 - wx.setStorageSync('avatar', res.data.data.userInfo.avatar);  
265 - wx.setStorageSync('name', res.data.data.userInfo.nickname);  
266 - wx.setStorageSync('user_id', res.data.data.userInfo.user_id);  
267 -  
268 - }  
269 - console.log(res.data.data.userInfo.token);  
270 - that.hideModal()  
271 - that.setData({  
272 - msg: res.data.msg  
273 - })  
274 - that.popSuccessTest();  
275 - that.gethuodong()  
276 - // setTimeout(function () {  
277 - // wx.navigateBack()  
278 - // }, 2000)  
279 - }).catch(err => {  
280 - console.log(err);  
281 - })  
282 - }  
283 - })  
284 - },  
285 onShareAppMessage: function (options) { 207 onShareAppMessage: function (options) {
286 var that = this; 208 var that = this;
287 // 设置菜单中的转发按钮触发转发事件时的转发内容 209 // 设置菜单中的转发按钮触发转发事件时的转发内容
@@ -319,7 +241,10 @@ Page({ @@ -319,7 +241,10 @@ Page({
319 duration: 1300, //停留时间 241 duration: 1300, //停留时间
320 }) 242 })
321 }, 243 },
322 - 244 + bindistoken() {
  245 + this.gethuodong()
  246 + console.log('我回来了');
  247 + },
323 248
324 249
325 250
1 { 1 {
2 "usingComponents": { 2 "usingComponents": {
3 - "van-count-down": "@vant/weapp/count-down/index" 3 + "van-count-down": "@vant/weapp/count-down/index",
  4 + "lfy-login":"../../Components/lfylogin"
4 }, 5 },
5 "navigationBarTitleText": "商品详情" 6 "navigationBarTitleText": "商品详情"
6 7
@@ -82,27 +82,5 @@ @@ -82,27 +82,5 @@
82 </view> 82 </view>
83 </view> 83 </view>
84 </view> 84 </view>
85 - <!-- 授权登录 -->  
86 - <view class="login">  
87 - <!-- 屏幕背景变暗的背景 -->  
88 - <view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view>  
89 - <!-- 弹出框 -->  
90 - <view animation="{{animationData}}" class="commodity_attr_box" wx:if="{{showModalStatus}}">  
91 - <view class="phoneshou">  
92 - <view class="padlock" catchtap="hideModal">  
93 - <image src="{{imagesUrl}}assets/static/img/updown.png" />  
94 - </view>  
95 - <view class="phone_title">请先授权登录</view>  
96 - <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>  
97 - <view class="downbtn">  
98 - <view class="si_box">  
99 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
100 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
101 - 微信授权登录  
102 - </button>  
103 - </view>  
104 - </view>  
105 - </view>  
106 - </view>  
107 - </view> 85 + <lfy-login id="lfyLogin" bind:istoken="bindistoken" />
108 </view> 86 </view>
@@ -2,7 +2,6 @@ import { @@ -2,7 +2,6 @@ import {
2 request 2 request
3 } from "../../request/index.js" 3 } from "../../request/index.js"
4 4
5 -// pages/distributionChanged/distributionChanged.js  
6 const a = getApp() 5 const a = getApp()
7 Page({ 6 Page({
8 data: { 7 data: {
@@ -32,13 +31,7 @@ Page({ @@ -32,13 +31,7 @@ Page({
32 }) 31 })
33 that.getdetails() 32 that.getdetails()
34 }, 33 },
35 - onReady: function () {  
36 -  
37 - },  
38 onShow: function () {}, 34 onShow: function () {},
39 - toggleDialog() {  
40 -  
41 - },  
42 async getdetails() { 35 async getdetails() {
43 let that = this 36 let that = this
44 try { 37 try {
@@ -61,6 +54,7 @@ Page({ @@ -61,6 +54,7 @@ Page({
61 54
62 }) 55 })
63 console.log(data); 56 console.log(data);
  57 + console.log(this.data.jump_url);
64 } catch (err) { 58 } catch (err) {
65 console.log(err); 59 console.log(err);
66 that.setData({ 60 that.setData({
@@ -208,7 +202,6 @@ Page({ @@ -208,7 +202,6 @@ Page({
208 }) 202 })
209 }, 1500); 203 }, 1500);
210 } 204 }
211 -  
212 } else { 205 } else {
213 console.log(that.data.jump_img); 206 console.log(that.data.jump_img);
214 if (that.data.jump_img != '') { 207 if (that.data.jump_img != '') {
@@ -242,8 +235,9 @@ Page({ @@ -242,8 +235,9 @@ Page({
242 }, 235 },
243 jumpImgUrl() { 236 jumpImgUrl() {
244 let that = this 237 let that = this
  238 + console.log(that.data.jump_url);
245 wx.navigateTo({ 239 wx.navigateTo({
246 - url: '/pages/webview/webview?url=' + that.data.jump_url 240 + url: '/pages/webview/webview?url=' + encodeURIComponent(that.data.jump_url)
247 }) 241 })
248 that.hideModal() 242 that.hideModal()
249 }, 243 },
@@ -296,7 +296,7 @@ page { @@ -296,7 +296,7 @@ page {
296 296
297 /*对话框 */ 297 /*对话框 */
298 .center__nox { 298 .center__nox {
299 - height: 40%; 299 + // height: 40%;
300 width: 80%; 300 width: 80%;
301 position: fixed; 301 position: fixed;
302 top: 40%; 302 top: 40%;
@@ -235,7 +235,6 @@ page { @@ -235,7 +235,6 @@ page {
235 z-index: 10; 235 z-index: 10;
236 } 236 }
237 .container .login .center__nox { 237 .container .login .center__nox {
238 - height: 40%;  
239 width: 80%; 238 width: 80%;
240 position: fixed; 239 position: fixed;
241 top: 40%; 240 top: 40%;
@@ -333,48 +333,9 @@ Page({ @@ -333,48 +333,9 @@ Page({
333 //如果有透明蒙层,弹窗的期间不能点击文档内容 333 //如果有透明蒙层,弹窗的期间不能点击文档内容
334 }) 334 })
335 }, 335 },
336 - toggleDialog() {  
337 - this.setData({  
338 - showDialog: !this.data.showDialog  
339 - })  
340 - },  
341 - bindGetUserInfo(e) { // 立即授权  
342 - let that = this;  
343 - wx.login({  
344 - success(res) {  
345 - console.log(res);  
346 - that.setData({  
347 - code: res.code  
348 - })  
349 - request({  
350 - url: 'api/common/login',  
351 - method: "POST",  
352 - data: {  
353 - rawData: e.detail.rawData,  
354 - code: that.data.code,  
355 - }  
356 - })  
357 - .then(res => {  
358 - console.log(res);  
359 - if (res.data.code == 1) {  
360 - wx.setStorageSync('token', res.data.data.userInfo.token);  
361 - wx.setStorageSync('avatar', res.data.data.userInfo.avatar);  
362 - wx.setStorageSync('name', res.data.data.userInfo.nickname);  
363 - wx.setStorageSync('user_id', res.data.data.userInfo.user_id);  
364 -  
365 - }  
366 - console.log(res.data.data.userInfo.token);  
367 - that.toggleDialog()  
368 - that.setData({  
369 - msg: res.data.msg  
370 - })  
371 - that.popSuccessTest();  
372 - that.getDetailsContent()  
373 - }).catch(err => {  
374 - console.log(err);  
375 - })  
376 - }  
377 - }) 336 + bindistoken() {
  337 + this.getDetailsContent()
  338 + console.log('我回来了');
378 }, 339 },
379 GOcanvas() { 340 GOcanvas() {
380 let id = this.data.id 341 let id = this.data.id
1 { 1 {
2 - "usingComponents": {}, 2 + "usingComponents": {
  3 + "lfy-login":"../../Components/lfylogin"
  4 + },
3 "navigationBarTitleText": "商品详情" 5 "navigationBarTitleText": "商品详情"
4 } 6 }
@@ -206,4 +206,5 @@ @@ -206,4 +206,5 @@
206 </view> 206 </view>
207 </view> 207 </view>
208 </view> 208 </view>
  209 + <lfy-login id="lfyLogin" bind:istoken="bindistoken" />
209 </view> 210 </view>
@@ -51,9 +51,11 @@ Page({ @@ -51,9 +51,11 @@ Page({
51 }, 51 },
52 52
53 gohome() { 53 gohome() {
54 - wx.switchTab({  
55 - url: '/pages/home/home'  
56 - }) 54 + this.selectComponent('#lfyLogin').getLogin('哈哈哈')
  55 + },
  56 + bindisToken(e) {
  57 + console.log(e);
  58 + console.log('我回来了');
57 }, 59 },
58 onChange(e) { 60 onChange(e) {
59 this.setData({ 61 this.setData({
@@ -74,7 +76,7 @@ Page({ @@ -74,7 +76,7 @@ Page({
74 let index = e.currentTarget.dataset.index 76 let index = e.currentTarget.dataset.index
75 if (index == 0) { 77 if (index == 0) {
76 wx.navigateTo({ 78 wx.navigateTo({
77 - url: '/pages/webview/webview?url=' + 'https://h5.goorcar.com/' 79 + url: '/pages/webview/webview?url=' + encodeURIComponent('https://h5.goorcar.com/')
78 }) 80 })
79 } 81 }
80 82
1 { 1 {
2 "usingComponents": { 2 "usingComponents": {
3 - "van-count-down": "@vant/weapp/count-down/index" 3 + "van-count-down": "@vant/weapp/count-down/index",
  4 + "lfy-login":"../../Components/lfylogin"
4 }, 5 },
5 "navigationStyle": "custom", 6 "navigationStyle": "custom",
6 "navigationBarTextStyle": "white" 7 "navigationBarTextStyle": "white"
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class="header"> 2 <view class="header">
3 <view class="s" style='height:{{statusTop}}px'></view> 3 <view class="s" style='height:{{statusTop}}px'></view>
4 <view class="left_img"> 4 <view class="left_img">
5 - <view class="title_oage" bindtap="gohome">汽车互联网4S店</view> 5 + <view class="title_oage">汽车互联网4S店</view>
6 </view> 6 </view>
7 </view> 7 </view>
8 <view class="health"> 8 <view class="health">
@@ -192,5 +192,6 @@ @@ -192,5 +192,6 @@
192 <view class="more_name">关注更多4S店</view> 192 <view class="more_name">关注更多4S店</view>
193 </view> 193 </view>
194 </view> 194 </view>
  195 + <lfy-login id="lfyLogin" bind:istoken="bindisToken" />
195 </view> 196 </view>
196 </view> 197 </view>
@@ -27,30 +27,21 @@ Page({ @@ -27,30 +27,21 @@ Page({
27 guiID: [], 27 guiID: [],
28 goodsPrice: '', 28 goodsPrice: '',
29 user_id: '', 29 user_id: '',
30 - showDialog: false,  
31 fx_user: '', 30 fx_user: '',
32 s4_id: '', 31 s4_id: '',
33 }, 32 },
34 onLoad: function (options) { 33 onLoad: function (options) {
35 let that = this 34 let that = this
36 - let token = wx.getStorageSync('token')  
37 console.log(options); 35 console.log(options);
38 if (!options.scene) { 36 if (!options.scene) {
39 that.setData({ 37 that.setData({
40 id: options.id, 38 id: options.id,
41 }) 39 })
42 - console.log(options);  
43 } else { 40 } else {
44 that.setData({ 41 that.setData({
45 id: options.scene, 42 id: options.scene,
46 }) 43 })
47 - console.log(options);  
48 } 44 }
49 - // if (token) {  
50 -  
51 - // } else {  
52 - // that.getToken()  
53 - // }  
54 that.getDetailsContent() 45 that.getDetailsContent()
55 }, 46 },
56 previewImage: function (e) { 47 previewImage: function (e) {
@@ -69,7 +60,7 @@ Page({ @@ -69,7 +60,7 @@ Page({
69 content: '您尚未登录,请登录后操作', 60 content: '您尚未登录,请登录后操作',
70 success: function (res) { 61 success: function (res) {
71 if (res.confirm) { 62 if (res.confirm) {
72 - that.toggleDialog() 63 + that.selectComponent('#lfyLogin').getLogin('hh')
73 } else { 64 } else {
74 console.log('点击取消回调') 65 console.log('点击取消回调')
75 wx.navigateBack() 66 wx.navigateBack()
@@ -80,10 +71,6 @@ Page({ @@ -80,10 +71,6 @@ Page({
80 }, 71 },
81 72
82 onShow: function () { 73 onShow: function () {
83 - // let token = wx.getStorageSync("token")  
84 - // if (token) {  
85 -  
86 - // }  
87 this.getPingList() 74 this.getPingList()
88 }, 75 },
89 GOcanvas() { 76 GOcanvas() {
@@ -328,23 +315,8 @@ Page({ @@ -328,23 +315,8 @@ Page({
328 }) 315 })
329 316
330 } else { 317 } else {
331 - wx.showModal({  
332 - title: '提示',  
333 - content: '您尚未登录,请登录后操作',  
334 - success: function (res) {  
335 - if (res.confirm) {  
336 - wx.navigateTo({  
337 - url: '/pages/authorization/authorization'  
338 - })  
339 - } else {  
340 - console.log('点击取消回调')  
341 - }  
342 - }  
343 - }) 318 + that.getToken()
344 } 319 }
345 -  
346 -  
347 -  
348 }, 320 },
349 countMinus() { // 商品数量减 321 countMinus() { // 商品数量减
350 let that = this 322 let that = this
@@ -644,47 +616,4 @@ Page({ @@ -644,47 +616,4 @@ Page({
644 return shareObj; 616 return shareObj;
645 617
646 }, 618 },
647 - toggleDialog() {  
648 - this.setData({  
649 - showDialog: !this.data.showDialog  
650 - })  
651 - },  
652 - bindGetUserInfo(e) { // 立即授权  
653 - let that = this;  
654 - wx.login({  
655 - success(res) {  
656 - console.log(res);  
657 - that.setData({  
658 - code: res.code  
659 - })  
660 - request({  
661 - url: 'api/common/login',  
662 - method: "POST",  
663 - data: {  
664 - rawData: e.detail.rawData,  
665 - code: that.data.code,  
666 - }  
667 - })  
668 - .then(res => {  
669 - console.log(res);  
670 - if (res.data.code == 1) {  
671 - wx.setStorageSync('token', res.data.data.userInfo.token);  
672 - wx.setStorageSync('avatar', res.data.data.userInfo.avatar);  
673 - wx.setStorageSync('name', res.data.data.userInfo.nickname);  
674 - wx.setStorageSync('user_id', res.data.data.userInfo.user_id);  
675 -  
676 - }  
677 - console.log(res.data.data.userInfo.token);  
678 - that.toggleDialog()  
679 - that.setData({  
680 - msg: res.data.msg  
681 - })  
682 - that.popSuccessTest();  
683 - that.getDetailsContent()  
684 - }).catch(err => {  
685 - console.log(err);  
686 - })  
687 - }  
688 - })  
689 - },  
690 }) 619 })
1 { 1 {
2 - "usingComponents": {}, 2 + "usingComponents": {
  3 + "lfy-login":"../../Components/lfylogin"
  4 + },
3 "navigationBarTitleText": "商品详情" 5 "navigationBarTitleText": "商品详情"
4 } 6 }
@@ -237,24 +237,5 @@ @@ -237,24 +237,5 @@
237 </button> 237 </button>
238 </view> 238 </view>
239 </view> 239 </view>
240 - <view class="zan_dialog" catchtap="toggleDialog" wx:if="{{showDialog}}"></view>  
241 - <view class="phoneshou" wx:if="{{showDialog}}">  
242 - <view class="padlock" catchtap="toggleDialog">  
243 - <image src="{{imagesUrl}}assets/static/img/updown.png" />  
244 - </view>  
245 - <view class="phone_title">请先授权登录</view>  
246 - <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>  
247 - <view class="downbtn">  
248 - <!-- <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
249 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
250 - 微信授权登录  
251 - </button> -->  
252 - <view class="si_box">  
253 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
254 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
255 - 微信授权登录  
256 - </button>  
257 - </view>  
258 - </view>  
259 - </view> 240 + <lfy-login id="lfyLogin" bind:istoken="bindistoken" />
260 </view> 241 </view>
@@ -9,7 +9,6 @@ Page({ @@ -9,7 +9,6 @@ Page({
9 id: '', 9 id: '',
10 MaintainImg: '', 10 MaintainImg: '',
11 content: '', 11 content: '',
12 - showDialog: false,  
13 pingListL: [], 12 pingListL: [],
14 msg: '' 13 msg: ''
15 }, 14 },
@@ -136,7 +135,7 @@ Page({ @@ -136,7 +135,7 @@ Page({
136 content: '您尚未登录,请登录后操作', 135 content: '您尚未登录,请登录后操作',
137 success: function (res) { 136 success: function (res) {
138 if (res.confirm) { 137 if (res.confirm) {
139 - that.toggleDialog() 138 + that.selectComponent('#lfyLogin').getLogin('hh')
140 } else { 139 } else {
141 console.log('点击取消回调') 140 console.log('点击取消回调')
142 } 141 }
@@ -190,53 +189,6 @@ Page({ @@ -190,53 +189,6 @@ Page({
190 189
191 190
192 }, 191 },
193 - toggleDialog() {  
194 - this.setData({  
195 - showDialog: !this.data.showDialog  
196 - })  
197 - },  
198 - bindGetUserInfo(e) { // 立即授权  
199 - let that = this;  
200 - wx.login({  
201 - success(res) {  
202 - console.log(res);  
203 - that.setData({  
204 - code: res.code  
205 - })  
206 - request({  
207 - url: 'api/common/login',  
208 - method: "POST",  
209 - data: {  
210 - rawData: e.detail.rawData,  
211 - code: that.data.code,  
212 - }  
213 - })  
214 - .then(res => {  
215 - console.log(res);  
216 - if (res.data.code == 1) {  
217 - wx.setStorageSync('token', res.data.data.userInfo.token);  
218 - wx.setStorageSync('avatar', res.data.data.userInfo.avatar);  
219 - wx.setStorageSync('name', res.data.data.userInfo.nickname);  
220 - wx.setStorageSync('user_id', res.data.data.userInfo.user_id);  
221 -  
222 - }  
223 - console.log(res.data.data.userInfo.token);  
224 - that.toggleDialog()  
225 - that.setData({  
226 - msg: res.data.msg  
227 - })  
228 - that.popSuccessTest();  
229 - that.getStoreMaintainImg()  
230 - }).catch(err => {  
231 - console.log(err);  
232 - that.setData({  
233 - msg: err.msg  
234 - })  
235 - that.popMaskTest()  
236 - })  
237 - }  
238 - })  
239 - },  
240 previewImage: function (e) { 192 previewImage: function (e) {
241 var current = e.target.dataset.src; 193 var current = e.target.dataset.src;
242 var imgList = e.target.dataset.list 194 var imgList = e.target.dataset.list
@@ -262,4 +214,8 @@ Page({ @@ -262,4 +214,8 @@ Page({
262 //如果有透明蒙层,弹窗的期间不能点击文档内容 214 //如果有透明蒙层,弹窗的期间不能点击文档内容
263 }) 215 })
264 }, 216 },
  217 + bindistoken() {
  218 + this.getStoreMaintainImg()
  219 + console.log('我回来了');
  220 + },
265 }) 221 })
1 { 1 {
2 - "usingComponents": {}, 2 + "usingComponents": {
  3 + "lfy-login":"../../Components/lfylogin"
  4 + },
3 "navigationBarTitleText": "保养商品详情" 5 "navigationBarTitleText": "保养商品详情"
4 } 6 }
@@ -130,24 +130,5 @@ @@ -130,24 +130,5 @@
130 <view class="d" wx:else>暂无评价</view> 130 <view class="d" wx:else>暂无评价</view>
131 </block> 131 </block>
132 </view> 132 </view>
133 - <view class="zan_dialog" catchtap="toggleDialog" wx:if="{{showDialog}}"></view>  
134 - <view class="phoneshou" wx:if="{{showDialog}}">  
135 - <view class="padlock" catchtap="toggleDialog">  
136 - <image src="{{imagesUrl}}assets/static/img/updown.png" />  
137 - </view>  
138 - <view class="phone_title">请先授权登录</view>  
139 - <view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>  
140 - <view class="downbtn">  
141 - <!-- <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
142 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
143 - 微信授权登录  
144 - </button> -->  
145 - <view class="si_box">  
146 - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">  
147 - <image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />  
148 - 微信授权登录  
149 - </button>  
150 - </view>  
151 - </view>  
152 - </view> 133 + <lfy-login id="lfyLogin" bind:istoken="bindistoken" />
153 </view> 134 </view>
@@ -12,9 +12,9 @@ Page({ @@ -12,9 +12,9 @@ Page({
12 * 生命周期函数--监听页面加载 12 * 生命周期函数--监听页面加载
13 */ 13 */
14 onLoad: function (options) { 14 onLoad: function (options) {
15 - console.log(options) 15 + console.log(decodeURIComponent(options.url))
16 this.setData({ 16 this.setData({
17 - waiUrl: options.url 17 + waiUrl: decodeURIComponent(options.url)
18 }) 18 })
19 }, 19 },
20 20
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 "minifyWXSS": true 40 "minifyWXSS": true
41 }, 41 },
42 "compileType": "miniprogram", 42 "compileType": "miniprogram",
43 - "libVersion": "2.11.0", 43 + "libVersion": "2.16.0",
44 "appid": "wx11011d1f9492b8e0", 44 "appid": "wx11011d1f9492b8e0",
45 "projectname": "%E8%BD%A6%E5%94%9B", 45 "projectname": "%E8%BD%A6%E5%94%9B",
46 "debugOptions": { 46 "debugOptions": {
  1 +{
  2 + "condition": {
  3 + "plugin": {
  4 + "list": []
  5 + },
  6 + "game": {
  7 + "list": []
  8 + },
  9 + "gamePlugin": {
  10 + "list": []
  11 + },
  12 + "miniprogram": {
  13 + "list": [
  14 + {
  15 + "id": -1,
  16 + "name": "pages/stores/index",
  17 + "pathName": "pages/stores/index",
  18 + "query": "",
  19 + "scene": null
  20 + },
  21 + {
  22 + "name": "pages/praise/praise",
  23 + "pathName": "pages/praise/praise",
  24 + "query": "",
  25 + "scene": null
  26 + },
  27 + {
  28 + "name": "pages/goPromotion/goPromotion",
  29 + "pathName": "pages/goPromotion/goPromotion",
  30 + "query": "",
  31 + "scene": null
  32 + },
  33 + {
  34 + "name": "pages/VtuanDetail/VtuanDetail",
  35 + "pathName": "pages/VtuanDetail/VtuanDetail",
  36 + "query": "type=4&id=4073",
  37 + "scene": null
  38 + },
  39 + {
  40 + "name": "pages/home/home",
  41 + "pathName": "pages/home/home",
  42 + "query": "",
  43 + "scene": null
  44 + },
  45 + {
  46 + "name": "pages/details/details",
  47 + "pathName": "pages/details/details",
  48 + "query": "",
  49 + "scene": null
  50 + },
  51 + {
  52 + "name": "pages/addcars/addcars",
  53 + "pathName": "pages/addcars/addcars",
  54 + "query": "",
  55 + "scene": null
  56 + },
  57 + {
  58 + "name": "pages/homeNoLogin2/homeNoLogin2",
  59 + "pathName": "pages/homeNoLogin2/homeNoLogin2",
  60 + "query": "",
  61 + "scene": null
  62 + },
  63 + {
  64 + "name": "pages/distributionChanged/distributionChanged",
  65 + "pathName": "pages/distributionChanged/distributionChanged",
  66 + "query": "id=59",
  67 + "scene": null
  68 + }
  69 + ]
  70 + }
  71 + }
  72 +}