Commit 6ba0c0de by 前端

Merge branch 'SAAS+V4.56.0-0908' into 'master'

上线合并

See merge request !2
2 parents 0fb654a4 87ab7b0b
Showing 390 changed files with 2339 additions and 546 deletions
......@@ -15,7 +15,7 @@ const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo);
// console.log(accountInfo.miniProgram.envVersion)
//手动控制体验版环境的请求 true就依据下面index false就默认为2
const manual = true
const manual = false
const release = false
......@@ -80,7 +80,7 @@ const secretKey = {
const domain = {
// ip: 'http://192.168.2.94:8558',
// ip: 'http://192.168.2.3:8315',
ip: 'http://192.168.1.170:8315',
ip: 'http://192.168.1.117:8315',
/**登录: 192.168.2.3:8315
商城: 192.168.2.3:8558 */
dev: 'https://scrm.dev.glsx.com.cn',
......
import api from '../request/http'
module.exports = {
/**查询购物车 */
getCartList(data) {
return api.post({
method: 'scrm.api.shopmall.points.shopping.car.get',
...data
})
},
/**加入购物车 */
addToCart(data) {
return api.post({
method: 'scrm.api.shopmall.points.shopping.car.add',
...data
})
},
/**购物车更新商品(将商品数量改为1) */
updateGoodsFormCart(data) {
return api.post({
method: 'scrm.api.shopmall.points.shopping.car.reduce',
...data
})
}
}
\ No newline at end of file
......@@ -35,4 +35,58 @@ module.exports = {
getImgVersion() {
return http.getMock();
},
/**手机号验证码登录 */
phoneSmsLogin(data) {
return http.fetch('scrm.api.sso.sms.login', {
source: 'MINIAPP',
...data
})
},
/**微信授权手机号登录 */
authPhoneLogin(data) {
return http.fetch('scrm.api.sso.weapp.auth.phone', {
source: 'MINIAPP',
...data
})
},
/**获取积分渠道列表 */
getPointsSourceList(data) {
return http.fetch('scrm.api.shopmall.score.get.channelSource', {
...data
})
},
/**查询积分钱包 */
getPointsWalletData(data) {
return http.fetch('scrm.api.shopmall.pointswallet.get', {
...data
})
},
/**开通积分钱包 */
openPointsWallet(data) {
return http.fetch('scrm.api.shopmall.pointswallet.open', {...data})
},
/**替换积分钱包昵称 */
replaceWalletName(data) {
return http.fetch('scrm.api.sso.nickName.replace', {...data})
},
/**获取积分汇总数据 */
getPointsSummary(data) {
return http.fetch('scrm.api.shopmall.score.summary.search', {...data})
},
/**获取用户信息 */
getLoginInfo(data) {
return http.fetch('scrm.api.sso.weapp.loginfo.get', {...data})
},
/**获取门店数据 */
getMerchantData(data) {
return http.fetch('scrm.api.shopmall.score.list.merchant', {...data})
},
/**进入商品详情页面埋点 */
dynamicRecordAdd(data) {
return http.fetch('scrm.api.shopmall.scrm.customer.dynamic.record.add', {...data})
},
/**离开商品详情页面埋点 */
dynamicRecordLeave(data) {
return http.fetch('scrm.api.shopmall.scrm.customer.dynamic.record.leave', {...data})
}
};
import api from '../request/http'
module.exports = {
getServiceCode(data) {
return api.fetch('dracIm.api.entmicro.findMiniProgramIm', data)
},
/**智能外呼-联系人 */
findByActivityIdAndPhone(data) {
return api.fetch('dracIm.api.entmicro.findByActivityIdAndPhone', data)
}
}
\ No newline at end of file
import api from '../request/http'
module.exports = {
/**获取商户小程序首页配置 */
getHomeConfig(data) {
/**获取商城首页商品数据 */
getGoodsStockroomList(data) {
return api.post({
method: `scrm.api.shopmall.weapp.homeConfig.getByMerchant`,
method: 'scrm.api.shopmall.app.platform.goods.stockroom.page',
...data
})
},
/**查询当前商户的分类列表 */
getClassifyList(data) {
/**获取商品详情 */
getGoodsDetailInfo(data) {
return api.post({
method: `scrm.api.shopmall.classify.weapp.listByMerchantId`,
method: 'scrm.api.shopmall.app.stockroom.goods.detail',
...data
})
},
/** 分页查询活动 */
getActivityList(data) {
/**获取前端分类 */
getHomeCategoryList(data) {
return api.post({
method: 'scrm.api.shopmall.weapp.activity.page',
pageSize: 10,
method: 'scrm.api.shopmall.scrm.frontendcategory.listAll',
...data
})
},
/**确认订单下单 */
createOrder(data) {
return api.post({
method: 'scrm.api.shopmall.points.order.create',
...data
})
},
/**获取积分会首页配置数据 */
getHomeConfigData(data) {
return api.post({
method: 'scrm.api.shopmall.scrm.mallmini.findByType',
...data
})
}
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ import systemApi from './system'
import couponsApi from './coupons'
import equityApi from './equity'
import common from './common'
import entmicroApi from './entmicro'
import withdrawalApi from './withdrawal'
module.exports = {
wechatApi,
......@@ -21,5 +21,5 @@ module.exports = {
couponsApi,
equityApi,
common,
entmicroApi
withdrawalApi
}
\ No newline at end of file
import api from '../request/http'
module.exports = {
}
\ No newline at end of file
import api from '../request/http'
module.exports = {
/**获取集团或者门店详细信息 */
getMerchantDetail(data) {
return api.post({
method: 'scrm.api.carlife.merchant.detail',
...data
})
},
/**获取当前用户的收货地址列表 */
getUserAddressList(data) {
/**. 分页查询订单 */
getOrderList(data) {
return api.post({
method: `scrm.api.carlife.weapp.userAddress.list`,
method: `scrm.api.shopmall.platform.order.page`,
...data
})
},
/**根据ID获取用户收货地址 */
getUserAddress(data) {
/**. 分页查询订单 */
getSalesOrderList(data) {
return api.post({
method: `scrm.api.carlife.weapp.userAddress.getById`,
method: `scrm.api.shopmall.platform.after.sales.order.page`,
...data
})
},
/** 新增用户收货地址 */
addUserAddress(data) {
/**获取订单状态数量 */
getOrderNumberList(data) {
return api.post({
method: `scrm.api.carlife.weapp.userAddress.add`,
method: 'scrm.api.shopmall.weapp.order.statis',
...data
})
},
/**编辑用户收货地址 */
updateUserAddress(data) {
/**获取客户保存的地址列表 */
getCustomerAddressList(data) {
return api.post({
method: `scrm.api.carlife.weapp.userAddress.update`,
method: 'scrm.api.shopmall.platform.customer.address.list',
...data
})
},
/** 更改为默认收货地址 */
setUserAddressDefault(data) {
/**保存或更新收货地址 */
saveAddress(data) {
return api.post({
method: `scrm.api.carlife.weapp.userAddress.updateDefault`,
method: 'scrm.api.shopmall.platform.customer.address.save',
...data
})
},
/** 删除用户收货地址 */
delUserAddress(data) {
/**删除收货地址 */
removeAddress(data) {
return api.post({
method: `scrm.api.carlife.weapp.userAddress.delete`,
method: 'scrm.api.shopmall.platform.customer.address.delete',
...data
})
},
/** 获取用户默认收货地址 */
getUserAddressDefault() {
return api.fetch('scrm.api.carlife.weapp.userAddress.getDefault')
},
/**. 分页查询订单 */
getOrderList(data) {
/**获取地址基础数据 */
getBaseAddress(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.page`,
pageSize: 99999,
method: 'scrm.api.shopmall.platform.base.address.list',
...data
})
},
/**获取订单状态数量 */
getOrderNumberList(data) {
return api.post({
method: 'scrm.api.shopmall.weapp.order.statis',
...data
})
}
}
\ No newline at end of file
......@@ -68,10 +68,10 @@ module.exports = {
})
},
/**订单详情 */
getOrderDetail(orderCode) {
getOrderDetail(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.detail`,
orderCode
method: `scrm.api.shopmall.platform.order.detail`,
...data
})
},
/**获取订单的售后详情 */
......@@ -82,57 +82,19 @@ module.exports = {
})
},
/**活动详情 */
getActivityDetail(id) {
return api.fetch('scrm.api.shopmall.weapp.activity.detail', {
id
})
},
/** 根据商品ID获取商品 */
getGoodsDetail(id) {
return api.fetch('scrm.api.shopmall.weapp.goods.getById.HMD', {
id,
viewAmount: true
})
},
/** 获取商品关联优惠券列表 */
getGoodscouponList(data) {
return api.fetch('scrm.api.coupon.seahorse.knife.goods.list', data)
},
/** 领取商品详情优惠券 */
getCoupon(data) {
return api.fetch('scrm.api.coupon.customer.receive', data)
},
/**根据规格值组合获取规格组合库存及零售价 */
getGoodsSpecificationExtra(data) {
return api.post({
method: `scrm.api.shopmall.weapp.goods.getGoodsSpecificationExtra`,
...data
})
},
/** 小程序端根据优惠券id查询可使用商品列表(分页) */
getCouponGoodsPage(data) {
data.pageSize = 8
return api.post({
method: 'scrm.app.shopmall.coupon.goods.page',
...data
})
},
//取消付款
cancelPay(orderCode) {
return api.fetch('scrm.api.shopmall.weapp.order.cancelPay', {
orderCode
})
},
/** 申请售后 */
/** 申请售后-自营商品 */
afterSale(data) {
return api.fetch('scrm.api.shopmall.weapp.orderRefund.apply', data)
return api.fetch('scrm.api.shopmall.points.afterSales.add', data)
},
/** 申请售后-云中鹤申请售后 */
afterSalesPlatform(data) {
return api.fetch('scrm.api.shopmall.platform.afterSales.add', data)
},
//申请售后待审核的订单取消售后
cancelOrder(orderCode) {
......@@ -140,59 +102,67 @@ module.exports = {
orderCode
})
},
/** 为售后添加退货快递信息 */
/** 售后寄回商品填写快递信息 */
addDelivery(data) {
return api.post({
method: `scrm.api.shopmall.weapp.orderRefund.addDelivery`,
method: `scrm.api.shopmall.platform.sendBack.goods`,
...data
})
},
requestSubscribeMessage() {
return api.fetch('scrm.api.shopmall.weapp.order.listSubscribeMsgTemplateIds')
},
/** 确认收货 */
confirmReceipt(orderCode) {
/**云中鹤查看物流列表(售后寄回)*/
queryExpressList(data={}){
return api.post({
method: 'scrm.api.shopmall.platform.query.expressList',
...data
})
},
/** 云中鹤-售后订单详情*/
platformSaleDetail(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.confirmReceipt`,
orderCode
method: 'scrm.api.shopmall.platform.afterSales.detail',
...data
})
},
/**分类列表
*
*/
getMerchantClassify(data) {
return api.post({
method: `scrm.api.shopmall.classify.page.curMerchant`,
pageSize: 9999,
currentPage: 1,
/**自营-售后订单详情 */
afterSaleDetail(data) {
return api.post({
method: 'scrm.api.shopmall.points.afterSales.detail',
...data
})
},
/**分类商品 */
getMerchantClassifyGoods(data) {
/** 确认收货 */
confirmReceipt(subOrderCode) {
return api.post({
method: `scrm.api.shopmall.classify.getById`,
pageSize: 10,
currentPage: 1,
...data
method: `scrm.api.shopmall.platform.confirm.receipt`,
subOrderCode
})
},
/** 获取活动分享链接 */
getActivitylink(id) {
/**平台商城接口---取消售后 */
platformEditSale(data) {
return api.post({
method: 'scrm.api.shopmall.platform.afterSales.cancel',
...data
})
},
/** 查看物流轨迹 */
queryLogistics(data) {
return api.post({
method: 'scrm.api.shopmall.activity.get.shared',
id
method: `scrm.api.shopmall.platform.order.queryLogistics`,
...data
})
},
/** 获取商品分享链接 */
getGoodslink(id) {
/**云中鹤查看可申请售后的商品数量 */
getYzhAvailableQty(data) {
return api.post({
method: 'scrm.api.shopmall.goods.get.shared',
id
method: 'scrm.api.shopmall.platform.afterSales.available.qty',
...data
})
},
/**自营查看可申请售后的商品数量(暂无) */
getAvailableQty(data) {
return Promise.resolve(null)
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ const serverConfig = {
mockTimer: {},
mockCache: null,
};
const configModule = 'mini-hmd'
const configModule = 'mini-points-mall'
const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`;
/**获取mock数据 */
......
......@@ -15,7 +15,7 @@ class UsersApi {
const {
code
} = await this.getWxCode(),
data = await http.fetch('scrm.api.sso.weapp.jscode.login', {
data = await http.fetch('scrm.api.sso.weapp.jscode.getOpenIdAndLogin', {
appId,
code,
delSessionId: true
......
import api from '../request/http'
module.exports = {
/**积分汇总查询 */
searchScoreSummary(data) {
return api.fetch(
'scrm.api.shopmall.score.summary.search',
data,
);
},
/**积分明细列表查询 */
getScoreProfitList(data) {
return api.fetch(
'scrm.api.shopmall.score.profit.list',
data
)
},
/**积分明细查询 */
getScoreDetail(data) {
return api.fetch(
'scrm.api.shopmall.score.detail.get',
data
)
},
/**提现列表查询 */
getScoreWithdrawalPage(data) {
return api.fetch(
'scrm.api.shopmall.score.withdrawal.page',
data
)
},
/** 免责协议地址获取*/
getAgreementUrl(data) {
return api.fetch(
'scrm.api.shopmall.score.withdrawal.disclaimer.agreement.get',
data
)
},
/** 积分提现*/
saveWithdrawal(data) {
return api.fetch('scrm.api.shopmall.score.withdrawal.save', data)
},
/**查询税率 */
getTaxRate(data) {
return api.fetch('scrm.api.shopmall.score.get.taxRate', data)
},
/**根据手机号查询员工银行卡列表 */
getStaffBankList(data) {
return api.fetch(
'scrm.api.shopmall.score.bank.list',
data,
);
},
/** 插入或更新员工银行卡信息 */
insetorupdateStaffBank(data) {
return api.fetch('scrm.api.shopmall.score.bank.insertOrUpdate',
data);
},
/**根据id查询银行卡详情 */
getBankDetail(data) {
return api.fetch('scrm.api.shopmall.score.bank.get.detail', data)
},
/**查询上传证件配置信息 */
getConfig(data){
return api.fetch('scrm.api.shopmall.score.bank.get.document.config',data)
},
/**开通积分钱包 */
openPointsWallet(data){
return api.fetch('scrm.api.shopmall.pointswallet.open',data)
},
/**检查银行卡身份信息 */
checkbankConfig(data){
return api.fetch('scrm.api.shopmall.score.bank.check.config',data)
}
}
\ No newline at end of file
......@@ -94,9 +94,10 @@ class Request {
})
}
if (query.length) currentRoute += `?${query.join('&')}`
return wx.p.router.redirectTo('/pages/loading/loading', {
url: `/${currentRoute}`
})
wx.p.storage.rm('sessionId')
wx.p.isLogin = false
wx.p.storage.rm('userInfo')
return wx.p.router.redirectTo('/pages/Login/Login')
} else {
if (code == '0') {
resolve(data.data)
......@@ -105,16 +106,18 @@ class Request {
title: message || '系统异常',
icon: 'none'
})
wx.p.sentry.reportError(`接口异常:${message}`, {code,message,params})
}
}
},
fail(error) {
wx.hideLoading()
console.error(`接口异常:`, error)
wx.showToast({
title: typeof error == 'string' ? error : JSON.stringify(error) || '系统异常',
icon: 'error'
})
console.error(`接口异常:`, error)
wx.p.sentry.reportError(`接口异常:${error.message}`, {error,params})
reject(error)
},
complete() {
......
// app.js
// 初始化sentry
import sentryInit from "~/utils/sentryConfig/sentryInit";
sentryInit();
import api from "./api/index";
import { router, routerBefore } from "./router/index";
// 判断小程序是否需要更新
......
......@@ -2,13 +2,15 @@
"pages": [
"pages/loading/loading",
"pages/tab/index/index",
"pages/tab/equity/index",
"pages/tab/mall/index",
"pages/tab/cart/index",
"pages/tab/mine/index",
"pages/webView/webView",
"pages/Login/Login"
"pages/Login/Login",
"pages/chooseMerchant/index"
],
"requiredPrivateInfos": [
"getLocation"
],
"requiredPrivateInfos": ["getLocation"],
"lazyCodeLoading": "requiredComponents",
"window": {
"backgroundTextStyle": "light",
......@@ -16,22 +18,22 @@
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#937F82",
"selectedColor": "#8A303A",
"color": "#9DA4B3",
"selectedColor": "#4B5466",
"backgroundColor": "#FFFFFF",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/tab/index/index",
"text": "首页",
"iconPath": "assets/images/home.png",
"selectedIconPath": "assets/images/home_active.png"
"text": "商城",
"iconPath": "assets/images/index.png",
"selectedIconPath": "assets/images/index_active.png"
},
{
"pagePath": "pages/tab/mall/index",
"text": "商城",
"iconPath": "assets/images/mall.png",
"selectedIconPath": "assets/images/mall_active.png"
"pagePath": "pages/tab/cart/index",
"text": "购物车",
"iconPath": "assets/images/cart.png",
"selectedIconPath": "assets/images/cart_active.png"
},
{
"pagePath": "pages/tab/mine/index",
......@@ -47,11 +49,23 @@
"pages": [
"pages/bannerJumpPage/bannerJumpPage",
"pages/common/contact/contact",
"pages/serviceCode/serviceCode"
"pages/serviceCode/serviceCode",
"pages/integral/index/index",
"pages/integral/withdrawal/withdrawal",
"pages/bankAccount/add/add",
"pages/bankAccount/list/list",
"pages/integral/withdrawalNote/withdrawalNote",
"pages/integral/withdrawalSuccess/withdrawalSuccess",
"pages/SpecialSale/SpecialSale",
"pages/goodsDetail/index",
"pages/integral/withdrawalRules/withdrawalRules",
"pages/confirmOrder/index",
"pages/exchangeSuccess/index",
"pages/integral/withdrawalDetail/withdrawalDetail"
]
},
{
"root": "packageMall",
"root": "packageCart",
"pages": [
"pages/shoppingCart/shoppingCart",
"pages/pay/pay",
......@@ -69,16 +83,8 @@
"pages/order/index/index",
"pages/order/detail/detail",
"pages/order/complete/complete",
"pages/order/afterSale_step_one/afterSale_step_one",
"pages/order/afterSale_step_two/afterSale_step_two",
"pages/order/afterSale_step_three/afterSale_step_three",
"pages/order/afterSaleDetail/afterSaleDetail",
"pages/coupon/index/index",
"pages/coupon/success/success",
"pages/coupon/center/center",
"pages/coupon/detail/detail",
"pages/coupon/recommend/recommend",
"pages/coupon/usedDetail/usedDetail"
"pages/order/afterSaleDetail/afterSaleDetail"
]
}
],
......@@ -88,7 +94,12 @@
"authorize": "/components/Authorize/Authorize",
"popup": "/components/Popup/Popup",
"goods-action": "/components/GoodsAction/GoodsAction",
"glsx-privacy": "glsx-applet-component/GlsxPrivacy/index"
"glsx-privacy": "glsx-applet-component/GlsxPrivacy/index",
"mp-icon": "weui-miniprogram/icon/icon",
"mp-dialog": "weui-miniprogram/dialog/dialog",
"mp-cell": "weui-miniprogram/cell/cell",
"mp-cells": "weui-miniprogram/cells/cells",
"Dialog": "/components/Dialog/Dialog"
},
"style": "v2",
"resolveAlias": {
......@@ -105,4 +116,4 @@
"weui": true
},
"__usePrivacyCheck__": true
}
}
\ No newline at end of file
@import "assets/style/common.wxss";
page {
background-color: #F9F7F7 !important;
background-color: #F7F8FA !important;
color: #282829;
font-size: 28rpx;
--themeColor: #FC5B32;
--btnColor: #FC8A32;
--fontColor: #7E4C15;
--borderRadius: 8rpx;
--margin: 32rpx;
/* 兼容 IOS<11.2 先constant再env */
......@@ -19,6 +20,7 @@ image {
height: 100%;
vertical-align: top;
}
.flex_sc {
display: flex;
align-items: center;
......@@ -34,4 +36,29 @@ image {
display: flex;
align-items: center;
justify-content: space-between;
}
.suggest-box {
font-size: 28rpx;
color: #1B233D;
}
.btn_primary {
color: #FC5B32;
font-weight: 500;
font-size: 28rpx;
}
.btn_cancel {
font-weight: 400;
font-size: 28rpx;
color: #1B233D;
}
.express-wrap{
height:1200rpx;
}
.express-wrap .weui-actionsheet__menu{
height:calc(100% - 100rpx);
overflow-y: auto;
}
\ No newline at end of file

5.36 KB | W: | H:

2.11 KB | W: | H:

assets/images/mine.png
assets/images/mine.png
assets/images/mine.png
assets/images/mine.png
  • 2-up
  • Swipe
  • Onion skin

6.3 KB | W: | H:

3.32 KB | W: | H:

assets/images/mine_active.png
assets/images/mine_active.png
assets/images/mine_active.png
assets/images/mine_active.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -55,6 +55,10 @@
justify-content: center;
}
.flex-column{
flex-direction: column;
}
.isFullSucreen {
/* padding-bottom: 34px !important; */
padding-bottom: constant(safe-area-inset-bottom) !important;
......
import mineApi from '~/api/module/mine.js'
Component({
/**
* 组件的属性列表
*/
properties: {
defaultAddress: Object,
address:Array,
show: {
type: Boolean,
observer: function (val, o) {
if (val && this.properties.address.length) {
console.log(this.properties.defaultAddress?.id)
this.properties.address.forEach((item, index) => {
item.active = false
if (item.id == this.properties.defaultAddress?.id) {
item.active = true
}
})
this.setData({
address: this.properties.address
})
}
}
},
staff:Boolean
},
/**
* 组件的初始数据
*/
data: {
addressList: []
},
/**
* 组件的方法列表
*/
methods: {
back() {
this.cancel()
},
addNew (e) {
let { url } = e.currentTarget.dataset
wx.p.router.go(url,{
platform:true,
staff:this.data.staff,
notIntercept:this.data.staff
})
},
// 确认
confirm(e) {
let { address } = this.data
const item = address?.find(val => val.active == true)
if (!item || !Object.keys(item)?.length) return wx.p.wxApi.showToast('请选择收货地址')
const contactAddress = item.provinceName+item.cityName+item.countyName+item.address
this.triggerEvent('getAddress', {defaultAddress:item,contactAddress})
this.cancel()
},
cancel() {
this.setData({
show: false
})
this.triggerEvent('cancel')
},
toSelect(e) {
const { item } = e.currentTarget.dataset
let { address } = this.data
address?.forEach(val => {
val.active = false
if (item.id == val.id) val.active = true
})
this.setData({address})
},
addressList() {
mineApi.getCustomerAddressList().then(data => {
// 新增地址后默认将新增的选中
data?.forEach((val, index) => {
val.active = false
if (index == 0) val.active = true
})
this.setData({
address: data
})
wx.hideLoading()
})
}
},
lifetimes: {
attached: function () {
wx.p.eventbus.on('REFRESH_PLATFORM_ADDRESS',()=>{
this.addressList()
})
},
},
})
.popclass {
border-radius: 16rpx 16rpx 0 0;
}
.address-container {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
z-index: 9;
.address-bg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
}
.container {
position: absolute;
width: 100%;
height: 65%;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 32rpx 32rpx 0 0;
left: 0;
bottom: 0;
animation: show-sku-box .5s forwards;
z-index: 2;
}
}
.headeer {
height: 104rpx;
background: #F7F7F7;
border-radius: 16rpx 16rpx 0 0;
box-sizing: border-box;
padding: 0 40rpx;
.icon {
width: 40rpx;
height: 40rpx;
}
.title {
font-weight: 500;
font-size: 32rpx;
color: #282829;
}
}
.list-pannel {
height: calc(100% - 260rpx);
.scroll {
height: 100%;
}
.cell {
display: flex;
align-items: center;
box-sizing: border-box;
padding: 32rpx 40rpx;
position: relative;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 24rpx;
}
.content-box {
.name-phone {
font-weight: 400;
font-size: 24rpx;
color: #707071;
}
.address {
width: 606rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #333435;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-height: 44rpx;
margin: 4rpx 0 8rpx 0;
}
.default-tip {
width: 104rpx;
height: 32rpx;
background: #f13c3d0f;
border: 1.2rpx solid #F13C3D;
border-radius: 4rpx;
font-weight: 400;
font-size: 20rpx;
color: #F13C3D;
}
}
.line {
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 670rpx;
height: 2rpx;
background: #EFF0F2;
}
}
.nothing {
height: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
color: #7A8299;
.icon{
width: 320rpx;
height: 300rpx;
margin-bottom: 20rpx;
}
}
}
.footer {
height: 104rpx;
background: #FFFFFF;
box-shadow: 0 0 0 0 #E9E9E9;
box-sizing: border-box;
padding: 0 32rpx;
.btn {
width: calc(50% - 7rpx);
height: 80rpx;
background: #ffffff0f;
border: 2rpx solid #FB8A32;
border-radius: 20rpx;
font-weight: 500;
font-size: 28rpx;
color: #FB8A32;
margin-right: 17rpx;
}
.confirm_btn {
background: #FB8A32;
color: #FFFFFF;
}
}
.flex_sbc {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
<!-- <van-popup show="{{ show }}" bind:click-overlay="cancel" custom-class="popclass" position="bottom" custom-style="height: 1076rpx"></van-popup> -->
<view class="address-container" hidden="{{!show}}">
<view class="address-bg" bindtap="cancel"></view>
<view class="container">
<view class="headeer flex_sbc">
<glsx-image bind:tap="cancel" class="icon" src="/index/back.png"></glsx-image>
<view class="title">选择收货地址</view>
<glsx-image bind:tap="cancel" webp class="icon" src="/index/close.png"></glsx-image>
</view>
<view class="list-pannel">
<scroll-view class="scroll" scroll-y="{{true}}" wx:if="{{address.length}}">
<block wx:for="{{address}}" wx:key="index">
<view bind:tap="toSelect" data-item="{{item}}" data-index="{{index}}" class="cell">
<view class="icon">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
</view>
<view class="content-box">
<view class="name-phone">{{item.receiveName}} {{item.receiveMobile}}</view>
<view class="address">{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.address}}</view>
<view wx:if="{{item.isDefault==1}}" class="default-tip flex_cc">默认地址</view>
</view>
<view class="line"></view>
</view>
</block>
</scroll-view>
<view wx:else class="nothing">
<view class="icon">
<glsx-image webp src="/cart/nothing-icon.png" />
</view>
暂无收货地址
</view>
</view>
<view class="footer flex_cc">
<view bind:tap="addNew" data-url="/packageMine/pages/address/detail/detail" class="btn flex_cc">新增地址</view>
<view bind:tap="confirm" class="btn confirm_btn flex_cc">确认</view>
</view>
</view>
</view>
// components/Dialog/dialog.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false
},
// 弹窗的标题
title: {
type: String,
value: ''
},
//是否显示蒙层
mask: {
type: Boolean,
value: true
},
buttons: {
type: Array,
default: () => [{
text: '取消',
extClass: 'btn_cancel'
}, {
text: '确定',
extClass: 'btn_primary'
}]
},
//['success','fail','loading]
statusIcon: {
type: String,
default: ""
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
handleClick(e) {
let {
index
} = e.detail
this.triggerEvent('buttontap', {
value: index
})
},
onClose() {}
}
})
\ No newline at end of file
/* components/Dialog/dialog.wxss */
.auth-dialog-class {
text-align: center;
font-size: var(--fontSize28);
font-weight: 400;
}
.auth-dialog-class .van-dialog__header {
font-size: var(--fontSize36);
font-weight: 500;
color: #333333;
}
.title_text {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 40rpx;
color: #000000;
text-align: center;
}
.status {
width: 88rpx;
height: 88rpx;
position: relative;
left:50%;
transform: translateX(-50%);
margin-bottom:28rpx;
.icon{
width:100%;
height:100%;
}
}
\ No newline at end of file
<!--components/Dialog/dialog.wxml-->
<mp-dialog show="{{ show }}" class="auth-dialog-class" width="var(--fontSize552)" bindclose="onClose" mask="{{mask}}" bindbuttontap="handleClick" buttons="{{buttons}}" bindclose="onClose">
<view slot="title" wx:if="{{title}}">
<view class="title_text">{{title}}</view>
</view>
<view class="status" wx:if="{{statusIcon}}">
<glsx-image webp src="/status/{{statusIcon}}.png" class="icon"></glsx-image>
</view>
<slot></slot>
</mp-dialog>
// packageMine/pages/order/components/OrderItem/OrderItem.js
// pages/Login/components/EnableSuccess/EnableSuccess.js
Component({
/**
* 组件的属性列表
*/
properties: {
item: Object
show: {
type: Boolean
}
},
/**
......@@ -18,6 +21,8 @@ Component({
* 组件的方法列表
*/
methods: {
confirm() {
this.setData({show: false})
}
}
})
})
\ No newline at end of file
/* pages/Login/components/EnableSuccess/EnableSuccess.wxss */
.success {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
z-index: 9;
.success-bg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
}
.success-content {
position: absolute;
width: calc(100% - 208rpx);
height: 578rpx;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
.content-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
.content-box {
position: absolute;
z-index: 2;
margin-top: 226rpx;
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
.success-text {
font-size: 48rpx;
font-weight: 700;
color: #FB8A32;
margin-bottom: 20rpx;
}
.success-tips {
line-height: 50rpx;
}
.success-btn {
width: 352rpx;
height: 96rpx;
background-image: linear-gradient(119deg, #FFB14E 11%, #FB8A32 96%);
box-shadow: 0 12rpx 12rpx 4rpx #fb8a321a;
border-radius: 48rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 32rpx;
font-weight: 500;
margin-top: 24rpx;
}
}
}
}
\ No newline at end of file
<!--pages/Login/components/EnableSuccess/EnableSuccess.wxml-->
<view class="success" catchtouchmove="noScroll" hidden="{{!show}}">
<view class="success-bg"></view>
<view class="success-content">
<view class="content-bg">
<glsx-image src="/login/success-bg.png"></glsx-image>
</view>
<view class="content-box">
<view class="success-text">开通成功</view>
<view class="success-tips">
<view>您的积分钱包开通成功!</view>
<view>即刻开启您的财富之旅!</view>
</view>
<view class="success-btn" bindtap="confirm">我知道了</view>
</view>
</view>
</view>
\ No newline at end of file
// pages/Login/components/EnableWallet/EnableWallet.js
import commonApi from '~/api/module/common.js'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
this.setData({
copyWalletObj: JSON.parse(JSON.stringify(this.data.walletObj))
})
}
},
walletObj: {
type: Object
}
},
/**
* 组件的初始数据
*/
data: {
stepDataArr: [{
icon: 'wallet-icon-1',
label: '开通钱包',
tips: '一站式积分管理体验'
}, {
icon: 'wallet-icon-2',
label: '查询积分',
tips: '您的第一笔可用积分',
pointsFlag: true
}, {
icon: 'wallet-icon-3',
label: '积分随心用',
tips: '兑换商品/分享亲友/话费充值, 想怎么用就怎么用!'
}]
},
/**
* 组件的方法列表
*/
methods: {
// 关闭弹窗
closeWallet() {
let { copyWalletObj } = this.data
this.setData({show: false})
// 仅替换积分数据返回的内容,使用copyWalletObj 防止修改弹窗内容也做了替换
this.replaceNickName(copyWalletObj)
},
// 替换积分钱包名称
replaceNickName(data) {
let userInfo = wx.p.storage.get('userInfo')
let { phone, scoreSource } = data
if (!phone || !scoreSource) {
wx.p.sentry.reportParamError(
'替换积分钱包姓名异常:phone, scoreSource',
data
)
}
commonApi.replaceWalletName({
nickName: data?.name,
phone: data?.phone,
scoreSource: data?.scoreSource
}).then(res => {
let { code, message } = res
if (code == 0) {
wx.p.storage.set('userInfo', {...userInfo, nickName: data?.name}) // 更新storage中的nickName
} else {
wx.p.wxApi.showToast(message)
}
})
},
input(e) {
let { target } = e.currentTarget.dataset
let { value } = e.detail
value = target == 'phone' ? value.replace(/[^0-9]/g, '') : value
this.setData({
[`walletObj.${target}`]: value
})
},
// 一键开通积分钱包
enableWalletConfirm() {
let { walletObj } = this.data
commonApi.openPointsWallet(walletObj).then(res => {
let { code, message } = res
if (code == 0) {
this.setData({
showEnableSuccess: true,
show: false
})
this.replaceNickName(walletObj)
this.triggerEvent('open')
} else {
wx.p.wxApi.showToast(message)
}
})
},
// 开通
confirm() {
let { walletObj } = this.data
if (!walletObj?.name) return wx.p.wxApi.showToast('姓名不能为空')
if (!walletObj?.phone || !/^[1]([3-9])[0-9]{9}$/.test(walletObj?.phone)) return wx.p.wxApi.showToast('请输入正确手机号')
this.enableWalletConfirm()
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"tab": "/components/Tab/Tab"
"enable-success": "/components/EnableSuccess/EnableSuccess"
}
}
\ No newline at end of file
/* pages/Login/components/EnableWallet/EnableWallet.wxss */
.wallet {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
z-index: 9;
.wallet-bg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
}
.wallet-content {
position: absolute;
width: calc(100% - 32rpx);
height: 968rpx;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
.content-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
.close {
width: 48rpx;
height: 48rpx;
position: absolute;
top: 0;
right: 10rpx;
z-index: 2;
}
.content-box {
position: absolute;
z-index: 2;
width: calc(100% - 80rpx);
margin: 220rpx 40rpx 0 40rpx;
.box-item {
display: flex;
align-items: center;
margin-bottom: 26rpx;
.wallet-icon {
width: 76rpx;
height: 76rpx;
margin-right: 24rpx;
}
.label {
font-size: 26rpx;
color: #322811;
font-weight: 700;
}
.tips {
font-size: 24rpx;
color: #666666;
}
}
.text {
font-size: 24rpx;
color: #999999;
margin: 56rpx 0 16rpx;
}
.input-box {
height: 80rpx;
background: #F5F6F7;
border-radius: 16rpx;
display: flex;
align-items: center;
margin-bottom: 16rpx;
.input-label {
flex-shrink: 0;
width: 164rpx;
padding-left: 32rpx;
}
}
.wallet-btn {
height: 96rpx;
background-image: linear-gradient(108deg, #FFB14E 11%, #FB8A32 96%);
box-shadow: 0 12rpx 12rpx 4rpx #fb8a321a;
border-radius: 48rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 32rpx;
font-weight: 500;
margin-top: 36rpx;
}
}
}
}
\ No newline at end of file
<!--pages/Login/components/EnableWallet/EnableWallet.wxml-->
<view class="wallet" catchtouchmove="noScroll" hidden="{{!show}}">
<view class="wallet-bg"></view>
<view class="wallet-content">
<view class="content-bg">
<glsx-image src="/login/wallet-bg.png"></glsx-image>
</view>
<view class="close" bindtap="closeWallet">
<glsx-image src="/login/wallet-close.png"></glsx-image>
</view>
<view class="content-box">
<view class="box-item" wx:for="{{stepDataArr}}" wx:key="index">
<view class="wallet-icon">
<glsx-image src="/login/{{item.icon}}.png"></glsx-image>
</view>
<view>
<view class="label">{{item.label}}</view>
<view class="tips">
{{item.tips}}
<text class="label" wx:if="{{item.pointsFlag}}">{{walletObj.currentScore}}</text>
</view>
</view>
</view>
<view class="text">请确认信息无误</view>
<view class="input-box">
<view class="input-label">姓名</view>
<input bindinput="input" data-target="name" maxlength="20" value="{{walletObj.name}}" type="text" placeholder="请输入"/>
</view>
<view class="input-box">
<view class="input-label">手机号</view>
<input bindinput="input" data-target="phone" maxlength="11" disabled value="{{walletObj.phone}}" type="text" placeholder="请输入"/>
</view>
<view class="wallet-btn" bindtap="confirm">一键开通</view>
</view>
</view>
</view>
<!-- 钱包开通成功 -->
<enable-success show="{{showEnableSuccess}}" bindconfirm="successConfirm"></enable-success>
\ No newline at end of file
// components/GoodsAction/GoodsAction.js
import cartApi from '~/api/module/cart.js'
import NP from 'number-precision'
Component({
/**
* 组件的属性列表
......@@ -31,18 +33,38 @@ Component({
)
},
jump(e) {
let { url } = e.currentTarget.dataset
if (url == 'home') wx.p.router.goHome()
else wx.p.router.go('/packageMall/pages/shoppingCart/shoppingCart')
wx.p.router.switchTab('/pages/tab/cart/index')
},
click(e) {
let { event } = e.currentTarget.dataset
this.triggerEvent('click', event)
},
getCartNum() {
let userInfo = wx.p.storage.get('userInfo')
let para = {
scoreSource: userInfo?.channelSource,
merchantId: userInfo?.merchantId
}
cartApi.getCartList(para).then(res => {
let cartNum = 0
res?.goodsList?.forEach(el => {
if (!el.flag) {
cartNum = NP.plus(cartNum, el.sellQty || 0)
}
})
this.setData({
cartNum
})
})
}
},
lifetimes: {
attached() {
this.getViewInfo()
let { custom } = this.data
if (!custom) {
this.getCartNum()
}
}
}
})
......@@ -5,15 +5,12 @@
<block wx:else>
<view class="goods-action">
<view class="navigation-box">
<view class="item" bindtap="jump" data-url="home">
<view class="sprite-icon">
<glsx-image src="mall/goods-home.png"></glsx-image>
</view>
首页
</view>
<view class="item" wx:if="{{!hideShop}}" bindtap="jump">
<view v-if="{{true}}" class="goods-num">
<text>{{cartNum}}</text>
</view>
<view class="sprite-icon" >
<glsx-image src="mall/goods-shopping.png"></glsx-image>
<glsx-image src="/index/goods-cart.png"></glsx-image>
</view>
购物车
</view>
......@@ -23,7 +20,7 @@
加入购物车
</view>
<view class="btn pay text-center {{payDisabled && hideShop?'disabled':''}} {{stock?'disabled':''}} {{buyFlag?'disabled':''}}" bindtap="click" data-event="pay">
立即购买
立即兑换
</view>
</view>
</view>
......
......@@ -23,7 +23,7 @@
}
}
.goods-action {
padding: 10rpx var(--margin);
padding: 12rpx 24rpx;
display: flex;
align-items: center;
box-sizing: border-box;
......@@ -47,6 +47,20 @@
flex-direction: column;
align-items: center;
margin:0 14rpx;
position: relative;
}
.navigation-box .item .goods-num {
position: absolute;
top: -10rpx;
right: -16rpx;
height: 28rpx;
background: #F75454;
border: 1rpx solid #FFFFFF;
border-radius: 14rpx;
font-size: 18rpx;
color: #FFFFFF;
padding: 0 8rpx;
}
.navigation-box .sprite-icon{
width: 40rpx;
......@@ -57,23 +71,25 @@
display: flex;
align-items: center;
margin-left: auto;
border-radius: var(--borderRadius);
border-radius: 20rpx;
overflow: hidden;
font-weight: 500;
}
.btn-box .btn {
width: 258rpx;
height: 80rpx;
width: 304rpx;
height: 84rpx;
color: #fff;
font-size: 28rpx;
font-size: 32rpx;
}
.btn-box .pay {
background-color: var(--btnColor);
background-color: #FB8A32;
}
.btn-box .join {
background-color: #FDC23E;
color: #FB8A32;
background-color: #FEF2EA;
}
.btn-box.true .join{
display: none;
......@@ -82,10 +98,3 @@
width: 588rpx;
background-color: var(--themeColor);
}
.btn-box .pay.disabled{
background-color: #B1B1B3 !important;
}
.btn-box .disabled{
background-color: #B1B1B3 !important;
}
\ No newline at end of file
<view class="navigation-bar" id="navigation-bar" style="padding-top:{{statusBarHeight}}px;height:{{navigationBarHeight}}px;{{navStyle}}">
<view class="navigation-bar" id="navigation-bar" style="padding-top:{{statusBarHeight}}px;height:{{navigationBarHeight}}px;line-height:{{navigationBarHeight}}px;{{navStyle}}">
<block wx:if="{{!custom}}">
<view class="navigation-bar-box" wx:if="{{showNavBar}}" style="{{navigationBarStyle}}">
<block wx:if="{{SHOWBACK}}">
<view class="back " bindtap="back">
<image class="img" src="./images/icon-back.png" />
<mp-icon icon="back" color="#2C2C2C" size="{{12}}"></mp-icon>
</view>
</block>
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}">
......
......@@ -37,6 +37,26 @@ Component({
only: {
type: Boolean,
value: true
},
showCloseButton: {
type: Boolean,
value: false
},
showFooter: {
type: Boolean,
value: true
},
headerColor: {
type: String,
value: ''
},
showConfirm:{
type: Boolean,
value: true
},
bodyColor:{
type: String,
value: ''
}
},
......@@ -56,6 +76,11 @@ Component({
this.setData({
show: false
})
wx.setPageStyle({
style: {
overflow: 'unset'
}
})
},
confirm() {
this.triggerEvent('confirm')
......
<view class="popup " hidden="{{!showPopup}}" catchtouchmove="noScroll">
<view class="popup " hidden="{{!showPopup}}">
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content {{close?'close':''}}" style="height:{{height}}">
<view class="popup-content {{close?'close':''}}" style="height:{{height}};background:{{bodyColor}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
<view class="popup-title text-center" style="background:{{headerColor}}">{{title}}
<view class="popup-close" wx:if="{{showCloseButton}}" bindtap="hidePopup">
<mp-icon icon="close2" color="#B1B1B3" size="20"></mp-icon>
</view>
</view>
</block>
<view class="popup-slot {{title?'':'notitle' }}">
<slot></slot>
</view>
<view class="popup-footer isFullSucreen" wx:if="{{only}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确定</view>
</view>
<view class="popup-footer isFullSucreen" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确定</view>
<view class="popup-footer isFullSucreen {{!showConfirm?'cancel-only':''}}" wx:if="{{showFooter}}">
<view class="cancel btn text-center" wx:if="{{only}}" bindtap="hidePopup">取消</view>
<view class="confirm {{only?'btn':'doubtn'}} text-center" wx:if="{{showConfirm}}" bindtap="confirm">确定</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -43,6 +43,18 @@
font-size: 32rpx;
color: #333333;
border-bottom: 2rpx solid #EBEDF0;
border-radius: 20rpx 20rpx 0 0;
position: relative;
}
.popup-close {
position: absolute;
right: 40rpx;
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.popup-slot {
......@@ -65,7 +77,9 @@
background-color: #fff;
z-index: 2;
}
.popup-footer.cancel-only{
padding: 0 !important;
}
.popup-footer .btn {
width: 330rpx;
......@@ -88,6 +102,12 @@
border: 2rpx solid #DCDEE0;
}
.popup-footer.cancel-only .cancel {
border-radius: 0;
width: 100%;
border-bottom: 0;
}
.popup-footer .confirm {
background: var(--btnColor);
color: #fff;
......
import NP from "number-precision";
import cartApi from '~/api/module/cart.js'
Component({
/**
* 组件的属性列表
*/
properties: {
show: Boolean,
address: Array,
type: String,
goods: {
type: Object,
observer: function(n) {
this.setData({
detailInfo: JSON.parse(JSON.stringify(n))
}, () => {
this.setDefaultSku(n)
})
}
},
defaultAddress: Object,
defaultAds: String,
canPay:Boolean,
clickType: String
},
data: {
currentIndex: 0,
goodsNumber: 1,
showJfModal: false,
detailInfo: {}
},
/**
* 组件的方法列表
*/
methods: {
cancel() {
this.setData({
show: false
})
this.triggerEvent('cancelSku')
},
setDefaultSku(detailInfo) {
let specificationDetailList = detailInfo.platformGlGoodsSpecifications && detailInfo.platformGlGoodsSpecifications[0]
if (detailInfo?.specificationData) {
specificationDetailList = detailInfo?.platformGlGoodsSpecifications?.find(val => val.specificationData == detailInfo.specificationData)
}
let defaultGoods = specificationDetailList?.specificationData.split('&')
detailInfo.platformGlGoodsSpecificationList?.map(e => {
defaultGoods?.map(i => {
let [key, value] = i.split('-')
if (key == e.specificationName) {
e.platformSpecificationValueList.map(c => {
if (c.specificationValue == value) c.active = true
})
}
})
})
this.setData({
detailInfo,
['detailInfo.goodsStock']: specificationDetailList?.stock || detailInfo.goodsStock, // 多规格商品库存在每个规格组中
goodsNumber: detailInfo?.sellQty || 1
})
},
// 选择规格
choose(e) {
let { index, ind } = e.currentTarget.dataset
let { detailInfo } = this.data
let { platformGlGoodsSpecificationList, platformGlGoodsSpecifications } = detailInfo
let activeList = []
if (platformGlGoodsSpecificationList[index].platformSpecificationValueList[ind].active) return
platformGlGoodsSpecificationList[index].platformSpecificationValueList.map(i => (i.active = false))
platformGlGoodsSpecificationList[index].platformSpecificationValueList[ind].active = true
platformGlGoodsSpecificationList.map(i => {
i.platformSpecificationValueList.map(c => {
if (c.active) activeList.push(`${i.specificationName}-${c.specificationValue}`)
})
})
let specificationData = activeList.join('&')
let goodsStock
platformGlGoodsSpecifications?.map(val => {
if (val.specificationData == specificationData) {
goodsStock = val.stock
}
})
this.setData({
detailInfo,
['detailInfo.goodsStock']: goodsStock,
['detailInfo.specificationData']: specificationData
})
const thisPage = wx.p.router.getPageInstance()
thisPage.setData({
activeSku: specificationData,
goodsStock
})
},
changeCount(e) {
this.triggerEvent('getCount', e.detail)
this.setData({
goodsNumber: e.detail
})
},
toShowAddressModal() {
let thisPage = wx.p.router.getPageInstance()
thisPage.setData({
showAddress: true
})
},
intRemain(e) {
this.setData({
remain: e.detail.value
})
},
toCreatedOrder() {
let { clickType, remain, detailInfo, defaultAddress, goodsNumber } = this.data
const userInfo = wx.p.storage.get('userInfo')
if (!['pay', 'join', 'change'].includes(clickType)) {
return this.cancel()
}
if (clickType == 'change') {
this.cancel()
return this.triggerEvent('changeSku', {specificationData: detailInfo.specificationData, sellQty: goodsNumber || detailInfo.startQty})
}
console.log(detailInfo)
if (!detailInfo.goodsStock) return
detailInfo.sellQty = goodsNumber || detailInfo.sellQty
detailInfo?.platformGlGoodsSpecifications?.forEach(val => {
if (val.active) detailInfo.specificationData = val.specificationData
})
if (clickType == 'join') {
// 加入购物车
const PARAMS = {
goodsId: detailInfo.id,
sellQty: goodsNumber || detailInfo.startQty,
goodsSource: detailInfo.goodsSource,
scoreSource: userInfo?.channelSource,
specificationData: detailInfo?.specificationData,
merchantId: userInfo?.merchantId
}
wx.p.wxApi.showLoading()
cartApi.addToCart(PARAMS).then(res => {
wx.hideLoading()
wx.p.wxApi.showToast('加入购物车成功')
this.cancel()
this.triggerEvent('joinSuccess')
})
return
}
if(!defaultAddress.receiveName){
return wx.p.wxApi.showToast('请选择收货地址')
}
// 跳转到确认订单
let query = {
defaultAddress,
buyerMsg: remain,
goodsList: [{...detailInfo}],
}
wx.p.router.go('/packageIndex/pages/confirmOrder/index', query)
}
}
})
{
"component": true,
"usingComponents": {
"glsx-image": "/miniprogram_npm/glsx-applet-component/Image/index"
"stepper": "/components/Stepper/Stepper"
}
}
\ No newline at end of file
.sku-container {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
z-index: 9;
height: 100vh;
.sku-bg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.container {
position: absolute;
width: 100%;
height: 80%;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 20rpx 20rpx 0 0;
left: 0;
bottom: 0;
animation: show-sku-box .5s forwards;
z-index: 2;
padding: 44rpx 40rpx;
overflow: auto;
}
}
.goods-box {
.cover {
width: 180rpx;
height: 180rpx;
border-radius: 24rpx;
overflow: hidden;
flex-shrink: 0;
}
.right-box {
padding-left: 40rpx;
width: calc(100% - 220rpx);
.price-box {
font-weight: 700;
color: #FC5B32;
display: table-cell;
vertical-align: bottom;
text {
color: #FF6038;
font-size: 40rpx;
font-weight: 600;
margin-right: 4rpx;
}
.price {
font-size: 64rpx;
}
}
.stock {
font-weight: 400;
font-size: 22rpx;
color: #858A94;
margin: 10rpx 0 8rpx 0;
}
.selct-box {
font-weight: 400;
font-size: 22rpx;
color: #858A94;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.sku-box {
.title {
font-weight: 500;
font-size: 28rpx;
color: #1B233D;
margin-top: 48rpx;
margin-bottom: 26rpx;
}
.sku-list {
.sku-title {
color: #2D2D2E;
font-weight: 500;
padding-top: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.sku-item {
display: flex;
flex-wrap: wrap;
.item {
min-width: 112rpx;
box-sizing: border-box;
height: 52rpx;
display: flex;
align-items: center;
justify-content: center;
background: #F7F8FA;
padding: 0 20rpx;
margin: 20rpx 20rpx 0 0;
font-size: 26rpx;
color: #656566;
border: 2rpx solid #F7F8FA;
box-sizing: border-box;
border-radius: 12rpx;
&.active {
border-color: #FC5B32;
color: #FC5B32;
background-color: #fc5b320f;
}
}
}
.sku {
padding: 6rpx 20rpx;
background: #F7F8FA;
font-weight: 400;
font-size: 26rpx;
border-radius: 12rpx;
margin-right: 16rpx;
margin-bottom: 20rpx;
}
.sku_active {
background: #fc5b320f;
border: 2rpx solid #FC5B32;
color: #FC5B32;
}
.disabled{
background-color: #B1B1B3 !important;
color: #000000!important;
}
}
.flex-w {
display: flex;
flex-wrap: wrap;
}
}
.count-box {
margin-top: 32rpx;
.title {
font-size: 28rpx;
color: #2D2D2E;
font-weight: 500;
}
.right {
.tip {
font-weight: 400;
font-size: 20rpx;
color: #F13C3D;
}
.stepper {
margin-left: 16rpx;
}
}
}
.textarea-box {
margin-top: 48rpx;
.title {
font-size: 28rpx;
color: #2D2D2E;
font-weight: 500;
margin-bottom: 20rpx;
}
.pannel {
width: 100%;
box-sizing: border-box;
padding: 16rpx 20rpx;
height: 128rpx;
background: #F5F6FA;
border-radius: 16rpx;
.textarea-placeholder {
font-weight: 400;
font-size: 24rpx;
color: #9E9EA8;
}
.textArea {
height: 100%;
}
}
}
.adress-box {
margin-top: 52rpx;
.title {
font-size: 28rpx;
color: #2D2D2E;
font-weight: 500;
}
.content {
font-weight: 400;
font-size: 24rpx;
color: #333435;
width: 490rpx;
text-align: right;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: 8rpx;
}
.emptyText {
color: #858A94;
}
.pos {
width: 36rpx;
height: 36rpx;
}
}
.btn-wrap {
position: fixed;
left: 0;
right: 0;
bottom: 0;
box-sizing: border-box;
padding: 8rpx 40rpx 68rpx;
background: white;
z-index: 5;
.btn {
width: 100%;
height: 84rpx;
background: #FB8A32;
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
.disabled{
background: #FB8A324C;
}
}
.flex_sc {
display: flex;
align-items: center;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb {
display: flex;
align-items: center;
justify-content: space-between;
}
\ No newline at end of file
<!-- <van-popup show="{{ show }}" bind:click-overlay="cancel" custom-class="popclass" position="bottom" custom-style="height: 90%"></van-popup> -->
<view class="sku-container" hidden="{{!show}}">
<view class="sku-bg" bindtap="cancel"></view>
<view class="container">
<view class="goods-box flex_sc">
<view class="cover">
<glsx-image class="cover" src="{{detailInfo.goodsSource == 2 ? detailInfo.goodsImage : detailInfo.imageResponses[0].imgUrl}}" />
</view>
<view class="right-box">
<view class="price-box">
<text class="price">{{detailInfo.redeemPoints}}</text><text>积分</text>
</view>
<view wx:if="{{detailInfo.goodsStock}}" class="stock">有货(库存{{detailInfo.goodsStock}})</view>
<view wx:else class="stock">暂无存货</view>
<block>
<view wx:if="{{detailInfo.goodsSource == 1}}" class="selct-box">已选:{{goodsNumber}}{{detailInfo.goodsUnit}}</view>
<view wx:if="{{detailInfo.specificationData}}" class="selct-box">已选:{{detailInfo.specificationData}}</view>
</block>
</view>
</view>
<view class="sku-box">
<block wx:if="{{detailInfo.goodsSource == 1}}">
<view class="title">规格</view>
<view class="sku-list flex-w">
<block wx:for="{{detailInfo.specificationResponses}}" wx:key="index">
<view class="sku flex_cc sku_active">{{item.specName}}:{{item.specValue}}</view>
</block>
</view>
</block>
<view class="sku-list" wx:else>
<block wx:for="{{detailInfo.platformGlGoodsSpecificationList}}" wx:key="index">
<view class="sku-title">{{item.specificationName}}</view>
<view class="sku-item">
<block wx:for="{{item.platformSpecificationValueList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item text-center {{i.active?'active':''}} {{i.stock ===0?'disabled':''}}" bindtap="choose" data-index="{{index}}"
data-ind="{{ind}}">{{i.specificationValue}}</view>
</block>
</view>
<!-- <view class="sku flex_cc {{item.active ? 'sku_active' : ''}} {{i.stock ===0?'disabled':''}}" bindtap="choose" data-target="{{item}}">{{item.specificationData}}</view> -->
</block>
</view>
</view>
<view class="count-box flex_scb">
<view class="title">数量</view>
<view class="right flex_sc">
<!-- <view class="tip">至少购买{{goods.startQty}}{{goods.goodsUnit}}</view> -->
<view class="stepper">
<stepper count="{{goodsNumber}}" max="{{detailInfo.goodsStock || 1}}" catchchange="changeCount"></stepper>
</view>
</view>
</view>
<view class="textarea-box" wx:if="{{clickType != 'join' && clickType != 'change'}}">
<view class="title">订单备注</view>
<view class="pannel">
<textarea bindinput="intRemain" maxlength="100" class="textArea" placeholder="请输入备注信息(选填)" placeholder-class="textarea-placeholder"></textarea>
</view>
</view>
<view bind:tap="toShowAddressModal" class="adress-box flex_scb" wx:if="{{clickType != 'join' && clickType != 'change'}}">
<view class="title">收货地址</view>
<view class="right flex_scb">
<view class="content {{defaultAds?'':'emptyText'}}">{{defaultAds || '请选择'}}</view>
<mp-icon icon="arrow" bind:tap="showSkuModal" color="#B1B1B3" size="{{10}}"></mp-icon>
</view>
</view>
<view class="btn-wrap flex_cc">
<view bind:tap="toCreatedOrder" class="btn flex_cc {{!detailInfo.goodsStock ? 'disabled' : ''}}">确认</view>
</view>
<view style="height:290rpx"></view>
</view>
</view>
<view class="stepper-box">
<view class="minus count-box text-center {{count == min?'opacity':''}}" catchtap="change"></view>
<input class="num count-box text-center" type="number" catchinput="input" value="{{count}}" catchblur="blur" catchtap="tap" />
<input class="num text-center" type="number" catchinput="input" value="{{count}}" catchblur="blur" catchtap="tap" />
<view class="add count-box text-center {{count == max?'opacity':''}}" catchtap="change" data-add>
</view>
......
......@@ -29,7 +29,14 @@
}
.stepper-box .num {
width: 59rpx;
width: 72rpx;
box-sizing: border-box;
padding: 0 4rpx;
border-radius: 8rpx;
font-size: 26rpx;
height: 48rpx;
background: #F0F0F0;
text-align: center;
}
.stepper-box .add {
......
<block wx:if="{{openScroll}}">
<scroll-view class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count||count==item.code?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" >
<view class="tab {{index==count||count==item.code?'active':''}}" bindtap="click" data-count="{{index}}" data-item="{{item}}" id="to-{{index}}" >
<view class="text" >{{item.text||item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line"></view>
......
......@@ -29,7 +29,11 @@
box-sizing: border-box;
color: #1B233D;
justify-content: center;
font-size: 26rpx;
font-size: 30rpx;
/* 添加以下属性防止文本换行 */
white-space: nowrap;
min-width: 100%;
transition: all 0.25s;
}
.left .text{
justify-content: flex-start;
......@@ -42,11 +46,13 @@
font-weight: 600;
transition: all .25s;
color:#1B233D;
/* 确保激活状态下文本不会换行 */
white-space: nowrap;
}
.tab .line {
width: 48rpx;
height: var(--borderRadius);
height: 8rpx;
background: var(--themeColor);
border-radius: 6rpx;
margin: 0 auto;
......
/*可视化地呈现时间流信息*/
Component({
properties: {
// 时间轴节点数据
nodes: {
type: Array,
value: [],
observer(newVal) {
this.formatContent(newVal);
},
},
},
data: {
timeLineNodes: [],
},
methods: {
formatContent(nodes) {
nodes.forEach((item) => {
if (item.type == "special") {
item.content = [{ type: "text", txt: item.content }];
} else {
item.content = this.parsePhone(item.content);
}
});
this.setData({
timeLineNodes: nodes,
});
},
// 把原始文本切成 text | phone 两种节点
parsePhone(str) {
if(!str){
return [];
}
const phoneReg = /(1[3-9]\d{9}|0\d{2,3}[-]?\d{7,8})/g; // 简易手机号正则
let lastIndex = 0;
const res = [];
let match;
while ((match = phoneReg.exec(str)) !== null) {
// 1. match 之前的纯文本
if (match.index > lastIndex) {
res.push({ type: "text", txt: str.slice(lastIndex, match.index) });
}
// 2. 手机号本身
res.push({ type: "phone", txt: match[0] });
lastIndex = match.index + match[0].length;
}
// 3. 尾部剩余文本
if (lastIndex < str.length) {
res.push({ type: "text", txt: str.slice(lastIndex) });
}
return res;
},
// 拨打电话
makePhoneCall(e) {
const phone = e.currentTarget.dataset.phone;
if (phone) {
wx.makePhoneCall({
phoneNumber: phone,
});
}
},
},
});
{
"component": true,
"usingComponents": {
"glsx-image": "/miniprogram_npm/glsx-applet-component/Image/index"
"mp-html":"/components/mp-html/index"
}
}
\ No newline at end of file
/* 时间轴容器 */
.timeline-container {
// padding: 20rpx 0;
overflow-y: auto;
}
/* 时间轴节点 */
.timeline-node {
position: relative;
padding-bottom: 32rpx;
display: flex;
&:last-child {
padding-bottom: 0;
}
}
/* 时间轴节点点容器 */
.timeline-node__dot-wrapper {
width: 36rpx;
display: flex;
justify-content: center;
align-items: flex-start;
flex-shrink: 0;
padding-top: 6rpx;
}
/* 时间轴节点点 */
.timeline-node__dot {
width: 20rpx;
height: 20rpx;
background-color: #e8e8ea;
border-radius: 50%;
z-index: 1;
/* 激活状态的节点点 */
&.timeline-node__dot--special-small-active,
//组合容错
&.timeline-node__dot--special-active-small,
&.timeline-node__dot--small-active-special,
&.timeline-node__dot--small-special-active,
&.timeline-node__dot--active-small-special,
&.timeline-node__dot--active-special-small,
&.timeline-node__dot--special-active,
&.timeline-node__dot--active-special,
&.timeline-node__dot--special-normal-active,
&.timeline-node__dot--special-active-normal,
&.timeline-node__dot--small-active,
&.timeline-node__dot--active-small,
&.timeline-node__dot--normal-active,
&.timeline-node__dot--active {
background-color: var(--btnColor);
}
/* 小型节点点 */
&.timeline-node__dot--special-small-active,
//组合容错
&.timeline-node__dot--special-active-small,
&.timeline-node__dot--small-active-special,
&.timeline-node__dot--small-special-active,
&.timeline-node__dot--active-small-special,
&.timeline-node__dot--active-special-small,
&.timeline-node__dot--special-active,
&.timeline-node__dot--active-special,
&.timeline-node__dot--special-normal-active,
&.timeline-node__dot--special-active-normal,
&.timeline-node__dot--small-active,
&.timeline-node__dot--active-small,
&.timeline-node__dot--special,
&.timeline-node__dot--small {
width: 12rpx;
height: 12rpx;
}
}
/* 时间轴连接线 */
.timeline-node__line {
position: absolute;
top: 18rpx;
left: 18rpx;
height: calc(100% - 16rpx);
border-left: 1px solid #e8e8ea;
z-index: 0;
}
/* 时间轴内容 */
.timeline-node__content {
flex: 1;
padding-left: 20rpx;
color: #b1b1b3;
}
.timeline-node__content--special,
.timeline-node__content--special-normal,
.timeline-node__content--special-normal-active,
.timeline-node__content--special-small,
.timeline-node__content--special-active,
.timeline-node__content--special-small-active,
.timeline-node__content--special-active-small {
.timeline-node__title,
.timeline-node__tip {
font-weight: 400;
font-size: 24rpx;
}
.timeline-node__title {
color: #282829;
}
.timeline-node__tip {
color: #666666;
}
}
/* 时间轴头部 */
.timeline-node__header {
display: flex;
margin-bottom: 8rpx;
align-items: center;
gap: 20rpx;
}
/* 时间轴标题 */
.timeline-node__title {
font-weight: 500;
font-size: 32rpx;
margin-bottom: 8rpx;
line-height: 1.4;
}
/* 时间轴时间 */
.timeline-node__time {
font-weight: 400;
font-size: 24rpx;
line-height: 1.4;
}
/* 时间轴提示信息 */
.timeline-node__tip {
font-weight: 400;
font-size: 24rpx;
line-height: 1.5;
.content {
white-space: pre-wrap;
.phone {
color: #fb8a32;
}
}
}
.timeline-node__content--active,
.timeline-node__content--active-small,
.timeline-node__content--active-special {
.timeline-node__title {
color: #282829;
}
.timeline-node__time {
color: #909399;
}
.timeline-node__tip {
color: #656566;
}
}
.phone-numbers {
margin-top: 8rpx;
}
.phone-number {
display: inline-block;
margin-right: 16rpx;
margin-top: 8rpx;
}
.phone-call-text {
color: #fff;
font-size: 24rpx;
background-color: var(--btnColor);
padding: 4rpx 12rpx;
border-radius: 24rpx;
}
<!-- 时间轴组件 -->
<view class="timeline-container">
<view wx:for="{{timeLineNodes}}" wx:key="index" class="timeline-node">
<!-- 时间轴节点 -->
<view class="timeline-node__dot-wrapper">
<!-- 使用预处理的样式类 -->
<view class="timeline-node__dot timeline-node__dot--{{item.type}}"></view>
</view>
<!-- 时间轴连接线 -->
<view wx:if="{{index !== nodes.length - 1}}" class="timeline-node__line"></view>
<!-- 时间轴内容 -->
<view class="timeline-node__content timeline-node__content--{{item.type}} ">
<view class="timeline-node__header">
<view wx:if="{{item.statusDesc}}" class="timeline-node__title">{{item.statusDesc}}</view>
<view wx:if="{{item.operateTime}}" class="timeline-node__time">{{item.operateTime}}</view>
</view>
<view class="timeline-node__tip">
<view class="content">
<block wx:for="{{item.content}}" wx:key="index" wx:for-item="content">
<block wx:if="{{content.type==='text'}}">{{content.txt}}</block>
<label wx:elif="{{content.type==='phone'}}"
catchtap="makePhoneCall"
data-phone="{{content.txt}}"
class="phone">{{content.txt}}</label>
</block>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
// components/Goods/Goods.js
import { centsToyuan } from '~/utils/format'
import homeApi from '~/api/module/home.js'
import cartApi from '~/api/module/cart.js'
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type: Object,
observer(n, o) {
if (n) {
if (n.activityInfo) {
n.originalPrice = ''
n.retailPrice = n.activityInfo.activityPrice
n.goodsStatistics.saleAmount = n.activityInfo.saleAmount
if (n.activityInfo.specificationExtraList && n.activityInfo.specificationExtraList.length) {
n.retailPrice = n.activityInfo.specificationExtraList[0].retailPrice
n.up = true
}
} else {
if (n.originalPrice) n.originalPrice = centsToyuan(n.originalPrice)
if (n.specificationDetailList && n.specificationDetailList.length) {
n.retailPrice = n.specificationDetailList[0].retailPrice
n.up = true
}
}
n.retailPrice = Number(centsToyuan(n.retailPrice)).toFixed(2)
if (n.retailPrice > 9999) {
n.retailPrice = Number(n.retailPrice / 10000).toFixed(2)
n.unit = '万'
}
this.setData({ item: n })
}
}
},
indexStyle: Boolean
list: {
type: Array,
value: []
}
},
/**
* 组件的初始数据
*/
data: {},
data: {
},
/**
* 组件的方法列表
......@@ -56,20 +33,22 @@ Component({
this
)
},
jump(e) {
let { item } = e.currentTarget.dataset
let { id, activityInfo } = item
let isActivity = false
if (activityInfo) {
id = activityInfo.id
isActivity = true
}
wx.p.router.go('/packageMall/pages/detail/detail', { id, isActivity, notIntercept: true })
// 进入商品详情
handleSale(e) {
let { target } = e.currentTarget.dataset
wx.p.router.go('/packageIndex/pages/goodsDetail/index', target)
},
joinCart(e) {
let { target } = e.currentTarget.dataset
// this.handleSale(e)
this.triggerEvent('join', target)
}
},
lifetimes: {
attached() {
this.setWidth()
let userInfo = wx.p.storage.get('userInfo')
this.setData({userInfo})
}
}
})
})
\ No newline at end of file
......@@ -17,47 +17,29 @@
</block>
</view>
<template name="item">
<view class='item-box' wx:if="{{item.goods}}" bindtap='jump' data-item="{{item}}">
<view class='item-box' wx:if="{{item.id || item.goodsId}}" bindtap='handleSale' data-target="{{item}}">
<view class="preview">
<image webp src="{{item.goods.goodsImage}}" lazy-load></image>
<image webp src="{{item.goodsImgUrl}}" lazy-load></image>
</view>
<view class="item-box-content">
<view class='item-box-title'>
<image class="item-box-title-image" wx:if="{{item.goods.isMemberGoods}}" webp src="{{item.IMGURL}}index/member-goods-icon.png" />
<text class="item-box-title-text">{{item.goods.goodsName}}</text>
</view>
<view class='item-box-time'>
<view class="text text-hide">
{{item.goodsStatistics.viewAmount||0}}人查看|售出{{item.goodsStatistics.saleAmount || 0}}
</view>
<text class="item-box-title-text">{{item.goodsSkuName}}</text>
</view>
<view class="item-box-price">
<view class="now">
<text class="unit">¥</text>
<text>{{fn.priceFilter(item.goods.retailPrice || 0, 0)}}.</text>
<text class="price-last">{{fn.priceFilter(item.goods.retailPrice || 0, 1)}}</text>
<text class="unit up" wx:if="{{item.unit}}">{{item.unit}}</text>
<text class="unit up" wx:if="{{item.up}}">起</text>
</view>
<block wx:if="{{item.goods.originalPrice >= 0 && item.goods.originalPrice}}">
<view class="old">¥{{item.goods.originalPrice || 0}}</view>
</block>
</view>
<view class="item-box-bubble">
<!-- 会员商品 -->
<view wx:if="{{item.goods.isMemberGoods}}" class="text item-box-bubble-view">
<text class="item-box-bubble-text">会员价</text>
开通会员权益立享
<view class="points-price">
{{item.redeemPoints}}<text>积分</text>
</view>
</view>
<view class="item-box-goods-label">
<view wx:if="{{item.goods.relatedCoupon}}" class="coupon-logotype">
<text wx:if="{{item.goods.relatedCoupon}}" class="coupon-logo">券</text>
<text class="coupon-name">{{item.goods.relatedCoupon.couponName}}</text>
<view class="item-box-btn">
<view class="market-price">市场价: <text>¥{{item.marketPrice}}</text></view>
<view class="btn" catchtap="handleSale" data-target="{{item}}">
<view class="cart" catchtap="joinCart" data-target="{{item}}">
<glsx-image src="/index/cart.png"></glsx-image>
</view>
<view>兑换</view>
</view>
<view wx:if="{{item.goods.freeShipping}}" class="free-shipping">包邮</view>
</view>
</view>
</view>
</template>
</view>
\ No newline at end of file
</view>
......@@ -10,6 +10,8 @@
flex-wrap: wrap;
padding: 16rpx 20rpx 0;
box-sizing: border-box;
border-radius: 24rpx 24rpx 0 0;
}
.Goods .left, .Goods .right {
display: inline-block;
......@@ -24,7 +26,6 @@
.left .item-box, .right .item-box{
margin-bottom: 20rpx;
background: #FFFFFF;
border-radius: 8px;
overflow: hidden;
}
......@@ -40,6 +41,8 @@
.item-box .preview{
width: 100%;
height: 344rpx;
border-radius: 24rpx;
overflow: hidden;
}
.item-box-content{
......@@ -83,103 +86,45 @@
align-items: center;
}
.item-box-price{
margin-top: 12rpx;
display: flex;
align-items: center;
margin-top: 14rpx;
font-size: 20rpx;
}
.item-box-price .now{
font-size: 40rpx;
color: var(--btnColor);
font-weight: 600;
}
.item-box-price .now .unit{
font-size: 24rpx;
color: #FC5B32;
font-size: 38rpx;
font-weight: 500;
}
.item-box-price .now .price-last{
font-size: 24rpx;
.item-box-price text{
font-weight: 400;
font-size: 22rpx;
margin-left: 4rpx;
}
.item-box-price .old{
color: #3F444D;
text-decoration: line-through;
margin-left: 8rpx;
margin-bottom: -10rpx;
.item-box-btn {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
}
.item-box-bubble .item-box-bubble-view{
position: relative;
background: #FFF5F3;
height: 40rpx;
line-height: 40rpx;
padding-left: 12rpx;
border-radius: 0 8rpx 8rpx 8rpx;
margin-top: 14rpx;
.item-box-btn .market-price {
font-size: 20rpx;
color: #FF6038;
}
.item-box-bubble .item-box-bubble-view::after {
content: '';
position: absolute;
width: 0;
height: 0;
top: -16rpx;
right: -16rpx;
left: 0;
border-right: 16rpx solid transparent;
border-bottom: 16rpx solid #FFF5F3;
color: #858A94;
}
.item-box-bubble .item-box-bubble-text{
margin-right: 16rpx;
.item-box-btn .market-price text {
text-decoration: line-through;
}
.item-box-goods-label{
.item-box-btn .btn {
box-sizing: border-box;
display: flex;
align-items: center;
margin-top: 8rpx;
position: relative;
}
.coupon-logotype, .free-shipping{
font-size: 16rpx;
height: 22rpx;
border: 2rpx solid #FF6038;
border-radius: 4rpx;
color: #FF590E;
}
.coupon-logotype{
position: relative;
}
.coupon-logotype .coupon-logo{
color: #fff;
width: 26rpx;
height: 26rpx;
position: absolute;
left: -2rpx;
top: -2rpx;
margin: 0;
display: inline-block;
text-align: center;
border-radius: 4rpx;
font-size: 16rpx;
line-height: 24rpx;
background: #FF6038;
}
.coupon-logotype .coupon-name{
margin-left: 30rpx;
padding-right: 4rpx;
justify-content: space-between;
padding-right: 16rpx;
color: #FFFFFF;
font-weight: 500;
font-size: 24rpx;
width: 132rpx;
height: 48rpx;
background: #FB8A32;
border-radius: 14rpx;
}
.free-shipping{
margin-left: 8rpx;
padding: 0 8rpx;
.item-box-btn .btn .cart {
width: 48rpx;
height: 48rpx;
}
......@@ -30,7 +30,7 @@ Component({
},
mode: {
type: String,
value: 'scaleToFill'
value: 'aspectFill'
},
webp: {
type: Boolean,
......
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
* mp-html v2.2.2
* https://github.com/jin-yufeng/mp-html
*
* Released under the MIT license
* Author: Jin Yufeng
*/
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:Boolean,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){clearInterval(this._timer),this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var o=this;return new Promise(function(i,r){if(!o.data.useAnchor)return void r(Error("Anchor is disabled"));var a=wx.createSelectorQuery().in(o._in?o._in.page:o).select((o._in?o._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();o._in?a.select(o._in.selector).scrollOffset().select(o._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(o.data.useAnchor)||0);o._in?o._in.page.setData(e({},o._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),i()})})},getText:function(e){var t="";return function e(n){for(var o=0;o<n.length;o++){var i=n[o];if("text"===i.type)t+=i.text.replace(/&amp;/g,"&");else if("br"===i.name)t+="\n";else{var r="p"===i.name||"div"===i.name||"tr"===i.name||"li"===i.name||"h"===i.name[0]&&i.name[1]>"0"&&i.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),i.children&&e(i.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==i.name&&"th"!==i.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setContent:function(e,n){var o=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var i={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,l=r.length;l--;)i["nodes[".concat(a+l,"]")]=r[l];else i.nodes=r;this.setData(i,function(){o._hook("onLoad"),o.triggerEvent("load")});var s;clearInterval(this._timer),this._timer=setInterval(function(){o.getRect().then(function(e){e.height===s&&(o.triggerEvent("ready",e),clearInterval(o._timer)),s=e.height}).catch(function(){})},350)},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
\ No newline at end of file
{"component":true,"usingComponents":{"node":"./node/node"}}
\ No newline at end of file
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg]}}" catchadd="_add"/></view>
\ No newline at end of file
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
\ No newline at end of file
"use strict";function t(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}Component({data:{ctrl:{}},properties:{childs:Array,opts:Array},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){for(var i=t.split("_"),e=this.data.childs[i[0]],r=1;r<i.length;r++)e=e.children[i[r]];return e},play:function(t){if(this.root.data.pauseVideo){for(var i=!1,e=t.target.id,r=this.root._videos.length;r--;)this.root._videos[r].id===e?i=!0:this.root._videos[r].pause();if(!i){var s=wx.createVideoContext(e,this);s.id=e,this.root._videos.push(s)}}},imgTap:function(t){var i=this.getNode(t.target.dataset.i);if(i.a)return this.linkTap(i.a);if(!i.attrs.ignore&&(this.root.triggerEvent("imgtap",i.attrs),this.root.data.previewImg)){var e=this.root.imgList[i.i];wx.previewImage({current:e,urls:this.root.imgList})}},imgLoad:function(i){var e,r=i.target.dataset.i,s=this.getNode(r);s.w?(this.data.opts[1]&&!this.data.ctrl[r]||-1===this.data.ctrl[r])&&(e=1):e=i.detail.width,e&&this.setData(t({},"ctrl."+r,e))},linkTap:function(t){var i=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},e=i.attrs||t,r=e.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(i.children||[])},e)),r&&("#"===r[0]?this.root.navigateTo(r.substring(1)).catch(function(){}):r.split("?")[0].includes("://")?this.root.data.copyLink&&wx.setClipboardData({data:r,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:r,fail:function(){wx.switchTab({url:r,fail:function(){}})}}))},mediaError:function(i){var e=i.target.dataset.i,r=this.getNode(e);if("video"===r.name||"audio"===r.name){var s=(this.data.ctrl[e]||0)+1;if(s>r.src.length&&(s=0),s<r.src.length)return this.setData(t({},"ctrl."+e,s))}else"img"===r.name&&this.data.opts[2]&&this.setData(t({},"ctrl."+e,-1));this.root&&this.root.triggerEvent("error",{source:r.name,attrs:r.attrs,errMsg:i.detail.errMsg})}}});
\ No newline at end of file
{"component":true,"usingComponents":{"node":"./node"}}
\ No newline at end of file
<wxs module="use">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n){return!n.c&&(!n.children||"a"===n.name||!e[n.name]&&-1===(n.attrs.style||"").indexOf("inline"))};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{n.h?'':'widthFix'}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="{{opts[4] ? 'imgTap' : ''}}" bindlongpress="noop"/></block><text wx:elif="{{n.text}}" user-select="{{n.us}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{use(n1)}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{use(n2)}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{use(n3)}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{use(n4)}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{use(n5)}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
\ No newline at end of file
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}._blockquote,._div,._p{display:block}
\ No newline at end of file
......@@ -10,4 +10,4 @@ export const preReleaseAppId = 'wx6e40cfb83ce4ffb1'
export const dsnUrl = 'https://70845376de464a7d9588639fd7c4b5f9@sentry.glsx.com.cn/46'
// cdn图片地址
export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/'
export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/'
<!-- flex子元素自适应宽度示例 -->
<view class="container">
<view class="section">
<view class="title">使用 flex: 1 平均分配宽度</view>
<view class="flex-container">
<view class="flex-item item1">项目1</view>
<view class="flex-item item2">项目2</view>
<view class="flex-item item3">项目3</view>
</view>
</view>
<view class="section">
<view class="title">使用不同 flex 值分配宽度</view>
<view class="flex-container">
<view class="flex-item item1" style="flex: 2">项目1 (flex: 2)</view>
<view class="flex-item item2" style="flex: 1">项目2 (flex: 1)</view>
<view class="flex-item item3" style="flex: 1">项目3 (flex: 1)</view>
</view>
</view>
<view class="section">
<view class="title">根据内容自适应宽度</view>
<view class="flex-container">
<view class="flex-item item1 auto-width">短</view>
<view class="flex-item item2 auto-width">中等长度内容</view>
<view class="flex-item item3 auto-width">这是一个很长的内容</view>
</view>
</view>
</view>
\ No newline at end of file
/* flex子元素自适应宽度示例样式 */
.container {
padding: 20rpx;
}
.section {
margin-bottom: 40rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
color: #333;
}
.flex-container {
display: flex;
width: 100%;
gap: 20rpx;
margin-bottom: 20rpx;
}
.flex-item {
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10rpx;
color: white;
font-size: 28rpx;
}
.item1 {
background-color: #ff6b6b;
}
.item2 {
background-color: #4ecdc4;
}
.item3 {
background-color: #45b7d1;
}
/* 平均分配宽度 */
.flex-item {
flex: 1;
}
/* 根据内容自适应宽度 */
.auto-width {
flex: 0 1 auto;
/* flex-grow: 0 (不扩展)
flex-shrink: 1 (可以收缩)
flex-basis: auto (根据内容确定基础宽度) */
}
\ No newline at end of file
......@@ -2,8 +2,8 @@ module.exports = Behavior(
{
data: {
afterType:{
1:'我要退款退货',
2:'我要退款(无需退货)'
1001:'我要退款退货',
1002:'我要退款(无需退货)'
}
}
})
\ No newline at end of file
module.exports = Behavior({
data: {
//1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成
//1001:待支付 1002:待审核,1003:审核不通过,1004:已取消(交易失败) ,1005:订单异常,1006:待处理,1007: 待发货,1008:已发货,1009:已完成(交易成功),1010:售后处理中,1012 订单关闭
statusEnum: {
1: '待付款',
2: '已支付',
3: '已关闭',
4: '已发货',
5: '已收货',
6: '待发货',
7: '待安装',
8: '已安装',
9: '售后中',
10: '售后完成'
1001: '待支付',
1002: '待审核',
1003: '审核不通过',
1004: '已取消',
1005: '订单异常',
1006: '待处理',
1007: '待发货',
1008: '已发货',
1009: '已完成',
1010: '售后处理中'
},
/**售后状态 1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败;8已取消 */
/**售后状态 (1000:待审核,1001:审核通过,1002:已收货,1003:已退款,1004:已生成新订单,1005:审核不通过,1006:已取消)*/
afterSaleStatus: {
1: '待审核',
2: '审核通过',
3: '审核不通过',
4: '待确认收到退货',
5: '退款中',
6: '已退款',
7: '退款失败',
8: '已取消'
1000: '待审核',
1001: '审核通过',
1002:'已收货',
1003: '已退款',
1005: '审核不通过',
1006: '已取消'
},
/**权益&套餐 */
......
{
"name": "glsk-points-mall",
"version": "1.0.0",
"lockfileVersion": 3,
"lockfileVersion": 1,
"requires": true,
"packages": {
"": {
"name": "glsk-points-mall",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"glsx-applet-component": "^1.1.24",
"glsx-map-sdk": "^0.2.0",
"number-precision": "^1.6.0"
}
},
"node_modules/glsx-applet-component": {
"dependencies": {
"glsx-applet-component": {
"version": "1.1.29",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz",
"integrity": "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw=="
},
"node_modules/glsx-map-sdk": {
"glsx-map-sdk": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/glsx-map-sdk/-/glsx-map-sdk-0.2.0.tgz",
"integrity": "sha512-uEFlXvJEDofYjasR4mwkmF5yNTRs5QA2ZAynGPHiKpKdpjQkVFPJH0zGupmQEkxmh4f5B0wPbDobHvLgld7mVw=="
},
"node_modules/number-precision": {
"number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
......
// packageMall/pages/search/search.js
// packageCart/pages/coupon/coupon.js
Page({
/**
* 页面的初始数据
*/
data: {
searchList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData(options)
this.getSearchList(options.value)
},
getSearchList(value) {
wx.p.wxApi.showLoading()
let {
goodsList
} = this.data
const searchList = []
goodsList.map(e => {
if (e.goodsName.indexOf(value) != -1) searchList.push(e)
})
this.setData({
searchList,
flag: true
})
wx.hideLoading()
},
search(e) {
this.getSearchList(e.detail)
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/coupon/coupon.wxss */
\ No newline at end of file
<!--packageCart/pages/coupon/coupon.wxml-->
<text>packageCart/pages/coupon/coupon.wxml</text>
\ No newline at end of file
// packageCart/pages/detail/detail.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/detail/detail.wxss */
\ No newline at end of file
<!--packageCart/pages/detail/detail.wxml-->
<text>packageCart/pages/detail/detail.wxml</text>
\ No newline at end of file
// packageCart/pages/pay/pay.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/pay/pay.wxss */
\ No newline at end of file
<!--packageCart/pages/pay/pay.wxml-->
<text>packageCart/pages/pay/pay.wxml</text>
\ No newline at end of file
// packageCart/pages/search/search.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/search/search.wxss */
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!