Commit be778b81 by luyt

fix;授权名称,local本地数据合并

1 parent 9097b7ba
...@@ -68,3 +68,14 @@ ...@@ -68,3 +68,14 @@
} }
} }
} }
/* 用户授权 */
.user-profile {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
background-color: transparent;
}
...@@ -34,3 +34,5 @@ ...@@ -34,3 +34,5 @@
<view class="btom" bindtap="modelcloseFn">取消</view> <view class="btom" bindtap="modelcloseFn">取消</view>
</view> </view>
</view> </view>
<!-- 授权昵称 -->
<view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view>
...@@ -166,16 +166,18 @@ Component({ ...@@ -166,16 +166,18 @@ Component({
}, },
// 获取用户信息 // 获取用户信息
getUserInfo({ detail }) { getUserInfo({ detail }) {
console.log(detail); // console.log(detail);
if (!detail.code) return; if (!detail.code) return;
// this.setBtnLoading() // this.setBtnLoading()
USERAPI.getUserProfile(this.loginToken, detail) USERAPI.getUserProfile(this.loginToken, detail)
.then((result) => { .then((result) => {
// console.log(result) // console.log(result)
let userInfo = wx.$storage.get('wx_user_info')
// console.log('userInfo: ', userInfo);
let { phone } = result; let { phone } = result;
// let { // console.log('phone: ', phone);
wx.$storage.set('wx_user_info', result); wx.$storage.set('wx_user_info', {...userInfo,phone});
// } // }
this.triggerEvent("authorized", { this.triggerEvent("authorized", {
phone, phone,
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text> <text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text> <text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text> </text>
<text class="earnings" decode="{{true}}">{{stickyTop}}预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text> <text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text> </text>
</view> </view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn"> <view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn">
......
...@@ -14,9 +14,9 @@ var senceData = [ ...@@ -14,9 +14,9 @@ var senceData = [
{ {
img: 'product-img1', img: 'product-img1',
proName: '数字无忧权益卡', proName: '数字无忧权益卡',
price: '1500', price: '100',
// profit: '92.4万', // profit: '92.4万',
profit: '120万', profit: '1200000',
type: 'service', type: 'service',
productType: 'benefitCard', productType: 'benefitCard',
path: 'equity', path: 'equity',
...@@ -63,8 +63,8 @@ var senceData = [ ...@@ -63,8 +63,8 @@ var senceData = [
{ {
img: 'product-img2', img: 'product-img2',
proName: '汽车太阳膜', proName: '汽车太阳膜',
price: '1500', price: '100',
profit: '1008万', profit: '10080000',
type: 'membrane', type: 'membrane',
productType: 'sunMembrane', productType: 'sunMembrane',
path: 'solarFilm', path: 'solarFilm',
...@@ -96,8 +96,8 @@ var senceData = [ ...@@ -96,8 +96,8 @@ var senceData = [
{ {
img: 'product-img3', img: 'product-img3',
proName: '漆面保护膜', proName: '漆面保护膜',
price: '12000', price: '100',
profit: '216万', profit: '2160000',
type: 'membrane', type: 'membrane',
productType: 'protectMembrane', productType: 'protectMembrane',
path: 'paintProtect', path: 'paintProtect',
...@@ -110,8 +110,8 @@ var senceData = [ ...@@ -110,8 +110,8 @@ var senceData = [
{ {
img: 'product-img4', img: 'product-img4',
proName: '改色膜', proName: '改色膜',
price: '5000', price: '100',
profit: '30万', profit: '300000',
type: 'membrane', type: 'membrane',
productType: 'colorMembrane', productType: 'colorMembrane',
path: 'changingFilm', path: 'changingFilm',
...@@ -136,8 +136,8 @@ var senceData = [ ...@@ -136,8 +136,8 @@ var senceData = [
{ {
img: 'product-img5', img: 'product-img5',
proName: '数字化美容', proName: '数字化美容',
price: '300', price: '100',
profit: '36万', profit: '72000',
type: 'beauty', type: 'beauty',
productType: 'digitBeauty', productType: 'digitBeauty',
path: 'carBeauty', path: 'carBeauty',
...@@ -150,8 +150,8 @@ var senceData = [ ...@@ -150,8 +150,8 @@ var senceData = [
{ {
img: 'product-img6', img: 'product-img6',
proName: '座椅通风', proName: '座椅通风',
price: '1500', price: '10000',
profit: '1008万', profit: '232200',
type: 'light', type: 'light',
productType: 'chair', productType: 'chair',
path: 'seatVentilate', path: 'seatVentilate',
...@@ -164,8 +164,8 @@ var senceData = [ ...@@ -164,8 +164,8 @@ var senceData = [
{ {
img: 'product-img7', img: 'product-img7',
proName: 'AR导航', proName: 'AR导航',
price: '1680', price: '10000',
profit: '22.68万', profit: '226800',
type: 'light', type: 'light',
productType: 'ar', productType: 'ar',
path: 'arNavigation', path: 'arNavigation',
...@@ -178,8 +178,8 @@ var senceData = [ ...@@ -178,8 +178,8 @@ var senceData = [
{ {
img: 'product-img8', img: 'product-img8',
proName: '氛围灯', proName: '氛围灯',
price: '2680', price: '10000',
profit: '36.18万', profit: '361800',
type: 'light', type: 'light',
productType: 'lamp', productType: 'lamp',
path: 'ambientLighting', path: 'ambientLighting',
...@@ -192,8 +192,8 @@ var senceData = [ ...@@ -192,8 +192,8 @@ var senceData = [
{ {
img: 'product-img9', img: 'product-img9',
proName: '360全景导航', proName: '360全景导航',
price: '2880', price: '10000',
profit: '38.88万', profit: '388800',
type: 'service', type: 'service',
productType: 'navigation', productType: 'navigation',
path: 'navigationArround', path: 'navigationArround',
......
...@@ -350,7 +350,7 @@ Page({ ...@@ -350,7 +350,7 @@ Page({
} }
console.log(profit.length); console.log(profit.length);
console.log(productType, sales, flow, profit); console.log(productType, sales, flow, profit);
if (profit.length > 8) { if (profit.length > 9) {
return (profit / 10000).toFixed(0) + "万"; return (profit / 10000).toFixed(0) + "万";
} else { } else {
return profit; return profit;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!