commit ebb9575bd01c4d7fb08a52abe01722f86daa96dc Author: zhangjing Date: Wed Jun 21 17:19:58 2023 +0800 [本时生活h5端] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38adffa --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..07c1d5f --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "h5" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..ebe72e8 --- /dev/null +++ b/App.vue @@ -0,0 +1,123 @@ + + + diff --git a/apis/interfaces/address.js b/apis/interfaces/address.js new file mode 100644 index 0000000..1252320 --- /dev/null +++ b/apis/interfaces/address.js @@ -0,0 +1,83 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request.js' + +// 我的地址列表 +const index = () => { + return request({ + url : 'addresses' + }) +} + +// 删除地址 +const remove = (addressId) => { + return request({ + url : 'addresses/' + addressId + '/destroy', + method: "DELETE" + }) +} + +// 删除地址 +const setdef = (addressId) => { + return request({ + url : 'addresses/' + addressId + '/setdef', + method: "POST" + }) +} + +// 获取省 +const create = () => { + return request({ + url : 'addresses/create' + }) +} + +// 获取市级列表 +const children = (psn) => { + return request({ + url : 'areas/children', + data: { + psn + } + }) +} + +// 创建地址保存 +const add = (data) => { + return request({ + url : 'addresses/store', + method: "POST", + data: data + }) +} + +// 编辑地址保存 +const keep = (addressId, data) => { + return request({ + url : 'addresses/' + addressId + '/update', + method: "POST", + data: data + }) +} + +// 获取已有地址信息 +const edit = (addressId) => { + return request({ + url : 'addresses/' + addressId + '/edit' + }) +} + +export { + index, + remove, + setdef, + create, + children, + add, + keep, + edit +} \ No newline at end of file diff --git a/apis/interfaces/auth.js b/apis/interfaces/auth.js new file mode 100644 index 0000000..f39f854 --- /dev/null +++ b/apis/interfaces/auth.js @@ -0,0 +1,69 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ +import request from '../request' + +// 手机号+验证码登录 +const auth = (data) => { + return request({ + url: 'auth/login_by_code', + method: 'POST', + data: data + }) +} + +// 设置登录密码 +const passSetup = (data) => { + return request({ + url: 'auth/reset_password', + method: 'POST', + data: data + }) +} + +// 手机号+密码登录 +const passlogin = (data) => { + return request({ + url: 'auth/login_by_password', + method: 'POST', + data: data + }) +} + +// 注册 +const register = (data) => { + return request({ + url: 'auth/register', + method: 'POST', + data: data + }) +} + +// 领取红包-发送短信-获取验证码 +const send = (data) => { + return request({ + url: 'sms/send', + method: 'POST', + data: data + }) +} + +// 领取红包-领取 +const unicom = (data) => { + return request({ + url: 'unicom/get', + method: 'POST', + data: data + }) +} + +export { + auth, + passSetup, + passlogin, + register, + send, + unicom +} diff --git a/apis/interfaces/campus.js b/apis/interfaces/campus.js new file mode 100644 index 0000000..97ac606 --- /dev/null +++ b/apis/interfaces/campus.js @@ -0,0 +1,95 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ +import request from '../request' + +const index = (data) => { + return request({ + url: 'schools' + }) +} + +//卡券二维码 +const qrcode = (coupon_id) => { + return request({ + url: 'coupons/qrcode', + data: { + coupon_id + } + }) +} + +//门店列表 +const barcode = (coupon_id) => { + return request({ + url: "coupons/" + coupon_id + '/barcode' + }) +} + +//卡券二维码 +const couponinfo = (data) => { + return request({ + url: "coupons/show", + data: data + }) +} + +// 获取商家券信息 +const merchantCard = (coupon_id) => { + return request({ + url: "coupons/merchant_card", + method: "GET", + data: { + coupon_id + } + }) +} + +// 校园活动确认订单 +const buy = (data) => { + return request({ + url : "schools/buy", + data: data + }) +} + +// 校园活动提交订单 +const buySubmit = (data) => { + return request({ + url : "schools/buy", + method : "POST", + data : data + }) +} + +// 卡券分组 +const coupon = (data) => { + return request({ + url : "coupons", + data : data + }) +} + +// 卡券分组 +const breakCode = (coupon_id) => { + return request({ + url : "coupons/qrcode", + data: { + coupon_id + } + }) +} + +export { + index, + qrcode, + barcode, + couponinfo, + merchantCard, + buy, + buySubmit, + coupon, + breakCode +} diff --git a/apis/interfaces/draw.js b/apis/interfaces/draw.js new file mode 100644 index 0000000..79edb7a --- /dev/null +++ b/apis/interfaces/draw.js @@ -0,0 +1,79 @@ +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + * 抽奖活动 + */ +import request from '../request' + +// 首页 +const index = (data) => { + return request({ + url: 'activity/exchanges' + }) +} + +// 抽奖 +const result = (exchange_id) => { + return request({ + url: 'activity/exchanges/' + exchange_id + '/draw' + }) +} + +// 抽奖默认信息(抽奖次数) +const awards = (exchange_id, data) => { + return request({ + url: 'activity/exchanges/' + exchange_id + "/awards", + data: data + }) +} + +// 我的订单 +const orders = (data) => { + return request({ + url: 'activity/exchanges/orders', + data: data + }) +} + +// 我的优惠券 +const coupons = (data) => { + return request({ + url: 'activity/exchanges/coupons', + data: data + }) +} + +// 产品选择 +const exchanges = (log_id) => { + return request({ + url: 'activity/exchanges/log/' + log_id + }) +} + +// 兑换产品 +const exchangesBuy = (data) => { + return request({ + url: 'activity/exchanges/buy', + method: 'POST', + data: data + }) +} + +// 兑换产品 +const activityBuy = (data) => { + return request({ + url: 'activity/exchanges/buy', + data: data + }) +} + +export { + index, + result, + awards, + orders, + coupons, + exchanges, + exchangesBuy, + activityBuy +} \ No newline at end of file diff --git a/apis/interfaces/giftPack.js b/apis/interfaces/giftPack.js new file mode 100644 index 0000000..be94cad --- /dev/null +++ b/apis/interfaces/giftPack.js @@ -0,0 +1,78 @@ +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ +import request from '../request' + +// 月兑活动 - 首页 +const index = (data) => { + return request({ + url: 'months' + }) +} + +// 月兑活动 - 商品详情 +const details = (month_id) => { + return request({ + url : "months/" + month_id + }) +} + +// 月兑活动 - 确认订单 +const buy = (data) => { + return request({ + url : "months/buy", + data: data + }) +} + +// 月兑活动 - 提交订单 +const buySubmit = (data) => { + return request({ + url : "months/buy", + method : "POST", + data : data + }) +} + +// 月兑活动 - 优惠券列表 +const logs = (data) => { + return request({ + url : "account/logs", + data : data + }) +} + +// 月兑活动 - 账变列表 +const coupon = (data) => { + return request({ + url : "months/coupons", + data : data + }) +} + +// 月兑活动 - 兑换列表 +const monthsList = (category_id) => { + return request({ + url : "months/goods/" + category_id + }) +} + + +// 月兑活动 - 兑换列表 +const monthsChoose = (category_id) => { + return request({ + url : "months/category/" + category_id + "/choose" + }) +} + +export { + index, + details, + buy, + buySubmit, + coupon, + logs, + monthsList, + monthsChoose +} \ No newline at end of file diff --git a/apis/interfaces/index.js b/apis/interfaces/index.js new file mode 100644 index 0000000..3e20cd1 --- /dev/null +++ b/apis/interfaces/index.js @@ -0,0 +1,73 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request.js' + +// 活动权益内容 +const activity = (data) => { + return request({ + url: 'home', + data: data + }) +} + +// 钻石+白金权益内容 +const index = (data) => { + return request({ + url: 'home/group', + data: data + }) +} + +// 周五福利日订阅 +const subscribe = (subscribe) => { + return request({ + url: 'wechat/' + subscribe + "/welfare_subscribe", + method: "POST" + }) +} + +// 所有城市-最新无字母 +const newCity = () => { + return request({ + url: 'ajax/all_right_citys' + }) +} + +// 市区选择-最新无字母 +const newidxCity = (data) => { + return request({ + url: 'ajax/all_right_children', + data: data + }) +} + +// h5掉起微信授权的前置获取相关的签名信息前置 +const subscribeUrl = (data) => { + return request({ + url: 'auth/jssdk', + data: data + }) +} + +const subscribeH5 = (subscribe, channel) => { + return request({ + url: "wechat/" + subscribe + "/welfare_subscribe", + method: "POST", + data: { + channel: 'h5' + } + }) +} +export { + activity, + index, + subscribe, + newCity, + newidxCity, + subscribeUrl, + subscribeH5 +} \ No newline at end of file diff --git a/apis/interfaces/oil.js b/apis/interfaces/oil.js new file mode 100644 index 0000000..8034619 --- /dev/null +++ b/apis/interfaces/oil.js @@ -0,0 +1,33 @@ +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ +import request from '../request' + +const index = (data) => { + return request({ + url: 'petros' + }) +} + +// 校园活动确认订单 +const buy = (data) => { + return request({ + url : "petros/buy", + data: data + }) +} + +// 校园活动提交订单 +const buySubmit = (data) => { + return request({ + url : "petros/buy", + method : "POST", + data : data + }) +} +export { + index, + buy, + buySubmit +} \ No newline at end of file diff --git a/apis/interfaces/recharge.js b/apis/interfaces/recharge.js new file mode 100644 index 0000000..11003c6 --- /dev/null +++ b/apis/interfaces/recharge.js @@ -0,0 +1,30 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request.js' + +// 充值前置 +const create = () => { + return request({ + url : 'recharges/create' + }) +} + +// 充值提交 +const store = (recharge_id) => { + return request({ + url : 'recharges/store', + method: 'POST', + data: { + recharge_id + } + }) +} + +export { + create, + store +} \ No newline at end of file diff --git a/apis/interfaces/rights.js b/apis/interfaces/rights.js new file mode 100644 index 0000000..5126b35 --- /dev/null +++ b/apis/interfaces/rights.js @@ -0,0 +1,143 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request.js' + +// 权益详情 +const index = (data) => { + return request({ + url : 'orders/create/', + data: data + }) +} + +// 权益分类 +const classify = (category_id, data) => { + return request({ + url : 'categories/' + category_id, + data: data + }) +} + +// 权益购买提交 +const rightStore = (data) => { + return request({ + url : 'orders/store/', + method: "POST", + data: data + }) +} + +// 洗车券-获取跳转地址 --暂时隐藏 +const washcarUrl = (data) => { + return request({ + url: 'washcar/infourl', + data: data + }) +} + +// 获取洗车券信息 +const washcarBuy = (data) => { + return request({ + url: 'washcar/create', + data: data + }) +} + +// 洗车券订单提交 +const washcarCreate = (data) => { + return request({ + url : 'washcar/create', + method: "POST", + data: data + }) +} + + +// h5微信支付获取微信授权地址 +const getAuthUrl = (url) => { + return request({ + url : 'auth/get_auth_url', + data: { + url + } + }) +} + +// h5掉起微信支付的前置获取相关的签名信息 +const wpayH5Info = (data) => { + return request({ + url : 'auth/jssdk', + data: data + }) +} + +//获取openid地址-web +const unionpay = (data) => { + return request({ + url : 'unionpay/openid', + data: data + }) +} + +//领取银联权益优惠券 +const unionCode = (data) => { + return request({ + url : 'unionpay/union_openid', + data: data + }) +} + +// 权益 单订单支付 +const rightsSingle = (orderid) => { + return request({ + url : 'payments/order', + data: { + orderid + } + }) +} + +// h5掉起微信支付的前置获取相关的签名信息 +// const fridayPayH5 = (url, data) => { +// return request({ +// url : 'payments/welfare/wechat', +// method: "POST", +// data: data +// }) +// } + +// H5 权益支付 +// const wechatH5 = (data) => { +// return request({ +// url : 'payments/wechat', +// method: "POST", +// data: data +// }) +// } + +const h5Pay = (url, data) => { + return request({ + url: url, + method: "POST", + data + }) +} + +export { + index, + classify, + rightStore, + washcarUrl, + washcarBuy, + washcarCreate, + getAuthUrl, + wpayH5Info, + unionpay, + unionCode, + rightsSingle, + h5Pay +} \ No newline at end of file diff --git a/apis/interfaces/subscribe.js b/apis/interfaces/subscribe.js new file mode 100644 index 0000000..5398fde --- /dev/null +++ b/apis/interfaces/subscribe.js @@ -0,0 +1,27 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ +import request from '../request' + +// 业务信息 +const business = (type) => { + return request({ + url: "business/" + type + }) +} + +// 提交预约 +const create = (data) => { + return request({ + url: "business/create", + method: "POST", + data: data + }) +} + +export { + business, + create +} diff --git a/apis/interfaces/unicom.js b/apis/interfaces/unicom.js new file mode 100644 index 0000000..c86b9b3 --- /dev/null +++ b/apis/interfaces/unicom.js @@ -0,0 +1,33 @@ +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ +import request from '../request' + +const index = (data) => { + return request({ + url: 'activity/unicoms' + }) +} + +// 校园活动确认订单 +const buy = (data) => { + return request({ + url : "activity/unicoms/buy", + data: data + }) +} + +// 校园活动提交订单 +const buySubmit = (data) => { + return request({ + url : "activity/unicoms/buy", + method : "POST", + data : data + }) +} +export { + index, + buy, + buySubmit +} \ No newline at end of file diff --git a/apis/interfaces/user.js b/apis/interfaces/user.js new file mode 100644 index 0000000..7957c2b --- /dev/null +++ b/apis/interfaces/user.js @@ -0,0 +1,419 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request.js' + +// 活动权益内容 +const index = () => { + return request({ + url: 'user' + }) +} + +// 卡券详情 +const couponinfo = (data) => { + return request({ + url: 'coupons/show', + data: data + }) +} + +// 卡券二维码 +const qrcode = (coupon_id) => { + return request({ + url: 'coupons/qrcode', + data: { + coupon_id + } + }) +} + +// 卡券条形码 +const barcode = (coupon_id) => { + return request({ + url: 'coupons/' + coupon_id + '/barcode' + }) +} + +// 卡券列表 +const coupon = (status) => { + return request({ + url: 'coupons?status=' + status + }) +} + +// 卡券分组 +const couponArr = (data) => { + return request({ + url: 'coupons/list', + data: data + }) +} + +// 积分账变记录 +const logs = (data) => { + return request({ + url: 'account/logs', + data: data + }) +} + +// 订单收益列表 +const profits = (data) => { + return request({ + url: 'data/profits', + data: data + }) +} + +// 订单收益列表-下级明细 +const profitsNext = (data) => { + return request({ + url: 'data/profitlogs', + data: data + }) +} + +// 积分卡激活 +const cards = (data) => { + return request({ + url: 'user/cards/activate', + method: "POST", + data: data + }) +} + +// 冻结列表 +const ungrants = (type) => { + return request({ + url: 'account/newungrants', + data: { + type + } + }) +} + +// 洗车券-获取跳转地址 +const washcarCoupon = (coupon) => { + return request({ + url: 'washcar/' + coupon + "/info", + method: "POST" + }) +} + +//权益商品订单列表 +const orders = (data) => { + return request({ + url: 'orders/index', + data: data + }) +} + +//权益订单列表 +const ordersCoupons = (data) => { + return request({ + url: 'orders/coupons', + data: data + }) +} + +//取消兑换订单 +const cancel = (orderid) => { + return request({ + url: 'orders/cancel?orderid=' + orderid, + method: "POST" + }) +} + +// 福利商品订单列表 +const welfare = (data) => { + return request({ + url: 'welfares/orders', + data: data + }) +} + +// 福利券订单列表 +const welfareCoupons = (data) => { + return request({ + url: 'welfares/coupons', + data: data + }) +} + +// 福利取消订单 +const welfaresCancel = (orderid) => { + return request({ + url: 'welfares/orders/cancel?orderid=' + orderid, + method: "POST" + }) +} + +//权益订单详情 +const show = (orderid) => { + return request({ + url: 'orders/show', + data: { + orderid + } + }) +} + +//周五福利订单详情 +const welfaresShow = (orderid) => { + return request({ + url: 'welfares/orders/show', + data: { + orderid + } + }) +} + +// 头像上传+昵称修改 +const upload = (data) => { + return request({ + url: 'user/setting/info', + method: "POST", + data: data + }) +} + +// 发送短信 +const send = (data) => { + return request({ + url: 'sms/send', + method: "POST", + data: data + }) +} + +// 设置支付密码 +const setPassword = (data) => { + return request({ + url: 'user/setting/set_password', + method: "POST", + data: data + }) +} + +// 修改支付密码 +const changePassword = (data) => { + return request({ + url: 'user/setting/change_password', + method: "POST", + data: data + }) +} + +// 重置支付密码 +const resetPassword = (data) => { + return request({ + url: 'user/setting/reset_password', + method: "POST", + data: data + }) +} + +//门店列表 +const stores = (data) => { + return request({ + url: 'coupons/new_stores', + method: "POST", + data: data + }) +} + +//门店详情 +const storesShow = (data) => { + return request({ + url: 'coupons/store/show', + data: data + }) +} + +//省市区 +const areas = (psn) => { + return request({ + url: 'areas/children?psn=' + psn + }) +} + +// 2021-07-28新增 +// 我的收益 +const myProfit = () => { + return request({ + url: 'data/index' + }) +} + +// 我的收益-收益报表 +const myIncome = (month) => { + return request({ + url: 'data/income', + data:{ + month + } + }) +} + +// 我的收益-收益报表 + 我的收益-我的团队 +const profitUrl = (url, data) => { + return request({ + url: url, + data: data + }) +} + +// 提现前置账户信息 +const withdraws = () => { + return request({ + url: 'withdraws/create' + }) +} + +// 提现记录列表 +const withdrawsList = (data) => { + return request({ + url: 'user/withdraws', + data: data + }) +} + +// 提现表单填写 +const withdrawsForm = (data) => { + return request({ + url: 'withdraws', + method: "POST", + data: data + }) +} + +// 权益详细列表 +const profitLogs = (data) => { + return request({ + url: 'data/logs', + data: data + }) +} + +// 转账获取积分账户分类 +const transfers = () => { + return request({ + url: 'user/transfers' + }) +} + +// 转账提交表单 +const transfersForm = (data) => { + return request({ + url: 'user/transfers', + method: "POST", + data: data + }) +} + +// 校验转账的手机号码 +const ajaxTel = (mobile) => { + return request({ + url: 'ajax/user', + data: { + mobile + } + }) +} + +// 产品分享 - 新增 +const productList = (page) => { + return request({ + url: 'shares/goods', + data: { + page + } + }) +} + +const productInfo = (right) => { + return request({ + url: 'shares/goods/' + right + }) +} + +const productPoster = (right) => { + return request({ + url: 'shares/goods/' + right + '/poster' + }) +} + +// 我的分享 +const myshare = (data) => { + return request({ + url: 'user/share', + data: data + }) +} + +// 产品分享二维码+储值分享二维码 +const publicCode = (data) => { + return request({ + url: 'user/share/goods', + data: data + }) +} + +// 储值分享 +const storedList = () => { + return request({ + url: 'shares/recharges' + }) +} + + +export { + index, + couponinfo, + qrcode, + barcode, + coupon, + couponArr, + logs, + profits, + profitsNext, + cards, + ungrants, + washcarCoupon, + orders, + ordersCoupons, + cancel, + welfare, + welfareCoupons, + welfaresCancel, + show, + welfaresShow, + upload, + send, + setPassword, + changePassword, + resetPassword, + stores, + storesShow, + areas, + myProfit, + myIncome, + profitUrl, + withdraws, + withdrawsList, + withdrawsForm, + profitLogs, + transfers, + transfersForm, + ajaxTel, + productList, + productInfo, + productPoster, + myshare, + publicCode, + storedList +} \ No newline at end of file diff --git a/apis/interfaces/welfares.js b/apis/interfaces/welfares.js new file mode 100644 index 0000000..4690efb --- /dev/null +++ b/apis/interfaces/welfares.js @@ -0,0 +1,40 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request.js' + +// 周五福利日详情 +const index = (welfare_id, data) => { + return request({ + url : 'welfare/' + welfare_id, + data: data + }) +} + + +//周五福利-获取支付信息 +const fridayInfo = (welfare_id, data) => { + return request({ + url : 'welfare/order/' + welfare_id, + data: data + }) +} + +// 周五福利 单订单支付 +const welfSingle = (orderid) => { + return request({ + url : 'payments/welfare', + data: { + orderid + } + }) +} + +export { + index, + fridayInfo, + welfSingle +} \ No newline at end of file diff --git a/apis/interfaces/wxJSDK.js b/apis/interfaces/wxJSDK.js new file mode 100644 index 0000000..9064224 --- /dev/null +++ b/apis/interfaces/wxJSDK.js @@ -0,0 +1,17 @@ +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import request from '../request' + +const config = (data) => { + return request({ + url : 'auth/jssdk', + data: data + }) +} + +export { + config +} diff --git a/apis/request.js b/apis/request.js new file mode 100644 index 0000000..67e8111 --- /dev/null +++ b/apis/request.js @@ -0,0 +1,140 @@ + +/** + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ + */ + +import store from '@/store' + +// 基础配置 +// https://lifetest.ysd-bs.com //测试地址 +// https://card.ysd-bs.com +const config = { + // apiUrl : 'https://lifetest.ysd-bs.com/api/', + apiUrl : 'https://card.ysd-bs.com/api/', + timeout: 60000 +} + +let loginHintState = false + +// 网络请求 +const request = (parameter) => { + // 检查url配置 + if(parameter.url === 'undefined' || parameter.url === '') { + uni.showToast({ + title: '请求地址不能为空', + icon : 'none' + }) + return + } + + // 注入header + config.header = { + 'Accept': 'application/json', + 'Authorization': store.getters.getToken || '' + } + // 请求实例 + return new Promise((resolve, reject) => { + uni.request({ + url : config.apiUrl + parameter.url, + timeout : config.timeout, + header : config.header || {}, + data : parameter.data || {}, + method : parameter.method || 'GET', + success: res => { + if (res.header.Authorization) { + updateToken('token', res.header.Authorization) + } + if (res.statusCode === 200) { + const resolveData = res.data + if(resolveData.status_code === 200) { + resolve(resolveData.data) + return + } + if (resolveData.status_code === 401) { + loginHint() + return + } + reject(resolveData) + return + } + errToast(res.statusCode) + } + }) + }) +} + +// 处理一些http请求错误提示 +const errToast = (code) => { + switch (code){ + case 404: + uni,uni.showToast({ + title: code + '接口不存在,请联系系统管理员', + icon : none + }) + break; + case 405: + uni.showToast({ + title: code + '请检查接口请求方式错误', + icon :'none' + }) + break; + case 500: + uni.showToast({ + title: code + '服务端错误,请检查服务器信息', + icon : 'none' + }) + break; + } +} + +// 更新token +const updateToken = (token) => { + store.commit('setToken', token) +} + +// 处理登录提示 +const loginHint = () => { + if(loginHintState) return + if(!loginHintState) loginHintState = true + updateToken('') + uni.showModal({ + title:'登录提示', + content:'您的登录信息已过期,请重新登录', + confirmColor:'#33f800', + showCancel:false, + success: res => { + console.log(getApp().globalData.envType) + loginHintState = false + if(res.confirm){ + if(getApp().globalData.envType == 'campusEnv') { + uni.reLaunch({ + url: '/pages/campus/signin' + }) + } else if(getApp().globalData.envType == 'oilEnv') { + uni.reLaunch({ + url: '/pages/oil/signin' + }) + }else if(getApp().globalData.envType == 'unicomEnv') { + uni.reLaunch({ + url: '/pages/unicom/signin' + }) + }else if(getApp().globalData.envType == 'drawEnv') { + uni.reLaunch({ + url: '/pages/draw/signin' + }) + }else if(getApp().globalData.envType == 'giftPEnv') { + uni.reLaunch({ + url: '/pages/giftPack/signin' + }) + }else { + uni.reLaunch({ + url: '/pages/auth/login' + }) + } + } + } + }) +} + +export default request \ No newline at end of file diff --git a/js_sdk/ican-clipBoard/ican-clipBoard.js b/js_sdk/ican-clipBoard/ican-clipBoard.js new file mode 100644 index 0000000..f16c8f6 --- /dev/null +++ b/js_sdk/ican-clipBoard/ican-clipBoard.js @@ -0,0 +1,41 @@ +/** clipboard.js v2.0.4**/ +!function(t,e){try{global.ClipboardJS=e();}catch(e){};"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports} + return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;ndata}) + cb.on('success',function(res){success&&Types.isFunction(success)&&success(res) + complete&&Types.isFunction(complete)&&complete() + cb.off('error') + cb.off('success') + cb.destroy()}) + cb.on('error',function(err){fail&&Types.isFunction(fail)&&fail(err) + complete&&Types.isFunction(complete)&&complete() + cb.off('error') + cb.off('success') + cb.destroy()}) + cb.onClick(e)} +//#endif diff --git a/main.js b/main.js new file mode 100644 index 0000000..4121ca7 --- /dev/null +++ b/main.js @@ -0,0 +1,22 @@ +import Vue from 'vue' +import App from './App' +import store from './store' +import { VueJsonp } from 'vue-jsonp' + +Vue.config.productionTip = false + +// Vue.config.ignoredElements = ['wx-open-subscribe'] + +Vue.prototype.$store = store +Vue.prototype.$wx = require('jweixin-module') +App.mpType = 'app' + + + +// jsonp +Vue.use(VueJsonp) + +const app = new Vue({ + ...App +}) +app.$mount() diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..4ea6d2e --- /dev/null +++ b/manifest.json @@ -0,0 +1,106 @@ +{ + "name" : "本时生活H5", + "appid" : "__UNI__8D6D53E", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : { + "Payment" : {} + }, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : { + "payment" : { + "weixin" : { + "__platform__" : [ "android" ], + "appid" : "wx0e1082e90b9aa6a5", + "UniversalLinks" : "" + } + }, + "ad" : {} + } + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + "permission" : { + "scope.userLocation" : { + "desc" : "你的位置信息将用于小程序位置接口的效果展示" + } + }, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx8e424dbdc443381f", + "setting" : { + "urlCheck" : false, + "postcss" : false + }, + "usingComponents" : true, + "permission" : { + "scope.userLocation" : { + "desc" : "你的位置信息将用于小程序位置接口的效果展示" + } + } + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "h5" : { + "router" : { + "mode" : "history" + }, + "sdkConfigs" : { + "maps" : { + "qqmap" : { + "key" : "4KYBZ-LCAKF-QWOJN-NIDNZ-FZHLZ-2XFW7" + } + } + }, + "title" : "本时生活" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..bfec92c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,16 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "jweixin-module": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", + "integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==" + }, + "vue-jsonp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz", + "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" + } + } +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..3824933 --- /dev/null +++ b/pages.json @@ -0,0 +1,743 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/auth/login", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom", + "app-plus": { + "animationType": "slide-in-bottom" + } + } + },{ + "path": "pages/auth/register", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom", + "app-plus": { + "animationType": "slide-in-bottom" + } + } + },{ + "path": "pages/auth/password", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom", + "app-plus": { + "animationType": "slide-in-bottom" + } + } + },{ + "path": "pages/auth/psssword_forget", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom", + "app-plus": { + "animationType": "slide-in-bottom" + } + } + },{ + "path": "pages/auth/password_login", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF", + "navigationStyle": "custom", + "app-plus": { + "animationType": "slide-in-bottom" + } + } + },{ + "path": "pages/index/index", + "style": { + "navigationBarTitleText":"首页", + "navigationStyle": "custom", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } + },{ + "path": "pages/user/index", + "style": { + "navigationBarTitleText": "个人中心", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": false + } + },{ + "path": "pages/rights/index", + "style": { + "navigationBarTitleText": "卡券权益", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#000000", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/webView/webView", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/subscribe/upgrade/upgrade", + "style": { + "navigationBarTitleText": "5G升级包预约", + "navigationStyle": "custom", + "navigationBarBackgroundColor":"#2a211e", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/subscribe/combo/combo", + "style": { + "navigationBarTitleText": "冰激凌预约", + "navigationStyle": "custom", + "navigationBarBackgroundColor":"#2a211e", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/switchcity/switchcity", + "style": { + "navigationBarTitleText": "切换城市", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/welfare/welfare", + "style": { + "navigationBarTitleText": "支付详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/classify/classify", + "style": { + "navigationBarTitleText": "卡券权益", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#000000", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/account", + "style": { + "navigationBarTitleText": "账变记录", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/myBalance", + "style": { + "navigationBarTitleText": "收益账户", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/myBalance_list", + "style": { + "navigationBarTitleText": "收益列表", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/myProfit", + "style": { + "navigationBarTitleText": "我的收益", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/myProfit_list", + "style": { + "navigationBarTitleText": "权益列表", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/withdrawal_record", + "style": { + "navigationBarTitleText": "提现记录", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/withdrawal_form", + "style": { + "navigationBarTitleText": "提现申请", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/account/recharge", + "style": { + "navigationBarTitleText": "充值中心", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#dfb48b", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/frozen/frozen", + "style": { + "navigationBarTitleText": "待发放", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#24315d", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/favour/favour", + "style": { + "navigationBarTitleText": "积分赠与", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#24315d", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false + } + },{ + "path": "pages/coupon/coupon", + "style": { + "navigationBarTitleText": "我的卡券", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/couponDetails/couponDetails", + "style": { + "navigationBarTitleText": "卡券详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/couponArr/couponArr", + "style": { + "navigationBarTitleText": "我的卡券", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/packet/packet", + "style": { + "navigationBarTitleText": "联通红包", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/activate/activate", + "style": { + "navigationBarTitleText": "卡激活", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/site/index", + "style": { + "navigationBarTitleText": "我的地址", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/site/create", + "style": { + "navigationBarTitleText": "新增地址", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/site/edit", + "style": { + "navigationBarTitleText": "编辑地址", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/washcar/washcar", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/car/index", + "style": { + "navigationBarTitleText": "亿时代", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/order/order", + "style": { + "navigationBarTitleText": "我的订单", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/order/orderData", + "style": { + "navigationBarTitleText": "订单详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/setUpForm/index", + "style": { + "navigationBarTitleText": "个人设置", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/setUpForm/form_submit", + "style": { + "navigationBarTitleText": "个人设置", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/payPassword/index", + "style": { + "navigationBarTitleText": "支付密码", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/payPassword/setup", + "style": { + "navigationBarTitleText": "支付密码设置", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/payPassword/forget", + "style": { + "navigationBarTitleText": "找回密码", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/cashier/index", + "style": { + "navigationBarTitleText": "收银台", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/campus/index", + "style": { + "navigationBarTitleText": "校园迎新活动", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/campus/buy", + "style": { + "navigationBarTitleText": "活动购买", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/campus/myCoupon", + "style": { + "navigationBarTitleText": "我的优惠券", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/campus/details", + "style": { + "navigationBarTitleText": "活动详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/campus/signin", + "style": { + "navigationBarTitleText": "校园迎新活动 登录", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/campus/myList", + "style": { + "navigationBarTitleText": "优惠券列表", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/store/index", + "style": { + "navigationBarTitleText": "门店列表", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/store/details", + "style": { + "navigationBarTitleText": "门店详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/campus/register", + "style" : { + "navigationBarTitleText": "快速注册", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/campus/password", + "style" : { + "navigationBarTitleText": "忘记密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/campus/setPassword", + "style" : { + "navigationBarTitleText": "重置密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/userGoods/index", + "style" : { + "navigationBarTitleText": "产品分享", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/userGoods/goodsDet", + "style" : { + "navigationBarTitleText": "产品详情", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/userGoods/goodsCode", + "style" : { + "navigationBarTitleText": "产品分享-分享码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/code/code", + "style" : { + "navigationBarTitleText": "我的邀请码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/userStored/index", + "style" : { + "navigationBarTitleText": "储值分享", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/userStored/storedCode", + "style" : { + "navigationBarTitleText": "储值分享-分享码", + "enablePullDownRefresh": false + } + },{ + "path": "pages/oil/index", + "style": { + "navigationBarTitleText": "联通优惠活动", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/oil/buy", + "style": { + "navigationBarTitleText": "活动购买", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/oil/myCoupon", + "style": { + "navigationBarTitleText": "我的优惠券", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/oil/details", + "style": { + "navigationBarTitleText": "活动详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/oil/signin", + "style": { + "navigationBarTitleText": "联通优惠活动 登录", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/oil/myList", + "style": { + "navigationBarTitleText": "优惠券列表", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/oil/register", + "style" : { + "navigationBarTitleText": "快速注册", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/oil/password", + "style" : { + "navigationBarTitleText": "忘记密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/oil/setPassword", + "style" : { + "navigationBarTitleText": "重置密码", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/index", + "style": { + "navigationBarTitleText": "本时礼包活动", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/list", + "style": { + "navigationBarTitleText": "本时礼包活动", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/user", + "style": { + "navigationBarTitleText": "我的", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/buy", + "style": { + "navigationBarTitleText": "活动购买", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/myCoupon", + "style": { + "navigationBarTitleText": "我的优惠券", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/details", + "style": { + "navigationBarTitleText": "优惠券详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/giftPack/signin", + "style": { + "navigationBarTitleText": "本时礼包活动 登录", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/giftPack/register", + "style" : { + "navigationBarTitleText": "快速注册", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/giftPack/password", + "style" : { + "navigationBarTitleText": "忘记密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/giftPack/setPassword", + "style" : { + "navigationBarTitleText": "重置密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/giftPack/logs", + "style" : { + "navigationBarTitleText": "积分记录", + "enablePullDownRefresh": false + } + },{ + "path": "pages/unicom/index", + "style": { + "navigationBarTitleText": "中国联通回馈活动", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/unicom/buy", + "style": { + "navigationBarTitleText": "活动购买", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/unicom/details", + "style": { + "navigationBarTitleText": "活动详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/unicom/signin", + "style": { + "navigationBarTitleText": "中国联通回馈活动 登录", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/unicom/register", + "style" : { + "navigationBarTitleText": "快速注册", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/unicom/password", + "style" : { + "navigationBarTitleText": "忘记密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/unicom/setPassword", + "style" : { + "navigationBarTitleText": "重置密码", + "enablePullDownRefresh": false + } + },{ + "path": "pages/draw/index", + "style": { + "navigationBarTitleText": "抽奖活动", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path": "pages/draw/signin", + "style": { + "navigationBarTitleText": "抽奖活动 登录", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/register", + "style" : { + "navigationBarTitleText": "抽奖活动 快速注册", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/password", + "style" : { + "navigationBarTitleText": "抽奖活动 忘记密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/setPassword", + "style" : { + "navigationBarTitleText": "抽奖活动 重置密码", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/myCoupon", + "style" : { + "navigationBarTitleText": "我的优惠券", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/couponDetails", + "style" : { + "navigationBarTitleText": "优惠券详情", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/order", + "style" : { + "navigationBarTitleText": "我的订单", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/orderDetails", + "style" : { + "navigationBarTitleText": "订单详情", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/logs", + "style" : { + "navigationBarTitleText": "抽奖记录", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/choose", + "style" : { + "navigationBarTitleText": "选择产品", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/right", + "style" : { + "navigationBarTitleText": "购买权益", + "enablePullDownRefresh": false + } + },{ + "path" : "pages/draw/success", + "style" : { + "navigationBarTitleText": "兑换成功", + "enablePullDownRefresh": false + } + } + ], + "tabBar": { + "color": "#9b9f9f", + "selectedColor": "#000000", + "backgroundColor": "#FFFFFF", + "borderStyle": "#ddd", + "list": [{ + "pagePath": "pages/index/index", + "text": "首页", + "iconPath": "static/tabBarIcon/00.png", + "selectedIconPath": "static/tabBarIcon/00_active.png" + }, { + "pagePath": "pages/user/index", + "text": "我的", + "iconPath": "static/tabBarIcon/01.png", + "selectedIconPath": "static/tabBarIcon/01_active.png" + }] + }, + + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "navigationStyle": "default" + } +} diff --git a/pages/account/account.vue b/pages/account/account.vue new file mode 100644 index 0000000..8804729 --- /dev/null +++ b/pages/account/account.vue @@ -0,0 +1,300 @@ + + + + + diff --git a/pages/account/myBalance.vue b/pages/account/myBalance.vue new file mode 100644 index 0000000..0d2b7ee --- /dev/null +++ b/pages/account/myBalance.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/pages/account/myBalance_list.vue b/pages/account/myBalance_list.vue new file mode 100644 index 0000000..1507657 --- /dev/null +++ b/pages/account/myBalance_list.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/pages/account/myProfit.vue b/pages/account/myProfit.vue new file mode 100644 index 0000000..48ff898 --- /dev/null +++ b/pages/account/myProfit.vue @@ -0,0 +1,1030 @@ + + + + + diff --git a/pages/account/myProfit_list.vue b/pages/account/myProfit_list.vue new file mode 100644 index 0000000..721edeb --- /dev/null +++ b/pages/account/myProfit_list.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/pages/account/recharge.vue b/pages/account/recharge.vue new file mode 100644 index 0000000..1262c77 --- /dev/null +++ b/pages/account/recharge.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/pages/account/withdrawal_form.vue b/pages/account/withdrawal_form.vue new file mode 100644 index 0000000..15c6de8 --- /dev/null +++ b/pages/account/withdrawal_form.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/pages/account/withdrawal_record.vue b/pages/account/withdrawal_record.vue new file mode 100644 index 0000000..6f8a1f3 --- /dev/null +++ b/pages/account/withdrawal_record.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/pages/activate/activate.vue b/pages/activate/activate.vue new file mode 100644 index 0000000..af07f46 --- /dev/null +++ b/pages/activate/activate.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/pages/auth/login.vue b/pages/auth/login.vue new file mode 100644 index 0000000..084af26 --- /dev/null +++ b/pages/auth/login.vue @@ -0,0 +1,277 @@ + + + + + \ No newline at end of file diff --git a/pages/auth/password.vue b/pages/auth/password.vue new file mode 100644 index 0000000..1a62694 --- /dev/null +++ b/pages/auth/password.vue @@ -0,0 +1,170 @@ + + + + + \ No newline at end of file diff --git a/pages/auth/password_login.vue b/pages/auth/password_login.vue new file mode 100644 index 0000000..9cffd71 --- /dev/null +++ b/pages/auth/password_login.vue @@ -0,0 +1,203 @@ + + + + + \ No newline at end of file diff --git a/pages/auth/psssword_forget.vue b/pages/auth/psssword_forget.vue new file mode 100644 index 0000000..5a08479 --- /dev/null +++ b/pages/auth/psssword_forget.vue @@ -0,0 +1,198 @@ + + + + + \ No newline at end of file diff --git a/pages/auth/register.vue b/pages/auth/register.vue new file mode 100644 index 0000000..4f86bc3 --- /dev/null +++ b/pages/auth/register.vue @@ -0,0 +1,286 @@ + + + + + \ No newline at end of file diff --git a/pages/campus/buy.vue b/pages/campus/buy.vue new file mode 100644 index 0000000..4b45622 --- /dev/null +++ b/pages/campus/buy.vue @@ -0,0 +1,680 @@ + + + + + diff --git a/pages/campus/details.vue b/pages/campus/details.vue new file mode 100644 index 0000000..b92410d --- /dev/null +++ b/pages/campus/details.vue @@ -0,0 +1,539 @@ + + + + + diff --git a/pages/campus/index.vue b/pages/campus/index.vue new file mode 100644 index 0000000..21956f9 --- /dev/null +++ b/pages/campus/index.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/pages/campus/myCoupon.vue b/pages/campus/myCoupon.vue new file mode 100644 index 0000000..206715c --- /dev/null +++ b/pages/campus/myCoupon.vue @@ -0,0 +1,653 @@ + + + + + diff --git a/pages/campus/myList.vue b/pages/campus/myList.vue new file mode 100644 index 0000000..3daf397 --- /dev/null +++ b/pages/campus/myList.vue @@ -0,0 +1,315 @@ + + + + + diff --git a/pages/campus/password.vue b/pages/campus/password.vue new file mode 100644 index 0000000..827a6fa --- /dev/null +++ b/pages/campus/password.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/pages/campus/register.vue b/pages/campus/register.vue new file mode 100644 index 0000000..5960bde --- /dev/null +++ b/pages/campus/register.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/pages/campus/setPassword.vue b/pages/campus/setPassword.vue new file mode 100644 index 0000000..4875b5f --- /dev/null +++ b/pages/campus/setPassword.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/pages/campus/signin.vue b/pages/campus/signin.vue new file mode 100644 index 0000000..f194a20 --- /dev/null +++ b/pages/campus/signin.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/pages/campus/购买备份.vue b/pages/campus/购买备份.vue new file mode 100644 index 0000000..b286935 --- /dev/null +++ b/pages/campus/购买备份.vue @@ -0,0 +1,522 @@ + + + + + diff --git a/pages/car/index.vue b/pages/car/index.vue new file mode 100644 index 0000000..5eddc64 --- /dev/null +++ b/pages/car/index.vue @@ -0,0 +1,909 @@ + + + + + diff --git a/pages/cashier/index.vue b/pages/cashier/index.vue new file mode 100644 index 0000000..3014bdc --- /dev/null +++ b/pages/cashier/index.vue @@ -0,0 +1,708 @@ + + + + + diff --git a/pages/classify/classify.vue b/pages/classify/classify.vue new file mode 100644 index 0000000..559074b --- /dev/null +++ b/pages/classify/classify.vue @@ -0,0 +1,433 @@ + + + + + diff --git a/pages/code/code.vue b/pages/code/code.vue new file mode 100644 index 0000000..9d56bb3 --- /dev/null +++ b/pages/code/code.vue @@ -0,0 +1,374 @@ + + + + + diff --git a/pages/coupon/coupon.vue b/pages/coupon/coupon.vue new file mode 100644 index 0000000..ef3fc45 --- /dev/null +++ b/pages/coupon/coupon.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/pages/couponArr/couponArr.vue b/pages/couponArr/couponArr.vue new file mode 100644 index 0000000..d13a87f --- /dev/null +++ b/pages/couponArr/couponArr.vue @@ -0,0 +1,202 @@ + + + + + diff --git a/pages/couponDetails/couponDetails.vue b/pages/couponDetails/couponDetails.vue new file mode 100644 index 0000000..f241f18 --- /dev/null +++ b/pages/couponDetails/couponDetails.vue @@ -0,0 +1,387 @@ + + + + + diff --git a/pages/draw/choose.vue b/pages/draw/choose.vue new file mode 100644 index 0000000..ae347d5 --- /dev/null +++ b/pages/draw/choose.vue @@ -0,0 +1,515 @@ + + + + + diff --git a/pages/draw/couponDetails.vue b/pages/draw/couponDetails.vue new file mode 100644 index 0000000..db511d2 --- /dev/null +++ b/pages/draw/couponDetails.vue @@ -0,0 +1,546 @@ + + + + + diff --git a/pages/draw/index.vue b/pages/draw/index.vue new file mode 100644 index 0000000..44f1f89 --- /dev/null +++ b/pages/draw/index.vue @@ -0,0 +1,603 @@ + + + + + diff --git a/pages/draw/logs.vue b/pages/draw/logs.vue new file mode 100644 index 0000000..148e86b --- /dev/null +++ b/pages/draw/logs.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/pages/draw/myCoupon.vue b/pages/draw/myCoupon.vue new file mode 100644 index 0000000..be12ea8 --- /dev/null +++ b/pages/draw/myCoupon.vue @@ -0,0 +1,226 @@ + + + + + diff --git a/pages/draw/order.vue b/pages/draw/order.vue new file mode 100644 index 0000000..35ec907 --- /dev/null +++ b/pages/draw/order.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/pages/draw/orderDetails.vue b/pages/draw/orderDetails.vue new file mode 100644 index 0000000..fdc7e0e --- /dev/null +++ b/pages/draw/orderDetails.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/pages/draw/password.vue b/pages/draw/password.vue new file mode 100644 index 0000000..f34722d --- /dev/null +++ b/pages/draw/password.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/pages/draw/register.vue b/pages/draw/register.vue new file mode 100644 index 0000000..3a5560d --- /dev/null +++ b/pages/draw/register.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/pages/draw/right.vue b/pages/draw/right.vue new file mode 100644 index 0000000..2af9d21 --- /dev/null +++ b/pages/draw/right.vue @@ -0,0 +1,797 @@ + + + + + diff --git a/pages/draw/setPassword.vue b/pages/draw/setPassword.vue new file mode 100644 index 0000000..e36b9e4 --- /dev/null +++ b/pages/draw/setPassword.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/pages/draw/signin.vue b/pages/draw/signin.vue new file mode 100644 index 0000000..da1a50c --- /dev/null +++ b/pages/draw/signin.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/pages/draw/success.vue b/pages/draw/success.vue new file mode 100644 index 0000000..710c570 --- /dev/null +++ b/pages/draw/success.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/pages/favour/favour.vue b/pages/favour/favour.vue new file mode 100644 index 0000000..ee30e3e --- /dev/null +++ b/pages/favour/favour.vue @@ -0,0 +1,367 @@ + + + + + diff --git a/pages/frozen/frozen.vue b/pages/frozen/frozen.vue new file mode 100644 index 0000000..975c9f6 --- /dev/null +++ b/pages/frozen/frozen.vue @@ -0,0 +1,456 @@ + + + + + diff --git a/pages/giftPack/buy.vue b/pages/giftPack/buy.vue new file mode 100644 index 0000000..a9b2a57 --- /dev/null +++ b/pages/giftPack/buy.vue @@ -0,0 +1,825 @@ + + + + + diff --git a/pages/giftPack/details.vue b/pages/giftPack/details.vue new file mode 100644 index 0000000..c9d81d9 --- /dev/null +++ b/pages/giftPack/details.vue @@ -0,0 +1,600 @@ + + + + + diff --git a/pages/giftPack/index-首页仰视备份.vue b/pages/giftPack/index-首页仰视备份.vue new file mode 100644 index 0000000..2c9d5c1 --- /dev/null +++ b/pages/giftPack/index-首页仰视备份.vue @@ -0,0 +1,474 @@ + + + + + diff --git a/pages/giftPack/index.vue b/pages/giftPack/index.vue new file mode 100644 index 0000000..72724fa --- /dev/null +++ b/pages/giftPack/index.vue @@ -0,0 +1,749 @@ + + + + + diff --git a/pages/giftPack/list.vue b/pages/giftPack/list.vue new file mode 100644 index 0000000..3712664 --- /dev/null +++ b/pages/giftPack/list.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/pages/giftPack/logs.vue b/pages/giftPack/logs.vue new file mode 100644 index 0000000..eba09b4 --- /dev/null +++ b/pages/giftPack/logs.vue @@ -0,0 +1,187 @@ + + + + + \ No newline at end of file diff --git a/pages/giftPack/myCoupon.vue b/pages/giftPack/myCoupon.vue new file mode 100644 index 0000000..6d7ac18 --- /dev/null +++ b/pages/giftPack/myCoupon.vue @@ -0,0 +1,541 @@ + + + + + diff --git a/pages/giftPack/password.vue b/pages/giftPack/password.vue new file mode 100644 index 0000000..017cf1f --- /dev/null +++ b/pages/giftPack/password.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/pages/giftPack/register.vue b/pages/giftPack/register.vue new file mode 100644 index 0000000..51141ae --- /dev/null +++ b/pages/giftPack/register.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/pages/giftPack/setPassword.vue b/pages/giftPack/setPassword.vue new file mode 100644 index 0000000..c18cdec --- /dev/null +++ b/pages/giftPack/setPassword.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/pages/giftPack/signin.vue b/pages/giftPack/signin.vue new file mode 100644 index 0000000..b53e0ba --- /dev/null +++ b/pages/giftPack/signin.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/pages/giftPack/user.vue b/pages/giftPack/user.vue new file mode 100644 index 0000000..7c2a3aa --- /dev/null +++ b/pages/giftPack/user.vue @@ -0,0 +1,380 @@ + + + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..55ef479 --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,1113 @@ + + + + + diff --git a/pages/oil/buy.vue b/pages/oil/buy.vue new file mode 100644 index 0000000..84f6a9c --- /dev/null +++ b/pages/oil/buy.vue @@ -0,0 +1,668 @@ + + + + + diff --git a/pages/oil/details.vue b/pages/oil/details.vue new file mode 100644 index 0000000..5a3c65a --- /dev/null +++ b/pages/oil/details.vue @@ -0,0 +1,598 @@ + + + + + diff --git a/pages/oil/index.vue b/pages/oil/index.vue new file mode 100644 index 0000000..73b3bec --- /dev/null +++ b/pages/oil/index.vue @@ -0,0 +1,266 @@ + + + + + diff --git a/pages/oil/myCoupon.vue b/pages/oil/myCoupon.vue new file mode 100644 index 0000000..9b5de53 --- /dev/null +++ b/pages/oil/myCoupon.vue @@ -0,0 +1,653 @@ + + + + + diff --git a/pages/oil/myList.vue b/pages/oil/myList.vue new file mode 100644 index 0000000..c0eddb4 --- /dev/null +++ b/pages/oil/myList.vue @@ -0,0 +1,315 @@ + + + + + diff --git a/pages/oil/password.vue b/pages/oil/password.vue new file mode 100644 index 0000000..c2cba24 --- /dev/null +++ b/pages/oil/password.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/pages/oil/register.vue b/pages/oil/register.vue new file mode 100644 index 0000000..fe1c7df --- /dev/null +++ b/pages/oil/register.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/pages/oil/setPassword.vue b/pages/oil/setPassword.vue new file mode 100644 index 0000000..60b652c --- /dev/null +++ b/pages/oil/setPassword.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/pages/oil/signin.vue b/pages/oil/signin.vue new file mode 100644 index 0000000..0e2457f --- /dev/null +++ b/pages/oil/signin.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/pages/order/order.vue b/pages/order/order.vue new file mode 100644 index 0000000..bd9aa86 --- /dev/null +++ b/pages/order/order.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/pages/order/orderData.vue b/pages/order/orderData.vue new file mode 100644 index 0000000..ef734f3 --- /dev/null +++ b/pages/order/orderData.vue @@ -0,0 +1,359 @@ + + + + + diff --git a/pages/packet/packet.vue b/pages/packet/packet.vue new file mode 100644 index 0000000..e382c96 --- /dev/null +++ b/pages/packet/packet.vue @@ -0,0 +1,363 @@ + + + + + diff --git a/pages/payPassword/forget.vue b/pages/payPassword/forget.vue new file mode 100644 index 0000000..f8c8fe8 --- /dev/null +++ b/pages/payPassword/forget.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/pages/payPassword/index.vue b/pages/payPassword/index.vue new file mode 100644 index 0000000..5085359 --- /dev/null +++ b/pages/payPassword/index.vue @@ -0,0 +1,53 @@ + + + + diff --git a/pages/payPassword/setup.vue b/pages/payPassword/setup.vue new file mode 100644 index 0000000..ab9307f --- /dev/null +++ b/pages/payPassword/setup.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/pages/payView/payView.vue b/pages/payView/payView.vue new file mode 100644 index 0000000..c96e118 --- /dev/null +++ b/pages/payView/payView.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/pages/rights/index.vue b/pages/rights/index.vue new file mode 100644 index 0000000..9aa37da --- /dev/null +++ b/pages/rights/index.vue @@ -0,0 +1,970 @@ + + + + + diff --git a/pages/setUpForm/form_submit.vue b/pages/setUpForm/form_submit.vue new file mode 100644 index 0000000..37c4be2 --- /dev/null +++ b/pages/setUpForm/form_submit.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/pages/setUpForm/index.vue b/pages/setUpForm/index.vue new file mode 100644 index 0000000..924358e --- /dev/null +++ b/pages/setUpForm/index.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/pages/site/create.vue b/pages/site/create.vue new file mode 100644 index 0000000..72a02d7 --- /dev/null +++ b/pages/site/create.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/pages/site/edit.vue b/pages/site/edit.vue new file mode 100644 index 0000000..8496aed --- /dev/null +++ b/pages/site/edit.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/pages/site/index.vue b/pages/site/index.vue new file mode 100644 index 0000000..c96c04d --- /dev/null +++ b/pages/site/index.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/pages/store/details.vue b/pages/store/details.vue new file mode 100644 index 0000000..e66190b --- /dev/null +++ b/pages/store/details.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/pages/store/index.vue b/pages/store/index.vue new file mode 100644 index 0000000..8e8a66d --- /dev/null +++ b/pages/store/index.vue @@ -0,0 +1,444 @@ + + + + diff --git a/pages/subscribe/combo/combo.vue b/pages/subscribe/combo/combo.vue new file mode 100644 index 0000000..5e37400 --- /dev/null +++ b/pages/subscribe/combo/combo.vue @@ -0,0 +1,299 @@ + + + + + diff --git a/pages/subscribe/upgrade/upgrade.vue b/pages/subscribe/upgrade/upgrade.vue new file mode 100644 index 0000000..b27bd3b --- /dev/null +++ b/pages/subscribe/upgrade/upgrade.vue @@ -0,0 +1,321 @@ + + + + diff --git a/pages/switchcity/switchcity.vue b/pages/switchcity/switchcity.vue new file mode 100644 index 0000000..b979730 --- /dev/null +++ b/pages/switchcity/switchcity.vue @@ -0,0 +1,281 @@ + + + + + diff --git a/pages/unicom/buy.vue b/pages/unicom/buy.vue new file mode 100644 index 0000000..4196730 --- /dev/null +++ b/pages/unicom/buy.vue @@ -0,0 +1,664 @@ + + + + + diff --git a/pages/unicom/details.vue b/pages/unicom/details.vue new file mode 100644 index 0000000..78f7511 --- /dev/null +++ b/pages/unicom/details.vue @@ -0,0 +1,539 @@ + + + + + diff --git a/pages/unicom/index.vue b/pages/unicom/index.vue new file mode 100644 index 0000000..de954e0 --- /dev/null +++ b/pages/unicom/index.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/pages/unicom/password.vue b/pages/unicom/password.vue new file mode 100644 index 0000000..24f6a1c --- /dev/null +++ b/pages/unicom/password.vue @@ -0,0 +1,231 @@ + + + + + diff --git a/pages/unicom/register.vue b/pages/unicom/register.vue new file mode 100644 index 0000000..d6ef33b --- /dev/null +++ b/pages/unicom/register.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/pages/unicom/setPassword.vue b/pages/unicom/setPassword.vue new file mode 100644 index 0000000..d44b7fc --- /dev/null +++ b/pages/unicom/setPassword.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/pages/unicom/signin.vue b/pages/unicom/signin.vue new file mode 100644 index 0000000..0183016 --- /dev/null +++ b/pages/unicom/signin.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/pages/user/index.vue b/pages/user/index.vue new file mode 100644 index 0000000..8b1774c --- /dev/null +++ b/pages/user/index.vue @@ -0,0 +1,474 @@ + + + + + diff --git a/pages/userGoods/goodsCode.vue b/pages/userGoods/goodsCode.vue new file mode 100644 index 0000000..5200f02 --- /dev/null +++ b/pages/userGoods/goodsCode.vue @@ -0,0 +1,407 @@ + + + + + \ No newline at end of file diff --git a/pages/userGoods/goodsDet.vue b/pages/userGoods/goodsDet.vue new file mode 100644 index 0000000..6188245 --- /dev/null +++ b/pages/userGoods/goodsDet.vue @@ -0,0 +1,349 @@ + + + + + diff --git a/pages/userGoods/index.vue b/pages/userGoods/index.vue new file mode 100644 index 0000000..310b399 --- /dev/null +++ b/pages/userGoods/index.vue @@ -0,0 +1,307 @@ + + + + + diff --git a/pages/userStored/index.vue b/pages/userStored/index.vue new file mode 100644 index 0000000..34226cb --- /dev/null +++ b/pages/userStored/index.vue @@ -0,0 +1,297 @@ + + + + + \ No newline at end of file diff --git a/pages/userStored/storedCode.vue b/pages/userStored/storedCode.vue new file mode 100644 index 0000000..0fc8da4 --- /dev/null +++ b/pages/userStored/storedCode.vue @@ -0,0 +1,308 @@ + + + + + \ No newline at end of file diff --git a/pages/washcar/washcar.vue b/pages/washcar/washcar.vue new file mode 100644 index 0000000..ed5ea59 --- /dev/null +++ b/pages/washcar/washcar.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/webView/webView.vue b/pages/webView/webView.vue new file mode 100644 index 0000000..2cc234f --- /dev/null +++ b/pages/webView/webView.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/pages/welfare/welfare.vue b/pages/welfare/welfare.vue new file mode 100644 index 0000000..a2d4aef --- /dev/null +++ b/pages/welfare/welfare.vue @@ -0,0 +1,910 @@ + + + + + diff --git a/static/icon/Check.png b/static/icon/Check.png new file mode 100644 index 0000000..414ff3b Binary files /dev/null and b/static/icon/Check.png differ diff --git a/static/icon/Point_icon.png b/static/icon/Point_icon.png new file mode 100644 index 0000000..7eee5a3 Binary files /dev/null and b/static/icon/Point_icon.png differ diff --git a/static/icon/activity_icon.png b/static/icon/activity_icon.png new file mode 100644 index 0000000..6d54870 Binary files /dev/null and b/static/icon/activity_icon.png differ diff --git a/static/icon/add.png b/static/icon/add.png new file mode 100644 index 0000000..ad2ed18 Binary files /dev/null and b/static/icon/add.png differ diff --git a/static/icon/address_icon.png b/static/icon/address_icon.png new file mode 100644 index 0000000..70ca205 Binary files /dev/null and b/static/icon/address_icon.png differ diff --git a/static/icon/arrow_down.png b/static/icon/arrow_down.png new file mode 100644 index 0000000..8731b7a Binary files /dev/null and b/static/icon/arrow_down.png differ diff --git a/static/icon/arrow_left.png b/static/icon/arrow_left.png new file mode 100644 index 0000000..94a76ab Binary files /dev/null and b/static/icon/arrow_left.png differ diff --git a/static/icon/arrow_right.png b/static/icon/arrow_right.png new file mode 100644 index 0000000..d965a47 Binary files /dev/null and b/static/icon/arrow_right.png differ diff --git a/static/icon/arrow_right_black.png b/static/icon/arrow_right_black.png new file mode 100644 index 0000000..ca0d51d Binary files /dev/null and b/static/icon/arrow_right_black.png differ diff --git a/static/icon/arrow_tips.png b/static/icon/arrow_tips.png new file mode 100644 index 0000000..d42d882 Binary files /dev/null and b/static/icon/arrow_tips.png differ diff --git a/static/icon/choice.png b/static/icon/choice.png new file mode 100644 index 0000000..18d62fa Binary files /dev/null and b/static/icon/choice.png differ diff --git a/static/icon/contentCard_icon.png b/static/icon/contentCard_icon.png new file mode 100644 index 0000000..917c502 Binary files /dev/null and b/static/icon/contentCard_icon.png differ diff --git a/static/icon/frozen_arrow.png b/static/icon/frozen_arrow.png new file mode 100644 index 0000000..91e443d Binary files /dev/null and b/static/icon/frozen_arrow.png differ diff --git a/static/icon/giftPack-icon-yellow.png b/static/icon/giftPack-icon-yellow.png new file mode 100644 index 0000000..af41ee7 Binary files /dev/null and b/static/icon/giftPack-icon-yellow.png differ diff --git a/static/icon/giftPack-icon.png b/static/icon/giftPack-icon.png new file mode 100644 index 0000000..083a730 Binary files /dev/null and b/static/icon/giftPack-icon.png differ diff --git a/static/icon/indexSite.png b/static/icon/indexSite.png new file mode 100644 index 0000000..11d5a8b Binary files /dev/null and b/static/icon/indexSite.png differ diff --git a/static/icon/integra_icon00.png b/static/icon/integra_icon00.png new file mode 100644 index 0000000..969f039 Binary files /dev/null and b/static/icon/integra_icon00.png differ diff --git a/static/icon/integra_icon01.png b/static/icon/integra_icon01.png new file mode 100644 index 0000000..18f25e8 Binary files /dev/null and b/static/icon/integra_icon01.png differ diff --git a/static/icon/location.png b/static/icon/location.png new file mode 100644 index 0000000..186b0e4 Binary files /dev/null and b/static/icon/location.png differ diff --git a/static/icon/navFooter_icon_00.png b/static/icon/navFooter_icon_00.png new file mode 100644 index 0000000..5969817 Binary files /dev/null and b/static/icon/navFooter_icon_00.png differ diff --git a/static/icon/navFooter_icon_01_active.png b/static/icon/navFooter_icon_01_active.png new file mode 100644 index 0000000..3f1f757 Binary files /dev/null and b/static/icon/navFooter_icon_01_active.png differ diff --git a/static/icon/news_icon.png b/static/icon/news_icon.png new file mode 100644 index 0000000..2e4c687 Binary files /dev/null and b/static/icon/news_icon.png differ diff --git a/static/icon/notice_icon.png b/static/icon/notice_icon.png new file mode 100644 index 0000000..0975820 Binary files /dev/null and b/static/icon/notice_icon.png differ diff --git a/static/icon/orderIcon_00.png b/static/icon/orderIcon_00.png new file mode 100644 index 0000000..6c5bae8 Binary files /dev/null and b/static/icon/orderIcon_00.png differ diff --git a/static/icon/orderIcon_01.png b/static/icon/orderIcon_01.png new file mode 100644 index 0000000..f2f3f06 Binary files /dev/null and b/static/icon/orderIcon_01.png differ diff --git a/static/icon/order_icon_00.png b/static/icon/order_icon_00.png new file mode 100644 index 0000000..b1e0d85 Binary files /dev/null and b/static/icon/order_icon_00.png differ diff --git a/static/icon/order_icon_01.png b/static/icon/order_icon_01.png new file mode 100644 index 0000000..70b7f9b Binary files /dev/null and b/static/icon/order_icon_01.png differ diff --git a/static/icon/order_icon_02.png b/static/icon/order_icon_02.png new file mode 100644 index 0000000..b70aedd Binary files /dev/null and b/static/icon/order_icon_02.png differ diff --git a/static/icon/refresh_loding.gif b/static/icon/refresh_loding.gif new file mode 100644 index 0000000..5bb90fd Binary files /dev/null and b/static/icon/refresh_loding.gif differ diff --git a/static/icon/rightsArrow.png b/static/icon/rightsArrow.png new file mode 100644 index 0000000..80006e1 Binary files /dev/null and b/static/icon/rightsArrow.png differ diff --git a/static/icon/secrch_icon.png b/static/icon/secrch_icon.png new file mode 100644 index 0000000..edd6bd6 Binary files /dev/null and b/static/icon/secrch_icon.png differ diff --git a/static/icon/select.png b/static/icon/select.png new file mode 100644 index 0000000..96b56f1 Binary files /dev/null and b/static/icon/select.png differ diff --git a/static/icon/select_avtive.png b/static/icon/select_avtive.png new file mode 100644 index 0000000..dc76782 Binary files /dev/null and b/static/icon/select_avtive.png differ diff --git a/static/icon/site_icon.png b/static/icon/site_icon.png new file mode 100644 index 0000000..94eb9a4 Binary files /dev/null and b/static/icon/site_icon.png differ diff --git a/static/icon/storeArrow.png b/static/icon/storeArrow.png new file mode 100644 index 0000000..4afb92b Binary files /dev/null and b/static/icon/storeArrow.png differ diff --git a/static/icon/switch.png b/static/icon/switch.png new file mode 100644 index 0000000..1d8d0ea Binary files /dev/null and b/static/icon/switch.png differ diff --git a/static/icon/tel.png b/static/icon/tel.png new file mode 100644 index 0000000..744f34e Binary files /dev/null and b/static/icon/tel.png differ diff --git a/static/icon/time_icon.png b/static/icon/time_icon.png new file mode 100644 index 0000000..8e1f37f Binary files /dev/null and b/static/icon/time_icon.png differ diff --git a/static/img/accountsIcon_00.png b/static/img/accountsIcon_00.png new file mode 100644 index 0000000..ad7569c Binary files /dev/null and b/static/img/accountsIcon_00.png differ diff --git a/static/img/accountsIcon_01.png b/static/img/accountsIcon_01.png new file mode 100644 index 0000000..68dac83 Binary files /dev/null and b/static/img/accountsIcon_01.png differ diff --git a/static/img/address_back.png b/static/img/address_back.png new file mode 100644 index 0000000..9f10b85 Binary files /dev/null and b/static/img/address_back.png differ diff --git a/static/img/arrow.png b/static/img/arrow.png new file mode 100644 index 0000000..b34fba0 Binary files /dev/null and b/static/img/arrow.png differ diff --git a/static/img/balance-icon-00.png b/static/img/balance-icon-00.png new file mode 100644 index 0000000..8fa7345 Binary files /dev/null and b/static/img/balance-icon-00.png differ diff --git a/static/img/balance-icon-01.png b/static/img/balance-icon-01.png new file mode 100644 index 0000000..daa157d Binary files /dev/null and b/static/img/balance-icon-01.png differ diff --git a/static/img/balance-icon-02.png b/static/img/balance-icon-02.png new file mode 100644 index 0000000..27002c2 Binary files /dev/null and b/static/img/balance-icon-02.png differ diff --git a/static/img/balance-icon-03.png b/static/img/balance-icon-03.png new file mode 100644 index 0000000..b1d9cad Binary files /dev/null and b/static/img/balance-icon-03.png differ diff --git a/static/img/balance-icon-row.png b/static/img/balance-icon-row.png new file mode 100644 index 0000000..b03691e Binary files /dev/null and b/static/img/balance-icon-row.png differ diff --git a/static/img/campusCoupon_img.png b/static/img/campusCoupon_img.png new file mode 100644 index 0000000..56a950d Binary files /dev/null and b/static/img/campusCoupon_img.png differ diff --git a/static/img/campusCoupon_user - 副本.png b/static/img/campusCoupon_user - 副本.png new file mode 100644 index 0000000..7a64628 Binary files /dev/null and b/static/img/campusCoupon_user - 副本.png differ diff --git a/static/img/campusIdx_back.png b/static/img/campusIdx_back.png new file mode 100644 index 0000000..24314ca Binary files /dev/null and b/static/img/campusIdx_back.png differ diff --git a/static/img/campusIdx_icon_00.png b/static/img/campusIdx_icon_00.png new file mode 100644 index 0000000..81bf120 Binary files /dev/null and b/static/img/campusIdx_icon_00.png differ diff --git a/static/img/campusIdx_icon_01.png b/static/img/campusIdx_icon_01.png new file mode 100644 index 0000000..dcf828b Binary files /dev/null and b/static/img/campusIdx_icon_01.png differ diff --git a/static/img/campusIdx_icon_02.png b/static/img/campusIdx_icon_02.png new file mode 100644 index 0000000..ef158ff Binary files /dev/null and b/static/img/campusIdx_icon_02.png differ diff --git a/static/img/campusIdx_icon_03.png b/static/img/campusIdx_icon_03.png new file mode 100644 index 0000000..fb4c7fb Binary files /dev/null and b/static/img/campusIdx_icon_03.png differ diff --git a/static/img/campusLogin_back.png b/static/img/campusLogin_back.png new file mode 100644 index 0000000..957179f Binary files /dev/null and b/static/img/campusLogin_back.png differ diff --git a/static/img/campusLogin_back_01.png b/static/img/campusLogin_back_01.png new file mode 100644 index 0000000..4693c45 Binary files /dev/null and b/static/img/campusLogin_back_01.png differ diff --git a/static/img/campusLogin_logo.png b/static/img/campusLogin_logo.png new file mode 100644 index 0000000..57c317c Binary files /dev/null and b/static/img/campusLogin_logo.png differ diff --git a/static/img/campus_details_back.png b/static/img/campus_details_back.png new file mode 100644 index 0000000..cc0d705 Binary files /dev/null and b/static/img/campus_details_back.png differ diff --git a/static/img/campus_login_00.png b/static/img/campus_login_00.png new file mode 100644 index 0000000..eee3f3a Binary files /dev/null and b/static/img/campus_login_00.png differ diff --git a/static/img/campus_login_01.png b/static/img/campus_login_01.png new file mode 100644 index 0000000..820d751 Binary files /dev/null and b/static/img/campus_login_01.png differ diff --git a/static/img/campus_login_02.png b/static/img/campus_login_02.png new file mode 100644 index 0000000..10ccbdc Binary files /dev/null and b/static/img/campus_login_02.png differ diff --git a/static/img/campus_login_03.png b/static/img/campus_login_03.png new file mode 100644 index 0000000..54ebe0a Binary files /dev/null and b/static/img/campus_login_03.png differ diff --git a/static/img/campus_logo.jpg b/static/img/campus_logo.jpg new file mode 100644 index 0000000..b14ee63 Binary files /dev/null and b/static/img/campus_logo.jpg differ diff --git a/static/img/cashierTips_icon.png b/static/img/cashierTips_icon.png new file mode 100644 index 0000000..2431c93 Binary files /dev/null and b/static/img/cashierTips_icon.png differ diff --git a/static/img/dhImg.png b/static/img/dhImg.png new file mode 100644 index 0000000..568dd6b Binary files /dev/null and b/static/img/dhImg.png differ diff --git a/static/img/draw-title.png b/static/img/draw-title.png new file mode 100644 index 0000000..3831aea Binary files /dev/null and b/static/img/draw-title.png differ diff --git a/static/img/draw_choose.png b/static/img/draw_choose.png new file mode 100644 index 0000000..ec509d9 Binary files /dev/null and b/static/img/draw_choose.png differ diff --git a/static/img/draw_coupon.png b/static/img/draw_coupon.png new file mode 100644 index 0000000..559a50f Binary files /dev/null and b/static/img/draw_coupon.png differ diff --git a/static/img/draw_coupon_active.png b/static/img/draw_coupon_active.png new file mode 100644 index 0000000..79fddfe Binary files /dev/null and b/static/img/draw_coupon_active.png differ diff --git a/static/img/draw_login_02.png b/static/img/draw_login_02.png new file mode 100644 index 0000000..a04af93 Binary files /dev/null and b/static/img/draw_login_02.png differ diff --git a/static/img/draw_login_03.png b/static/img/draw_login_03.png new file mode 100644 index 0000000..5f7c24b Binary files /dev/null and b/static/img/draw_login_03.png differ diff --git a/static/img/draw_login_04.png b/static/img/draw_login_04.png new file mode 100644 index 0000000..b3e82a4 Binary files /dev/null and b/static/img/draw_login_04.png differ diff --git a/static/img/draw_order.png b/static/img/draw_order.png new file mode 100644 index 0000000..c9eaf3d Binary files /dev/null and b/static/img/draw_order.png differ diff --git a/static/img/giftPack-img01.png b/static/img/giftPack-img01.png new file mode 100644 index 0000000..8150cb8 Binary files /dev/null and b/static/img/giftPack-img01.png differ diff --git a/static/img/giftPack-img02.png b/static/img/giftPack-img02.png new file mode 100644 index 0000000..61d2068 Binary files /dev/null and b/static/img/giftPack-img02.png differ diff --git a/static/img/giftPack-img03.png b/static/img/giftPack-img03.png new file mode 100644 index 0000000..8680409 Binary files /dev/null and b/static/img/giftPack-img03.png differ diff --git a/static/img/giftPack-img04.png b/static/img/giftPack-img04.png new file mode 100644 index 0000000..d97c468 Binary files /dev/null and b/static/img/giftPack-img04.png differ diff --git a/static/img/giftPack-img05.png b/static/img/giftPack-img05.png new file mode 100644 index 0000000..294c089 Binary files /dev/null and b/static/img/giftPack-img05.png differ diff --git a/static/img/giftPack-img06.png b/static/img/giftPack-img06.png new file mode 100644 index 0000000..08cb9d1 Binary files /dev/null and b/static/img/giftPack-img06.png differ diff --git a/static/img/giftPack-img07.png b/static/img/giftPack-img07.png new file mode 100644 index 0000000..a2df7b4 Binary files /dev/null and b/static/img/giftPack-img07.png differ diff --git a/static/img/giftPack-img08.png b/static/img/giftPack-img08.png new file mode 100644 index 0000000..6d524e0 Binary files /dev/null and b/static/img/giftPack-img08.png differ diff --git a/static/img/giftPack-img09.png b/static/img/giftPack-img09.png new file mode 100644 index 0000000..c46ca9e Binary files /dev/null and b/static/img/giftPack-img09.png differ diff --git a/static/img/giftPack-null.png b/static/img/giftPack-null.png new file mode 100644 index 0000000..073f39d Binary files /dev/null and b/static/img/giftPack-null.png differ diff --git a/static/img/giftPack-user00.png b/static/img/giftPack-user00.png new file mode 100644 index 0000000..71734fd Binary files /dev/null and b/static/img/giftPack-user00.png differ diff --git a/static/img/giftPack-user00_active.png b/static/img/giftPack-user00_active.png new file mode 100644 index 0000000..8dbb522 Binary files /dev/null and b/static/img/giftPack-user00_active.png differ diff --git a/static/img/giftPack-user01.png b/static/img/giftPack-user01.png new file mode 100644 index 0000000..a4da1a5 Binary files /dev/null and b/static/img/giftPack-user01.png differ diff --git a/static/img/giftPack-user01_active.png b/static/img/giftPack-user01_active.png new file mode 100644 index 0000000..55a2dc3 Binary files /dev/null and b/static/img/giftPack-user01_active.png differ diff --git a/static/img/giftPackCoupon_user.png b/static/img/giftPackCoupon_user.png new file mode 100644 index 0000000..a3b962e Binary files /dev/null and b/static/img/giftPackCoupon_user.png differ diff --git a/static/img/gift_box.png b/static/img/gift_box.png new file mode 100644 index 0000000..eed5968 Binary files /dev/null and b/static/img/gift_box.png differ diff --git a/static/img/goodsCode_white.png b/static/img/goodsCode_white.png new file mode 100644 index 0000000..68ffd6b Binary files /dev/null and b/static/img/goodsCode_white.png differ diff --git a/static/img/grant_icon.png b/static/img/grant_icon.png new file mode 100644 index 0000000..72c945d Binary files /dev/null and b/static/img/grant_icon.png differ diff --git a/static/img/healthy_img00.png b/static/img/healthy_img00.png new file mode 100644 index 0000000..5fdd6f4 Binary files /dev/null and b/static/img/healthy_img00.png differ diff --git a/static/img/healthy_img01.png b/static/img/healthy_img01.png new file mode 100644 index 0000000..1895d76 Binary files /dev/null and b/static/img/healthy_img01.png differ diff --git a/static/img/healthy_img02.png b/static/img/healthy_img02.png new file mode 100644 index 0000000..89c6e60 Binary files /dev/null and b/static/img/healthy_img02.png differ diff --git a/static/img/healthy_img03.png b/static/img/healthy_img03.png new file mode 100644 index 0000000..f871bab Binary files /dev/null and b/static/img/healthy_img03.png differ diff --git a/static/img/legal_tips.png b/static/img/legal_tips.png new file mode 100644 index 0000000..7bb436f Binary files /dev/null and b/static/img/legal_tips.png differ diff --git a/static/img/login_back.png b/static/img/login_back.png new file mode 100644 index 0000000..d4e8c09 Binary files /dev/null and b/static/img/login_back.png differ diff --git a/static/img/logo.png b/static/img/logo.png new file mode 100644 index 0000000..3203e2f Binary files /dev/null and b/static/img/logo.png differ diff --git a/static/img/luckClose.png b/static/img/luckClose.png new file mode 100644 index 0000000..64f0a6e Binary files /dev/null and b/static/img/luckClose.png differ diff --git a/static/img/makeForm_price_back.png b/static/img/makeForm_price_back.png new file mode 100644 index 0000000..d001603 Binary files /dev/null and b/static/img/makeForm_price_back.png differ diff --git a/static/img/makeForm_price_back_active.png b/static/img/makeForm_price_back_active.png new file mode 100644 index 0000000..a070a88 Binary files /dev/null and b/static/img/makeForm_price_back_active.png differ diff --git a/static/img/null_icon.png b/static/img/null_icon.png new file mode 100644 index 0000000..ca299cb Binary files /dev/null and b/static/img/null_icon.png differ diff --git a/static/img/oilCoupon_img.png b/static/img/oilCoupon_img.png new file mode 100644 index 0000000..4783a5a Binary files /dev/null and b/static/img/oilCoupon_img.png differ diff --git a/static/img/oilIdx_back.png b/static/img/oilIdx_back.png new file mode 100644 index 0000000..ce2f998 Binary files /dev/null and b/static/img/oilIdx_back.png differ diff --git a/static/img/packetText_icon.png b/static/img/packetText_icon.png new file mode 100644 index 0000000..893418f Binary files /dev/null and b/static/img/packetText_icon.png differ diff --git a/static/img/packet_arr.png b/static/img/packet_arr.png new file mode 100644 index 0000000..4134220 Binary files /dev/null and b/static/img/packet_arr.png differ diff --git a/static/img/pointMore-up.png b/static/img/pointMore-up.png new file mode 100644 index 0000000..646061d Binary files /dev/null and b/static/img/pointMore-up.png differ diff --git a/static/img/pointMore.png b/static/img/pointMore.png new file mode 100644 index 0000000..4c9b807 Binary files /dev/null and b/static/img/pointMore.png differ diff --git a/static/img/profigLabel_row.png b/static/img/profigLabel_row.png new file mode 100644 index 0000000..190c650 Binary files /dev/null and b/static/img/profigLabel_row.png differ diff --git a/static/img/profig_billie_icon.png b/static/img/profig_billie_icon.png new file mode 100644 index 0000000..1cb3ec0 Binary files /dev/null and b/static/img/profig_billie_icon.png differ diff --git a/static/img/profig_billie_icon_active.png b/static/img/profig_billie_icon_active.png new file mode 100644 index 0000000..20f040a Binary files /dev/null and b/static/img/profig_billie_icon_active.png differ diff --git a/static/img/refresh_loding.gif b/static/img/refresh_loding.gif new file mode 100644 index 0000000..5bb90fd Binary files /dev/null and b/static/img/refresh_loding.gif differ diff --git a/static/img/rights_back_02.png b/static/img/rights_back_02.png new file mode 100644 index 0000000..c6d7960 Binary files /dev/null and b/static/img/rights_back_02.png differ diff --git a/static/img/shareTitle.png b/static/img/shareTitle.png new file mode 100644 index 0000000..5c1488f Binary files /dev/null and b/static/img/shareTitle.png differ diff --git a/static/img/staff_null.png b/static/img/staff_null.png new file mode 100644 index 0000000..2f98c33 Binary files /dev/null and b/static/img/staff_null.png differ diff --git a/static/img/storedCode.png b/static/img/storedCode.png new file mode 100644 index 0000000..6906bb6 Binary files /dev/null and b/static/img/storedCode.png differ diff --git a/static/img/subscribe.jpg b/static/img/subscribe.jpg new file mode 100644 index 0000000..38ce635 Binary files /dev/null and b/static/img/subscribe.jpg differ diff --git a/static/img/subscribe_gzh.png b/static/img/subscribe_gzh.png new file mode 100644 index 0000000..9d54fd8 Binary files /dev/null and b/static/img/subscribe_gzh.png differ diff --git a/static/img/unicomIdx_back.png b/static/img/unicomIdx_back.png new file mode 100644 index 0000000..94e5b9b Binary files /dev/null and b/static/img/unicomIdx_back.png differ diff --git a/static/img/unicom_back.png b/static/img/unicom_back.png new file mode 100644 index 0000000..bdafe11 Binary files /dev/null and b/static/img/unicom_back.png differ diff --git a/static/img/unicom_img.png b/static/img/unicom_img.png new file mode 100644 index 0000000..704bd0a Binary files /dev/null and b/static/img/unicom_img.png differ diff --git a/static/img/unicom_logo.png b/static/img/unicom_logo.png new file mode 100644 index 0000000..c52ab3b Binary files /dev/null and b/static/img/unicom_logo.png differ diff --git a/static/img/user-codeImg-down.png b/static/img/user-codeImg-down.png new file mode 100644 index 0000000..f522e14 Binary files /dev/null and b/static/img/user-codeImg-down.png differ diff --git a/static/img/user-storedCode-down.png b/static/img/user-storedCode-down.png new file mode 100644 index 0000000..36d535b Binary files /dev/null and b/static/img/user-storedCode-down.png differ diff --git a/static/img/userCoupon.png b/static/img/userCoupon.png new file mode 100644 index 0000000..ce5220b Binary files /dev/null and b/static/img/userCoupon.png differ diff --git a/static/img/userGoods_icon.png b/static/img/userGoods_icon.png new file mode 100644 index 0000000..2fe8d86 Binary files /dev/null and b/static/img/userGoods_icon.png differ diff --git a/static/img/userOrder_00.png b/static/img/userOrder_00.png new file mode 100644 index 0000000..c24b234 Binary files /dev/null and b/static/img/userOrder_00.png differ diff --git a/static/img/userOrder_01.png b/static/img/userOrder_01.png new file mode 100644 index 0000000..0d0ca72 Binary files /dev/null and b/static/img/userOrder_01.png differ diff --git a/static/img/userOrder_02.png b/static/img/userOrder_02.png new file mode 100644 index 0000000..9950970 Binary files /dev/null and b/static/img/userOrder_02.png differ diff --git a/static/img/userOrder_03.png b/static/img/userOrder_03.png new file mode 100644 index 0000000..91a105e Binary files /dev/null and b/static/img/userOrder_03.png differ diff --git a/static/img/userOrder_04.png b/static/img/userOrder_04.png new file mode 100644 index 0000000..4e5b8f6 Binary files /dev/null and b/static/img/userOrder_04.png differ diff --git a/static/img/userOrder_05.png b/static/img/userOrder_05.png new file mode 100644 index 0000000..bc3794e Binary files /dev/null and b/static/img/userOrder_05.png differ diff --git a/static/img/userOrder_06.png b/static/img/userOrder_06.png new file mode 100644 index 0000000..6678f49 Binary files /dev/null and b/static/img/userOrder_06.png differ diff --git a/static/img/userOrder_07.png b/static/img/userOrder_07.png new file mode 100644 index 0000000..7617dd2 Binary files /dev/null and b/static/img/userOrder_07.png differ diff --git a/static/img/userOrder_08.png b/static/img/userOrder_08.png new file mode 100644 index 0000000..23ff6b0 Binary files /dev/null and b/static/img/userOrder_08.png differ diff --git a/static/img/userOrder_09.png b/static/img/userOrder_09.png new file mode 100644 index 0000000..f7f8dc1 Binary files /dev/null and b/static/img/userOrder_09.png differ diff --git a/static/img/userOrder_10.png b/static/img/userOrder_10.png new file mode 100644 index 0000000..9f5773d Binary files /dev/null and b/static/img/userOrder_10.png differ diff --git a/static/img/userOrder_11.png b/static/img/userOrder_11.png new file mode 100644 index 0000000..9c3de30 Binary files /dev/null and b/static/img/userOrder_11.png differ diff --git a/static/img/userSite.png b/static/img/userSite.png new file mode 100644 index 0000000..6902bab Binary files /dev/null and b/static/img/userSite.png differ diff --git a/static/img/user_identity_00.png b/static/img/user_identity_00.png new file mode 100644 index 0000000..e9e0876 Binary files /dev/null and b/static/img/user_identity_00.png differ diff --git a/static/img/user_identity_01.png b/static/img/user_identity_01.png new file mode 100644 index 0000000..35260a2 Binary files /dev/null and b/static/img/user_identity_01.png differ diff --git a/static/img/wqb.jpg b/static/img/wqb.jpg new file mode 100644 index 0000000..6c92cef Binary files /dev/null and b/static/img/wqb.jpg differ diff --git a/static/img/wx.jpg b/static/img/wx.jpg new file mode 100644 index 0000000..fcb00a1 Binary files /dev/null and b/static/img/wx.jpg differ diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000..b5771e2 Binary files /dev/null and b/static/logo.png differ diff --git a/static/tabBarIcon/00.png b/static/tabBarIcon/00.png new file mode 100644 index 0000000..ab1675c Binary files /dev/null and b/static/tabBarIcon/00.png differ diff --git a/static/tabBarIcon/00_active.png b/static/tabBarIcon/00_active.png new file mode 100644 index 0000000..0519763 Binary files /dev/null and b/static/tabBarIcon/00_active.png differ diff --git a/static/tabBarIcon/01.png b/static/tabBarIcon/01.png new file mode 100644 index 0000000..2f8d049 Binary files /dev/null and b/static/tabBarIcon/01.png differ diff --git a/static/tabBarIcon/01_active.png b/static/tabBarIcon/01_active.png new file mode 100644 index 0000000..d4ec6b3 Binary files /dev/null and b/static/tabBarIcon/01_active.png differ diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..777e480 --- /dev/null +++ b/store/index.js @@ -0,0 +1,24 @@ +import Vue from "vue" +import Vuex from 'vuex' + +Vue.use(Vuex) + +export default new Vuex.Store({ + state: { + token: uni.getStorageSync('token') || '' + }, + getters: { + getToken: state => { + return state.token + } + }, + mutations: { + setToken(state, tokenString) { + state.token = tokenString + uni.setStorageSync('token', tokenString) + } + }, + medules: { + + } +}) \ No newline at end of file diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..845142d --- /dev/null +++ b/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:24rpx; +$uni-font-size-base:28rpx; +$uni-font-size-lg:32rpx; + +/* 图片尺寸 */ +$uni-img-size-sm:40rpx; +$uni-img-size-base:52rpx; +$uni-img-size-lg:80rpx; + +/* Border Radius */ +$uni-border-radius-sm: 4rpx; +$uni-border-radius-base: 6rpx; +$uni-border-radius-lg: 12rpx; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 10px; +$uni-spacing-row-base: 20rpx; +$uni-spacing-row-lg: 30rpx; + +/* 垂直间距 */ +$uni-spacing-col-sm: 8rpx; +$uni-spacing-col-base: 16rpx; +$uni-spacing-col-lg: 24rpx; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:40rpx; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:36rpx; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:30rpx; \ No newline at end of file diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md new file mode 100644 index 0000000..204f31b --- /dev/null +++ b/uni_modules/uni-icons/changelog.md @@ -0,0 +1,4 @@ +## 1.1.5(2021-05-12) +- 新增 组件示例地址 +## 1.1.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/uni_modules/uni-icons/components/uni-icons/icons.js b/uni_modules/uni-icons/components/uni-icons/icons.js new file mode 100644 index 0000000..60b7332 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/icons.js @@ -0,0 +1,132 @@ +export default { + "pulldown": "\ue588", + "refreshempty": "\ue461", + "back": "\ue471", + "forward": "\ue470", + "more": "\ue507", + "more-filled": "\ue537", + "scan": "\ue612", + "qq": "\ue264", + "weibo": "\ue260", + "weixin": "\ue261", + "pengyouquan": "\ue262", + "loop": "\ue565", + "refresh": "\ue407", + "refresh-filled": "\ue437", + "arrowthindown": "\ue585", + "arrowthinleft": "\ue586", + "arrowthinright": "\ue587", + "arrowthinup": "\ue584", + "undo-filled": "\ue7d6", + "undo": "\ue406", + "redo": "\ue405", + "redo-filled": "\ue7d9", + "bars": "\ue563", + "chatboxes": "\ue203", + "camera": "\ue301", + "chatboxes-filled": "\ue233", + "camera-filled": "\ue7ef", + "cart-filled": "\ue7f4", + "cart": "\ue7f5", + "checkbox-filled": "\ue442", + "checkbox": "\ue7fa", + "arrowleft": "\ue582", + "arrowdown": "\ue581", + "arrowright": "\ue583", + "smallcircle-filled": "\ue801", + "arrowup": "\ue580", + "circle": "\ue411", + "eye-filled": "\ue568", + "eye-slash-filled": "\ue822", + "eye-slash": "\ue823", + "eye": "\ue824", + "flag-filled": "\ue825", + "flag": "\ue508", + "gear-filled": "\ue532", + "reload": "\ue462", + "gear": "\ue502", + "hand-thumbsdown-filled": "\ue83b", + "hand-thumbsdown": "\ue83c", + "hand-thumbsup-filled": "\ue83d", + "heart-filled": "\ue83e", + "hand-thumbsup": "\ue83f", + "heart": "\ue840", + "home": "\ue500", + "info": "\ue504", + "home-filled": "\ue530", + "info-filled": "\ue534", + "circle-filled": "\ue441", + "chat-filled": "\ue847", + "chat": "\ue263", + "mail-open-filled": "\ue84d", + "email-filled": "\ue231", + "mail-open": "\ue84e", + "email": "\ue201", + "checkmarkempty": "\ue472", + "list": "\ue562", + "locked-filled": "\ue856", + "locked": "\ue506", + "map-filled": "\ue85c", + "map-pin": "\ue85e", + "map-pin-ellipse": "\ue864", + "map": "\ue364", + "minus-filled": "\ue440", + "mic-filled": "\ue332", + "minus": "\ue410", + "micoff": "\ue360", + "mic": "\ue302", + "clear": "\ue434", + "smallcircle": "\ue868", + "close": "\ue404", + "closeempty": "\ue460", + "paperclip": "\ue567", + "paperplane": "\ue503", + "paperplane-filled": "\ue86e", + "person-filled": "\ue131", + "contact-filled": "\ue130", + "person": "\ue101", + "contact": "\ue100", + "images-filled": "\ue87a", + "phone": "\ue200", + "images": "\ue87b", + "image": "\ue363", + "image-filled": "\ue877", + "location-filled": "\ue333", + "location": "\ue303", + "plus-filled": "\ue439", + "plus": "\ue409", + "plusempty": "\ue468", + "help-filled": "\ue535", + "help": "\ue505", + "navigate-filled": "\ue884", + "navigate": "\ue501", + "mic-slash-filled": "\ue892", + "search": "\ue466", + "settings": "\ue560", + "sound": "\ue590", + "sound-filled": "\ue8a1", + "spinner-cycle": "\ue465", + "download-filled": "\ue8a4", + "personadd-filled": "\ue132", + "videocam-filled": "\ue8af", + "personadd": "\ue102", + "upload": "\ue402", + "upload-filled": "\ue8b1", + "starhalf": "\ue463", + "star-filled": "\ue438", + "star": "\ue408", + "trash": "\ue401", + "phone-filled": "\ue230", + "compose": "\ue400", + "videocam": "\ue300", + "trash-filled": "\ue8dc", + "download": "\ue403", + "chatbubble-filled": "\ue232", + "chatbubble": "\ue202", + "cloud-download": "\ue8e4", + "cloud-upload-filled": "\ue8e5", + "cloud-upload": "\ue8e6", + "cloud-download-filled": "\ue8e9", + "headphones":"\ue8bf", + "shop":"\ue609" +} diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue new file mode 100644 index 0000000..6319565 --- /dev/null +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/uni_modules/uni-icons/components/uni-icons/uni.ttf b/uni_modules/uni-icons/components/uni-icons/uni.ttf new file mode 100644 index 0000000..60a1968 Binary files /dev/null and b/uni_modules/uni-icons/components/uni-icons/uni.ttf differ diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json new file mode 100644 index 0000000..c8e1224 --- /dev/null +++ b/uni_modules/uni-icons/package.json @@ -0,0 +1,82 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 图标", + "version": "1.1.5", + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "图标" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md new file mode 100644 index 0000000..8d56f42 --- /dev/null +++ b/uni_modules/uni-icons/readme.md @@ -0,0 +1,46 @@ + + +## Icons 图标 +> **组件名:uni-icons** +> 代码块: `uIcons` + + +用于展示 icons 图标 。 + +### 安装方式 + +本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。 + +如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55) + +### 基本用法 + +在 ``template`` 中使用组件 + +```html + +``` + + + +## API + +### Icons Props + +|属性名 |类型 |默认值 |说明 | +|:-: |:-: |:-: |:-: | +|size |Number |24 |图标大小 | +|type |String |- |图标图案,参考示例 | +|color |String |- |图标颜色 | + + +### Icons Events +|事件名 |说明 |返回值| +|:-: |:-: |:-: | +|@click|点击 Icon 触发事件|- | + + + +## 组件示例 + +点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons](https://hellouniapp.dcloud.net.cn/pages/extUI/icons/icons) \ No newline at end of file diff --git a/unpackage/debug/.roid.ins b/unpackage/debug/.roid.ins new file mode 100644 index 0000000..3856a44 --- /dev/null +++ b/unpackage/debug/.roid.ins @@ -0,0 +1 @@ +installed \ No newline at end of file diff --git a/unpackage/debug/android_debug.apk b/unpackage/debug/android_debug.apk new file mode 100644 index 0000000..69642d3 Binary files /dev/null and b/unpackage/debug/android_debug.apk differ diff --git a/utils/qqmap-wx-jssdk.min.js b/utils/qqmap-wx-jssdk.min.js new file mode 100644 index 0000000..2afa713 --- /dev/null +++ b/utils/qqmap-wx-jssdk.min.js @@ -0,0 +1,1138 @@ +var vm = '' + +/** + * 这里是重写部分 + */ +var wx = { + request(obj){ + obj.data.output = 'jsonp' + vm.$jsonp(obj.url,obj.data) + .then(json => { + if(json.status == 0){ + obj.success(json) + }else { + obj.fail(json) + } + }) + .catch(err => { + obj.fail(err) + }) + } +} + +var ERROR_CONF = { + KEY_ERR: 311, + KEY_ERR_MSG: 'key格式错误', + PARAM_ERR: 310, + PARAM_ERR_MSG: '请求参数信息有误', + SYSTEM_ERR: 600, + SYSTEM_ERR_MSG: '系统错误', + WX_ERR_CODE: 1000, + WX_OK_CODE: 200 +}; +var BASE_URL = 'https://apis.map.qq.com/ws/'; +var URL_SEARCH = BASE_URL + 'place/v1/search'; +var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion'; +var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/'; +var URL_CITY_LIST = BASE_URL + 'district/v1/list'; +var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren'; +var URL_DISTANCE = BASE_URL + 'distance/v1/'; +var URL_DIRECTION = BASE_URL + 'direction/v1/'; +var MODE = { + driving: 'driving', + transit: 'transit' +}; +var EARTH_RADIUS = 6378136.49; +var Utils = { + /** + * md5加密方法 + * 版权所有©2011 Sebastian Tschan,https://blueimp.net + */ + safeAdd(x, y) { + var lsw = (x & 0xffff) + (y & 0xffff); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xffff); + }, + bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); + }, + md5cmn(q, a, b, x, s, t) { + return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b); + }, + md5ff(a, b, c, d, x, s, t) { + return this.md5cmn((b & c) | (~b & d), a, b, x, s, t); + }, + md5gg(a, b, c, d, x, s, t) { + return this.md5cmn((b & d) | (c & ~d), a, b, x, s, t); + }, + md5hh(a, b, c, d, x, s, t) { + return this.md5cmn(b ^ c ^ d, a, b, x, s, t); + }, + md5ii(a, b, c, d, x, s, t) { + return this.md5cmn(c ^ (b | ~d), a, b, x, s, t); + }, + binlMD5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[((len + 64) >>> 9 << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = this.md5ff(a, b, c, d, x[i], 7, -680876936); + d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = this.md5gg(b, c, d, a, x[i], 20, -373897302); + a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = this.md5hh(d, a, b, c, x[i], 11, -358537222); + c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = this.md5ii(a, b, c, d, x[i], 6, -198630844); + d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = this.safeAdd(a, olda); + b = this.safeAdd(b, oldb); + c = this.safeAdd(c, oldc); + d = this.safeAdd(d, oldd); + } + return [a, b, c, d]; + }, + binl2rstr(input) { + var i; + var output = ''; + var length32 = input.length * 32; + for (i = 0; i < length32; i += 8) { + output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff); + } + return output; + }, + rstr2binl(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32); + } + return output; + }, + rstrMD5(s) { + return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8)); + }, + rstrHMACMD5(key, data) { + var i; + var bkey = this.rstr2binl(key); + var ipad = []; + var opad = []; + var hash; + ipad[15] = opad[15] = undefined; + if (bkey.length > 16) { + bkey = this.binlMD5(bkey, key.length * 8); + } + for (i = 0; i < 16; i += 1) { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5c5c5c5c; + } + hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8); + return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128)); + }, + rstr2hex(input) { + var hexTab = '0123456789abcdef'; + var output = ''; + var x; + var i; + for (i = 0; i < input.length; i += 1) { + x = input.charCodeAt(i); + output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f); + } + return output; + }, + str2rstrUTF8(input) { + return unescape(encodeURIComponent(input)); + }, + rawMD5(s) { + return this.rstrMD5(this.str2rstrUTF8(s)); + }, + hexMD5(s) { + return this.rstr2hex(this.rawMD5(s)); + }, + rawHMACMD5(k, d) { + return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d)); + }, + hexHMACMD5(k, d) { + return this.rstr2hex(this.rawHMACMD5(k, d)); + }, + + md5(string, key, raw) { + if (!key) { + if (!raw) { + return this.hexMD5(string); + } + return this.rawMD5(string); + } + if (!raw) { + return this.hexHMACMD5(key, string); + } + return this.rawHMACMD5(key, string); + }, + /** + * 得到md5加密后的sig参数 + * @param {Object} requestParam 接口参数 + * @param {String} sk签名字符串 + * @param {String} featrue 方法名 + * @return 返回加密后的sig参数 + */ + getSig(requestParam, sk, feature, mode) { + var sig = null; + var requestArr = []; + Object.keys(requestParam).sort().forEach(function(key){ + requestArr.push(key + '=' + requestParam[key]); + }); + if (feature == 'search') { + sig = '/ws/place/v1/search?' + requestArr.join('&') + sk; + } + if (feature == 'suggest') { + sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk; + } + if (feature == 'reverseGeocoder') { + sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk; + } + if (feature == 'geocoder') { + sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk; + } + if (feature == 'getCityList') { + sig = '/ws/district/v1/list?' + requestArr.join('&') + sk; + } + if (feature == 'getDistrictByCityId') { + sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk; + } + if (feature == 'calculateDistance') { + sig = '/ws/distance/v1/?' + requestArr.join('&') + sk; + } + if (feature == 'direction') { + sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk; + } + sig = this.md5(sig); + return sig; + }, + /** + * 得到终点query字符串 + * @param {Array|String} 检索数据 + */ + location2query(data) { + if (typeof data == 'string') { + return data; + } + var query = ''; + for (var i = 0; i < data.length; i++) { + var d = data[i]; + if (!!query) { + query += ';'; + } + if (d.location) { + query = query + d.location.lat + ',' + d.location.lng; + } + if (d.latitude && d.longitude) { + query = query + d.latitude + ',' + d.longitude; + } + } + return query; + }, + + /** + * 计算角度 + */ + rad(d) { + return d * Math.PI / 180.0; + }, + /** + * 处理终点location数组 + * @return 返回终点数组 + */ + getEndLocation(location){ + var to = location.split(';'); + var endLocation = []; + for (var i = 0; i < to.length; i++) { + endLocation.push({ + lat: parseFloat(to[i].split(',')[0]), + lng: parseFloat(to[i].split(',')[1]) + }) + } + return endLocation; + }, + + /** + * 计算两点间直线距离 + * @param a 表示纬度差 + * @param b 表示经度差 + * @return 返回的是距离,单位m + */ + getDistance(latFrom, lngFrom, latTo, lngTo) { + var radLatFrom = this.rad(latFrom); + var radLatTo = this.rad(latTo); + var a = radLatFrom - radLatTo; + var b = this.rad(lngFrom) - this.rad(lngTo); + var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2))); + distance = distance * EARTH_RADIUS; + distance = Math.round(distance * 10000) / 10000; + return parseFloat(distance.toFixed(0)); + }, + /** + * 使用微信接口进行定位 + */ + getWXLocation(success, fail, complete) { + wx.getLocation({ + type: 'gcj02', + success: success, + fail: fail, + complete: complete + }); + }, + + /** + * 获取location参数 + */ + getLocationParam(location) { + if (typeof location == 'string') { + var locationArr = location.split(','); + if (locationArr.length === 2) { + location = { + latitude: location.split(',')[0], + longitude: location.split(',')[1] + }; + } else { + location = {}; + } + } + return location; + }, + + /** + * 回调函数默认处理 + */ + polyfillParam(param) { + param.success = param.success || function () { }; + param.fail = param.fail || function () { }; + param.complete = param.complete || function () { }; + }, + + /** + * 验证param对应的key值是否为空 + * + * @param {Object} param 接口参数 + * @param {String} key 对应参数的key + */ + checkParamKeyEmpty(param, key) { + if (!param[key]) { + var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key +'参数格式有误'); + param.fail(errconf); + param.complete(errconf); + return true; + } + return false; + }, + + /** + * 验证参数中是否存在检索词keyword + * + * @param {Object} param 接口参数 + */ + checkKeyword(param){ + return !this.checkParamKeyEmpty(param, 'keyword'); + }, + + /** + * 验证location值 + * + * @param {Object} param 接口参数 + */ + checkLocation(param) { + var location = this.getLocationParam(param.location); + if (!location || !location.latitude || !location.longitude) { + var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误'); + param.fail(errconf); + param.complete(errconf); + return false; + } + return true; + }, + + /** + * 构造错误数据结构 + * @param {Number} errCode 错误码 + * @param {Number} errMsg 错误描述 + */ + buildErrorConfig(errCode, errMsg) { + return { + status: errCode, + message: errMsg + }; + }, + + /** + * + * 数据处理函数 + * 根据传入参数不同处理不同数据 + * @param {String} feature 功能名称 + * search 地点搜索 + * suggest关键词提示 + * reverseGeocoder逆地址解析 + * geocoder地址解析 + * getCityList获取城市列表:父集 + * getDistrictByCityId获取区县列表:子集 + * calculateDistance距离计算 + * @param {Object} param 接口参数 + * @param {Object} data 数据 + */ + handleData(param,data,feature){ + if (feature == 'search') { + var searchResult = data.data; + var searchSimplify = []; + for (var i = 0; i < searchResult.length; i++) { + searchSimplify.push({ + id: searchResult[i].id || null, + title: searchResult[i].title || null, + latitude: searchResult[i].location && searchResult[i].location.lat || null, + longitude: searchResult[i].location && searchResult[i].location.lng || null, + address: searchResult[i].address || null, + category: searchResult[i].category || null, + tel: searchResult[i].tel || null, + adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null, + city: searchResult[i].ad_info && searchResult[i].ad_info.city || null, + district: searchResult[i].ad_info && searchResult[i].ad_info.district || null, + province: searchResult[i].ad_info && searchResult[i].ad_info.province || null + }) + } + param.success(data, { + searchResult: searchResult, + searchSimplify: searchSimplify + }) + } else if (feature == 'suggest') { + var suggestResult = data.data; + var suggestSimplify = []; + for (var i = 0; i < suggestResult.length; i++) { + suggestSimplify.push({ + adcode: suggestResult[i].adcode || null, + address: suggestResult[i].address || null, + category: suggestResult[i].category || null, + city: suggestResult[i].city || null, + district: suggestResult[i].district || null, + id: suggestResult[i].id || null, + latitude: suggestResult[i].location && suggestResult[i].location.lat || null, + longitude: suggestResult[i].location && suggestResult[i].location.lng || null, + province: suggestResult[i].province || null, + title: suggestResult[i].title || null, + type: suggestResult[i].type || null + }) + } + param.success(data, { + suggestResult: suggestResult, + suggestSimplify: suggestSimplify + }) + } else if (feature == 'reverseGeocoder') { + var reverseGeocoderResult = data.result; + var reverseGeocoderSimplify = { + address: reverseGeocoderResult.address || null, + latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null, + longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null, + adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null, + city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null, + district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null, + nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null, + province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null, + street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null, + street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null, + recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null, + rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null + }; + if (reverseGeocoderResult.pois) {//判断是否返回周边poi + var pois = reverseGeocoderResult.pois; + var poisSimplify = []; + for (var i = 0;i < pois.length;i++) { + poisSimplify.push({ + id: pois[i].id || null, + title: pois[i].title || null, + latitude: pois[i].location && pois[i].location.lat || null, + longitude: pois[i].location && pois[i].location.lng || null, + address: pois[i].address || null, + category: pois[i].category || null, + adcode: pois[i].ad_info && pois[i].ad_info.adcode || null, + city: pois[i].ad_info && pois[i].ad_info.city || null, + district: pois[i].ad_info && pois[i].ad_info.district || null, + province: pois[i].ad_info && pois[i].ad_info.province || null + }) + } + param.success(data,{ + reverseGeocoderResult: reverseGeocoderResult, + reverseGeocoderSimplify: reverseGeocoderSimplify, + pois: pois, + poisSimplify: poisSimplify + }) + } else { + param.success(data, { + reverseGeocoderResult: reverseGeocoderResult, + reverseGeocoderSimplify: reverseGeocoderSimplify + }) + } + } else if (feature == 'geocoder') { + var geocoderResult = data.result; + var geocoderSimplify = { + title: geocoderResult.title || null, + latitude: geocoderResult.location && geocoderResult.location.lat || null, + longitude: geocoderResult.location && geocoderResult.location.lng || null, + adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null, + province: geocoderResult.address_components && geocoderResult.address_components.province || null, + city: geocoderResult.address_components && geocoderResult.address_components.city || null, + district: geocoderResult.address_components && geocoderResult.address_components.district || null, + street: geocoderResult.address_components && geocoderResult.address_components.street || null, + street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null, + level: geocoderResult.level || null + }; + param.success(data,{ + geocoderResult: geocoderResult, + geocoderSimplify: geocoderSimplify + }); + } else if (feature == 'getCityList') { + var provinceResult = data.result[0]; + var cityResult = data.result[1]; + var districtResult = data.result[2]; + param.success(data,{ + provinceResult: provinceResult, + cityResult: cityResult, + districtResult: districtResult + }); + } else if (feature == 'getDistrictByCityId') { + var districtByCity = data.result[0]; + param.success(data, districtByCity); + } else if (feature == 'calculateDistance') { + var calculateDistanceResult = data.result.elements; + var distance = []; + for (var i = 0; i < calculateDistanceResult.length; i++){ + distance.push(calculateDistanceResult[i].distance); + } + param.success(data, { + calculateDistanceResult: calculateDistanceResult, + distance: distance + }); + } else if (feature == 'direction') { + var direction = data.result.routes; + param.success(data,direction); + } else { + param.success(data); + } + }, + + /** + * 构造微信请求参数,公共属性处理 + * + * @param {Object} param 接口参数 + * @param {Object} param 配置项 + * @param {String} feature 方法名 + */ + buildWxRequestConfig(param, options, feature) { + var that = this; + options.header = { "content-type": "application/json" }; + options.method = 'GET'; + options.success = function (res) { + var data = res; + if (data.status === 0) { + that.handleData(param, data, feature); + } else { + param.fail(data); + } + }; + options.fail = function (res) { + res.statusCode = ERROR_CONF.WX_ERR_CODE; + param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); + }; + options.complete = function (res) { + var statusCode = +res.statusCode; + switch(statusCode) { + case ERROR_CONF.WX_ERR_CODE: { + param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); + break; + } + case ERROR_CONF.WX_OK_CODE: { + var data = res.data; + if (data.status === 0) { + param.complete(data); + } else { + param.complete(that.buildErrorConfig(data.status, data.message)); + } + break; + } + default:{ + param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG)); + } + + } + }; + return options; + }, + + /** + * 处理用户参数是否传入坐标进行不同的处理 + */ + locationProcess(param, locationsuccess, locationfail, locationcomplete) { + var that = this; + locationfail = locationfail || function (res) { + res.statusCode = ERROR_CONF.WX_ERR_CODE; + param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); + }; + locationcomplete = locationcomplete || function (res) { + if (res.statusCode == ERROR_CONF.WX_ERR_CODE) { + param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg)); + } + }; + if (!param.location) { + that.getWXLocation(locationsuccess, locationfail, locationcomplete); + } else if (that.checkLocation(param)) { + var location = Utils.getLocationParam(param.location); + locationsuccess(location); + } + } +}; + + +class QQMapWX { + + /** + * 构造函数 + * + * @param {Object} options 接口参数,key 为必选参数 + */ + constructor(options) { + if (!options.key) { + throw Error('key值不能为空'); + } + vm = options.vm + this.key = options.key; + }; + + /** + * POI周边检索 + * + * @param {Object} options 接口参数对象 + * + * 参数对象结构可以参考 + * @see http://lbs.qq.com/webservice_v1/guide-search.html + */ + search(options) { + var that = this; + options = options || {}; + + Utils.polyfillParam(options); + + if (!Utils.checkKeyword(options)) { + return; + } + + var requestParam = { + keyword: options.keyword, + orderby: options.orderby || '_distance', + page_size: options.page_size || 10, + page_index: options.page_index || 1, + output: 'json', + key: that.key + }; + + if (options.address_format) { + requestParam.address_format = options.address_format; + } + + if (options.filter) { + requestParam.filter = options.filter; + } + + var distance = options.distance || "1000"; + var auto_extend = options.auto_extend || 1; + var region = null; + var rectangle = null; + + //判断城市限定参数 + if (options.region) { + region = options.region; + } + + //矩形限定坐标(暂时只支持字符串格式) + if (options.rectangle) { + rectangle = options.rectangle; + } + + var locationsuccess = function (result) { + if (region && !rectangle) { + //城市限定参数拼接 + requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")"; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'search'); + } + } else if (rectangle && !region) { + //矩形搜索 + requestParam.boundary = "rectangle(" + rectangle + ")"; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'search'); + } + } else { + requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")"; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'search'); + } + } + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_SEARCH, + data: requestParam + }, 'search')); + }; + Utils.locationProcess(options, locationsuccess); + }; + + /** + * sug模糊检索 + * + * @param {Object} options 接口参数对象 + * + * 参数对象结构可以参考 + * http://lbs.qq.com/webservice_v1/guide-suggestion.html + */ + getSuggestion(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + + if (!Utils.checkKeyword(options)) { + return; + } + + var requestParam = { + keyword: options.keyword, + region: options.region || '全国', + region_fix: options.region_fix || 0, + policy: options.policy || 0, + page_size: options.page_size || 10,//控制显示条数 + page_index: options.page_index || 1,//控制页数 + get_subpois : options.get_subpois || 0,//返回子地点 + output: 'json', + key: that.key + }; + //长地址 + if (options.address_format) { + requestParam.address_format = options.address_format; + } + //过滤 + if (options.filter) { + requestParam.filter = options.filter; + } + //排序 + if (options.location) { + var locationsuccess = function (result) { + requestParam.location = result.latitude + ',' + result.longitude; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest'); + } + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_SUGGESTION, + data: requestParam + }, "suggest")); + }; + Utils.locationProcess(options, locationsuccess); + } else { + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest'); + } + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_SUGGESTION, + data: requestParam + }, "suggest")); + } + }; + + /** + * 逆地址解析 + * + * @param {Object} options 接口参数对象 + * + * 请求参数结构可以参考 + * http://lbs.qq.com/webservice_v1/guide-gcoder.html + */ + reverseGeocoder(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + var requestParam = { + coord_type: options.coord_type || 5, + get_poi: options.get_poi || 0, + output: 'json', + key: that.key + }; + if (options.poi_options) { + requestParam.poi_options = options.poi_options + } + + var locationsuccess = function (result) { + requestParam.location = result.latitude + ',' + result.longitude; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder'); + } + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_GET_GEOCODER, + data: requestParam + }, 'reverseGeocoder')); + }; + Utils.locationProcess(options, locationsuccess); + }; + + /** + * 地址解析 + * + * @param {Object} options 接口参数对象 + * + * 请求参数结构可以参考 + * http://lbs.qq.com/webservice_v1/guide-geocoder.html + */ + geocoder(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + + if (Utils.checkParamKeyEmpty(options, 'address')) { + return; + } + + var requestParam = { + address: options.address, + output: 'json', + key: that.key + }; + + //城市限定 + if (options.region) { + requestParam.region = options.region; + } + + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder'); + } + + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_GET_GEOCODER, + data: requestParam + },'geocoder')); + }; + + + /** + * 获取城市列表 + * + * @param {Object} options 接口参数对象 + * + * 请求参数结构可以参考 + * http://lbs.qq.com/webservice_v1/guide-region.html + */ + getCityList(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + var requestParam = { + output: 'json', + key: that.key + }; + + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList'); + } + + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_CITY_LIST, + data: requestParam + },'getCityList')); + }; + + /** + * 获取对应城市ID的区县列表 + * + * @param {Object} options 接口参数对象 + * + * 请求参数结构可以参考 + * http://lbs.qq.com/webservice_v1/guide-region.html + */ + getDistrictByCityId(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + + if (Utils.checkParamKeyEmpty(options, 'id')) { + return; + } + + var requestParam = { + id: options.id || '', + output: 'json', + key: that.key + }; + + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId'); + } + + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_AREA_LIST, + data: requestParam + },'getDistrictByCityId')); + }; + + /** + * 用于单起点到多终点的路线距离(非直线距离)计算: + * 支持两种距离计算方式:步行和驾车。 + * 起点到终点最大限制直线距离10公里。 + * + * 新增直线距离计算。 + * + * @param {Object} options 接口参数对象 + * + * 请求参数结构可以参考 + * http://lbs.qq.com/webservice_v1/guide-distance.html + */ + calculateDistance(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + + if (Utils.checkParamKeyEmpty(options, 'to')) { + return; + } + + var requestParam = { + mode: options.mode || 'walking', + to: Utils.location2query(options.to), + output: 'json', + key: that.key + }; + + if (options.from) { + options.location = options.from; + } + + //计算直线距离 + if(requestParam.mode == 'straight'){ + var locationsuccess = function (result) { + var locationTo = Utils.getEndLocation(requestParam.to);//处理终点坐标 + var data = { + message:"query ok", + result:{ + elements:[] + }, + status:0 + }; + for (var i = 0; i < locationTo.length; i++) { + data.result.elements.push({//将坐标存入 + distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng), + duration:0, + from:{ + lat: result.latitude, + lng:result.longitude + }, + to:{ + lat: locationTo[i].lat, + lng: locationTo[i].lng + } + }); + } + var calculateResult = data.result.elements; + var distanceResult = []; + for (var i = 0; i < calculateResult.length; i++) { + distanceResult.push(calculateResult[i].distance); + } + return options.success(data,{ + calculateResult: calculateResult, + distanceResult: distanceResult + }); + }; + + Utils.locationProcess(options, locationsuccess); + } else { + var locationsuccess = function (result) { + requestParam.from = result.latitude + ',' + result.longitude; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance'); + } + wx.request(Utils.buildWxRequestConfig(options, { + url: URL_DISTANCE, + data: requestParam + },'calculateDistance')); + }; + + Utils.locationProcess(options, locationsuccess); + } + }; + + /** + * 路线规划: + * + * @param {Object} options 接口参数对象 + * + * 请求参数结构可以参考 + * https://lbs.qq.com/webservice_v1/guide-road.html + */ + direction(options) { + var that = this; + options = options || {}; + Utils.polyfillParam(options); + + if (Utils.checkParamKeyEmpty(options, 'to')) { + return; + } + + var requestParam = { + output: 'json', + key: that.key + }; + + //to格式处理 + if (typeof options.to == 'string') { + requestParam.to = options.to; + } else { + requestParam.to = options.to.latitude + ',' + options.to.longitude; + } + //初始化局部请求域名 + var SET_URL_DIRECTION = null; + //设置默认mode属性 + options.mode = options.mode || MODE.driving; + + //设置请求域名 + SET_URL_DIRECTION = URL_DIRECTION + options.mode; + + if (options.from) { + options.location = options.from; + } + + if (options.mode == MODE.driving) { + if (options.from_poi) { + requestParam.from_poi = options.from_poi; + } + if (options.heading) { + requestParam.heading = options.heading; + } + if (options.speed) { + requestParam.speed = options.speed; + } + if (options.accuracy) { + requestParam.accuracy = options.accuracy; + } + if (options.road_type) { + requestParam.road_type = options.road_type; + } + if (options.to_poi) { + requestParam.to_poi = options.to_poi; + } + if (options.from_track) { + requestParam.from_track = options.from_track; + } + if (options.waypoints) { + requestParam.waypoints = options.waypoints; + } + if (options.policy) { + requestParam.policy = options.policy; + } + if (options.plate_number) { + requestParam.plate_number = options.plate_number; + } + } + + if (options.mode == MODE.transit) { + if (options.departure_time) { + requestParam.departure_time = options.departure_time; + } + if (options.policy) { + requestParam.policy = options.policy; + } + } + + var locationsuccess = function (result) { + requestParam.from = result.latitude + ',' + result.longitude; + if (options.sig) { + requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction',options.mode); + } + wx.request(Utils.buildWxRequestConfig(options, { + url: SET_URL_DIRECTION, + data: requestParam + }, 'direction')); + }; + + Utils.locationProcess(options, locationsuccess); + } +}; + +module.exports = QQMapWX; \ No newline at end of file