123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- export function cardType(card) {
- let type = 1
- switch (card.status){
- case 0:
- type = 1
- break;
- case 1:
- type = 4
- break;
- case 2:
- type = 5
- break;
- }
- return type
- }
- export function navigateTo(url, query){
- console.log('进入页面跳转事件')
- if (query && Object.keys(query).length != 0) {
- url += '?'
- for (let i in query) {
- url += i
- url += '='
- url += query[i]
- url += '&'
- }
- }
- console.log(url, 'url')
- wx.navigateTo({
- url: url
- })
- }
- export function redirectTo(url, query){
- console.log('进入页面跳转事件')
- if (query && Object.keys(query).length != 0) {
- url += '?'
- for (let i in query) {
- url += i
- url += '='
- url += query[i]
- url += '&'
- }
- }
- console.log(url, 'url')
- wx.redirectTo({
- url: url
- })
- }
- // 回显数据字典
- export function selectDictLabel(datas, value) {
- var actions = [];
- Object.keys(datas).some((key) => {
- if (datas[key].value == ('' + value)) {
- actions.push(datas[key].label);
- return true;
- }
- })
- return actions.join('');
- }
|