The move speaks to slowing spending by consumers and Apple’s continuing struggles in China, its second-largest market.