Authored by htoooth

fix

... ... @@ -10,7 +10,6 @@ import md5 from './vendors/md5';
var mta = require('./vendors/mta_analysis.js')
import { wechatLoginAction } from './utils/login';
import { isStringEmpty, getYHStorageSync} from './utils/util';
import './router/index';
import { logEvent,
YB_LAUNCH_APP,
... ...
... ... @@ -20,5 +20,6 @@ export default {
"business_line": "miniapp",
"os_version": "yohobuy:h5",
"app_version": "2.8.3",
"app_build": "1032"
"app_build": "1032",
"mini_qr_type": 16
}
\ No newline at end of file
... ...
... ... @@ -22,14 +22,10 @@ export const SERVICE_HOST = 'http://api-test3.dev.yohocorp.com';
// export const API_HOST = 'https://apigray.yoho.cn';
// export const SERVICE_HOST = 'https://apigray.yoho.cn';
//有货精选
export const MINI_APP_TYPE = '0';
export const MINI_APP_TYPE = 29;
export const MINI_QR_TYPE = 16;
export const PAYMENT_CODE = '45';
//有货商城精选
// export const MINI_APP_TYPE = '1';
// export const PAYMENT_CODE = '48';
export const OS_VERSION = 'yohobuy:h5';
export const APP_VERSION = '2.9.0';
... ...
... ... @@ -170,23 +170,13 @@ Component({
});
},
//事件
jumpToHome() {
wx.switchTab({
url: '/pages/index/index',
})
},
jumpToSearch() {
wx.navigateTo({
url: '/pages/search/search',
})
},
jumpToShopCart() {
wx.switchTab({
url: '/pages/shopCart/shopCart',
})
},
backToTop() {
... ...
... ... @@ -3,8 +3,14 @@
<view class="quicknavigation-content">
<view class="quicknavigation-menu" wx:if="{{isShowMenu}}">
<view class="quicknavigation-menu-func">
<image class="img" id="home" animation="{{funcItemAnimation}}" bindtap="jumpToHome" src="/pages/quickNavigation/images/home@3x.png"> </image>
<image class="img" id="search" animation="{{funcItemAnimation}}" bindtap="jumpToSearch" src="/pages/quickNavigation/images/search_ic@3x.png"> </image>
<navigator target="miniProgram" app-id="wx084ab813d88c594b" path="/pages/index/index" version="develop" >
<image class="img" id="home" animation="{{funcItemAnimation}}" src="/pages/quickNavigation/images/home@3x.png"> </image>
</navigator>
<navigator target="miniProgram" app-id="wx084ab813d88c594b" path="/pages/search/search" version="develop" >
<image class="img" id="search" animation="{{funcItemAnimation}}" src="/pages/quickNavigation/images/search_ic@3x.png"> </image>
</navigator>
<image class="img" id="shopcart" wx:if="{{isShowShopCart}}" animation="{{funcItemAnimation}}" bindtap="jumpToShopCart" src="/pages/quickNavigation/images/shopcart_ic@3x.png"> </image>
<button class="appBtn" bindtap='goApp' id="appBtn" type="default" hover-class="none" open-type="launchApp" app-parameter="{{appParameter}}" binderror="launchAppError" wx:if="{{isGoApp}}" animation="{{funcItemAnimation}}">
<image class="appImg" src="/pages/quickNavigation/images/APP@3x.png" animation="{{funcItemAnimation}}"></image>
... ...
... ... @@ -81,13 +81,13 @@ Page(Object.assign({
className: 'action-class',
loading: false,
openType: 'share',
image_src: '../../../../images/share_wechat@2x.png',
image_src: '../../images/share_wechat@2x.png',
},
{
name: '分享到朋友圈',
className: 'action-class',
loading: false,
image_src: '../../../../images/share_wxpeng@2x.png'
image_src: '../../images/share_wxpeng@2x.png'
}
]
},
... ...
... ... @@ -36,13 +36,13 @@ Page(Object.assign({
className: 'action-class',
loading: false,
openType: 'share',
image_src: '../../../../images/share_wechat@2x.png',
image_src: '../../images/share_wechat@2x.png',
},
{
name: '分享到朋友圈',
className: 'action-class',
loading: false,
image_src: '../../../../images/share_wxpeng@2x.png'
image_src: '../../images/share_wxpeng@2x.png'
}]
},
},
... ...
import Service from './service'
import { ACTIVITY_HOST, API_HOST} from '../../../libs/config';
import { ACTIVITY_HOST, API_HOST, MINI_QR_TYPE} from '../../../libs/config';
const MODULE = '/activity/zerobuy';
... ... @@ -78,7 +78,7 @@ class ZeroSellService extends Service {
}
getQrCode(page_param) {
return API_HOST + '/wechat/miniapp/img-check.jpg?param=' + JSON.stringify(page_param) + '&miniQrType=14';
return API_HOST + '/wechat/miniapp/img-check.jpg?param=' + JSON.stringify(page_param) + `&miniQrType=${MINI_QR_TYPE}`;
}
getUserProfile(data) {
... ...
import jumpToMiniapp from './jump-to-miniapp';
import {parse, stringify} from '../vendors/query-string';
const MINI_APP_DOMAIN = 'miniapp.yohobuy.com';
global.router = {
goUrl(url) {
if (!url) {
return Promise.reject('error url');
}
const [uri, search] = url.split('?');
const path = uri.split(MINI_APP_DOMAIN)[1];
const qs = parse(search);
if (qs.app && path) {
return jumpToMiniapp({
app: qs.app,
path: `${path}?${stringify(qs)}`
});
}
}
};
import wx from '../utils/wx';
import {stringify} from '../vendors/query-string';
const appData = {
yohobuyLimitChannel: {
appId: 'wxed31f9e8705fb8d1',
page: {
limitProductList: 'pages/index/index'
}
},
anotherApp: {
appId: 'wx084ab813d88c594b',
page: {
home: '/pages/product/detail/detail'
}
},
};
export default function(params) {
let navigateToMiniParams = {
appId: appData[params.app].appId,
path: params.path || `${appData[params.app].page[params.page]}?${stringify(params.data)}`
};
return wx.navigateToMiniProgram(navigateToMiniParams);
}